/* LiveGoOrder CRM — module Statistiques (v4.19.0) */
.st-root{ display:flex; flex-direction:column; gap:16px; min-width:0; transition:opacity .2s; }
.st-root.loading{ opacity:.65; pointer-events:none; }
.st-hero{ display:flex !important; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; background:linear-gradient(120deg,#f3ecff 0%,#e9f6ff 55%,#eafbf3 100%) !important; }
.st-hero-main{ min-width:0; flex:1 1 360px; }
.st-hero-main h2{ font-size:clamp(20px,2.4vw,28px) !important; line-height:1.2; margin:4px 0 6px; overflow-wrap:anywhere; }
.st-hero-main p{ margin:0; font-size:13px !important; max-width:780px; line-height:1.5; }
.st-period-label{ display:block; margin-top:8px; color:#8c8095; font-weight:700; letter-spacing:.02em; }
.st-hero-actions{ display:flex; gap:10px; flex-wrap:wrap; }

.st-controls{ display:flex; flex-wrap:wrap; gap:12px 18px; align-items:center; justify-content:space-between; padding:12px 14px; border:1px solid var(--border,#e6dfee); border-radius:16px; background:#fff; }
.st-presets{ display:flex; gap:6px; flex-wrap:wrap; }
.st-chip{ min-height:34px; padding:0 13px; border:1px solid var(--border,#e6dfee); border-radius:99px; background:#fff; font:inherit; font-size:12px; font-weight:700; color:#6d6277; cursor:pointer; }
.st-chip:hover{ border-color:#c9b6dd; } .st-chip.active{ background:var(--primary,#6b2fa0); border-color:var(--primary,#6b2fa0); color:#fff; box-shadow:0 4px 12px rgba(107,47,160,.28); }
.st-custom{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; } .st-custom.hidden{ display:none !important; } .st-custom input{ min-height:36px; }
.st-toggles{ display:flex; gap:16px; flex-wrap:wrap; }
.st-switch{ display:inline-flex !important; flex-direction:row !important; align-items:center; gap:8px; margin:0; font-size:12px; font-weight:700; color:#6d6277; cursor:pointer; }
.st-switch input{ width:16px; height:16px; accent-color:var(--primary,#6b2fa0); }

.st-tabs{ display:flex !important; flex-direction:row !important; gap:6px; overflow-x:auto; padding:5px; border:1px solid var(--border,#e6dfee); border-radius:16px; background:#fff; scrollbar-width:none; }
.st-tabs::-webkit-scrollbar{ display:none; }
.st-tab{ flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; min-height:40px; padding:0 16px; border:0; border-radius:12px; background:transparent; font:inherit; font-size:13px; font-weight:700; color:#6d6277; cursor:pointer; white-space:nowrap; }
.st-tab:hover{ background:rgba(107,47,160,.07); } .st-tab.active{ background:var(--primary,#6b2fa0); color:#fff; box-shadow:0 6px 16px rgba(107,47,160,.28); }
.st-tab b{ padding:1px 7px; border-radius:99px; background:rgba(107,47,160,.14); font-size:11px; } .st-tab.active b{ background:rgba(255,255,255,.25); }
.st-pane{ display:flex; flex-direction:column; gap:16px; min-width:0; animation:stFade .25s ease; } .st-pane.hidden{ display:none !important; }
@keyframes stFade{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce){ .st-pane{ animation:none; } }

.st-grid-hero{ display:grid; grid-template-columns:minmax(260px,340px) minmax(0,1fr); gap:16px; align-items:stretch; }
.st-grid-2{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.st-grid-3{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:start; }
@media (max-width:1100px){ .st-grid-hero,.st-grid-2{ grid-template-columns:minmax(0,1fr); } .st-grid-3{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px){ .st-grid-3{ grid-template-columns:minmax(0,1fr); } }

.st-card{ min-width:0; padding:18px; border:1px solid var(--border,#e6dfee); border-radius:18px; background:#fff; box-shadow:0 2px 12px rgba(60,20,90,.05); }
.st-card-head{ display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.st-card-head h3{ margin:0; font-size:15px; } .st-card-head small{ color:#8c8095; font-size:11px; }

.st-kpis{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
@media (max-width:900px){ .st-kpis{ grid-template-columns:repeat(2,minmax(0,1fr)); } } @media (max-width:420px){ .st-kpis{ grid-template-columns:minmax(0,1fr); } }
.st-kpi{ position:relative; display:grid; gap:6px; align-content:start; padding:15px 16px 12px; border:1px solid var(--border,#e6dfee); border-radius:18px; background:#fff; box-shadow:0 2px 12px rgba(60,20,90,.05); overflow:hidden; min-width:0; transition:transform .15s, box-shadow .15s; }
.st-kpi:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(60,20,90,.10); }
.st-kpi::before{ content:""; position:absolute; inset:0 0 auto 0; height:3px; background:var(--c); }
.st-kpi-top{ display:flex; align-items:center; gap:8px; } .st-kpi-ico{ display:grid; place-items:center; width:28px; height:28px; border-radius:9px; background:color-mix(in srgb,var(--c) 14%,#fff); font-size:14px; }
.st-kpi-label{ font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:#8c8095; }
.st-kpi strong{ font-size:clamp(19px,2vw,25px); line-height:1.15; color:#1f1630; overflow-wrap:anywhere; }
.st-kpi-foot{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; } .st-kpi-foot small{ color:#8c8095; font-size:11px; }
.st-spark{ width:100%; height:30px; margin-top:2px; display:block; }
.st-delta{ display:inline-flex; align-items:center; padding:2px 8px; border-radius:99px; font-size:11px; font-weight:800; }
.st-delta.good{ background:#d1fae5; color:#047857; } .st-delta.bad{ background:#fee2e2; color:#b91c1c; } .st-delta.flat{ background:#f1ecf6; color:#6d6277; }

.st-minis{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.st-mini{ display:grid; gap:2px; padding:13px 15px; border:1px solid var(--border,#e6dfee); border-radius:15px; background:#fff; }
.st-mini span{ font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:#8c8095; } .st-mini strong{ font-size:20px; color:#1f1630; overflow-wrap:anywhere; } .st-mini small{ font-size:11px; color:#8c8095; }
.st-mini.good strong{ color:#047857; } .st-mini.warn strong{ color:#b45309; } .st-mini.bad strong{ color:#b91c1c; }

/* score */
.st-score-body{ display:flex; align-items:center; gap:16px; margin-bottom:14px; }
.st-ring{ --p:0; --c:#7c3aed; flex:0 0 auto; display:grid; place-items:center; width:104px; height:104px; border-radius:50%; background:conic-gradient(var(--c) calc(var(--p)*1%), #efe9f6 0); }
.st-ring > div{ display:grid; place-items:center; width:80px; height:80px; border-radius:50%; background:#fff; } .st-ring strong{ font-size:28px; line-height:1; } .st-ring small{ display:block; font-size:10px; color:#8c8095; margin-top:-8px; }
.st-score-text{ display:grid; gap:4px; min-width:0; } .st-score-text strong{ font-size:18px; } .st-score-text small{ color:#6d6277; font-size:12px; line-height:1.4; }
.st-parts{ display:grid; gap:9px; } .st-part-top{ display:flex; justify-content:space-between; font-size:12px; font-weight:700; } .st-part small{ color:#8c8095; font-size:11px; }
.st-meter{ height:7px; border-radius:99px; background:#f1ecf6; overflow:hidden; margin:4px 0 3px; } .st-meter i{ display:block; height:100%; border-radius:99px; transition:width .5s; }

/* charts */
.st-chart{ min-width:0; } .st-svg{ width:100%; height:auto; display:block; overflow:visible; }
.st-grid{ stroke:#eee7f4; stroke-width:1; } .st-axis{ font-size:10px; fill:#8c8095; } .st-crossline{ stroke:#c9b6dd; stroke-width:1; stroke-dasharray:3 3; }
.st-line{ transition:opacity .2s; } .st-bar{ transition:opacity .15s; } .st-bhit:hover ~ .st-bar{ opacity:.8; }
.st-bhit{ cursor:crosshair; } .st-hit{ cursor:crosshair; }
.st-legend{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.st-legend-item{ display:inline-flex; align-items:center; gap:7px; padding:4px 10px; border:1px solid var(--border,#e6dfee); border-radius:99px; background:#fff; font:inherit; font-size:11px; font-weight:700; color:#6d6277; cursor:pointer; }
.st-legend-item i{ width:9px; height:9px; border-radius:3px; } .st-legend-item.off{ opacity:.45; text-decoration:line-through; }
.st-empty{ display:grid; place-items:center; min-height:90px; padding:16px; border:1px dashed var(--border,#d9cfe6); border-radius:12px; color:#8c8095; font-size:13px; text-align:center; }
.st-note{ margin:10px 0 0; padding:9px 12px; border-radius:10px; background:#fff7ed; color:#9a3412; font-size:12px; }

.st-donut{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:14px; align-items:center; }
@media (max-width:520px){ .st-donut{ grid-template-columns:minmax(0,1fr); justify-items:center; } .st-donut-legend{ width:100%; } }
.st-donut-ring{ position:relative; width:150px; height:150px; flex:0 0 auto; } .st-donut-ring svg{ width:100%; height:100%; }
.st-seg{ transition:stroke-width .15s; cursor:pointer; } .st-seg.hot{ stroke-width:27; }
.st-donut-center{ position:absolute; inset:0; display:grid; place-content:center; text-align:center; pointer-events:none; } .st-donut-center strong{ font-size:19px; line-height:1.1; } .st-donut-center small{ font-size:10px; color:#8c8095; }
.st-donut-legend{ list-style:none; margin:0; padding:0; display:grid; gap:6px; min-width:0; }
.st-donut-legend li{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:8px; align-items:center; font-size:12px; } .st-dv{ display:grid; text-align:right; } .st-dv b{ white-space:nowrap; } .st-donut-legend i{ width:10px; height:10px; border-radius:3px; }
.st-donut-legend span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .st-donut-legend small{ color:#8c8095; }

.st-hbars{ display:grid; gap:11px; } .st-hbar-top{ display:flex; justify-content:space-between; gap:10px; font-size:12px; } .st-hbar-label{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:700; }
.st-hbar-top b{ white-space:nowrap; } .st-hbar-track{ height:9px; margin:5px 0 2px; border-radius:99px; background:#f1ecf6; overflow:hidden; } .st-hbar-track i{ display:block; height:100%; border-radius:99px; transition:width .5s; }
.st-hbar small{ color:#8c8095; font-size:11px; }

.st-heat{ display:grid; grid-template-columns:34px repeat(24,minmax(0,1fr)); gap:3px; align-items:center; }
.st-heat-h,.st-heat-d{ font-size:9px; color:#8c8095; text-align:center; } .st-heat-d{ text-align:left; font-weight:700; }
.st-heat-c{ aspect-ratio:1; min-height:14px; border-radius:4px; background:rgba(124,58,237,var(--a)); border:1px solid #f3eef8; cursor:crosshair; } .st-heat-c[data-v="0"]{ background:#faf7fd; }

.st-table th,.st-table td{ vertical-align:middle; }
.st-pill{ display:inline-block; padding:2px 9px; border-radius:99px; font-size:11px; font-weight:800; background:#f1ecf6; color:#6d6277; }
.st-pill.good{ background:#d1fae5; color:#047857; } .st-pill.warn{ background:#fef3c7; color:#b45309; } .st-pill.bad{ background:#fee2e2; color:#b91c1c; }
.st-pill.seg{ background:color-mix(in srgb,var(--c) 16%,#fff); color:color-mix(in srgb,var(--c) 70%,#000); }

.st-advice{ display:grid; gap:10px; } .st-advice-row{ display:flex; gap:10px; align-items:flex-start; } .st-advice-row i{ flex:0 0 10px; height:10px; margin-top:5px; border-radius:3px; } .st-advice-row b{ display:block; font-size:13px; } .st-advice-row small{ color:#6d6277; font-size:12px; }

.st-insight-list{ display:grid; gap:9px; max-height:520px; overflow-y:auto; } .st-insight-list.compact{ max-height:340px; }
.st-insight{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center; padding:11px 13px; border:1px solid var(--border,#e6dfee); border-left-width:4px; border-radius:12px; background:#fff; }
.st-insight.positive{ border-left-color:#10b981; background:#f0fdf8; } .st-insight.warning{ border-left-color:#f59e0b; } .st-insight.danger{ border-left-color:#ef4444; background:#fef2f2; } .st-insight.info{ border-left-color:#3b82f6; }
.st-insight b{ display:block; font-size:13px; } .st-insight small{ display:block; margin-top:2px; color:#6d6277; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
@media (max-width:560px){ .st-insight{ grid-template-columns:auto minmax(0,1fr); } .st-insight .btn{ grid-column:1 / -1; } }

/* tooltip */
.st-tip{ position:fixed; z-index:9999; pointer-events:none; min-width:140px; max-width:260px; padding:9px 11px; border-radius:11px; background:#1f1630; color:#fff; font-size:12px; box-shadow:0 12px 30px rgba(20,8,40,.35); opacity:0; transform:translateY(4px); transition:opacity .1s, transform .1s; }
.st-tip.show{ opacity:1; transform:none; } .st-tip b{ display:block; margin-bottom:4px; } .st-tip-row{ display:flex; align-items:center; gap:7px; margin-top:3px; } .st-tip-row span{ flex:1; opacity:.85; } .st-tip-row b{ display:inline; margin:0; } .st-tip-row i{ width:8px; height:8px; border-radius:2px; }

@media print{ .st-controls,.st-tabs,.st-hero-actions,.sidebar,.topbar{ display:none !important; } .st-pane.hidden{ display:flex !important; } .st-card,.st-kpi{ break-inside:avoid; box-shadow:none; } }

.st-table{ font-size:12px; } .st-table th,.st-table td{ padding:10px 8px !important; }
.st-kpis{ align-content:start; }
