/* ===== EnergyX Az - Analitika / Planlaşdırma / Təqdimat stilləri ===== */
.panel-title { font-size:24px; margin-top:32px; }
.panel-lead { color:var(--text-lo); font-size:15px; margin:10px 0 20px; }

.present-btn { background:none; border:1px solid var(--accent); color:var(--accent); font-family:inherit; font-weight:700;
  font-size:12px; padding:5px 12px; border-radius:20px; cursor:pointer; white-space:nowrap; }
.present-btn:hover, .present-btn.on { background:var(--accent); color:var(--accent-ink); }

.ghost-btn { display:inline-flex; align-items:center; gap:6px; background:none; border:1px solid var(--border); color:var(--text-lo);
  font-family:inherit; font-size:13px; padding:8px 13px; border-radius:10px; cursor:pointer; }
.ghost-btn:hover, .ghost-btn:focus-visible { border-color:var(--accent); color:var(--text-hi); }
.backup-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.meter-month { flex:0 0 150px !important; color-scheme:dark; }

.source-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.source-row label { font-size:13px; color:var(--text-lo); }
.source-row select { background:var(--surface); border:1px solid var(--border); color:var(--text-hi); border-radius:10px;
  padding:9px 12px; font-family:inherit; font-size:14px; min-width:180px; }
.hint-box { background:rgba(47,143,255,0.08); border:1px solid rgba(47,143,255,0.35); color:var(--info-text); border-radius:12px;
  padding:12px 16px; font-size:13px; line-height:1.55; margin:12px 0; }

.pro-card { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:22px 22px 20px; margin-bottom:18px; }
.pro-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:6px; }
.pro-card h2 { font-size:18px; }
.pro-tag { font-size:11px; color:var(--text-lo); border:1px solid var(--border); padding:3px 10px; border-radius:20px; }
.pro-lead { font-size:13.5px; color:var(--text-lo); margin-bottom:14px; line-height:1.55; }
.pro-sub { font-size:14px; margin:18px 0 10px; }
.pro-note { font-size:11.5px; color:var(--text-lo); margin-top:12px; line-height:1.5; }
.chart-box { position:relative; height:240px; }

/* Sağlamlıq balı */
.health-wrap { display:flex; gap:24px; align-items:center; flex-wrap:wrap; margin-top:10px; }
.health-ring { position:relative; width:150px; height:150px; border-radius:50%; flex-shrink:0; transition:background .4s; }
.health-ring::before { content:''; position:absolute; inset:12px; border-radius:50%; background:var(--surface); }
.health-inner { position:relative; z-index:1; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.health-score { font-size:42px; font-weight:700; line-height:1; font-variant-numeric:tabular-nums; }
.health-grade { font-size:12px; color:var(--text-lo); margin-top:4px; }
.health-factors { flex:1; min-width:220px; }
.health-sub { font-size:12px; color:var(--text-lo); margin-bottom:10px; }
.factor { margin-bottom:10px; }
.factor-top { display:flex; justify-content:space-between; font-size:13px; margin-bottom:4px; gap:10px; }
.factor-top b { color:var(--high); font-variant-numeric:tabular-nums; white-space:nowrap; }
.factor-bar { height:6px; background:var(--track); border-radius:4px; overflow:hidden; }
.factor-bar div { height:100%; background:linear-gradient(90deg,var(--mid),var(--high)); border-radius:4px; }
.factor-ok { font-size:14px; color:var(--low); padding:8px 0; }

/* Hadisə xronologiyası */
.tl-item { display:flex; gap:14px; position:relative; padding-bottom:16px; }
.tl-item:not(:last-child)::after { content:''; position:absolute; left:5px; top:16px; bottom:0; width:2px; background:var(--border); }
.tl-dot { width:12px; height:12px; border-radius:50%; margin-top:4px; flex-shrink:0; background:var(--mid); }
.tl-item.anomaly .tl-dot { background:var(--high); box-shadow:0 0 0 4px color-mix(in srgb, var(--high) 15%, transparent); }
.tl-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:14px; }
.tl-badge { font-size:11px; font-weight:700; padding:2px 9px; border-radius:20px; }
.tl-badge.anomaly { background:color-mix(in srgb, var(--high) 15%, transparent); color:var(--high-text); }
.tl-badge.watch { background:color-mix(in srgb, var(--mid) 15%, transparent); color:var(--mid); }
.tl-badge.ok { background:color-mix(in srgb, var(--low) 15%, transparent); color:var(--low); }
.tl-z { font-size:11px; color:var(--text-lo); font-variant-numeric:tabular-nums; }
.tl-detail { font-size:13px; color:var(--text-hi); margin-top:3px; }
.tl-cause { font-size:12.5px; color:var(--text-lo); margin-top:3px; line-height:1.5; }

