/* ══════════════════════════════════════════════
   ShopTuner Dashboard — Light-first redesign
   Visual DNA from dashboard-landing.html
   ══════════════════════════════════════════════ */

:root {
  --bg: #080d1a;
  --bg-raise: #0e1325;
  --card: #131a2e;
  --border: rgba(255,255,255,.06);
  --border-strong: rgba(255,255,255,.1);
  --text: #edf0f7;
  --text-2: #8b93a8;
  --text-3: #555e75;
  --primary: #4B6BFB;
  --primary-glow: rgba(75,107,251,.3);
  --primary-soft: rgba(75,107,251,.1);
  --amber: #FBBF24;
  --amber-soft: rgba(251,191,36,.1);
  --ok: #2DD4BF;
  --ok-soft: rgba(45,212,191,.1);
  --bad: #f4645f;
  --bad-soft: rgba(244,100,95,.1);
  --hover-bg: rgba(255,255,255,.04);
  --track: rgba(255,255,255,.06);
  --chip-bg: rgba(255,255,255,.04);
  --thead-bg: rgba(255,255,255,.03);
  --sheen: rgba(255,255,255,.02);
  --shadow-card: 0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.15);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
  --bg-gradient:
    radial-gradient(800px 500px at 80% -5%, rgba(75,107,251,.06), transparent 60%),
    radial-gradient(600px 400px at -5% 100%, rgba(45,212,191,.03), transparent 60%);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

html[data-theme="light"] {
  --bg: #F4F3F0;
  --bg-raise: #FAFAF8;
  --card: #FFFFFF;
  --border: rgba(0,0,0,.05);
  --border-strong: rgba(0,0,0,.08);
  --text: #1C1C28;
  --text-2: #6B6B80;
  --text-3: #A0A0B2;
  --primary: #3D5AF1;
  --primary-glow: rgba(61,90,241,.1);
  --primary-soft: rgba(61,90,241,.06);
  --amber: #B8860B;
  --amber-soft: rgba(184,134,11,.06);
  --ok: #0E8C6B;
  --ok-soft: rgba(14,140,107,.06);
  --bad: #C0392B;
  --bad-soft: rgba(192,57,43,.05);
  --hover-bg: rgba(0,0,0,.025);
  --track: rgba(0,0,0,.04);
  --chip-bg: rgba(0,0,0,.02);
  --thead-bg: rgba(0,0,0,.018);
  --sheen: transparent;
  --shadow-card: 0 0 0 1px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.03), 0 8px 24px rgba(0,0,0,.02);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04);
  --bg-gradient: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* atribut hidden musí vyhrát nad display: flex/grid komponent */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--font);
  background: var(--bg-gradient), var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══ SHELL LAYOUT ═══ */
.shell { display: flex; min-height: 100vh; }

/* ═══ SIDEBAR ═══ */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--bg-raise);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}
html[data-theme="light"] .sidebar {
  box-shadow: 1px 0 12px rgba(0,0,0,.03);
}

.side-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.side-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #4B6BFB, #3451D1);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  letter-spacing: -.02em;
  box-shadow: 0 2px 12px rgba(75,107,251,.35);
}
.side-title { font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
.side-sub { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); letter-spacing: .01em; }

.side-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); text-decoration: none;
  font-weight: 500; font-size: 13.5px;
  border-left: 2.5px solid transparent;
  transition: all .2s cubic-bezier(.22,1,.36,1);
  cursor: pointer;
  position: relative;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover {
  background: var(--hover-bg);
  color: var(--text);
}
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.side-foot { padding: 16px 18px; border-top: 1px solid var(--border); }
.feed-meta { display: flex; gap: 10px; align-items: flex-start; }
.feed-meta-text { font-size: 12px; font-weight: 500; color: var(--text-2); }
.feed-meta-time { font-family: var(--mono); font-size: 10px; color: var(--text-3); margin-top: 2px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-3); margin-top: 5px; flex-shrink: 0;
}
.dot.ok { background: var(--ok); box-shadow: 0 0 10px rgba(45,212,191,.6); animation: pulse 2.5s ease-in-out infinite; }
.dot.err { background: var(--bad); box-shadow: 0 0 10px rgba(244,100,95,.6); }
@keyframes pulse { 50% { box-shadow: 0 0 3px rgba(45,212,191,.2); } }

/* ═══ CONTENT AREA ═══ */
.content { flex: 1; min-width: 0; padding: 28px 32px 48px; }

.topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}
h1 {
  font-size: 22px; font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.topbar-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; font-weight: 400; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: var(--text); background: var(--card);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 14px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow-sm);
  color: var(--primary);
}
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px 10px; }

.mode-chip {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .12em;
  color: var(--amber); background: var(--amber-soft);
  border: 1px solid rgba(251,191,36,.25);
  padding: 4px 10px; border-radius: 100px;
  cursor: help;
}

