.commercial-income { --ci-line:#d5dfe7; --ci-text:#18232f; --ci-muted:#526579; --ci-blue:#22549d; min-width:0; color:var(--ci-text); }
.ci-header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 24px; }
.ci-header h2 { font-size:20px; margin:0 0 4px; }
.ci-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.ci-cost-mode { display:inline-grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:254px; max-width:100%; border:1px solid var(--ci-line); border-radius:6px; background:#fff; }
.ci-cost-mode button { min-height:38px; padding:6px 10px; border:0; background:transparent; color:var(--ci-text); font:inherit; font-size:14px; cursor:pointer; }
.ci-cost-mode button + button { border-left:1px solid var(--ci-line); }
.ci-cost-mode button[aria-pressed="true"] { background:#e7eff6; color:#194781; font-weight:650; }
.ci-cost-mode button:first-child { border-radius:5px 0 0 5px; }
.ci-cost-mode button:last-child { border-radius:0 5px 5px 0; }
.ci-cost-mode button:disabled { cursor:wait; }
.ci-header p, .ci-note { color:var(--ci-muted); font-size:13px; margin:4px 0; }
.ci-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; border-block:1px solid var(--ci-line); padding:16px 0; margin:18px 0; }
.ci-summary div { min-width:0; }
.ci-summary span { font-size:13px; color:var(--ci-muted); display:block; margin-bottom:4px; }
.ci-summary strong { font-size:21px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.ci-print { font:inherit; min-height:36px; padding:6px 12px; border:1px solid var(--ci-line); border-radius:5px; color:var(--ci-text); background:white; cursor:pointer; }
.ci-note { margin:12px 0; }
.ci-scroll { overflow:auto; max-height:68vh; border:1px solid var(--ci-line); border-radius:6px; background:#fff; }
.ci-table { border-spacing:0; border-collapse:separate; width:100%; font-size:13px; }
.ci-table th, .ci-table td { padding:7px 10px; border-bottom:1px solid var(--ci-line); }
.ci-table th { text-align:left; }
.ci-table thead th { position:sticky; top:0; z-index:2; background:#e9f0f6; white-space:nowrap; }
.ci-table tr > th:first-child { position:sticky; left:0; width:280px; min-width:220px; max-width:300px; border-right:1px solid var(--ci-line); background:#fff; z-index:1; white-space:normal; overflow-wrap:anywhere; }
.ci-table thead tr > th:first-child { background:#e9f0f6; z-index:3; }
.ci-table tbody th { padding-left:calc(10px + var(--ci-depth,0) * 12px); font-weight:500; }
.ci-table .ci-amount { text-align:right; white-space:nowrap; min-width:106px; font-variant-numeric:tabular-nums; }
.ci-table .ci-total { background:#f2f6fa; font-weight:700; }
.ci-table .ci-activity th, .ci-table .ci-activity td { background:#e7eff6; font-weight:700; }
.ci-table .ci-section-heading th, .ci-table .ci-section-heading td { background:#dde9e6; font-weight:700; border-top:1px solid #b8cbc5; }
.ci-table .ci-family th, .ci-table .ci-family td { background:#f2f6fa; font-weight:700; }
.ci-table .ci-unclassified th, .ci-table .ci-unclassified td { background:#fff3da; }
.ci-table tfoot th, .ci-table tfoot td, .ci-table tfoot tr > th:first-child { background:#e9f0f6; font-weight:700; }
.ci-table tfoot .ci-net th, .ci-table tfoot .ci-net td { background:#e6f2ed; }
.commercial-income .ci-negative { color:#a42924; }
.ci-missing { color:var(--ci-muted); }
.ci-expand { display:inline-flex; gap:8px; align-items:flex-start; color:var(--ci-blue); background:none; padding:0; border:0; font:inherit; text-align:left; cursor:pointer; }
.ci-caret { flex:0 0 7px; height:7px; margin-top:5px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(-45deg); }
.ci-expand[aria-expanded="true"] .ci-caret { transform:rotate(45deg); }
.ci-allocation { margin:16px 0; }
.ci-allocation summary { font-weight:650; cursor:pointer; }
.ci-allocation-table tr > th:first-child { width:auto; min-width:175px; }
.ci-allocation-table th small { display:block; color:var(--ci-muted); margin-top:4px; font-weight:500; }
.ci-rules-dialog { width:min(780px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; padding:20px; border:1px solid #d5dfe7; border-radius:8px; }
.ci-rules-dialog::backdrop { background:#18232f66; }
.ci-rules-dialog h3 { margin:0 0 8px; font-size:18px; }
.ci-rules-dialog fieldset { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:10px; min-width:0; border:0; border-bottom:1px solid #d5dfe7; margin:12px 0; padding:0 0 12px; }
.ci-rules-dialog legend { font-weight:650; margin-bottom:6px; padding:0; }
.ci-rules-dialog label { display:grid; gap:4px; font-size:13px; min-width:0; }
.ci-rules-dialog select, .ci-rules-dialog input, .ci-rules-dialog output { width:100%; min-width:0; min-height:38px; }
.ci-fixed-weights:not([hidden]) { display:grid; grid-column:1/-1; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.ci-fixed-weights output { display:flex; align-items:center; }
.ci-rules-dialog footer { justify-content:flex-end; }
.ci-rules-dialog [role="alert"] { color:#a42924; }
.ci-preview { margin:0; background:#f3f6f8; font:15px/1.45 system-ui,sans-serif; }
.ci-preview main { padding:24px; }
@media(min-width:1000px) {
  .ci-table .ci-total { position:sticky; right:0; z-index:1; border-left:1px solid var(--ci-line); }
  .ci-table thead .ci-total { z-index:3; }
}
@media(max-width:700px) {
  .ci-preview main { padding:12px; }
  .ci-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ci-summary strong { font-size:17px; }
  .ci-table tr > th:first-child { width:138px; min-width:138px; max-width:155px; }
}
@media print {
  .ci-actions, .ci-rules-dialog { display:none; }
  .ci-scroll { max-height:none; overflow:visible; }
  .ci-table .ci-amount { min-width:0; }
  .ci-table th, .ci-table td { position:static !important; font-size:8px; padding:4px; }
  .ci-table tr > th:first-child { min-width:92px; }
  @page { size:landscape; }
}
