/* ========== VARIABLES & THÈME ========== */
:root, [data-theme="light"] {
  --bg-base: #f2f4f8;
  --bg-alt: #eceff5;
  --bg-panel: #ffffff;
  --bg-panel-soft: #f4f6fa;
  --text-main: #1b2233;
  --text-muted: #626c81;
  --text-faint: #8a93a6;
  --label-color: #5b6478;
  --border-color: #e2e7f0;
  --border-strong: #ced6e4;
  --brand: #c1362f;
  --brand-2: #8f2621;
  --brand-soft: #fbeae9;
  --ok: #16875c;
  --ok-soft: #e4f5ee;
  --warn: #ad7615;
  --warn-soft: #fbf0dc;
  --bad: #c1433f;
  --bad-soft: #fbeae9;
  --info: #315fb5;
  --info-soft: #e9eefb;
  --violet: #6d4fd1;
  --violet-soft: #efecfc;
  --indigo: #4a5cd6;
  --indigo-soft: #eaecfb;
  --copper: #a06029;
  --copper-soft: #f7ede2;
  --shadow-sm: 0 4px 14px rgba(27,34,51,.05);
  --shadow-hover: 0 14px 30px rgba(27,34,51,.09);
  --glass-bg: rgba(255,255,255,.92);
  --chart-grid: rgba(98,108,129,.10);
  --chart-text: #6b7488;
  --chart-label-bg: rgba(255,255,255,.82);
}

