/* ==========================================================================
   AI Operátor — demo pro call centra
   Vlastní systém tokenů (žádné externí fonty, žádné CDN) — jen systémový
   font stack. Barvy jdou přes proměnné kvůli světlé/tmavé variantě.
   ========================================================================== */

:root,
:root[data-theme="dark"] {
  --bg-0: #0a0c11;
  --bg-1: #0d1017;
  --surf: #12151d;
  --surf-high: #1a1e29;
  --surf-highest: #232837;

  --text-1: #f2f3f7;
  --text-2: rgba(242, 243, 247, 0.66);
  --text-3: rgba(242, 243, 247, 0.44);

  --brand: #5c7ff0;
  --brand-hover: #7d9bf5;
  --brand-subtle: rgba(92, 127, 240, 0.14);

  --teal: #2dd4bf;
  --teal-subtle: rgba(45, 212, 191, 0.12);
  --ok: #34d399;
  --ok-subtle: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-subtle: rgba(251, 191, 36, 0.14);
  --bad: #fb7185;
  --bad-subtle: rgba(251, 113, 133, 0.14);

  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.18);

  --elev: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  --elev-stat: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  --fill-1: rgba(255, 255, 255, 0.035);
  --fill-2: rgba(255, 255, 255, 0.06);
  --fill-3: rgba(255, 255, 255, 0.10);
  --hover: rgba(255, 255, 255, 0.05);
  --hover-row: rgba(255, 255, 255, 0.03);

  --glass-side: rgba(13, 16, 23, 0.66);
  --glass-top: rgba(10, 12, 17, 0.58);

  --glow-a: rgba(92, 127, 240, 0.14);
  --glow-b: rgba(45, 212, 191, 0.08);

  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;

  --sidebar: 240px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  --bg-0: #f4f5fa;
  --bg-1: #eceef6;
  --surf: #ffffff;
  --surf-high: #ffffff;
  --surf-highest: #dfe2ee;

  --text-1: #14151f;
  --text-2: rgba(20, 21, 31, 0.68);
  --text-3: rgba(20, 21, 31, 0.48);

  --brand: #3a5ce0;
  --brand-hover: #2c47b8;
  --brand-subtle: rgba(58, 92, 224, 0.10);

  --teal: #0f9c8c;
  --teal-subtle: rgba(15, 156, 140, 0.10);
  --ok: #0f9d63;
  --ok-subtle: rgba(15, 157, 99, 0.11);
  --warn: #b45309;
  --warn-subtle: rgba(180, 83, 9, 0.11);
  --bad: #dc2626;
  --bad-subtle: rgba(220, 38, 38, 0.10);

  --line: rgba(20, 21, 31, 0.12);
  --line-soft: rgba(20, 21, 31, 0.08);
  --line-strong: rgba(20, 21, 31, 0.22);

  --elev: linear-gradient(180deg, #ffffff, #fcfcff);
  --elev-stat: linear-gradient(180deg, #ffffff, #f9f9ff);
  --fill-1: rgba(20, 21, 31, 0.035);
  --fill-2: rgba(20, 21, 31, 0.055);
  --fill-3: rgba(20, 21, 31, 0.09);
  --hover: rgba(20, 21, 31, 0.05);
  --hover-row: rgba(20, 21, 31, 0.03);

  --glass-side: rgba(255, 255, 255, 0.8);
  --glass-top: rgba(255, 255, 255, 0.74);

  --glow-a: rgba(58, 92, 224, 0.09);
  --glow-b: rgba(15, 156, 140, 0.06);

  --shadow-md: 0 6px 20px rgba(20, 21, 31, 0.07);
  --shadow-lg: 0 20px 52px rgba(20, 21, 31, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(38% 38% at 16% 10%, var(--glow-a) 0%, transparent 70%),
    radial-gradient(30% 32% at 86% 6%, var(--glow-b) 0%, transparent 70%);
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surf-highest); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ layout ============================ */

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  /* height (ne min-height) je nutná — jinak grid řádek s .main naroste na
     výšku obsahu, .scroll uvnitř přestane potřebovat overflow-y:auto a
     celá stránka se natáhne (přesně tenhle bug byl na mobilu). */
  height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line-soft);
  background: var(--glass-side);
  backdrop-filter: blur(28px) saturate(160%);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  gap: 22px;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  box-shadow: 0 6px 20px rgba(58, 92, 224, 0.32);
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name { font-weight: 650; letter-spacing: -0.03em; font-size: 15px; line-height: 1.1; }
.brand-sub { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); padding: 0 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; text-align: left; width: 100%;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; opacity: .8; flex: none; }
.nav-item:hover { background: var(--hover); color: var(--text-1); }
.nav-item.is-active { background: var(--brand-subtle); color: var(--text-1); }
.nav-item.is-active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav-badge {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  background: var(--fill-2); color: var(--text-3);
  padding: 1px 7px; border-radius: 99px;
}
.nav-badge.is-warn { background: var(--warn-subtle); color: var(--warn); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.workspace {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 12px;
  background: var(--fill-1); border: 1px solid var(--line-soft);
}
.avatar {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover)); color: #fff;
}
.workspace-name { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.workspace-sub { font-size: 10.5px; color: var(--text-3); }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.topbar {
  height: 58px; flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--glass-top);
  backdrop-filter: blur(20px);
}
/* titulek musí mít omezenou šířku a ustřihnout dlouhý text — jinak se
   při málu místa (mobil, dlouhý podnadpis) zalomí na víc řádků, vzroste
   nad výšku topbaru (58px) a přeteče do sidebaru nad ním. */