/* KPI */
.kpi-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px; }
.kpi-grid.four { grid-template-columns:repeat(4,1fr); }
.kpi { background:var(--bg2); border:1px solid var(--border); border-radius:12px; padding:14px 12px; text-align:center; }
.kpi-val { font-size:19px; font-weight:700; font-variant-numeric:tabular-nums; }
.kpi-val.small { font-size:12.5px; line-height:1.6; font-weight:600; }
.kpi-val.low { color:var(--low); } .kpi-val.mid { color:var(--mid); } .kpi-val.high { color:var(--high); }
.kpi-label { font-size:11.5px; color:var(--text-lo); margin-top:4px; line-height:1.35; }

/* Büdcə mühafizəçisi */
.pace-form { display:grid; grid-template-columns:1fr 1fr 1fr auto; gap:10px; align-items:end; }
.pace-form label, .inv-inputs label { display:flex; flex-direction:column; gap:5px; font-size:12px; color:var(--text-lo); }
.pace-form input, .inv-inputs input { background:var(--bg2); border:1px solid var(--border); border-radius:10px; padding:10px 12px;
  color:var(--text-hi); font-family:inherit; font-size:14px; width:100%; }
.pace-form button { background:var(--accent); color:var(--accent-ink); border:none; border-radius:10px; padding:11px 18px; font-weight:700; cursor:pointer; font-family:inherit; }
.pace-bar { position:relative; height:14px; background:var(--track); border-radius:8px; margin:30px 0 24px; }
.pace-fill { position:absolute; left:0; top:0; bottom:0; background:var(--low); border-radius:8px; }
.pace-proj { position:absolute; left:0; top:0; bottom:0; border-radius:8px; opacity:.45;
  background:repeating-linear-gradient(45deg,var(--low) 0 6px,transparent 6px 12px); }
.pace-proj.mid { background:repeating-linear-gradient(45deg,var(--mid) 0 6px,transparent 6px 12px); }
.pace-proj.high { background:repeating-linear-gradient(45deg,var(--high) 0 6px,transparent 6px 12px); }
.pace-mark { position:absolute; top:-6px; bottom:-6px; border-left:2px dashed; }
.pace-mark span { position:absolute; top:-18px; left:-12px; font-size:10.5px; font-weight:700; white-space:nowrap; }
.pace-mark.budget span { top:auto; bottom:-18px; }
.pace-empty { font-size:13.5px; color:var(--text-lo); padding:10px 0; }
.pace-alert { margin-top:12px; border-radius:12px; padding:12px 16px; font-size:13.5px; line-height:1.55; }
.pace-alert.bad { background:color-mix(in srgb, var(--high) 10%, transparent); border:1px solid var(--high); color:var(--bad-text); }
.pace-alert.ok { background:color-mix(in srgb, var(--low) 8%, transparent); border:1px solid var(--low); color:var(--low); }
.chip-list { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.chip { display:inline-flex; align-items:center; gap:6px; font-size:12px; background:var(--bg2); border:1px solid var(--border);
  border-radius:20px; padding:4px 10px; color:var(--text-hi); }
.chip button { background:none; border:none; color:var(--high); cursor:pointer; font-size:12px; }

/* Cihaz şablonları */
.preset-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:20px; }
.chip-btn { background:var(--surface); border:1px solid var(--border); color:var(--text-hi); border-radius:20px; padding:7px 12px;
  font-family:inherit; font-size:13px; cursor:pointer; }
.chip-btn small { color:var(--text-lo); font-size:10.5px; margin-left:3px; }
.chip-btn:hover { border-color:var(--accent); }

