.cc-shell{--cc-ink:#17211d;--cc-muted:#5c6d64;--cc-line:#dce5df;--cc-green:#147d62;color:var(--cc-ink);width:100%;min-width:0;display:grid;gap:1rem;font-size:1rem;line-height:1.55}
.cc-shell *,.cc-shell *::before,.cc-shell *::after{box-sizing:border-box}
.cc-shell h2,.cc-shell h3,.cc-shell h4,.cc-shell p{margin:0}.cc-shell h2{font-size:clamp(1.35rem,4vw,1.8rem)}.cc-shell h3{font-size:1.1rem}.cc-shell h4{font-size:1rem;margin-top:.6rem}
.cc-hero{background:#174b3c;color:#fff;border-radius:1rem;padding:1.1rem 1.25rem;display:flex;flex-wrap:wrap;gap:.8rem;justify-content:space-between;align-items:center}.cc-hero p{color:#b4d9ca;font-size:.75rem;letter-spacing:.12em}.cc-hero span{color:#d6ece3;font-size:.875rem}.cc-demo{background:#fcf2d3;color:#705213;border-radius:.5rem;padding:.4rem .7rem;font-size:.875rem}
.cc-controls{display:grid;gap:1rem;margin:0;padding:0;border:0;min-width:0}.cc-card,.cc-toolbar{border:1px solid var(--cc-line);background:#fff;border-radius:.85rem;padding:1rem;min-width:0}.cc-card{display:grid;gap:.8rem}.cc-toolbar,.cc-form-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:.8rem;align-items:end}
.cc-shell label{display:grid;gap:.35rem;min-width:0;font-size:.875rem;font-weight:600}.cc-shell input,.cc-shell select,.cc-shell textarea{width:100%;max-width:100%;min-width:0;font:inherit;font-size:1rem;color:var(--cc-ink);background:white;border:1px solid #bdcdc3;border-radius:.45rem;padding:.55rem .65rem;min-height:2.75rem}.cc-shell textarea{resize:vertical}.cc-shell input[readonly]{background:#f0f4f1}.cc-shell .cc-check{display:flex;align-items:flex-start;gap:.6rem}.cc-check input{flex:0 0 1.25rem;width:1.25rem;min-height:1.25rem;margin-top:.15rem}
.cc-shell button{min-height:2.75rem;min-width:2.75rem;padding:.5rem .8rem;font:inherit;font-size:.875rem;border:1px solid var(--cc-line);border-radius:.5rem;background:#fff;color:var(--cc-ink);cursor:pointer;overflow-wrap:anywhere}.cc-shell button:hover{background:#edf6f1}.cc-shell button.cc-primary{background:var(--cc-green);color:#fff;border-color:var(--cc-green);font-weight:700}.cc-shell button:disabled,.cc-controls:disabled button{opacity:.5;cursor:wait}.cc-shell :is(button,input,select,textarea,summary):focus-visible{outline:3px solid #65a5df;outline-offset:2px}
.cc-shell form{display:grid;gap:.8rem;min-width:0}.cc-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;min-width:0}.cc-actions>*{max-width:100%}.cc-rule-note{font-size:.875rem;color:#3f5c4e;background:#eef5f0;border-left:3px solid var(--cc-green);padding:.8rem 1rem;border-radius:.35rem}.cc-muted,.cc-shell small{color:var(--cc-muted);font-size:.875rem;font-weight:400;overflow-wrap:anywhere}.cc-tabs{display:flex;flex-wrap:wrap;gap:.35rem;border-bottom:1px solid var(--cc-line);padding-bottom:.5rem}.cc-tabs button{border-color:transparent;background:transparent}.cc-tabs .active{background:#deeee5;color:#115741;font-weight:700}
.cc-table-wrap{width:100%;max-width:100%;min-width:0;overflow-x:auto;border:1px solid var(--cc-line);border-radius:.55rem}.cc-shell table{width:100%;border-collapse:collapse;font-size:.875rem;font-variant-numeric:tabular-nums}.cc-shell th,.cc-shell td{text-align:left;padding:.65rem .75rem;border-bottom:1px solid #e9eeeb;vertical-align:top;white-space:nowrap}.cc-shell th{background:#f2f6f3;color:#506458;font-weight:600}.cc-shell tbody tr:last-child td{border-bottom:0}.cc-shell tbody tr:hover{background:#f9fbfa}.cc-empty{padding:1.5rem!important;color:var(--cc-muted);text-align:center!important;white-space:normal!important}.cc-evidence{display:block;max-width:32rem;white-space:normal;overflow-wrap:anywhere}
.cc-message{background:#edf8f4;border:1px solid #bfe2d5;border-radius:.6rem;padding:.8rem 1rem;overflow-wrap:anywhere}.cc-message.is-error{background:#fff1f1;color:#8e3030;border-color:#efc5c5}.cc-preview,.cc-allocation{border:1px solid #a6cdbb;border-radius:.6rem;padding:1rem;display:grid;gap:.8rem;min-width:0}.cc-shell details{border-top:1px solid var(--cc-line);padding:.65rem 0;min-width:0}.cc-shell summary{cursor:pointer;min-height:2.75rem;padding:.5rem 0;font-weight:600;overflow-wrap:anywhere}.cc-shell details>.cc-table-wrap{margin-top:.6rem}
.cc-segments,.cc-shares{display:grid;gap:.6rem}.cc-segment,.cc-share{display:grid;grid-template-columns:minmax(0,1fr);gap:.6rem;align-items:end;padding:.7rem;border:1px solid var(--cc-line);border-radius:.6rem;background:#fafcfb}.cc-section-head{display:flex;flex-direction:column;align-items:flex-start;gap:.75rem}.cc-section-head>div{display:grid;gap:.35rem}.cc-result-state{display:flex;flex-wrap:wrap;gap:.5rem 1rem;padding:.75rem;border-radius:.5rem;background:#fff3dc;color:#78551b}.cc-result-state.is-ready{background:#e9f6ed;color:#21613b}.cc-result-state span{font-size:.875rem}.cc-blockers{margin:0;padding:.75rem .75rem .75rem 1.8rem;background:#fffaf0;border-radius:.5rem;font-size:.875rem}.cc-blockers li{margin:.4rem 0;overflow-wrap:anywhere}.cc-blockers span{display:block;color:#746649}
.cc-kpis{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem}.cc-kpis>div{display:grid;gap:.3rem;background:#f2f7f3;border:1px solid var(--cc-line);border-radius:.6rem;padding:1rem;min-width:0}.cc-kpis span{font-size:.875rem;color:var(--cc-muted)}.cc-kpis strong{font-size:1.5rem;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
@media(min-width:680px){.cc-form-grid,.cc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.cc-wide{grid-column:1/-1}.cc-toolbar{grid-template-columns:minmax(12rem,18rem) minmax(0,1fr)}.cc-segment{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) auto}.cc-share{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.cc-section-head{flex-direction:row;align-items:center;justify-content:space-between}}
@media(min-width:1100px){.cc-form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.cc-shell{font-size:.9375rem}}

.cc-person-field{display:grid;gap:.35rem;min-width:0;font-size:.875rem}.cc-person-field>.cc-muted{font-weight:400}.cc-person-segment .cc-person-field{grid-column:1/-1}.cc-shell .ac-tree-picker input[type=radio]{width:1.1rem;min-height:1.1rem;flex:0 0 1.1rem}.cc-shell .ac-picker-panel{position:relative;left:auto;width:100%;max-width:100%;min-width:0}.cc-shell .ac-tree-picker{min-width:0}.cc-shell .ac-tree-picker ul{padding-left:1rem}.cc-shell .ac-tree-picker label{display:flex;align-items:center}.cc-shell .ac-tree-picker details{border-top:0}.cc-shell .ac-tree-picker .ac-picker-head label{display:grid}.cc-shell .ac-tree-picker .ac-tree-root{max-height:20rem;overflow:auto}
@media(max-width:679px){.cc-shell .cc-table-wrap{border:0}.cc-shell table,.cc-shell tbody,.cc-shell tr,.cc-shell td{display:block;white-space:normal;width:100%}.cc-shell thead{display:none}.cc-shell tr{border:1px solid var(--cc-line);border-radius:.5rem;margin:.5rem 0;overflow:hidden}.cc-shell td{display:grid;grid-template-columns:minmax(6rem,.7fr) minmax(0,1.3fr);gap:.6rem;overflow-wrap:anywhere}.cc-shell td::before{content:attr(data-label);font-weight:600;color:var(--cc-muted)}.cc-shell td.cc-empty{display:block}.cc-shell td.cc-empty::before{display:none}}

.ad-assets-history .ledger-workbar-title{flex-wrap:wrap;align-items:flex-start;white-space:normal;overflow:visible;gap:.35rem}.ad-assets-history .ledger-workbar-title strong{flex:1 1 100%;max-width:100%;white-space:normal;overflow:visible}.ad-assets-history .ledger-workbar-title span{flex:1 1 100%;white-space:normal;overflow:visible;overflow-wrap:anywhere}.ad-assets-history .ledger-workbar>.split-actions{flex-wrap:wrap;white-space:normal;overflow:visible}.ad-assets-history .ledger-workbar>.split-actions>.muted{flex:1 1 100%;overflow-wrap:anywhere}

/* Formal account attribution remains legible beside its selected-month periods. */
.ad-formal-person-segment { white-space: normal; overflow-wrap: anywhere; margin-block: 4px; }
.ad-formal-person-segment span { white-space: nowrap; font-size: 11px; }

/* One account table; sources are mounted only in the selected workflow. */
.ad-assets-unified table{min-width:980px;table-layout:auto}
.ad-assets-unified th,.ad-assets-unified td{white-space:normal;vertical-align:top;padding:10px 8px}
.ad-assets-unified th:first-child,.ad-assets-unified td:first-child{width:30px}
.ad-assets-unified th:nth-child(2),.ad-assets-unified td:nth-child(2){width:220px;overflow-wrap:anywhere}
.ad-assets-unified small{display:block;color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.ad-assets-unified th:last-child,.ad-assets-unified td:last-child{width:150px;min-width:150px}
.ad-bulk-tools{padding:8px 0}.ad-bulk-tools summary{cursor:pointer;color:var(--muted);font-size:13px;padding:6px}.ad-bulk-tools .filters{margin-top:8px}
.ad-account-editor .modal-body{display:grid;gap:12px;min-width:0;overflow:auto}
.ad-account-editor fieldset.ledger-edit-grid{margin:0;padding:0;border:0;min-width:0}
.ad-editor-tabs{flex-wrap:wrap}.ad-editor-tabs button{min-height:40px}
.cc-embedded .cc-card{border:0;padding:0;background:transparent}
.cc-embedded .cc-person-segment{grid-template-columns:minmax(0,1fr) minmax(100px,.45fr)}
.cc-embedded .cc-person-field{grid-column:auto}.cc-embedded .cc-effective-details{width:100%}
.cc-period-summary{font-size:13px;color:var(--cc-muted)}
@media(max-width:679px){
 .ad-assets-unified table,.ad-assets-unified tbody,.ad-assets-unified tr,.ad-assets-unified td{display:block;width:100%;min-width:0;table-layout:auto}
 .ad-assets-unified thead{display:none}.ad-assets-unified tr{border:1px solid var(--border);border-radius:8px;margin:8px 0;padding:8px}
 .ad-assets-unified td{display:grid;grid-template-columns:85px minmax(0,1fr);gap:8px;overflow:visible;white-space:normal}
 .ad-assets-unified td:first-child,.ad-assets-unified td:nth-child(2),.ad-assets-unified td:last-child{width:100%;min-width:0;text-align:left;position:static;box-shadow:none}
 .ad-assets-unified td::before{display:block;font-size:12px;color:var(--muted)}
 .ad-assets-unified td:nth-child(1)::before{content:'选择'}.ad-assets-unified td:nth-child(2)::before{content:'账户'}.ad-assets-unified td:nth-child(3)::before{content:'负责人'}.ad-assets-unified td:nth-child(4)::before{content:'部门'}.ad-assets-unified td:nth-child(5)::before{content:'媒体渠道'}.ad-assets-unified td:nth-child(6)::before{content:'业务归属'}.ad-assets-unified td:nth-child(7)::before{content:'手续费率'}.ad-assets-unified td:nth-child(8)::before{content:'状态'}.ad-assets-unified td:nth-child(9)::before{content:'操作'}
 .ad-assets-unified td>small,.ad-assets-unified td>.ad-formal-person-segment~.ad-formal-person-segment{grid-column:2}
 .ad-account-editor.modal-panel{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
 .ad-account-editor .modal-body{padding:12px}.cc-embedded .cc-person-segment{grid-template-columns:minmax(0,1fr)}.cc-embedded .cc-person-field{grid-column:1/-1}
}
@media(max-width:679px){.ad-assets-current .ledger-workbar-title{flex-wrap:wrap;white-space:normal;overflow:visible}.ad-assets-current .ledger-workbar-title strong,.ad-assets-current .ledger-workbar-title span{flex:1 1 100%;white-space:normal;overflow:visible;max-width:100%;overflow-wrap:anywhere}}
/* Atomic account editor: balanced fields, searchable company options, compact history. */
.ad-account-editor.modal-panel{width:min(1060px,calc(100vw - 40px));margin:auto}
.ad-account-editor .modal-body{padding:22px;gap:20px}
.ad-account-editor #ad-asset-edit-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 18px}
.ad-account-editor .ledger-edit-field{min-width:0;margin:0;display:flex;flex-direction:column;gap:6px}
.ad-account-editor .ledger-edit-field.wide{grid-column:span 1}
.ad-account-editor input,.ad-account-editor select{box-sizing:border-box;width:100%;min-width:0;min-height:38px}
.ad-binding-editor{min-width:0;margin:0;padding:16px 0 0;border:0;border-top:1px solid var(--border)}
.ad-account-editor .cc-embedded .cc-person-segment{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 18px;align-items:start}
.ad-account-editor .cc-person-field{grid-column:auto;min-width:0}
.ad-account-editor .cc-period-summary{margin:0;grid-column:1/-1}
.ad-account-editor .cc-person-segment>label{display:flex;flex-direction:column;gap:6px;min-width:0}
.ad-account-editor .cc-form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 18px}
.ad-account-editor .cc-history-segment,.ad-legacy-zone{padding:10px 12px;border:1px solid var(--border);border-radius:8px;margin-top:10px;min-width:0}
.ad-account-editor summary{cursor:pointer;font-size:13px;line-height:1.6}
.ad-account-editor .cc-history-segment>.cc-segment{margin-top:12px}
.ad-search-select{position:relative;min-width:0;width:100%}
.ad-search-select-trigger{display:flex;align-items:stretch;gap:6px;min-width:0}
.ad-search-select-trigger>[data-select-toggle]{display:flex;align-items:center;justify-content:space-between;text-align:left;min-width:0;flex:1;min-height:38px;padding:8px 10px;gap:8px;border:1px solid var(--border);border-radius:6px;background:var(--surface,#fff);color:inherit;overflow-wrap:anywhere;font:inherit}
.ad-search-select-trigger>.action-button{flex:none;padding:6px 9px}
.ad-search-select-panel{display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;position:absolute;z-index:30;inset:calc(100% + 4px) 0 auto;background:var(--surface,#fff);padding:8px;border:1px solid var(--border);border-radius:8px;box-shadow:0 6px 18px #0002;min-width:0}
.ad-search-select-panel[hidden]{display:none}
.ad-search-select-panel>input,.ad-search-select-panel>p{flex-shrink:0}.ad-search-select-panel [role=listbox]{flex:1 1 auto;min-height:0;max-height:180px;overflow:auto;padding-top:6px}
.ad-search-select-panel [role=option]{width:100%;display:block;text-align:left;padding:8px;border:0;background:transparent;color:inherit;font:inherit;overflow-wrap:anywhere}
.ad-search-select-panel [role=option][hidden]{display:none}
.ad-search-select-panel [role=option]:hover,.ad-search-select-panel [aria-selected=true]{background:var(--surface-soft,#eef4ff)}
.ad-options-backdrop{z-index:1200}.ad-options-editor{width:min(720px,calc(100vw - 40px));margin:auto}
.ad-options-editor .modal-body{padding:20px}.ad-options-editor .option-edit-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0}
.ad-options-editor .ad-option-actions{display:flex;gap:6px;flex-wrap:wrap}.ad-options-editor input{min-width:0;width:100%;box-sizing:border-box}
@media(max-width:679px){
 .ad-account-editor.modal-panel,.ad-options-editor{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
 .ad-account-editor .modal-body,.ad-options-editor .modal-body{padding:16px}
 .ad-account-editor #ad-asset-edit-form,.ad-account-editor .cc-embedded .cc-person-segment,.ad-account-editor .cc-form-grid{grid-template-columns:minmax(0,1fr)}
 .ad-options-editor .option-edit-row{grid-template-columns:minmax(0,1fr)}
 .ad-options-editor .ad-option-actions{justify-content:flex-end}
}
.ad-account-editor input:not([type=hidden]):not([type=checkbox]),.ad-account-editor select,.ad-account-editor textarea,.ad-options-editor input{border:1px solid var(--border,#d8dfe8);border-radius:6px;padding:9px 10px;background:var(--surface,#fff);color:inherit;font:inherit}
.ad-account-editor input:focus,.ad-account-editor textarea:focus,.ad-options-editor input:focus{outline:2px solid #c7dcff;outline-offset:1px}
/* Compact unified editor only: metadata and the current effective segment share one grid. */
.ad-account-editor .ad-unified-grid :is(#ad-asset-sources-panel,.cc-shell,.cc-controls,.ad-compact-binding,.ad-current-segment){display:contents}
.ad-account-editor #ad-asset-edit-form.ad-unified-grid{grid-template-columns:minmax(0,1fr);gap:12px 16px;align-items:start}
.ad-account-editor .ad-unified-grid label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:500;min-width:0;margin:0}
.ad-account-editor .ad-unified-grid [data-ad-slot=account_id]{order:1}.ad-account-editor .ad-unified-grid [data-ad-slot=account_name]{order:2}.ad-account-editor .ad-unified-grid [data-ad-slot=agency_name]{order:3}
.ad-account-editor .ad-unified-grid [data-ad-slot=media_channel]{order:4}.ad-account-editor .ad-unified-grid [data-ad-slot=account_attribute]{order:5}.ad-account-editor .ad-unified-grid [data-ad-slot=timezone]{order:6}
.ad-account-editor .ad-unified-grid [data-ad-slot=business_owner]{order:7}.ad-account-editor .ad-unified-grid [data-ad-slot=status]{order:8}.ad-account-editor .ad-unified-grid [data-ad-slot=fee]{order:9}
.ad-account-editor .ad-unified-grid [data-ad-slot=person]{order:10}.ad-account-editor .ad-unified-grid [data-ad-slot=department]{order:11}.ad-account-editor .ad-unified-grid [data-ad-slot=reason]{order:12}
.ad-account-editor .ad-period-dates{order:13;grid-column:1/-1}.ad-account-editor .ad-account-aux{order:14;grid-column:1/-1}.ad-account-editor .ad-binding-history{order:15;grid-column:1/-1}
.ad-account-editor .ad-unified-grid :is(.ad-grid-wide,.cc-message){grid-column:1/-1;order:0}
.ad-account-editor .ad-unified-grid details{border-top:1px solid var(--border);padding:6px 0;margin:0;min-width:0}
.ad-account-editor .ad-unified-grid summary{padding:5px 0;min-height:30px;font-size:13px;font-weight:500}
.ad-account-editor .ad-period-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px 16px;padding-top:10px;min-width:0}
.ad-account-editor .ad-history-period{padding:8px 12px!important;background:var(--surface-soft,#f7f9fc);border-radius:6px;margin:8px 0!important}
.ad-account-editor .ad-period-placeholder{display:flex;align-items:center;min-height:44px;padding:8px 10px;border:1px solid var(--border);border-radius:6px;background:var(--surface-soft,#f7f9fc);font-size:12px}
.ad-account-editor .ad-unified-grid :is(input:not([type=hidden]),select,[data-select-toggle],.action-button){height:44px;min-height:44px;font-size:13px;padding:8px 10px}
.ad-account-editor .ad-unified-grid [data-select-toggle]{overflow:hidden;white-space:nowrap}
.ad-account-editor .ad-unified-grid .ad-search-select-panel{z-index:45}
.ad-account-editor .ad-unified-grid .ad-search-select-panel [role=option]{min-height:36px;padding:6px 8px;font-size:13px}
.ad-account-editor .ad-unified-grid .ad-search-select-panel [role=listbox]{max-height:160px}
.ad-account-editor .ad-unified-grid .cc-actions{padding-top:8px}
.ad-account-editor .modal-header,.ad-account-editor .modal-footer{flex:none;padding:16px 22px}
.ad-account-editor .modal-body{display:block;padding:18px 22px;min-height:0}
.ad-account-editor.modal-panel{display:flex;flex-direction:column;max-height:calc(100dvh - 32px)}
@media(min-width:680px){.ad-account-editor #ad-asset-edit-form.ad-unified-grid,.ad-account-editor .ad-period-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1000px){.ad-account-editor #ad-asset-edit-form.ad-unified-grid,.ad-account-editor .ad-period-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ad-account-editor .ad-unified-grid :is(input:not([type=hidden]),select,[data-select-toggle],.action-button){height:38px;min-height:38px}.ad-account-editor .ad-period-placeholder{min-height:38px}}
@media(max-width:679px){.ad-account-editor .modal-header,.ad-account-editor .modal-footer{padding:12px 16px}.ad-account-editor .modal-body{padding:16px}.ad-account-editor .modal-header h2{font-size:16px}}
.ad-account-editor .ad-unified-grid label,.ad-account-editor .ad-unified-grid .ledger-edit-field>span{color:var(--muted,#65758a);font-size:13px;font-weight:500;line-height:1.4}
.ad-account-editor .ad-unified-grid :is(input,[data-select-toggle]){color:var(--text,#17252c);font-weight:400}
.ad-account-editor .ad-unified-grid details{padding:2px 0}

/* Fixed-target batch maintenance; isolated from the single-account editor. */
.ad-batch-toolbar,.ad-dictionary-entry{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ad-batch-toolbar{padding:12px 0}.ad-batch-toolbar small,.ad-batch-toolbar p{flex-basis:100%;margin:0}.ad-batch-editor{width:min(880px,calc(100vw - 32px));max-height:90vh;display:flex;flex-direction:column}.ad-batch-editor form{display:flex;flex-direction:column;min-height:0}.ad-batch-editor .modal-body{overflow:auto;padding:20px 24px}.ad-batch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.ad-batch-field{min-width:0}.ad-batch-choice{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:13px;color:#3e5268}.ad-batch-field small{display:block;margin-top:5px;color:#64748b}.ad-batch-editor input:not([type=checkbox]),.ad-batch-editor textarea{box-sizing:border-box;width:100%;min-height:38px;border:1px solid #cbd5e1;border-radius:7px;padding:8px 10px}.ad-batch-period{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0;padding:12px;border:1px solid #d7e1eb;border-radius:8px}.ad-batch-period p{grid-column:1/-1;margin:0;font-size:12px;color:#64748b}.ad-batch-reason{display:block;margin-top:16px}.ad-batch-editor .modal-footer{flex-shrink:0;padding:14px 24px}.ad-batch-editor [role=alert]{color:#b91c1c}.ad-batch-editor .ad-search-select-panel{z-index:20}.ad-dictionary-entry small{font-size:12px;color:#64748b}
@media(max-width:600px){.ad-batch-grid{grid-template-columns:1fr}.ad-batch-editor .modal-body{padding:16px}.ad-batch-period{grid-template-columns:1fr}.ad-batch-editor input:not([type=checkbox]),.ad-batch-editor button{min-height:44px}.ad-batch-editor{width:calc(100vw - 16px)}}
.ad-batch-period .ad-batch-init,.ad-batch-help{grid-column:1/-1;font-size:12px;color:#52647a}.ad-batch-help summary{cursor:pointer}.ad-batch-editor.modal-panel{margin:auto;max-height:calc(100dvh - 32px)}.ad-batch-editor .modal-body{min-height:0}.ad-batch-editor .modal-header{flex-shrink:0}.ad-batch-editor .ad-batch-help p{margin-top:8px}.ad-batch-editor .cc-card{border:0;padding:0;margin:0}.ad-batch-editor .cc-card h3{display:none}

/* Current monthly finance preview: one department result list, details on demand. */
.cc-finance .cc-hero{background:transparent;color:var(--cc-ink);padding:0;border-radius:0;gap:.5rem}.cc-finance .cc-hero p{display:none}.cc-finance .cc-hero h2{font-size:1.5rem}.cc-finance .cc-hero span{color:var(--cc-muted);font-size:.875rem}.cc-finance .cc-rule-note{font-size:.875rem;padding:.65rem .8rem}.cc-finance .cc-month-preview{gap:.7rem}.cc-finance .cc-result-state{align-items:center}.cc-finance .cc-result-details{margin-top:.35rem}.cc-finance .cc-legacy-label{border-left:3px solid #bf9b43;background:#fff8e5;padding:.45rem .65rem;color:#705820;font-size:.875rem}.cc-finance th:nth-last-child(-n+4),.cc-finance td:nth-last-child(-n+4){font-variant-numeric:tabular-nums}.cc-finance .cc-table-wrap{max-width:100%;overflow:auto}.cc-finance .cc-table-wrap table{min-width:42rem}.cc-finance .cc-section-head{gap:.5rem}.cc-finance .cc-section-head h3{font-size:1.125rem}
@media(min-width:48rem){.cc-finance .cc-section-head{flex-direction:row;align-items:center;justify-content:space-between}.cc-finance .cc-toolbar{grid-template-columns:minmax(10rem,14rem) minmax(0,1fr)}}
.cc-finance .cc-department-table :is(th,td):nth-child(n+3):nth-child(-n+6){text-align:right}
/* Keep finance tables as one scrollable table rather than clipped mobile cards. */
.cc-finance table{display:table}.cc-finance thead{display:table-header-group}.cc-finance tbody{display:table-row-group}.cc-finance tr{display:table-row;width:auto;margin:0;border:0;border-radius:0;overflow:visible}.cc-finance :is(th,td){display:table-cell;width:auto;white-space:nowrap}.cc-finance td::before{display:none}.cc-finance .cc-table-wrap{border:1px solid var(--cc-line)}.cc-finance .cc-rule-note summary{min-height:2rem;padding:.1rem 0}.cc-finance .cc-rule-note p{padding-top:.5rem}

/* Historical month-end organization draft; the footer stays outside body scroll. */
.cc-org-backdrop{position:fixed;inset:0;z-index:1100;background:#17252c66;display:flex;align-items:center;justify-content:center;padding:1rem}.cc-org-panel{width:min(68rem,100%);max-height:calc(100dvh - 2rem);min-width:0;display:flex;flex-direction:column;border-radius:.75rem;background:var(--surface,#fff);box-shadow:0 12px 40px #0003}.cc-org-header,.cc-org-footer{display:flex;flex:none;align-items:center;gap:.75rem;padding:1rem;border-bottom:1px solid var(--cc-line)}.cc-org-header{justify-content:space-between}.cc-org-footer{border-top:1px solid var(--cc-line);border-bottom:0;flex-wrap:wrap}.cc-org-footer small{flex:1 1 12rem}.cc-shell form.cc-org-form{display:flex;flex-direction:column;min-height:0;gap:0}.cc-org-body{display:grid;grid-auto-rows:max-content;align-content:start;gap:.75rem;padding:1rem;overflow:auto;overscroll-behavior:contain;min-height:0}.cc-org-body .cc-table-wrap table{min-width:32rem}.cc-org-body :is(input[type=checkbox]){width:1.25rem;min-height:1.25rem}.cc-org-add,.cc-org-bulk{display:flex;align-items:end;gap:.5rem;flex-wrap:wrap}.cc-org-add label,.cc-org-bulk label{flex:1 1 12rem}.cc-org-bulk>span{align-self:center;font-size:.875rem}.cc-org-body .cc-table-wrap :is(th,td){text-align:left}.cc-org-diff{border:1px solid var(--cc-line);border-radius:.5rem;padding:.75rem;display:grid;gap:.6rem}.cc-org-body .cc-table-wrap select{min-width:10rem}.cc-org-header h3{font-size:1.125rem}.cc-org-header p{margin-top:.25rem}.cc-org-body>label{max-width:100%}
@media(max-width:42rem){.cc-org-backdrop{padding:.5rem}.cc-org-panel{max-height:calc(100dvh - 1rem)}.cc-org-header,.cc-org-footer,.cc-org-body{padding:.75rem}.cc-org-footer small{flex-basis:100%}.cc-org-footer button{flex:1}}

/* Read-only invoice version details, separate from import and account editors. */
.cc-invoice-backdrop{position:fixed;inset:0;z-index:1100;display:flex;align-items:center;justify-content:center;padding:.5rem;background:#17252c66}.cc-invoice-panel{display:flex;flex-direction:column;min-width:0;width:min(80rem,100%);max-height:calc(100dvh - 1rem);border-radius:.75rem;background:#fff;box-shadow:0 12px 40px #0003}.cc-invoice-header,.cc-invoice-footer{display:flex;flex:none;gap:.6rem;align-items:center;padding:.75rem;border-bottom:1px solid var(--cc-line)}.cc-invoice-header{justify-content:space-between}.cc-invoice-header h3{font-size:1.25rem}.cc-invoice-header p{margin-top:.3rem;font-size:.875rem;overflow-wrap:anywhere}.cc-invoice-body{min-height:0;overflow:auto;overscroll-behavior:contain;display:grid;grid-auto-rows:max-content;gap:.75rem;padding:.75rem}.cc-invoice-footer{flex-wrap:wrap;border-top:1px solid var(--cc-line);border-bottom:0}.cc-invoice-footer small{flex:1 1 8rem}.cc-shell form.cc-invoice-search{display:flex;flex-wrap:wrap;align-items:end;gap:.5rem}.cc-invoice-search label{flex:1 1 18rem}.cc-invoice-body .cc-table-wrap{overflow:auto}.cc-shell .cc-invoice-panel table{display:table;min-width:74rem;font-size:.875rem}.cc-shell .cc-invoice-panel thead{display:table-header-group}.cc-shell .cc-invoice-panel tbody{display:table-row-group}.cc-shell .cc-invoice-panel tr{display:table-row;width:auto;margin:0;border:0;padding:0}.cc-shell .cc-invoice-panel :is(th,td){display:table-cell;width:auto;min-width:5rem;text-align:left;white-space:normal;overflow-wrap:anywhere;padding:.6rem .7rem}.cc-shell .cc-invoice-panel td::before{display:none}.cc-invoice-panel td:nth-child(2){min-width:13rem}.cc-invoice-panel td:nth-child(7){min-width:21rem}.cc-invoice-panel td:nth-child(6),.cc-invoice-panel th:nth-child(6){text-align:right;white-space:nowrap}.cc-invoice-panel td small{display:block;margin-top:.25rem}.cc-invoice-panel td>div+div{margin-top:.5rem}.cc-invoice-panel .cc-empty{display:table-cell}
@media(min-width:680px){.cc-invoice-backdrop{padding:1rem}.cc-invoice-panel{max-height:calc(100dvh - 2rem)}.cc-invoice-header,.cc-invoice-footer,.cc-invoice-body{padding:1rem}}
