/* Shared dark theme. All financial values keep their full precision. */
:root {
  color-scheme: dark;
  --bg:#17181d; --nav:#111216; --surface:#202127; --surface-raised:#292a33;
  --surface-subtle:#1b1c22; --hover:#2c2c38; --ink:#f3f2f7; --text:#f3f2f7;
  --muted:#b2b2c0; --subtle:#9595a6; --line:#35353f; --border:var(--theme-border,#41414e);
  --accent:#baa6f8; --blue:#baa6f8; --focus:#cbbaff; --accent-bg:#343044;
  --good:#88dabb; --good-bg:#243a33; --bad:#ffa8b3; --bad-bg:#432b33;
  --warning:#efc58b; --warning-bg:#3b3225; --info:#a8caff; --info-bg:#29364b;
  --radius:14px; --shadow:0 8px 28px #08090c24;
  /* Time comparisons: current accent, then progressively darker blue/violet
     shades. Older periods remain readable against the chart surface. */
  --chart-current:#d2f78c; --chart-yesterday:#b7ddff; --chart-week:#86b8f2;
  --chart-two-weeks:#6e96d5; --chart-month:#7080bd; --chart-year:#7a6e9e;
}
body {
  background:var(--bg); color:var(--ink); font:15px/1.55 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea,.boot-screen,svg text {font-family:inherit}
h1,h2,h3 {color:var(--ink)}
small,.muted {color:var(--muted)}
::selection {background:var(--theme-accent-bg,#635083);color:var(--theme-ink,#fff)}
* {scrollbar-color:#50505e transparent;scrollbar-width:thin}

/* Navigation and page hierarchy */
.app-shell {grid-template-columns:240px minmax(0,1fr)}
.sidebar {background:var(--nav);padding:28px 14px 18px;color:var(--muted);border-right:1px solid var(--theme-border,#2a2a33);overflow-y:auto;overscroll-behavior:contain}
.brand {padding:0 12px;margin-bottom:28px;gap:11px;font-size:28px;letter-spacing:-1px;color:var(--ink)}
.brand img {width:32px;height:32px}
.nav-label {font-size:11px;letter-spacing:1.6px;color:var(--subtle);padding:0 14px;margin:22px 0 9px;font-weight:500}
.nav-item {position:relative;padding:11px 13px;min-height:44px;border-radius:10px;font-size:15px;line-height:1.4;color:var(--theme-muted,#b8b7c4);gap:12px;margin:3px 0}
.nav-item:hover {background:var(--theme-surface,#22222b);color:var(--theme-ink,#fff)}
.nav-item.active {background:var(--accent-bg);color:var(--theme-accent,#f0e8ff)}
.nav-item.active:before {content:none}
.nav-item svg {color:var(--theme-muted,#9897aa);width:19px;height:19px;flex-shrink:0;opacity:1}
.nav-item.active svg {color:var(--theme-accent,#cfb8ff)}
.nav-item .counter {background:var(--theme-surface-raised,#444050);color:var(--theme-accent,#e2d3ff);border:0;border-radius:7px;font-size:12px;min-width:23px;text-align:center;padding:1px 6px}
.nav-bottom {padding:18px 6px 0;border-color:var(--theme-border,#2d2d36);margin-top:auto}
.nav-bottom .workspace-toggle {display:flex;align-items:center;justify-content:space-between;width:100%;background:var(--theme-surface,#22222a);color:var(--theme-muted,#d3d1df);border:1px solid var(--theme-border,#3a3946);border-radius:9px;padding:10px 12px;font-size:13px;margin-bottom:8px}
.nav-bottom .workspace-toggle:hover {background:var(--hover)}
.nav-bottom .workspace-toggle.demo {background:var(--warning-bg);color:var(--warning)}
.local-label {font-size:12px;color:var(--subtle);line-height:1.5;padding:8px 6px}
.main-content {padding:30px 32px 44px;max-width:1920px;margin:0 auto}
.page-heading {align-items:flex-start;margin-bottom:24px;gap:16px}
.page-heading h1 {font-size:32px;line-height:1.3;letter-spacing:-.8px;font-weight:600;color:var(--ink)}
.page-heading p {font-size:15px;line-height:1.6;color:var(--muted);margin-top:8px;max-width:850px}
.heading-actions {gap:9px;align-items:flex-start;flex-shrink:0}
.preview-notice {font-size:13px;line-height:1.6;padding:9px 13px;margin-bottom:20px;border:1px solid var(--theme-warning-border,#5c4c34);border-radius:9px;background:var(--theme-surface-raised,#302b23);color:var(--warning)}
.demo-banner {background:var(--warning-bg);border-color:var(--theme-warning-border,#5c4c34);color:var(--warning)}
.mobile-title-menu {display:none}

/* Actions and fields use the same visual language on every page. */
.button {min-height:42px;border-radius:9px;border:1px solid var(--border);background:var(--surface-raised);color:var(--ink);padding:9px 14px;font-size:14px;font-weight:550;line-height:1.4;box-shadow:none;transition:background-color .15s,border-color .15s,color .15s}
.button:hover {background:var(--theme-surface-raised,#353541);border-color:var(--theme-border,#696675);box-shadow:none}
.button.primary {background:var(--accent);border-color:var(--accent);color:var(--theme-on-accent,#241a39)}
.button.primary:hover {background:var(--theme-accent-bg,#c9b6ff);border-color:var(--theme-accent-border,#c9b6ff)}
.button.soft {background:var(--accent-bg);border-color:var(--theme-border,#504462);color:var(--theme-accent,#dfceff)}
.button.small {min-height:34px;font-size:13px;padding:7px 11px}
.button.ghost,.button.link {border-color:transparent;background:transparent;color:var(--theme-accent,#cbbaff)}
.button.ghost:hover,.button.link:hover {background:var(--theme-accent-bg,#baa6f810);color:var(--theme-accent,#dfd1ff)}
.button.danger {color:var(--bad);border-color:var(--theme-bad-border,#71434e);background:var(--theme-bad-bg,#402a3266)}
.button:disabled {background:var(--theme-surface-raised,#2b2b34);border-color:var(--theme-border,#3b3a46);color:var(--theme-muted,#92909f);opacity:1;box-shadow:none}
.button svg {vertical-align:middle}
.icon-button {border-radius:8px;color:var(--muted)}
.icon-button:hover {background:var(--hover);color:var(--ink)}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {outline:2px solid var(--focus);outline-offset:3px}
input:focus,select:focus,textarea:focus {outline:2px solid var(--focus);outline-offset:1px}
input[type=checkbox],input[type=radio],.comparison-item input,.duplicate-option input[type=radio],.duplicate-repeat input {accent-color:var(--accent)}
input::placeholder,textarea::placeholder {color:var(--subtle);opacity:1}
#app select,#modal select {appearance:none;-webkit-appearance:none;background:var(--surface-subtle) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23b6b2c7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center/12px no-repeat;min-height:40px;font:inherit;font-size:14px;color:var(--ink);border:1px solid var(--border);border-radius:8px;padding:7px 32px 7px 12px;line-height:1.5}
#app select:hover,#modal select:hover {border-color:var(--theme-border,#706879)}
#app option,#modal option {color:var(--ink);background:var(--surface-raised)}
.field label {font-size:14px;font-weight:500;color:var(--theme-muted,#d3d0dd)}
.field input,.field textarea,.search-field,.filter-set input,.search-actions input,.monitor-popover input,.catalog-search,.cabinet-picker-search,.product-period input,.tax-period input,.tax-vat-row input {min-height:42px;border-radius:8px;border:1px solid var(--border);background:var(--surface-subtle);color:var(--ink);padding:9px 12px;font:inherit;font-size:15px}
.field small,.fineprint,.settings-note {color:var(--muted);line-height:1.65;font-size:14px}
.field textarea {min-height:90px}
.panel-header input[data-search],.data-table input[type=number] {min-height:40px;border:1px solid var(--border);border-radius:8px;background:var(--surface-subtle);color:var(--ink);padding:8px 12px;font:inherit;font-size:14px}
.data-table input[type=number] {width:130px;max-width:100%}
.form-grid {gap:20px 16px}
.form-actions {border-color:var(--line);padding-top:18px;margin-top:24px}
.form-error {background:var(--bad-bg);border:1px solid var(--theme-bad-border,#70434d);border-radius:9px;color:var(--theme-bad,#ffc5cc);font-size:14px;padding:12px 14px}
.checkbox {color:var(--muted);font-size:14px}
.secret-label {color:var(--good)}

/* Cards: clear values, restrained accents, no decorative metrics. */
.panel,.connection-card,.kpi,.guide,.inline-kpis>div,.step {background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel-header {padding:22px 24px 12px;border-color:var(--line);align-items:center}
.panel-header h2 {font-size:20px;font-weight:550;color:var(--ink);letter-spacing:-.3px}
.panel-header p,.panel-footer {color:var(--muted);font-size:13px;line-height:1.6}
.panel-header p {margin-top:5px}
.panel-body {padding:16px 24px 24px}
.panel-footer {padding:14px 24px;border-color:var(--line);flex-wrap:wrap}
.panel-footer a {color:var(--accent)}
.panel-footer:empty,.page-heading p:empty {display:none}
.kpi-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}
.kpi-grid:has(>.kpi-money:first-child):not(:has(>.kpi-money~.kpi-money)) {grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr))}
.kpi {container-type:inline-size;min-width:0;padding:20px;min-height:158px;color:var(--ink)}
.kpi.focus {background:linear-gradient(125deg,var(--theme-accent-bg,#342d46),var(--theme-surface-raised,#28252f));color:var(--ink);border:1px solid var(--theme-border,#554664)}
.kpi-label,.kpi.focus .kpi-label {color:var(--theme-muted,#d1cddc);font-size:14px;font-weight:500;line-height:1.45;min-height:40px}
.kpi-icon {width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:var(--theme-surface-raised,#353043);color:var(--theme-accent,#cdb5ff);flex-shrink:0}
.kpi-icon svg {width:17px;height:17px;display:block;color:inherit}
.kpi-box .kpi-icon {background:var(--theme-info-bg,#29394b);color:var(--theme-info,#9dc4f5)}
.kpi-alert .kpi-icon {background:var(--theme-surface-raised,#453532);color:var(--theme-warning,#efbaa2)}
.kpi-check .kpi-icon {background:var(--theme-good-bg,#283e36);color:var(--theme-good,#95dabe)}
.kpi.focus .kpi-icon {background:var(--theme-accent-bg,#4b3d60);color:var(--theme-accent,#e0cfff)}
.kpi-value {font-size:32px;font-weight:600;letter-spacing:-1px;line-height:1.25;margin:16px 0 12px;color:var(--ink);font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:normal}
.kpi-money .kpi-value {font-size:clamp(24px,10cqi,34px);letter-spacing:-1px}
.kpi.focus .kpi-value {color:var(--theme-ink,#f8f1ff)}
.kpi-value .unit {font-size:16px;color:var(--muted);font-weight:400;margin-left:3px}
.kpi-foot,.kpi.focus .kpi-foot {display:block;margin-top:12px;min-height:20px;font-size:13px;color:var(--muted);line-height:1.5}
.kpi.focus .kpi-foot {color:var(--theme-accent,#c6bed4)}
.positive,.kpi.focus .positive {color:var(--good)}
.negative,.kpi.focus .negative,.data-table td.negative {color:var(--bad)}
.delta,.focus .delta {color:var(--good);background:var(--good-bg);border-radius:5px}
.delta.negative {color:var(--bad);background:var(--bad-bg)}
.inline-kpis {grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.inline-kpis span {font-size:14px;color:var(--muted)}
.inline-kpis strong {font-size:24px;color:var(--ink);line-height:1.4;white-space:nowrap;font-variant-numeric:tabular-nums}

/* Data tables */
.table-wrap {max-width:100%;overflow:auto;border-radius:10px;border-color:var(--line)}
.data-table {font-size:14px;font-variant-numeric:tabular-nums}
.data-table th {height:46px;padding:12px 16px;color:var(--theme-muted,#c2bdcf);background:var(--theme-surface-raised,#272730);border-bottom:1px solid var(--theme-border,#40404a);font-size:13px;font-weight:500;line-height:1.4}
.data-table td {padding:14px 16px;border-bottom:1px solid var(--theme-border,#33333e);color:var(--theme-ink,#eeebf5);line-height:1.5}
.data-table th:first-child,.data-table td:first-child {text-align:left}
.data-table th button,.data-table th a {font:inherit;color:inherit;text-align:inherit}
.data-table .number {white-space:nowrap}
.data-table tbody tr:hover,.data-table tbody tr:hover td {background:var(--theme-surface-raised,#2a2934)}
.data-table td small,.data-table .dim td {font-size:13px;color:var(--muted)}
.data-table .sticky {background:var(--surface)}
.data-table th.sticky {background:var(--theme-surface-raised,#272730)}
.data-table tr.highlight td,.data-table tr.total td,.data-table tfoot td {background:var(--theme-surface-raised,#302a3d);color:var(--theme-accent,#f4ecff);border-color:var(--theme-border,#53435f);font-weight:600}
.product-economics-table tr.total {background:var(--theme-surface-raised,#302a3d);color:var(--theme-accent,#f4ecff)}
.product-name,.product-name>span,.product-cell {text-align:left}
.product-name {font-size:14px;font-weight:600;line-height:1.5;min-width:230px;max-width:330px;color:var(--ink)}
.product-name>span {min-width:0;overflow-wrap:anywhere}
.product-name strong {font-size:14px;line-height:1.5;font-weight:550}
.product-name small {font-size:13px;color:var(--muted);font-weight:400}
.product-thumb,.product-icon {width:32px;height:32px;border-radius:9px;background:var(--theme-surface-raised,#2e2d3a);color:var(--theme-accent,#b9accf);flex-shrink:0}
.product-name:hover strong,.product-economics-link:hover {color:var(--theme-accent,#d9c6ff)}
.product-economics-link {border-color:var(--theme-border,#8a779d)}
.sparkline polyline {stroke:var(--chart-current);stroke-linecap:round;stroke-linejoin:round;stroke-width:2}
.sparkline circle {fill:var(--chart-current)}
.margin-spark .sparkline polyline {stroke:var(--chart-week)}
.margin-spark .sparkline circle {fill:var(--chart-week)}
.file-name {font-size:14px;color:var(--ink);line-height:1.5}
.empty-row {color:var(--muted)}
.mp-icon {border-radius:8px}

/* Filters, segmented controls and tabs */
.segmented {background:var(--theme-surface,#202027);border:1px solid var(--theme-border,#3b3946);padding:4px;border-radius:10px;gap:3px}
.segmented>button,.segmented .button {font:inherit;font-size:14px;line-height:1.5;padding:8px 12px;min-height:36px;color:var(--muted);background:transparent;border:0;border-radius:7px}
.segmented>button:hover {color:var(--ink);background:var(--theme-surface-raised,#303039)}
.segmented>button.active,.segmented .button.active {background:var(--theme-surface-raised,#494052);color:var(--theme-accent,#f1e5ff);font-weight:550;box-shadow:none}
.tabs {gap:6px;margin-bottom:24px;border-color:var(--line)}
.tabs button {padding:12px 17px;border-bottom:2px solid transparent;font-size:15px;color:var(--muted);border-radius:7px 7px 0 0}
.tabs button:hover {background:var(--theme-surface-raised,#25252e);color:var(--ink)}
.tabs button.active {border-color:var(--accent);color:var(--theme-accent,#e0ceff);font-weight:550}
.monitor-tools,.report-filters,.monitor-filters {background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:20px;gap:9px}
.monitor-tools summary {background:var(--surface-subtle);border-radius:8px;border-color:var(--border);height:40px;font-size:14px;color:var(--ink);transition:background .15s}
.monitor-tools summary:hover {background:var(--theme-surface-raised,#302d39)}
.monitor-tools details[open]>summary {border-color:var(--theme-accent-border,#927bad);background:var(--accent-bg);color:var(--theme-accent,#edddff)}
.monitor-scale {border:1px solid var(--theme-border,#383641);border-radius:9px;background:var(--surface-subtle);height:40px;padding:3px;gap:2px}
.monitor-scale button {height:32px;border-radius:6px;color:var(--muted);font-size:13px;font-weight:500}
.monitor-scale button:hover {background:var(--theme-surface-raised,#303039);color:var(--ink)}
.monitor-scale button.active {background:var(--theme-accent-bg,#4a3b60);color:var(--theme-accent,#edddff);box-shadow:none}
.monitor-tools select,.report-tools select,.hourly-controls select {font-size:14px}
.monitor-popover,.refresh-popover,.cabinet-picker-popover {background:var(--theme-surface-raised,#292830);color:var(--ink);border-radius:12px;border-color:var(--theme-border,#595163);box-shadow:0 14px 48px var(--theme-shadow-color,#0008)}
.monitor-popover {padding:18px}
.monitor-popover label,.monitor-popover p,.monitor-search,.monitor-field-label,.online-search label {font-size:14px;color:var(--theme-muted,#c9c4d5)}
.monitor-presets .button {min-height:34px;font-size:13px}
.calendar-symbol,.picker-chevron {color:var(--theme-muted,#b9b0c8)}
.filter-count {background:var(--theme-accent-bg,#58406e);color:var(--theme-accent,#efdaff);font-size:12px}
.monitor-active-filters {font-size:13px;color:var(--muted)}
.monitor-active-filters>span {background:var(--theme-surface-raised,#36303f);color:var(--theme-accent,#e0d0f2);border:1px solid var(--theme-border,#4d405c);border-radius:6px}
.monitor-source-note,.monitor-dataset small {font-size:13px;color:var(--muted)}
.range-separator {color:var(--muted)}
.refresh-split>.button {border-radius:9px 0 0 9px}
.refresh-menu>summary {background:var(--accent);color:var(--theme-accent,#241a39);border-color:var(--theme-accent-border,#9a82d2);border-radius:0 9px 9px 0;min-height:42px}
.refresh-menu>summary:hover,.refresh-menu[open]>summary {background:var(--theme-accent-bg,#c9b6ff)}
.refresh-control>[data-refresh-status],.refresh-popover p,.refresh-save-state {font-size:13px!important;color:var(--muted);white-space:normal;text-align:right}
.refresh-popover p {text-align:left}
.refresh-save-state {color:var(--good);text-align:left}
.refresh-running {color:var(--theme-accent,#d1b7ff)!important}
.refresh-running:before {border-color:var(--theme-border,#625473);border-top-color:var(--theme-accent-border,#ceb3fb)}

/* Charts and inspection */
.chart-viewport {max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.chart {height:auto;max-height:360px;min-height:260px}
.chart text,.hourly-chart text {fill:var(--theme-muted,#b9b5c7);font-size:14px}
.chart-grid {stroke:var(--theme-grid,#44414e);stroke-dasharray:3 6;stroke-opacity:.7}
.chart-bar {fill:var(--theme-accent,#655083)}
.chart-bar.last {fill:var(--theme-accent,#bc9cfa)}
.chart-line {stroke:var(--chart-week);stroke-width:2.8}
.legend {color:var(--muted);font-size:14px}
.legend i {background:var(--chart-current)}
.legend .profit {background:var(--chart-week)}
.legend .cost {background:var(--theme-surface-raised,#9a8dab)}
.chart-empty {color:var(--muted);font-size:14px;background:repeating-linear-gradient(0deg,transparent,transparent 54px,var(--theme-neutral-tint,#ffffff06) 55px,transparent 56px);border-radius:10px;padding:22px;text-align:center;line-height:1.7}
.chart-future {fill:var(--theme-ink,#ffffff03)}
.chart-cutoff {stroke:var(--theme-grid,#877499);stroke-dasharray:4 5}
.hour-target:hover,.hour-target:focus,.hour-target.active {fill:var(--accent);fill-opacity:.08;stroke:var(--accent);stroke-opacity:.28;stroke-width:1;outline:none}
.comparison-legend {gap:12px 24px;margin-bottom:20px}
.comparison-item {font-size:14px;font-weight:500;color:var(--theme-ink,#e0dce9);gap:7px;padding:3px 0}
.comparison-item small {font-size:12px;color:var(--muted);margin-top:3px}
.comparison-item:has(input:not(:checked)) {color:var(--theme-muted,#a4a0af)}
.hourly-chart .chart-grid{stroke:var(--theme-grid,#757685);stroke-dasharray:2 6;stroke-opacity:.25}
.hourly-chart text{font-size:13px;fill:var(--theme-muted,#c4c4d0)}
.hourly-chart .chart-cutoff{stroke:var(--chart-current);stroke-opacity:.35;stroke-dasharray:3 6}
.hourly-chart .chart-future{fill:transparent}
.comparison-legend{gap:8px;margin-bottom:22px}
.comparison-item{position:relative;padding:9px 13px;gap:10px;border:1px solid var(--line);border-radius:9px;user-select:none}
.comparison-item.is-current{background:var(--theme-good-bg,#d2f78c0a);border-color:var(--theme-good-border,#d2f78c55);color:var(--chart-current);cursor:default}
.comparison-item.is-current .comparison-swatch{border-top-width:4px}
.comparison-item .comparison-swatch{width:25px;height:0;border-radius:0;background:none;border-top:3px solid var(--series-color)}
.comparison-item input{position:absolute;opacity:0;width:1px;height:1px}
.comparison-item:has(input:focus-visible){outline:2px solid var(--focus);outline-offset:3px}
.comparison-item:has(input:not(:checked)){opacity:.45;background:transparent}
.comparison-item:has(input:not(:checked)) .comparison-swatch{border-color:var(--muted)}
.comparison-item:has(input):hover{background:var(--hover);border-color:var(--series-color)}
.hour-inspector-row.is-current>b,.hour-inspector-row.is-current>span{color:var(--chart-current)}
.hour-inspector,.hour-floating {border-radius:11px;border-color:var(--theme-border,#45404f);background:var(--theme-surface-raised,#26242e)}
.hour-inspector {margin-top:18px}
.hour-inspector-head {color:var(--muted);background:var(--theme-surface-raised,#2d2836);border-color:var(--theme-border,#48404f);padding:11px 16px;font-size:13px}
.hour-inspector-head strong {color:var(--theme-accent,#ebe0f8);font-size:14px}
.hour-inspector-rows {grid-template-columns:repeat(auto-fit,minmax(160px,1fr));padding:16px;gap:18px}
.hour-inspector-row {font-size:14px;color:var(--theme-accent,#ded6e8)}
.hour-inspector-row>span,.hour-inspector-row strong {color:var(--theme-accent,#ded6e8)}
.hour-inspector-row small {font-size:12px;color:var(--muted)}
.hour-inspector-row>b,.hour-floating .hour-inspector-row>b {font-size:15px;color:var(--theme-ink,#f3edf9);line-height:1.5;font-variant-numeric:tabular-nums}
.hour-floating {width:430px;max-width:calc(100% - 24px);box-shadow:0 14px 40px var(--theme-shadow-color,#0009);background:var(--theme-surface-raised,#302a39);border-color:var(--theme-border,#655071)}
.hour-floating .hour-inspector-head {background:none}
.hour-floating .hour-inspector-row {grid-template-columns:8px minmax(0,1fr) auto}
.hourly-tooltip {background:var(--theme-surface-raised,#2c2635);color:var(--theme-accent,#d6c6e9);font-size:14px;border:1px solid var(--theme-border,#4a3f55);border-radius:9px}
.donut:after {background:var(--surface)}
.cost-list,.cost-row,.meta-strip,.insight p {font-size:14px;color:var(--muted)}
.cost-row b {color:var(--ink)}

/* Meaningful statuses and explanatory details */
.badge,.coverage-badge {border-radius:6px;font-size:12px;font-weight:500;padding:4px 8px;line-height:1.5}
.badge.green,.coverage-badge.full {background:var(--good-bg);color:var(--good)}
.badge.orange,.coverage-badge.partial {background:var(--warning-bg);color:var(--warning)}
.badge.red,.coverage-badge.missing {background:var(--bad-bg);color:var(--bad)}
.badge.blue {background:var(--info-bg);color:var(--info)}
.badge.gray {background:var(--theme-surface-raised,#34333f);color:var(--theme-muted,#c1bdcf)}
.banner,.preview-notice,.finance-gap-note,.coverage-notice {box-shadow:none;font-size:14px;line-height:1.65;border-radius:10px}
.banner,.banner.warning,.finance-gap-note,.coverage-notice {background:var(--warning-bg);color:var(--warning);border-color:var(--theme-warning-border,#665039)}
.banner.info {background:var(--info-bg);color:var(--theme-info,#bfd6ff);border-color:var(--theme-info-border,#455874)}
.finance-gap-note {padding:12px 16px}
.coverage-notice {border-left:3px solid var(--theme-warning-border,#ccaa7c)}
.details summary {font-size:14px;color:var(--theme-accent,#ccb3ee)}
.help-details {font-size:14px;line-height:1.65;color:var(--muted)}
.help-details summary {font-size:14px;font-weight:500;color:var(--theme-accent,#ccb3ee);cursor:pointer}
.help-details p {margin:10px 0 0;max-width:100ch}
.help-details summary:hover {color:var(--theme-accent,#eddbff)}
.coverage-platforms {border-color:var(--line)}
.coverage-platform {background:var(--theme-surface-raised,#292730);color:var(--theme-ink,#ddd8e7);border:1px solid var(--theme-border,#393642);border-radius:10px}
.coverage-platform strong,.coverage-table .cabinet-label strong {font-size:14px}
.coverage-platform small,.coverage-table small,.comparison-table small {font-size:13px;color:var(--muted)}
.coverage-gaps,.hourly-missing {font-size:13px;color:var(--muted)}
.insight {border-color:var(--line)}
.insight-icon,.readiness-mark {background:var(--warning-bg);color:var(--warning)}
.insight-icon.red {background:var(--bad-bg);color:var(--bad)}
.insight-icon.blue {background:var(--info-bg);color:var(--info)}
.insight a {color:var(--accent)}
.risk-meter {background:var(--theme-bad-bg,#533740)}
.risk-meter i {background:var(--theme-bad-bg,#e595a3)}
.readiness-row,.online-cabinet-list>div,.history-job {border-color:var(--line)}
.readiness-row p,.online-cabinet-list>div {font-size:14px;color:var(--muted)}
.readiness-row strong {color:var(--ink);font-size:15px}
.readiness-row small {font-size:13px;color:var(--warning)}
.readiness-mark.ready {background:var(--good-bg);color:var(--good)}
.empty .empty-icon {background:var(--accent-bg);color:var(--theme-accent,#c7b0ea)}
.step-number {border-color:var(--theme-border,#575060);color:var(--theme-accent,#c4aee5)}
.guide {padding:22px}
.guide p,.guide li,.settings-note,.upload-area p,.upload-progress p,.upload-progress ol,.mapping-list,.product-economics-note {font-size:14px;color:var(--muted)}
.guide a {color:var(--accent)}
.raw-json {background:var(--surface-subtle);color:var(--theme-muted,#c7c0d4);border:1px solid var(--line)}

/* Connections, uploads, and review flows */
.connection-group {margin:26px 0 32px}
.connection-group-header {padding-bottom:14px;border-bottom:1px solid var(--line);margin-bottom:16px}
.connection-group-header h2 {font-size:20px;color:var(--ink);font-weight:550}
.connection-group-count {font-size:13px;color:var(--muted)}
.connection-grid {gap:16px}
.connection-card {padding:20px;min-height:210px}
.connection-card h3 {font-size:17px;color:var(--ink);font-weight:550}
.connection-card p {color:var(--muted);font-size:14px}
.connection-card .error-text {color:var(--bad);max-height:none;font-size:13px}
.connection-card .card-actions {gap:7px;padding-top:18px}
.connection-proxy-summary {background:var(--surface-subtle);border:1px solid var(--line);border-radius:10px}
.cost-config {border-color:var(--line);background:var(--surface-subtle);border-radius:11px}
.upload-area {padding:22px;background:var(--theme-surface-raised,#262232);border:1px dashed var(--theme-border,#75618c);border-radius:12px}
.upload-area.drag {background:var(--theme-accent-bg,#3a2f4c);border-color:var(--theme-accent-border,#c0a2ef)}
.upload-area .upload-icon {background:var(--theme-accent-bg,#423452);color:var(--theme-accent,#d8bafa);border-radius:11px}
.upload-area h3 {font-size:18px;color:var(--ink)}
.upload-progress {background:var(--surface-subtle);border-color:var(--line);border-radius:12px;padding:18px}
.upload-progress progress {height:7px;border-radius:5px;accent-color:var(--accent)}
.upload-progress progress::-webkit-progress-bar {background:var(--theme-surface-raised,#3c3548);border-radius:5px}
.upload-progress progress::-webkit-progress-value {background:var(--accent);border-radius:5px}
.upload-progress.processing progress::-webkit-progress-value {background:linear-gradient(110deg,var(--theme-accent-bg,#9a7acd),var(--theme-accent-bg,#dfc8ff),var(--theme-accent-bg,#9a7acd));background-size:200% 100%}
.upload-progress .complete {color:var(--good)}
.upload-progress .failed {color:var(--bad)}
.import-action-hint {font-size:13px;color:var(--warning)}
.cabinet-picker-label,.cabinet-picker-status,.cabinet-picker-empty,.import-next-step,.duplicate-next-step {font-size:14px;color:var(--muted)}
.cabinet-picker strong {font-size:15px;color:var(--ink)}
.cabinet-picker small,.cabinet-picker-group h3 {font-size:13px;color:var(--muted)}
.cabinet-picker-trigger,.import-assignment,.duplicate-option,.tax-period {border-radius:10px;border-color:var(--border);background:var(--surface-subtle)}
.cabinet-picker-trigger[aria-expanded=true] {border-color:var(--theme-accent-border,#c1a2ef);box-shadow:0 0 0 2px var(--theme-shadow-color,#bc9cfa22)}
.cabinet-picker-value>svg,.cabinet-picker-check {color:var(--accent)}
.cabinet-picker-option:hover,.cabinet-picker-option:focus-visible {background:var(--hover)}
.cabinet-picker-option[aria-pressed=true] {background:var(--theme-surface-raised,#43374e);border-color:var(--theme-accent-border,#74568a)}
.duplicate-group {border-color:var(--line);border-radius:12px}
.duplicate-group small,.duplicate-facts,.duplicate-advanced,.duplicate-advanced summary,.tax-period label,.tax-vat-row label {font-size:14px;color:var(--muted)}
.duplicate-file-top,.duplicate-filename {font-size:15px;color:var(--ink)}
.duplicate-option:has(input:checked) {border-color:var(--theme-accent-border,#c1a2ef);background:var(--theme-accent-bg,#362c43);box-shadow:inset 0 0 0 1px var(--theme-shadow-color,#c1a2ef)}
.duplicate-repeat {color:var(--warning);background:var(--warning-bg);border-radius:9px;padding:12px;font-size:14px}
.duplicate-choice-label {font-size:14px}
.tax-period>button,.tax-vat-row>button {color:var(--muted)}
.tax-period label,.tax-vat-row label {font-size:14px}
.modal-body .tax-period select,.modal-body .tax-period input,.modal-body .tax-vat-row input {min-height:40px;padding:7px 9px;font-size:14px}
.product-period label {color:var(--muted);font-size:14px}

/* Compact source matrix */
.source-legend {padding:0 24px 16px;color:var(--muted);font-size:13px}
.source-matrix-scroll {border-color:var(--line)}
.source-matrix {font-size:14px}
.source-matrix th,.source-matrix td {border-color:var(--line)}
.source-matrix thead th {background:var(--theme-surface-raised,#2b2833);color:var(--theme-accent,#d0c6dc);font-size:13px;font-weight:500;height:40px;padding:10px 12px}
.source-matrix thead tr:nth-child(2) th {background:var(--theme-surface,#232129);top:40px}
.source-matrix .source-month {background:var(--surface);color:var(--ink)}
.source-matrix thead .source-month {background:var(--theme-surface-raised,#2b2833)}
.source-cell:hover,.source-cell:focus-visible {background:var(--theme-accent-bg,#342a40);outline-color:var(--theme-accent-border,#b392d4)}
.source-month small,.source-matrix-panel .panel-footer,.source-detail-total small,.source-detail-table small {font-size:13px;color:var(--muted)}
.source-chip {border-radius:5px;min-width:22px;height:22px;font-size:12px;background:var(--theme-surface-raised,#34323d);color:var(--theme-muted,#aca3bc)}
.source-chip.full {background:var(--good-bg);color:var(--good)}
.source-chip.present {background:var(--info-bg);color:var(--info)}
.source-chip.partial,.source-pending {color:var(--warning);background:var(--warning-bg)}
.source-detail-total strong {font-size:28px;color:var(--ink)}
.source-detail-table strong,.source-next h3 {color:var(--ink)}
.source-next {background:var(--surface-subtle);border:1px solid var(--line);border-radius:10px}
.source-next ul,.source-next h3 {font-size:14px}

/* Dialogs, feedback and initial loading */
dialog {border:1px solid var(--theme-border,#514758);border-radius:16px;box-shadow:0 24px 100px var(--theme-shadow-color,#000a);max-height:92vh;color:var(--ink);background:var(--surface)}
dialog::backdrop {background:var(--theme-overlay,#08070bbb);backdrop-filter:blur(5px)}
.modal-header {padding:22px 24px;background:var(--surface);border-color:var(--line)}
.modal-header h2 {font-size:23px;font-weight:550;letter-spacing:-.4px;color:var(--ink)}
.modal-header p {color:var(--muted);font-size:14px;overflow-wrap:anywhere}
.modal-body {padding:24px}
.toast {border:1px solid var(--theme-border,#655276);border-radius:11px;background:var(--theme-accent-bg,#3b2f47);color:var(--theme-accent,#f2e6ff);font-size:15px;padding:14px 18px;box-shadow:0 8px 40px var(--theme-shadow-color,#0007)}
.toast.error {background:var(--theme-bad-bg,#552e3b);color:var(--theme-bad,#ffe4e9);border-color:var(--theme-bad-border,#a7687a)}
.toast[popover] {inset:auto auto 24px 50%;margin:0;border:1px solid var(--theme-border,#655276)}
.activity-status {border-radius:12px;background:var(--theme-surface-raised,#2c2634);border-color:var(--theme-border,#62506f);box-shadow:0 8px 36px var(--theme-shadow-color,#0008)}
.activity-status strong {color:var(--theme-accent,#ebdcf8);font-size:14px}
.activity-status small {color:var(--theme-accent,#c2afcf);font-size:13px}
.activity-spinner,.button.is-busy::before {border-color:var(--theme-border,#746184);border-top-color:var(--theme-accent-border,#e5cfff)}
.button.primary.is-busy::before {border-color:var(--theme-accent-border,#80669e);border-top-color:var(--theme-accent-border,#21162d)}
.job-note {background:var(--accent-bg);color:var(--theme-accent,#d6bfec)}
.progress-line {background:linear-gradient(90deg,var(--theme-accent-bg,#75589b),var(--theme-accent-bg,#ceabf9))}
body.page-loading::before {background-image:linear-gradient(90deg,transparent,#c3a1f6,transparent)}
.boot-screen {color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.boot-caption {font-size:15px;color:var(--muted)}
.boot-name {color:var(--ink)}
.boot-track {background:var(--theme-surface-raised,#3b3248)}
.boot-track::after {background:var(--theme-accent-bg,#c2a2f6)}

/* Dense data stays scrollable inside its panel, never across the whole page. */
@media(min-width:1700px) {
  .main-content {padding:34px 40px 48px}
  .kpi-value {font-size:36px}
  .kpi-money .kpi-value {font-size:clamp(26px,10cqi,36px)}
}
@media(max-width:1250px) {
  .app-shell {grid-template-columns:220px minmax(0,1fr)}
  .main-content {padding:26px 24px 40px}
  .sidebar {padding:24px 10px 16px}
  .nav-item {padding:11px 12px;font-size:14px}
  .heading-actions {flex-shrink:1}
  .connection-group-header>div {flex-wrap:wrap;gap:8px}
  .kpi {padding:18px}
  .panel-header {padding:20px 20px 12px}
  .panel-body {padding:16px 20px 22px}
}
@media(max-width:1100px) {
  .kpi-grid,.kpi-grid:has(>.kpi-money:first-child):not(:has(>.kpi-money~.kpi-money)) {grid-template-columns:repeat(2,minmax(0,1fr))}
  .kpi-money .kpi-value {font-size:30px}
  .hour-inspector-rows {grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
}
@media(max-width:720px) {
  .app-shell {display:block}
  .sidebar {width:240px;left:-250px;z-index:150}
  .sidebar.open {left:0;box-shadow:20px 0 60px var(--theme-shadow-color,#0008)}
  .main-content {padding:22px 16px 32px}
  .page-heading {margin-bottom:20px}
  .page-heading h1 {font-size:27px}
  .mobile-title-menu {display:inline-flex;vertical-align:middle;margin-right:8px;width:30px;height:30px;align-items:center;justify-content:center}
  .heading-actions {flex-wrap:wrap;gap:8px}
  .connection-grid {grid-template-columns:1fr}
  .connection-group-header {align-items:flex-start;flex-wrap:wrap}
  .connection-group-header>div {align-items:center;flex-direction:row}
  .connection-group-header .card-actions {gap:8px}
  .kpi-grid {gap:12px}
  .kpi {padding:16px;min-height:136px;border-radius:12px}
  .kpi-money {grid-column:1/-1}
  .kpi-money .kpi-value {font-size:30px}
  .kpi-value {font-size:28px}
  .kpi-label,.kpi-foot {font-size:13px}
  .kpi-icon {width:28px;height:28px;border-radius:8px}
  .kpi-label svg {display:block}
  .toolbar {flex-wrap:wrap;gap:12px}
  .segmented {flex-wrap:wrap}
  .monitor-tools {padding:10px}
  .monitor-tools summary {max-width:100%}
  .chart-viewport>.hourly-chart,.chart-viewport>.chart {min-width:680px}
  .hour-inspector-rows {grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
  .hour-floating {width:100%;max-width:calc(100% - 16px)}
  .hour-floating .hour-inspector-row {grid-template-columns:8px 1fr}
  .hour-floating .hour-inspector-row>b {grid-column:2;grid-row:auto}
  .modal-body,.modal-header {padding:18px}
  .tabs {overflow-x:auto;flex-wrap:nowrap;gap:0}
  .tabs button {white-space:nowrap;font-size:14px;padding:10px 14px}
  .source-legend-state {margin-left:0}
  .source-detail-total strong {font-size:24px}
  .refresh-popover {width:min(300px,calc(100vw - 48px))}
}
@media(min-width:561px) and (max-width:720px) {
  .kpi-grid:has(>.kpi-money:first-child):not(:has(>.kpi-money~.kpi-money)) {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:560px) {
  .kpi-grid:has(>.kpi-money:first-child):not(:has(>.kpi-money~.kpi-money))>.kpi:last-child:nth-child(4) {grid-column:1/-1}
}
@media(prefers-reduced-motion:reduce) {*,*::before,*::after {animation:none!important;transition:none!important}}

.refresh-status-button {border:0;background:transparent;color:var(--muted);font:inherit;font-size:13px;padding:3px 0;cursor:pointer;text-align:right;text-decoration:underline;text-underline-offset:4px;}
.refresh-status-button:hover {color:var(--text);}
.refresh-results {display:grid;gap:0;min-width:280px;}
.refresh-results>div {display:grid;grid-template-columns:1fr auto;gap:8px;padding:16px 0;border-bottom:1px solid var(--border);}
.refresh-results small {grid-column:1/-1;color:var(--muted);line-height:1.5;overflow-wrap:anywhere;}
.online-cabinet-list .error-text {display:block;max-width:560px;font-size:13px;line-height:1.4;margin-top:6px;}

.table-pagination{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 20px;border-top:1px solid var(--border);font-size:14px}.table-pagination>div{display:flex;align-items:center;gap:16px}.import-action-hint{max-width:380px;white-space:normal}

/* Financial source subtotals and exact marketplace service breakdown. */
.finance-table .expense-group td{font-weight:600;background:var(--surface-raised,var(--surface));border-top:2px solid var(--border)}
.finance-detail-toggle{display:flex;align-items:center;gap:10px;width:100%;padding:0;border:0;background:none;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.finance-detail-toggle small{margin-left:auto;white-space:nowrap;color:var(--text-secondary)}
.finance-detail-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.finance-table .finance-service-detail td{font-size:14px;background:var(--surface);color:var(--text-secondary)}
.finance-table .finance-service-detail td:first-child{padding-left:36px;min-width:260px;max-width:430px;white-space:normal}
.finance-table td:first-child>small{display:block;font-size:12px;line-height:1.5;color:var(--muted);font-weight:400;white-space:normal}
.finance-table .finance-partial{display:block;color:var(--warning);font-size:12px;font-weight:400}
.finance-table-note{padding:12px 20px;margin:0;border-top:1px solid var(--line);color:var(--muted);font-size:13px;line-height:1.6}
.finance-orders-loading{color:var(--muted);font-size:13px}
.finance-checks{display:grid;gap:0}
.finance-check{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:16px 0;border-bottom:1px solid var(--line)}
.finance-check p{margin:6px 0 0;color:var(--muted);font-size:14px;line-height:1.6;max-width:72ch}
.finance-check>.button{flex-shrink:0}
@media(max-width:650px){.finance-check{flex-direction:column;gap:12px}}

.recent-kpi .kpi-label {min-height:0;gap:10px}
.recent-kpi .kpi-value {font-size:clamp(22px,9cqi,30px);margin:14px 0 12px;letter-spacing:-.6px}
.recent-period {font-size:12px;color:var(--muted);font-weight:400;white-space:nowrap}
.recent-mini-chart {width:100%;height:76px;display:block;overflow:visible}
.recent-mini-chart [data-mini-detail]:hover {fill:var(--theme-ink,#ffffff0b)}
.recent-chart-empty {height:76px;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px}
.recent-chart-detail {min-height:19px;margin-top:8px;font-size:13px;font-variant-numeric:tabular-nums;color:var(--ink)}
.recent-kpi .kpi-foot {font-size:12px;margin-top:5px}
.cabinet-chart-tools {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}
.cabinet-chart-tools .toolbar {margin:0;flex:1;min-width:0}
.cabinet-chart-tools .filter-set {display:flex;gap:8px;flex-wrap:wrap}
.cabinet-chart-tools select {height:40px;max-width:210px;font-size:14px}
.cabinet-chart-tools .hourly-controls {flex-shrink:0}
.cabinet-legend {margin:18px 0 14px;gap:10px}
.cabinet-chart-explanation {display:flex;justify-content:space-between;gap:20px;color:var(--muted);font-size:13px;line-height:1.5}
.cabinet-chart-explanation [role=status] {white-space:nowrap;color:var(--ink)}
.cabinet-chart-section {margin-top:28px}
.cabinet-chart-section>h2 {font-size:21px;margin:0 0 16px}
.cabinet-chart-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.cabinet-chart-card {min-width:0;margin:0;padding:16px;overflow:visible}
.cabinet-chart-header {display:flex;align-items:center;justify-content:space-between;gap:12px}
.cabinet-chart-header h3 {font-size:18px;margin:0;font-weight:600;color:var(--ink)}
.cabinet-chart-header small {font-size:12px;color:var(--muted);display:block;margin-top:3px}
.cabinet-today {display:flex;flex-direction:column;gap:6px;margin:20px 0 16px}
.cabinet-today>strong {font-size:28px;color:var(--chart-current);font-variant-numeric:tabular-nums;letter-spacing:-.5px}
.cabinet-today>span {font-size:12px;color:var(--muted)}
.cabinet-today .unit {font-size:16px}
.cabinet-deltas {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}
.cabinet-deltas>div {display:flex;flex-direction:column;gap:5px;border-left:1px solid var(--line);padding-left:10px;min-width:0}
.cabinet-deltas>div:first-child {padding-left:0;border:0}
.cabinet-deltas span {font-size:12px;color:var(--muted)}
.cabinet-deltas b {font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.cabinet-deltas b.unavailable {font-size:11px;font-weight:400;color:var(--muted);line-height:1.5}
.hourly-plot-small .chart-viewport>.hourly-chart {min-width:0;min-height:0}
.hourly-plot-small .hour-floating {z-index:30}
.cabinet-chart-card:focus-within,.cabinet-chart-card:hover {position:relative;z-index:2}
.cabinet-chart-loading {min-height:280px;display:flex;align-items:center;justify-content:center;gap:12px;font-size:13px;color:var(--muted)}
.cabinet-chart-error {flex-direction:column;line-height:1.7}
.cabinet-chart-note {min-height:18px;font-size:11px;color:var(--muted);line-height:1.6}
.cabinet-partial-dot {display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--warning);margin-right:5px}
.cabinet-local-legend {display:flex;flex-wrap:wrap;gap:5px 11px;margin:10px 0 0;color:var(--ink);font-size:11px;line-height:1.5}
.cabinet-local-legend>span {display:flex;align-items:center;gap:5px;white-space:nowrap}
.cabinet-local-legend i {display:block;width:18px;height:0;border-top-width:3px;flex-shrink:0}
.cabinet-summary {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;margin-bottom:14px}
.cabinet-summary .cabinet-today {align-items:flex-end;gap:4px;margin:0}
.cabinet-summary .cabinet-today>strong {font-size:24px;line-height:1.2}
.cabinet-summary .cabinet-today>span {font-size:11px}
.cabinet-summary .cabinet-today>span:empty {display:none}
.cabinet-comparison-strip {display:flex;gap:9px;justify-content:space-between;margin:10px 0 2px}
.cabinet-comparison-strip>div {display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
.cabinet-comparison-strip span {display:flex;align-items:center;gap:5px;font-size:11px;color:var(--ink);white-space:nowrap}
.cabinet-comparison-strip i {width:16px;border-top-width:3px;flex-shrink:0}
.cabinet-comparison-strip b {font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.cabinet-comparison-strip .unavailable {color:var(--muted);font-weight:400}
.cabinet-coverage-help {padding:0;border:0;background:none;font:inherit;color:var(--accent);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.cabinet-coverage-details td {vertical-align:top;white-space:normal;line-height:1.5}
.cabinet-coverage-details td small {display:block;color:var(--muted);margin-top:4px;font-size:12px}
.cabinet-summary .cabinet-chart-header h3 {font-size:16px}
.cabinet-deltas {margin:0 0 10px}
.cabinet-deltas>div {gap:4px}
.cabinet-chart-note {font-size:11px}
@media(min-width:1700px){.cabinet-chart-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1150px){.cabinet-chart-grid{grid-template-columns:1fr}}
@media(max-width:720px){.cabinet-chart-card{padding:16px}.cabinet-chart-explanation{flex-wrap:wrap;gap:8px}.cabinet-chart-tools select{max-width:100%}.cabinet-today>strong{font-size:26px}.cabinet-deltas{gap:5px}.cabinet-deltas>div{padding-left:6px}.cabinet-deltas span{font-size:11px}}

.kpi-grid.has-recent {grid-template-columns:minmax(0,1.2fr) minmax(0,.85fr) repeat(3,minmax(0,1fr))!important;gap:12px}
.kpi-grid.has-recent>.kpi,.kpi-grid.has-recent>.kpi:nth-child(-n+2) {grid-column:auto;min-height:190px;padding:16px;border-radius:12px}
.has-recent .kpi-label {min-height:24px;font-size:13px;gap:6px;align-items:center}
.has-recent .kpi-icon {width:24px;height:24px;border-radius:7px}
.has-recent .kpi-icon svg {width:14px;height:14px}
.has-recent .kpi-value {font-size:clamp(18px,10cqi,28px);letter-spacing:-.6px;margin:12px 0 8px;line-height:1.3}
.has-recent .kpi-money .kpi-value {font-size:clamp(18px,9cqi,28px)}
.has-recent .kpi-value .unit {font-size:13px}
.has-recent .recent-period {display:none}
.has-recent .recent-mini-chart,.has-recent .recent-chart-empty {height:48px}
.has-recent .kpi-foot,.has-recent .recent-chart-detail {font-size:11px;line-height:1.5}
.has-recent .kpi-foot {margin-top:7px;min-height:0}
.has-recent .recent-chart-detail {margin-top:5px;min-height:16px}
.recent-buyout {color:var(--good);font-weight:600;border-bottom:1px dotted var(--good);cursor:help}
.cabinet-activity-settings {border-top:1px solid var(--line);padding-top:16px}
.cabinet-activity-settings summary {cursor:pointer;color:var(--ink);font-weight:600}
.cabinet-activity-settings p {font-size:12px;color:var(--muted);margin:8px 0 16px}
.cabinet-activity-dates,.cabinet-pause {display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.cabinet-pause {grid-template-columns:1fr 1fr 28px;align-items:end}
.cabinet-activity-settings label {display:flex;flex-direction:column;gap:7px;font-size:13px;color:var(--muted)}
.cabinet-activity-settings input {width:100%;min-width:0;font:inherit;color:var(--ink)}
.source-inactive-label {font-weight:400;color:var(--muted);font-size:12px}
.coverage-badge.not_required {color:var(--muted);background:var(--surface-subtle)}
@media(max-width:960px){.kpi-grid.has-recent{grid-template-columns:repeat(2,minmax(0,1fr))!important}.kpi-grid.has-recent>.kpi:last-child{grid-column:1/-1}.kpi-grid.has-recent>.kpi,.kpi-grid.has-recent>.kpi:nth-child(-n+2){min-height:168px}.has-recent .kpi-value{font-size:24px}}

.cabinet-comparison-strip{grid-template-columns:repeat(6,minmax(0,1fr))}

/* Identical centred chevrons for custom filter buttons and native selects. */
:is(#app,#modal) .picker-chevron{display:inline-block;flex:0 0 12px;width:12px;height:12px;min-width:12px;margin-left:auto;font-size:0;line-height:0;vertical-align:middle;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23b6b2c7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px 12px no-repeat}