/* What-if */
.wi-levers { display:flex; flex-direction:column; gap:12px; margin-bottom:12px; }
.wi-row { display:flex; align-items:center; gap:14px; }
.wi-row label { font-size:13.5px; color:var(--text-lo); width:230px; flex-shrink:0; }
.wi-row input[type=range] { flex:1; background:linear-gradient(90deg,var(--accent),var(--accent)); height:6px; }
.wi-val { width:52px; text-align:right; font-weight:700; font-variant-numeric:tabular-nums; }
.wi-check { display:flex; align-items:center; gap:10px; font-size:14px; cursor:pointer; }
.wi-check input { width:18px; height:18px; accent-color:var(--accent); }
.wi-compare { display:flex; align-items:center; justify-content:space-around; gap:12px; background:var(--bg2);
  border:1px solid var(--border); border-radius:14px; padding:16px; text-align:center; flex-wrap:wrap; }
.wi-arrow { font-size:22px; color:var(--low); }

/* Sərmayə cədvəli */
.inv-inputs { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:14px; }
.table-scroll { overflow-x:auto; }
.inv-table { width:100%; border-collapse:collapse; font-size:13.5px; }
.inv-table th { text-align:left; font-size:11.5px; color:var(--text-lo); font-weight:600; padding:8px 8px; border-bottom:1px solid var(--border); white-space:nowrap; }
.inv-table td { padding:11px 8px; border-bottom:1px solid var(--border); font-variant-numeric:tabular-nums; white-space:nowrap; }
.inv-table tr.top td { background:color-mix(in srgb, var(--low) 5%, transparent); }
.inv-table td.pos { color:var(--low); font-weight:700; } .inv-table td.neg { color:var(--high); }
.inv-sub { font-size:11px; color:var(--text-lo); margin-top:2px; }

/* Bildirişlər */
.toast-box { position:fixed; top:16px; right:16px; z-index:1000; display:flex; flex-direction:column; gap:10px; max-width:min(380px,calc(100vw - 32px)); }
.toast { position:relative; background:var(--surface); border:1px solid var(--border); border-left:4px solid var(--accent); color:var(--text-hi);
  border-radius:12px; padding:12px 34px 12px 14px; font-size:13.5px; line-height:1.45; box-shadow:0 10px 30px rgba(0,0,0,0.4);
  animation:toastIn .25s ease; transition:opacity .4s, transform .4s; }
.toast.warn { border-left-color:var(--mid); } .toast.bad { border-left-color:var(--high); }
.toast.out { opacity:0; transform:translateX(20px); }
.toast-x { position:absolute; top:8px; right:8px; background:none; border:none; color:var(--text-lo); cursor:pointer; }
@keyframes toastIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }

/* Təqdimat rejimi */
.pres-bar { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); z-index:999; width:min(680px,calc(100vw - 32px));
  background:var(--overlay); border:1px solid var(--accent); border-radius:16px; padding:12px 16px 14px;
  box-shadow:0 12px 40px rgba(0,0,0,0.5); backdrop-filter:blur(6px); }
.pres-progress { height:3px; background:var(--track); border-radius:3px; margin-bottom:10px; overflow:hidden; }
.pres-progress div { height:100%; width:0; background:var(--accent); transition:width .5s; }
.pres-row { display:flex; align-items:center; gap:14px; justify-content:space-between; font-size:14px; line-height:1.45; }
.pres-row button { background:none; border:1px solid var(--border); color:var(--text-hi); border-radius:8px; padding:6px 12px; cursor:pointer; font-family:inherit; flex-shrink:0; }

@media (max-width:600px) {
  .kpi-grid, .kpi-grid.four { grid-template-columns:1fr 1fr; }
  .pace-form { grid-template-columns:1fr 1fr; }
  .inv-inputs { grid-template-columns:1fr 1fr; }
  .wi-row { flex-wrap:wrap; } .wi-row label { width:100%; }
  .meter-save-row { flex-wrap:wrap; }
  .meter-month { flex:1 1 100% !important; }
  .pro-card { padding:18px 16px; }
}
@media (prefers-reduced-motion: reduce) { .toast { animation:none; } }

/* ===== v2.1 ===== */
.reminder { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; text-align:left;
  background:color-mix(in srgb, var(--mid) 8%, transparent); border:1px solid var(--mid); color:var(--text-hi); border-radius:12px; padding:12px 16px; margin:-24px 0 28px; font-size:13.5px; }
.reminder[hidden] { display:none; }
.action-row { display:grid; grid-template-columns:2fr 1fr; gap:10px; }
.share-btn { border-color:var(--border); color:var(--text-hi); }
.hint-box.warn { background:color-mix(in srgb, var(--high) 7%, transparent); border-color:color-mix(in srgb, var(--high) 40%, transparent); color:var(--bad-text); }