/* ═══ KPI STRIP ═══ */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  transition: all .25s ease;
  position: relative;
}
.kpi:hover {
  border-color: var(--primary);
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--shadow-card), 0 14px 36px rgba(0,0,0,.08);
}
html[data-theme="light"] .kpi:hover {
  border-color: rgba(61,90,241,.2);
  box-shadow: 0 0 0 1px rgba(61,90,241,.1), 0 6px 16px rgba(0,0,0,.04), 0 14px 36px rgba(61,90,241,.06);
}
.kpi:hover::before { opacity: 1; }
.kpi-label {
  font-size: 10.5px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.kpi-value {
  font-family: var(--font);
  font-size: 26px; font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1.15;
  white-space: nowrap;
}
.kpi-value small {
  font-size: 13px; color: var(--text-2); font-weight: 500;
  letter-spacing: 0; margin-left: 4px;
}
.kpi-note { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.kpi.kpi-good .kpi-value { color: var(--ok); }
.kpi.kpi-bad .kpi-value { color: var(--bad); }
.kpi.kpi-good:hover { border-color: rgba(45,212,191,.3); }
.kpi.kpi-bad:hover { border-color: rgba(244,100,95,.3); }

/* ═══ PANELS ═══ */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.panel-wide { grid-column: 1 / -1; }
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: border-color .25s, box-shadow .25s;
}
.panel:hover {
  border-color: var(--border-strong);
}
html[data-theme="light"] .panel:hover {
  box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.02);
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.panel h2 {
  font-size: 14.5px; font-weight: 600;
  letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 9px;
}
.panel-sub { font-size: 12px; color: var(--text-3); }

/* ═══ BRIEFING ═══ */
.briefing {
  background:
    linear-gradient(120deg, var(--primary-soft), transparent 50%),
    var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}
.briefing-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.briefing-spark {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 16px; color: #fff;
  background: linear-gradient(135deg, #4B6BFB, #3451D1);
  box-shadow: 0 2px 12px rgba(75,107,251,.3);
}
.briefing-title { font-weight: 600; font-size: 14px; }
.briefing-date { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.briefing p { font-size: 13.5px; color: var(--text-2); max-width: 860px; line-height: 1.6; }
.briefing strong { color: var(--text); }
.txt-ok { color: var(--ok) !important; }
.txt-bad { color: var(--bad) !important; }

/* ═══ DELTA ═══ */
.delta { font-family: var(--mono); font-weight: 600; font-size: 11px; }
.delta.good { color: var(--ok); }
.delta.bad { color: var(--bad); }

/* ═══ TOOLTIPS ═══ */
.tip {
  display: inline-grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: 9.5px; font-weight: 700; line-height: 1;
  font-family: var(--mono);
  color: var(--text-3);
  background: var(--chip-bg);
  border: 1px solid var(--border-strong);
  cursor: help; position: relative;
  vertical-align: 1px;
  flex-shrink: 0;
}
.tip:hover, .tip:focus-visible { color: var(--primary); border-color: var(--primary); outline: none; }
.tip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: max-content; max-width: 280px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  padding: 10px 14px;
  font-family: var(--font); font-size: 12px; font-weight: 400;
  line-height: 1.5; color: var(--text-2);
  text-transform: none; letter-spacing: normal; text-align: left;
  white-space: normal;
  opacity: 0; pointer-events: none;
  transition: opacity .2s cubic-bezier(.22,1,.36,1), transform .2s cubic-bezier(.22,1,.36,1);
  z-index: 60;
}
.tip::before {
  content: "";
  position: absolute; bottom: calc(100% + 5px); left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 9px; height: 9px;
  background: var(--card);
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  opacity: 0; transition: opacity .15s;
  z-index: 61;
}
.tip:hover::after, .tip:focus-visible::after,
.tip:hover::before, .tip:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tip:hover::before, .tip:focus-visible::before { transform: translateX(-50%) rotate(45deg); }
.kpi:first-child .tip::after { left: 0; transform: translateX(-14px) translateY(4px); }
.kpi:first-child .tip:hover::after, .kpi:first-child .tip:focus-visible::after { transform: translateX(-14px) translateY(0); }
html[data-theme="light"] .tip::after { box-shadow: 0 12px 32px rgba(0,0,0,.08); }

/* ═══ ALERTS ═══ */
.alert-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 10px;
  border-top: 1px solid var(--border);
  width: 100%;
  background: none; border-left: none; border-right: none; border-bottom: none;
  font-family: var(--font); font-size: inherit; color: inherit;
  text-align: left; cursor: pointer;
  transition: all .15s ease;
  border-radius: var(--radius-sm);
}
.alert-row:hover { background: var(--hover-bg); padding-left: 14px; }
.alert-row:hover .alert-go { opacity: 1; transform: translateX(0); }
.alert-go {
  align-self: center; flex-shrink: 0;
  color: var(--primary); font-size: 15px; font-weight: 600;
  opacity: 0; transform: translateX(-4px);
  transition: opacity .15s, transform .15s;
}
.alert-row:first-child { border-top: none; }
.alert-sev-dot {
  width: 8px; height: 8px; flex-shrink: 0;
  border-radius: 50%;
  margin-top: 7px;
  background: var(--text-3);
  transition: all .2s;
}
.sev-high .alert-sev-dot { background: var(--bad); box-shadow: 0 0 8px rgba(244,100,95,.4); }
.sev-mid .alert-sev-dot { background: var(--amber); box-shadow: 0 0 8px rgba(251,191,36,.3); }
.sev-low .alert-sev-dot { background: var(--primary); opacity: .5; }
.alert-ico { display: none; }
.alert-title { font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; }
.alert-desc { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.45; }
.alert-tag {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3);
  border: 1px solid var(--border-strong); border-radius: 100px;
  padding: 2px 9px; margin-top: 3px;
}
.sev-high .alert-tag { color: var(--bad); border-color: rgba(244,100,95,.3); }
.sev-mid .alert-tag { color: var(--amber); border-color: rgba(251,191,36,.3); }
.all-clear { color: var(--ok); font-weight: 500; padding: 8px 0; }
.all-clear-td { color: var(--ok); font-weight: 500; text-align: center; padding: 16px !important; }
.count-badge {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid rgba(75,107,251,.25);
  padding: 1px 8px; border-radius: 100px;
}

