/* Presentation views, accessible terminology help, and a shared light/dark palette. */
:root{--tip-bg:#111;--tip-text:#fff;--elevated:#f7f9fc;--soft:#edf2f8;--strong:#253a55;--subtle:#73839a;color-scheme:light}
.theme-toggle{font-size:24px;line-height:1}.segmented button{font-size:13px}.header-context{font-size:12px}.pagination{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:15px;margin:20px 0}.page-range{display:flex;align-items:center;justify-content:center;align-self:stretch;font-size:13px;line-height:1.4;white-space:nowrap}.button-row{align-items:center}.reading-guide{background:var(--blue-soft);border-left:3px solid var(--blue);padding:15px;margin-top:22px;border-radius:0 7px 7px 0}.reading-guide strong{color:var(--strong);font-size:14px}.reading-guide p{margin-bottom:0}.help-term{text-decoration:underline dotted;text-decoration-color:#8c9cb380;text-underline-offset:4px;cursor:help}.help-term:focus-visible{outline:2px solid var(--blue);outline-offset:4px;border-radius:2px}.term-tooltip{position:fixed;z-index:10000;max-width:min(340px,calc(100vw - 24px));padding:14px 16px;border-radius:9px;background:var(--tip-bg);color:var(--tip-text);box-shadow:0 10px 30px #0003;font-size:14px;line-height:1.55;text-align:left;white-space:normal;pointer-events:auto}.term-tooltip strong{display:block;color:inherit;font-size:14px;line-height:1.4;margin-bottom:6px}.term-tooltip span{display:block;color:inherit}.chart-tooltip{background:var(--tip-bg);color:var(--tip-text)}
[data-theme="dark"] .kpi-label{color:var(--muted)}[data-theme="dark"] .text-button{color:var(--blue)}[data-theme="dark"] .select-control:has(select:disabled){background:var(--elevated)}[data-theme="dark"] .select-control select:disabled{color:var(--muted);opacity:1}[data-theme="dark"] .app-footer{border-color:var(--line)}
.inventory-view .dashboard{grid-template-rows:auto 35px minmax(0,1fr)}.inventory-workspace{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:minmax(210px,.9fr) minmax(265px,1.1fr);gap:18px;min-height:0}.count-assurance{grid-column:span 4}.location-comparison{grid-column:span 8}.inventory-records{grid-column:span 8}.valuation-review{grid-column:span 4}.inventory-panel-head{padding:20px 23px 10px}.inventory-panel-head .eyebrow{font-size:10px;letter-spacing:1.5px;margin-bottom:7px}.inventory-heading-row{display:flex;align-items:center;justify-content:space-between;gap:14px}.inventory-panel-head h2{font-size:18px}.assurance-core{display:flex;gap:30px;align-items:center;justify-content:center;flex:1;padding:8px 20px}.count-ring{border-radius:50%;width:146px;height:146px;flex-shrink:0;background:conic-gradient(var(--blue) 0 var(--match),#e5ab64 var(--match) 100%);padding:8px;display:grid;place-items:center}.count-ring>span{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;border-radius:50%;background:var(--surface);width:100%;height:100%}.count-ring strong{font-size:29px;letter-spacing:-1px;font-weight:650;color:var(--strong)}.count-ring strong small{font-size:14px;letter-spacing:0}.count-ring .inventory-stat-label{font-size:12px}.inventory-stat-label{color:var(--muted);display:block;font-size:14px}.assurance-totals{display:flex;flex-direction:column;gap:22px}.assurance-totals>button,.assurance-totals>div{background:transparent;padding:0;text-align:left}.assurance-totals strong{display:block;font-size:28px;font-weight:650;color:var(--strong);letter-spacing:-.6px}.assurance-totals .inventory-stat-label{font-size:13px;margin-top:4px}.count-outcomes{display:flex;justify-content:center;gap:25px;padding:15px 12px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}.count-outcomes>span{display:flex;align-items:center;gap:6px}.outcome-dot{height:7px;width:7px;border-radius:50%;background:var(--red)}.outcome-dot.over{background:#c89951}.location-matrix{padding:0 23px;flex:1;display:flex;flex-direction:column;justify-content:space-evenly}.location-matrix-head,.location-matrix-row{display:grid;grid-template-columns:1fr 1fr 1.5fr .9fr;gap:18px;align-items:center}.location-matrix-head{font-size:12px;color:var(--muted);padding:7px 0 12px}.location-matrix-head>span:last-child,.location-matrix-row>span:last-child{text-align:right}.location-matrix-row{background:transparent;border-top:1px solid var(--line);padding:15px 0;min-height:51px;text-align:left;font-size:15px}.location-matrix-row.active{background:var(--blue-soft);border-radius:7px;padding-left:9px;padding-right:9px}.location-matrix-row>strong{font-size:17px;letter-spacing:.4px}.matrix-accuracy{display:flex;align-items:center;gap:14px}.matrix-accuracy b{min-width:65px;text-align:right;font-size:14px;font-variant-numeric:tabular-nums}.matrix-track{flex:1;height:5px;border-radius:5px;background:var(--soft);overflow:hidden}.matrix-track i{display:block;height:100%;background:var(--blue);border-radius:5px}.variance-count{font-variant-numeric:tabular-nums;color:var(--green)}.variance-count.has-variance{color:var(--amber)}.inventory-panel-note{padding:11px 23px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.records-scroll{flex:1;min-height:0;overflow:auto;padding:0 23px}.inventory-table{width:100%;border-collapse:collapse;font-size:14px}.inventory-table th{text-align:right;padding:10px 0;font-size:12px;font-weight:500;color:var(--muted);border-bottom:1px solid var(--line)}.inventory-table th:first-child{text-align:left;width:51%}.inventory-table td{text-align:right;padding:9px 0;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}.inventory-table tr:last-child td{border-bottom:0}.inventory-table td:first-child{text-align:left;padding-right:20px}.inventory-table small{font-size:11px;color:var(--muted)}.inventory-material{display:block;text-align:left;max-width:100%;background:transparent;padding:0;line-height:1.4}.inventory-material strong{font-size:13px;font-weight:550;display:block;max-width:440px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inventory-material small{display:block;margin-top:3px}.quantity-under{color:var(--red)}.quantity-over{color:var(--amber)}.valuation-value{text-align:left;background:transparent;padding:12px 23px}.valuation-value>strong{display:block;font-size:36px;line-height:1.3;color:var(--strong);margin-top:7px;letter-spacing:-1px;font-weight:650}.valuation-value>strong>small{font-size:16px;color:var(--muted);font-weight:500;letter-spacing:0}.valuation-message{display:flex;align-items:center;gap:12px;margin:9px 23px;padding:12px;background:var(--amber-bg);border-radius:8px;color:var(--amber)}.valuation-symbol{display:flex}.valuation-message strong{font-size:13px}.valuation-message p{font-size:12px;margin-top:4px}.valuation-context{padding:5px 23px 12px;font-size:13px;line-height:1.55;color:var(--muted)}.inventory-status{margin-top:auto;display:flex;gap:10px;align-items:center;padding:13px 23px;border-top:1px solid var(--line)}.status-check{display:grid;place-items:center;border-radius:50%;background:var(--green-bg);color:var(--green);height:29px;width:29px}.inventory-status strong{font-size:13px;font-weight:550}.inventory-status small{display:block;color:var(--muted);font-size:12px;margin-top:3px}
[data-theme="dark"]{color-scheme:dark;--blue:#65a4ff;--blue-dark:#3987fa;--blue-soft:#1b3150;--bg:#0c1421;--surface:#141f30;--text:#e4edf9;--muted:#a3b3ca;--line:#2a384d;--amber:#efbc73;--amber-bg:#352b21;--red:#ff9198;--red-bg:#3b252e;--green:#7bd4a3;--green-bg:#1a352d;--elevated:#1b2a3f;--soft:#26374d;--strong:#edf4ff;--subtle:#a1b1c9;--tip-bg:#fff;--tip-text:#121720}
[data-theme="dark"] body{background:var(--bg);color:var(--text)}[data-theme="dark"] .app-header,[data-theme="dark"] .kpi-card,[data-theme="dark"] .icon-button,[data-theme="dark"] .select-control,[data-theme="dark"] .drawer,[data-theme="dark"] .toast,[data-theme="dark"] .record-search{background:var(--surface);border-color:var(--line);color:var(--text)}[data-theme="dark"] .brand img{filter:brightness(0) invert(1)}[data-theme="dark"] .brand-divider,[data-theme="dark"] .context-divider{background:var(--line)}[data-theme="dark"] .product-name>span,[data-theme="dark"] .eyebrow,[data-theme="dark"] .header-context,[data-theme="dark"] .quiet-button,[data-theme="dark"] .select-control select,[data-theme="dark"] .context-strip,[data-theme="dark"] .panel-heading p,[data-theme="dark"] .metric-note,[data-theme="dark"] .chart-legend,[data-theme="dark"] .stage-name,[data-theme="dark"] .exception-owner,[data-theme="dark"] .exception-age,[data-theme="dark"] .warehouse-detail,[data-theme="dark"] .warehouse-legend,[data-theme="dark"] .panel-foot,[data-theme="dark"] .app-footer,[data-theme="dark"] .drawer-body p,[data-theme="dark"] .detail-fact>span,[data-theme="dark"] .definition-source,[data-theme="dark"] .muted,[data-theme="dark"] .table-head,[data-theme="dark"] .chart-summary,[data-theme="dark"] .event-timeline small,[data-theme="dark"] .toast p{color:var(--muted)}[data-theme="dark"] .kpi-value,[data-theme="dark"] .summary-value,[data-theme="dark"] .context-strip strong,[data-theme="dark"] .stage-count,[data-theme="dark"] .warehouse-score>strong,[data-theme="dark"] .warehouse-name,[data-theme="dark"] .exception-description strong,[data-theme="dark"] .detail-lead strong,[data-theme="dark"] .detail-fact strong,[data-theme="dark"] .toast strong{color:var(--strong)}[data-theme="dark"] .exception-description small,[data-theme="dark"] .kpi-unit{color:var(--muted)}[data-theme="dark"] .segmented,[data-theme="dark"] .attention-filter,[data-theme="dark"] .view-number,[data-theme="dark"] .stage-index,[data-theme="dark"] .warehouse-chip,[data-theme="dark"] .count-badge,[data-theme="dark"] .neutral-badge,[data-theme="dark"] .event-node{background:var(--elevated);color:var(--muted);border-color:var(--line)}[data-theme="dark"] .segmented button{color:var(--muted)}[data-theme="dark"] .segmented button.selected,[data-theme="dark"] .attention-filter button.selected{background:var(--blue-soft);color:var(--strong)}[data-theme="dark"] .attention-filter button{color:var(--muted)}[data-theme="dark"] .app-footer,[data-theme="dark"] .load-error{background:var(--bg)}[data-theme="dark"] .exception-row,[data-theme="dark"] .warehouse-row{background:transparent;border-color:var(--line)}[data-theme="dark"] .exception-row:hover,[data-theme="dark"] .warehouse-row:hover,[data-theme="dark"] .pipeline-row:hover,[data-theme="dark"] .quiet-button:hover{background:var(--elevated)}[data-theme="dark"] .warehouse-row.active{background:var(--blue-soft)}[data-theme="dark"] .stage-bar,[data-theme="dark"] .warehouse-progress,[data-theme="dark"] .metric-track{background:var(--soft)}[data-theme="dark"] .stage-bar i{background:#5f83b5}[data-theme="dark"] .trace-button,[data-theme="dark"] .detail-lead,[data-theme="dark"] .info-box,[data-theme="dark"] .feature-note,[data-theme="dark"] .secondary-button,[data-theme="dark"] .warehouse-symbol{background:var(--elevated);border-color:var(--line);color:var(--text)}[data-theme="dark"] .primary-button{background:#347feb;color:#fff}[data-theme="dark"] .record-table td,[data-theme="dark"] .record-table th{color:var(--muted);border-color:var(--line)}[data-theme="dark"] .drawer-header,[data-theme="dark"] .detail-fact,[data-theme="dark"] .definition-source,[data-theme="dark"] .source-card,[data-theme="dark"] .chart-summary,[data-theme="dark"] .table-head,[data-theme="dark"] .panel-foot,[data-theme="dark"] .warehouse-legend,[data-theme="dark"] .context-strip{border-color:var(--line)}[data-theme="dark"] .warning-text{color:var(--amber)}[data-theme="dark"] .kpi-card.is-critical .metric-note{color:var(--red)}[data-theme="dark"] .kpi-card:hover{border-color:#4774a8}[data-theme="dark"] #chart-grid line{stroke:var(--line)}[data-theme="dark"] #chart-labels text{fill:var(--muted)}[data-theme="dark"] #chart-line-a{stroke:var(--blue)}[data-theme="dark"] #chart-line-b{stroke:#abc0dc}[data-theme="dark"] .legend-key.dark{background:#abc0dc}[data-theme="dark"] .event-timeline li:before{background:var(--line)}[data-theme="dark"] .event-timeline .completed .event-node{background:var(--blue-dark);color:#fff}[data-theme="dark"] .drawer::backdrop{background:#0007}
@media(min-width:1200px) and (max-height:1099px){.inventory-view .dashboard{grid-template-rows:auto 29px minmax(0,1fr)}.inventory-workspace{gap:14px}.inventory-panel-head{padding:16px 20px 8px}.count-ring{width:130px;height:130px}.assurance-core{gap:24px;padding:4px 15px}.location-matrix-row{padding:11px 0}.valuation-value{padding-top:7px}.valuation-value>strong{font-size:32px}}
@media(min-width:1200px) and (max-height:849px){.inventory-view .dashboard{grid-template-rows:auto 25px minmax(0,1fr)}.inventory-workspace{grid-template-rows:minmax(205px,.85fr) minmax(260px,1.15fr);gap:12px}.inventory-panel-head{padding:13px 18px 6px}.inventory-panel-head h2{font-size:16px}.inventory-panel-head .eyebrow{font-size:9px;margin-bottom:4px}.count-ring{width:119px;height:119px;padding:7px}.count-ring strong{font-size:26px}.count-outcomes{padding:10px}.assurance-totals{gap:13px}.assurance-totals strong{font-size:24px}.location-matrix{padding:0 18px}.location-matrix-head{font-size:11px}.location-matrix-row{padding:9px 0;min-height:41px}.inventory-panel-note{font-size:11px;padding:9px 18px}.inventory-table td{padding:7px 0}.inventory-material strong{font-size:12px}.valuation-message{margin:5px 18px;padding:10px}.valuation-context{font-size:12px;padding:5px 18px 9px}.valuation-value{padding:6px 18px}.valuation-value .inventory-stat-label{font-size:13px}.inventory-status{padding:9px 18px}.inventory-status small{font-size:11px}.valuation-value>strong{font-size:30px}.inventory-table th{font-size:11px}.inventory-table{font-size:13px}}
@media(min-width:2400px){.inventory-view .dashboard{grid-template-rows:auto 52px minmax(0,1fr)}.inventory-workspace{gap:28px}.inventory-panel-head{padding:30px 35px 20px}.inventory-panel-head h2{font-size:27px}.inventory-panel-head .eyebrow{font-size:14px}.count-ring{width:240px;height:240px;padding:12px}.count-ring strong{font-size:50px}.count-ring strong small{font-size:24px}.count-ring .inventory-stat-label,.assurance-totals .inventory-stat-label{font-size:20px}.assurance-totals strong{font-size:44px}.count-outcomes{font-size:20px;padding:25px}.location-matrix{padding:0 35px}.location-matrix-head,.location-matrix-row{font-size:20px}.location-matrix-row>strong{font-size:27px}.matrix-accuracy b{font-size:24px}.location-matrix-row{padding:25px 0}.inventory-panel-note,.inventory-table th{font-size:18px;padding:18px 35px}.inventory-table{font-size:22px}.inventory-table th{padding:17px 0}.inventory-table td{padding:17px 0}.inventory-material strong{font-size:22px;max-width:800px}.inventory-table small,.inventory-material small{font-size:17px}.valuation-value>strong{font-size:60px}.valuation-value .inventory-stat-label{font-size:22px}.valuation-value{padding:20px 35px}.valuation-message,.valuation-context{font-size:20px;margin:15px 35px}.valuation-message strong,.valuation-message p,.inventory-status strong,.inventory-status small{font-size:20px}.inventory-status{padding:22px 35px}}
@media(max-width:1199px){.header-context{display:none}.inventory-view .dashboard{grid-template-rows:auto auto auto}.inventory-workspace{grid-template-rows:auto auto}.count-assurance{grid-column:span 5;min-height:290px}.location-comparison{grid-column:span 7}.inventory-records{grid-column:span 8;min-height:350px}.valuation-review{grid-column:span 4}.assurance-core{gap:17px}.count-ring{width:115px;height:115px}.location-matrix-head,.location-matrix-row{gap:10px;grid-template-columns:.8fr .8fr 1fr .7fr}.matrix-track{display:none}.inventory-table th:first-child{width:42%}.inventory-material strong{white-space:normal}.inventory-panel-head{padding:17px}.inventory-panel-head .neutral-badge{display:none}}
@media(max-width:800px){.inventory-workspace{display:flex;flex-direction:column}.count-assurance,.location-comparison,.inventory-records,.valuation-review{min-height:280px}.inventory-records{min-height:360px}.valuation-review{min-height:310px}.location-matrix-head{font-size:11px}.count-ring{width:140px;height:140px}.inventory-table{font-size:12px}.inventory-table th{font-size:11px}.inventory-panel-note{font-size:11px}.records-scroll{padding:0 15px}.inventory-table td:first-child{padding-right:10px}.inventory-material strong{font-size:12px}.header-actions{gap:6px}.brand{gap:12px}.brand img{width:115px}.help-term{text-underline-offset:3px}.term-tooltip{font-size:14px}}

[data-theme="dark"] .kpi-card.is-warning{border-top-color:#c99758}[data-theme="dark"] .kpi-card.is-critical{border-top-color:#d96d79}[data-theme="dark"] .kpi-card.is-good{border-top-color:#60a47f}

.valuation-message.no-variance{background:var(--green-bg);color:var(--green)}
/* Navigation to the geographic workspace. */
.segmented .map-nav-link{display:flex;align-items:center;padding:9px 12px;border-radius:5px;font-size:12px;font-weight:600;color:var(--muted);text-decoration:none;white-space:nowrap}.segmented .map-nav-link:hover{background:var(--surface);color:var(--blue)}
.auto-feed{display:inline-flex;align-items:center;gap:7px;font-size:11px;white-space:nowrap;color:var(--muted);font-weight:500}.auto-feed i{width:6px;height:6px;background:var(--blue);border-radius:50%;box-shadow:0 0 0 4px var(--blue-soft);animation:feed-breathe 4s ease-in-out infinite}.auto-feed[hidden]{display:none}@keyframes feed-breathe{50%{box-shadow:0 0 0 6px var(--blue-soft)}}
@media(max-width:1500px){.view-heading{flex-wrap:wrap}.filters{flex-wrap:wrap}.segmented button,.segmented .map-nav-link{font-size:11px;padding:8px 10px}.map-heading-actions{gap:10px}.map-heading-actions .auto-feed{display:none}}
@media(max-width:600px){.segmented{flex-wrap:wrap}.segmented button,.segmented .map-nav-link{flex:1 1 45%;justify-content:center}}