.topbar-titles { min-width: 0; overflow: hidden; }
.page-title, .page-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title { font-size: 15.5px; font-weight: 650; }
.page-sub { font-size: 12px; color: var(--text-3); }

.demo-pill {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--warn);
  background: var(--warn-subtle); border: 1px solid var(--warn-subtle);
  padding: 5px 11px; border-radius: 99px; font-weight: 600;
  white-space: nowrap;
}
.dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; flex: none; }

.theme-toggle {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center; color: var(--text-2);
  background: var(--fill-1); border: 1px solid var(--line-soft);
  transition: background .15s, color .15s;
}
.theme-toggle:hover { background: var(--fill-2); color: var(--text-1); }
.theme-toggle svg { width: 16px; height: 16px; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun,
:root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }

.scroll { overflow-y: auto; flex: 1; padding: 20px 22px 44px; }

.page { display: none; animation: fade .3s ease both; }
.page.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================ atoms ============================ */

.card {
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
}
.card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--line-soft);
}
.card-title { font-size: 13.5px; font-weight: 650; }
.card-note { font-size: 11.5px; color: var(--text-3); margin-left: auto; }
.card-body { padding: 16px; font-size: 13px; line-height: 1.6; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13px;
  background: var(--fill-2); border: 1px solid var(--line);
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--fill-3); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-hover));
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 24px rgba(92, 127, 240, 0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-hover), var(--brand)); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  background: var(--fill-2); color: var(--text-2); white-space: nowrap;
}
.tag-ok { background: var(--ok-subtle); color: var(--ok); }
.tag-warn { background: var(--warn-subtle); color: var(--warn); }
.tag-bad { background: var(--bad-subtle); color: var(--bad); }
.tag-brand { background: var(--brand-subtle); color: var(--brand-hover); }
.tag-teal { background: var(--teal-subtle); color: var(--teal); }

.muted { color: var(--text-3); }
.mono { font-family: var(--mono); }
.mt-14 { margin-top: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.section-head { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
.section-head h2 { font-size: 17px; font-weight: 680; }
.section-head p { margin: 0; font-size: 12.6px; color: var(--text-3); max-width: 62ch; }

.hint-bar {
  display: flex; align-items: flex-start; gap: 10px; font-size: 12.3px; color: var(--text-2);
  background: var(--brand-subtle); border: 1px solid var(--line-soft);
  padding: 11px 14px; border-radius: 12px; margin-bottom: 14px; line-height: 1.55;
}
.hint-bar svg { width: 16px; height: 16px; color: var(--brand); flex: none; margin-top: 1px; }

/* ============================ stat row ============================ */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat {
  position: relative; overflow: hidden;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--elev-stat);
  border: 1px solid var(--line);
}
.stat::after {
  content: ""; position: absolute; right: -30px; top: -40px;
  width: 110px; height: 110px; border-radius: 99px;
  background: radial-gradient(circle, var(--glow, rgba(92,127,240,.2)), transparent 70%);
}
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.stat-value { font-size: 25px; font-weight: 700; letter-spacing: -0.035em; margin-top: 5px; line-height: 1.1; }
.stat-value small { font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.stat-foot { font-size: 11.3px; color: var(--text-2); margin-top: 7px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ============================ formuláře ============================ */

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; font-weight: 600; }
.field input:not([type="range"]) {
  width: 100%; background: var(--fill-1); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 13px; font-size: 13.5px; outline: none;
}
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-subtle); }
.field .hint { font-size: 11px; color: var(--text-3); margin-top: 7px; line-height: 1.5; }

.status-line {
  display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 11px;
  font-size: 12.3px; line-height: 1.5; background: var(--fill-1); border: 1px solid var(--line-soft); color: var(--text-2);
}
.status-line.is-ok { background: var(--ok-subtle); border-color: var(--ok-subtle); color: var(--ok); }
.status-line.is-bad { background: var(--bad-subtle); border-color: var(--bad-subtle); color: var(--bad); }
.status-line.is-wait { background: var(--warn-subtle); border-color: var(--warn-subtle); color: var(--warn); }