/* Həssaslıq */
.sens-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.sens-row label { font-size:13px; color:var(--text-lo); }
.sens-row select, .gas-inputs select { background:var(--bg2); border:1px solid var(--border); color:var(--text-hi); border-radius:10px; padding:8px 10px; font-family:inherit; font-size:13px; }
.sens-stat { font-size:12px; color:var(--low); }

/* Diaqnoz */
.diag-item { border:1px solid var(--border); border-left:4px solid var(--mid); border-radius:12px; padding:12px 14px; margin-bottom:10px; background:var(--bg2); }
.diag-item.sev-critical, .diag-item.sev-high { border-left-color:var(--high); }
.diag-item.sev-low { border-left-color:var(--low); }
.sev-badge { font-size:11px; font-weight:700; padding:2px 9px; border-radius:20px; background:color-mix(in srgb, var(--mid) 15%, transparent); color:var(--mid); }
.sev-badge.sev-critical, .sev-badge.sev-high { background:color-mix(in srgb, var(--high) 15%, transparent); color:var(--high-text); }
.sev-badge.sev-low { background:color-mix(in srgb, var(--low) 15%, transparent); color:var(--low); }
.diag-action { font-size:13px; margin-top:8px; line-height:1.5; }
.diag-months { font-size:11.5px; color:var(--text-lo); margin-top:6px; }

/* İstilik xəritəsi */
.heatmap-scroll { overflow-x:auto; }
.heatmap { min-width:0; display:flex; flex-direction:column; gap:4px; }
.hm-row { min-width:430px; display:grid; grid-template-columns:44px repeat(12,1fr); gap:4px; }
.hm-head span { font-size:10.5px; color:var(--text-lo); text-align:center; }
.hm-year { font-size:12px; color:var(--text-lo); align-self:center; }
.hm-cell { position:relative; height:34px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#0A1420; font-variant-numeric:tabular-nums; }
.hm-cell.none { background:var(--track); }
.hm-cell.low { background:var(--low); } .hm-cell.mid { background:var(--mid); } .hm-cell.high { background:var(--high); }
.hm-cell.flag-anomaly, .hm-cell.flag-watch { outline:2px solid #fff; outline-offset:-2px; }
.hm-cell.flag-anomaly::after { content:'!'; position:absolute; top:-6px; right:-4px; width:14px; height:14px; border-radius:50%; background:#fff; color:var(--high); font-size:10px; display:flex; align-items:center; justify-content:center; }
.heat-legend { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:11.5px; color:var(--text-lo); margin-top:12px; }
.hl { width:12px; height:12px; border-radius:3px; display:inline-block; }
.hl.low { background:var(--low); } .hl.mid { background:var(--mid); } .hl.high { background:var(--high); } .hl.none { background:var(--track); }

/* Nailiyyətlər */
.challenge { background:var(--bg2); border:1px solid var(--border); border-radius:14px; padding:14px 16px; margin-bottom:14px; }
.ch-title { font-weight:700; margin-bottom:4px; }
.badges { display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:10px; }
.badge { min-width:0; overflow-wrap:anywhere; hyphens:auto; }
.badge { background:var(--bg2); border:1px solid var(--border); border-radius:14px; padding:12px; text-align:center; transition:all .3s; }
.badge.earned { border-color:color-mix(in srgb, var(--low) 50%, transparent); }
/* Qazanılmamış nişan: yalnız ikon solğundur - mətn oxunaqlı qalır (WCAG kontrast) */
.badge:not(.earned) .badge-icon { opacity:.45; filter:grayscale(1); }
.badge:not(.earned) .badge-name { color:var(--text-lo); }
.badge-icon { font-size:26px; }
.badge-name { font-weight:700; font-size:13px; margin-top:4px; }
.badge-desc { font-size:11px; color:var(--text-lo); margin:3px 0 8px; line-height:1.35; min-height:30px; }

/* Rəqəmsal əkiz */
.twin-card { margin-top:24px; }
.twin { display:flex; flex-wrap:wrap; gap:6px; }
.twin-tile { min-height:96px; border-radius:12px; padding:10px 12px; background:color-mix(in srgb, var(--c) 18%, var(--bg2));
  border:1px solid color-mix(in srgb, var(--c) 45%, transparent); display:flex; flex-direction:column; justify-content:flex-end; overflow:hidden; }
.twin-tile.ineff { border:2px solid var(--high); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--high) 30%, transparent); }
.twin-icon { font-size:20px; margin-bottom:auto; }
.twin-name { font-weight:700; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.twin-val { font-size:11.5px; color:var(--text-hi); font-variant-numeric:tabular-nums; }
.twin-share { font-size:10.5px; color:var(--text-hi); opacity:.85; }

/* Qaz */
.gas-inputs { display:grid; grid-template-columns:2fr 1fr 1fr; gap:12px; align-items:end; }
.gas-inputs label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--text-lo); }
.gas-inputs input[type=number] { background:var(--bg2); border:1px solid var(--border); border-radius:10px; padding:9px 12px; color:var(--text-hi); font-family:inherit; font-size:14px; }
.gas-inputs input[type=range] { background:linear-gradient(90deg,var(--low) 0%,var(--low) 40%,var(--mid) 40%,var(--mid) 80%,var(--high) 80%); }
.gas-inputs b { color:var(--text-hi); font-size:18px; }
.gas-tiers { display:flex; flex-direction:column; gap:6px; margin-top:14px; font-size:13px; color:var(--text-lo); }
.gas-tiers .tier-dot, .chip .tier-dot { display:inline-block; width:10px; height:10px; vertical-align:middle; margin-right:4px; }
.checklist { padding-left:18px; display:flex; flex-direction:column; gap:8px; font-size:13.5px; line-height:1.5; }
.safety-card { border-color:color-mix(in srgb, var(--high) 35%, transparent); }

