@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@200;300;400;500;600;700&display=swap');

/* =====================================================================
   CarSiq — design system
   Tmavé rozhraní, skleněné panely, datově hustá typografie.
   ===================================================================== */

@font-face {
  font-family: 'Aspekta';
  src: url('../fonts/Aspekta-550.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* plochy */
  --bg-0: #06070a;
  --bg-1: #0b0d12;
  --bg-2: #10131a;
  --bg-3: #161a23;

  /* text */
  --ink:   rgba(255,255,255,.95);
  --ink-2: rgba(255,255,255,.72);
  --ink-3: rgba(255,255,255,.50);
  --ink-4: rgba(255,255,255,.32);

  /* linky a sklo */
  --line-1: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --line-3: rgba(255,255,255,.20);
  --glass:  rgba(255,255,255,.045);
  --glass-2:rgba(255,255,255,.075);

  /* značka — AR CARS červená */
  --brand:      #ff2d2d;
  --brand-ink:  #ffffff;
  --brand-dim:  rgba(255,45,45,.16);
  --brand-soft: #ff5c4d;
  --violet:     #8b7bff;
  --violet-dim: rgba(139,123,255,.14);

  /* semafor */
  --green: #4ade80;  --green-dim: rgba(74,222,128,.13);
  --amber: #f7b955;  --amber-dim: rgba(247,185,85,.13);
  --red:   #ff7a8f;  --red-dim:   rgba(255,122,143,.14);
  --blue:  #57a9ff;  --blue-dim:  rgba(87,169,255,.13);
  --slate: #8f97a8;  --slate-dim: rgba(143,151,168,.13);
  --teal:  #43c9c2;  --teal-dim:  rgba(67,201,194,.13);

  --r-xl: 24px; --r-lg: 18px; --r-md: 13px; --r-sm: 9px;
  --shadow-1: 0 12px 30px rgba(0,0,0,.35);
  --shadow-2: 0 28px 70px rgba(0,0,0,.55);
  --ease: cubic-bezier(.22,.85,.24,1);

  --sidebar-w: 246px;
  --topbar-h: 62px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--ink);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: rgba(255,45,45,.30); }
h1,h2,h3,h4 { margin: 0; font-family: 'Aspekta','Public Sans',sans-serif; font-weight: 550; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); background-clip: content-box; }

/* =====================================================================
   POZADÍ
   ===================================================================== */
.aurora {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 8% -6%, rgba(255,45,45,.12), transparent 62%),
    radial-gradient(900px 520px at 105% 4%, rgba(139,123,255,.11), transparent 60%),
    radial-gradient(1200px 700px at 50% 115%, rgba(30,90,180,.10), transparent 62%),
    linear-gradient(180deg, #06070a 0%, #090b10 50%, #06070a 100%);
}
.aurora::after {
  content: ''; position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.7'/></svg>");
}

/* =====================================================================
   LAYOUT APLIKACE
   ===================================================================== */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w); z-index: 60;
  display: flex; flex-direction: column;
  background: rgba(10,12,16,.82);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border-right: 1px solid var(--line-1);
  padding: 18px 12px;
  overflow-y: auto;
}
.sidebar__brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 6px 10px 18px;
}
.sidebar__brand svg { flex: none; }
.sidebar__logo { width: 168px; height: auto; }
.sidebar__system {
  font-size: 10px; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-4);
}
.sidebar__system em { font-style: normal; color: var(--brand); font-weight: 600; }
.brandname {
  font-family: 'Aspekta',sans-serif; font-weight: 550; font-size: 19px; letter-spacing: -.03em;
}
.brandname em { font-style: normal; color: var(--brand); }
.sidebar__section {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-4); padding: 16px 12px 7px; font-weight: 500;
}
.navlink {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--r-md);
  color: var(--ink-2); font-size: 13.5px;
  transition: background .16s var(--ease), color .16s var(--ease);
  position: relative;
}
.navlink svg { flex: none; opacity: .78; }
.navlink:hover { background: var(--glass); color: var(--ink); }
.navlink.is-active { background: var(--glass-2); color: var(--ink); font-weight: 500; }
.navlink.is-active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.navlink__badge {
  margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 20px;
  background: var(--glass-2); color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.navlink.is-active .navlink__badge { background: var(--brand-dim); color: var(--brand); }
.sidebar__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-1); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); }

