/* ==========================================================================
   TrhPráce Agent — design system  (2026, WCAG 2.1 AA)
   Směr: přístroj na čtení trhu práce. Indigová konstrukce, zlatá = mzda/peníze.
   Fraunces (serif, charakter) · Inter (text) · IBM Plex Mono (čísla/štítky).
   Signatura: percentilový mzdový pás (D1–Q1–medián–Q3–D9 + ISPV kosočtverec).
   ========================================================================== */

:root {
  /* Neutrály — teplejší papír, čistší plochy, kontrastní text (AA na bílé) */
  --ink: #14172B;           /* hlavní text */
  --ink-2: #3E4360;         /* sekundární text (≈8:1) */
  --ink-soft: #5B6178;      /* tlumený text (≈5.2:1 na bílé — AA) */
  --paper: #EEF0F5;         /* pozadí aplikace */
  --surface: #FFFFFF;
  --surface-2: #F5F6FA;     /* jemné plochy / hover řádků */
  --surface-3: #EDEFF6;
  --line: #E2E5EE;
  --line-strong: #C7CCDA;

  --brand: #14183A;         /* sidebar */
  --brand-2: #1e2450;
  --accent: #3B4CCA;        /* indigo — interaktivní (≈6.8:1 na bílé) */
  --accent-600: #2C39A0;    /* tmavší (≈9:1) */
  --accent-weak: #E9EBFB;
  --accent-weak-2: #DCE0FA;
  --gold: #B77F27;          /* peníze / mzda */
  --gold-ink: #855A10;      /* ≈5.5:1 na bílé */
  --gold-weak: #F7EDD9;
  --pos: #1E7A52;           /* ≈4.8:1 */
  --pos-weak: #E3F2EA;
  --neg: #B23A30;           /* ≈5.3:1 */
  --neg-weak: #FaeAE7;

  --r: 16px;
  --r-sm: 10px;
  --r-xs: 7px;
  --shadow: 0 1px 2px rgba(20,23,43,.05), 0 8px 24px -14px rgba(20,23,43,.16);
  --shadow-md: 0 2px 6px rgba(20,23,43,.06), 0 18px 40px -20px rgba(20,23,43,.24);
  --shadow-lg: 0 16px 48px -18px rgba(20,23,43,.34);
  --ring: 0 0 0 3px rgba(59,76,202,.42);

  --sidebar-w: 254px;
  --content-max: 1780px;

  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --step: .18s cubic-bezier(.2,.7,.3,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
svg { flex: none; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Přístupnost: focus, skip-link, sr-only ------------------------ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.sidebar :focus-visible,
.pulse :focus-visible,
.login__brand :focus-visible { outline-color: #fff; }
/* nesahat na výchozí focus, když prohlížeč umí :focus-visible */
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: var(--r-sm); font-weight: 600; font-size: 14px;
  transform: translateY(-160%); transition: transform var(--step);
}
.skip-link:focus { transform: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- App shell : sidebar + content --------------------------------- */
.shell { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--brand), #10132e);
  color: #C9CCE6;
  display: flex; flex-direction: column;
  padding: 22px 16px;
  z-index: 40;
  border-right: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; padding: 0 6px; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(150deg, #4a5ad6, #8b96f2);
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 4px 14px -4px rgba(74,90,214,.6);
}
.brand__name { color: #fff; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; line-height: 1.1; }
.brand__name small { display: block; font-weight: 500; font-size: 10.5px; color: #9aa0cc; letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: #C2C6E4; font-size: 14px; font-weight: 500;
  transition: background var(--step), color var(--step);
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.is-active { background: rgba(255,255,255,.12); color: #fff; }
.nav a.is-active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: #8b96f2;
}
.nav a svg { width: 17px; height: 17px; opacity: .9; }
.nav__section { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8b90be; padding: 18px 12px 6px; font-weight: 600; }
.nav__saved { display: flex; align-items: center; gap: 8px; }
.nav__saved > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__saved-del { margin-left: auto; display: flex; }
.nav__saved-del button { background: none; border: none; color: inherit; opacity: .5; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 3px; border-radius: 5px; }
.nav__saved-del button:hover { opacity: 1; }
/* Podmenu kategorií pod „Inzeráty" — přehledná náhrada za houštinu zaškrtávátek. */
.nav__sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px 26px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.10); }
.nav__subitem { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: var(--r-sm); color: #A6ABD0; font-size: 13px; font-weight: 500; transition: background var(--step), color var(--step); }
.nav__subitem:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav__subitem.is-active { background: rgba(139,150,242,.16); color: #fff; }
.nav__sublabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__subcount { flex: none; min-width: 20px; text-align: center; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: #8b90be; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nav__subitem:hover .nav__subcount, .nav__subitem.is-active .nav__subcount { color: #d7daf2; }

.sidebar__spacer { flex: 1; min-height: 14px; }

/* Aktuálnost dat + ruční obnova / on-demand */
.freshness { border-top: 1px solid rgba(255,255,255,.10); padding-top: 14px; margin-top: 14px; font-size: 11.5px; color: #a4a9ce; }
.freshness__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.freshness__head b { color: #b9bde0; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }
.freshness__head a { text-decoration: none; }
.freshness__head a:hover b, .freshness__head a:focus-visible b { color: #fff; text-decoration: underline; }
.freshness__btn { background: rgba(255,255,255,.10); color: #d7d9f0; border: none; width: 26px; height: 26px; border-radius: 8px; font-size: 15px; line-height: 1; display: grid; place-items: center; transition: background var(--step); }
.freshness__btn:hover { background: rgba(255,255,255,.2); }
.freshness__btn:disabled { opacity: .6; cursor: default; }
.freshness__btn.is-busy { animation: spin 1s linear infinite; }
.fresh-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; align-items: center; }
.fresh-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fresh-time { color: #9297bf; font-family: var(--font-mono); }
.fresh-x { color: #f0968d; font-weight: 700; }
.chg-wrap { display: inline-flex; gap: 4px; margin-left: 5px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.chg--add { color: #9bdb6a; }
.chg--rem { color: #f0a58d; }
.fresh-right { display: flex; align-items: center; gap: 9px; }
.src-toggle { display: flex; }
.switch { position: relative; width: 30px; height: 17px; border-radius: 99px; border: none; background: rgba(255,255,255,.16); cursor: pointer; padding: 0; transition: background var(--step); flex: none; }
/* read-only stav zdroje pro manažera (view-only): stejný vzhled, ale bez ovládání */
.switch--ro { display: inline-block; cursor: default; opacity: .6; }
.switch--on { background: #6b78e8; }
.switch__dot { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: left var(--step); }
.switch--on .switch__dot { left: 15px; }
.fresh-row--off .fresh-name, .fresh-row--off .fresh-time { opacity: .5; }
.freshness__note { color: #a4a9ce; margin-top: 6px; min-height: 14px; font-style: italic; }
.ondemand { display: flex; gap: 6px; margin-top: 10px; }
.ondemand input { flex: 1; min-width: 0; font: inherit; font-size: 12px; padding: 6px 9px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #eef; }
.ondemand input::placeholder { color: #8a8fba; }
.ondemand button { font: inherit; font-size: 11.5px; padding: 6px 11px; border-radius: 8px; border: none; background: rgba(255,255,255,.15); color: #eef; cursor: pointer; white-space: nowrap; transition: background var(--step); }
.ondemand button:hover { background: rgba(255,255,255,.26); }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.25); border-top-color: #d7d9f0; border-radius: 50%; animation: spin .7s linear infinite; }
.spin--dark { border-color: rgba(20,23,43,.15); border-top-color: var(--gold-ink); } /* na světlém podkladu (stránka Stav dat) */
@keyframes spin { to { transform: rotate(360deg); } }

.userbox { border-top: 1px solid rgba(255,255,255,.10); padding-top: 14px; margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.userbox__avatar { width: 32px; height: 32px; border-radius: 50%; background: #2b3060; color: #d7d9f0; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.userbox__name { font-size: 13px; color: #d1d4ee; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbox button { background: none; border: none; color: #a4a9ce; font-size: 12px; padding: 4px 6px; border-radius: 6px; }
.userbox button:hover { color: #fff; background: rgba(255,255,255,.08); }

.content { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.content__inner { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 32px 40px 64px; flex: 1; }
@media (min-width: 1500px) { .content__inner { padding: 40px 56px 80px; } }

.work-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1120px) { .work-grid { grid-template-columns: 1fr; } }
.rail { display: flex; flex-direction: column; gap: 20px; }

.appfoot { border-top: 1px solid var(--line); background: var(--surface); padding: 16px 40px; font-size: 12px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; margin-left: var(--sidebar-w); }

/* mobilní top bar + hamburger — skryté na desktopu, aktivní v ≤720px */
.mtop { display: none; }
.hamb { display: none; }
.scrim { display: none; }

/* ---------- Page header --------------------------------------------------- */
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-600); font-weight: 500; }
.page-head { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.page-title { font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 36px); line-height: 1.04; font-weight: 500; letter-spacing: -0.025em; margin-top: 6px; color: var(--ink); }
.page-sub { color: var(--ink-2); font-size: 14.5px; margin-top: 9px; max-width: 62ch; }

/* ---------- Cards --------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card--pad { padding: 22px 24px; }
.card__title { font-weight: 600; font-size: 16px; color: var(--ink); letter-spacing: -0.01em; }
.card__hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }

.grid { display: grid; gap: 20px; }
.grid--kpi { grid-template-columns: repeat(4, 1fr); }
.grid--charts { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--kpi { grid-template-columns: repeat(2, 1fr); } .grid--charts { grid-template-columns: 1fr; } }

/* ---------- Hero pulse ---------------------------------------------------- */
.pulse { display: grid; grid-template-columns: 1.1fr 1fr; gap: 8px 40px; align-items: center;
  background: radial-gradient(120% 140% at 0% 0%, #232a5c 0%, #14183A 55%);
  color: #fff; border-radius: var(--r); padding: 28px 32px; box-shadow: var(--shadow-lg); overflow: hidden; position: relative; }
.pulse::after { content: ""; position: absolute; right: -70px; top: -70px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(183,127,39,.30), transparent 70%); pointer-events: none; }
.pulse__big { font-family: var(--font-display); font-size: clamp(42px, 5vw, 56px); line-height: 1; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pulse__big small { font-size: 22px; color: #c8ccea; font-weight: 400; letter-spacing: 0; }
.pulse__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: #adb2da; margin-bottom: 10px; }
.pulse__meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 24px; }
.pulse__stat b { display: block; font-family: var(--font-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pulse__stat span { font-size: 12px; color: #adb2da; }
@media (max-width: 760px) { .pulse { grid-template-columns: 1fr; } }

/* ---------- KPI stat card ------------------------------------------------- */
.stat { padding: 18px 20px; }
.stat__label { font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.stat__value { font-family: var(--font-display); font-size: 28px; font-weight: 500; letter-spacing: -0.02em; margin-top: 6px; color: var(--ink); }
.stat__value.mono { font-family: var(--font-mono); font-size: 25px; }
.stat__foot { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.stat__foot a { color: var(--accent-600); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Salary band (signature) --------------------------------------- */
.band-table { width: 100%; font-size: 14px; }
.band-table thead th { text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; padding: 0 12px 10px; border-bottom: 1px solid var(--line-strong); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.band-table thead th.r { text-align: right; }
.band-table tbody td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.band-table tbody tr:last-child td { border-bottom: none; }
.band-table tbody tr { transition: background var(--step); }
.band-table tbody tr:hover { background: var(--surface-2); }
.band-table .grp { font-weight: 500; color: var(--ink); line-height: 1.3; }
.band-table .r { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.band-table .n { color: var(--ink-soft); }
.band-table .med { font-weight: 600; color: var(--ink); }
.band-table .ispv { color: var(--gold-ink); }

.band { position: relative; height: 18px; min-width: 180px; }
.band__track { position: absolute; inset: 7px 0; background: var(--surface-3); border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.band__d { position: absolute; top: 8px; height: 2px; background: var(--accent-600); opacity: .45; }
.band__d::before, .band__d::after { content: ""; position: absolute; top: -3px; width: 2px; height: 8px; background: var(--accent-600); opacity: .8; border-radius: 2px; }
.band__d::before { left: 0; }
.band__d::after { right: 0; }
.band__q { position: absolute; inset: 4px auto; height: 10px; border-radius: 99px; background: linear-gradient(90deg, #8590e8, #3B4CCA); box-shadow: 0 1px 4px rgba(59,76,202,.4); }
.band__med { position: absolute; top: 1px; bottom: 1px; width: 3px; background: var(--ink); border-radius: 3px; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.band__ispv { position: absolute; top: 4px; width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--gold-ink); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--ink-2); margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; }
.legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.legend .k-d { width: 16px; height: 2px; background: var(--accent-600); opacity: .7; position: relative; }
.legend .k-q { width: 16px; height: 10px; border-radius: 99px; background: linear-gradient(90deg,#8590e8,#3B4CCA); }
.legend .k-m { width: 3px; height: 13px; background: var(--ink); border-radius: 2px; }
.legend .k-i { width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 1.5px var(--gold-ink); }

/* ---------- Chips / tags -------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; padding: 4px 11px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip--accent { background: var(--accent-weak); color: var(--accent-600); border-color: transparent; }
.chip--gold { background: var(--gold-weak); color: var(--gold-ink); border-color: transparent; }
.chip--bonus { background: #ece8fa; color: #493c97; border-color: transparent; }
/* benefity v seznamu inzerátů — tlumené, ať nepřebíjejí mzdu a dovednosti */
.chip--soft { background: transparent; color: var(--ink-soft); border: 1px dashed var(--line); font-size: 12px; padding: 3px 9px; }

/* ---------- Souhrn trhu nad výsledky hledání (HR use-case) ----------------- */
.msum__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
/* Sloupec gridu se bez min-width:0 nesmí zúžit pod min-content tabulky (nowrap čísla)
   → tabulka „Podle profese" podtékala pod sousední benefity (audit 2026-07-16).
   Přetečení řeš scrollem UVNITŘ sloupce, ne bleedem do vedlejšího. */
.msum__grid > * { min-width: 0; overflow-x: auto; }
.msum__big { font-size: 2.9rem; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
/* Přímá odpověď use-casu „kolik dát" — má být nepřehlédnutelná. */
.msum__callout { margin-top: 12px; padding: 10px 13px; background: var(--gold-weak); color: var(--gold-ink); border-radius: var(--r-sm); font-size: 1rem; }
.msum__callout strong { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.msum__prompt { padding: 14px 16px; background: var(--accent-weak); color: var(--accent-600); border-radius: var(--r-sm); font-size: .95rem; line-height: 1.5; }
.msum__prompt strong { color: var(--accent-600); }
.msum__lown { display: inline-block; margin-top: 6px; font-size: .78rem; color: #94451D; background: #FBEEE8; padding: 1px 8px; border-radius: 999px; }
.msum__bar { display: inline-block; width: 52px; height: 6px; background: var(--line); border-radius: 3px; vertical-align: middle; margin-right: 6px; position: relative; }
.msum__bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent-600); border-radius: 3px; }
.msum__t { width: 100%; font-size: .9rem; }
.msum__t td { padding: 3px 0; vertical-align: baseline; }
/* mezera MEZI sloupci (základ je padding 3px 0 → sousední číselné sloupce se slévaly) */
.msum__t td + td { padding-left: 14px; }
.msum__t td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
/* číselný sloupec kdekoli v řádku (ne jen poslední) — tabular-nums drží číslice pod sebou */
.msum__t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.msum__t .hdr td { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; padding-bottom: 5px; }
.msum__note { margin: 8px 0 0; font-size: .85rem; color: var(--ink-soft); }
.msum__sep { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }

/* odebíratelný chip v kontrole: klik = přepnout, × naznačí odebrání */
.chip--rm { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.chip--rm .chip__x { font-weight: 700; opacity: .45; line-height: 1; }
.chip--rm:hover .chip__x { opacity: 1; }
.chip--rm:hover { box-shadow: 0 0 0 2px var(--line) inset; }
.chip--dropped { opacity: .4; text-decoration: line-through; }
.chip--dropped .chip__x { opacity: 1; }
.chip__x-demo { display: inline-block; padding: 0 5px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; }

/* ---------- Salary tag ---------------------------------------------------- */
.pay { display: inline-block; background: var(--gold-weak); color: var(--gold-ink); font-family: var(--font-mono); font-weight: 700; font-size: 21px; line-height: 1.15; padding: 5px 12px; border-radius: var(--r-sm); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pay--none { background: none; color: var(--ink-soft); font-family: var(--font-sans); font-style: italic; font-size: 13px; padding: 0; }

/* ---------- Buttons ------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); transition: border-color var(--step), background var(--step), box-shadow var(--step), transform .05s; }
.btn:hover { border-color: var(--accent); color: var(--accent-600); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px -8px rgba(59,76,202,.7); }
.btn--primary:hover { background: var(--accent-600); border-color: var(--accent-600); color: #fff; }
.btn--ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); border-color: transparent; }
.btn--sm { padding: 7px 12px; font-size: 13px; }

/* ---------- Forms --------------------------------------------------------- */
.field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; letter-spacing: .01em; }
.input, .select { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 9px 11px; font-size: 14px; font-family: inherit; background: var(--surface); color: var(--ink); transition: border-color var(--step), box-shadow var(--step); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235B6178' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 28px; }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.filterbar { padding: 20px 22px; }
.filterbar__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 820px) { .filterbar__grid { grid-template-columns: repeat(2, 1fr); } }
.filterbar__foot { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
/* Sbalitelná sekce méně častých filtrů — ať primární pole (profese/region) nezakrývá odpověď. */
.filter-more { grid-column: 1 / -1; }
.filter-more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent); padding: 4px 2px; user-select: none; }
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more > summary::before { content: "▸"; font-size: 11px; transition: transform var(--step); }
.filter-more[open] > summary::before { transform: rotate(90deg); }
.filter-more__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 12px; }
@media (max-width: 820px) { .filter-more__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Job cards ----------------------------------------------------- */
.joblist { display: grid; grid-template-columns: repeat(auto-fill, minmax(470px, 1fr)); gap: 14px; }
@media (max-width: 560px) { .joblist { grid-template-columns: 1fr; } }
.job { padding: 18px 20px; display: flex; gap: 18px; justify-content: space-between; transition: border-color var(--step), box-shadow var(--step), transform var(--step); }
.job > div:first-child { flex: 1 1 auto; min-width: 0; }
.job:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.job__title { font-weight: 600; font-size: 15.5px; color: var(--ink); line-height: 1.3; }
.job__title a:hover { color: var(--accent-600); }
.job__meta { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.job__right { text-align: right; flex: 0 1 auto; max-width: 46%; min-width: 150px; }
.job__src { overflow-wrap: anywhere; }
.job__src { font-size: 12px; margin-top: 8px; }
.job__src a { color: var(--accent-600); text-decoration: underline; text-underline-offset: 2px; }
.job__snippet { font-size: 13px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Badges (verification) ----------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; padding: 4px 11px; border-radius: 99px; }
.badge--verified { background: var(--pos-weak); color: #1B6644; }
.badge--auto { background: var(--accent-weak); color: var(--accent-600); }
.badge--pending { background: var(--gold-weak); color: var(--gold-ink); }
.badge--rejected { background: var(--neg-weak); color: var(--neg); }
.badge--soft { background: var(--surface-3); color: var(--ink-soft); font-size: 11px; padding: 2px 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
/* Štítky čerstvosti inzerátu */
.badge--new { background: var(--pos-weak); color: #1B6644; }
.badge--updated { background: var(--accent-weak); color: var(--accent-600); }
.badge--stale { background: var(--gold-weak); color: var(--gold-ink); }
.badge--removed { background: var(--surface-3); color: var(--ink-soft); }
.badge--agency { background: #EEEBFA; color: #5A4CA8; border: 1px solid #D9D3F2; }
.job--removed { opacity: .72; }

/* ---------- Detail -------------------------------------------------------- */
.detail-grid { display: grid; grid-template-columns: 1.9fr 1fr; gap: 20px; }
@media (max-width: 880px) { .detail-grid { grid-template-columns: 1fr; } }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } }
.dl dt { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 3px; font-weight: 500; }
.dl dd { margin: 0; font-size: 14.5px; color: var(--ink); }
.money-hero { font-family: var(--font-display); font-size: clamp(34px, 4vw, 42px); font-weight: 500; letter-spacing: -0.025em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.compare { font-size: 14px; padding: 11px 14px; border-radius: var(--r-sm); margin-top: 14px; }
.compare--up { background: var(--pos-weak); color: #1B6644; }
.compare--down { background: #FBEEE8; color: #94451D; }
.compare--flat { background: var(--surface-2); color: var(--ink-2); }
.compare-ispv { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; padding-left: 2px; }

/* ---------- Empty state --------------------------------------------------- */
.empty { text-align: center; padding: 56px 24px; }
.empty h3 { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin-bottom: 8px; }
.empty p { color: var(--ink-soft); font-size: 14px; }

/* ---------- Explainer / details ------------------------------------------ */
.explain summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.explain summary::-webkit-details-marker { display: none; }
.explain summary::before { content: "＋"; font-family: var(--font-mono); color: var(--accent); }
.explain[open] summary::before { content: "－"; }
.explain > div { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.explain strong { color: var(--ink); }

/* ---------- Pagination ---------------------------------------------------- */
.pager { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 28px; font-size: 14px; }
.pager .muted { color: var(--ink-soft); }

/* ---------- Utility ------------------------------------------------------- */
.stack > * + * { margin-top: 18px; }
.mb-6 { margin-bottom: 24px; }
.help { border-bottom: 1px dotted var(--line-strong); cursor: help; }

/* ---------- Active filters + save view ----------------------------------- */
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.active-filters__label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.fchip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; background: var(--accent-weak); color: var(--accent-600); border-radius: 99px; padding: 4px 11px; transition: background var(--step); }
.fchip:hover { background: var(--accent-weak-2); }
.fchip__x { opacity: .65; font-weight: 700; }
.fchip:hover .fchip__x { opacity: 1; }
.active-filters__clear { font-size: 12.5px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; margin-left: 2px; }
.active-filters__clear:hover { color: var(--neg); }
.save-view { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.save-view input[type=text] { font: inherit; font-size: 13px; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); min-width: 200px; }
.save-view input[type=text]:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

/* ---------- Panel kvality dat --------------------------------------------- */
.quality-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 900px) { .quality-grid { grid-template-columns: repeat(2, 1fr); } }
.qstat b { display: block; font-family: var(--font-display); font-size: 25px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.qstat span { font-size: 12px; color: var(--ink-soft); }
.quality-sources { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.qsrc { font-size: 12.5px; display: flex; gap: 8px; align-items: baseline; }
.qsrc__name { font-weight: 500; }
.qsrc__meta { color: var(--ink-soft); }

/* ---------- Trend stats --------------------------------------------------- */
.trend-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 720px) { .trend-stats { grid-template-columns: 1fr; } }

/* ---------- Celý text inzerátu (scrollovatelný) -------------------------- */
.ad-text { max-height: 380px; overflow-y: auto; white-space: pre-wrap; font-size: 14px; line-height: 1.65; color: var(--ink-2); padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.ad-text::-webkit-scrollbar { width: 10px; }
.ad-text::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--surface-2); }
.ad-text::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }

/* ---------- Tom Select (vícenásobný filtr) ------------------------------- */
.ts-wrapper { font-family: var(--font-sans); }
.ts-control { border: 1px solid var(--line-strong) !important; border-radius: var(--r-sm) !important; padding: 5px 8px !important; min-height: 40px; box-shadow: none !important; background: var(--surface) !important; font-size: 14px; gap: 4px; }
.ts-wrapper.focus .ts-control { border-color: var(--accent) !important; box-shadow: var(--ring) !important; }
.ts-control > .item { background: var(--accent-weak) !important; color: var(--accent-600) !important; border: none !important; border-radius: 6px !important; font-size: 12.5px; padding: 2px 4px 2px 8px !important; display: inline-flex; align-items: center; }
.ts-control > .item .remove { border-left: none !important; color: var(--accent-600) !important; opacity: .7; padding: 0 5px !important; }
.ts-control > .item .remove:hover { background: transparent !important; opacity: 1; }
.ts-control input { font-size: 14px !important; color: var(--ink) !important; }
.ts-dropdown { border: 1px solid var(--line-strong); border-radius: var(--r-sm); box-shadow: var(--shadow-md); font-size: 14px; margin-top: 4px; }
.ts-dropdown .option { padding: 8px 11px; }
.ts-dropdown .active { background: var(--accent-weak); color: var(--accent-600); }

/* ---------- Reveal on load ------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(10px); animation: rise .5s cubic-bezier(.2,.7,.3,1) forwards; }
  .reveal:nth-child(2) { animation-delay: .05s; }
  .reveal:nth-child(3) { animation-delay: .1s; }
  .reveal:nth-child(4) { animation-delay: .15s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
/* Respekt k prefers-reduced-motion: vypnout veškerý nefunkční pohyb */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Mobile sidebar ------------------------------------------------ */
@media (max-width: 720px) {
  .mtop { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 44;
    background: linear-gradient(180deg, var(--brand), #10132e); color: #fff;
    padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .mtop__brand { color: #fff; font-weight: 600; font-size: 16px; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 6px; }
  .mtop__brand small { font-size: 10px; color: #9aa0cc; letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-mono); }
  .mtop__mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(150deg,#4a5ad6,#8b96f2); color: #fff; display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 15px; align-self: center; }
  .hamb { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px;
    background: rgba(255,255,255,.10); border: 0; border-radius: 9px; cursor: pointer; padding: 0 10px; flex: none; }
  .hamb span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: transform .22s, opacity .22s; }
  .hamb[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .hamb[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .hamb[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .sidebar { transform: translateX(-100%); transition: transform .24s cubic-bezier(.2,.7,.3,1);
    box-shadow: 8px 0 40px rgba(0,0,0,.42); z-index: 50; width: min(280px, 86vw); }
  .sidebar.is-open { transform: none; }
  .scrim.is-shown { display: block; position: fixed; inset: 0; background: rgba(10,12,25,.5); z-index: 45;
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  body.menu-open { overflow: hidden; }
  .content, .appfoot { margin-left: 0; }
  .content__inner { padding: 20px 16px 48px; }
  .detail-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
}

/* --- Kontrola inzerátů (review) --- */
.nav__badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 19px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.nav a.is-active .nav__badge { background: #fff; color: var(--accent); }

.conf { font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.conf--low { background: var(--neg-weak); color: var(--neg); }
.conf--mid { background: var(--gold-weak); color: var(--gold-ink); }
.conf--ok  { background: var(--pos-weak); color: #1B6644; }

.btn--danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn--danger:hover { filter: brightness(.92); color: #fff; border-color: var(--neg); }

.review-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.review-remaining { font-size: 13px; color: var(--ink-soft); }
.review-error { background: var(--neg-weak); color: var(--neg); padding: 11px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 14px; font-weight: 500; }

.review-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.review-pane { min-width: 0; }
.review-pane__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.review-title { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }
.review-company { color: var(--ink-2); font-size: 14px; margin: 4px 0 16px; }

.review-field { margin-bottom: 14px; }
.review-field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.review-salary { display: flex; align-items: center; gap: 10px; }
.review-salary input { max-width: 150px; }
.review-hint { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.review-hint--warn { color: var(--gold-ink, #8a6d00); font-weight: 500; }
.review-ro__hint { font-size: 12px; color: var(--ink-soft); margin-top: 14px; margin-bottom: 2px; }
.review-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.review-ro { margin-top: 14px; }
.review-ro__k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); font-weight: 600; margin-bottom: 6px; }
.review-summary { margin-top: 16px; }
.review-summary summary { cursor: pointer; font-size: 13px; color: var(--accent-600); font-weight: 500; }
.review-summary .ad-text { margin-top: 10px; }

.review-orig { display: flex; flex-direction: column; }
.review-tabs { display: flex; gap: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.review-tab { font: inherit; font-size: 13px; font-weight: 500; padding: 8px 14px; border: none; background: none; color: var(--ink-soft); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.review-tab:hover { color: var(--ink-2); }
.review-tab.is-active { color: var(--accent-600); border-bottom-color: var(--accent); }
.review-tabpanel { display: none; }
.review-tabpanel.is-active { display: block; }
.review-iframe { width: 100%; height: 68vh; min-height: 460px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); margin-top: 8px; }
.review-rawtext { max-height: 68vh; min-height: 300px; overflow-y: auto; white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; margin-top: 8px; }
.review-notice { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 8px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2); font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.review-notice--warn { background: #FBEEE8; border-color: #E7C3AE; color: #7A3A18; }
.review-notice strong { color: inherit; }
.review-rawtext--snippet { min-height: 0; opacity: .85; }
.review-sources { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.review-source { display: flex; justify-content: space-between; gap: 10px; }
.review-source a { color: var(--accent-600); }

.review-actions { position: sticky; bottom: 0; margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.review-actions__hint { font-size: 12px; color: var(--ink-soft); }
.review-actions__btns { display: flex; gap: 10px; margin-left: auto; }
kbd { font-family: var(--font-mono); font-size: 11px; background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 5px; color: var(--ink-2); }

/* Detail inzerátu: pravý panel s originálem drží při scrollování levých dat. */
.detail-orig { position: sticky; top: 16px; align-self: start; }

@media (max-width: 1024px) {
  .review-split { grid-template-columns: 1fr; }
  .review-iframe, .review-rawtext { height: 60vh; }
  .detail-orig { position: static; }
}
@media (max-width: 520px) {
  .review-grid2 { grid-template-columns: 1fr; }
}
.nav .nav__section:first-child { padding-top: 2px; }