/* ═══ BAR CHART ═══ */
#revChart svg { width: 100%; height: auto; display: block; }
#revChart .bar { fill: var(--primary); opacity: .4; transition: opacity .15s; rx: 3; }
#revChart .bar-profit { fill: var(--amber); opacity: .9; }
#revChart rect:hover { opacity: 1; }
#revChart text { font-family: var(--mono); font-size: 10px; fill: var(--text-3); }
#revChart .axis { stroke: var(--border-strong); }
#revChart .gridline { stroke: var(--border); stroke-dasharray: 3 4; }
#revChart .bar-fc {
  fill: var(--primary-soft);
  stroke: var(--primary); stroke-width: 1.5; stroke-dasharray: 5 4;
  opacity: .9;
}
#revChart .fc-whisker { stroke: var(--amber); stroke-width: 1.5; }
#revChart .fc-sep { stroke: var(--border-strong); stroke-dasharray: 2 5; }
#benchChart svg { width: 100%; height: auto; display: block; }
#benchChart text { font-family: var(--mono); font-size: 10px; fill: var(--text-3); }
#benchChart .axis { stroke: var(--border-strong); }
#benchChart .gridline { stroke: var(--border); stroke-dasharray: 3 4; }
#benchChart rect { transition: opacity .15s; }
#benchChart rect:hover { opacity: .85 !important; }
.lg-fc {
  background: var(--primary-soft);
  border: 1.5px dashed var(--primary);
}
.chart-tabs {
  display: flex; gap: 2px; background: var(--track); border-radius: 8px; padding: 2px;
}
.chart-tab {
  padding: 5px 14px; border: none; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  background: transparent; transition: all .15s; font-family: var(--font);
}
.chart-tab:hover { color: var(--text); }
.chart-tab.active {
  background: var(--card); color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.lg-thisyr { background: var(--primary); }
.lg-lastyr { background: var(--primary); opacity: .25; }
.chart-legend {
  display: flex; gap: 20px; margin-top: 12px;
  font-size: 12px; color: var(--text-2);
}
.chart-legend .lg {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 3px; margin-right: 6px; vertical-align: -1px;
}
.lg-rev { background: var(--primary); opacity: .45; }
.lg-profit { background: var(--amber); }
.lg-fc {
  background: var(--primary-soft);
  border: 1.5px dashed var(--primary);
}

/* ═══ PLAN CHART ═══ */
#planChart svg { width: 100%; height: auto; display: block; }
#planChart .bar { fill: var(--primary); opacity: .55; transition: opacity .15s; }
#planChart .bar-fc {
  fill: var(--primary-soft);
  stroke: var(--primary); stroke-width: 1.5; stroke-dasharray: 5 4;
  opacity: .9;
}
#planChart rect:hover { opacity: 1; }
#planChart text { font-family: var(--mono); font-size: 10px; fill: var(--text-3); }
#planChart .fc-whisker { stroke: var(--amber); stroke-width: 1.5; }
#planChart .fc-sep { stroke: var(--border-strong); stroke-dasharray: 2 5; }
.badge-backtest {
  display: inline-block;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  background: var(--ok-soft); color: var(--ok);
  vertical-align: middle; margin-left: 6px;
}
.plan-actions { margin-top: 14px; display: flex; gap: 10px; }
.plan-sup-row td {
  background: var(--bg);
  padding-top: 12px !important;
  font-size: 13px;
}
.plan-sup-row .p-cat { font-weight: 400; margin-left: 8px; }

/* ═══ PRICE CHART ═══ */
#priceChart svg { width: 100%; height: auto; display: block; }
#priceChart .bar { fill: url(#barGrad); transition: filter .15s; }
#priceChart .bar:hover { filter: brightness(1.3) drop-shadow(0 0 6px var(--primary-glow)); }
#priceChart text { font-family: var(--mono); font-size: 10px; fill: var(--text-3); }
#priceChart .bar-count { fill: var(--text-2); font-weight: 600; font-size: 11px; }
#priceChart .axis { stroke: var(--border-strong); }

/* ═══ BAR LISTS ═══ */
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: baseline; }
.bar-row .bar-name { font-weight: 500; font-size: 13px; }
.bar-row .bar-meta { font-family: var(--mono); font-size: 11px; color: var(--text-3); white-space: nowrap; }
.bar-track {
  grid-column: 1 / -1; height: 6px;
  background: var(--track); border-radius: 3px; overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3451D1, var(--primary));
  border-radius: 3px;
  width: 0; transition: width .7s cubic-bezier(.2,.7,.2,1);
}
.bar-row:first-child .bar-fill {
  background: linear-gradient(90deg, #c47d16, var(--amber));
}

/* ═══ TABLES ═══ */
.table-head { margin-bottom: 14px; }
#searchInput {
  font-family: var(--font); font-size: 13px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text);
  padding: 9px 14px; width: min(320px, 100%);
  transition: all .2s ease;
}
#searchInput::placeholder { color: var(--text-3); }
#searchInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.table-wrap { overflow-x: auto; margin: 0 -22px -22px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3);
  background: var(--thead-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  white-space: nowrap;
}
thead th:first-child { padding-left: 22px; }
thead th.num { text-align: right; }
th.sortable { cursor: pointer; user-select: none; transition: color .12s; }
th.sortable:hover { color: var(--primary); }
th.sorted-asc::after { content: " ↑"; color: var(--amber); }
th.sorted-desc::after { content: " ↓"; color: var(--amber); }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody td:first-child { padding-left: 22px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--hover-bg); }
.p-img {
  width: 36px; height: 36px; object-fit: contain;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 8px;
  display: block;
}
.p-name { font-weight: 500; color: var(--text); text-decoration: none; transition: color .12s; }
.p-name:hover { color: var(--primary); }
.p-cat { color: var(--text-2); font-size: 12px; }
.p-price { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; white-space: nowrap; font-size: 13px; }
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 100px; border: 1px solid;
  margin: 1px 3px 1px 0; white-space: nowrap;
}
.badge-stock { background: var(--ok-soft); color: var(--ok); border-color: rgba(45,212,191,.25); }
.badge-wait { background: var(--amber-soft); color: var(--amber); border-color: rgba(251,191,36,.25); }
.badge-miss { background: var(--bad-soft); color: var(--bad); border-color: rgba(244,100,95,.25); }
.badge-none { color: var(--text-3); font-size: 12px; border: none; }