.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  background: rgba(8,10,14,.72);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-bottom: 1px solid var(--line-1);
}
.topbar__title { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.topbar__sub { color: var(--ink-3); font-size: 12.5px; }
.topbar__spacer { flex: 1; }

.page { padding: 24px 22px 64px; max-width: 1680px; }
.page--narrow { max-width: 1080px; }

.pagehead { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.pagehead h1 { font-size: clamp(21px, 2.2vw, 27px); }
.pagehead p { color: var(--ink-3); font-size: 13.5px; margin: 4px 0 0; }
.pagehead__actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }

/* =====================================================================
   KOMPONENTY
   ===================================================================== */
.card {
  background: var(--glass);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
}
.card--pad0 { padding: 0; overflow: hidden; }
.card__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.card__head h3 { font-size: 14.5px; }
.card__head .card__act { margin-left: auto; }
.card__hint { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }

.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.grid--sidebar { grid-template-columns: minmax(0,1fr) 380px; align-items: start; }
@media (max-width: 1280px) {
  .grid--5, .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--sidebar { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 860px) {
  .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: minmax(0,1fr); }
}

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi__label { color: var(--ink-3); font-size: 12px; letter-spacing: .01em; display: flex; align-items: center; gap: 6px; }
.kpi__value {
  font-family: 'Aspekta',sans-serif; font-weight: 550; font-size: 27px; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.kpi__value small { font-size: 14px; color: var(--ink-3); font-weight: 400; margin-left: 3px; }
.kpi__delta { font-size: 12px; display: flex; align-items: center; gap: 5px; }
.kpi__delta.up { color: var(--green); }
.kpi__delta.down { color: var(--red); }
.kpi__delta.flat { color: var(--ink-3); }

/* tlačítka */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 15px; border-radius: 11px;
  background: var(--glass-2); border: 1px solid var(--line-2);
  color: var(--ink); font-size: 13px; font-weight: 450;
  transition: all .16s var(--ease); white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.12); border-color: var(--line-3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(180deg, #ff4d4d, var(--brand));
  color: var(--brand-ink); border-color: transparent; font-weight: 600;
  box-shadow: 0 6px 18px rgba(255,45,45,.26);
}
.btn--primary:hover { background: linear-gradient(180deg, #ff6058, #f52424); box-shadow: 0 10px 26px rgba(255,45,45,.34); }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--red); border-color: rgba(255,90,106,.3); background: var(--red-dim); }
.btn--sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn--lg { height: 44px; padding: 0 22px; font-size: 14.5px; border-radius: 13px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* chipy a odznaky */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 25px; padding: 0 10px; border-radius: 20px;
  background: var(--glass-2); border: 1px solid var(--line-1);
  font-size: 11.5px; color: var(--ink-2); white-space: nowrap;
}
.chip--green  { background: var(--green-dim); color: var(--green); border-color: rgba(74,222,128,.22); }
.chip--amber  { background: var(--amber-dim); color: var(--amber); border-color: rgba(247,185,85,.22); }
.chip--red    { background: var(--red-dim);   color: var(--red);   border-color: rgba(255,90,106,.22); }
.chip--blue   { background: var(--blue-dim);  color: var(--blue);  border-color: rgba(87,169,255,.22); }
.chip--violet { background: var(--violet-dim);color: var(--violet);border-color: rgba(139,123,255,.22); }
.chip--teal   { background: var(--teal-dim);  color: var(--teal);  border-color: rgba(67,201,194,.22); }
.chip--slate  { background: var(--slate-dim); color: var(--ink-3); }
.chip--brand  { background: var(--brand-dim); color: var(--brand); border-color: rgba(255,45,45,.30); }
.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tag { font-size: 11px; color: var(--ink-3); background: var(--glass); border: 1px solid var(--line-1);
       padding: 2px 8px; border-radius: 7px; display: inline-block; }

/* tabulky */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 500; color: var(--ink-3); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px;
  border-bottom: 1px solid var(--line-1); white-space: nowrap; position: sticky; top: 0;
  background: rgba(11,13,18,.94); backdrop-filter: blur(8px); z-index: 2;
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-1); vertical-align: middle; }
.table tbody tr { transition: background .12s var(--ease); }
.table tbody tr:hover { background: rgba(255,255,255,.035); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a.link:hover { color: var(--brand); }
.table--fixed { table-layout: fixed; }
.tablewrap { overflow-x: auto; }

/* formuláře */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.input, .select, .textarea {
  height: 38px; padding: 0 12px; width: 100%;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2);
  border-radius: 11px; color: var(--ink); font-size: 13.5px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  appearance: none;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: rgba(255,45,45,.6); background: rgba(255,45,45,.07);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888f9c' stroke-width='1.6'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px;
  color-scheme: dark;
}
.select option { background: #12151c; }
.checkline { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.checkline input { accent-color: var(--brand); width: 16px; height: 16px; }

/* semafor */
.semafor { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; }
.semafor__light { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.05); }
.semafor--green  .semafor__light { background: var(--green); box-shadow: 0 0 10px rgba(74,222,128,.6), 0 0 0 3px rgba(74,222,128,.12); }
.semafor--amber  .semafor__light { background: var(--amber); box-shadow: 0 0 10px rgba(247,185,85,.6), 0 0 0 3px rgba(247,185,85,.12); }
.semafor--red    .semafor__light { background: var(--red);   box-shadow: 0 0 10px rgba(255,90,106,.6), 0 0 0 3px rgba(255,90,106,.12); }

/* progress */
.bar { display: block; height: 6px; border-radius: 20px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar__fill { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--brand), #ff7a55); transition: width .5s var(--ease); }
.bar__fill--amber { background: linear-gradient(90deg, var(--amber), #ffd08a); }
.bar__fill--red   { background: linear-gradient(90deg, var(--red), #ff8f9c); }
.bar__fill--violet{ background: linear-gradient(90deg, var(--violet), #b3a7ff); }

/* avatary */
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
  color: #06070a; letter-spacing: -.02em;
}
.avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.avatar--lg { width: 40px; height: 40px; font-size: 14px; }

/* karta vozu (mřížka skladu) */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 16px; }
.vcard {
  background: var(--glass); border: 1px solid var(--line-1); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.vcard:hover { transform: translateY(-3px); border-color: var(--line-3); box-shadow: var(--shadow-2); }
.vcard__media { position: relative; aspect-ratio: 4/3; background: var(--bg-2); overflow: hidden; }
.vcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.vcard:hover .vcard__media img { transform: scale(1.045); }
.vcard__badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 78px); }
/* chipy se nesmí smrštit pod obsah — jinak text přeteče přes sousední chip */
.vcard__badges .chip { flex: 0 0 auto; }
.vcard__score {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(6,7,10,.72); backdrop-filter: blur(8px);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--line-2);
}
.vcard__body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.vcard__title { font-size: 14.5px; font-weight: 500; line-height: 1.3; letter-spacing: -.015em; }
.vcard__meta { color: var(--ink-3); font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.vcard__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.vcard__price { font-family: 'Aspekta',sans-serif; font-weight: 550; font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vcard__pricenote { font-size: 11px; color: var(--ink-3); }

/* prázdný stav */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty h3 { font-size: 16px; color: var(--ink-2); margin-bottom: 6px; }

/* taby */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-1); overflow-x: auto; }
.tab {
  padding: 9px 14px; font-size: 13px; color: var(--ink-3); position: relative; white-space: nowrap;
  transition: color .15s var(--ease);
}
.tab:hover { color: var(--ink-2); }
.tab.is-active { color: var(--ink); font-weight: 500; }
.tab.is-active::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  background: var(--brand); border-radius: 2px;
}
.tabpanel { padding-top: 18px; }

/* timeline */
.timeline { display: flex; flex-direction: column; gap: 2px; }
.tl {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 9px 0; position: relative;
}
.tl::before {
  content: ''; position: absolute; left: 13px; top: 26px; bottom: -9px; width: 1px; background: var(--line-2);
}
.tl:last-child::before { display: none; }
.tl__dot {
  width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-3); border: 1px solid var(--line-2); z-index: 1;
}
.tl__body { padding-top: 2px; }
.tl__title { font-size: 13px; }
.tl__meta { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }

/* definiční seznam (technické údaje) */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1px; background: var(--line-1);
      border: 1px solid var(--line-1); border-radius: var(--r-md); overflow: hidden; }
.dl > div { background: var(--bg-1); padding: 10px 13px; }
.dl dt { font-size: 11px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .07em; }
.dl dd { margin: 3px 0 0; font-size: 13.5px; }

/* galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.gallery img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-sm); cursor: zoom-in;
               transition: transform .2s var(--ease), opacity .2s; width: 100%; }
.gallery img:hover { transform: scale(1.03); }
.hero-media { border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); position: relative; }
.hero-media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; cursor: zoom-in; }
.hero-media__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; line-height: 1; color: var(--ink);
  background: rgba(6,7,10,.55); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .18s var(--ease), background .18s var(--ease);
}
.hero-media:hover .hero-media__nav, .hero-media__nav:focus-visible { opacity: 1; }
.hero-media__nav:hover { background: rgba(6,7,10,.8); }
.hero-media__nav--prev { left: 14px; }
.hero-media__nav--next { right: 14px; }
.hero-media__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px; padding: 30px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(4,5,8,.75));
  pointer-events: none;
}
.hero-media__tag { font-size: 12px; color: var(--ink-2); }
.hero-media__counter {
  margin-left: auto; font-size: 12px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  background: rgba(6,7,10,.6); border: 1px solid var(--line-2);
  padding: 3px 10px; border-radius: 20px;
}
.hero-media__counter strong { color: var(--ink); }
/* pruh náhledů — jedna vodorovně rolovatelná řada pod hlavní fotkou */
.gallery--strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.gallery--strip img { flex: 0 0 96px; width: 96px; height: 72px; aspect-ratio: auto;
  scroll-snap-align: start; opacity: .55;
  transition: opacity .18s var(--ease), outline-color .18s var(--ease);
  outline: 2px solid transparent; outline-offset: -2px; cursor: pointer; }
.gallery--strip img:hover { opacity: .85; }
.gallery--strip img.is-active { opacity: 1; outline-color: var(--brand); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(4,5,8,.94); display: none;
            align-items: center; justify-content: center; padding: 30px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 10px; }
.lightbox__close { position: absolute; top: 22px; right: 26px; color: var(--ink-2); font-size: 26px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
                 border-radius: 50%; background: var(--glass-2); display: grid; place-items: center; }
.lightbox__nav--prev { left: 22px; } .lightbox__nav--next { right: 22px; }

/* pipeline (kanban) */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(252px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.kcol { background: rgba(255,255,255,.025); border: 1px solid var(--line-1); border-radius: var(--r-lg); padding: 12px; min-height: 220px; }
.kcol.is-over { border-color: rgba(255,45,45,.55); background: rgba(255,45,45,.06); }
.kcol__head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.kcol__title { font-size: 12.5px; font-weight: 500; }
.kcol__count { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.kcard {
  background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--r-md);
  padding: 11px; margin-bottom: 8px; cursor: grab; transition: transform .15s var(--ease), border-color .15s;
}
.kcard:hover { border-color: var(--line-3); transform: translateY(-1px); }
.kcard.is-dragging { opacity: .4; }
.kcard__title { font-size: 13px; font-weight: 450; line-height: 1.35; }
.kcard__meta { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; display: flex; align-items: center; gap: 8px; }

/* flash / toast */
.flash {
  display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-radius: var(--r-md);
  font-size: 13px; margin-bottom: 16px; border: 1px solid var(--line-2); background: var(--glass-2);
}
.flash--ok  { border-color: rgba(74,222,128,.3); background: var(--green-dim); color: #c9f7d8; }
.flash--err { border-color: rgba(255,90,106,.3); background: var(--red-dim); color: #ffd2d7; }
.flash--info{ border-color: rgba(87,169,255,.3); background: var(--blue-dim); color: #d3e7ff; }

/* modal / drawer */
.modal { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4,5,8,.72); backdrop-filter: blur(6px); }
.modal__panel {
  position: relative; width: min(680px, 100%); max-height: 86vh; overflow-y: auto;
  background: rgba(16,19,26,.97); border: 1px solid var(--line-2); border-radius: var(--r-xl);
  box-shadow: var(--shadow-2); padding: 22px;
}
.modal__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.modal__head h3 { font-size: 16px; }

/* command palette */
.cmdk { position: fixed; inset: 0; z-index: 180; display: none; padding-top: 12vh; justify-content: center; }
.cmdk.is-open { display: flex; }
.cmdk__panel { position: relative; width: min(620px, 92vw); height: max-content; max-height: 62vh; overflow: hidden;
  background: rgba(16,19,26,.98); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; }
.cmdk__input { height: 52px; border: 0; border-bottom: 1px solid var(--line-1); background: transparent;
  padding: 0 18px; font-size: 15px; outline: none; }
.cmdk__list { overflow-y: auto; padding: 6px; }
.cmdk__item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; }
.cmdk__item:hover, .cmdk__item.is-sel { background: var(--glass-2); }
.cmdk__item small { margin-left: auto; color: var(--ink-4); font-size: 11.5px; }

/* pomocné třídy */
.muted { color: var(--ink-3); }
.muted-2 { color: var(--ink-4); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.nums { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: -.02em; }
.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.between { justify-content: space-between; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.right { text-align: right; } .center { text-align: center; }
.up { color: var(--green); } .down { color: var(--red); }
.hr { height: 1px; background: var(--line-1); margin: 16px 0; border: 0; }
.stack-sm > * + * { margin-top: 8px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scroll-y { overflow-y: auto; }

/* grafy */
.spark { display: block; width: 100%; height: 42px; overflow: visible; }
.donut { transform: rotate(-90deg); }
.chartbar { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.chartbar__col { flex: 1; background: linear-gradient(180deg, rgba(255,45,45,.9), rgba(255,45,45,.22));
                 border-radius: 4px 4px 0 0; min-height: 3px; position: relative; transition: opacity .15s; }
.chartbar__col:hover { opacity: .75; }

/* stepper (wizard) */
.stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-4); }
.step__n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
           border: 1px solid var(--line-2); font-size: 11px; }
.step.is-active { color: var(--ink); }
.step.is-active .step__n { background: var(--brand); color: var(--brand-ink); border-color: transparent; font-weight: 600; }
.step.is-done { color: var(--ink-2); }
.step.is-done .step__n { background: var(--brand-dim); color: var(--brand); border-color: rgba(255,45,45,.35); }
.step__line { width: 26px; height: 1px; background: var(--line-2); }

/* jistota OCR */
.conf { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.conf__bar { width: 34px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.conf__fill { height: 100%; border-radius: 4px; }

/* dropzone */
.dropzone {
  border: 1.5px dashed var(--line-3); border-radius: var(--r-lg); padding: 34px 22px; text-align: center;
  transition: all .18s var(--ease); cursor: pointer; background: rgba(255,255,255,.02);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: rgba(255,45,45,.07); }

/* =====================================================================
   VEŘEJNÝ WEB
   ===================================================================== */
.site-nav {
  position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 26px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: rgba(6,7,10,.7); backdrop-filter: blur(22px); border-bottom: 1px solid var(--line-1);
}
.site-nav__links { display: flex; gap: 22px; font-size: 13.5px; color: var(--ink-2); }
.site-nav__links a:hover { color: var(--ink); }
.site-main { padding: 0 clamp(18px, 4vw, 48px) 80px; }
.hero { padding: clamp(56px, 9vw, 118px) 0 clamp(40px, 6vw, 76px); max-width: 1180px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(34px, 6.2vw, 72px); line-height: 1.02; letter-spacing: -.035em; max-width: 15ch;
}
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--brand), var(--violet));
              -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(15px, 1.6vw, 19px); color: var(--ink-2); max-width: 58ch; margin-top: 22px; font-weight: 300; }
.hero__actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 20px;
}
.section { max-width: 1180px; margin: 0 auto; padding: clamp(40px, 6vw, 84px) 0; }
.section__head { max-width: 680px; margin-bottom: 34px; }
.section__head h2 { font-size: clamp(24px, 3.4vw, 38px); letter-spacing: -.03em; }
.section__head p { color: var(--ink-3); margin-top: 12px; font-size: 15px; }
.feature { padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line-1); background: var(--glass);
           transition: transform .2s var(--ease), border-color .2s; }
.feature:hover { transform: translateY(-3px); border-color: var(--line-3); }
.feature__icon { width: 36px; height: 36px; border-radius: 11px; background: var(--brand-dim); color: var(--brand);
                 display: grid; place-items: center; margin-bottom: 13px; }
.feature h3 { font-size: 15px; margin-bottom: 7px; }
.feature p { color: var(--ink-3); font-size: 13.5px; }
.site-foot { border-top: 1px solid var(--line-1); padding: 34px clamp(18px, 4vw, 48px); color: var(--ink-4); font-size: 12.5px; }

/* login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth__card { width: min(410px, 100%); background: rgba(16,19,26,.86); border: 1px solid var(--line-2);
              border-radius: var(--r-xl); padding: 30px; box-shadow: var(--shadow-2); backdrop-filter: blur(18px); }
.auth__demo { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-1); font-size: 12px; color: var(--ink-3); }
.auth__demo code { color: var(--brand); }

.doc-logo { width: 150px; height: auto; }
@media print { .doc-logo { filter: invert(1); } }

/* tisk dokumentu */
@media print {
  body { background: #fff; color: #000; }
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .card { border-color: #ddd; background: #fff; }
  .aurora { display: none; }
}

/* responzivita aplikace */
@media (max-width: 1020px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s var(--ease); }
  .sidebar.is-open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex !important; }
}
.menu-toggle { display: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