/* segmentovaný přepínač (citlivost detekce řeči) */
.seg { display: flex; gap: 6px; background: var(--fill-1); border: 1px solid var(--line-soft); border-radius: 11px; padding: 4px; }
.seg-btn {
  flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  transition: background .15s, color .15s;
}
.seg-btn.is-active { background: var(--brand); color: #fff; }

/* ============================ scénáře (zavolat naostro) ============================ */

.callpage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 14px; align-items: start; }

.scenario-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 4px; }
.scenario-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line-soft);
  background: var(--fill-1); text-align: left; transition: border-color .15s, background .15s;
}
.scenario-tile:hover { background: var(--hover); }
.scenario-tile.is-active { border-color: var(--brand); background: var(--brand-subtle); }
.scenario-tile .st-name { font-size: 12.6px; font-weight: 620; line-height: 1.35; }

.scenario-detail { margin-top: 14px; padding-top: 4px; border-top: 1px dashed var(--line-soft); }

.phrase {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 4px 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px;
}
.phrase:last-child { border-bottom: none; }
.phrase .mn { font-weight: 600; color: var(--text-2); }
.phrase .cz { color: var(--text-2); line-height: 1.5; }
.phrase .ph { grid-column: 1 / -1; font-style: italic; color: var(--text-2); line-height: 1.5; }

/* ============================ živý hovor ============================ */

.latency-gauge { text-align: center; padding: 8px 0 18px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; position: relative; }
.lg-pulse {
  width: 10px; height: 10px; border-radius: 99px; background: var(--text-3);
  margin: 0 auto 10px;
}
.lg-pulse.is-live {
  background: var(--bad);
  box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.55);
  animation: lgpulse 1.4s ease-out infinite;
}
@keyframes lgpulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 113, 133, .55); }
  70% { box-shadow: 0 0 0 12px rgba(251, 113, 133, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 113, 133, 0); }
}
.lg-num-row { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.lg-num { font-size: 52px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.lg-unit { font-size: 15px; color: var(--text-3); font-weight: 600; }
.lg-label { font-size: 12.5px; color: var(--text-2); margin-top: 8px; font-weight: 600; }
.lg-avg { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

.transcript-feed { display: flex; flex-direction: column; gap: 12px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }

.t-line { display: flex; gap: 10px; animation: tpop .35s cubic-bezier(.2,.9,.3,1.15) both; }
.t-line.klient { flex-direction: row-reverse; }
@keyframes tpop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.t-line .who { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; flex: none; width: 78px; padding-top: 4px; color: var(--text-3); }
.t-line.klient .who { text-align: right; }
.t-line.operator .who { color: var(--brand-hover); }
.t-line.klient .who { color: var(--warn); }
.t-bubble {
  max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 12.8px; line-height: 1.5;
  background: var(--fill-1); border: 1px solid var(--line-soft); position: relative;
}
.t-line.operator .t-bubble { background: var(--brand-subtle); border-bottom-left-radius: 4px; }
.t-line.klient .t-bubble { background: var(--fill-2); border-bottom-right-radius: 4px; }
.t-ms { display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 700; color: var(--text-3); font-family: var(--mono); }

.call-summary { margin-top: 14px; padding: 13px 14px; border-radius: 12px; background: var(--ok-subtle); border: 1px solid var(--ok-subtle); animation: fade .3s ease both; }
.cs-title { font-size: 12.8px; font-weight: 700; color: var(--ok); margin-bottom: 4px; }
.cs-text { font-size: 12.6px; line-height: 1.55; color: var(--text-1); }

/* ============================ typ klienta — velký pokyn pro člověka ============================ */

.type-callout {
  margin-top: 14px; padding: 18px; border-radius: 14px;
  background: var(--brand-subtle); border: 1px solid var(--brand);
}
.tc-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; margin-bottom: 9px; }
.tc-text { font-size: 21px; font-weight: 650; line-height: 1.45; color: var(--text-1); }
.tc-cil { margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--line-soft); font-size: 12.6px; color: var(--text-2); line-height: 1.55; }
.tc-cil b { color: var(--text-1); }

/* ============================ use casy / varianty ============================ */

.usecase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.usecase-card .card-body { display: flex; flex-direction: column; }
.uc-proc { font-size: 12.8px; line-height: 1.55; color: var(--text-2); }
.uc-result {
  display: flex; flex-direction: column; gap: 3px; margin-top: 4px;
  padding: 10px 12px; border-radius: 10px; background: var(--fill-1); border: 1px solid var(--line-soft);
  font-size: 12.5px; line-height: 1.5;
}
.uc-result-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; }

.quote-block {
  padding: 10px 12px; border-radius: 10px; background: var(--fill-1); border: 1px solid var(--line-soft);
  font-size: 12.4px; line-height: 1.55; font-style: italic; color: var(--text-2); margin-bottom: 4px;
}