[data-theme="dark"] {
  --bg-base: #0f1520;
  --bg-alt: #0c1119;
  --bg-panel: #161e2c;
  --bg-panel-soft: #202b40;
  --text-main: #eef1f7;
  --text-muted: #9aa4b8;
  --text-faint: #6c7690;
  --label-color: #b7c0d6;
  --border-color: #34405b;
  --border-strong: #4a5678;
  --brand: #e2645d;
  --brand-2: #a83d37;
  --brand-soft: rgba(226,100,93,.14);
  --ok: #35b686;
  --ok-soft: rgba(53,182,134,.14);
  --warn: #d9a44a;
  --warn-soft: rgba(217,164,74,.14);
  --bad: #e2726d;
  --bad-soft: rgba(226,114,109,.14);
  --info: #7597e0;
  --info-soft: rgba(117,151,224,.14);
  --violet: #a48ce8;
  --violet-soft: rgba(164,140,232,.14);
  --indigo: #8b9bf0;
  --indigo-soft: rgba(139,155,240,.14);
  --copper: #d1976a;
  --copper-soft: rgba(209,151,106,.14);
  --shadow-sm: 0 6px 18px rgba(0,0,0,.24);
  --shadow-hover: 0 18px 36px rgba(0,0,0,.34);
  --glass-bg: rgba(15,21,32,.88);
  --chart-grid: rgba(154,164,184,.12);
  --chart-text: #9aa4b8;
  --chart-label-bg: rgba(22,30,44,.88);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.dashboard-body {
  margin: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  color: var(--text-main);
  background: var(--bg-base);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; color: inherit; }
svg.icon { width: 18px; height: 18px; flex: 0 0 auto; display: block; }

/* ========== UTILITAIRES ========== */
.hidden { display: none !important; }
.mobile-only { display: none; }
.desktop-only { display: block; }
.mt-auto { margin-top: auto; }
.mb-5 { margin-bottom: 16px !important; }

/* ========== LAYOUT DESKTOP ========== */
.app-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 16px; background: var(--bg-panel); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 6px 6px 18px; border-bottom: 1px solid var(--border-color); }
.logo-concorde, .logo-title-red { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); font-weight: 800; box-shadow: 0 8px 18px rgba(193,54,47,.24); border-radius: 13px; font-size: 20px; width: 42px; height: 42px; }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; color: var(--text-muted); }
.side-subtitle { font-size: 14.5px; font-weight: 800; line-height: 1.2; color: var(--text-main); }
.side-nav { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.side-section-title { margin: 20px 10px 6px; color: var(--text-faint); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.side-link { width: 100%; border: 1px solid transparent; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 650; cursor: pointer; transition: background .18s, color .18s, border-color .18s; text-align: left; }
.side-link span:first-child { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; color: var(--text-faint); }
.side-link:hover { background: var(--bg-panel-soft); color: var(--text-main); }
.side-link.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 750; }
.side-link.active span:first-child { color: #fff; }
.side-nav.compact { margin-top: 6px; }
.store-legend-card { margin-top: 16px; padding: 12px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-panel-soft); }
.store-legend-title { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); margin-bottom: 8px; }
.store-legend-list { display: flex; flex-direction: column; gap: 6px; }
.store-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; color: var(--text-main); }
.store-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.active-filter-card { margin-top: 12px; padding: 14px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-panel-soft); }
.filter-card-title { font-weight: 800; margin-bottom: 8px; font-size: 12.5px; }
.filter-card-body { color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.filter-card-body strong { color: var(--text-main); }
.reset-filter-btn, .soft-action, .ghost-action, .primary-action { border: 0; border-radius: 11px; padding: 10px 13px; font-weight: 700; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: transform .15s, box-shadow .15s, filter .15s, background .15s; }
.reset-filter-btn { width: 100%; justify-content: center; margin-top: 12px; color: var(--text-muted); background: var(--bg-panel); border: 1px solid var(--border-color); }
.primary-action { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 16px rgba(193,54,47,.20); }
.soft-action, .ghost-action { color: var(--text-main); background: var(--bg-panel); border: 1px solid var(--border-color); }
button:hover { filter: brightness(1.02); }
.primary-action:hover, .soft-action:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.main-panel { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 35; min-height: 80px; padding: 16px 32px; display: flex; justify-content: space-between; gap: 20px; align-items: center; background: var(--glass-bg); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border-color); }
.top-title-wrap { display: flex; align-items: center; gap: 13px; min-width: 0; }
.topbar h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.topbar p { margin: 3px 0 0; color: var(--text-muted); font-size: 12px; font-weight: 550; }
.top-status { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.sync-box { border: 1px solid var(--border-color); border-radius: 13px; padding: 7px 12px; background: var(--bg-panel); min-width: 148px; }
.sync-box span { display: block; color: var(--text-faint); font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.sync-box strong { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; }
.theme-toggle, .round-refresh { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; border: 1px solid var(--border-color); background: var(--bg-panel); color: var(--text-main); cursor: pointer; transition: transform .2s, background .18s, color .18s; }
.theme-toggle:hover { color: var(--brand); }
.round-refresh { color: var(--brand); }
.round-refresh:hover { transform: rotate(180deg); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; justify-content: center; padding: 8px 12px; min-height: 34px; border-radius: 999px; font-size: 11px; font-weight: 750; border: 1px solid var(--border-color); background: var(--bg-panel); color: var(--text-muted); }
.status-pill.ready, .status-pill.success { color: var(--ok); border-color: transparent; background: var(--ok-soft); }
.status-pill.warning { color: var(--warn); border-color: transparent; background: var(--warn-soft); }
.status-pill.danger { color: var(--bad); border-color: transparent; background: var(--bad-soft); }

.content-area { padding: 22px 32px 40px; }
.filter-card, .panel-card, .kpi-card, .detail-card, .summary-card, .gauge-card, .control-kpi, .reco-card, .threshold-card, .brand-row-card, .active-filter-card, .flow-step, .whatsapp-card { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 18px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; min-width: 0; }
.filter-card { padding: 17px 18px; margin-bottom: 20px; }
.filter-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.filter-head h2, .panel-head h2 { margin: 0; color: var(--text-main); font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.filter-head p, .panel-head p { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr .85fr 1.35fr .95fr; gap: 14px; align-items: end; }
.filter-grid label { display: flex; flex-direction: column; gap: 7px; color: var(--label-color); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
input, select { width: 100%; border: 1.5px solid var(--border-strong); border-radius: 12px; background: var(--bg-panel-soft); color: var(--text-main); padding: 13px 15px; outline: none; font-weight: 650; font-size: 14px; transition: border-color .16s, box-shadow .16s, background .16s; }
input:hover, select:hover { border-color: var(--text-faint); }
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type="search"] { font-weight: 500; }

.page-section { animation: pageIn .26s ease both; }
@keyframes pageIn { from { opacity: .5; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-section.page-slide-forward { animation: pageSlideForward .28s cubic-bezier(.2,.75,.25,1) both; }
.page-section.page-slide-back { animation: pageSlideBack .28s cubic-bezier(.2,.75,.25,1) both; }
@keyframes pageSlideForward { from { opacity: .25; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pageSlideBack { from { opacity: .25; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
.dashboard-grid { display: grid; gap: 16px; margin-top: 16px; }
.two-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.panel-card { padding: 18px; }
.panel-head { margin-bottom: 12px; }
.panel-head.with-search { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.panel-head.with-search input { max-width: 340px; }

/* ========== CARDS & GAUGES ========== */
.summary-card { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(120px, .55fr)); gap: 13px; padding: 18px; margin-bottom: 18px; }
.summary-title { display: flex; align-items: center; gap: 9px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: var(--brand); }
.summary-icon { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.summary-icon svg { width: 15px; height: 15px; }
.summary-text { margin-top: 9px; color: var(--text-main); font-weight: 550; font-size: 13.5px; line-height: 1.6; }
.summary-metric { padding: 12px; background: var(--bg-panel-soft); border: 1px solid var(--border-color); border-radius: 14px; }
.summary-metric span { color: var(--text-faint); font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .03em; }
.summary-metric strong { display: block; margin-top: 6px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.summary-metric small { display: block; margin-top: 4px; color: var(--text-faint); font-size: 10.5px; }
.text-ok, .text-green { color: var(--ok) !important; }
.text-warn { color: var(--warn) !important; }
.text-bad { color: var(--bad) !important; }

.gauge-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.gauge-card { padding: 16px 18px; display: flex; align-items: center; gap: 16px; }
.gauge-ring-wrap { position: relative; flex: 0 0 auto; width: 108px; height: 108px; }
.gauge-ring-wrap svg { width: 100%; height: 100%; }
.ring-track { fill: none; stroke: var(--bg-panel-soft); }
.ring-fill { fill: none; stroke-linecap: round; transition: stroke-dashoffset .7s; }
.gauge-ring-value { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge-ring-value strong { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.gauge-body { min-width: 0; flex: 1 1 auto; }
.gauge-title { font-weight: 750; font-size: 13px; color: var(--text-main); margin-bottom: 5px; }
.gauge-caption { color: var(--text-muted); font-size: 12px; line-height: 1.5; }

.kpi-story { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.kpi-cluster-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin: 0 0 10px 2px; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.kpi-card { padding: 17px; position: relative; overflow: hidden; }
.kpi-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.kpi-label { color: var(--text-muted); font-size: 11px; text-transform: uppercase; font-weight: 750; letter-spacing: .02em; }
.kpi-value { margin-top: 7px; font-size: 23px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.kpi-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--iconBg); color: var(--iconColor); flex: 0 0 auto; }
.kpi-icon svg { width: 19px; height: 19px; }
.kpi-sub { margin-top: 11px; color: var(--text-muted); font-weight: 550; font-size: 12px; }

.chart-box { position: relative; height: 284px; border-radius: 15px; background: var(--bg-panel-soft); border: 1px solid var(--border-color); padding: 12px; overflow: hidden; }
.chart-detail-actions { display: flex; justify-content: flex-end; margin-top: 11px; }
.chart-detail-btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--bg-panel-soft); color: var(--text-main); font-size: 12.5px; font-weight: 800; cursor: pointer; transition: color .16s, border-color .16s, background .16s, transform .16s; }
.chart-detail-btn:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-1px); }
.chart-detail-chevron { display: inline-block; font-size: 18px; line-height: 1; transition: transform .18s; }
.chart-detail-btn[aria-expanded="true"] { color: var(--brand); background: var(--brand-soft); border-color: transparent; }
.chart-detail-btn[aria-expanded="true"] .chart-detail-chevron { transform: rotate(180deg); }
.trend-detail-panel { grid-column: 1 / -1; padding: 16px; animation: detailOpen .2s ease both; }
.trend-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.trend-detail-heading strong { color: var(--text-main); font-size: 13px; }
.trend-detail-heading span { color: var(--text-muted); font-size: 11px; font-weight: 700; }
.trend-detail-table th:last-child, .trend-detail-table td:last-child { text-align: right; }
.trend-rate-pill { display: inline-flex; justify-content: center; min-width: 68px; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.trend-rate-pill.ok { color: var(--ok); background: var(--ok-soft); }
.trend-rate-pill.warn { color: var(--warn); background: var(--warn-soft); }
.trend-rate-pill.bad { color: var(--bad); background: var(--bad-soft); }
.trend-period-list { gap: 9px; }
.trend-period-card { padding: 12px; border: 1px solid var(--border-color); border-radius: 13px; background: var(--bg-panel-soft); }
.trend-period-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--border-color); }
.trend-period-head > strong { color: var(--text-main); font-size: 13px; text-transform: capitalize; }
.trend-period-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.trend-period-metrics div { min-width: 0; }
.trend-period-metrics span { display: block; color: var(--text-faint); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.trend-period-metrics strong { display: block; margin-top: 4px; color: var(--text-main); font-size: 12px; }

.table-wrap { overflow: auto; min-width: 0; border: 1px solid var(--border-color); border-radius: 15px; background: var(--bg-panel); }
table { width: 100%; border-collapse: collapse; }
th { background: var(--bg-panel-soft); color: var(--text-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; font-weight: 800; padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1; }
td { padding: 11px 12px; border-bottom: 1px solid var(--border-color); font-size: 12.5px; color: var(--text-main); font-weight: 550; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--bg-panel-soft); }
.progress-track { height: 8px; border-radius: 99px; background: var(--bg-panel-soft); border: 1px solid var(--border-color); overflow: hidden; min-width: 88px; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), #e0806f); animation: fillIn .6s ease both; }
.progress-cell { min-width: 100px; vertical-align: middle; }

/* Classes fonctionnelles utilisées directement dans le HTML et les rendus JS. */
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.side-link.muted { color: var(--text-faint); font-weight: 600; }
.side-link.muted:hover { color: var(--text-main); }
.side-link.muted span:first-child { color: var(--text-faint); }
.status-pill.neutral { color: var(--text-faint); background: var(--bg-panel-soft); border-color: var(--border-color); }
.filter-card.sticky-filter { position: sticky; top: 0; z-index: 15; }
.filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.theme-toggle-item { cursor: pointer; }
.theme-toggle-item:hover { background: var(--bg-panel); }
.help-hero-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.help-hero-text { flex: 1 1 260px; min-width: 0; }
.help-hero-text h2 { margin: 0 0 6px; font-size: 16px; }
.help-hero-text p { margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }
@keyframes fillIn { from { width: 0; } }

/* ========== STORE TABS (utilisés dans toutes les listes) ========== */
.store-tab-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.store-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 13px; border: 1.5px solid var(--border-color); background: var(--bg-panel-soft); color: var(--text-muted); font-weight: 750; font-size: 13px; cursor: pointer; transition: transform .15s, border-color .15s, background .15s, color .15s; }
.store-tab:hover { border-color: var(--border-strong); color: var(--text-main); transform: translateY(-1px); }
.store-tab.active { background: var(--tabBg); border-color: transparent; color: var(--tabText); }
.store-tab .store-dot { width: 9px; height: 9px; }
.store-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.store-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px 4px 7px; font-size: 11px; font-weight: 700; background: var(--bg-panel-soft); border: 1px solid var(--border-color); color: var(--text-main); white-space: nowrap; }
.metric-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; font-size: 10.5px; font-weight: 750; background: var(--bg-panel-soft); border: 1px solid var(--border-color); color: var(--text-muted); }

.alert-list, .reco-list, .brand-detail-list, .inventory-history { display: grid; gap: 11px; }
.alert-card { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 13px 14px; border-radius: 15px; background: var(--bg-panel-soft); border: 1px solid var(--border-color); }
.alert-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: var(--bg-panel); color: var(--text-muted); }
.alert-icon svg { width: 16px; height: 16px; }
.alert-danger .alert-icon { background: var(--bad-soft); color: var(--bad); }
.alert-warning .alert-icon { background: var(--warn-soft); color: var(--warn); }
.alert-success .alert-icon { background: var(--ok-soft); color: var(--ok); }
.alert-title { font-weight: 750; font-size: 13px; }
.alert-message { margin-top: 4px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.brand-row-card, .detail-card, .reco-card { padding: 14px; }
.brand-row-line, .detail-line { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.brand-title, .detail-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.brand-meta, .detail-meta, .reco-text { color: var(--text-muted); font-size: 12px; line-height: 1.5; margin-top: 5px; }
.detail-btn { border: 1px solid var(--border-color); background: var(--bg-panel-soft); color: var(--text-main); border-radius: 11px; padding: 7px 11px; font-weight: 700; font-size: 12px; cursor: pointer; white-space: nowrap; }
.detail-btn:hover { border-color: var(--border-strong); }
.brand-detail-content, .detail-content { display: none; margin-top: 12px; }
.brand-detail-content.open, .detail-content.open { display: block; animation: detailOpen .2s ease both; }
@keyframes detailOpen { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.inventory-list-heading { margin: 2px 0 10px; color: var(--text-faint); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.inventory-entry { padding: 12px; margin-top: 10px; border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-panel-soft); }
.inventory-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.inventory-entry-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.inventory-entry-head > span { color: var(--text-muted); font-size: 11.5px; text-align: right; }

/* ========== CONTROL & FORECAST ========== */
.control-hero { padding: 20px; margin-bottom: 18px; }
.control-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.control-hero-title { display: flex; align-items: center; gap: 10px; }
.control-hero-title h2 { margin: 0; font-size: 16.5px; font-weight: 800; }
.control-hero-text { margin: 6px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.6; max-width: 62ch; }
.efficiency-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.efficiency-badge.ok { background: var(--ok-soft); color: var(--ok); }
.efficiency-badge.warn { background: var(--warn-soft); color: var(--warn); }
.efficiency-badge.bad { background: var(--bad-soft); color: var(--bad); }
.control-flow { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.control-coverage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.control-coverage-card { min-width: 0; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-panel-soft); }
.control-coverage-card span { display: block; color: var(--text-faint); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.control-coverage-card strong { display: block; margin-top: 6px; font-size: 18px; }
.control-coverage-card small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 10.5px; line-height: 1.45; }
.flow-step { flex: 1 1 150px; padding: 15px 16px; border-top: 3px solid var(--stepColor, var(--border-strong)); }
.flow-step-eyebrow { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.flow-step-value { margin-top: 7px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--stepColor, var(--text-main)); }
.flow-step-sub { margin-top: 5px; font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.flow-arrow { flex: 0 0 auto; width: 26px; display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.flow-arrow svg { width: 16px; height: 16px; }

.reco-priority { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 10.5px; font-weight: 800; }
.reco-title { margin-top: 9px; font-weight: 750; font-size: 13px; }
.projection-head, .decision-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.projection-confidence { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 6px 10px; border-radius: 999px; white-space: nowrap; font-size: 10.5px; font-weight: 800; border: 1px solid var(--border-color); background: var(--bg-panel-soft); color: var(--text-muted); }
.projection-confidence.indicative { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.projection-confidence.prudent { color: var(--info); background: var(--info-soft); border-color: transparent; }
.projection-confidence.consolidated { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.projection-confidence.insufficient { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.scenario-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 2px 0 13px; }
.scenario-card { min-width: 0; padding: 12px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--bg-panel-soft); }
.scenario-card span, .decision-metric > span { display: block; color: var(--text-faint); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.scenario-card strong { display: block; margin-top: 7px; font-size: 17px; line-height: 1.2; }
.scenario-card small, .decision-metric small { display: block; margin-top: 5px; color: var(--text-muted); font-size: 10.5px; line-height: 1.4; }
.scenario-card.favorable { border-top: 3px solid var(--ok); }
.scenario-card.central { border-top: 3px solid var(--info); }
.scenario-card.vigilance { border-top: 3px solid var(--bad); }
.projection-empty { grid-column: 1 / -1; display: grid; gap: 5px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.projection-empty strong { color: var(--text-main); font-size: 13px; }
.projection-method { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 11.5px; line-height: 1.55; }
.projection-method summary { color: var(--text-main); cursor: pointer; font-weight: 750; }
.projection-method p { margin: 8px 0 0; }
.decision-hero { margin-bottom: 16px; background: linear-gradient(135deg, var(--bg-panel), var(--bg-panel-soft)); }
.decision-eyebrow { display: block; margin-bottom: 5px; color: var(--brand); font-size: 10.5px; font-weight: 850; text-transform: uppercase; letter-spacing: .075em; }
.decision-hero h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.decision-hero p { max-width: 82ch; margin: 7px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.forecast-volume-planner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 210px) auto; align-items: end; gap: 12px; margin-top: 15px; padding: 13px 14px; border: 1px solid var(--border-color); border-radius: 15px; background: var(--bg-panel-soft); }
.forecast-volume-planner > div { display: grid; gap: 4px; }
.forecast-volume-planner strong { font-size: 13px; }
.forecast-volume-planner > div span, .forecast-volume-planner label span { color: var(--text-muted); font-size: 11px; line-height: 1.4; }
.forecast-volume-planner label { display: grid; gap: 5px; }
.forecast-volume-planner input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-panel); color: var(--text-main); font: inherit; font-weight: 750; }
.forecast-scenario-grid { margin-top: 10px; }
.decision-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.decision-metric { min-width: 0; padding: 13px 14px; border: 1px solid var(--border-color); border-radius: 14px; background: var(--bg-panel); }
.decision-metric strong { display: block; margin-top: 7px; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.decision-metric.impact { border-left: 3px solid var(--violet); }
.decision-metric.gap { border-left: 3px solid var(--bad); }
.decision-metric.control { border-left: 3px solid var(--ok); }
.decision-metric.priority { border-left: 3px solid var(--brand); }
.threshold-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.threshold-card { padding: 15px; }
.threshold-card h3 { margin: 0 0 8px; font-weight: 800; font-size: 13.5px; }
.threshold-card p { color: var(--text-muted); font-size: 12px; line-height: 1.65; }
.help-table { margin-top: 14px; }
.chart-note, .empty-note, .control-open-note, .mini-trend { color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.mini-trend { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; }
.has-tip { position: relative; }
.has-tip:hover::after { content: attr(data-tip); position: absolute; left: 14px; right: 14px; bottom: calc(100% + 10px); z-index: 60; background: var(--bg-panel); color: var(--text-main); border: 1px solid var(--border-color); box-shadow: var(--shadow-hover); border-radius: 13px; padding: 12px; font-size: 12px; line-height: 1.45; animation: tipIn .14s ease both; }
@keyframes tipIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.loader { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(15,20,30,.30); backdrop-filter: blur(3px); z-index: 100; }
.loader-card { width: min(340px, calc(100vw - 40px)); background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; text-align: center; box-shadow: var(--shadow-hover); }
.loader-spin { width: 40px; height: 40px; border-radius: 50%; border: 3.5px solid var(--bg-panel-soft); border-top-color: var(--brand); margin: 0 auto 14px; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-card p { margin: 0; font-weight: 800; font-size: 14px; }
.loader-card span { display: block; margin-top: 7px; color: var(--text-muted); font-size: 12px; }
.offline-banner { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 260; width: min(520px, calc(100% - 24px)); padding: 9px 14px; border-radius: 0 0 13px 13px; background: #7b4b00; color: #fff; text-align: center; font-size: 12px; font-weight: 750; box-shadow: var(--shadow-hover); }
.login-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg-base); padding: 24px; }
.login-card { width: min(380px, 100%); background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 22px; padding: 30px 28px; box-shadow: var(--shadow-hover); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-card h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.login-sub { margin: 6px 0 20px; color: var(--text-muted); font-size: 12.5px; line-height: 1.55; }
.login-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.login-field span { color: var(--label-color); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.login-error { min-height: 18px; color: var(--bad); font-size: 12.5px; font-weight: 650; margin-bottom: 6px; }
.login-submit { width: 100%; justify-content: center; margin-top: 6px; padding: 13px; font-size: 13.5px; }

.whatsapp-card { flex: 0 1 340px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border: none; background: linear-gradient(135deg, #29d073, #128c7e); box-shadow: 0 12px 26px rgba(18,140,126,.22); }
.whatsapp-card-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.whatsapp-icon-wrap { width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.2); display: grid; place-items: center; color: #fff; }
.whatsapp-icon-wrap svg { width: 22px; height: 22px; }
.whatsapp-card-name { color: #fff; font-weight: 800; font-size: 13.5px; }
.whatsapp-card-number { color: rgba(255,255,255,.85); font-size: 12px; margin-top: 2px; font-family: 'JetBrains Mono', monospace; }
.whatsapp-btn { flex: 0 0 auto; background: #fff; color: #128c7e; border-radius: 11px; padding: 10px 15px; font-weight: 800; font-size: 12.5px; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap; }

@media (max-width: 1180px) and (min-width: 901px) {
  .app-shell { grid-template-columns: 224px minmax(0, 1fr); }
  .topbar, .content-area { padding-left: 20px; padding-right: 20px; }
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-card { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-main { grid-column: 1 / -1; }
}

/* ========== MOBILE STYLES (Nouvelle interface) ========== */
@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
  
  .app-shell { display: flex; flex-direction: column; width: 100%; min-height: 100dvh; height: 100dvh; position: relative; overflow: hidden; }
  .main-panel { flex: 1; min-width: 0; width: 100%; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; padding-bottom: calc(70px + env(safe-area-inset-bottom)); overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
  
  /* Topbar mobile */
  .topbar-mobile { position: sticky; top: 0; z-index: 30; background: var(--bg-panel); border-bottom: 1px solid var(--border-color); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
  .topbar-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--text-main); }
  .icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-panel); color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .2s, background .2s; flex: 0 0 auto; }
  .icon-btn:active { transform: scale(0.95); }
  .icon-btn svg, .icon-btn [data-icon] { width: 20px; height: 20px; }
  
  /* Page header mobile */
  .page-header { padding: 16px 16px 12px; border-bottom: 1px solid var(--border-color); background: var(--bg-panel-soft); }
  .page-title { margin: 0; font-size: 18px; font-weight: 800; color: var(--text-main); letter-spacing: -.01em; }
  
  /* Contenu mobile */
  .content-area { flex: 0 0 auto; width: 100%; min-width: 0; padding: 16px; overflow: visible; }
  .filter-card, .panel-card { margin-bottom: 16px; }
  .filter-head { flex-direction: column; }
  .filter-grid { grid-template-columns: 1fr; }
  .summary-card { grid-template-columns: 1fr; }
  .gauge-strip { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .two-cols { grid-template-columns: 1fr; }
  .store-tab-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
  .store-tab { flex: 0 0 auto; scroll-snap-align: start; }
  .table-wrap { overflow-x: auto; }
  .panel-card, .brand-row-card, .detail-card, .inventory-entry { min-width: 0; max-width: 100%; }
  .panel-head.with-search, .brand-row-line, .detail-line, .inventory-entry-head { align-items: stretch; flex-direction: column; }
  .panel-head.with-search input { max-width: none; }
  .inventory-entry-head > span { text-align: left; }
  
  /* Sidebar mobile (drawer) */
  .mobile-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; background: var(--bg-panel); z-index: 150; display: flex; flex-direction: column; padding: 16px; box-shadow: 2px 0 8px rgba(0,0,0,.12); overflow-y: auto; transform: translateX(-100%); transition: transform .3s ease; }
  .mobile-sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 140; opacity: 0; pointer-events: none; transition: opacity .3s; display: none; }
  .sidebar-overlay.visible { opacity: 1; pointer-events: auto; display: block; }
  .sidebar-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
  .sidebar-header-text { min-width: 0; }
  .sidebar-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
  .sidebar-subtitle { font-size: 14px; font-weight: 800; line-height: 1.2; color: var(--text-main); margin-top: 2px; }
  .sidebar-section { margin-bottom: 24px; }
  .sidebar-section-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 10px; }
  .sidebar-params { display: grid; gap: 8px; }
  .param-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--bg-panel-soft); border: 1px solid var(--border-color); border-radius: 10px; font-size: 13px; color: var(--text-main); }
  .param-item span { font-weight: 600; }
  .icon-link { background: none; border: none; color: var(--text-main); cursor: pointer; padding: 0; font-size: 18px; }
  .store-legend { padding: 12px; background: var(--bg-panel-soft); border: 1px solid var(--border-color); border-radius: 12px; }
  .store-legend-title { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); margin-bottom: 10px; }
  .store-legend-list { display: flex; flex-direction: column; gap: 8px; }
  .store-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-main); }
  .sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-color); }
  .logout-btn { width: 100%; padding: 14px; background: var(--brand-soft); color: var(--brand); border: none; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .logout-btn:active { transform: scale(0.98); }
  
  /* Bottom navigation */
  .mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(70px + env(safe-area-inset-bottom)); background: var(--bg-panel); border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; align-items: stretch; z-index: 120; padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav.hidden { display: none; }
  .nav-item { position: relative; flex: 1; min-width: 0; height: 70px; background: none; border: none; color: var(--text-faint); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 9px; font-weight: 700; transition: color .2s, transform .2s; }
  .nav-item > span:not(.badge-dot) { max-width: 68px; line-height: 1.05; text-align: center; overflow-wrap: normal; }
  .nav-item svg { width: 24px; height: 24px; }
  .nav-item.active { color: var(--brand); }
  .nav-item:first-child svg { width: 34px; height: 34px; } /* Accent sur l'icone Vue d'ensemble */
  .badge-dot { position: absolute; top: 9px; left: calc(50% + 9px); width: 9px; height: 9px; background: var(--bad); border: 2px solid var(--bg-panel); border-radius: 50%; }
  
  /* Filtres panel mobile */
  .filters-panel { position: fixed; bottom: 0; left: 0; right: 0; top: auto; background: var(--bg-panel); border-top: 1px solid var(--border-color); border-radius: 20px 20px 0 0; padding: 20px 16px; z-index: 100; max-height: 90vh; overflow-y: auto; animation: slideUp .3s ease both; }
  .filters-panel.hidden { display: none; }
  @keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
  .filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
  .filter-header h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--text-main); }
  .close-btn { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; width: 30px; height: 30px; }
  .filter-controls { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .filter-input { display: flex; flex-direction: column; gap: 6px; }
  .filter-input span { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); letter-spacing: .04em; }
  .filter-input input, .filter-input select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--bg-panel-soft); color: var(--text-main); outline: none; font-size: 14px; }
  .filter-input input:focus, .filter-input select:focus { border-color: var(--brand); }
  .filter-apply-btn { width: 100%; padding: 14px; margin-top: 12px; border: 0; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
  
  /* Chips de filtres actifs */
  .filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
  .chip { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-soft); color: var(--brand); border: 1px solid transparent; border-radius: 20px; padding: 4px 10px; font-size: 10px; font-weight: 700; }
  .chip-neutral { background: var(--bg-panel); color: var(--text-muted); border-color: var(--border-color); }
  
  /* Pull-to-refresh indicator */
  .pull-indicator.mobile-only { position: fixed; top: 64px; left: 50%; right: auto; transform: translate(-50%, -130%); z-index: 95; width: min(330px, calc(100% - 32px)); background: var(--bg-panel); color: var(--text-main); text-align: center; padding: 10px 14px; font-size: 12px; font-weight: 700; display: block; opacity: 0; pointer-events: none; border: 1px solid var(--border-color); border-radius: 999px; box-shadow: var(--shadow-sm); transition: transform .18s ease, opacity .18s ease, background .18s ease; }
  .pull-indicator.visible { transform: translate(-50%, 0); opacity: 1; }
  .pull-indicator.ready { background: var(--ok-soft); color: var(--ok); }
  .pull-indicator.syncing { background: var(--info-soft); color: var(--info); }
  
  /* Graphiques mobiles : plus d'air pour les légendes et une conclusion lisible d'un coup d'œil. */
  .chart-box { height: 260px; }
  .panel-head p[id$="Note"] { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--info); border-radius: 7px; background: var(--info-soft); color: var(--text-main); font-weight: 650; }
  .chart-detail-btn { width: 100%; min-height: 44px; }
  .trend-period-list.mobile-only { display: grid; }
  .trend-period-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
  .kpi-value { font-size: 20px; }
  .projection-head, .decision-hero-top { align-items: flex-start; flex-direction: column; }
  .control-coverage { grid-template-columns: 1fr; }
  .forecast-volume-planner { grid-template-columns: 1fr; align-items: stretch; }
  .forecast-volume-planner .detail-btn { width: 100%; min-height: 42px; }
  .scenario-grid { grid-template-columns: 1fr; gap: 7px; }
  .scenario-card { padding: 9px 8px; }
  .scenario-card strong { font-size: 14px; }
  .scenario-card small { font-size: 9.5px; }
  .control-projection-chart { height: 238px; }
  .decision-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-metric { padding: 11px; }
  .decision-metric strong { font-size: 15px; }
}

/* Mode paysage : davantage d'informations visibles sans sacrifier les zones tactiles. */
@media (max-width: 900px) and (orientation: landscape) {
  .main-panel { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .topbar-mobile { padding: 7px 14px; }
  .topbar-title { font-size: 15px; }
  .icon-btn { width: 36px; height: 36px; }
  .page-header { padding: 9px 16px; }
  .page-header .filter-chips { margin-top: 6px; }
  .content-area { padding: 12px 16px 22px; }
  .mobile-nav { height: calc(58px + env(safe-area-inset-bottom)); }
  .nav-item { height: 58px; }
  .nav-item svg, .nav-item:first-child svg { width: 21px; height: 21px; }
  .badge-dot { top: 5px; }
  .summary-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-main { grid-column: 1 / -1; }
  .gauge-strip, .two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .scenario-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .control-coverage { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .forecast-volume-planner { grid-template-columns: minmax(0, 1fr) minmax(140px, 190px) auto; }
  .filters-panel { max-height: 96dvh; padding: 14px 18px; }
  .filter-header { margin-bottom: 12px; }
  .filter-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
  .filter-apply-btn { grid-column: 1 / -1; margin-top: 2px; }
  .mobile-sidebar { width: min(360px, 72vw); }
  .pull-indicator.mobile-only { top: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ========== EXTRA SMALL SCREEN ========== */
@media (max-width: 320px) {
  .page-title { font-size: 16px; }
  .topbar-title { font-size: 14px; }
  .kpi-value { font-size: 18px; }
}