/* ═══ ABC ANALYSIS ═══ */
.abc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.abc-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px;
  background: var(--bg);
}
.abc-letter {
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  margin-bottom: 12px;
}
.abc-a .abc-letter { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(251,191,36,.3); }
.abc-b .abc-letter { background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(75,107,251,.25); }
.abc-c .abc-letter { background: var(--chip-bg); color: var(--text-3); border: 1px solid var(--border-strong); }
.abc-share { font-family: var(--font); font-size: 26px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.abc-desc { font-size: 12px; color: var(--text-2); margin: 5px 0 14px; }
.abc-a .bar-fill { background: linear-gradient(90deg, #c47d16, var(--amber)); }

/* ═══ UNDERPRICED BESTSELLERS ═══ */
.up-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 6px;
  border-top: 1px solid var(--border);
}
.up-row:first-child { border-top: none; }
.up-name { font-weight: 500; font-size: 13px; }
.up-meta { font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-top: 2px; }
.up-gain { font-size: 12px; color: var(--text-2); text-align: right; white-space: nowrap; }
.up-gain strong { color: var(--ok); font-family: var(--mono); }

/* ═══ AUDIT ═══ */
.audit-score {
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 100px; border: 1px solid;
}
.audit-score.good { color: var(--ok); background: var(--ok-soft); border-color: rgba(45,212,191,.3); }
.audit-score.mid { color: var(--amber); background: var(--amber-soft); border-color: rgba(251,191,36,.3); }
.audit-score.bad { color: var(--bad); background: var(--bad-soft); border-color: rgba(244,100,95,.3); }
.audit-item { border-top: 1px solid var(--border); }
.audit-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 6px; font-size: 13px; font-weight: 500;
  transition: background .12s;
  border-radius: 6px;
}
.audit-item summary::-webkit-details-marker { display: none; }
.audit-item summary:hover { background: var(--hover-bg); }
.audit-flag {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; min-width: 32px; text-align: center;
  padding: 1px 7px; border-radius: 100px; border: 1px solid;
  font-variant-numeric: tabular-nums;
}
.audit-flag.fail { background: var(--bad-soft); color: var(--bad); border-color: rgba(244,100,95,.3); }
.audit-flag.pass { background: var(--ok-soft); color: var(--ok); border-color: rgba(45,212,191,.25); }
.audit-caret { margin-left: auto; color: var(--text-3); transition: transform .15s; font-size: 10px; }
.audit-item[open] .audit-caret { transform: rotate(90deg); }
.audit-products { padding: 4px 6px 14px 48px; display: flex; flex-wrap: wrap; gap: 6px; }
.audit-chip {
  font-size: 12px; font-weight: 500;
  background: var(--chip-bg); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 4px 10px; color: var(--text-2); text-decoration: none;
  transition: all .15s;
}
.audit-chip:hover { border-color: var(--primary); color: var(--primary); }
.audit-allok { padding: 10px 6px; font-size: 13px; color: var(--ok); font-weight: 500; }

/* ═══ CUSTOMER SEGMENTS ═══ */
.segment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.seg-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 16px;
  transition: border-color .2s;
}
.seg-card:hover { border-color: var(--border-strong); }
.seg-count { font-family: var(--font); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.seg-label { font-weight: 600; font-size: 13px; margin-top: 3px; }
.seg-desc { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.seg-rev { font-family: var(--mono); font-size: 11px; color: var(--text-2); margin-top: 8px; }
.seg-vip { border-color: rgba(251,191,36,.35); background: linear-gradient(180deg, var(--amber-soft), transparent 70%), var(--bg); }
.seg-vip .seg-count { color: var(--amber); }
.seg-ok .seg-count { color: var(--ok); }
.seg-warn { border-color: rgba(244,100,95,.35); background: linear-gradient(180deg, var(--bad-soft), transparent 70%), var(--bg); }
.seg-warn .seg-count { color: var(--bad); }
.seg-cold .seg-count { color: var(--text-3); }

/* ═══ COD / SHIPPING ═══ */
.cod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.cod-stat {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); padding: 16px 18px;
}
.cod-num { font-family: var(--font); font-size: 22px; font-weight: 700; color: var(--bad); font-variant-numeric: tabular-nums; }
.cod-lbl { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.cod-tip { font-size: 13px; color: var(--text-2); max-width: 760px; }
.cod-tip strong { color: var(--ok); font-family: var(--mono); }
.mono { font-family: var(--mono); font-size: 12px; }

/* ═══ B2B ═══ */
.b2b-grid { grid-template-columns: repeat(4, 1fr); }
.b2b-num { color: var(--primary) !important; }
.b2b-grid + .cod-tip strong { color: var(--primary); }

/* ═══ HEATMAP ═══ */
.hm-grid {
  display: grid;
  grid-template-columns: 34px repeat(14, 1fr);
  gap: 4px;
  align-items: stretch;
}
.hm-day, .hm-hour {
  font-family: var(--mono); font-size: 10px; color: var(--text-3);
  display: flex; align-items: center;
}
.hm-hour { justify-content: flex-start; }
.hm-cell {
  aspect-ratio: 1.6 / 1;
  border-radius: 4px;
  background: color-mix(in srgb, var(--primary) calc(var(--f) * 88%), var(--track));
  transition: transform .1s;
  cursor: default;
}
.hm-cell:hover { transform: scale(1.12); outline: 1px solid var(--primary); }

/* ═══ SHIPPING SIMULATOR ═══ */
.sim-head {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.sim-limit { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.sim-limit strong { font-size: 16px; color: var(--amber); font-variant-numeric: tabular-nums; }
#shipSlider {
  flex: 1; min-width: 220px;
  accent-color: var(--primary);
  height: 4px;
  cursor: pointer;
}
.sim-num { color: var(--amber) !important; }
#shipHist { margin-top: 14px; }
#shipHist svg { width: 100%; height: auto; display: block; }
#shipHist .sim-bar { fill: var(--text-3); opacity: .3; }
#shipHist .sim-bar-free { fill: var(--primary); opacity: .65; }
#shipHist .sim-bar-of { opacity: .25; }
#shipHist text { font-family: var(--mono); font-size: 10px; fill: var(--text-3); }
#shipHist .sim-limit-line {
  stroke: var(--amber); stroke-width: 2; stroke-dasharray: 5 4;
}

/* ═══ HLÍDACÍ PES ═══ */
.wd-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; font-size: 10.5px; font-weight: 700;
  font-family: var(--mono); line-height: 1;
  background: var(--text-3); color: var(--bg);
}
.wd-badge:empty { display: none; }
.wd-badge-crit { background: #ef4444; color: #fff; }
.wd-badge-warn { background: var(--amber); color: #1a1a2e; }

.wd-switch-row {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; margin-bottom: 16px; user-select: none;
}
.wd-switch {
  position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0;
}
.wd-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.wd-switch-track {
  position: absolute; inset: 0; border-radius: 11px;
  background: var(--border); transition: background .2s;
}
.wd-switch-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform .2s;
}
.wd-switch input:checked + .wd-switch-track {
  background: #22c55e;
}
.wd-switch input:checked + .wd-switch-track::after {
  transform: translateX(18px);
}
.wd-switch-text {
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.wd-empty {
  text-align: center; padding: 56px 24px; color: var(--text-2);
}
.wd-empty-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok); font-size: 24px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}

.wd-cat-group { margin-bottom: 18px; }
.wd-cat-header {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-3); padding: 8px 0 6px;
  display: flex; align-items: center; gap: 6px;
}
.wd-cat-icon { width: 14px; height: 14px; display: inline-flex; color: var(--text-3); }
.wd-cat-icon svg { width: 100%; height: 100%; }
.wd-cat-count {
  margin-left: auto; background: var(--chip-bg); border-radius: 10px;
  padding: 1px 8px; font-size: 10px; color: var(--text-3);
}

