:root {
  --ink: #17202c;
  --muted: #687383;
  --line: #e6e9e5;
  --surface: #ffffff;
  --canvas: #f4f5f1;
  --yellow: #ffc51b;
  --yellow-soft: #fff5cf;
  --green: #13845e;
  --green-soft: #e5f5ee;
  --red: #d54a45;
  --red-soft: #fbe9e7;
  --navy: #243140;
  --shadow: 0 10px 35px rgba(26, 36, 46, 0.06);
  --radius: 18px;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; }
button, input { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.topbar { height: 68px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; color: white; background: #1e2936; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 11px; color: white; text-decoration: none; font-size: 17px; font-weight: 760; letter-spacing: -.02em; }
.brand em { color: #aeb7c2; font-style: normal; font-weight: 500; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #202a36; background: var(--yellow); border-radius: 11px; }
.brand-mark svg { width: 27px; height: 27px; stroke-width: 2; }
.dataset-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: #c4ccd5; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; font-size: 12px; }
.live-dot { width: 7px; height: 7px; background: #54d39c; border-radius: 50%; box-shadow: 0 0 0 3px rgba(84,211,156,.12); }

.app-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.control-panel { padding: 30px 26px 38px; background: #fff; border-right: 1px solid var(--line); }
.panel-heading, .dashboard-heading, .card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.eyebrow { margin: 0 0 7px; color: #929aa4; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.025em; }
h2 { margin-bottom: 6px; font-size: 29px; line-height: 1.1; letter-spacing: -.04em; }
h3 { margin-bottom: 0; font-size: 17px; letter-spacing: -.02em; }
.subtitle, .card-note { margin: 0; color: var(--muted); }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }
.icon-button:hover { background: var(--canvas); }
.icon-button svg { width: 17px; }

.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 24px 0 4px; padding: 4px; background: var(--canvas); border-radius: 11px; }
.preset { padding: 8px 6px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.preset.active { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(30,40,50,.08); }
.control-section { padding: 23px 0; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; font-weight: 780; }
.tag { padding: 4px 7px; border-radius: 6px; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.tag.positive { color: var(--green); background: var(--green-soft); }
.tag.negative { color: var(--red); background: var(--red-soft); }
.tag.neutral { color: #586675; background: #edf0f2; }
.field-label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
.money-input { height: 43px; display: flex; align-items: center; overflow: hidden; background: #fafbf8; border: 1px solid #dfe3de; border-radius: 10px; transition: .2s; }
.money-input:focus-within { border-color: #d8a300; box-shadow: 0 0 0 3px rgba(255,197,27,.16); background: white; }
.money-input > span { padding-left: 12px; color: #9aa09f; font-size: 10px; font-weight: 800; }
.money-input input { width: 100%; height: 100%; padding: 0 12px 0 8px; text-align: right; color: var(--ink); background: transparent; border: 0; outline: 0; font-weight: 750; }
.featured-input { height: 50px; background: #fffdf4; border-color: #eadb9f; }
.featured-input input { font-size: 19px; }
.input-grid, .date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.overhead-label { margin-top: 16px; }
.optional { color: #aaa; font-weight: 500; }
.staffing-grid { margin-top: 15px; }
.ops-limit-grid { margin-top: 12px; }
.plain-input, .unit-input { height: 43px; display: flex; align-items: center; overflow: hidden; background: #fafbf8; border: 1px solid #dfe3de; border-radius: 10px; }
.plain-input:focus-within, .unit-input:focus-within { border-color: #d8a300; box-shadow: 0 0 0 3px rgba(255,197,27,.16); background: white; }
.plain-input input, .unit-input input { min-width: 0; width: 100%; height: 100%; padding: 0 10px; color: var(--ink); background: transparent; border: 0; outline: 0; font-weight: 750; text-align: right; }
.unit-input span { padding-right: 9px; color: #999f9e; font-size: 9px; font-weight: 700; }
.input-help { margin: 9px 0 0; color: #929aa4; font-size: 10px; line-height: 1.45; }
.text-button { padding: 0; color: #957000; background: transparent; border: 0; font-size: 11px; font-weight: 700; cursor: pointer; }
.date-input { width: 100%; height: 39px; padding: 0 8px; color: var(--ink); background: #fafbf8; border: 1px solid #dfe3de; border-radius: 9px; font-size: 11px; }
.store-list { display: grid; gap: 9px; margin-top: 17px; }
.store-filter { display: flex; align-items: center; gap: 9px; color: #4e5967; font-size: 12px; cursor: pointer; }
.store-filter input { appearance: none; width: 16px; height: 16px; margin: 0; border: 1px solid #c9cfca; border-radius: 5px; cursor: pointer; }
.store-filter input:checked { background: var(--yellow); border-color: #d4a300; box-shadow: inset 0 0 0 3px white; }
.formula-note { display: flex; gap: 10px; margin-top: 22px; padding: 14px; color: #6a6040; background: #fff8df; border: 1px solid #f1e4b8; border-radius: 12px; font-size: 11px; line-height: 1.55; }
.formula-note svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; }
.formula-note p { margin: 0; }

.dashboard { min-width: 0; padding: 34px clamp(24px, 3.2vw, 52px) 60px; }
.dashboard-heading { align-items: center; margin-bottom: 24px; }
.export-button { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: white; background: var(--navy); border: 0; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.export-button:hover { background: #111b25; }
.export-button svg { width: 15px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.kpi-card { min-width: 0; padding: 19px; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.kpi-card.accent-card { background: #202c38; border-color: #202c38; color: white; }
.kpi-label { min-height: 20px; display: flex; align-items: center; justify-content: space-between; color: #8a949e; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.accent-card .kpi-label { color: #b8c1c9; }
.mini-icon { width: 22px; height: 22px; display: grid; place-items: center; color: #202c38; background: var(--yellow); border-radius: 7px; font-size: 13px; }
.kpi-card strong { display: block; overflow: hidden; margin: 13px 0 5px; font-size: clamp(20px, 2.2vw, 31px); letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap; }
.kpi-card p { margin: 0; color: #98a0a9; font-size: 11px; }
.accent-card p { color: #c2c9cf; }
.negative-value { color: #ff827b !important; }
.positive-value { color: var(--green) !important; }
.accent-card .positive-value { color: #6ce2af !important; }

.insight-strip { display: grid; grid-template-columns: repeat(5, 1fr); margin: 14px 0; padding: 13px 0; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.insight-strip div { padding: 2px 17px; border-right: 1px solid var(--line); }
.insight-strip div:last-child { border: 0; }
.insight-strip span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.insight-strip strong { font-size: 14px; }

.fleet-strip { display: grid; grid-template-columns: minmax(260px, 1.35fr) minmax(180px, .8fr) repeat(3, minmax(110px, .45fr)); align-items: center; gap: 0; margin: 0 0 14px; padding: 15px 0; color: white; background: #273441; border-radius: 15px; box-shadow: var(--shadow); }
.fleet-copy { display: flex; align-items: center; gap: 12px; padding: 0 18px; }
.fleet-copy .eyebrow { margin-bottom: 4px; color: #aeb9c2; }
.fleet-copy h3 { color: white; font-size: 15px; }
.fleet-copy p:last-child { margin: 4px 0 0; color: #aeb9c2; font-size: 10px; }
.fleet-icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; color: #26333f; background: var(--yellow); border-radius: 11px; }
.fleet-icon svg { width: 23px; }
.peak-load { padding: 0 18px; border-left: 1px solid rgba(255,255,255,.1); border-right: 1px solid rgba(255,255,255,.1); }
.peak-load span, .peak-load small { display: block; color: #aeb9c2; font-size: 9px; }
.peak-load strong { display: block; margin: 5px 0 3px; color: white; font-size: 15px; }
.fleet-stat { min-width: 0; padding: 0 15px; border-right: 1px solid rgba(255,255,255,.1); }
.fleet-stat:last-child { border: 0; }
.fleet-stat span { display: block; margin-bottom: 6px; color: #aeb9c2; font-size: 9px; }
.fleet-stat strong { display: block; overflow: hidden; color: white; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.time-strip { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(120px, .55fr)); align-items: center; margin: 0 0 14px; padding: 15px 18px 10px; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.time-heading { display: flex; align-items: center; gap: 11px; }
.time-heading .eyebrow { margin-bottom: 4px; }
.time-heading h3 { font-size: 14px; }
.time-icon { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; color: #7b5b00; background: var(--yellow-soft); border-radius: 10px; }
.time-icon svg { width: 21px; }
.time-stat { padding: 0 17px; border-left: 1px solid var(--line); }
.time-stat span, .time-stat small { display: block; color: var(--muted); font-size: 9px; }
.time-stat strong { display: block; margin: 5px 0 2px; font-size: 16px; letter-spacing: -.02em; }
.time-note { grid-column: 1 / -1; margin: 11px 0 0; padding-top: 8px; color: #929aa4; border-top: 1px solid var(--line); font-size: 9px; }

.optimal-strip { display: grid; grid-template-columns: minmax(225px, .8fr) minmax(470px, 1.6fr) auto; align-items: center; gap: 20px; margin: 0 0 14px; padding: 18px 20px; color: white; background: linear-gradient(115deg, #17232e, #2b3b48); border-radius: 15px; box-shadow: var(--shadow); }
.recommend-tag { display: inline-block; margin-bottom: 7px; padding: 4px 7px; color: #403100; background: var(--yellow); border-radius: 5px; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.optimal-copy > strong { display: block; font-size: 25px; letter-spacing: -.04em; }
.optimal-copy p { margin: 4px 0 0; color: #abb6bf; font-size: 9px; }
.optimal-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid rgba(255,255,255,.1); }
.optimal-metrics > div { padding: 3px 14px; border-right: 1px solid rgba(255,255,255,.1); }
.optimal-metrics span { display: block; margin-bottom: 6px; color: #abb6bf; font-size: 8px; }
.optimal-metrics strong { font-size: 13px; }
.optimal-button { padding: 10px 13px; color: #312600; background: var(--yellow); border: 0; border-radius: 9px; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.optimal-button:hover { background: #ffd34f; }
.optimal-button:disabled { opacity: .45; cursor: default; }

.fleet-chart-card { margin-bottom: 14px; }
.fleet-chart-heading { margin-bottom: 9px; }
.fleet-chart-summary { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.fleet-chart-summary > div { min-width: 105px; padding: 7px 12px; text-align: center; border-right: 1px solid var(--line); }
.fleet-chart-summary > div:last-child { border: 0; }
.fleet-chart-summary .alert-metric { background: #fff4f1; }
.fleet-chart-summary span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.fleet-chart-summary strong { font-size: 12px; }
.fleet-chart-summary .alert-metric strong { color: var(--red); }
.fleet-chart-wrap { min-height: 258px; overflow-x: auto; }
.fleet-requirement-chart { display: block; width: 100%; min-width: 760px; height: 258px; }
.fleet-requirement-chart text { fill: #929aa4; font-family: Inter, ui-sans-serif, sans-serif; font-size: 9px; }
.fleet-requirement-chart .grid-line { stroke: #e8ebe7; stroke-width: 1; }
.fleet-requirement-chart .bar-10h { fill: var(--yellow); }
.fleet-requirement-chart .bar-under { stroke: var(--red); stroke-width: 2; }
.fleet-requirement-chart .configured-line { stroke: var(--green); stroke-width: 1.7; stroke-dasharray: 7 5; }
.fleet-legend { flex-wrap: wrap; }
.bar-key { display: inline-block; width: 10px; height: 8px; border-radius: 2px; }
.bar-key.ten { background: var(--yellow); }
.configured-key { display: inline-block; width: 18px; height: 0; border-top: 2px dashed var(--green); }

.peak-window-card { margin-bottom: 14px; }
.peak-window-chart { min-height: 175px; display: flex; align-items: flex-end; gap: clamp(3px, .55vw, 8px); overflow-x: auto; padding: 12px 2px 0; border-bottom: 1px solid var(--line); }
.peak-window-item { min-width: 16px; flex: 1 0 16px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 163px; }
.peak-window-item > span { margin-bottom: 5px; color: #596674; font-size: 8px; font-weight: 800; }
.peak-window-bar { width: min(19px, 80%); min-height: 4px; background: #354857; border-radius: 5px 5px 1px 1px; transition: height .3s ease; }
.peak-window-bar.over { background: var(--red); }
.peak-window-item small { margin: 5px 0 7px; color: #9aa2aa; font-size: 8px; }
.peak-window-caption { display: flex; justify-content: space-between; align-items: center; padding-top: 9px; color: #9aa2aa; font-size: 8px; }
.peak-window-caption span:last-child { display: flex; align-items: center; gap: 5px; }
.peak-window-caption i { width: 7px; height: 7px; background: var(--red); border-radius: 2px; }

.daily-card { margin-bottom: 14px; }
.chart-label { color: var(--muted); font-size: 10px; }
.daily-workload { min-height: 152px; display: flex; align-items: flex-end; gap: clamp(3px, .55vw, 8px); overflow-x: auto; padding: 12px 2px 0; border-bottom: 1px solid var(--line); }
.daily-bar-item { min-width: 16px; flex: 1 0 16px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 140px; }
.daily-bar-item > span { margin-bottom: 4px; color: #697684; font-size: 8px; font-weight: 700; }
.daily-bar { width: min(18px, 78%); min-height: 4px; background: linear-gradient(180deg, var(--yellow), #e6a900); border-radius: 5px 5px 1px 1px; transition: height .3s ease; }
.daily-bar-item small { margin: 5px 0 7px; color: #9aa2aa; font-size: 8px; }
.daily-caption { display: flex; justify-content: space-between; padding-top: 9px; color: #9aa2aa; font-size: 8px; }
.daily-empty { align-self: center; width: 100%; margin: 0; color: var(--muted); text-align: center; }

.duration-card { margin-bottom: 14px; }
.duration-heading { margin-bottom: 10px; }
.duration-summary { display: flex; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.duration-summary > div { min-width: 88px; padding: 7px 11px; text-align: center; border-right: 1px solid var(--line); }
.duration-summary > div:last-child { border: 0; }
.duration-summary .average { background: #fff9e3; }
.duration-summary span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.duration-summary strong { font-size: 12px; }
.duration-chart-wrap { min-height: 230px; overflow-x: auto; }
.duration-chart { display: block; width: 100%; min-width: 720px; height: 230px; }
.duration-chart text { fill: #929aa4; font-family: Inter, ui-sans-serif, sans-serif; font-size: 9px; }
.duration-chart .grid-line { stroke: #e8ebe7; stroke-width: 1; }
.duration-chart .average-line { stroke: #d69e00; stroke-width: 1.5; stroke-dasharray: 5 4; }
.duration-chart .area { fill: url(#durationArea); }
.duration-chart .data-line { fill: none; stroke: #253544; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.duration-chart .point { fill: var(--yellow); stroke: #253544; stroke-width: 1.5; }
.duration-chart .point:hover { r: 5; }
.duration-legend { display: flex; gap: 17px; margin-top: 6px; color: var(--muted); font-size: 9px; }
.duration-legend span { display: flex; align-items: center; gap: 6px; }
.duration-line-key, .average-line-key { display: inline-block; width: 18px; height: 2px; background: #253544; }
.average-line-key { height: 0; background: none; border-top: 2px dashed #d69e00; }
.chart-note { margin: 9px 0 0; color: #929aa4; font-size: 9px; }

.analytics-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 14px; margin-bottom: 14px; }
.card { min-width: 0; padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-heading { align-items: center; margin-bottom: 20px; }
.card-heading .eyebrow { margin-bottom: 5px; }
.status-badge { padding: 7px 9px; color: var(--green); background: var(--green-soft); border-radius: 8px; font-size: 11px; font-weight: 750; }
.status-badge.negative { color: var(--red); background: var(--red-soft); }
.waterfall { display: flex; align-items: end; gap: 8px; height: 122px; padding: 10px 0 3px; border-bottom: 1px solid var(--line); }
.waterfall-column { flex: 1; min-width: 40px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.waterfall-column span { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.waterfall-bar { width: min(54px, 76%); min-height: 3px; border-radius: 6px 6px 2px 2px; transition: height .35s ease; }
.waterfall-bar.revenue { background: var(--yellow); }
.waterfall-bar.weight { background: #7c8a99; }
.waterfall-bar.distance { background: #536373; }
.waterfall-bar.couriers { background: #876f46; }
.waterfall-bar.overhead { background: #aab2ba; }
.waterfall-bar.profit { background: var(--green); }
.waterfall-bar.loss { background: var(--red); }
.legend { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 13px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 7px; height: 7px; border-radius: 2px; }

.mix-content { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 22px; min-height: 146px; }
.donut { width: 132px; aspect-ratio: 1; display: grid; place-items: center; background: conic-gradient(var(--green) 0 75%, var(--red) 75%); border-radius: 50%; position: relative; }
.donut::after { content: ""; position: absolute; inset: 15px; background: white; border-radius: 50%; }
.donut > div { z-index: 1; text-align: center; }
.donut strong { display: block; font-size: 22px; letter-spacing: -.04em; }
.donut span { color: var(--muted); font-size: 9px; }
.mix-stats { display: grid; gap: 12px; }
.mix-stats > div { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.mix-stats > div:last-child { padding-bottom: 0; border: 0; }
.mix-stats strong { color: var(--ink); font-size: 11px; }
.legend-dot, .tiny-legend i { width: 7px; height: 7px; border-radius: 50%; }
.green { background: var(--green); }
.red { background: var(--red); }
.amber { background: var(--yellow); }

.scenario-card { margin-bottom: 14px; }
.card-note { font-size: 10px; text-align: right; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 9px 10px; color: #9099a2; border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: .07em; text-align: right; text-transform: uppercase; white-space: nowrap; }
td { padding: 11px 10px; color: #4c5663; border-bottom: 1px solid #eef0ed; font-size: 11px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; text-align: left; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
.scenario-table tr.current-scenario td { background: #fffbeb; }
.scenario-table tr.current-scenario td:first-child { padding-left: 9px; border-radius: 7px 0 0 7px; }
.scenario-table tr.current-scenario td:last-child { padding-right: 9px; border-radius: 0 7px 7px 0; }
.config-name { display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 750; }
.config-dot { width: 7px; height: 7px; background: #b4bdc4; border-radius: 50%; }
.current-scenario .config-dot { background: var(--yellow); }
.profit-cell { color: var(--green); font-weight: 750; }
.loss-cell { color: var(--red); font-weight: 750; }
.lower-grid { grid-template-columns: 1fr 1fr; }
.store-card td:first-child { color: var(--ink); font-weight: 680; }
.tiny-legend { display: flex; gap: 10px; color: var(--muted); font-size: 9px; }
.tiny-legend span { display: flex; align-items: center; gap: 5px; }
.tiny-legend i { display: inline-block; }
#scatterPlot { width: 100%; height: 240px; display: block; }

.orders-card { margin-top: 0; }
.orders-heading { align-items: center; }
.search-box { width: min(240px, 40%); height: 37px; display: flex; align-items: center; gap: 7px; padding: 0 10px; background: #f8f9f6; border: 1px solid var(--line); border-radius: 9px; }
.search-box svg { width: 14px; color: #929aa4; }
.search-box input { min-width: 0; width: 100%; background: transparent; border: 0; outline: 0; font-size: 11px; }
.orders-table td:nth-child(2) { color: var(--ink); font-weight: 650; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; color: var(--muted); font-size: 10px; }
.pagination div { display: flex; gap: 6px; }
.pagination button { width: 32px; height: 30px; background: white; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.pagination button:disabled { opacity: .35; cursor: default; }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 12px 16px; color: white; background: #1e2936; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.18); font-size: 12px; transform: translateY(80px); opacity: 0; transition: .25s; pointer-events: none; }
.toast.show { transform: translateY(0); opacity: 1; }
.empty-row td { padding: 32px 0; color: var(--muted); text-align: center; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 300px minmax(0, 1fr); }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .lower-grid { grid-template-columns: 1fr; }
  .fleet-strip { grid-template-columns: 1.4fr 1fr 1fr; }
  .fleet-copy { grid-column: 1 / 3; padding-bottom: 14px; }
  .peak-load { grid-column: 3; grid-row: 1; border-right: 0; }
  .fleet-stat { padding-top: 13px; border-top: 1px solid rgba(255,255,255,.1); }
  .time-strip { grid-template-columns: 1.3fr repeat(3, 1fr); }
  .optimal-strip { grid-template-columns: 1fr auto; }
  .optimal-metrics { grid-column: 1 / -1; grid-row: 2; border-left: 0; border-top: 1px solid rgba(255,255,255,.1); padding-top: 13px; }
}

@media (max-width: 760px) {
  .topbar { height: 60px; padding: 0 16px; }
  .brand em { display: none; }
  .dataset-pill { max-width: 47%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-shell { display: block; }
  .control-panel { padding: 24px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dashboard { padding: 26px 15px 40px; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading h2 { font-size: 25px; }
  .export-button { padding: 9px; }
  .export-button svg { width: 18px; }
  .export-button { font-size: 0; }
  .kpi-grid { gap: 9px; }
  .kpi-card { padding: 15px; }
  .kpi-card strong { font-size: 21px; }
  .insight-strip { grid-template-columns: 1fr 1fr; padding: 4px 0; }
  .insight-strip div { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .insight-strip div:nth-child(2n) { border-right: 0; }
  .insight-strip div:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .fleet-strip { grid-template-columns: 1fr 1fr; padding: 16px; gap: 14px; }
  .fleet-copy { grid-column: 1 / -1; padding: 0 0 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .peak-load { grid-column: 1 / -1; grid-row: auto; padding: 0 0 14px; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .fleet-stat { padding: 0; border: 0; }
  .fleet-stat:last-child { grid-column: 1 / -1; }
  .time-strip { grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .time-heading { grid-column: 1 / -1; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .time-stat { padding: 0 12px 0 0; border: 0; }
  .time-stat:nth-child(3) { padding-left: 12px; border-left: 1px solid var(--line); }
  .time-note { margin-top: 0; }
  .optimal-strip { grid-template-columns: 1fr; gap: 15px; }
  .optimal-metrics { grid-column: 1; grid-row: auto; grid-template-columns: 1fr 1fr; gap: 13px 0; }
  .optimal-metrics > div { padding-left: 0; }
  .optimal-button { width: 100%; }
  .fleet-chart-heading { display: block; }
  .fleet-chart-summary { margin-top: 14px; }
  .fleet-chart-summary > div { min-width: 0; flex: 1; padding: 7px 6px; }
  .card { padding: 18px 15px; }
  .card-note { display: none; }
  .scenario-table { min-width: 650px; }
  .mix-content { grid-template-columns: 120px 1fr; gap: 12px; }
  .donut { width: 112px; }
  .orders-table { min-width: 760px; }
  .search-box { width: 46%; }
}

@media (max-width: 430px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-card { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3px 10px; }
  .kpi-label, .kpi-card p { grid-column: 1; }
  .kpi-card strong { grid-column: 2; grid-row: 1 / span 2; margin: 0; text-align: right; }
  .mix-content { display: block; }
  .donut { margin: 0 auto 20px; }
}
