.qb-subitem { padding-left: 28px; min-height: 40px; font-size: 13px; }
.qb-dashboard-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 24px 0; }
.qb-ledger-total { display: flex; justify-content: space-between; gap: 24px; padding: 12px; border-top: 2px solid var(--border); }
.qb-chart { margin: 16px 0 28px; }
.qb-chart-row { display: grid; grid-template-columns: 70px minmax(50px,1fr) 210px; gap: 12px; align-items: center; margin: 8px 0; font-size: 12px; }
.qb-chart-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.qb-bar { min-height: 8px; margin: 3px 0; border-radius: 2px; }
.qb-income { background: var(--navy-2); }
.qb-expense { background: #dc9e34; }
.accounting-window h2 { color: var(--ink); font-size: 17px; margin: 22px 0 12px; }
.accounting-window .qb-table .qb-text { overflow-wrap: anywhere; }
.accounting-window .qb-table .qb-date { white-space: nowrap; overflow-wrap: normal; min-width: 78px; }
.accounting-window .qb-table .qb-date * { white-space: inherit; }
.accounting-window .qb-table .qb-docno, .accounting-window .qb-table .qb-type { white-space: nowrap; overflow-wrap: normal; width: 1%; }
.accounting-window .qb-table .qb-docno { min-width: 72px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.accounting-window .qb-table .qb-payee { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; min-width: 160px; }
.accounting-window .qb-table .qb-type { min-width: 132px; }
.accounting-window .qb-table .qb-docno *, .accounting-window .qb-table .qb-type * { white-space: inherit; }
.accounting-window .qb-table .qb-text { min-width: 90px; }
.accounting-window .qb-table .qb-num { white-space: nowrap; overflow-wrap: normal; text-align: right; font-variant-numeric: tabular-nums; }
.accounting-window .qb-posting-table { table-layout: fixed; }
.accounting-window .qb-posting-table th:nth-child(1) { width: 10%; }
.accounting-window .qb-posting-table th:nth-child(2) { width: 15%; }
.accounting-window .qb-posting-table th:nth-child(3) { width: 10%; }
.accounting-window .qb-posting-table th:nth-child(4) { width: 20%; }
.accounting-window .qb-posting-table th:nth-child(5) { width: 18%; }
.accounting-window .qb-posting-table th:nth-child(6) { width: 12%; }
.accounting-window .qb-posting-table th:nth-child(7) { width: 15%; }
.accounting-window .qb-posting-table .qb-docno .qb-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.accounting-window details > summary { list-style: none; }
.accounting-window .qb-toolbar label { display: flex; align-items: center; gap: 6px; }
@media(max-width:1100px) { .qb-dashboard-columns { grid-template-columns: 1fr; } #accounting-nav { width: 180px; flex-basis: 180px; } #accounting-content { padding: 12px; } #accounting-main { padding: 16px; } }
/* Scoped QuickBooks-inspired accounting window; no copied Intuit assets.
   QBO structure and density with NEXA portal theme tokens; no copied Intuit assets. */
.accounting-window {
  background: var(--bg); color: var(--ink); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; min-height: 76vh; display: flex; flex-direction: column;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 14px;
}

#accounting-topbar { display: flex; align-items: center; justify-content: space-between; padding: 9px 20px; background: var(--card); border-bottom: 1px solid var(--border); }
.qb-brand { font-weight: 700; font-size: 15px; color: var(--ink); }
.accounting-body { display: flex; flex: 1; min-height: 0; }

#accounting-nav { width: 220px; flex: 0 0 220px; background: var(--ink); overflow-y: visible; position: relative; }
.qb-rail { display: flex; flex-direction: column; padding: 6px 0; }
.qb-rail-group { position: relative; }
.qb-rail-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: transparent; border: 0; border-left: 3px solid transparent; cursor: pointer;
  font: inherit; text-align: left; padding: 0 16px; min-height: 56px; color: #fff; font-size: 14px;
}
.qb-rail-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qb-rail-item:hover { background: rgba(255,255,255,.08); }
.qb-rail-item[aria-current="page"] { background: rgba(255,255,255,.14); border-left-color: var(--navy-2); font-weight: 600; }
.qb-rail-item[aria-expanded="true"] { background: rgba(255,255,255,.14); }
.qb-chevron { color: #9fb3d1; font-size: 16px; }

.qb-flyout {
  position: absolute; top: 0; left: 100%; min-width: 220px; background: var(--card); border: 1px solid var(--border);
  border-radius: 0 6px 6px 0; box-shadow: 2px 4px 14px rgba(0,0,0,.18); z-index: 20; padding: 6px 0;
}
.qb-flyout[hidden] { display: none; }
.qb-flyout-item {
  display: block; width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer;
  font: inherit; font-size: 13.5px; padding: 10px 16px; color: var(--ink);
}
.qb-flyout-item:hover { background: var(--acct-hover); }
.qb-flyout-item[aria-current="page"] { background: #e6f3e8; color: var(--ink); font-weight: 600; }

#accounting-content { flex: 1; min-width: 0; background: var(--bg); padding: 22px 26px; overflow-y: auto; }
#accounting-main { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 22px 24px; min-height: 100%; }

.qb-dash-cards section { min-height: 92px; }
.qb-dash-list { list-style: none; margin: 0; padding: 0; max-height: 120px; overflow-y: auto; }
.qb-dash-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }
.qb-dash-list li span:last-child { font-variant-numeric: tabular-nums; }


.qb-page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; gap: 16px; }
.qb-page-head h1 { font-size: 22px; margin: 0 0 4px; color: var(--ink); font-weight: 700; }
.qb-subtitle { margin: 0; color: var(--muted); font-size: 12.5px; }
.qb-page-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.qb-btn { font: inherit; border-radius: 5px; padding: 7px 16px; cursor: pointer; border: 1px solid transparent; font-weight: 600; font-size: 13.5px; }
.qb-btn-primary { background: var(--navy-2); color: #fff; }
.qb-btn-primary:hover { background: var(--navy); }
.qb-btn-ghost { background: var(--card); border-color: var(--border); color: var(--ink); }
.qb-btn-ghost:hover { background: var(--bg); }
.qb-btn-sm { padding: 4px 11px; font-size: 12.5px; }

.qb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.qb-cards section { background: var(--card); padding: 14px 16px; border: 1px solid var(--border); border-radius: 7px; }
.qb-cards h3 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.qb-card-value { margin: 0; font-size: 15px; font-weight: 600; }
.qb-muted { color: var(--muted); font-weight: 400; }

.qb-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.qb-tab { padding: 10px 2px; color: var(--muted); font-size: 13.5px; cursor: default; border-bottom: 2px solid transparent; }
.qb-tab.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--navy-2); }

.qb-toolbar { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; flex-wrap: wrap; }
.qb-toolbar input[type="search"], .qb-toolbar input[type="date"], .qb-toolbar select {
  font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--card); color: var(--ink);
}
.qb-toolbar input[type="search"] { min-width: 220px; }
.qb-toolbar-sep { color: var(--muted); font-size: 12.5px; }

