:root[data-theme=blue] {
    color-scheme: light; --ink:#252e36; --muted:#596876; --screen:#eef2f6; --line:#d5dde5;
    --surface:#fafbfc; --surface-alt:#e9eef3; --field:#f3f5f7; --button:#deedf7; --button-text:#305574;
    --highlight:#326d99; --focus:#78a9ce; --shadow:0 2px 8px #2039540a;
}
/* Reference palette: navy navigation, blue actions and pastel summary cards. */
[data-theme=blue] input:focus,[data-theme=blue] select:focus,[data-theme=blue] textarea:focus { box-shadow:0 0 0 3px #78a9ce26; }
[data-theme=blue] input::placeholder,[data-theme=blue] textarea::placeholder { opacity:1; }
[data-theme=blue] .sales-bar,[data-theme=blue] .ranking-track span { background:linear-gradient(180deg,#82c4e8,#559fcf); }
[data-theme=blue] .admin-sidebar,[data-theme=blue] .brand-panel { background:linear-gradient(165deg,#22447f,#1c3971); border-color:#35588a; }
[data-theme=blue] .sidebar-brand,[data-theme=blue] .sidebar-brand:hover,[data-theme=blue] .sidebar-footer strong,[data-theme=blue] .brand-panel h1 { color:#eceef3; }
[data-theme=blue] .sidebar-brand small,[data-theme=blue] .sidebar-heading,[data-theme=blue] .sidebar-footer small { color:#b4c7e3; }
[data-theme=blue] .sidebar-link,[data-theme=blue] .brand-panel p,[data-theme=blue] .sidebar-footer button,[data-theme=blue] .sidebar-close { color:#d1def0; }
[data-theme=blue] .sidebar-link:hover { background:#ffffff13; color:#fff; }
[data-theme=blue] .sidebar-link[aria-current=page] { background:#ffffff29; color:#fff; box-shadow:inset 3px 0 #83c5ee; }
[data-theme=blue] .sidebar-footer,[data-theme=blue] .brand-panel::after { border-color:#ffffff20; }
[data-theme=blue] .user-avatar { background:#ffffff20; color:#e4edfa; }
[data-theme=blue] .btn.danger { background:#eee3e3; border-color:#d7bcbc; color:#874b4b; }
[data-theme=blue] .btn.danger:hover { background:#e9d9d9; border-color:#b98686; color:#723b3b; }
[data-theme=blue] .status-badge.pending,[data-theme=blue] .status-badge.unpaid { background:#e5e7ed; color:#535d75; }
[data-theme=blue] .status-badge.partial { background:#ebe5d7; color:#75602f; }
[data-theme=blue] .status-badge.late { background:#eedfdf; color:#874949; }
[data-theme=blue] .status-badge.credit,[data-theme=blue] .status-badge.paid { background:#dde7e1; color:#456553; }
:root[data-theme=dark] {
    color-scheme: dark; --ink:#e1e9f3; --muted:#a3b2c6; --screen:#101722; --line:#303d51;
    --surface:#1a2433; --surface-alt:#202e41; --field:#131e2c; --button:#283c56; --button-text:#d2e3fa;
    --highlight:#a4c8f5; --focus:#87b3eb; --shadow:0 6px 22px #00000014;
}
body { background:var(--screen); color:var(--ink); }
.workspace-topbar { background:var(--surface); border-color:var(--line); }
.workspace-breadcrumb strong,.workspace-context strong,h1,h2,h3,label,td { color:var(--ink); }
a,.text-link,.eyebrow,.heading-dot,.reminder-create summary { color:var(--highlight); }
a:hover { color:var(--ink); }
.panel,.insight-card,.metric-card,.metric-card.featured,.period-toolbar,.search-group { background:var(--surface); color:var(--ink); border-color:var(--line); box-shadow:var(--shadow); }
.panel .panel,.asset-card,.purchase-line,.reminder-create,.section-tabs { background:var(--surface-alt); border-color:var(--line); }
.quotation-form>.panel { background:var(--surface-alt)!important; }
.metric-top,.metric-foot,.featured .metric-top,.featured .metric-foot,.muted,.field-help,.asset-caption,.ranking-amount,.workspace-context,.workspace-breadcrumb,.customer-cell small { color:var(--muted); }
.metric-icon,.metric-icon.amber,.metric-icon.rose,.featured .metric-icon,.section-number,.customer-avatar,.task-symbol { background:var(--surface-alt); color:var(--highlight); }
.btn,.topbar .btn,.btn.primary,.topbar .btn.primary,.sidebar-collapse { background:var(--surface-alt); color:var(--button-text); border-color:var(--line); }
.btn.primary,.topbar .btn.primary { background:var(--button); border-color:var(--focus); }
.btn:hover,.topbar .btn:hover,.btn.primary:hover,.topbar .btn.primary:hover { background:var(--button); color:var(--ink); border-color:var(--focus); }
input,select,textarea { color:var(--ink); background:var(--field); border-color:var(--line); }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:.85; }
input:focus,select:focus,textarea:focus { border-color:var(--focus); box-shadow:0 0 0 3px #82a8da20; }
input[readonly],.select-filter,.workspace-search input,input[type=file] { background:var(--field); color:var(--ink); }
input[type=file]::file-selector-button { background:var(--button); color:var(--button-text); }
.table-scroll,.table-wrap { background:var(--surface); border-color:var(--line); }
th { background:var(--surface-alt); color:var(--muted); }
td,.card-link,.ranking-row,.task-row,.section-heading,.asset-pending:not([hidden]) { border-color:var(--line); }
tbody tr:hover { background:var(--surface-alt); }
.count-badge,.subtle-badge,.status-badge { background:var(--surface-alt); color:var(--muted); }
.balance-stack strong,.ranking-name strong { color:var(--ink); }
.section-tabs a[aria-current=page],.pagination [aria-current=page] { background:var(--button); color:var(--button-text); border-color:var(--focus); }
.sales-bar,.ranking-track span { background:#7195c3; }
.chart-columns { border-color:var(--line); background:repeating-linear-gradient(to top,transparent 0,transparent 96px,var(--line) 96px,var(--line) 97px); }
.chart-scale,.bar-label,.bar-value { color:var(--muted); }
.period-caption,.chart-data,.task-row time { color:var(--muted); }
.chart-empty-note { background:var(--surface-alt); color:var(--muted); }
.ranking-track,.pipeline-track { background:var(--surface-alt); }
.asset-current { background:#fff; border-color:var(--line); }
.asset-current .asset-caption,.asset-placeholder { color:#64748b; }
.admin-sidebar { background:#172437; color:#b5c3d6; border-right:1px solid #2b3d54; }
.sidebar-brand,.sidebar-brand:hover,.sidebar-footer strong { color:#edf3fc; }
.sidebar-brand small,.sidebar-heading,.sidebar-footer small { color:#9bacc3; }
.sidebar-link { color:#b8c8dc; }
.sidebar-link:hover { background:#23364e; color:#f0f5fc; }
.sidebar-link[aria-current=page] { background:#2b4260; color:#e2efff; box-shadow:inset 3px 0 #8ab5eb; }
.sidebar-footer { border-color:#2b3d54; }
.sidebar-footer button,.sidebar-close { color:#c1d0e4; }
.user-avatar { background:#2c405b; color:#d4e5fb; }
.brand-mark { background:white; border:0; }
.theme-picker { flex:none; width:108px; margin:0; }
.theme-picker .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.theme-picker select { margin:0; min-height:40px; cursor:pointer; background:var(--surface-alt); color:var(--button-text); border-color:var(--line); }
.auth-theme { position:fixed; top:18px; right:20px; z-index:2; }
.auth-theme .theme-picker { width:108px; }
.auth-shell { background:var(--surface); border-color:var(--line); box-shadow:var(--shadow); }
.brand-panel { background:#172437; color:#edf3fc; }
.brand-panel h1 { color:#edf3fc; }
.brand-panel p { color:#b6c6db; }
.brand-panel::after { border-color:#32445d; }
.form-panel h2 { color:var(--ink); }
.lead,.hint,.check { color:var(--muted); }
[data-theme=dark] .status-badge.paid { background:#253d36; color:#b2d5c5; }
[data-theme=dark] .status-badge.partial,[data-theme=dark] .status-badge.pending { background:#3c382c; color:#daceaa; }
[data-theme=dark] .status-badge.credit { background:#29374c; color:#b4c9e8; }
[data-theme=dark] .status-badge.unpaid { background:#2b3646; color:#c1cede; }
[data-theme=dark] .status-badge.late,[data-theme=dark] .btn.danger { background:#402d33; color:#efbdb8; border-color:#67444b; }
[data-theme=dark] .errors { background:#34252e; color:#edc4c4; border-color:#68424e; }
[data-theme=dark] .field-error,[data-theme=dark] .required { color:#efb6b3; }
[data-theme=dark] .empty-state,[data-theme=dark] .empty-state strong { color:var(--muted); }
.toast-stack { position:fixed; top:90px; right:24px; width:min(390px,calc(100vw - 28px)); display:grid; gap:10px; z-index:100; pointer-events:none; }
.toast { display:flex; align-items:flex-start; gap:12px; background:var(--surface); color:var(--ink); padding:16px; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 32px #00000026; pointer-events:auto; margin:0; }
.toast-success { border-left:4px solid #76ad98; }
.toast-error { border-left:4px solid #ce8e87; }
.toast>div { flex:1; min-width:0; }
.toast strong { font-size:13px; }
.toast p { color:var(--muted); margin:4px 0 0; font-size:13px; overflow-wrap:anywhere; }
.toast a { font-size:12px; display:inline-block; margin-top:7px; }
.toast-symbol { font-size:17px; color:var(--highlight); }
.toast-close { border:0; background:transparent; color:var(--muted); font-size:23px; cursor:pointer; padding:0 2px; line-height:1; }
/* Documents keep their paper colors in both screen themes. */
.sheet,.invoice-sheet,.quotation-sheet { color:#17202b; background:white; color-scheme:light; }
.sheet td,.sheet th,.sheet h1,.sheet h2,.sheet h3 { color:#17202b; }
.sheet th { background:#f2f4f6; }
.sheet tbody tr:hover { background:transparent; }
@media(max-width:760px) {
    .theme-picker { width:82px; }
    .theme-picker select { font-size:12px; padding:9px 5px; }
    .workspace-topbar { padding:10px 12px; }
    .topbar-actions { gap:8px; }
    .workspace-search { flex:1; min-width:0; }
    .workspace-search .btn { padding:9px 7px; }
    .wrap,body:has(.admin-sidebar)>.wrap { padding:16px 12px 30px; }
    .panel,.insight-card { padding:16px; }
    .table-wrap:has(>.responsive-list),.table-scroll:has(>.responsive-list) { border:0; background:transparent; overflow:visible; }
    table.responsive-list { display:block; min-width:0; width:100%; }
    .responsive-list thead { display:none; }
    .responsive-list tbody { display:grid; gap:12px; }
    .responsive-list tbody tr { display:grid; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:6px 14px; }
    .responsive-list tbody td { display:block; padding:10px 0; text-align:left; width:auto; min-width:0!important; overflow-wrap:anywhere; white-space:normal; }
    .responsive-list td::before { content:attr(data-label); display:block; text-transform:uppercase; font-size:10px; letter-spacing:.6px; color:var(--muted); margin-bottom:5px; }
    .responsive-list td.empty-cell::before { display:none; }
    .responsive-list td:last-child { display:flex; flex-wrap:wrap; gap:6px; }
    .responsive-list td:last-child::before { flex-basis:100%; }
    .responsive-list td:last-child form { flex:1; min-width:130px; }
    .responsive-list .btn { min-height:38px; margin:0; }
    .toast-stack { top:76px; right:14px; }
    .auth-theme { top:10px; right:10px; }
    .filter-bar>.search-field input { min-width:0!important; }
    .pagination { gap:12px; }
}

/* Shared table controls and action sizing in both themes. */
.btn .nav-icon { width:16px; height:16px; flex-shrink:0; }
.btn.row-action { font-size:12px; color:var(--button-text)!important; white-space:nowrap; }
.followup-filters { display:flex; align-items:flex-end; flex-wrap:wrap; gap:12px; margin:0 0 20px; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-alt); }
.followup-filters label { display:grid; gap:7px; font-size:12px; min-width:0; }
.followup-search { flex:1 1 250px; }
.followup-filters input,.followup-filters select { margin:0; min-height:40px; width:100%; }
.followup-filters .page-size { flex:0 0 82px; }
.followup-filters .btn { min-height:40px; }
#payment-followup { scroll-margin-top:100px; }
.payment-card .subtle-badge { white-space:nowrap; flex:none; }
.customer-cell strong { color:var(--ink); }
.customer-cell:hover strong { color:var(--highlight); text-decoration:underline; }
.empty-state,.empty-state strong,.empty-state p,.insight-card .card-heading p,.overview-heading p,.pagination-summary { color:var(--muted); }
.status-badge { font-size:11px; padding:5px 9px; font-weight:600; }
@media(max-width:760px) {
    .followup-filters { padding:12px; gap:10px; }
    .followup-search { flex-basis:100%; }
    .followup-filters>label:not(.followup-search):not(.page-size) { flex:1; }
    .followup-filters>.btn { flex:1 1 100%; }
    .payment-card .table-scroll { margin:0; }
    .payment-card .customer-cell { min-width:0; align-items:flex-start; }
    .payment-card .customer-cell strong { overflow-wrap:anywhere; }
}

/* Pastel KPI cards follow the supplied dashboard reference. */
[data-theme=blue] .btn.primary,[data-theme=blue] .topbar .btn.primary {
    background:linear-gradient(180deg,#68b0d7,#56a1cd); border-color:#599fc6; color:#12364d;
    box-shadow:0 1px 2px #295b7a12;
}
[data-theme=blue] .btn.primary:hover,[data-theme=blue] .topbar .btn.primary:hover {
    background:#4b96c2; border-color:#3b82ae; color:#102c40;
}
[data-theme=blue] .workspace-topbar { background:#fafbfc; }
[data-theme=blue] .metric-card { min-height:170px; border-radius:12px; padding:20px; box-shadow:0 2px 5px #263c5410; }
[data-theme=blue] .metric-card:nth-child(1) { --metric-ink:#246753; --metric-tint:#b7ebd6; background:linear-gradient(130deg,#ddf8ec,#cef3e4); border-color:#b8dfd0; }
[data-theme=blue] .metric-card:nth-child(2) { --metric-ink:#79631e; --metric-tint:#f4df97; background:linear-gradient(130deg,#fff4d2,#fcecb9); border-color:#e6d7a8; }
[data-theme=blue] .metric-card:nth-child(3) { --metric-ink:#41476e; --metric-tint:#ccd2f2; background:linear-gradient(130deg,#eceefe,#dfe4fc); border-color:#c7cde6; }
[data-theme=blue] .metric-card:nth-child(4) { --metric-ink:#864a4c; --metric-tint:#f3c5c7; background:linear-gradient(130deg,#fdebea,#fbe0e1); border-color:#e9c6c9; }
[data-theme=blue] .metric-card .metric-top,[data-theme=blue] .metric-card .metric-foot,[data-theme=blue] .metric-card .metric-foot a { color:var(--metric-ink); }
[data-theme=blue] .metric-card .metric-icon { color:var(--metric-ink); background:var(--metric-tint); border-radius:8px; }
[data-theme=blue] .metric-card>strong { display:table; max-width:100%; padding:6px 10px; margin:13px 0; border-radius:8px; background:#ffffffc9; color:var(--metric-ink); box-shadow:0 4px 9px #34425016; font-size:26px; line-height:1.35; }
[data-theme=blue] .status-draft { background:#294d87; }
[data-theme=blue] .status-sent { background:#c6a23a; }
[data-theme=blue] .status-accepted { background:#438e72; }
[data-theme=blue] .status-rejected { background:#b06476; }
[data-theme=blue] .status-expired { background:#8b72ad; }
@media(max-width:760px) {
    [data-theme=blue] .metric-card { padding:13px 11px; min-height:155px; }
    [data-theme=blue] .metric-card>strong { font-size:21px; padding:6px 7px; }
}
@media(max-width:360px) {
    [data-theme=blue] .metric-card>strong { font-size:18px; padding:5px; }
}

/* Green is the second light palette; Blue and Dark remain independent. */
:root[data-theme=green] {
    color-scheme:light; --ink:#243b32; --muted:#5d7569; --screen:#edf8f2; --line:#cfded5;
    --surface:#fbfdfb; --surface-alt:#e4f2e9; --field:#f6fbf7; --button:#d3ebdf; --button-text:#285f4c;
    --highlight:#20765b; --focus:#69a88a; --shadow:0 2px 8px #183f290a;
}
[data-theme=green] .admin-sidebar,[data-theme=green] .brand-panel { background:linear-gradient(165deg,#1c382e,#152c24); border-color:#355546; }
[data-theme=green] .sidebar-brand,[data-theme=green] .sidebar-brand:hover,[data-theme=green] .sidebar-footer strong,[data-theme=green] .brand-panel h1 { color:#e8f4ec; }
[data-theme=green] .sidebar-brand small,[data-theme=green] .sidebar-heading,[data-theme=green] .sidebar-footer small { color:#b1ccba; }
[data-theme=green] .sidebar-link,[data-theme=green] .brand-panel p,[data-theme=green] .sidebar-footer button,[data-theme=green] .sidebar-close { color:#c6dfce; }
[data-theme=green] .sidebar-link:hover { background:#ffffff10; color:#fff; }
[data-theme=green] .sidebar-link[aria-current=page] { background:#b6d7bc26; color:#edf9f0; box-shadow:inset 3px 0 #93c5a5; }
[data-theme=green] .sidebar-footer,[data-theme=green] .brand-panel::after { border-color:#ffffff18; }
[data-theme=green] .user-avatar { background:#42634f; color:#e2f2e7; }
[data-theme=green] .workspace-topbar { background:#f0faf4; }
[data-theme=green] .btn.primary,[data-theme=green] .topbar .btn.primary,[data-theme=green] .workspace-search .btn { background:#168574; color:#fff; border-color:#147866; }
[data-theme=green] .btn.primary:hover,[data-theme=green] .topbar .btn.primary:hover,[data-theme=green] .workspace-search .btn:hover { background:#106d5e; color:#fff; border-color:#106452; }
[data-theme=green] input:focus,[data-theme=green] select:focus,[data-theme=green] textarea:focus { box-shadow:0 0 0 3px #69a88a26; }
[data-theme=green] input::placeholder,[data-theme=green] textarea::placeholder { opacity:1; }
[data-theme=green] .metric-card { min-height:170px; padding:20px; border-radius:12px; }
[data-theme=green] .metric-card .metric-icon { color:#2d7859; background:#e1f1e7; }
[data-theme=green] .metric-card:nth-child(3) .metric-icon { color:#59618d; background:#e7e9f5; }
[data-theme=green] .sales-bar,[data-theme=green] .ranking-track span { background:linear-gradient(180deg,#a7d9b6,#64a982); }
[data-theme=green] .status-accepted { background:#639e7c; }
[data-theme=green] .live-dot { background:#6aaa86; }
[data-theme=green] .status-badge.paid,[data-theme=green] .status-badge.credit { background:#deeee3; color:#39684c; }
[data-theme=green] .status-badge.partial,[data-theme=green] .status-badge.pending { background:#f2ecd9; color:#796333; }
[data-theme=green] .status-badge.late,[data-theme=green] .btn.danger { background:#f5e5e3; color:#8b4c47; border-color:#dfc6c1; }
@media(max-width:760px) {
    [data-theme=green] .metric-card { padding:13px 11px; min-height:155px; }
    [data-theme=green] .metric-card>strong { font-size:21px; }
}
@media(max-width:360px) { [data-theme=green] .metric-card>strong { font-size:18px; } }

/* Gentle depth across the three themes, with flat readable form fields. */
:root[data-theme=blue] {
    --page-glow:#b6d9ef45; --panel-glow:#f1f6fc; --card-shadow:0 4px 16px #2549760b;
    --card-shadow-hover:0 6px 20px #25497612; --edge-glow:#ffffffb3;
}
:root[data-theme=green] {
    --page-glow:#b9e8ce45; --panel-glow:#f0f8f3; --card-shadow:0 4px 16px #24573c0b;
    --card-shadow-hover:0 6px 20px #24573c12; --edge-glow:#ffffffb3;
}
:root[data-theme=dark] {
    --page-glow:#34547820; --panel-glow:#1d2a3c; --card-shadow:0 4px 16px #00000018;
    --card-shadow-hover:0 6px 20px #00000026; --edge-glow:#ffffff08;
}
body { background:radial-gradient(ellipse at 85% 0,var(--page-glow),transparent 65%) fixed,var(--screen); }
.panel,.insight-card,.search-group,.period-toolbar { box-shadow:inset 0 1px var(--edge-glow),var(--card-shadow); }
.workspace-topbar { box-shadow:0 1px 8px #102b4610; }
.metric-card { position:relative; box-shadow:inset 0 1px var(--edge-glow),var(--card-shadow); }
.metric-icon { border:1px solid #ffffff18; }
.sales-bar { box-shadow:inset 0 1px #ffffff30; }
.btn,.metric-card,.sidebar-link { transition:background-color .16s,border-color .16s,box-shadow .16s; }
.btn:focus-visible,.theme-picker select:focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
[data-theme=blue] .workspace-topbar { background:linear-gradient(110deg,#fafbfc,#f0f6fb); }
[data-theme=blue] .sidebar-link[aria-current=page] { background:linear-gradient(100deg,#ffffff32,#ffffff16); }
[data-theme=blue] .metric-card { box-shadow:inset 0 1px #ffffff90,var(--card-shadow); }
[data-theme=blue] .btn.primary,[data-theme=blue] .topbar .btn.primary { background:linear-gradient(135deg,#79bce0,#5ba7d3); border-color:#66a4c8; box-shadow:inset 0 1px #ffffff38,0 2px 5px #32668a16; }
[data-theme=green] .workspace-topbar { background:linear-gradient(110deg,#f5fbf7,#e9f6ef); }
[data-theme=green] .sidebar-link[aria-current=page] { background:linear-gradient(100deg,#b6d7bc32,#b6d7bc16); }
[data-theme=green] .metric-card { background:linear-gradient(140deg,#fbfdfb 45%,#eaf6ee); box-shadow:inset 0 1px #ffffffb3,var(--card-shadow); }
[data-theme=green] .metric-card:nth-child(3) { background:linear-gradient(140deg,#fbfdfb 45%,#eef1f8); }
[data-theme=green] .btn.primary,[data-theme=green] .topbar .btn.primary,[data-theme=green] .workspace-search .btn { background:linear-gradient(135deg,#168574,#0f7666); box-shadow:inset 0 1px #ffffff24,0 2px 5px #14684c16; }
[data-theme=dark] .workspace-topbar { background:linear-gradient(110deg,#1a2433,#1d2a3a); }
[data-theme=dark] .admin-sidebar,[data-theme=dark] .brand-panel { background:linear-gradient(165deg,#1a2b40,#131f30); }
[data-theme=dark] .metric-card { background:linear-gradient(135deg,#202e41,#1a2433); border-color:#354359; }
[data-theme=dark] .sidebar-link[aria-current=page] { background:linear-gradient(100deg,#2d4665,#243952); }
[data-theme=dark] .btn.primary,[data-theme=dark] .topbar .btn.primary { background:linear-gradient(135deg,#314965,#263b54); box-shadow:inset 0 1px #ffffff0d; }
.followup-filters { background:linear-gradient(135deg,var(--surface-alt),var(--panel-glow)); }
@media(hover:hover) {
    .metric-card:hover { box-shadow:inset 0 1px var(--edge-glow),var(--card-shadow-hover); }
    [data-theme=blue] .btn.primary:hover,[data-theme=blue] .topbar .btn.primary:hover { background:linear-gradient(135deg,#67afd8,#4c98c5); }
    [data-theme=green] .btn.primary:hover,[data-theme=green] .topbar .btn.primary:hover,[data-theme=green] .workspace-search .btn:hover { background:linear-gradient(135deg,#117462,#0c6254); }
    [data-theme=dark] .btn.primary:hover,[data-theme=dark] .topbar .btn.primary:hover { background:linear-gradient(135deg,#3b5574,#2b4360); }
}
@media(prefers-reduced-motion:reduce) {
    .btn,.metric-card,.sidebar-link { transition:none; }
}

/* Shared type scale for the login, forms and workspace. */
body { font-family:ui-sans-serif,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; font-size:14px; line-height:1.55; }
button,input,select,textarea { font-family:inherit; }
h1,h2,h3 { line-height:1.3; }
.page-heading h1,.overview-heading h1 { font-weight:650; letter-spacing:-.5px; }
.card-heading h2,.panel h2 { font-weight:650; }
.sidebar-brand small { font-size:10px; letter-spacing:1.2px; }
.sidebar-heading { font-size:11px; letter-spacing:1px; }
.metric-foot { font-size:11px; line-height:1.55; }
.field-help,.asset-caption,.task-row small,.customer-cell small { font-size:12px; line-height:1.5; }
.customer-cell strong { font-weight:600; }
.table-scroll th,.table-wrap th { font-size:12px; letter-spacing:.35px; }
.metric-card>strong,.balance-stack,.right,.ranking-amount { font-variant-numeric:tabular-nums; }
input::placeholder,textarea::placeholder { opacity:1; }
.theme-picker select { font-family:inherit; font-size:13px; font-weight:500; }
.auth-shell .lead { font-size:15px; }
.auth-shell label { font-size:14px; font-weight:600; }
.auth-shell .hint { font-size:13px; line-height:1.5; }
.gst-lookup { grid-column:1 / -1; border:1px solid var(--line); border-radius:12px; padding:16px; min-width:0; }
.gst-lookup p { margin:0; }
.gst-lookup [data-gst-preview] { display:grid; gap:14px; }
.gst-lookup [data-gst-preview][hidden] { display:none; }
.gst-lookup dl { display:grid; grid-template-columns:minmax(85px, 140px) minmax(0, 1fr); gap:8px 16px; margin:0; }
.gst-lookup dt { color:var(--muted); }
.gst-lookup dd { margin:0; overflow-wrap:anywhere; }
.gst-lookup .gst-replace { display:flex; align-items:center; gap:10px; font-weight:400; }
.gst-lookup .gst-replace input { width:18px; min-height:18px; height:18px; flex:none; }
.gst-lookup .btn { justify-self:start; }
.setup-grid h2 { font-size:17px; margin:0; }
.setup-grid .actions { justify-content:space-between; }
.setup-grid p { margin:0; line-height:1.6; }
.sidebar-brand .brand-name { min-width:0; overflow-wrap:anywhere; font-size:15px; }
.brand-initial { display:grid; place-items:center; color:var(--button-text); font-size:22px; }
.sidebar-mini .sidebar-brand>.brand-initial { display:grid; }
.auth-brand-initial { display:grid; place-items:center; width:160px; height:160px; margin:0 auto 24px; border-radius:24px; background:var(--surface); color:var(--ink); font-size:64px; }
.statement-summary strong { font-size:23px; font-variant-numeric:tabular-nums; }
.statement-summary .panel { box-shadow:none; padding:18px; }
.statement-summary p { margin-bottom:8px; color:var(--muted); }
.statement-filters { display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
.statement-filters label:first-child { flex:1 1 240px; }
.customer-link-panel { padding:18px; border:1px solid var(--line); border-radius:12px; }
.workspace-dialog { width:min(720px,calc(100% - 24px)); max-height:calc(100dvh - 40px); padding:0; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); box-shadow:0 24px 80px #0005; }
.workspace-dialog[open] { display:flex; flex-direction:column; }
.workspace-dialog::backdrop { background:#10192599; backdrop-filter:blur(3px); }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; border-bottom:1px solid var(--line); flex:none; }
.dialog-heading h2 { margin:0; font-size:20px; }
.dialog-body { padding:22px; overflow:auto; overscroll-behavior:contain; }
.workspace-dialog .grid.two,.workspace-dialog .grid.three { grid-template-columns:repeat(2,minmax(0,1fr)); }
.dialog-errors { grid-column:1/-1; border:1px solid #b96666; border-radius:8px; padding:12px; }
.dialog-errors[hidden] { display:none; }
.dialog-errors p { margin:0 0 6px; }
.workspace-dialog [aria-invalid=true] { border-color:#b96666; }
body:has(.workspace-dialog[open]) { overflow:hidden; }
@media(max-width:560px) {
    .workspace-dialog { max-height:calc(100dvh - 20px); }
    .dialog-heading,.dialog-body { padding:16px; }
    .workspace-dialog .grid.two,.workspace-dialog .grid.three { grid-template-columns:minmax(0,1fr); }
}
.auth-shell .btn { font-weight:600; }
[data-theme=green] { --muted:#536b5f; }
@media(max-width:760px) {
    .theme-picker select { font-size:12px; }
    .metric-foot { font-size:11px; }
    .auth-shell .form-panel { padding:28px 20px; }
}