/* Hazırlıq */
.out-devices { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.out-dev { display:flex; align-items:center; gap:10px; background:var(--bg2); border:1px solid var(--border); border-radius:10px; padding:8px 10px; cursor:pointer; font-size:13.5px; }
.out-dev input[type=checkbox] { width:18px; height:18px; accent-color:var(--accent); }
.out-name { flex:1; } .out-name small { color:var(--text-lo); font-size:11px; display:block; }
.out-count { width:52px; background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:5px 6px; color:var(--text-hi); font-family:inherit; text-align:center; }
.sos-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; }
.sos { display:flex; flex-direction:column; align-items:center; gap:4px; background:var(--bg2); border:1px solid var(--border); border-radius:12px; padding:14px 8px; text-decoration:none; color:var(--text-hi); text-align:center; }
.sos:hover { border-color:var(--high); }
.sos-num { font-size:24px; font-weight:700; color:var(--high); }
.sos-label { font-size:11.5px; color:var(--text-lo); line-height:1.3; }

@media (max-width:600px) {
  .action-row { grid-template-columns:1fr; }
  .badges { grid-template-columns:1fr 1fr; }
  .gas-inputs { grid-template-columns:1fr 1fr; } .gas-inputs label:first-child { grid-column:1 / -1; }
  .out-devices { grid-template-columns:1fr; }
  .sos-grid { grid-template-columns:repeat(3,1fr); }
  .reminder { margin-top:-32px; }
}
/* Grid daxilində input-ların təbii eni mobil ekranı aşmasın */
.app-form > *, .pace-form > *, .inv-inputs > *, .gas-inputs > * { min-width:0; }

/* ===== v2.4: Tarif pillələrinin animasiyalı izahı ===== */
.tiers-explain .pro-card-head h2 { margin-bottom:0; }
.tv-replay { font-size:12px; padding:6px 10px; }
.tierviz { margin:16px 0 6px; }
.tv-track { display:flex; gap:4px; height:30px; }
.tv-seg { position:relative; flex-basis:0; background:var(--track); border-radius:8px; overflow:hidden; }
.tv-fill { position:absolute; inset:0 auto 0 0; width:0; border-radius:8px; transition:width .7s cubic-bezier(.2,.8,.2,1); }
.tv-seg.low .tv-fill { background:var(--low); } .tv-seg.mid .tv-fill { background:var(--mid); } .tv-seg.high .tv-fill { background:var(--high); }
.tv-range { position:absolute; right:8px; top:50%; transform:translateY(-50%); font-size:11px; font-weight:700; color:var(--text-hi); mix-blend-mode:normal; text-shadow:0 0 6px var(--bg); }
.tv-legend { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:10px; }
.tv-cell { display:flex; align-items:center; gap:6px; font-size:12.5px; font-variant-numeric:tabular-nums; min-width:0; }
.tv-cell .tier-dot { display:inline-block; width:10px; height:10px; flex-shrink:0; }
.tv-cell.off { color:var(--text-lo); opacity:.7; }
.tv-total { margin-top:12px; font-weight:700; font-size:16px; }
.tv-explain { font-size:13px; color:var(--text-lo); line-height:1.55; margin:8px 0 14px; }

