.acc-tabs,.acc-totals{display:flex;flex-wrap:wrap;gap:14px;margin:16px 0 24px}.acc-totals span{padding:12px;border:1px solid var(--line);border-radius:8px}.acc-drop{display:flex;flex-direction:column;gap:16px;border:2px dashed var(--accent);padding:28px;border-radius:12px;margin:20px 0;cursor:pointer}.acc-dialog{width:min(1100px,96vw);max-width:96vw}.acc-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto;font:inherit;padding:16px;border:1px solid var(--line)}.acc-tax-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end;gap:12px;margin:18px 0}.acc-dialog fieldset{border:0;padding:0}.acc-access{display:flex;align-items:center;gap:20px;padding:14px 0;border-bottom:1px solid var(--line)}.acc-access>span{flex:1}#accounting-content td{white-space:normal;overflow-wrap:anywhere}#accounting-content table{min-width:800px}#acc-preview{max-height:450px;overflow:auto}.acc-dialog [hidden]{display:none!important}@media(max-width:650px){.acc-tax-row{grid-template-columns:1fr 1fr}.acc-access{flex-wrap:wrap}}
#acc-filters>label:not(.field){display:flex;align-items:center;gap:10px}#acc-filters input[type=checkbox]{width:18px;height:18px;min-height:0;flex:none;margin:0}
#accounting-content .acc-invoice-table th:first-child,#accounting-content .acc-invoice-table td:first-child{width:1%;white-space:nowrap;overflow-wrap:normal;text-align:left;padding-left:4px;padding-right:10px}
#accounting-content .acc-invoice-table{min-width:1100px}#accounting-content .acc-invoice-table th,#accounting-content .acc-invoice-table td{padding-top:12px;padding-bottom:12px;padding-right:10px}#accounting-content .acc-invoice-table td:nth-child(n+3):nth-child(-n+7){white-space:nowrap;width:1%;text-align:right}#accounting-content .acc-invoice-table th:nth-child(n+3):nth-child(-n+7){text-align:right}#accounting-content .acc-invoice-table td:nth-child(2){min-width:160px}.acc-payment-status{padding:8px 10px;white-space:nowrap;font-size:13px}.acc-payment-source{display:block;margin-top:5px;font-size:12px}.acc-payment-section{border-top:1px solid var(--line);padding-top:20px;margin-top:22px}.acc-payment-section>summary{cursor:pointer;font-weight:700;margin-bottom:18px}.acc-payment-dialog .table-scroll{max-height:350px;overflow:auto}.acc-payment-dialog td{white-space:normal;overflow-wrap:anywhere}.acc-payment-dialog input[type=radio]{width:18px;height:18px;min-height:0;cursor:pointer}.acc-payment-dialog .field-grid{margin:16px 0}.acc-payment-dialog blockquote{overflow-wrap:anywhere}
.acc-invoice-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}.acc-invoice-actions button,.acc-invoice-actions .acc-download{padding:8px 12px;min-height:36px;font-size:13px}.acc-invoice-actions .acc-reviewed-button{background:#e6e6e6;border-color:#b8b8b8;color:#444;cursor:pointer}.acc-invoice-actions .acc-reviewed-button:hover{background:#d6d6d6;color:#222}.acc-invoice-actions .acc-download,.acc-invoice-actions .acc-download:hover,.acc-invoice-actions .acc-download:visited{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:var(--ink)}.acc-invoice-actions :focus-visible{outline:2px solid var(--accent);outline-offset:3px}[data-theme=dark] .acc-invoice-actions .acc-reviewed-button{background:#383838;border-color:#626262;color:#dedede}[data-theme=dark] .acc-invoice-actions .acc-reviewed-button:hover{background:#484848;color:#fff}
.acc-review-dialog{width:96vw;max-width:1700px}.acc-review-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}.acc-original{position:sticky;top:0;min-width:0}.acc-review-fields{min-width:0}.acc-canvas-scroll{width:100%;aspect-ratio:210 / 297;box-sizing:border-box;min-height:0;overflow:auto;background:#e8e8e8;border:1px solid var(--line);border-radius:8px;margin:12px 0}.acc-canvas-scroll canvas{display:block;background:white}.acc-view-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.acc-view-controls button{padding:8px 12px}.acc-view-controls select{width:auto}.acc-original>details{margin-top:16px}.acc-review-dialog .dialog-actions{position:static;background:var(--surface,#1c231a);padding:16px 0;border-top:1px solid var(--line)}.acc-review-fields input.acc-missing{border-color:#b58c46}.acc-review-fields #acc-live-check{line-height:1.65}.acc-review-fields #acc-live-check[data-check=warning]{border-left:4px solid #b58c46}.acc-review-fields #acc-live-check[data-check=balanced]{border-left:4px solid var(--accent)}@media(max-width:1000px){.acc-review-layout{grid-template-columns:1fr}.acc-original{position:static}}
#accounting-content .acc-invoice-table{min-width:100%;width:100%}#accounting-content .acc-invoice-table th,#accounting-content .acc-invoice-table td{padding:12px 8px}#accounting-content .acc-invoice-table td:nth-child(2){min-width:140px}#accounting-content .acc-invoice-table th{white-space:normal}#accounting-content .acc-invoice-table th:first-child,#accounting-content .acc-invoice-table td:first-child{padding-left:4px;padding-right:8px}.acc-payment-dialog .dialog-actions{position:sticky;bottom:0;padding:12px 0;background:var(--surface);z-index:1}.acc-payment-dialog td:first-child{white-space:nowrap}
.acc-drop.dragging{background:var(--surface);outline:3px solid var(--accent)}
#acc-bank #acc-preview td{white-space:normal;overflow-wrap:anywhere}#acc-bank #acc-preview th{position:sticky;top:0;background:var(--surface);z-index:1}#acc-bank .dialog-actions{position:sticky;bottom:0;background:var(--surface);padding:12px 0;z-index:2}
.acc-payment-dialog .acc-bank-candidate{cursor:pointer}.acc-payment-dialog .acc-bank-best>td{background:rgba(130,210,0,.15)}.acc-payment-dialog .acc-bank-best>td:first-child{box-shadow:inset 4px 0 #83d600}.acc-payment-dialog .acc-bank-selected>td{background:rgba(130,210,0,.26);border-top:1px solid #83d600;border-bottom:1px solid #83d600}.acc-payment-dialog [data-match-method]{display:block}
.acc-check-dialog{width:min(1400px,96vw)}.acc-invoice-match{border:1px solid var(--line);border-radius:12px;padding:20px;margin:20px 0;min-width:0}.acc-invoice-match header{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:14px}.acc-invoice-match h3{margin:0 0 8px}.acc-match-layout{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:18px;align-items:start}.acc-match-options,.acc-match-actions{min-width:0}.acc-match-actions{display:flex;flex-direction:column;gap:12px}.acc-match-choices{display:grid;gap:8px}.acc-match-choices .acc-bank-candidate{display:grid;grid-template-columns:20px minmax(0,1fr);gap:12px;padding:12px;border:1px solid var(--line);border-radius:8px;cursor:pointer;margin:0;white-space:normal;overflow-wrap:anywhere}.acc-bank-candidate input[type=radio]{width:18px;height:18px;min-height:0;margin:4px 0}.acc-candidate-top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.acc-candidate-description{display:block;margin:5px 0}.acc-match-choices .acc-bank-best{background:rgba(130,210,0,.14);border-left:4px solid #83d600}.acc-match-choices .acc-bank-selected{background:rgba(130,210,0,.26);outline:2px solid #83d600;outline-offset:-2px}.acc-bank-candidate:focus-within{outline:2px solid var(--accent)}.acc-match-choices small{display:block}.acc-match-search[hidden]{display:none}.acc-invoice-match header>*{min-width:0;overflow-wrap:anywhere}.acc-match-actions button{white-space:normal}@media(max-width:700px){.acc-match-layout{grid-template-columns:minmax(0,1fr)}.acc-invoice-match{padding:12px}.acc-match-actions{flex-direction:column}}
.acc-allocation-row{display:grid;grid-template-columns:minmax(0,1fr) 180px auto;gap:12px;align-items:end;margin:16px 0}.acc-allocation-row select{min-width:0;width:100%}@media(max-width:700px){.acc-allocation-row{grid-template-columns:minmax(0,1fr)}}
#acc-filters.acc-filter-bar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:16px 0 8px;padding:12px;border:1px solid var(--line);border-radius:10px}#acc-filters.acc-filter-bar>.field:first-child{flex:1 1 230px}#acc-filters.acc-filter-bar>.field{flex:0 1 220px;min-width:0}#acc-filters .acc-filter-year{width:100px}#acc-filters.acc-filter-bar label{margin:0}#acc-filters.acc-filter-bar .acc-filter-pending{min-height:42px;gap:8px;white-space:nowrap}#acc-filters.acc-filter-bar button{width:auto;min-height:42px;padding:8px 14px}#acc-filters .acc-filter-dates{display:flex;gap:10px;flex-basis:100%}#acc-filters .acc-filter-dates>.field{width:190px}#acc-filters [hidden]{display:none!important}@media(max-width:600px){#acc-filters.acc-filter-bar>.field{flex:1 1 100%}#acc-filters .acc-filter-dates>.field{width:auto;min-width:0;flex:1}}
.acc-export-bar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:10px 0 16px}.acc-export-bar .field{width:170px;margin:0}.acc-export-bar button{min-height:42px}.acc-export-bar small{flex:1 1 240px;padding-bottom:10px;color:var(--muted)}
.acc-export-dialog{width:min(480px,94vw);max-width:94vw}
.acc-list-summary{border:1px solid var(--line);border-radius:6px;padding:7px 10px;margin:10px 0;background:transparent}.acc-list-summary header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.acc-list-summary h3{margin:0;font-size:12px;line-height:1.2}.acc-list-summary header span,.acc-summary-note{font-size:10px;line-height:1.2;color:var(--muted)}.acc-list-summary dl{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:6px 0 4px}.acc-summary-metric{padding:0 8px 0 0;border:0;border-right:1px solid var(--line);min-width:0}.acc-summary-metric:last-child{border:0;padding:0}.acc-summary-metric dt{font-size:11px;line-height:1.2}.acc-summary-metric dd{margin:2px 0 0;font-size:14px;line-height:1.2;font-weight:600;overflow-wrap:anywhere}.acc-summary-metric small{display:block;font-size:10px;line-height:1.2;margin-top:2px}.acc-summary-total{background:transparent}.acc-summary-note{margin:4px 0 0}.acc-summary-warning{border:0;color:var(--ink);padding:0;margin:4px 0;font-size:11px;line-height:1.2}@media(max-width:900px){.acc-list-summary dl{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:520px){.acc-list-summary dl{grid-template-columns:repeat(2,minmax(0,1fr))}}
#acc-export,#acc-check-pending{background:#b4ce91;color:#203019;border:1px solid #94b271;box-shadow:none}#acc-export:hover,#acc-check-pending:hover{background:#a5c47f;color:#203019;border-color:#829f60}
#accounting-content .acc-invoice-table td.acc-description{white-space:normal;text-align:left;width:16%;max-width:190px;overflow-wrap:anywhere}.acc-asset-label{display:block;font-size:11px;color:var(--muted);margin-top:3px}#accounting-content .acc-invoice-table th:nth-child(3){text-align:left}#accounting-content .acc-invoice-table td:nth-child(8){text-align:right;white-space:nowrap}#accounting-content .acc-invoice-table{font-size:12px}#accounting-content .acc-invoice-actions button,#accounting-content .acc-invoice-actions .acc-download{padding:6px 8px;font-size:12px}.acc-list-summary dl{grid-template-columns:repeat(7,minmax(0,1fr))}@media(max-width:900px){.acc-list-summary dl{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:520px){.acc-list-summary dl{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Shared header row leaves blank space above the fields without an overlay. */
@media(min-width:1001px){
 .acc-review-layout{row-gap:12px}
 .acc-review-layout>.acc-original,.acc-review-layout>.acc-review-fields{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:subgrid;grid-row:span 2;gap:12px}
 .acc-review-layout>.acc-original{position:static}
 .acc-review-document .acc-canvas-scroll{margin-top:0}
 .acc-review-fields>fieldset{margin:0;padding:0;border:0;min-width:0}
 .acc-review-fields>fieldset>.field-grid:first-child{margin-top:0}
}
.acc-review-heading #acc-live-check[hidden]{display:none}
.acc-review-document{min-width:0;max-width:100%}
.ai-connection-banner{padding:18px 22px;border-radius:10px;color:#fff;margin-bottom:18px}
.ai-connection-banner.is-connected{background:#286437}.ai-connection-banner.is-disconnected{background:#942e32}
.ai-connection-banner strong{font-size:20px}.ai-connection-banner p{margin:8px 0}
.ai-panel-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.ai-monthly{margin:24px 0;padding:16px;border:1px solid var(--line);border-radius:10px}
.ai-monthly-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.ai-monthly-grid span{display:block;font-size:12px}.ai-monthly-grid strong{display:block;font-size:20px;margin-top:6px}
@media(max-width:800px){.ai-monthly-grid{grid-template-columns:1fr 1fr}}
.acc-processing>label{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-weight:600}
.acc-processing input[role=switch]{appearance:none;width:48px;height:26px;min-height:26px;padding:0;border:1px solid var(--line);border-radius:20px;background:#65705d;cursor:pointer;position:relative}
.acc-processing input[role=switch]::before{content:'';position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:white;transition:transform .15s}
.acc-processing input[role=switch]:checked{background:#73a936}
.acc-processing input[role=switch]:checked::before{transform:translateX(22px)}
.acc-processing p{font-size:12px;margin:8px 0 0}
.acc-delete{color:#d85858;border-color:#b93434}
.acc-delete:hover{background:#b93434;color:#fff}
.acc-review-optional{border-top:1px solid var(--line);padding:12px 0;margin-top:12px}
.acc-review-optional>summary{cursor:pointer;font-weight:600}
.acc-review-optional>.field-grid,.acc-review-optional>label{margin-top:12px}
#acc-invoice .acc-invoice-total{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:16px;width:100%;max-width:none;margin:16px 0;border-top:1px solid var(--line);padding-top:16px;font-weight:700}
#acc-invoice .acc-invoice-total>span{text-align:right}
#acc-invoice .acc-invoice-total input{flex:0 0 160px;width:160px;max-width:50%;margin:0;text-align:right;font-weight:700}
.acc-charge-row{display:flex;align-items:end;gap:12px;margin:12px 0;flex-wrap:wrap}
.acc-charge-row>label{flex:1;min-width:150px}
.acc-charge-controls{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.acc-charge-row[hidden],.acc-charge-controls button[hidden]{display:none}
.acc-document-kind{grid-column:1 / -1}
#acc-asset-choice-label{display:block;width:100%;text-align:center}
.acc-invoice-match header{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center}
.acc-invoice-match header>strong{justify-self:end;text-align:right}
.acc-view-invoice-link{text-decoration:underline;text-underline-offset:3px;justify-self:center;padding:8px;color:inherit}
.acc-document-popup{width:min(920px,94vw);max-width:94vw;max-height:94vh}
.acc-document-popup::backdrop{background:rgba(0,0,0,.65)}
.acc-document-popup .acc-canvas-scroll{height:65vh;max-height:65vh;aspect-ratio:auto;overflow:auto}
@media(max-width:650px){.acc-invoice-match header{grid-template-columns:minmax(0,1fr) auto}.acc-invoice-match header>strong{grid-column:1/-1}}
#accounting-content .acc-invoice-table th:first-child,
#accounting-content .acc-invoice-table td:first-child{width:92px;min-width:92px;max-width:92px;padding-left:4px;padding-right:6px}
#accounting-content .acc-invoice-table td:first-child small{max-width:82px;white-space:normal;overflow-wrap:normal}
#accounting-content .acc-invoice-table th:last-child,
#accounting-content .acc-invoice-table td:last-child{position:sticky;right:0;z-index:1;min-width:138px;background:var(--surface,#fff);box-shadow:-5px 0 8px -7px #000}
#accounting-content .acc-invoice-table th:last-child{z-index:2}
#accounting-content .acc-invoice-actions{gap:6px}
.acc-invoice-suggestion{display:flex;width:100%;justify-content:flex-start;text-align:left;margin:8px 0}
.acc-invoice-suggestion small{display:block;margin-top:4px;font-weight:400}
#acc-invoice-suggestions [data-invoice-options]{max-height:340px;overflow:auto}
.acc-kind-buttons{display:flex;gap:8px;margin-top:8px}
.acc-kind-buttons button{flex:1;min-width:0;white-space:normal}
.acc-kind-buttons button[aria-pressed=true]{background:#b4ce91;color:#203019;border-color:#94b271;box-shadow:inset 0 0 0 1px #94b271;font-weight:700}
.acc-kind-buttons button[data-kind=credit][aria-pressed=true]{background:#b93434;color:#fff;border-color:#d85858;box-shadow:inset 0 0 0 1px #d85858}
.acc-kind-buttons button[data-asset=investment][aria-pressed=true]{background:#f2ce63;color:#342b0e;border-color:#d6ae39;box-shadow:inset 0 0 0 1px #d6ae39}
.acc-review-fields .acc-tax-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.acc-tax-row [name=invoice_total_preview]{font-weight:700}
@media(max-width:650px){.acc-review-fields .acc-tax-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
.acc-review-document .acc-canvas-scroll{min-width:0;max-width:100%;contain:size;overflow:auto}
.report-section {margin-top:28px;padding-top:20px;border-top:1px solid #58634c;}
.report-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin:18px 0;}
.report-metric {border:1px solid #58634c;border-radius:10px;padding:18px;}
.report-metric h3 {font-size:1rem;margin:0 0 14px;}
.report-metric strong {font-size:1.5rem;}
.report-metric p {font-size:.9rem;line-height:1.5;margin-bottom:0;}
.report-section details {margin:20px 0;}
.report-section li {margin:12px 0;}
.acc-review-payment {margin:24px 0;padding:18px;border:1px solid #58634c;border-radius:10px;}
.acc-review-payment button {margin:10px 0;white-space:normal;}
.acc-review-payment .field {margin:14px 0;}
/* Keep bank dates whole; narrow screens scroll the table instead of splitting digits. */
#accounting-content .acc-bank-table{table-layout:auto}
#accounting-content .acc-bank-table th:first-child,
#accounting-content .acc-bank-table td:first-child{width:1%;min-width:10ch;white-space:nowrap;overflow-wrap:normal;word-break:normal}