.wd-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 12px; border-radius: 8px; margin-bottom: 4px;
  cursor: pointer; transition: all .15s;
  background: transparent;
}
.wd-card:hover { background: var(--hover-bg); }

.wd-card-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
  background: var(--text-3);
}
.wd-critical .wd-card-dot { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.4); }
.wd-warn .wd-card-dot { background: var(--amber); box-shadow: 0 0 6px rgba(251,191,36,.4); }
.wd-info .wd-card-dot { background: var(--primary); opacity: .6; }

.wd-card-body { flex: 1; min-width: 0; }
.wd-card-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.35; }
.wd-critical .wd-card-title { color: #ef4444; }
.wd-card-detail {
  font-size: 11.5px; color: var(--text-3); margin-top: 3px; line-height: 1.45;
}
.wd-card-action {
  font-size: 14px; color: var(--text-3); opacity: 0; transition: opacity .15s;
  margin-top: 2px; flex-shrink: 0;
}
.wd-card:hover .wd-card-action { opacity: 1; }

.wd-sliders { display: grid; gap: 2px; }
.wd-slider-row {
  display: grid; grid-template-columns: 160px 1fr 80px;
  align-items: center; gap: 12px; padding: 9px 10px; border-radius: 6px;
  transition: background .15s;
}
.wd-slider-row:hover { background: var(--hover-bg); }
.wd-slider-row.wd-changed { background: var(--primary-soft); }

.wd-slider-label {
  font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.wd-slider-icon { font-size: 14px; }

.wd-slider-track { position: relative; }
.wd-slider-track input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px; outline: none;
  background: var(--border-strong);
  cursor: pointer;
}
.wd-slider-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--card);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  cursor: grab; transition: transform .1s;
}
.wd-slider-track input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.wd-slider-track input[type="range"]::-webkit-slider-thumb:active { cursor: grabbing; }
.wd-slider-track input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--card);
  box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: grab;
}
.wd-slider-track input[type="range"]::-moz-range-track {
  height: 4px; border-radius: 2px; background: var(--border-strong);
}

.wd-slider-val {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-2);
  text-align: right; white-space: nowrap;
}
.wd-slider-val strong { color: var(--text); font-weight: 600; }

.wd-thresh-actions {
  margin-top: 16px; display: flex; align-items: center; gap: 14px;
}
.wd-thresh-hint { font-size: 11px; color: var(--text-3); }

