/* Financial workspace. Shared with the local preview; no demo data or controls. */
body.finance-workspace{--canvas:#f5f6f8;--surface:#fff;--ink:#1d2939;--muted:#596579;--line:#e4e8ee;--accent:#315cc5;--rail:224px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);font-size:15px;-webkit-font-smoothing:antialiased}
.finance-workspace button{cursor:pointer}.finance-workspace button:disabled{cursor:default}
.finance-workspace .workspace-rail{background:#fcfcfd}.finance-workspace .rail-brand{height:73px;font-size:15px;font-weight:600;letter-spacing:-.025em;border-bottom:0;padding:0 20px}
.finance-workspace .rail-company-slot{padding:6px 12px 22px}.finance-workspace .company-controls>label{display:none}.finance-workspace .company-switcher{border-radius:9px!important;padding:12px!important;min-height:62px!important;background:white!important;border:1px solid var(--line)!important}
.finance-workspace .switcher-selected strong{font-size:13px;font-weight:600}.finance-workspace .switcher-selected small{font-size:11px;color:var(--muted);margin-top:4px}
.finance-workspace #add-company{min-height:38px;background:transparent;border:0;font-size:12px;font-weight:500;color:var(--muted)}
.finance-workspace .workspace-navigation{padding:0 12px;gap:5px}.finance-workspace .workspace-navigation button{font-size:13px;min-height:46px;border-radius:8px;gap:11px;padding:12px;color:var(--muted);transition:background-color 150ms ease,color 150ms ease}
.finance-workspace .workspace-navigation button img{width:18px;height:18px;opacity:.75}.finance-workspace .workspace-navigation button[aria-current=page]{background:#eaf0fc;color:#274fae;font-weight:600;box-shadow:none}
.finance-workspace .workspace-navigation button:hover{background:#edf0f5;color:var(--ink)}
.finance-workspace .rail-foot{display:flex;flex-direction:column;gap:12px;color:var(--muted);font-size:11px;padding:18px 16px}
.finance-workspace .lp-settings-toggle{display:flex;align-items:center;gap:10px;background:transparent;border:0;min-height:44px;padding:8px 0;font:inherit;font-size:13px;color:var(--muted);text-align:left}
.finance-workspace .lp-settings-toggle img{width:18px;height:18px;opacity:.7}.finance-workspace .lp-settings-toggle:hover{color:var(--accent)}
.finance-workspace .lp-settings-label{font-size:13px;font-weight:500;margin:20px 0 14px;color:var(--muted)}
.finance-workspace .intro .primary-button{display:inline-flex;min-height:44px;border-radius:8px;background:var(--accent);font-size:13px;font-weight:500;padding:11px 16px;flex-shrink:0;transition:background-color 150ms ease}
.finance-workspace .intro .primary-button:hover{background:#264caa}
.finance-workspace :focus-visible{outline:3px solid #315cc5;outline-offset:4px}
.finance-workspace .text-link{min-height:28px}.finance-workspace .lp-panel-foot .text-link{padding:3px 0}
.finance-workspace .anaf-entry{padding:18px 22px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:none}
.finance-workspace .anaf-entry strong{color:var(--ink);font-size:13px}.finance-workspace .anaf-entry small{color:var(--muted);font-size:12px;margin-top:4px}
.finance-workspace .content-overlay,.finance-workspace .choice-overlay,.finance-workspace .company-switcher-menu,.finance-workspace .workspace-language-menu,.finance-workspace .import-dialog{border-radius:16px;border-color:var(--line);box-shadow:0 24px 80px #1d293930;font-family:inherit}
.finance-workspace .overlay-choice,.finance-workspace .choice-picker,.finance-workspace .open-panel-button{border-radius:8px;min-height:46px;font-size:14px}
.finance-workspace .content-overlay .details-body,.finance-workspace .details-body{font-size:14px;line-height:1.7;color:var(--muted)}
.finance-workspace .row{font-size:14px;line-height:1.6;padding:13px 0;border-color:var(--line)}.finance-workspace .row b{font-variant-numeric:tabular-nums;color:var(--ink)}
.finance-workspace .calculation-section h3,.finance-workspace .calculation-notes h3{font-size:16px}.finance-workspace .calculation-notes p{font-size:13px;line-height:1.7}
.finance-workspace .pfa-form-grid label{font-size:13px;color:var(--muted)}.finance-workspace .pfa-form-grid input{font-size:15px;min-height:44px;border-radius:8px;color:var(--ink)}
.finance-workspace .review-confirm{font-size:13px;line-height:1.6}.finance-workspace .review-confirm input{width:18px;height:18px;flex-shrink:0}
.finance-workspace th,.finance-workspace td{font-size:13px;padding:13px 12px}.finance-workspace td:not(:first-child){font-variant-numeric:tabular-nums}
.finance-workspace .quiet-button{min-height:40px;padding:9px 12px;font-size:13px;border-radius:7px;color:#344054;background:#edf0f5}
.finance-workspace .quiet-button:hover{background:#e1e7ef}.finance-workspace .quiet-button:active,.finance-workspace .primary-button:active{transform:translateY(1px)}
.finance-workspace .import-format-guide{font-size:13px;line-height:1.7;color:#344054;background:#f0f5fd;border:1px solid #dce5f2;padding:16px;border-radius:10px;margin:16px 0 20px}
.finance-workspace .lp-inline-workspace>h2{margin:0 0 20px;font-size:18px}.finance-workspace .lp-inline-workspace>.details-body{padding:0}
.finance-workspace #history-view,.finance-workspace #transactions-view{grid-column:1/-1}
.finance-workspace #transactions-view .review-actions{display:flex;flex-wrap:wrap;gap:10px;padding:18px 0;align-items:center;border-top:1px solid var(--line);margin-top:18px}
.finance-workspace .lp-review-empty{display:flex;gap:14px;align-items:flex-start;background:#f5f8fd;border:1px solid #e1e8f2;padding:22px;border-radius:10px;margin:12px 0 20px}
.lp-review-empty>img{opacity:.65;flex-shrink:0}.lp-review-empty strong{font-size:14px;font-weight:600;color:var(--ink)}.lp-review-empty p{font-size:13px;line-height:1.6;color:var(--muted);margin:5px 0 0}
.finance-workspace #transaction-review:has(tbody tr) .lp-review-empty{display:none}
.finance-workspace #transaction-review:not(:has(tbody tr)) .table-wrap:has(#transaction-table){display:none}
.finance-workspace *{box-sizing:border-box}
.finance-workspace main{grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:20px;padding:28px 32px 32px;align-items:start;max-width:1550px}
.finance-workspace main>.intro{grid-column:1/-1;min-height:74px;display:flex;margin:0 0 4px;gap:20px;align-items:center}
.finance-workspace .intro h1{display:block;font-size:28px;letter-spacing:-.035em;margin:5px 0 8px;line-height:1.15;color:var(--ink)}
.finance-workspace .intro .workspace-identity,.finance-workspace .intro>.workspace-currency{display:none}
.lp-heading-context{color:var(--muted);font-size:13px;margin:0}
.finance-workspace .intro .muted{font-size:13px!important;line-height:1.5;color:var(--muted)!important}
.finance-workspace main>.surface{padding:24px;border-radius:14px;border:1px solid var(--line);box-shadow:0 2px 3px #1d293903;min-width:0}
.finance-workspace main>#local-cash{grid-column:1;grid-row:2}
.finance-workspace main>#revenue{grid-column:2;grid-row:2;min-height:0;align-self:stretch}
.finance-workspace main>#overview,.finance-workspace main>#numbers{grid-column:1/-1}
.finance-workspace main:not([data-pane=overview])>#local-cash{display:none}
.lp-panel-heading,.finance-workspace #revenue .section-heading,.finance-workspace #overview .section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 24px}
.finance-workspace .lp-panel-heading h2,.finance-workspace #revenue h2,.finance-workspace #overview h2{font-size:16px;line-height:1.4;font-weight:600;letter-spacing:-.02em;margin:0}
.lp-unit{font-size:11px;font-weight:600;color:var(--muted);letter-spacing:.04em}
.lp-amount{font-variant-numeric:tabular-nums;letter-spacing:-.035em;font-weight:600;white-space:nowrap;color:var(--ink)}
.lp-display{display:block;font-size:44px;line-height:1.15;letter-spacing:-.055em;margin:8px 0 12px}
.lp-secondary{display:block;font-size:30px;line-height:1.2;letter-spacing:-.04em;margin:8px 0}
.lp-kicker{color:var(--muted);font-size:14px;line-height:1.5;margin:0}
.lp-caption{font-size:12px;line-height:1.6;color:var(--muted);margin:10px 0 0;max-width:60ch}
.lp-cash-main{display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:28px}
.finance-workspace dl{margin:0}.finance-workspace dd{margin:0}
.lp-ledger-row{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:12px 0;font-size:13px;border-bottom:1px solid var(--line);line-height:1.5}
.lp-ledger-row:first-child{padding-top:0}.lp-ledger-row:last-child{border-bottom:0}
.lp-ledger-row dt{color:var(--muted)}.lp-ledger-row dd{flex-shrink:0}.lp-ledger-row .lp-amount{font-size:16px;letter-spacing:-.015em}
.lp-ledger-total{font-weight:600}.lp-ledger-total dt{color:var(--ink)}
.lp-cash-bar{display:flex;gap:3px;height:9px;border-radius:6px;overflow:hidden;margin-top:26px}
.lp-cash-bar>span{min-width:0;flex-basis:0}.lp-free{background:#315cc5}.lp-reserve{background:#a3b7df}.lp-committed{background:#d6dce5}
.lp-bar-legend{display:flex;flex-wrap:wrap;gap:16px;font-size:11px;color:var(--muted);margin-top:11px}
.lp-bar-legend>span{display:flex;gap:6px;align-items:center}.lp-bar-legend i{width:6px;height:6px;border-radius:2px}
.lp-panel-foot{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-top:18px;margin-top:22px;border-top:1px solid var(--line);font-size:11px;line-height:1.5;color:var(--muted)}
.finance-workspace .text-link{display:inline-flex;align-items:center;gap:6px;color:var(--accent);text-decoration:none;font-size:12px;font-weight:500;line-height:1.5}
.finance-workspace .text-link:hover{text-decoration:underline}.lp-panel-foot .text-link{flex-shrink:0}.lp-panel-foot .text-link img{transform:rotate(-90deg);opacity:.65}
.finance-workspace #revenue .revenue-grid{display:block}.finance-workspace #revenue .section-heading{margin-bottom:20px}.finance-workspace #revenue .period-caption{display:none}
.finance-workspace #revenue .revenue-main>.label{display:block;position:static;width:auto;height:auto;clip-path:none;overflow:visible;font-size:13px;line-height:1.5;color:var(--muted);margin:0}
.finance-workspace #revenue .hero-number{font-size:30px;margin:8px 0!important;color:var(--ink)}
.finance-workspace #revenue .brief{font-size:12px;color:var(--muted);margin:0;line-height:1.6}
.finance-workspace #revenue .revenue-current-date{display:none}
.finance-workspace #revenue .delta{display:inline-block;background:#edf5f1;color:#286047;border-radius:5px;padding:4px 7px;font-size:11px;margin-top:4px}
.finance-workspace #revenue .revenue-previous{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:16px 0 0;margin:18px 0 0;border-left:0;border-top:1px solid var(--line)}
.finance-workspace #revenue .revenue-previous>.label{font-size:12px;min-height:0}.finance-workspace #revenue .revenue-previous strong{font-size:16px;margin:0;color:var(--ink)}
.finance-workspace #revenue .revenue-previous .brief{display:none}
.lp-empty-comparison{font-size:12px;color:var(--muted);margin:0;line-height:1.6}
.lp-revenue-support{margin-top:18px!important}.lp-revenue-support .lp-ledger-row:first-child{padding-top:0}
.finance-workspace #overview .withdrawal-panels{gap:24px;grid-template-columns:1fr 1fr;grid-template-rows:none}
.finance-workspace #overview #loan-path,.finance-workspace #overview #dividend-path{display:block;grid-column:auto;grid-row:auto;border:0;padding:0;background:transparent}
.finance-workspace #overview #dividend-path{border-left:1px solid var(--line);padding-left:24px}
.finance-workspace .withdrawal-title{display:flex;flex-direction:row;justify-content:space-between;align-items:center;text-align:left;flex-wrap:wrap;gap:8px;margin-bottom:18px;min-height:0}
.finance-workspace .withdrawal-title h3{font-size:15px;font-weight:600;line-height:1.4;margin:0}
.finance-workspace .state-pill{font-size:10px;border-radius:5px;padding:4px 7px;line-height:1.5}
.finance-workspace .settled{background:#edf5f1;color:#286047}.finance-workspace .pending{background:#fff4da;color:#795414}.finance-workspace .blocked{background:#fff0ee;color:#a13434}
.finance-workspace #overview .scan-label{font-size:13px;min-height:0;margin:0;color:var(--muted);line-height:1.5}
.finance-workspace #overview .hero-number{margin:8px 0 14px;font-size:30px;color:var(--ink);line-height:1.2}
.finance-workspace #overview .money-line{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between;border-top:1px solid var(--line);padding:14px 0 0!important;font-size:12px;gap:12px}
.finance-workspace #overview .money-line>span{min-height:0;color:var(--muted)}.finance-workspace #overview .money-line b{font-size:15px;font-weight:500;color:var(--ink)}
.lp-scenario-note{font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:18px;margin:22px 0 0;line-height:1.6}
.lp-fact-groups{display:grid;grid-template-columns:1fr 1fr;gap:40px}.lp-fact-groups h3{font-size:13px!important;font-weight:600;margin:0 0 16px;color:var(--ink)}
.lp-fact-groups .lp-ledger-row{font-size:13px;padding:11px 0}.lp-fact-groups .lp-ledger-row .lp-amount{font-size:17px}
.lp-tax-layout{display:grid;grid-template-columns:1fr 2fr;gap:32px;align-items:center}.lp-tax-items{display:grid;grid-template-columns:1fr 1fr;gap:22px 32px}
.lp-metric dt{font-size:12px;color:var(--muted);line-height:1.5}.lp-metric dd{margin-top:6px}.lp-metric .lp-amount{font-size:22px}.lp-metric small{color:var(--muted);font-size:12px}
.finance-workspace .footer{font-size:11px;color:var(--muted);line-height:1.6}
@media(max-width:1050px){.lp-cash-main{grid-template-columns:1fr;gap:22px}.finance-workspace main{padding:24px;gap:16px;grid-template-columns:minmax(0,1.3fr) minmax(250px,1fr)}.lp-cash-ledger .lp-ledger-row{padding:8px 0}.lp-display{font-size:40px}.lp-panel-foot{flex-wrap:wrap;gap:8px}.lp-fact-groups{gap:28px}}
@media(max-width:700px){
 .finance-workspace .workspace-rail{background:white}.finance-workspace .rail-brand,.finance-workspace .rail-foot{display:none}.finance-workspace .rail-company-slot{padding:10px 16px}
 .finance-workspace .company-controls{grid-template-columns:minmax(0,1fr) 44px;padding-right:0;gap:16px;align-items:center}.finance-workspace .company-switcher{border:0!important;min-height:44px!important;padding:0!important;border-radius:0!important;background:transparent!important;height:auto!important;max-height:none!important}
 .finance-workspace .switcher-selected strong{font-size:14px;white-space:normal;overflow-wrap:anywhere}.finance-workspace .switcher-selected small{font-size:10px;margin-top:2px}.finance-workspace #add-company{font-size:12px;min-height:44px;padding:4px;color:var(--accent)}
 .finance-workspace .company-controls>.lp-settings-toggle{display:flex;position:static;border:1px solid var(--line);background:white;min-height:44px;height:44px;width:44px;padding:9px;border-radius:8px;align-items:center;justify-content:center;gap:0;margin:0}
 .finance-workspace .company-switcher-menu #add-company{display:block;width:100%;text-align:left;min-height:44px;padding:10px;color:var(--accent);font-size:13px}
 .finance-workspace .lp-settings-toggle span{display:none}.finance-workspace .lp-settings-toggle img{width:18px;height:18px}
 .finance-workspace .workspace-navigation,.finance-workspace .workspace-navigation:has(button:nth-child(4)){display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);grid-template-columns:none;gap:4px;min-height:72px;inset:auto 0 0;position:fixed;background:white;padding:7px 12px calc(9px + env(safe-area-inset-bottom));border-top:1px solid var(--line);box-shadow:0 -4px 20px #1d293904}
 .finance-workspace .workspace-navigation button{flex-direction:column;gap:4px;min-height:52px;font-size:11px;line-height:1.3;padding:7px 4px;border-radius:9px}
 .finance-workspace .workspace-navigation button img{width:20px;height:20px}.finance-workspace .workspace-navigation button[aria-current=page]{background:#eaf0fc;color:#274fae}
 .finance-workspace .intro .primary-button{display:inline-flex;min-height:44px;max-width:none;width:auto;gap:6px;padding:10px 12px;font-size:12px;border-radius:8px}.finance-workspace .intro .primary-button img{width:16px;height:16px}
 .finance-workspace .intro .upload-label-full{display:none}.finance-workspace .intro .upload-label-compact{display:inline}
 .finance-workspace main{display:grid;width:100%;margin:0;grid-template-columns:minmax(0,1fr);padding:20px 16px calc(100px + env(safe-area-inset-bottom));gap:16px}
 .finance-workspace main>#local-cash,.finance-workspace main>#revenue{grid-column:1;grid-row:auto}
 .finance-workspace main>.intro{min-height:0;gap:12px;margin-bottom:4px}.finance-workspace .intro h1{font-size:25px;margin:4px 0 7px}.lp-heading-context{font-size:12px}.finance-workspace .intro .muted{font-size:11px!important}
 .finance-workspace main>.surface{padding:20px;border:1px solid var(--line);border-radius:14px}
 .lp-panel-heading,.finance-workspace #revenue .section-heading,.finance-workspace #overview .section-heading{margin-bottom:20px}.finance-workspace .lp-panel-heading h2,.finance-workspace #revenue h2,.finance-workspace #overview h2{font-size:15px}
 .lp-cash-main{grid-template-columns:1fr;gap:20px}.lp-display{font-size:40px}.lp-secondary,.finance-workspace #revenue .hero-number{font-size:28px}.lp-caption{font-size:12px}
 .lp-cash-ledger .lp-ledger-row{padding:10px 0}.lp-cash-ledger .lp-ledger-row:first-child{padding-top:0}.lp-cash-bar{margin-top:20px}
 .lp-panel-foot{margin-top:20px;padding-top:16px;font-size:11px;gap:10px}
 .finance-workspace #revenue .revenue-main .brief:not(:has(.delta)){display:none}
 .finance-workspace #overview .withdrawal-panels{grid-template-columns:1fr;gap:24px}
 .finance-workspace #overview #dividend-path{border-left:0;border-top:1px solid var(--line);padding:24px 0 0}
 .finance-workspace .withdrawal-title{margin-bottom:14px}.finance-workspace .state-pill{font-size:10px}
 .finance-workspace #overview .hero-number{font-size:28px}.finance-workspace #overview .money-line b{font-size:16px}
 .lp-fact-groups{grid-template-columns:1fr;gap:26px}.lp-tax-layout{grid-template-columns:1fr;gap:24px}.lp-tax-items{gap:20px 16px}.lp-metric .lp-amount{font-size:22px}
 .finance-workspace .footer{font-size:11px}
}
@media(max-width:400px){.finance-workspace .intro h1{font-size:22px;line-height:1.25}.finance-workspace .intro .primary-button{padding:10px;gap:5px}.finance-workspace #add-company{font-size:11px}.lp-display{font-size:36px}.lp-panel-heading h2{max-width:85%}.finance-workspace .lp-panel-foot .text-link{min-height:40px}}
@media(prefers-reduced-motion:reduce){.finance-workspace *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Desktop navigation; the existing phone header and bottom tabs stay intact. */
@media(min-width:701px){
 body.finance-workspace{--rail:0px}
 .finance-workspace .workspace-rail{position:sticky;inset:0 0 auto;z-index:25;width:100%;min-height:80px;display:flex;flex-direction:row;align-items:center;gap:24px;padding:12px 32px;background:#ffffffed;border:0;border-bottom:1px solid var(--line);box-shadow:0 4px 18px #1d293904;backdrop-filter:blur(16px)}
 .finance-workspace .rail-brand,.finance-workspace .rail-foot{display:none}
 .finance-workspace .rail-company-slot{padding:0;flex:0 1 260px;min-width:170px}
 .finance-workspace .workspace-rail .company-controls{display:block}
 .finance-workspace .company-switcher{min-height:52px!important;padding:8px 12px!important;gap:20px;background:#f8f9fc!important;border-color:transparent!important}
 .finance-workspace .company-switcher:hover,.finance-workspace .company-switcher[aria-expanded=true]{background:#edf2fc!important;border-color:#d4dff3!important}
 .finance-workspace .company-switcher>img{width:16px;height:16px;content:url('/icons/chevron-down.svg');opacity:.6}
 .finance-workspace .switcher-selected strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .finance-workspace .workspace-navigation{flex:1;min-width:0;flex-direction:row;align-items:center;gap:6px;padding:0}
 .finance-workspace .workspace-navigation button{min-height:44px;padding:10px 14px;gap:8px;white-space:nowrap}
 .finance-workspace .workspace-rail>.lp-settings-toggle{margin:0 0 0 auto;padding:10px 12px;min-height:44px;border-radius:8px;flex-shrink:0}
 .finance-workspace .workspace-rail>.lp-settings-toggle:hover,.finance-workspace .workspace-rail>.lp-settings-toggle[aria-expanded=true]{background:#edf2fc;color:var(--accent)}
 .finance-workspace .company-switcher-menu #add-company{display:block;width:100%;text-align:left;min-height:44px;padding:10px;color:var(--accent);font-size:13px}
 .finance-workspace main{width:100%;margin:0 auto}
 .finance-workspace .footer{display:none}
}
@media(min-width:701px) and (max-width:1100px){
 .finance-workspace .workspace-rail{gap:14px;padding:12px 24px}
 .finance-workspace .rail-company-slot{flex-basis:220px}
 .finance-workspace .workspace-navigation button{padding:10px;gap:6px}
 .finance-workspace .workspace-navigation .nav-label-full{display:none}
 .finance-workspace .workspace-navigation .nav-label-compact{display:inline}
 .finance-workspace .workspace-rail>.lp-settings-toggle span{display:none}
}

/* Settings and appearance controls. */
.finance-workspace .lp-settings-toggle svg{flex-shrink:0;width:20px;height:20px}
.finance-workspace .workspace-rail>.lp-settings-toggle{width:44px;height:44px;padding:11px;justify-content:center;border:1px solid var(--line);background:var(--surface);border-radius:12px}
.finance-workspace .workspace-language-menu .lp-settings-label{margin:24px 0 12px;font-size:12px;font-weight:600;color:var(--muted)}
.finance-workspace .workspace-language-menu .languages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.finance-workspace .workspace-language-menu .languages button{width:100%;min-width:0;min-height:42px;padding:8px 6px;border-radius:8px;color:var(--muted);font-size:12px}
.appearance-settings{border-top:1px solid var(--line);margin-top:24px}
.appearance-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.finance-workspace .appearance-options button{display:flex;align-items:center;justify-content:center;gap:9px;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);font:inherit;font-size:13px;min-height:48px}
.finance-workspace .appearance-options button[aria-pressed=true]{background:#edf2fc;border-color:#9eb6ec;color:#315cc5;box-shadow:0 0 0 1px #9eb6ec}
.finance-workspace .appearance-options button:hover{border-color:var(--accent)}
@media(min-width:701px){
 .finance-workspace .company-switcher{background:transparent!important;border:1px solid var(--line)!important;border-radius:12px!important;gap:14px;transition:background 150ms,border-color 150ms,box-shadow 150ms}
 .finance-workspace .company-switcher:hover,.finance-workspace .company-switcher[aria-expanded=true]{background:#f5f7fc!important;border-color:#b9c9e8!important;box-shadow:0 2px 8px #1d293908}
 .finance-workspace .switcher-selected{gap:2px}
 .finance-workspace .switcher-selected small{margin-top:0;font-size:10px;letter-spacing:.02em}
 .finance-workspace .company-switcher>img{transition:transform 150ms}
 .finance-workspace .company-switcher[aria-expanded=true]>img{transform:rotate(180deg)}
 .finance-workspace .company-switcher-menu{inset:auto!important;transform:none!important;width:min(340px,calc(100vw - 24px))!important;max-height:min(420px,calc(100dvh - 120px))!important;padding:8px;border-radius:16px;box-shadow:0 16px 48px #17253626,0 2px 6px #1725360d;background:var(--surface)}
 .finance-workspace .company-switcher-menu::backdrop{background:transparent}
 .finance-workspace .company-switcher-menu .overlay-heading{padding:8px 8px 14px;margin:0;border-bottom:1px solid var(--line)}
 .finance-workspace .company-switcher-menu .overlay-heading h2{font-size:12px;font-weight:500;color:var(--muted)}
 .finance-workspace .company-switcher-menu .overlay-heading button{min-height:28px;padding:4px 8px;font-size:11px;background:transparent}
 .finance-workspace .company-switcher-menu [role=listbox]{display:grid;gap:4px;padding:8px 0}
 .finance-workspace .company-switcher-menu [role=option]{min-height:64px;padding:10px;border-radius:10px}
 .finance-workspace .company-switcher-menu [role=option][aria-selected=true]{background:#edf2fc}
 .finance-workspace .company-option-initial{width:36px;height:36px;border:0;border-radius:10px;background:#e5ecfa;color:#315cc5;font-size:14px}
 .finance-workspace .company-option-text{gap:3px}
 .finance-workspace .company-option-text strong{font-size:13px;font-weight:600}
 .finance-workspace .company-option-text small{font-size:10px;color:var(--muted)}
 .finance-workspace .company-menu-actions{border-top:1px solid var(--line);padding:8px 0 0;display:grid;gap:4px}
 .finance-workspace .company-switcher-menu #add-company{padding:10px;border-radius:8px;font-weight:500}
 .finance-workspace .company-switcher-menu #add-company::before{content:'+';font-size:18px;display:inline-block;width:26px;vertical-align:-1px}
 .finance-workspace .company-switcher-menu #remove-company{background:transparent;color:var(--muted);text-align:left;font-size:11px;min-height:32px}
}

/* Theme colors use the same layout and financial data in either appearance. */
html[data-theme=dark]{color-scheme:dark;background:#10151f}
html[data-theme=light]{color-scheme:light}
html[data-theme=dark] body.finance-workspace{--canvas:#10151f;--surface:#19212e;--ink:#e4eaf4;--muted:#a4b1c5;--line:#2d384b;--accent:#94b5ff;background:var(--canvas);color:var(--ink)}
html[data-theme=dark] .finance-workspace :is(h1,h2,h3,h4,.lp-amount,.hero-number,.value,.company-switcher,.company-option-text strong){color:var(--ink)}
html[data-theme=dark] .finance-workspace :is(main>.surface,.workspace-rail,.workspace-navigation,.anaf-entry,.content-overlay,.choice-overlay,.company-switcher-menu,.workspace-language-menu,.import-dialog,.choice-card){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .finance-workspace :is(.muted,.brief,.lp-caption,.lp-heading-context,.company-option-text small,.switcher-selected small,.lp-settings-label,.details-body,.row,.spv-meta){color:var(--muted)}
html[data-theme=dark] .finance-workspace :is(.row b,.money-line b,.anaf-entry strong,.calculation-section h3,.calculation-notes h3){color:var(--ink)}
html[data-theme=dark] .finance-workspace :is(.quiet-button,.open-panel-button,.choice-picker,.overlay-choice){background:#232f42;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .finance-workspace :is(input,select,textarea,.upload-slot,.import-format-guide){background:#121b29;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .finance-workspace :is(.text-link,.spv-source,.spv-public,.spv-mode){color:var(--accent)}
html[data-theme=dark] .finance-workspace .workspace-navigation button{color:var(--muted)}
html[data-theme=dark] .finance-workspace :is(.workspace-navigation button[aria-current=page],.workspace-navigation button:hover,.company-switcher-menu [role=option][aria-selected=true],.company-switcher-menu [role=option]:hover,.company-option-initial){background:#273b5e;color:#b4ccff}
html[data-theme=dark] .finance-workspace .company-switcher{background:transparent!important;border-color:var(--line)!important;color:var(--ink)}
html[data-theme=dark] .finance-workspace .company-switcher:hover,html[data-theme=dark] .finance-workspace .company-switcher[aria-expanded=true]{background:#232f42!important;border-color:#526a91!important}
html[data-theme=dark] .finance-workspace .lp-settings-toggle{background:var(--surface);color:var(--muted);border-color:var(--line)}
html[data-theme=dark] .finance-workspace :is(.workspace-navigation img,.company-switcher img,.company-switcher-menu img,.text-link img){filter:invert(1);opacity:.8}
html[data-theme=dark] .finance-workspace :is(.settled,.delta.positive){background:#193d35;color:#9ad9b7}
html[data-theme=dark] .finance-workspace .pending{background:#463b22;color:#f1d28d}
html[data-theme=dark] .finance-workspace :is(.blocked,.delta.negative){background:#482c35;color:#f2adb4}
html[data-theme=dark] .finance-workspace .appearance-options button{background:#202c3e;color:var(--muted)}
html[data-theme=dark] .finance-workspace :is(.appearance-options button[aria-pressed=true],.workspace-language-menu .languages button[aria-pressed=true]){background:#2a416a;color:#c2d6ff;border-color:#7498df}
html[data-theme=dark] .finance-workspace .workspace-language-menu .languages button:hover{background:#273b5e;color:var(--ink)}
html[data-theme=dark] .finance-workspace :is(.spv-document-row,.spv-document,.lp-review-empty){background:#202c3e;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .finance-workspace :is(.spv-document-summary>p,.spv-metrics strong,.lp-review-empty strong){color:var(--ink)}
html[data-theme=dark] .finance-workspace .lp-demo-banner{background:#171f2d;border-color:var(--line);color:var(--muted)}
html[data-theme=dark] .finance-workspace :is(.lp-demo-banner strong,.lp-demo-tabs button){color:var(--muted)}
html[data-theme=dark] .finance-workspace .lp-demo-tabs{background:#202c3e}
html[data-theme=dark] .finance-workspace .lp-demo-tabs button[aria-pressed=true]{background:#344562;color:var(--ink);border-color:#445875}
html[data-theme=dark] .finance-workspace .overlay-heading{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .finance-workspace .company-switcher-menu [role=option]{background:transparent;color:var(--ink)}
html[data-theme=dark] .finance-workspace .company-switcher-menu [role=option][aria-selected=true],html[data-theme=dark] .finance-workspace .company-switcher-menu [role=option]:hover{background:#273b5e}
html[data-theme=dark] .finance-workspace .primary-button{background:#426bd2;color:#fff;border-color:#426bd2}
html[data-theme=dark] .finance-workspace .primary-button:hover{background:#527ce3}
html[data-theme=dark] .finance-workspace :is(.revenue-previous>.label,.lp-ledger-row dt,.scan-label,.spv-eyebrow){color:var(--muted)}
html[data-theme=dark] .finance-workspace #revenue .delta{background:#193d35;color:#9ad9b7}
html[data-theme=dark] .finance-workspace .workspace-rail>.lp-settings-toggle:hover,html[data-theme=dark] .finance-workspace .workspace-rail>.lp-settings-toggle[aria-expanded=true]{background:#273b5e;color:#b4ccff}
html[data-theme=dark] .finance-workspace .company-switcher-menu :is(#add-company,#remove-company):hover{background:#273b5e;color:var(--ink)}

/* Supporting figures and the complete ANAF workspace share the dark palette. */
html[data-theme=dark] .finance-workspace #numbers{background:var(--surface);border-color:var(--line)}
html[data-theme=dark] .finance-workspace #numbers :is(h3,dd,.value){color:var(--ink)}
html[data-theme=dark] .finance-workspace #numbers :is(dt,.label,.brief){color:var(--muted)}
html[data-theme=dark] .finance-workspace :is(.anaf-dialog,.spv-dialog,.connect-dialog){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .finance-workspace :is(.anaf-dialog,.spv-dialog,.connect-dialog) :is(p,label,small,.spv-toolbar strong){color:var(--muted)}
html[data-theme=dark] .finance-workspace :is(.anaf-dialog,.spv-dialog,.connect-dialog) :is(h2,h3,h4,.spv-metrics strong,.spv-balance-row strong,.spv-document-row strong){color:var(--ink)}
html[data-theme=dark] .finance-workspace :is(.anaf-muted,.anaf-intro,.anaf-registration,.anaf-registry-date,.anaf-calendar-caption,.anaf-calendar-footer,.anaf-form-code,.anaf-form-option small,.spv-metrics span,.spv-metrics small,.spv-footer,.spv-import,.spv-document-row small,.spv-balance-row small){color:var(--muted)}
html[data-theme=dark] .finance-workspace :is(.anaf-status span,.anaf-empty,.spv-document,.spv-document-row,.connect-status,.spv-demo-banner){background:#202c3e;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .finance-workspace :is(.anaf-company-pane,.anaf-calendar-footer,.anaf-form-option,.anaf-event,.spv-metrics>div,.spv-section,.spv-balance-row,.spv-footer,.spv-source-details){border-color:var(--line)}
html[data-theme=dark] .finance-workspace :is(.anaf-configure,.anaf-about,.anaf-event button,.anaf-dialog a,.spv-document-row>span:last-child){color:var(--accent)}
html[data-theme=dark] .finance-workspace :is(.anaf-status .anaf-alert,.connect-status[data-state=error]){background:#482c35;color:#f2adb4}
html[data-theme=dark] .finance-workspace :is(.anaf-coverage-warning,.spv-feedback,.spv-warning){color:#e4c583}
html[data-theme=dark] .finance-workspace .connect-status[data-state=success]{background:#193d35;color:#9ad9b7}
html[data-theme=dark] .finance-workspace .spv-payment-note{background:#383122;border-color:#c59b48;color:#e4c583}
html[data-theme=dark] .finance-workspace .spv-payment-note p{color:#e4d8b8}

/* Workspace transfer stays available before the first business is added. */
.backup-settings{border-top:1px solid var(--line);margin-top:20px;padding-bottom:8px}.backup-settings>button{width:100%;text-align:left;font-size:13px}.backup-settings>a{display:block;font-size:12px;line-height:1.5;margin-top:16px;color:var(--muted)}
/* Settings owns a fixed header and a separate scrollable content area. */
.finance-workspace #workspace-language-menu{width:min(520px,calc(100vw - 32px))!important;max-width:520px;max-height:min(760px,88dvh)!important;padding:0;overflow:hidden;background:var(--surface);color:var(--ink)}
.finance-workspace #workspace-language-menu[open]{display:flex;flex-direction:column}
.finance-workspace #workspace-language-menu>.overlay-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-shrink:0;margin:0;padding:20px 24px;border-bottom:1px solid var(--line);background:var(--surface)}
.finance-workspace #workspace-language-menu .overlay-heading h2{margin:0;font-size:21px;font-weight:650;color:var(--ink)}
.finance-workspace #workspace-language-menu .settings-close{display:grid;place-items:center;min-width:40px;min-height:40px;width:40px;height:40px;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted)}
.finance-workspace #workspace-language-menu .settings-close:hover{background:var(--canvas);color:var(--ink)}
.settings-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:4px 24px 24px;scrollbar-gutter:stable}
.finance-workspace #workspace-language-menu .settings-body>section{margin:0;padding:22px 0;border:0;border-bottom:1px solid var(--line)}
.finance-workspace #workspace-language-menu .settings-body>section:last-child{border-bottom:0;padding-bottom:0}
.finance-workspace #workspace-language-menu .lp-settings-label{margin:0 0 12px;font-size:12px;font-weight:600;letter-spacing:.02em;color:var(--muted)}
.finance-workspace #workspace-language-menu .backup-settings>button{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;padding:13px 16px;background:var(--canvas);border:1px solid var(--line);border-radius:10px;font-size:14px;font-weight:500;color:var(--ink)}
.finance-workspace #workspace-language-menu .backup-settings>button::after{content:'›';font-size:23px;font-weight:400;line-height:1;color:var(--muted)}
.finance-workspace #workspace-language-menu .backup-settings>button:hover{border-color:var(--accent);color:var(--accent)}
.finance-workspace #workspace-language-menu .languages{padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--canvas)}
.finance-workspace #workspace-language-menu .languages button{text-align:center;min-height:42px;font-size:13px}
.finance-workspace #workspace-language-menu .languages button[aria-pressed=true]{background:var(--surface);color:var(--accent);box-shadow:0 1px 4px #15233916}
@media(max-width:700px){.finance-workspace #workspace-language-menu{width:calc(100vw - 24px)!important;max-height:88dvh!important}.finance-workspace #workspace-language-menu>.overlay-heading{padding:16px 18px}.settings-body{padding:0 18px 22px}.finance-workspace #workspace-language-menu .settings-body>section{padding:20px 0}}
.finance-workspace .backup-dialog{width:min(620px,calc(100vw - 32px));max-height:85dvh;overflow:auto;padding:24px;background:var(--surface);color:var(--ink)}
.backup-dialog p{font-size:14px;line-height:1.6}.backup-dialog .brief{color:var(--muted);font-size:12px}.backup-dialog form,.backup-dialog [data-preview]{border-top:1px solid var(--line);margin-top:24px;padding-top:8px}.backup-dialog h3{font-size:15px;margin:16px 0}.backup-dialog label{display:block;font-size:13px;line-height:1.5;margin:12px 0}.backup-dialog input:not([type=checkbox]){display:block;width:100%;min-height:44px;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);margin-top:6px}.backup-dialog .backup-check{display:flex;gap:10px;align-items:flex-start}.backup-check input{margin-top:3px}.backup-status{white-space:pre-line;overflow-wrap:anywhere}.backup-dialog button{min-height:44px}.backup-dialog [hidden]{display:none!important}

.company-vat-field{display:block;font-size:13px;line-height:1.5;margin:16px 0}.company-vat-field input{display:block;width:100%;padding:12px;border:1px solid var(--line);border-radius:8px;margin-top:6px;background:var(--surface);color:var(--ink)}