.qb-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }
.qb-table { width: 100%; border-collapse: collapse; background: var(--card); }
.qb-table thead th {
  white-space: nowrap;
  position: sticky; top: 0; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .02em; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); z-index: 1;
}
.qb-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.qb-table tbody tr:nth-child(even) { background: var(--bg); }
.qb-table tbody tr:hover { background: var(--acct-hover); }
.qb-table .qb-num { text-align: right; font-variant-numeric: tabular-nums; }
.qb-table-empty { text-align: center; color: var(--muted); padding: 22px 0 !important; }
.qb-link { background: none; border: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

.qb-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 2px; color: var(--muted); font-size: 12.5px; }

.qb-status { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11.5px; font-weight: 700; }
.qb-status-paid { background: #e6f3e8; color: #1b6e13; }
.qb-status-open { background: #e8f0fb; color: #1b4f91; }
.qb-status-overdue { background: #fbe8e8; color: #a32020; }

.qb-empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.qb-empty-icon { font-size: 30px; margin-bottom: 10px; color: var(--border); }

.qb-report-head { text-align: center; margin-bottom: 18px; }
.qb-report-head h2 { margin: 0; font-size: 16px; color: var(--ink); }
.qb-report-head h3 { margin: 4px 0 0; font-size: 19px; }
.qb-report-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.qb-report-total td { font-weight: 700; border-top: 2px solid var(--border); background: var(--bg); }

.manual-invoice { max-width: 1100px; margin: 0 auto; }
.manual-invoice .invoice-form-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.manual-invoice label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--muted); }
.manual-invoice input, .manual-invoice select, .manual-invoice textarea { width:100%; }
.manual-invoice textarea { min-height:72px; margin-top:18px; }
.manual-invoice .manual-total { display:flex; justify-content:flex-end; gap:32px; padding:16px 0; font-size:18px; }
.manual-invoice .actions { display:flex; justify-content:flex-end; gap:10px; }
.manual-invoice .manual-foot { display:grid; grid-template-columns: minmax(0,1fr) 300px; gap:24px; align-items:start; }
.manual-invoice .manual-foot .manual-memo { margin-top:0; }
/* QBO line shapes: a discount row is tinted, italic, labelled, with a red negative amount; a description row is text only. */
.manual-invoice tr[data-kind="discount"] td { background:rgba(163,51,51,.06); font-style:italic; }
.manual-invoice tr[data-kind="discount"] .line-label { font-style:normal; font-weight:600; color:#a33; }
.manual-invoice tr[data-kind="discount"] input[name="amount"] { color:#a33; }
.manual-invoice td.line-na { background:transparent; }
.manual-invoice tr[data-kind="nonfinancial"] td { color:var(--muted); }
.manual-invoice tr[data-kind="nonfinancial"] input[name="description"] { font-style:italic; }
/* T7 round 7 #6: the description input fills its spanning cell in light and dark themes (the reset above sets width:auto). */
.manual-invoice tr[data-kind="nonfinancial"] td.line-text input[name="description"] { width:100%; box-sizing:border-box; margin-top:0; }
body.dark .manual-invoice .line-label, body.dark .manual-invoice tr[data-kind="discount"] input[name="amount"] { color:#ff8a80; }
.accounting-window .invoice-lines tr.line-discount td { background:rgba(163,51,51,.06); font-style:italic; }
.accounting-window .invoice-lines .line-label { font-weight:600; font-style:normal; color:#a33; }
body.dark .accounting-window .invoice-lines .line-label { color:#ff8a80; }
.accounting-window .invoice-lines tr.line-text td { color:var(--muted); font-style:italic; }
.manual-invoice .manual-foot textarea { margin-top:0; }
.manual-invoice .manual-totals { display:flex; flex-direction:column; align-items:flex-end; }
.manual-invoice .manual-subtotal { display:flex; justify-content:flex-end; gap:32px; padding-top:12px; font-size:14px; }
.manual-invoice .manual-discount { display:flex; justify-content:flex-end; gap:32px; padding-top:6px; font-size:14px; }
.manual-invoice .manual-sales-tax { position:relative; display:flex; justify-content:flex-end; align-items:center; gap:32px; padding-top:8px; font-size:14px; }
.manual-invoice .tax-amount { border:0; background:none; color:var(--accent); padding:0; text-decoration:underline; cursor:pointer; font-weight:700; }
.manual-invoice .tax-breakdown { position:absolute; right:0; bottom:32px; z-index:4; min-width:340px; padding:12px; background:var(--card); border:1px solid var(--border); border-radius:6px; box-shadow:0 8px 24px rgba(0,0,0,.18); }
.manual-invoice .tax-breakdown table { width:100%; border-collapse:collapse; }
.manual-invoice .tax-breakdown th,.manual-invoice .tax-breakdown td { padding:6px; text-align:left; border-bottom:1px solid var(--border); }
.manual-invoice .ship-to,.manual-invoice .manual-tax { border:1px solid var(--border); border-radius:6px; margin:0 0 18px; padding:12px; }
.manual-invoice .ship-grid { display:grid; grid-template-columns:2fr 1.5fr 1.5fr .6fr .8fr; gap:10px; }
.manual-invoice .tax-message { margin:10px 0 4px; color:var(--muted); }
.manual-invoice .taxable-check { flex-direction:row; align-items:center; white-space:nowrap; }
.manual-invoice .taxable-check input { width:auto; }
.exempt-badge { display:inline-block; margin-left:6px; padding:2px 7px; border-radius:10px; background:#dff3e8; color:#146c43; font-size:11px; font-weight:700; }
.exempt-badge[hidden] { display:none; }
.sales-tax-table { overflow:auto; }
.sales-tax-table .chip { white-space:nowrap; font-size:10px; }
.manual-invoice .manual-discount strong { color:#a33; }
body.dark .manual-invoice .manual-discount strong { color:#ff8a80; }
.manual-invoice .field-error { color:#a32020; font-size:12px; }
body.dark .manual-invoice .field-error { color:#ff8a80; }
.manual-invoice [aria-invalid="true"] { outline:1px solid #a32020; }
.accounting-window .notice { background:rgba(217,145,23,.12); border:1px solid rgba(217,145,23,.5); border-radius:6px; padding:10px 12px; margin:0 0 14px; font-size:13px; color:inherit; }
.accounting-window .qb-audit-success { background:rgba(35,150,83,.14); border:1px solid #239653; border-radius:6px; padding:10px 12px; margin-bottom:14px; color:#176438; }
body.dark .accounting-window .qb-audit-success { color:#8de3b1; }
.accounting-window [data-package-tie-out] td:first-child, .accounting-window [data-package-tie-out] td:last-child { white-space:normal; overflow-wrap:anywhere; }
.accounting-window .notice .qb-link { margin-left:4px; }
.manual-invoice .danger, .accounting-window .danger { color:#a33; }
body.dark .manual-invoice .danger, body.dark .accounting-window .danger { color:#ff8a80; }
@media (max-width: 760px) { .manual-invoice .invoice-form-grid { grid-template-columns:1fr; } .manual-invoice .actions { flex-wrap:wrap; } }

.qb-invoice-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.qb-invoice-number { font-size: 20px; font-weight: 700; }
.qb-invoice-badge { padding: 4px 12px; border-radius: 12px; font-weight: 700; font-size: 12px; }
.qb-badge-paid { background: #e6f3e8; color: #1b6e13; }
.qb-badge-open { background: #e8f0fb; color: #1b4f91; }
.qb-badge-overdue { background: #fbe8e8; color: #a32020; }
.qb-invoice-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 16px; }
.qb-invoice-meta label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; margin-bottom: 2px; }
.qb-invoice-totals { max-width: 320px; margin-left: auto; margin-top: 14px; }
.qb-invoice-totals > div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; }
.qb-total-line { border-top: 1px solid var(--border); font-weight: 600; }
.qb-balance-line { font-weight: 700; color: var(--ink); }
#accounting-detail { margin-top: 18px; }

.qb-evidence-note { margin-top: 12px; color: var(--muted); font-size: 12px; }

.qb-modal { position: fixed; inset: 0; background: rgba(15,23,32,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.qb-modal[hidden] { display: none; }
.qb-modal-card { background: var(--card); border-radius: 8px; padding: 22px 24px; width: 360px; max-width: calc(100vw - 32px); box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.qb-modal-card h2 { margin: 0 0 6px; font-size: 17px; }
.qb-modal-card label { display: block; font-size: 12.5px; color: var(--muted); margin: 12px 0 4px; font-weight: 600; }
.qb-modal-card input, .qb-modal-card textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 7px 9px; border: 1px solid var(--border); border-radius: 5px; }
.qb-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.qb-error { color: #a32020; font-size: 12.5px; margin: 8px 0 0; }

/* UI-01: P&L-only report chrome. The shell and other reports remain unchanged. */
#accounting-main.qb-pl-page { border: 0; border-radius: 0; padding: 0; }
#accounting-content:has(.qb-pl-page) { background: var(--card); padding: 24px 28px; }
.qb-pl { color: var(--ink); font: 13px Arial, Helvetica, sans-serif; }
.qb-pl *, .qb-pl *::before, .qb-pl *::after { box-sizing: border-box; }
.qb-pl .qb-page-head { margin-bottom: 34px; }
.qb-pl .qb-page-head h1 { margin-top: 6px; font-size: 27px; color: var(--ink); letter-spacing: -.5px; }
.qb-pl .qb-page-head > span { margin-top: 8px; }
.accounting-window .qb-pl-filters label { flex-direction: column; align-items: flex-start; gap: 7px; font-size: 11px; margin: 0; font-weight: 400; color: var(--ink); }
.qb-pl-filters input, .qb-pl-filters select { margin: 0; }
.qb-pl-filters { align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.qb-pl-filters select { min-width: 150px; }
.qb-pl-filters input { min-width: 122px; max-width: 145px; }
.qb-pl .qb-btn { font-weight: 400; border-radius: 4px; white-space: nowrap; padding: 8px 14px; }
.qb-pl .qb-btn-primary { background: var(--navy-2); font-weight: 700; }
.qb-pl .qb-btn-primary:hover { background: var(--navy); }
.qb-pl button:focus-visible, .qb-pl input:focus-visible, .qb-pl select:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.qb-pl-filters [role=alert] { flex-basis: 100%; }
.qb-pl-actions { display: flex; flex-wrap: wrap; gap: 10px; border-block: 1px solid var(--border); padding: 13px 0; }
.qb-pl-actions > span { flex: 1; }
.qb-pl-paper { margin: 24px auto 0; padding: 24px 36px; max-width: 920px; border: 1px solid var(--border); background: var(--card); }
.qb-pl-title { text-align: center; margin-bottom: 26px; }
.qb-pl-title p { font-size: 13px; margin: 10px 0; }
.accounting-window .qb-pl-title h2 { font-size: 22px; margin: 10px 0; color: var(--ink); }
.qb-pl-table-wrap { overflow-x: auto; }
.qb-pl-table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 12px; }
.qb-pl-table th { text-align: left; border-block: 1px solid var(--border); font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: normal; }
.qb-pl-table th, .qb-pl-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); }
.qb-pl-table .qb-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 130px; width: 30%; }
.qb-pl-table .qb-link { text-decoration: none; color: var(--ink); text-align: left; }
.qb-pl-table .qb-link:hover { text-decoration: underline; color: var(--blue); }
.qb-pl-disclosure { border: 0; padding: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.qb-pl-disclosure > span { display: inline-block; width: 10px; }
.qb-pl-section td { font-weight: 700; }
.qb-pl-total, .qb-pl-subtotal, .qb-pl-result { font-weight: 700; }
.qb-pl-net { font-weight: 700; background: var(--acct-hover); border-top: 3px double var(--muted); }
.qb-pl-meta { font-size: 11px; color: var(--muted); line-height: 1.6; margin: 24px 0 0; }
@media(max-width:760px) {
  #accounting-content:has(.qb-pl-page) { padding: 16px 10px; }
  .qb-pl .qb-page-head { flex-wrap: wrap; margin-bottom: 22px; }
  .qb-pl-paper { padding: 20px 10px; }
  .qb-pl-filters { gap: 12px; }
  .qb-pl-actions > span { display: none; }
  .qb-pl-table td:first-child { overflow-wrap: anywhere; }
}
@media print {
  .qb-pl-disclosure > span { display: none; }
  body:has(.qb-pl) { background: var(--card); }
  body:has(.qb-pl) * { visibility: hidden !important; }
  body:has(.qb-pl) .qb-pl-paper, body:has(.qb-pl) .qb-pl-paper * { visibility: visible !important; }
  body:has(.qb-pl) .qb-pl-paper { position: absolute; inset: 0 auto auto 0; width: 100%; max-width: none; margin: 0; padding: 12mm; border: 0; }
  body:has(.qb-pl) .qb-pl-table-wrap { overflow: visible; }
  .qb-pl-table thead { display: table-header-group; }
  .qb-pl-table tr { break-inside: avoid; }
  .qb-pl-table button { color: #000; }
}
@media (max-width: 760px) {
  .accounting-body { flex-direction: column; }
  #accounting-nav { width: 100%; flex: 0 0 auto; }
  .qb-flyout { position: static; left: auto; box-shadow: none; border-radius: 0; }
}

/* Approved mockup tokens, strictly scoped to Accounting. */
.accounting-window{}
.accounting-window *{box-sizing:border-box}
.accounting-window{margin:0;background:var(--card);color:var(--ink);font:14px Arial,Helvetica,sans-serif}
.accounting-window button, .accounting-window input, .accounting-window select{font:inherit}
.accounting-window button, .accounting-window a, .accounting-window input, .accounting-window select{outline-offset:3px}
.accounting-window button{cursor:pointer;background:var(--card);color:var(--ink);border:1px solid var(--border);border-radius:4px;padding:8px 14px}
.accounting-window button:hover{background:var(--acct-hover)}
.accounting-window a{color:var(--blue);text-decoration:none}
.accounting-window a:hover{text-decoration:underline}
.accounting-window h1{font-size:27px;margin:8px 0 0;letter-spacing:-.6px}
.accounting-window h2{font-size:18px;margin:0 0 14px}
.accounting-window h3{font-size:15px}
.accounting-window p{line-height:1.5}
.accounting-window .muted, .accounting-window small{color:var(--muted);font-size:12px}
.accounting-window .top{height:49px;border-bottom:1px solid var(--border);display:flex;align-items:center;position:fixed;inset:0 0 auto 0;z-index:3;background:var(--card);padding:0 18px 0 78px;gap:20px}
.accounting-window .brandtitle{font-weight:800;letter-spacing:2px;color:var(--ink);font-size:18px}
.accounting-window .company{font-size:12px}
.accounting-window .global{margin-left:110px;width:470px;border:0;background:var(--bg);padding:8px 12px;border-radius:4px}
.accounting-window .spacer{flex:1}
.accounting-window .avatar{background:#dcece7;border-radius:50%;padding:8px;font-size:11px;font-weight:bold}
.accounting-window .rail{position:fixed;top:0;bottom:0;left:0;width:58px;background:var(--bg);border-right:1px solid var(--border);z-index:4;text-align:center;padding-top:10px}
.accounting-window .rail .logo{background:#123c50;color:white;border-radius:9px;width:30px;height:30px;margin:0 auto 16px;display:grid;place-items:center;font-weight:bold}
.accounting-window .rail a{display:block;color:var(--muted);padding:13px 2px;font-size:10px}
.accounting-window .rail b{display:block;font-size:20px;margin-bottom:5px;font-weight:400}
.accounting-window .rail a.current{background:var(--acct-hover);color:var(--green)}
.accounting-window .sidebar{position:fixed;top:49px;bottom:0;left:58px;width:207px;border-right:1px solid var(--border);padding:18px 9px;overflow:auto;background:var(--card)}
.accounting-window .sidebar .label{font-size:10px;letter-spacing:.8px;padding:0 8px 15px;color:var(--muted)}
.accounting-window .sidebar summary{padding:11px 8px;cursor:pointer;font-size:12px;font-weight:bold;list-style:none;display:flex;justify-content:space-between}
.accounting-window .sidebar summary:after{content:'⌄'}
.accounting-window .sidebar a{display:block;padding:8px 12px 8px 26px;color:var(--ink);font-size:12px;border-radius:4px}
.accounting-window .sidebar a.current{background:var(--acct-hover);font-weight:bold}
.accounting-window .sidebar>a{padding-left:8px;font-weight:bold}
.accounting-window .sidebar details{margin-bottom:3px}
.accounting-window .workspace{margin-left:265px;padding:24px 30px 44px;margin-top:49px;min-width:0}
.accounting-window .breadcrumb{font-size:11px;color:var(--muted)}
.accounting-window .pagehead, .accounting-window .sectionhead{display:flex;justify-content:space-between;align-items:center;gap:18px}
.accounting-window .pagehead{margin-bottom:25px}
.accounting-window .actions{display:flex;gap:12px;align-items:center}
.accounting-window .primary{background:var(--green);color:#fff;border-color:var(--green);font-weight:bold}
.accounting-window .primary:hover{background:var(--navy)}
.accounting-window .surface{border:1px solid var(--border);padding:22px;background:var(--card);border-radius:5px}
.accounting-window .tabs{display:flex;gap:5px;border-bottom:1px solid var(--border);margin:14px 0}
.accounting-window .tabs button{border:0;border-radius:0;padding:12px 22px;background:var(--card);color:var(--muted)}
.accounting-window .tabs .active{border-bottom:3px solid var(--green);font-weight:bold;color:var(--ink)}
.accounting-window .filters{display:flex;gap:10px;align-items:center;margin:20px 0 14px}
.accounting-window .filters input, .accounting-window .filters select, .accounting-window input[type=search], .accounting-window .reportcontrols input, .accounting-window .reportcontrols select{padding:8px 10px;border:1px solid var(--border);border-radius:4px;min-width:0;background:var(--card)}
.accounting-window .filters input{width:230px}
.accounting-window .filters select{max-width:160px}
.accounting-window .tablewrap{overflow:auto;border:1px solid var(--border)}
.accounting-window table{border-collapse:collapse;width:100%;font-size:12px}
.accounting-window th{text-align:left;background:var(--bg);font-size:11px;font-weight:600;color:var(--ink);padding:12px 10px;white-space:nowrap}
.accounting-window td{padding:14px 10px;border-bottom:1px solid var(--border);white-space:nowrap}
.accounting-window tbody tr:hover{background:var(--acct-hover)}
.accounting-window .number{text-align:right;font-variant-numeric:tabular-nums}
.accounting-window td input, .accounting-window th input{accent-color:var(--green)}
.accounting-window .chip{border-radius:12px;padding:4px 9px;font-size:11px;background:#e9f0f7;color:#1e5b80}
.accounting-window .chip.overdue{background:#fff0d4;color:#85550b}
.accounting-window .chip.paid{background:#e2f2e9;color:#146344}
.accounting-window .chip.partially-paid{background:#e4eefb;color:#1d4f91}
.accounting-window .pagination{text-align:right;padding:18px 0;color:var(--muted);font-size:11px}
.accounting-window .note{padding:10px 0;color:var(--muted);font-size:12px}
.accounting-window .bankcards{display:flex;gap:14px;margin:12px 0 16px}
.accounting-window .bankcard{text-align:left;width:228px;min-height:110px;border-radius:5px;padding:15px;background:var(--card)}
.accounting-window .bankcard span, .accounting-window .bankcard b, .accounting-window .bankcard small{display:block;margin-bottom:9px}
.accounting-window .bankcard span{font-size:12px}
.accounting-window .bankcard.chosen{border:2px solid #107e63;padding:14px}
.accounting-window .bankcard b{font-size:17px}
.accounting-window .bankcard small:last-child{margin:0;text-align:right;font-size:10px}
.accounting-window .dashboard{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.accounting-window .dashboard .surface{min-height:260px}
.accounting-window .metrics{display:flex;gap:20px;margin:15px 0}
.accounting-window .metric{flex:1;border:0;text-align:left;padding:7px 0;background:var(--card);min-width:0}
.accounting-window .metric b{display:block;font-size:23px;font-weight:400;color:var(--ink)}
.accounting-window .metric span{display:block;font-size:12px;color:var(--muted);margin:8px 0}
.accounting-window .metric i{display:block;height:7px;background:#2b91ab}
.accounting-window .metric.amber i{background:#d99117}
.accounting-window .metric.green i{background:#107e63}
.accounting-window .listmetrics{max-width:850px;margin-bottom:26px}
.accounting-window .listmetrics .metric{padding-right:30px}
.accounting-window .stackbar{display:flex;height:13px}
.accounting-window .big{font-size:28px;font-weight:400}
.accounting-window .barrow{display:flex;align-items:center;font-size:12px;gap:12px;margin:20px 0}
.accounting-window .barrow i{height:18px;flex-shrink:0;max-width:none}
.accounting-window .barrow{position:relative;padding-bottom:4px}
.accounting-window .barrow i{max-width:190px}
.accounting-window .barrow:last-child i{max-width:123px}
.accounting-window .barrow a{margin-left:auto}
.accounting-window .expense{display:flex;align-items:center;gap:20px;margin-top:25px}
.accounting-window .donut{width:150px;height:150px;border-radius:50%;background:conic-gradient(#107e63 0 61.54%,#61a9bc 61.54% 84.62%,#b3d7ca 84.62%);display:grid;place-items:center;flex-shrink:0}
.accounting-window .donut strong{background:var(--card);border-radius:50%;width:108px;height:108px;display:flex;flex-direction:column;justify-content:center;text-align:center;font-size:20px;font-weight:400}
.accounting-window .donut small{font-size:10px;margin-top:6px}
.accounting-window .legend{font-size:11px;flex:1}
.accounting-window .legend p{display:flex;align-items:center;gap:6px}
.accounting-window .legend a{margin-left:auto}
.accounting-window .legend i{display:inline-block;width:7px;height:7px;background:#107e63}
.accounting-window .accountrow{display:flex;justify-content:space-between;border-bottom:1px solid var(--border);padding:12px 0;font-size:13px}
.accounting-window .accountrow small{display:block;margin-top:6px;font-size:10px}
.accounting-window .accountrow>div:last-child{text-align:right}
.accounting-window .centre{display:grid;grid-template-columns:225px minmax(0,1fr);gap:16px}
.accounting-window .customerside{padding:12px}
.accounting-window .customerside input{width:100%;font-size:12px}
.accounting-window .customer-name{display:block;width:100%;border:0;border-radius:0;text-align:left;padding:18px 8px;border-bottom:1px solid var(--border);font-size:12px}
.accounting-window .chosen{background:var(--acct-hover)}
.accounting-window .balancepanel{text-align:right;min-width:140px}
.accounting-window .balancepanel small, .accounting-window .balancepanel b{display:block;margin-bottom:8px}
.accounting-window .balancepanel b{font-size:23px}
.accounting-window .centre .filters{flex-wrap:wrap}
.accounting-window .centre th, .accounting-window .centre td{padding:12px 8px}
.accounting-window .invoice-layout{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:22px}
.accounting-window .invoice .sectionhead{align-items:start}
.accounting-window .invoice p{font-size:12px}
.accounting-window .invoice-meta{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:24px;margin:30px 0}
.accounting-window .invoice-meta small, .accounting-window .invoice-meta b{display:block;margin-bottom:10px;font-size:12px}
.accounting-window .totals{width:300px;margin-left:auto;margin-top:20px}
.accounting-window .totals p{display:flex;justify-content:space-between;margin:0;padding:10px 0}
.accounting-window .total{border-top:1px solid var(--border);font-weight:bold}
.accounting-window .reportcontrols{display:flex;gap:18px;align-items:end;padding:16px 0 24px}
.accounting-window .reportcontrols label{font-size:11px;display:flex;flex-direction:column;gap:8px}
.accounting-window .reportcontrols select{min-width:150px}
.accounting-window .reporttools{display:flex;gap:10px;padding:13px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.accounting-window .reportpaper{max-width:920px;margin:24px auto 0;border:1px solid var(--border);padding:26px 45px}
.accounting-window .reporttitle{text-align:center;margin-bottom:25px}
.accounting-window .reporttitle p{margin:7px;font-size:13px}
.accounting-window .reporttitle h2{font-size:22px;margin:8px}
.accounting-window .report th{background:var(--card);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.accounting-window .report td{padding:7px 12px}
.accounting-window .report .child td:first-child{padding-left:38px}
.accounting-window .report .group button{border:0;padding:0;font-weight:bold;background:none}
.accounting-window .report .total td{font-weight:bold;border-top:1px solid var(--border)}
.accounting-window .report .grand{font-weight:bold;border-top:3px double var(--muted);background:var(--acct-hover)}
.accounting-window .reportfoot{margin-top:24px}
.accounting-window .reporttotal{display:flex;justify-content:space-between;border-top:2px solid var(--muted);padding:15px}
.accounting-window .launch{display:flex;flex-direction:column;gap:15px;margin:25px 0}
.accounting-window .empty{text-align:center;padding:65px 0;color:var(--muted)}
.accounting-window .empty b{display:block;color:#178563;font-size:32px;margin-bottom:20px}
.accounting-window #accounting-bulk{background:var(--acct-hover);padding:10px}
.accounting-window #toast{position:fixed;bottom:25px;left:50%;transform:translateX(-30%);background:#183f36;color:white;padding:13px 22px;border-radius:5px;z-index:10}
.accounting-window #accounting-search-results{position:fixed;top:44px;left:420px;width:470px;background:var(--card);border:1px solid var(--border);box-shadow:0 10px 25px #1233;z-index:9;padding:16px}
.accounting-window #accounting-search-results a{display:block;padding:10px}
.accounting-window dialog{border:1px solid var(--border);border-radius:8px;max-width:520px;padding:25px}
.accounting-window dialog::backdrop{background:#152c3b55}
.accounting-window .demo-label{font-size:10px;color:var(--muted);margin-top:30px}
@media(max-width:1000px){.accounting-window .global{margin-left:0;width:330px}
.accounting-window .sidebar{width:175px}
.accounting-window .workspace{margin-left:233px;padding:20px}
.accounting-window .dashboard{grid-template-columns:1fr}
.accounting-window .centre{grid-template-columns:1fr}
.accounting-window .customerside{display:none}
.accounting-window .reportcontrols, .accounting-window .filters{flex-wrap:wrap}
.accounting-window .invoice-layout{grid-template-columns:1fr}
.accounting-window .bankcards{flex-wrap:wrap}
}
@media(max-width:700px){.accounting-window .sidebar{display:none}
.accounting-window .workspace{margin-left:58px}
.accounting-window .top{padding-left:68px;gap:10px}
.accounting-window .company{display:none}
.accounting-window .global{width:200px}
.accounting-window .pagehead{align-items:start;flex-direction:column}
.accounting-window .invoice-meta{grid-template-columns:1fr}
.accounting-window .reportpaper{padding:20px}
.accounting-window .reportcontrols{gap:10px}
}
@media(max-width:700px){.accounting-window .dashboard, .accounting-window .centre{grid-template-columns:minmax(0,1fr)}
.accounting-window .surface, .accounting-window .reportpaper, .accounting-window .invoice-layout>*, .accounting-window .centre>*{min-width:0}
.accounting-window .expense{flex-wrap:wrap}
.accounting-window .legend{width:100%;flex-basis:100%}
.accounting-window .metrics{gap:10px}
.accounting-window .metric b{font-size:17px}
.accounting-window .metric span{font-size:10px}
.accounting-window .sectionhead{flex-wrap:wrap}
.accounting-window .barrow{flex-wrap:wrap}
.accounting-window .barrow i{max-width:110px}
.accounting-window .barrow:last-child i{max-width:72px}
.accounting-window .reportpaper{overflow-x:auto}
.accounting-window .reporttools{flex-wrap:wrap}
.accounting-window .top .muted{display:none}
.accounting-window .global{min-width:0;flex:1}
.accounting-window .reportcontrols label{max-width:100%}
}
@media print{.accounting-window .top, .accounting-window .rail, .accounting-window .sidebar, .accounting-window .actions, .accounting-window .filters, .accounting-window .reportcontrols, .accounting-window .reporttools, .accounting-window .demo-label{display:none}
.accounting-window .workspace{margin:0;padding:0}
.accounting-window .reportpaper{border:0;max-width:none}
}

/* UI-02: the approved Accounting application fills the viewport, not a nested old shell. */
body:has(.accounting-window) { overflow: hidden; }
body:has(.accounting-window) #sandbox-banner { position:fixed !important; top:auto !important; bottom:0; left:265px !important; right:0; padding:3px !important; font-size:10px !important; pointer-events:none; }
body:has(.accounting-window) #nexa-fab { display:none; }
.accounting-window .launch { align-items:flex-start; }
.accounting-window {  position:fixed; inset:0; z-index:50; display:block; overflow:auto; min-height:100vh; border:0; border-radius:0; background:var(--card); color:var(--ink); font:14px Arial,Helvetica,sans-serif; }
.accounting-window #accounting-topbar { justify-content:initial; height:49px; padding:0 18px 0 78px; gap:20px; }
.accounting-window #accounting-nav { width:207px; background:var(--card); overflow:auto; z-index:4; position:fixed; top:49px; bottom:0; left:58px; }
.accounting-window #accounting-content { display:block; background:var(--card); margin:49px 0 0 265px; padding:24px 30px 44px; overflow:visible; }
.accounting-window #accounting-main { background:var(--card); border:0; border-radius:0; padding:0; min-width:0; }
.accounting-window button { font-weight:400; line-height:normal; }
.accounting-window button.primary, .accounting-window .qb-btn-primary { font-weight:bold; background:var(--navy-2); color:white; border-color:var(--navy-2); }
.accounting-window .rail button { display:block; border:0; border-radius:0; background:none; width:100%; color:var(--muted); padding:13px 2px; font-size:10px; }
.accounting-window .rail button.current { background:var(--acct-hover); color:var(--navy-2); }
.accounting-window .sidebar button { display:block; border:0; width:100%; text-align:left; padding:8px 12px 8px 26px; color:var(--ink); font-size:12px; border-radius:4px; background:var(--card); }
.accounting-window .sidebar button[aria-current=page] { background:var(--acct-hover); font-weight:bold; }
.accounting-window .sidebar .nav-home { padding-left:8px; font-weight:bold; }
.accounting-window .sidebar .nav-exit { padding-left:8px; margin-bottom:14px; color:var(--muted); }
.accounting-window .sidebar summary { color:var(--ink); }
.accounting-window h2 { color:var(--ink); font-size:18px; margin:0 0 14px; }
.accounting-window .qb-link { display:inline; background:none; border:0; color:var(--blue); text-decoration:none; padding:0; font:inherit; cursor:pointer; }
.accounting-window .qb-link:hover { text-decoration:underline; }
.accounting-window .qb-table-wrap { border-radius:0; border-color:var(--border); }
.accounting-window .qb-table th { position:static; background:var(--bg); color:var(--ink); font-size:11px; font-weight:600; text-transform:none; letter-spacing:normal; padding:12px 10px; }
.accounting-window .qb-table td { padding:14px 10px; font-size:12px; border-color:var(--border); }
.accounting-window .qb-table tbody tr:nth-child(even) { background:var(--card); }
.accounting-window .qb-table tbody tr:hover { background:var(--acct-hover); }
.accounting-window .qb-btn { font-weight:400; border-radius:4px; padding:8px 14px; }
.accounting-window .qb-toolbar { margin:20px 0 14px; }
.accounting-window .qb-toolbar input, .accounting-window .qb-toolbar select { border-color:var(--border); }
.accounting-window .qb-page-head { margin-bottom:25px; align-items:center; }
.accounting-window .qb-page-head h1 { margin:8px 0 0; font-size:27px; letter-spacing:-.6px; color:var(--ink); }
.accounting-window .qb-subtitle { font-size:12px; color:var(--muted); margin:14px 0 0; }
.accounting-window .qb-pagination { font-size:11px; padding:18px 0; }
.accounting-window .qb-pl .qb-page-head { margin-bottom:25px; }
.accounting-window .qb-pl .qb-subtitle { margin:0; font-size:11px; }
.accounting-window .qb-pl-paper { padding:26px 45px; }
.accounting-window .qb-pl-table .qb-link { color:var(--blue); }
.accounting-window #accounting-search-results { max-height:70vh; overflow:auto; position:fixed; top:44px; left:420px; width:470px; z-index:8; background:var(--card); border:1px solid var(--border); padding:12px; box-shadow:0 10px 25px #1233; }
.accounting-window #accounting-search-results button { display:block; border:0; width:100%; text-align:left; }
.accounting-window #accounting-search-results small { display:block; }
.accounting-window .global { max-width:470px; min-width:150px; position:absolute; left:416px; margin-left:0; background:var(--bg); border:0; }
.accounting-window .top .brandtitle { border:0; padding:0; background:none; font-weight:800; }
.accounting-window .top .company { max-width:235px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media(max-width:1000px) { .accounting-window .global { position:static; margin-left:0; } }
.accounting-window .customer-list { max-height:480px; overflow:auto; }
.accounting-window .customer-name { white-space:normal; }
.accounting-window .centre .sectionhead h2 { overflow-wrap:anywhere; }
.accounting-window .bankcards { overflow:auto; padding-bottom:4px; }
.accounting-window .bankcard { flex-shrink:0; }
.accounting-window .bankcard span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.accounting-window .reportcontrols { flex-wrap:wrap; }
.accounting-window .metric { border:0; }
.accounting-window .metric b, .accounting-window .metric span { white-space:nowrap; }
.accounting-window .listmetrics .metric { padding-right:30px; }
.accounting-window .dashboard > *, .accounting-window .surface { min-width:0; }
.accounting-window .legend { min-width:0; }
.accounting-window .legend .qb-link { text-align:right; margin-left:auto; white-space:nowrap; }
.accounting-window .legend .expense-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.accounting-window .invoice .qb-table td { white-space:normal; }
.accounting-window .invoice-meta { min-height:100px; }
.accounting-window .invoice .sectionhead { min-height:100px; }
.accounting-window .reportpaper .qb-table .qb-num { min-width:105px; }
.accounting-window .centre .qb-table td, .accounting-window .centre .qb-table th { padding:12px 8px; }
.accounting-window [hidden] { display:none !important; }
.accounting-window .qb-error { color:#a32020; }
.accounting-window .reporttitle h2 { font-size:22px; margin:8px; }
.accounting-window .reportpaper > h2 { margin-top:22px; }
.accounting-window .table-tools { display:flex; gap:10px; align-items:center; }
.accounting-window th button { border:0; background:transparent; color:inherit; font:inherit; padding:0; text-align:inherit; }
/* Restore browser defaults suppressed by NEXA's global reset, inside this app only. */
.accounting-window p { margin:1em 0; }
.accounting-window h3 { margin:1em 0; }
.accounting-window hr { margin:8px auto; border:0; border-top:1px solid var(--border); }
.accounting-window input, .accounting-window select { width:auto; margin-top:0; }
.accounting-window label { margin-bottom:0; font-weight:400; color:var(--ink); }
.accounting-window input.global[type=search] { background:var(--bg); border:0; }
.accounting-window #party-search label { display:flex; align-items:center; gap:6px; margin:10px 0; font-size:12px; }
.accounting-window .bank-list { max-height:174px; overflow:auto; }
.accounting-window #party-search input[type=checkbox] { width:auto; margin:0; }
.accounting-window .barrow .qb-link { margin-left:auto; white-space:nowrap; }
.accounting-window .qb-pl-filters { margin:0 0 24px; }
.accounting-window .qb-pl-disclosure { border:0; padding:0; background:none; color:inherit; font:inherit; text-align:left; }
.accounting-window .qb-pl-table th { background:var(--card); text-transform:none; letter-spacing:normal; font-weight:400; }
.accounting-window .qb-pl-table td { padding:7px 10px; }
.accounting-window .qb-pl-table td .qb-link { padding:0; }
.accounting-window .qb-pl-title p { margin:10px 0; }
.accounting-window .qb-pl .qb-page-head { margin-bottom:34px; }
.accounting-window .centre .qb-table { table-layout:fixed; }
.accounting-window .centre .qb-table th, .accounting-window .centre .qb-table td { white-space:normal; overflow-wrap:anywhere; }
.accounting-window .centre .qb-table th:nth-child(1) { width:4%; }
.accounting-window .centre .qb-table th:nth-child(2) { width:12%; }
.accounting-window .centre .qb-table th:nth-child(3) { width:11%; }
.accounting-window .centre .qb-table th:nth-child(4) { width:10%; }
.accounting-window .centre .qb-table th:nth-child(5) { width:21%; }
.accounting-window .centre .qb-table th:nth-child(6) { width:12%; }
.accounting-window .centre .qb-table th:nth-child(7) { width:13%; }
.accounting-window .centre .qb-table th:nth-child(8) { width:9%; }
.accounting-window .centre .qb-table th:nth-child(9) { width:8%; }
body.dark .accounting-window input, body.dark .accounting-window select { background:var(--card); color:var(--ink); border-color:var(--border); }
body.dark .accounting-window .global { background:var(--bg); border:0; }
@media(max-width:700px) { .accounting-window .centre .tablewrap { overflow:auto; } .accounting-window .centre .qb-table { min-width:700px; } }
@media(max-width:1000px) { .accounting-window #accounting-nav{width:175px} .accounting-window #accounting-content{margin-left:233px;padding:20px} .accounting-window .global{margin-left:0} .accounting-window #accounting-search-results{left:78px;width:min(470px,calc(100vw - 90px))} }
@media(max-width:700px) { .accounting-window #accounting-nav{display:none} .accounting-window #accounting-content{margin-left:58px;padding:18px 12px} .accounting-window #accounting-topbar{padding-left:68px;gap:10px} .accounting-window .avatar{display:none} .accounting-window .centre{grid-template-columns:minmax(0,1fr)} .accounting-window .customerside{display:block;max-height:190px;overflow:auto} .accounting-window .totals{width:min(300px,100%)} .accounting-window .metric b{font-size:16px} .accounting-window .listmetrics .metric{padding-right:0} .accounting-window .qb-pl-paper{padding:20px 10px} }
@media print { .accounting-window{position:static;overflow:visible;min-height:0} .accounting-window #accounting-topbar,.accounting-window #accounting-nav,.accounting-window .rail,.accounting-window .qb-toolbar,.accounting-window .qb-pagination,.accounting-window .table-tools,.accounting-window .pagehead{display:none} .accounting-window #accounting-content{margin:0;padding:0} .accounting-window .reportpaper{max-width:none;border:0;padding:0} .accounting-window .qb-table-wrap{overflow:visible} }

/* UI-03: Accounting is content INSIDE the existing portal, never a global overlay.
   body.dark remains the sole theme authority; no independent theme state. */
body:has(.accounting-window) { overflow:auto; }
body:has(.accounting-window) #content { max-width:none; padding:0; margin:0; }
.accounting-window {
  --ink:var(--text); --border:var(--line);
  --muted:color-mix(in srgb, var(--text) 78%, var(--card));
  --acct-hover:color-mix(in srgb, var(--gold) 15%, var(--card));
  position:relative; inset:auto; z-index:auto; min-height:calc(100vh - 60px);
  display:grid; grid-template-columns:220px minmax(0,1fr); grid-template-rows:auto 1fr;
  overflow:visible; background:var(--bg); color:var(--text); font:inherit; font-size:14px;
}
.accounting-window #accounting-topbar {
  grid-column:2; grid-row:1; position:relative; inset:auto; height:auto; min-height:58px;
  padding:10px 30px; display:flex; gap:20px; justify-content:space-between;
  background:var(--card); border-bottom:1px solid var(--line); z-index:5;
}
.accounting-window #accounting-topbar .global {
  position:static; width:470px; max-width:100%; min-width:0; margin:0; flex:0 1 470px;
  background:var(--bg); color:var(--text); border:1px solid var(--line);
}
.accounting-window #accounting-topbar .company { color:var(--muted); font-size:12px; }
.accounting-window #accounting-nav {
  grid-column:1; grid-row:1 / 3; position:relative; inset:auto; width:auto;
  padding:20px 10px; background:var(--card); border-right:1px solid var(--line); z-index:1;
}
.accounting-window #accounting-content {
  grid-column:2; grid-row:2; margin:0; padding:24px 30px 44px; min-width:0;
  background:var(--bg); overflow:visible;
}
.accounting-window #accounting-main { background:transparent; }
.accounting-window h1, .accounting-window h2, .accounting-window h3 { color:var(--text); }
.accounting-window button, .accounting-window input, .accounting-window select, .accounting-window textarea { font-family:inherit; }
.accounting-window input::placeholder { color:var(--muted); opacity:1; }
.accounting-window .qb-pl { font-family:inherit; }
.accounting-window .qb-pl-paper, .accounting-window .reportpaper { background:var(--card); }
.accounting-window .qb-link { background:transparent; }
.accounting-window #accounting-search-results {
  position:absolute; top:54px; left:250px; width:min(470px,calc(100% - 270px));
  background:var(--card); border-color:var(--line); z-index:10;
}
.accounting-window .qb-error { color:var(--red); }
.accounting-window :focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
.accounting-window { color-scheme:light; }
body.dark .accounting-window { color-scheme:dark; }
@media print { body.dark .accounting-window { color-scheme:light; } }
.accounting-window button:disabled { opacity:1; color:var(--muted); cursor:default; }
body:has(.accounting-window) #sandbox-banner { left:220px !important; }
.accounting-window .connections-list { display:grid; gap:18px; max-width:960px; }
.accounting-window .connection-row { display:grid; gap:14px; }
.accounting-window .connection-row .sectionhead p, .accounting-window .connection-row > p { margin:4px 0; }
.accounting-window [data-stripe-key-form] { display:flex; align-items:end; gap:10px; flex-wrap:wrap; padding-top:4px; }
.accounting-window [data-stripe-key-form] label { display:grid; gap:6px; flex:1 1 320px; font-size:12px; color:var(--muted); }
.accounting-window [data-stripe-key-form] input { width:100%; padding:9px 10px; border:1px solid var(--border); border-radius:4px; background:var(--card); color:var(--ink); }
.accounting-window [data-stripe-key-form] .qb-error { flex-basis:100%; margin:0; }
.accounting-window .connection-bank { margin-top:12px; padding:16px; border:1px solid var(--border); border-radius:5px; background:var(--bg); }
.accounting-window .connection-bank .sectionhead { padding-bottom:8px; border-bottom:1px solid var(--border); }
.accounting-window .connection-bank .sectionhead > div:last-child { display:flex; gap:8px; }
.accounting-window .connection-bank .accountrow { align-items:center; gap:20px; }
.accounting-window .connection-bank .accountrow label { display:flex; align-items:center; gap:10px; font-size:12px; }
.accounting-window .connection-bank select { max-width:240px; padding:7px 9px; border:1px solid var(--border); border-radius:4px; background:var(--card); color:var(--ink); }
.accounting-window .connection-bank .chip.active { background:#e2f2e9; color:#146344; }
.accounting-window .connection-bank .chip.reconnect { background:#fff0d4; color:#85550b; }
.accounting-window .connection-bank .chip.removed { background:var(--border); color:var(--muted); }
@media(max-width:700px) {
 .accounting-window .connection-row .sectionhead, .accounting-window .connection-bank .accountrow { align-items:stretch; }
 .accounting-window .connection-bank .accountrow, .accounting-window .connection-bank .accountrow label { flex-direction:column; }
 .accounting-window .connection-bank select { width:100%; max-width:none; }
}
@media(max-width:1000px) {
 .accounting-window { grid-template-columns:185px minmax(0,1fr); }
 .accounting-window #accounting-nav { width:auto; }
 .accounting-window #accounting-content { margin:0; padding:20px; }
 .accounting-window #accounting-topbar { flex-wrap:wrap; padding:10px 20px; }
 .accounting-window #accounting-search-results { left:205px; width:min(470px,calc(100% - 225px)); }
}
@media(max-width:700px) {
 .accounting-window { grid-template-columns:minmax(0,1fr); }
 .accounting-window #accounting-topbar { grid-column:1; padding:10px 12px; gap:8px; }
 .accounting-window #accounting-content { grid-column:1; margin:0; padding:18px 12px; }
 .accounting-window #accounting-search-results { left:12px; width:calc(100% - 24px); top:90px; }
 body:has(.accounting-window) #sandbox-banner { left:0 !important; }
}
@media print {
 body:has(.accounting-window), body.dark:has(.accounting-window) {
  --bg:#fff; --card:#fff; --text:#000; --muted:#333; --line:#aaa; --blue:#000;
  background:#fff; color:#000; overflow:visible;
 }
 body:has(.accounting-window) .topbar, body:has(.accounting-window) #sandbox-banner { display:none !important; }
 .accounting-window { display:block; position:static; min-height:0; --ink:#000; --muted:#333; --acct-hover:#fff; }
 .accounting-window #accounting-topbar, .accounting-window #accounting-search-results { display:none; }
 .accounting-window #accounting-content { margin:0; padding:0; }
 .accounting-window .qb-pl-paper, .accounting-window .reportpaper { background:#fff; color:#000; }
}