/* ═══ THEME TOGGLE ═══ */
.btn-icon .icon-sun, .btn-icon .icon-moon { display: none; }
html[data-theme="light"] .btn-icon .icon-moon { display: block; }
html:not([data-theme="light"]) .btn-icon .icon-sun { display: block; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* tour toggle */
.tour-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.tour-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.tour-toggle-track {
  width: 36px; height: 20px;
  background: var(--border-strong, #D1D1DB);
  border-radius: 10px;
  position: relative;
  transition: background .25s ease;
  flex-shrink: 0;
}
.tour-toggle-track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.tour-toggle input:checked + .tour-toggle-track {
  background: var(--primary);
}
.tour-toggle input:checked + .tour-toggle-track::after {
  transform: translateX(16px);
}
.tour-toggle-label {
  font-size: 13px; font-weight: 500;
  color: var(--text-2, #6E6E80);
}
[data-theme="dark"] .tour-toggle-track { background: var(--border-strong, #3A3A4A); }
[data-theme="dark"] .tour-toggle input:checked + .tour-toggle-track { background: var(--primary); }

/* ---------- auth: přihlášení + onboarding ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background: var(--bg-gradient), var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 34px 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .12);
  text-align: center;
}
.auth-card-wide { max-width: 520px; text-align: left; }
.auth-card-wide h1, .auth-card-wide .auth-sub { text-align: center; }
.auth-logo {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #4c8dff, #2456c4);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 24px;
  box-shadow: 0 0 24px var(--primary-glow);
}
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-sub { color: var(--text-2); font-size: 13.5px; margin-bottom: 22px; line-height: 1.55; }
.field { display: block; text-align: left; margin-bottom: 14px; }
.field span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.field input {
  width: 100%;
  background: var(--bg-raise);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.btn-primary {
  background: var(--primary); color: #fff; border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.08); background: var(--primary); }
.btn-block { width: 100%; justify-content: center; padding: 11px; margin-top: 4px; }
.auth-msg {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  font-size: 13px; text-align: left;
  background: var(--chip-bg); border: 1px solid var(--border);
}
.auth-msg.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.auth-msg.err { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.auth-msg a { color: inherit; font-weight: 600; }
.auth-alt { margin-top: 18px; font-size: 12.5px; color: var(--text-3); line-height: 1.7; }
.auth-alt a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-alt a:hover { text-decoration: underline; }

/* ---------- sidebar: přepínač obchodů + akce ---------- */
.shop-switch {
  margin: 10px 12px 0;
  background: var(--bg-raise);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  font: inherit; font-size: 13px;
  padding: 7px 10px;
}
.side-actions { display: flex; gap: 8px; margin-top: 12px; }
.side-actions .btn { flex: 1; justify-content: center; }

.btn-exit-demo {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; font-family: var(--font);
  color: var(--text-3); text-decoration: none;
  border: 1px dashed var(--border-strong);
  transition: all .2s ease;
}
.btn-exit-demo svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-exit-demo:hover {
  color: var(--text);
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* ---------- nastavení ---------- */
.settings-body { display: flex; flex-direction: column; gap: 10px; }
.settings-body .btn { align-self: flex-start; }
.mask-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 12.5px; color: var(--text-2);
  padding: 7px 10px; background: var(--chip-bg); border-radius: 8px;
}
.mask-row code { font-family: var(--mono); font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-input {
  width: 90px;
  background: var(--bg-raise);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  font: inherit; font-size: 13px;
  padding: 5px 8px;
  text-align: right;
}
.member-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 2px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.member-row:last-child { border-bottom: none; }

/* ---------- drobnosti ---------- */
.data-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 8px;
  padding: 8px 12px;
}
.table-head-actions { display: flex; gap: 10px; align-items: center; }

/* ═══ VIEWS ═══ */
.view[hidden] { display: none; }
.view { animation: viewIn .35s ease both; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes viewIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideRow {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes kpiIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.briefing { animation: fadeUp .5s ease .1s both; }
.kpi { animation: kpiIn .4s cubic-bezier(.22,1,.36,1) both; }
.kpi:nth-child(1) { animation-delay: .05s; }
.kpi:nth-child(2) { animation-delay: .1s; }
.kpi:nth-child(3) { animation-delay: .15s; }
.kpi:nth-child(4) { animation-delay: .2s; }
.kpi:nth-child(5) { animation-delay: .25s; }
.kpi:nth-child(6) { animation-delay: .3s; }
.panel { animation: panelIn .45s cubic-bezier(.22,1,.36,1) both; }
.panel-grid .panel:nth-child(1) { animation-delay: .15s; }
.panel-grid .panel:nth-child(2) { animation-delay: .25s; }
.panel-grid .panel:nth-child(3) { animation-delay: .3s; }
.panel-grid .panel:nth-child(4) { animation-delay: .35s; }
.alert-row { animation: slideRow .3s ease both; }
.bar-fill { transition: width .8s cubic-bezier(.22,1,.36,1) .2s; }

/* ═══ ERROR ═══ */
.error-box {
  background: var(--bad-soft); border: 1px solid rgba(244,100,95,.3); color: var(--bad);
  border-radius: var(--radius); padding: 18px 20px; font-weight: 500;
  margin: 20px 0; max-width: 560px;
}

/* ═══ LIGHT MODE REFINEMENTS ═══ */
html[data-theme="light"] .kpi.kpi-good .kpi-value,
html[data-theme="light"] .kpi.kpi-bad .kpi-value { text-shadow: none; }
html[data-theme="light"] .side-logo { box-shadow: 0 2px 6px rgba(61,90,241,.15); }
html[data-theme="light"] .bar-fill { box-shadow: none; }
html[data-theme="light"] .p-img { border-color: var(--border); }
html[data-theme="light"] .briefing-spark { box-shadow: 0 2px 6px rgba(61,90,241,.15); }

html[data-theme="light"] .sidebar {
  background: #FAFAF8;
  border-right: 1px solid rgba(0,0,0,.06);
  box-shadow: none;
}
html[data-theme="light"] .nav-item.active {
  background: rgba(61,90,241,.05);
  color: #3D5AF1;
  border-left-color: #3D5AF1;
}
html[data-theme="light"] .nav-item:hover {
  background: rgba(0,0,0,.03);
}
html[data-theme="light"] .kpi {
  border: 1px solid rgba(0,0,0,.05);
}
html[data-theme="light"] .panel {
  border: 1px solid rgba(0,0,0,.05);
}
html[data-theme="light"] .briefing {
  background: linear-gradient(120deg, rgba(61,90,241,.03), transparent 50%), #fff;
  border: 1px solid rgba(0,0,0,.05);
}
html[data-theme="light"] .sev-high .alert-sev-dot {
  background: #C0392B;
  box-shadow: 0 0 6px rgba(192,57,43,.3);
}
html[data-theme="light"] .sev-mid .alert-sev-dot {
  background: #B8860B;
  box-shadow: 0 0 6px rgba(184,134,11,.25);
}
html[data-theme="light"] .alert-tag {
  background: rgba(0,0,0,.025);
  border-color: rgba(0,0,0,.06);
  color: var(--text-3);
  font-size: 9.5px;
  letter-spacing: .1em;
}
html[data-theme="light"] .sev-high .alert-tag {
  background: rgba(192,57,43,.04);
  border-color: rgba(192,57,43,.1);
  color: #C0392B;
}
html[data-theme="light"] .sev-mid .alert-tag {
  background: rgba(184,134,11,.04);
  border-color: rgba(184,134,11,.1);
  color: #B8860B;
}
html[data-theme="light"] .count-badge {
  background: rgba(61,90,241,.06);
  border-color: rgba(61,90,241,.12);
  color: #3D5AF1;
}
html[data-theme="light"] .mode-chip {
  color: #96750A;
  background: rgba(150,117,10,.05);
  border-color: rgba(150,117,10,.12);
}
html[data-theme="light"] .dot.ok {
  background: #0E8C6B;
  box-shadow: 0 0 8px rgba(14,140,107,.4);
}
html[data-theme="light"] .abc-card,
html[data-theme="light"] .seg-card,
html[data-theme="light"] .cod-stat {
  background: #FAFAF8;
  border-color: rgba(0,0,0,.05);
}
html[data-theme="light"] .badge-stock { color: #0E8C6B; background: rgba(14,140,107,.05); border-color: rgba(14,140,107,.12); }
html[data-theme="light"] .badge-wait { color: #B8860B; background: rgba(184,134,11,.05); border-color: rgba(184,134,11,.12); }
html[data-theme="light"] .badge-miss { color: #C0392B; background: rgba(192,57,43,.04); border-color: rgba(192,57,43,.1); }
html[data-theme="light"] h1 { color: #1C1C28; }
html[data-theme="light"] .topbar-sub { color: #8A8A9C; }
html[data-theme="light"] #searchInput {
  background: #F4F3F0;
  border-color: rgba(0,0,0,.07);
}
html[data-theme="light"] #searchInput:focus {
  background: #fff;
  border-color: #3D5AF1;
  box-shadow: 0 0 0 3px rgba(61,90,241,.08);
}
html[data-theme="light"] tbody tr:hover { background: rgba(0,0,0,.015); }
html[data-theme="light"] .side-brand { border-bottom-color: rgba(0,0,0,.05); }
html[data-theme="light"] .side-foot { border-top-color: rgba(0,0,0,.05); }
html[data-theme="light"] .auth-card {
  box-shadow: 0 0 0 1px rgba(0,0,0,.04), 0 8px 40px rgba(61,90,241,.06), 0 20px 60px rgba(0,0,0,.06);
}
html[data-theme="light"] .chart-tab.active {
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
html[data-theme="light"] .wd-card:hover {
  background: rgba(61,90,241,.02);
}
html[data-theme="light"] .btn:hover {
  box-shadow: 0 0 0 3px rgba(61,90,241,.06), 0 2px 8px rgba(0,0,0,.04);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 0; padding: 8px 12px; }
  .nav-item { border-left: none; border-bottom: 2.5px solid transparent; padding: 8px 14px; font-size: 12.5px; white-space: nowrap; }
  .nav-item.active { border-bottom-color: var(--primary); border-left-color: transparent; }
  .side-foot { display: none; }
  .panel-grid { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 40px; }
  .abc-grid, .cod-grid { grid-template-columns: 1fr; }
  .b2b-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══ ONBOARDING TOUR ═══ */
.tour-backdrop {
  position: fixed; inset: 0; z-index: 8000;
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.tour-backdrop.active { opacity: 1; pointer-events: auto; }

.tour-spotlight {
  position: absolute; z-index: 8001;
  border-radius: var(--radius);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.35);
  transition: all .5s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
html[data-theme="light"] .tour-spotlight {
  box-shadow: 0 0 0 9999px rgba(0,0,0,.28);
}

.tour-card {
  position: absolute; z-index: 8002;
  width: 340px; max-width: 88vw;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px -4px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s ease .1s, transform .45s cubic-bezier(.22,1,.36,1) .1s;
}
.tour-card.active { opacity: 1; transform: translateY(0); }

[data-theme="dark"] .tour-card {
  background: var(--card);
  box-shadow: 0 8px 32px -4px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.04);
}

.tour-card-body { padding: 20px 20px 14px; }

.tour-eyebrow {
  font-size: .6rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 8px;
}

.tour-heading {
  font-size: .95rem; font-weight: 700; color: #1C1C28;
  margin: 0 0 6px; letter-spacing: -.01em; line-height: 1.35;
}
[data-theme="dark"] .tour-heading { color: var(--text); }

.tour-desc {
  font-size: .8rem; line-height: 1.6; color: #6B6B80;
  margin: 0;
}
[data-theme="dark"] .tour-desc { color: var(--text-2); }

.tour-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px 14px; gap: 12px;
}

.tour-dots { display: flex; gap: 4px; }
.tour-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #e0e0e0; transition: all .3s ease;
}
.tour-dot.active {
  width: 18px; border-radius: 3px; background: var(--primary);
}
[data-theme="dark"] .tour-dot { background: var(--border-strong); }

.tour-actions { display: flex; align-items: center; gap: 8px; }

.tour-skip {
  background: none; border: none; cursor: pointer;
  font-size: .75rem; color: #A0A0B2; font-family: var(--font);
  padding: 6px 8px; border-radius: 6px; transition: color .15s;
}
.tour-skip:hover { color: #1C1C28; }
[data-theme="dark"] .tour-skip:hover { color: var(--text); }

.tour-next {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px; border: none;
  background: var(--primary); color: #fff;
  font-size: .78rem; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all .15s ease;
}
.tour-next:hover { filter: brightness(1.08); }
.tour-next svg { width: 13px; height: 13px; transition: transform .2s; }
.tour-next:hover svg { transform: translateX(2px); }

/* nudge on Ziskovost tab after tour */
@keyframes nudgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,91,255,.4); }
  50% { box-shadow: 0 0 0 6px rgba(99,91,255,0); }
}
.nudge-pulse {
  animation: nudgePulse 2s ease-in-out infinite;
  border-radius: 8px;
}
.nudge-tip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%; transform: translateY(-50%) translateX(-6px);
  white-space: nowrap;
  background: #fff;
  color: #1C1C28;
  font-size: 13px; font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 16px -2px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.06);
  opacity: 0;
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
  z-index: 100;
}
.nudge-tip.active { opacity: 1; transform: translateY(-50%) translateX(0); }
[data-theme="dark"] .nudge-tip { background: var(--card-bg); color: var(--text); }

/* ═══ CONVERSION STRIP + OVERLAY ═══ */
.conv-strip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
  background: var(--primary);
  color: #fff;
  font-size: 13px; font-weight: 500;
  transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.conv-strip.active { transform: translateY(0); }
.shell.has-strip { padding-top: 42px; }
.shell.has-strip .sidebar { top: 42px; height: calc(100vh - 42px); }
.conv-strip-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 10px 24px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.conv-strip-text { opacity: .9; }
.conv-strip-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: #fff; text-decoration: none; font-weight: 700;
  background: rgba(255,255,255,.18);
  padding: 5px 14px; border-radius: 6px;
  border: none; cursor: pointer; font: inherit; font-weight: 700;
  transition: background .2s;
}
.conv-strip-link:hover { background: rgba(255,255,255,.28); }
.conv-strip-link svg { transition: transform .2s; }
.conv-strip-link:hover svg { transform: translateX(2px); }

.conv-overlay {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9500;
  background: var(--primary);
  color: #fff;
  height: 0; overflow: hidden;
  transition: height .8s cubic-bezier(.22,1,.36,1);
}
.conv-overlay.active { height: 85vh; overflow-y: auto; }
.conv-overlay.active::after {
  content: '';
  position: fixed; left: 0; right: 0; top: 85vh; bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.0), rgba(0,0,0,.55) 40%);
  pointer-events: none;
}
.conv-close {
  position: absolute; top: 16px; right: 24px;
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
  z-index: 2;
}
.conv-close:hover { background: rgba(255,255,255,.25); }
.conv-content {
  max-width: 820px; margin: 0 auto;
  padding: 48px 24px 40px;
  text-align: center;
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease .3s, transform .6s ease .3s;
}
.conv-overlay.active .conv-content { opacity: 1; transform: translateY(0); }
.conv-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  opacity: .7; margin-bottom: 8px;
}
.conv-title {
  font-size: clamp(24px, 3.5vw, 36px); font-weight: 800; line-height: 1.2;
  margin: 0 0 12px;
}
.conv-title em { font-style: normal; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 4px; }
.conv-sub { font-size: 15px; opacity: .85; max-width: 480px; margin: 0 auto 36px; line-height: 1.5; }

.conv-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  max-width: 640px; margin: 0 auto 24px;
}
.conv-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: left;
  backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.conv-overlay.active .conv-card { opacity: 1; transform: translateY(0); }
.conv-overlay.active .conv-card:nth-child(1) { transition-delay: .5s; }
.conv-overlay.active .conv-card:nth-child(2) { transition-delay: .65s; }
.conv-card-pop {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.35);
  position: relative;
}
.conv-card-badge {
  position: absolute; top: -10px; right: 16px;
  background: #FFD700; color: #1C1C28;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 6px;
}
.conv-card-name { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.conv-card-desc { font-size: 13px; opacity: .7; margin-bottom: 14px; }
.conv-card-price { margin-bottom: 16px; }
.conv-n { font-size: 32px; font-weight: 800; }
.conv-u { font-size: 14px; opacity: .7; margin-left: 4px; }
.conv-feats {
  list-style: none; padding: 0; margin: 0 0 20px;
  font-size: 13px; line-height: 2;
}
.conv-feats li::before { content: '✓ '; opacity: .6; }
.conv-cta {
  display: block; text-align: center;
  padding: 12px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.conv-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.conv-cta-fill {
  background: #fff; color: var(--primary);
}
.conv-note {
  font-size: 12px; opacity: .5; margin: 0;
}
@media (max-width: 600px) {
  .conv-cards { grid-template-columns: 1fr; }
}
