/* Shared presentation for accounting master-data and partner editors only. */
body.erp-formal-theme article.content .master-data-editor { max-width:1280px; margin-inline:auto; overflow:visible; }
body.erp-formal-theme article.content .master-data-editor.crud-editor-page::before { display:none; }
body.erp-formal-theme article.content .master-data-editor > .card-header { padding:20px 26px!important; min-height:68px; border-start-start-radius:12px; border-start-end-radius:12px; background:#f5f9f9!important; font-size:1.12rem; font-weight:600; }
body.erp-formal-theme article.content .master-data-editor > .card-header h5 { font-size:1.12rem; }
body.erp-formal-theme article.content .master-data-editor > .card-body { padding:22px 26px 0!important; }
.master-data-form { color:#263f47; min-width:0; }
.master-data-form * { min-width:0; }
.master-form-intro { display:flex; align-items:center; gap:9px; color:#6a818b; font-size:.78rem; margin:0 0 22px; line-height:1.8; }
.master-form-intro i { color:#517b84; }
.master-form-section { padding:20px; margin:0 0 20px; border:1px solid #dce6e8; border-radius:12px; background:#fff; }
.master-form-section > legend { float:none; display:flex; align-items:center; gap:10px; width:auto; max-width:100%; padding-inline:8px; margin:0; font-size:.94rem; font-weight:600; color:#264b55; }
.master-form-section > legend > span { display:inline-grid; place-items:center; width:29px; height:27px; border-radius:7px; border:1px solid #dbe7e9; background:#f0f6f6; color:#517880; font-size:.67rem; font-weight:500; }
.master-section-hint { font-size:.73rem; line-height:1.8; color:#72868d; margin:1px 0 18px; }
.master-form-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); column-gap:20px; row-gap:20px; align-items:start; }
.master-span-2 { grid-column:span 2; }.master-span-3 { grid-column:span 3; }.master-span-4 { grid-column:span 4; }.master-span-6 { grid-column:span 6; }.master-span-8 { grid-column:span 8; }.master-span-12 { grid-column:1 / -1; }
.master-form-field { display:flex; flex-direction:column; align-items:stretch; min-width:0; }
body.erp-formal-theme .master-data-form .form-label { display:block; color:#415e68!important; font-size:.79rem; margin-bottom:8px; line-height:1.65; font-weight:500!important; }
body.erp-formal-theme .master-data-form :is(.form-control,.form-select,.searchable-select-trigger) { width:100%; min-height:45px; border-radius:8px; border-color:#cbdce0; font-size:.86rem; padding:.6rem .75rem; }
body.erp-formal-theme .master-data-form :is(.form-control,.form-select,.searchable-select-trigger):focus-visible { outline:2px solid #397d88; outline-offset:2px; box-shadow:none; }
.master-data-form .searchable-select-trigger { display:flex; align-items:center; gap:8px; }
.master-data-form .searchable-select-value { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:start; }
.master-data-form .searchable-select-icon { flex-shrink:0; }
.master-field-hint { color:#7a8d95; font-size:.68rem; line-height:1.75; margin-top:6px; }
.master-company-value { display:flex; align-items:center; min-height:45px; padding:.6rem .75rem; border:1px solid #dce5e8; border-radius:8px; color:#5d747d; background:#f4f7f8; font-size:.85rem; }
.master-type-choice { width:100%; min-height:45px; border:1px solid #cbdce0; border-radius:8px; overflow:hidden; }
body.erp-formal-theme .master-data-form .master-type-choice .btn { font-size:.8rem; min-height:45px; border:0!important; border-radius:0!important; }
body.erp-formal-theme .master-data-form .master-type-choice .btn + .btn { border-inline-start:1px solid #cbdce0!important; }
.master-form-grid > .master-form-field:has(> .master-switch) { align-self:end; }
.master-switch { display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:16px; width:100%; min-height:79px; padding:14px 16px; border:1px solid #d7e4e7; border-radius:9px; background:#f8fbfb; cursor:pointer; }
.master-switch > span { flex:1; }
.master-switch strong { display:block; font-weight:500; font-size:.81rem; color:#375965; }
.master-switch small { display:block; margin-top:5px; color:#738a93; font-size:.68rem; line-height:1.6; }
body.erp-formal-theme .master-data-form .master-switch .form-check-input { flex:0 0 42px; width:42px; height:24px; float:none; margin:0; border-radius:24px; border:1px solid #b8cbd0; background-color:#dbe5e8; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8' fill='white'/%3E%3C/svg%3E")!important; background-size:22px 22px; background-repeat:no-repeat; background-position:left center; box-shadow:none; cursor:pointer; transition:background-position .15s,background-color .15s; }
body.erp-formal-theme .master-data-form .master-switch .form-check-input:checked { background-color:#205e66; background-position:right center; border-color:#205e66; }
body.erp-formal-theme .master-data-form .master-switch .form-check-input:focus-visible { outline:2px solid #397d88; outline-offset:3px; }
.master-switch:has(input:checked) { border-color:#abcbd0; background:#f0f7f7; }
.master-switch:has(input:disabled) { cursor:default; opacity:.72; }
.master-form-note { padding:14px 16px; margin:0; border-radius:9px; border:1px solid #dee9eb; background:#f5f9fa; color:#5c7782; font-size:.75rem; line-height:1.9; }
.master-form-note i { margin-inline-end:5px; }
.master-link-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.master-link-body { height:100%; padding:18px; border:1px solid #dce6e8; border-radius:10px; background:#fafcfc; }
.master-link-body .input-group { display:flex; flex-wrap:nowrap; gap:8px; }
.master-link-body .input-group > .searchable-select { flex:1; width:0; }
.master-link-body .input-group > button { border-radius:8px!important; padding-inline:16px!important; font-size:.78rem; }
.master-link-body .badge { white-space:normal; overflow-wrap:anywhere; line-height:1.8!important; }
.master-link-body .badge button { min-width:30px; min-height:30px; }
.master-form-actions { position:sticky; bottom:0; z-index:4; display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:16px 0; margin:0!important; background:#fffffff5; border-top:1px solid #dce6e8; backdrop-filter:blur(8px); }
body.erp-formal-theme .master-form-actions .btn { min-height:44px; min-width:130px; margin:0!important; font-size:.8rem; }
.master-form-actions .btn i { margin-inline-end:5px; }
.master-form-shortcuts { margin-inline-start:auto; color:#84969d; font-size:.7rem; order:5; }
.master-form-shortcuts kbd { color:#627d86; border:1px solid #dce6e8; border-radius:4px; background:#f7f9fa; font-size:.64rem; font-weight:400; }
.master-data-form .validation-errors { padding:12px 30px; margin:0 0 20px; border:1px solid #ecd5d2; border-radius:8px; color:#9d3c35; background:#fff7f6; font-size:.8rem; }
@media (max-width:1000px) { .master-form-grid { gap:18px; } .master-form-grid > :is(.master-span-2,.master-span-3,.master-span-4) { grid-column:span 6; } .master-form-grid > .master-span-8 { grid-column:1 / -1; } }
@media (max-width:650px) {
    body.erp-formal-theme article.content .master-data-editor > .card-header { padding:17px!important; }
    body.erp-formal-theme article.content .master-data-editor > .card-body { padding:16px 12px 0!important; }
    .master-form-section { padding:15px 12px; margin-bottom:18px; }
    .master-form-section > legend { font-size:.84rem; gap:8px; }.master-form-section > legend > span { width:25px; }
    .master-form-grid > :is(.master-span-2,.master-span-3,.master-span-4,.master-span-6,.master-span-8) { grid-column:1 / -1; }
    .master-form-grid { row-gap:16px; }.master-link-grid { grid-template-columns:1fr; }.master-link-body { padding:12px; }
    .master-form-intro { align-items:flex-start; font-size:.7rem; }.master-section-hint { font-size:.68rem; }
    .master-form-shortcuts { display:none; }.master-form-actions { gap:8px; padding:12px 0; }
    body.erp-formal-theme .master-form-actions .btn { flex:1; min-width:115px; padding-inline:8px; font-size:.75rem; }
}
@media (prefers-reduced-motion:reduce) { .master-switch .form-check-input { transition:none!important; } }
@media print { .master-form-actions,.master-form-intro { display:none; }.master-form-section { break-inside:avoid; } }