/* ============================ kaskáda po hovoru ============================ */

.cascade-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line-soft); }
.cascade-item:last-child { border-bottom: none; }
.cascade-icon {
  width: 28px; height: 28px; border-radius: 9px; flex: none; margin-top: 1px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.cascade-icon.st-odeslano { background: var(--ok-subtle); color: var(--ok); }
.cascade-icon.st-pripraveno { background: var(--warn-subtle); color: var(--warn); }
.cascade-icon.st-neprobehlo { background: var(--fill-2); color: var(--text-3); }
.cascade-main { flex: 1; min-width: 0; }
.cascade-title { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cascade-detail { font-size: 12.2px; color: var(--text-2); margin-top: 3px; line-height: 1.5; }
.cascade-preview {
  margin-top: 8px; padding: 9px 11px; border-radius: 10px;
  background: var(--fill-1); border: 1px solid var(--line-soft);
  font-size: 12.1px; line-height: 1.5; color: var(--text-1);
}

/* ============================ pay-grid (obecné dvousloupcové shrnutí) ============================ */

.pay-grid { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 12.6px; }
.pay-grid .l { color: var(--text-3); }
.pay-grid .v { font-weight: 600; }

/* ============================ tabulky / kvalita ============================ */

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.8px; min-width: 560px; }
.table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3); font-weight: 600; padding: 0 14px 10px; white-space: nowrap;
}
.table td { padding: 11px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:not(.q-detail-row) { transition: background .12s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--hover-row); }
.q-chev { display: inline-block; color: var(--text-3); transition: transform .2s; }
.table tbody tr.is-open .q-chev { transform: rotate(180deg); color: var(--brand); }
.q-detail-row td { border-top: none; padding: 0 14px 14px; }
.q-detail { padding: 12px 14px; border-radius: 11px; background: var(--fill-1); border: 1px solid var(--line-soft); animation: fade .2s ease both; }
.q-list { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; }
.sect-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; }

/* ============================ čísla ============================ */

.econ { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.slider-row { margin-bottom: 20px; }
.slider-row:last-of-type { margin-bottom: 0; }
.slider-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.slider-label { font-size: 12.5px; color: var(--text-2); }
.slider-val { margin-left: auto; font-size: 17px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) var(--pct, 40%), var(--fill-3) var(--pct, 40%));
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 19px; height: 19px; border-radius: 99px;
  background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.4); cursor: grab;
  border: 3px solid var(--brand);
}
input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 99px; background: #fff; cursor: grab; border: 3px solid var(--brand);
}

.mini-stat { padding: 11px 13px; border-radius: 11px; background: var(--fill-1); border: 1px solid var(--line-soft); }
.mini-stat .l { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.mini-stat .v { font-size: 16px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }

.pricing-note { font-size: 11px; color: var(--text-3); line-height: 1.55; margin-top: 14px; }

.result {
  background: linear-gradient(160deg, var(--brand-subtle), var(--teal-subtle));
  border: 1px solid var(--brand); border-radius: var(--r);
  padding: 22px; text-align: center; transition: border-color .2s, background .2s;
}
.result.is-bad { background: var(--bad-subtle); border-color: var(--bad); }
.result-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.result-value { font-size: 38px; font-weight: 800; letter-spacing: -.045em; margin: 8px 0 4px; line-height: 1; font-variant-numeric: tabular-nums; }
.result-sub { font-size: 12.3px; color: var(--text-2); line-height: 1.5; }

/* ============================ mantinely ============================ */

.alert-box {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--bad-subtle); border: 1px solid var(--bad-subtle);
}
.alert-box.is-warn { background: var(--warn-subtle); border-color: var(--warn-subtle); }
.alert-box svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--bad); }
.alert-box.is-warn svg { color: var(--warn); }
.alert-box .t { font-size: 12.8px; font-weight: 650; }
.alert-box .d { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.5; }

/* ============================ responzivita ============================ */

@media (max-width: 1240px) {
  .callpage, .econ, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar {
    flex-direction: row; align-items: center; gap: 4px;
    overflow-x: auto; overflow-y: hidden; white-space: nowrap;
    padding: 10px 12px; border-right: none; border-bottom: 1px solid var(--line-soft);
  }
  .sidebar .brand, .sidebar-foot { display: none; }
  .nav { flex-direction: row; gap: 4px; }
  .nav-label { display: none; }
  .nav-item { flex: none; padding: 8px 10px; }
  .nav-item.is-active::before { display: none; }
  .nav-badge { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .scroll { padding: 16px 14px 32px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .demo-pill { padding: 6px 9px; }
  .demo-pill .dp-label { display: none; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .lg-num { font-size: 42px; }
}