/* ===== v2.4: Enerji axını ===== */
.flow-card { grid-column:1 / -1; }
.flow-wrap { width:100%; }
.flow-svg { width:100%; height:auto; display:block; overflow:visible; }
.flow-base { fill:none; stroke-linecap:round; opacity:.22; }
.flow-line { fill:none; stroke-linecap:round; opacity:.95; stroke-dasharray:2 16; animation:flowdash 1.1s linear infinite; }
.flow-base.loss { opacity:.18; }
@keyframes flowdash { to { stroke-dashoffset:-36; } }
.flow-node { fill:var(--surface); stroke:var(--border); stroke-width:2; }
.flow-big { font-size:26px; }
.flow-ico { font-size:15px; }
.flow-t { fill:var(--text-hi); font-family:var(--font-ui); font-size:14px; font-weight:700; }
.flow-s { fill:var(--text-lo); font-family:var(--font-ui); font-size:12.5px; }
.flow-t.loss-t { fill:var(--high); }
@media (prefers-reduced-motion: reduce) { .flow-line { animation:none; } .tv-fill { transition:none; } }

/* ===== v2.4: Ağıllı sayğac laboratoriyası ===== */
.lab-sources .ghost-btn.active { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.live-card { display:grid; grid-template-columns:minmax(220px,0.8fr) minmax(0,2fr); gap:20px; align-items:center; }
.live-meter { background:var(--bg2); border:1px solid var(--border); border-radius:16px; padding:18px; }
.live-head { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text-lo); }
.live-dot { width:9px; height:9px; border-radius:50%; background:var(--low); box-shadow:0 0 0 0 color-mix(in srgb, var(--low) 60%, transparent); animation:livepulse 1.6s infinite; }
@keyframes livepulse { 0% { box-shadow:0 0 0 0 color-mix(in srgb, var(--low) 55%, transparent); } 70% { box-shadow:0 0 0 10px transparent; } 100% { box-shadow:0 0 0 0 transparent; } }
.live-w { font-size:40px; font-weight:700; font-variant-numeric:tabular-nums; margin:6px 0 10px; color:var(--low); transition:color .3s; }
.live-bar { position:relative; height:10px; background:var(--track); border-radius:6px; }
.live-bar > div { height:100%; width:0; border-radius:6px; background:linear-gradient(90deg,var(--low),var(--mid)); transition:width 1.2s ease; }
.live-bar > span { position:absolute; top:-4px; bottom:-4px; width:2px; background:var(--line2); }
.live-sub { font-size:12px; color:var(--text-lo); margin-top:10px; line-height:1.45; }
.lab-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:0; }
.wk-heat { min-width:520px; display:flex; flex-direction:column; gap:3px; }
.wk-row { display:grid; grid-template-columns:34px repeat(24,minmax(0,1fr)); gap:3px; }
.wk-head span { font-size:10px; color:var(--text-lo); text-align:left; }
.wk-day { font-size:11px; color:var(--text-lo); align-self:center; }
.wk-cell { height:20px; border-radius:4px; background:var(--low); opacity:calc(0.1 + var(--k) * 0.9); }
.wk-cell.none { background:var(--track); opacity:1; }
.csv-example { background:var(--bg2); border:1px solid var(--border); border-radius:10px; padding:12px 14px; font-size:12.5px;
  line-height:1.6; overflow-x:auto; color:var(--text-hi); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
@media (max-width:860px) {
  .live-card { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:719px) {
  .lab-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .live-w { font-size:34px; }
  .tv-legend { grid-template-columns:minmax(0,1fr); gap:6px; }
  .tv-range { font-size:10px; right:5px; }
}

/* Açıq temada rəngli istilik xanalarında ağ mətn (tünd mətn kontrastı çatmır) */
:root[data-theme="light"] .hm-cell.low, :root[data-theme="light"] .hm-cell.mid, :root[data-theme="light"] .hm-cell.high { color:#fff; }
