/* v5.18.28: authoritative shared presentation system.
   Legacy dashboard/theme patches removed from app.css and showroom.css. */
:root{--bg:#f3f6fa;--card:#fff;--ink:#173149;--muted:#586c80;--line:#dce5ef;--blue:#1769bd;--blue2:#12569c;--navy:#102b42;--shadow:0 4px 18px rgba(16,43,66,.045);--ui-teal:#0f766e;--ui-radius:14px}
html,body{background:var(--bg);color:var(--ink);overflow-x:visible}
.shell,.layout{background:var(--bg);grid-template-columns:210px minmax(0,1fr)}
main,.layout main{min-width:0;max-width:none;width:100%;margin:0;padding:24px}
.topbar,header{height:68px;background:#fff;border-bottom:1px solid var(--line);box-shadow:var(--shadow)}
.brand-copy strong,.brand b{color:var(--navy)}
.brand-copy small,.brand small{color:var(--muted)}
.drawer,aside{background:var(--navy);width:210px;top:68px;height:calc(100vh - 68px);padding:16px 10px;border:0;box-shadow:none}
.nav-button,aside button,aside .back{color:#dce8f3;background:transparent;border:0;border-radius:9px;min-height:42px;padding:10px 12px;font-size:13px}
.nav-button:hover,aside button:hover,aside .back:hover{color:#fff;background:#203e58;transform:none}
.nav-button.active,aside button.active{color:#fff;background:var(--blue);border:0;box-shadow:none}
.drawer-note{color:#a9bbcc;border-color:#34506a;line-height:1.5}
.page-head,.dashboard-hero,.showroom-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:var(--ui-radius);padding:20px;margin-bottom:16px;box-shadow:var(--shadow)}
.page-head h1,.dashboard-hero h2,.showroom-hero h1{color:var(--navy);font-size:clamp(24px,2vw,32px);letter-spacing:-.025em;line-height:1.2;margin:4px 0 8px}
.page-head p,.dashboard-hero p,.showroom-hero p{color:var(--muted);line-height:1.5;margin:4px 0;max-width:780px}
.eyebrow{color:var(--ui-teal)!important;font-size:11px!important;letter-spacing:.1em;font-weight:800}
.panel,.stat,.result-card,.premium-kpi,.overview-summary>div{background:#fff;border:1px solid var(--line);border-radius:var(--ui-radius);box-shadow:var(--shadow);color:var(--ink)}
.panel{padding:18px;margin-bottom:16px}
.dashboard-overview{padding:0;background:transparent;border:0;box-shadow:none;margin:0}
.dashboard-hero-status,.overview-actions,.range-tabs,.page-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.dashboard-hero-status{justify-content:flex-end}
.dashboard-hero>div:first-child{flex:1 1 420px;min-width:0}.dashboard-hero-actions{display:grid;gap:12px;max-width:100%}.dashboard-range{display:flex;flex-wrap:wrap;gap:6px}.dashboard-range button{min-height:36px;font-size:12px;padding:8px 10px}.dashboard-range button.active{background:var(--blue);color:#fff}.premium-kpi .kpi-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:#edf5fc;border-radius:8px;color:var(--blue);margin-bottom:8px;font-size:16px}
.range-tabs{background:#f1f5fa;border-radius:10px;padding:4px}
.range-tabs button{padding:7px 10px;min-height:34px;border:0;background:transparent;font-size:12px}
.range-tabs .active{background:var(--blue);color:#fff}
.premium-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:16px}
.premium-kpi{padding:16px;min-width:0;border-top:3px solid var(--blue)}
.kpi-collections,.kpi-profit{border-top-color:var(--ui-teal)}
.kpi-cost{border-top-color:#b88120}.kpi-margin{border-top-color:#7567a8}
.premium-kpi small,.overview-summary small,.stat small{display:block;color:var(--muted);font-size:12px;font-weight:600;line-height:1.4}
.premium-kpi strong,.overview-summary b,.stat strong{display:block;margin:8px 0;color:var(--navy);font-size:clamp(18px,1.6vw,26px);font-weight:750;line-height:1.25;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.premium-kpi span,.overview-summary span{display:block;color:var(--muted);font-size:11px;line-height:1.5}
.overview-summary{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin-bottom:16px}
.overview-summary>div{min-width:0;padding:14px}
.stats{gap:14px;margin-bottom:16px}.stat{min-width:0;padding:16px}
.report-period-toolbar,.report-toolbar{background:#fff;border:1px solid var(--line);border-radius:var(--ui-radius);padding:14px;gap:10px;margin:0 0 16px;box-shadow:var(--shadow)}
.report-toolbar{grid-template-columns:minmax(130px,1fr) minmax(130px,1fr) repeat(4,auto)}
.report-toolbar input,.report-date-field input{max-width:100%;min-width:0;color:var(--ink)}
.report-date-field{flex-wrap:wrap}
.report-head,.graph-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.graph-head h3,.chart-panel h2{font-size:16px;color:var(--navy);margin:0 0 6px;line-height:1.4;overflow-wrap:anywhere}
.chart-subtitle{font-size:12px;color:var(--muted);line-height:1.5;margin:0}
.dashboard-chart-grid,.report-graph-grid,.premium-report-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;width:100%;align-items:stretch}
.dashboard-chart-grid>.graph-card,.report-graph-grid>.graph-card,.premium-report-grid>.panel{grid-column:span 4;min-width:0;margin:0;min-height:310px}
.report-graph-grid>.graph-card{grid-column:span 6}
.dashboard-chart-grid>.hero-chart,.premium-report-grid>.wide{grid-column:span 8}
.dashboard-chart-grid>.realtime-premium,.premium-report-grid>.management-notes{grid-column:span 8}
.graph-card{padding:18px;overflow:hidden}
.svg-chart{min-width:0;width:100%;min-height:240px;display:flex;align-items:center;justify-content:center;color:var(--blue);margin-top:12px}
.svg-chart svg{width:100%;height:auto;max-height:300px;overflow:visible}
.multi-line-chart{flex-direction:column;align-items:stretch}
.chart-legend{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 8px;font-size:11px;color:var(--muted)}
.chart-legend-item{display:inline-flex;gap:6px;align-items:center}.legend-dot{display:inline-block;width:8px;height:8px;border-radius:50%}
.multi-line,.multi-dot{stroke:var(--series-color)}.legend-dot{background:var(--series-color)}
.multi-0{--series-color:#1769bd}.multi-1{--series-color:#0f766e}.multi-2{--series-color:#b88120}.multi-3{--series-color:#7567a8}
.svg-chart svg .multi-dot{fill:#fff;stroke:var(--series-color)}
.svg-chart svg .chart-bar,.chart-bar{fill:var(--blue)}
.svg-chart svg .bar-0,.bar-0{fill:#1769bd}.svg-chart svg .bar-1,.bar-1{fill:#0f766e}.svg-chart svg .bar-2,.bar-2{fill:#b88120}.svg-chart svg .bar-3,.bar-3{fill:#7567a8}.svg-chart svg .bar-4,.bar-4{fill:#c26767}.svg-chart svg .bar-5,.bar-5{fill:#4c9294}
.chart-line{stroke:var(--ui-teal)}.chart-dot{stroke:var(--ui-teal)}
.pie-wrap{display:grid;grid-template-columns:1fr;gap:12px;min-width:0;min-height:240px}
.pie-svg{width:180px;height:180px;max-width:100%;margin:auto}
.legend,.pie-wrap .legend{width:100%;min-width:0;max-width:100%;max-height:150px;overflow:auto;font-size:11px}
.legend>div{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:7px;align-items:center}.legend span{overflow-wrap:anywhere}.legend b{font-size:11px;font-variant-numeric:tabular-nums}
.live-activity-list{max-height:360px;overflow:auto}.activity-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:6px 14px;min-width:0;overflow-wrap:anywhere}.activity-row>div{min-width:0}.activity-row strong{font-size:13px;font-variant-numeric:tabular-nums}
.compact-stats{grid-template-columns:repeat(2,minmax(0,1fr));margin:12px 0 0;gap:10px}.compact-stats .stat{padding:12px}.compact-stats .stat strong{font-size:17px}
.management-status>div{flex-wrap:wrap;overflow-wrap:anywhere;font-size:12px}
.management-notes ul{padding-left:20px;line-height:1.8;margin:8px 0}
.dashboard-local-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:16px}.dashboard-placeholder-live{display:grid;gap:10px;padding:24px;border:1px dashed var(--line);border-radius:var(--ui-radius);background:#fff;margin-bottom:16px;color:var(--muted)}
.graph-menu,.chart-switch,.status-pill{font-size:11px;color:var(--muted);background:#f1f5fa;padding:5px 8px;border-radius:7px}
button.primary,.primary{background:var(--blue);color:#fff;border-color:var(--blue);box-shadow:none}.primary:hover{background:var(--blue2);transform:none}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #3b8ddd;outline-offset:2px}
.logout-btn{color:var(--ink);background:#f5f8fc;border-color:var(--line)}
th{background:#f5f8fc;color:var(--muted)}td{color:var(--ink)}tbody tr{background:#fff}tbody tr:nth-child(even){background:#fafcff}tbody tr:hover{background:#eef6fd}
.table-wrap{max-width:100%;min-width:0}.table-wrap td,.table-wrap th{border-color:var(--line)}
/* v5.18.29: chart and modal components, shared by existing workspaces. */
.premium-chart{min-height:250px;margin-top:10px;align-items:center}
.premium-chart svg{max-height:310px;width:100%;height:auto}
.premium-chart .chart-x,.premium-chart .chart-y{fill:#586c80;font-size:18px;font-family:inherit}
.premium-chart .chart-value{fill:#173149;font-size:18px;font-weight:700}
.premium-chart .chart-grid{stroke:#e2e9f1;stroke-width:1;stroke-dasharray:3 5}
.premium-chart .zero-axis{stroke:#a6b7c8;stroke-width:1.2}
.premium-chart .premium-line{fill:none;stroke:var(--chart-color);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.premium-chart .premium-dot{fill:#fff;stroke:var(--chart-color);stroke-width:2.5}
.premium-chart .premium-bar{fill:var(--chart-color)}
.premium-bar:hover,.premium-bar:focus,.premium-donut-segment:hover,.premium-donut-segment:focus{opacity:.8;outline:none;filter:brightness(.92)}
.premium-dot:hover,.premium-dot:focus{stroke-width:4;outline:none}
.premium-chart-legend{display:flex;gap:10px 16px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin:12px 0 0}
.premium-chart-legend span{display:inline-flex;align-items:center;gap:6px}.premium-chart-legend i{width:9px;height:9px;border-radius:50%}
.premium-donut .pie-svg{width:210px;height:210px;max-width:100%}
.premium-donut .pie-center-label{font-size:11px;fill:#586c80;font-weight:600;letter-spacing:.08em}
.premium-donut .pie-center-value{font-size:19px;fill:#173149;font-weight:750}
.premium-donut .legend{max-height:180px}.premium-donut .legend>div{padding:7px 0;border-bottom:1px solid #edf2f7;align-items:center}
.premium-donut .legend i{display:block;width:9px;height:9px;border-radius:50%}
.premium-donut .legend small{display:block;color:var(--muted);font-size:10px;margin-top:3px}
dialog{max-height:90vh;overflow:auto;border:1px solid var(--line);border-radius:16px}
dialog .dialog-head{padding:18px 22px;border-bottom:1px solid var(--line);gap:12px}
dialog .dialog-head h2{font-size:19px;color:var(--navy)}
dialog .form-grid{padding:20px 22px;gap:18px}
dialog .form-grid label{font-size:13px;line-height:1.5;color:#425a70}
dialog .form-grid input,dialog .form-grid select,dialog .form-grid textarea{font-size:14px;min-height:42px}
dialog .dialog-actions{padding:16px 22px;gap:10px;border-top:1px solid var(--line);margin-top:0;background:#f9fbfd}
dialog .dialog-actions button{min-height:40px}
/* v5.18.30 — chart detail enhancements; current light shell preserved. */
.premium-chart .premium-area{fill:var(--chart-color);opacity:.08;stroke:none}
.premium-chart .premium-bar-track{fill:#edf2f7}
.graph-head h3,.chart-panel h2{font-weight:750;letter-spacing:-.015em}
.chart-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.chart-heading h3{margin:0}
.chart-rate-widget{display:flex;align-items:center;gap:8px;min-width:200px;max-width:100%;border-radius:9px;padding:4px}
.chart-rate-widget svg{width:64px;height:64px;flex-shrink:0}
.chart-rate-widget .rate-track{stroke:#e8eef5;stroke-width:9;fill:none}
.chart-rate-widget .rate-fill{stroke:#0f766e;stroke-width:9;fill:none}
.chart-rate-widget text{fill:#173149;font-size:15px;font-weight:750}
.chart-rate-widget b{font-size:11px;color:#173149}.chart-rate-widget small{display:block;font-size:10px;color:#586c80;margin-top:4px;max-width:150px;line-height:1.4}
.chart-tooltip{position:fixed;z-index:10000;max-width:min(300px,calc(100vw - 16px));padding:12px 14px;border:1px solid #29465f;border-radius:11px;background:#102b42;color:#fff;box-shadow:0 8px 24px #102b4233;pointer-events:none;overflow-wrap:anywhere}
.chart-tooltip[hidden]{display:none}.chart-tooltip b{display:block;font-size:12px;font-weight:600;color:#d7e7f4}.chart-tooltip strong{display:block;font-size:16px;margin-top:7px;line-height:1.3}.chart-tooltip small{display:block;font-size:11px;margin-top:6px;color:#bdd1e2}
.premium-donut .legend>div:focus-visible,.chart-rate-widget:focus-visible{outline:2px solid #3b8ddd;outline-offset:3px}
@media print{.chart-tooltip{display:none!important}}
@media(min-width:950px){body{padding-bottom:0}.shell{grid-template-columns:210px minmax(0,1fr)}.drawer{position:sticky;transform:none;width:210px}.menu-btn,.bottom-nav{display:none}}
@media(max-width:1100px){main,.layout main{padding:20px}.premium-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-chart-grid>.graph-card,.report-graph-grid>.graph-card,.premium-report-grid>.panel{grid-column:span 6}.dashboard-chart-grid>.hero-chart,.dashboard-chart-grid>.realtime-premium,.premium-report-grid>.wide{grid-column:1/-1}.premium-report-grid>.management-notes{grid-column:span 6}.report-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:949px){.shell{grid-template-columns:minmax(0,1fr)}.drawer{width:min(86vw,300px);height:100vh;top:0;padding-top:80px}.drawer.open{transform:none}.layout{grid-template-columns:180px minmax(0,1fr)}.layout aside{width:180px}.dashboard-local-tools{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){main,.layout main{padding:12px}.layout{grid-template-columns:minmax(0,1fr)}.layout aside{position:static;width:100%;height:auto;display:flex;flex-wrap:wrap;gap:4px;padding:10px}.layout aside button,.layout aside .back{width:auto;flex:1 1 120px;margin:0;font-size:12px}.layout aside .back{border:0;padding:10px}.premium-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-chart-grid>.graph-card,.report-graph-grid>.graph-card,.premium-report-grid>.panel{grid-column:1/-1}.page-head,.dashboard-hero,.showroom-hero{padding:16px;gap:12px}.form-grid,.filters{grid-template-columns:1fr}.wide{grid-column:1/-1}.report-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.report-toolbar button{width:100%;min-width:0}.report-head{gap:10px}.brand img{width:70px}.brand b{font-size:12px}.brand small{font-size:10px}header{height:auto;min-height:68px;padding:10px;gap:8px;flex-wrap:wrap}.topbar{flex-wrap:nowrap;padding:7px 10px;gap:6px}.topbar .brand-copy{min-width:0;flex:1}.topbar .brand-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar .brand-logo{width:44px;flex-shrink:0}.topbar-actions{flex-shrink:0}.topbar .logout-btn{font-size:12px;min-height:34px;padding:7px 9px}.activity-row{grid-template-columns:minmax(0,1fr) auto}.activity-row>div:nth-child(2){grid-column:1/-1;grid-row:2}.activity-row strong{grid-column:2;grid-row:1}.movement-row{grid-template-columns:1fr}.svg-chart{min-height:220px}}
@media(max-width:420px){dialog .form-grid{padding:16px;gap:14px}dialog .dialog-head,dialog .dialog-actions{padding:16px}.premium-kpi-grid,.stats,.overview-summary{grid-template-columns:minmax(0,1fr)}.compact-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.report-date-field{width:100%}.report-date-field input{flex:1}.report-toolbar{grid-template-columns:minmax(0,1fr)}.dashboard-local-tools{grid-template-columns:1fr}.dashboard-hero-status{justify-content:flex-start}.topbar-actions{gap:4px}}
@media print{.drawer,aside,.topbar,header,.bottom-nav,.dashboard-local-tools{display:none!important}.shell,.layout{display:block}main,.layout main{padding:0}.panel,.stat,.graph-card,.premium-kpi{box-shadow:none;break-inside:avoid}.page-head{box-shadow:none}.report-toolbar,.range-tabs,.report-period-toolbar button{display:none}.live-activity-list,.legend{max-height:none;overflow:visible}}
