/* =====================================================================
 * GOODIE vouchery – společný vzhled s GOODIE Gap, Chat a Product board
 * (návrh GOODIE UI v1.1): tmavý teplý rám, v něm světlá pracovní plocha
 * jako list se zaoblenými rohy, bílé karty, zlatá jen jako výplň
 * (text na ní je tmavý), odkazy modré. Písmo Inter, základ 13 px,
 * kompaktní řádky, tlačítka jako malé pilulky.
 * Kiosek používá stejné prvky, jen s většími dotykovými plochami.
 * ===================================================================== */
:root {
  color-scheme: light;
  --brand: #f5b400;
  --brand-hover: #e6a800;
  --brand-600: #d19900;
  --brand-soft: #fdf1cc;
  --brand-strong: #8a5a00;
  --ink: #1f1a17;
  --ink-2: #332a26;
  --ink-3: #4a403a;
  --muted: #6e645e;
  --muted-2: #9a8f88;
  --surface: #ffffff;
  --bg-1: #faf8f6;
  --bg-2: #f3efeb;
  --canvas: #f6f3f0;
  --line: #ebe5e0;
  --line-2: #dad2cb;
  --line-3: #c9bfb7;
  /* tmavý rám: horní lišta a menu */
  --header: #1d1917;
  --rail: #2a211d;
  --chrome-field: #3f3531;
  --chrome-hover: #463b36;
  --chrome-line: #453a35;
  --chrome-text: #f4efeb;
  --chrome-muted: #c7bcb5;
  /* význam */
  --link: #1264a3;
  --link-soft: #d9e9f7;
  --danger: #b73a26;
  --danger-soft: #fbe3de;
  --ok: #13694b;
  --ok-soft: #d5f2e3;
  --warn: #8a5a00;
  --warn-soft: #fdf1cc;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --t: 160ms cubic-bezier(.22,.61,.36,1);
  --shadow-sm: 0 1px 2px rgba(31,26,23,.05);
  --shadow-md: 0 4px 14px -4px rgba(31,26,23,.10), 0 2px 6px -2px rgba(31,26,23,.06);
  --shadow-lg: 0 24px 48px -16px rgba(31,26,23,.22), 0 8px 20px -8px rgba(31,26,23,.12);

  /* co se mění s barevným provedením (níže) */
  --on-brand: var(--ink);                    /* text na zlaté výplni */
  --nav-on: var(--brand);                    /* aktivní položka menu */
  --nav-on-text: var(--on-brand);
  --chrome-strong: #fff;                     /* text v rámu po najetí myší */
  --logo-filter: brightness(0) invert(.94);  /* logo v rámu: světlé na tmavém */
  --sheet-line: transparent;                 /* obrys listu, když je rám světlý */
}

/* ---------- barevná provedení ----------
 * Volí si je každý sám v Nastavení (platí jen pro jeho účet), server je zapíše do <html data-theme="…">.
 * Mění se jen proměnné, rozložení zůstává. Výchozí GOODIE je :root nahoře; Modrá a Zelená jsou
 * stejné jako v GOODIE Economiq. Barvy stavů (ok, chyba, upozornění) zůstávají ve všech stejné. */
html[data-theme="blue"] {
  --brand: #1d64f2; --brand-hover: #1d4ed8; --brand-600: #1d4ed8; --brand-soft: #eaf1fe; --brand-strong: #1d4ed8;
  --on-brand: #fff;
  --ink: #0b1220; --ink-2: #1d2939; --ink-3: #344054; --muted: #667085; --muted-2: #98a2b3;
  --surface: #fff; --bg-1: #f8f9fb; --bg-2: #eef1f5; --canvas: #f4f6f8;
  --line: #e8eaef; --line-2: #d6dae2; --line-3: #c2c8d2;
  --header: #fff; --rail: #eceff3;
  --chrome-field: #f4f6f8; --chrome-hover: #e2e7ee; --chrome-line: #d6dae2;
  --chrome-text: #0b1220; --chrome-muted: #64748b; --chrome-strong: #0b1220;
  --link: #1d64f2; --link-soft: #eaf1fe;
  --logo-filter: brightness(0); --sheet-line: #d6dae2;
}
html[data-theme="green"] {
  --brand: #c5de3a; --brand-hover: #b7d12a; --brand-600: #a6bf1f; --brand-soft: #f1f7d4; --brand-strong: #4d6b00;
  --on-brand: #141414;
  --ink: #141414; --ink-2: #262626; --ink-3: #404040; --muted: #6b6b6b; --muted-2: #9b9b9b;
  --surface: #fff; --bg-1: #f8f8f8; --bg-2: #f0f0f0; --canvas: #fafafa;
  --line: #ececec; --line-2: #dcdcdc; --line-3: #c8c8c8;
  --header: #fff; --rail: #fff;
  --chrome-field: #f4f4f4; --chrome-hover: #efefef; --chrome-line: #ececec;
  --chrome-text: #141414; --chrome-muted: #6b6b6b; --chrome-strong: #141414;
  --nav-on: #141414; --nav-on-text: #fff;
  --link: #3f7a12; --link-soft: #e7f2cf;
  --logo-filter: brightness(0); --sheet-line: #dcdcdc;
}
html[data-theme="violet"] {
  --brand: #8b5cf6; --brand-hover: #7c3aed; --brand-600: #7c3aed; --brand-soft: #efe9fe; --brand-strong: #5b21b6;
  --on-brand: #fff;
  --ink: #1d1724; --ink-2: #2e2637; --ink-3: #483f52; --muted: #6c6377; --muted-2: #9c93a6;
  --surface: #fff; --bg-1: #faf8fc; --bg-2: #f2eef7; --canvas: #f6f4f9;
  --line: #e9e4f0; --line-2: #d9d1e3; --line-3: #c7bdd3;
  --header: #1f1926; --rail: #2a2133;
  --chrome-field: #3a2f46; --chrome-hover: #43374f; --chrome-line: #403449;
  --chrome-text: #f3eff8; --chrome-muted: #c3b8cf;
  --link: #6d28d9; --link-soft: #ede5fd;
}
html[data-theme="teal"] {
  --brand: #14b8a6; --brand-hover: #0fa595; --brand-600: #0d9488; --brand-soft: #d5f5ef; --brand-strong: #0f6b62;
  --on-brand: #0d1f21;
  --ink: #132022; --ink-2: #213133; --ink-3: #39494b; --muted: #5d6d6f; --muted-2: #8d9d9f;
  --surface: #fff; --bg-1: #f7fafa; --bg-2: #ecf3f2; --canvas: #f2f6f6;
  --line: #e1eae9; --line-2: #cddad8; --line-3: #b9c9c7;
  --header: #0f1f22; --rail: #15292c;
  --chrome-field: #22393c; --chrome-hover: #2a4245; --chrome-line: #284043;
  --chrome-text: #eaf3f2; --chrome-muted: #a8bfbd;
  --link: #0f766e; --link-soft: #d5f5ef;
}
html[data-theme="pink"] {
  --brand: #db2777; --brand-hover: #be185d; --brand-600: #be185d; --brand-soft: #fce7f3; --brand-strong: #9d174d;
  --on-brand: #fff;
  --ink: #241820; --ink-2: #352830; --ink-3: #504049; --muted: #76666e; --muted-2: #a6969e;
  --surface: #fff; --bg-1: #fdf9fb; --bg-2: #f8eff3; --canvas: #fbf6f8;
  --line: #f1e4ea; --line-2: #e4d2db; --line-3: #d3bdc8;
  --header: #fff; --rail: #fbf1f5;
  --chrome-field: #f6e6ed; --chrome-hover: #f3dde7; --chrome-line: #efdde5;
  --chrome-text: #241820; --chrome-muted: #7d6570; --chrome-strong: #241820;
  --link: #be185d; --link-soft: #fce7f3;
  --logo-filter: brightness(0); --sheet-line: #e9d7df;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--header);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); }
code { font-family: var(--mono); font-size: .92em; background: var(--bg-2); padding: 1px 5px; border-radius: 5px; }
::selection { background: var(--brand-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.hidden { display: none !important; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- rám aplikace: menu vlevo + horní lišta + list ---------- */
.app { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh; width: 228px;
  background: var(--rail); color: var(--chrome-text);
  display: flex; flex-direction: column;
  padding: 12px 8px 8px;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; color: var(--chrome-text); text-decoration: none; }
.brand__logo { height: 22px; width: auto; filter: var(--logo-filter); }
.brand__app { font-size: 12px; font-weight: 600; color: var(--chrome-muted); padding-left: 10px; border-left: 1px solid var(--chrome-line); line-height: 20px; }
.nav { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--chrome-line) transparent; }
.nav__label {
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--chrome-muted); opacity: .7; padding: 10px 10px 4px;
}
.nav__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 6px 10px; margin-bottom: 1px; border: 0; border-radius: 10px;
  background: none; color: var(--chrome-text); text-align: left; text-decoration: none;
  font-size: 13px; font-weight: 500; line-height: 16px;
  transition: background var(--t), color var(--t);
}
.nav__item .ico { opacity: .75; }
.nav__item:hover { background: var(--chrome-hover); color: var(--chrome-strong); }
.nav__item.on { background: var(--nav-on); color: var(--nav-on-text); font-weight: 600; }
.nav__item.on .ico { opacity: 1; }
.nav__item:focus-visible { outline-color: var(--brand); }
.nav__badge {
  margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; text-align: center;
  background: var(--chrome-field); color: var(--chrome-muted); font-size: 10.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nav__badge:empty { display: none; }
.nav__item.on .nav__badge { background: rgba(31,26,23,.14); background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; }
.nav__ext { margin-left: auto; opacity: .6; }
.sidebar__foot { border-top: 1px solid var(--chrome-line); padding-top: 8px; }
.user { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.user__avatar {
  width: 30px; height: 30px; border-radius: 999px; flex: none;
  display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 700;
}
.user__text { min-width: 0; flex: 1; }
.user__name { font-size: 12.5px; font-weight: 600; color: var(--chrome-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user__role { font-size: 11px; color: var(--chrome-muted); }
.app-version { font-size: 10.5px; color: var(--chrome-muted); opacity: .75; padding: 4px 10px 0; font-variant-numeric: tabular-nums; }

.main { min-width: 0; display: flex; flex-direction: column; background: var(--header); }
.topbar {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 10px;
  min-height: 49px; padding: 8px 14px 8px 10px;
  background: var(--header); color: var(--chrome-text);
}
.topbar__spacer { flex: 1; }
.topbar .icon-btn { color: var(--chrome-text); }
.topbar .icon-btn:hover { background: var(--chrome-hover); color: var(--chrome-strong); }
.menu-btn { display: none; }
.route {
  flex: 1;
  background: var(--canvas);
  border-radius: 20px 20px 0 0;
  margin-right: 8px;
  min-height: calc(100vh - 49px);
  padding: 14px 18px 40px;
  box-shadow: 0 0 0 1px var(--sheet-line);
}

/* stav spojení v tmavé liště */
.conn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--chrome-field); color: var(--chrome-muted);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex: none; }
.dot.ok { background: #3fbf86; box-shadow: 0 0 0 3px rgba(63,191,134,.18); }
.dot.err { background: #e5604a; box-shadow: 0 0 0 3px rgba(229,96,74,.2); }

/* ---------- hlavička stránky ---------- */
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; min-height: 30px; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.page-head__count {
  padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.page-head__count:empty { display: none; }
.page-head__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- tlačítka: pilulky ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.btn:hover { border-color: var(--line-3); background: var(--bg-1); }
.btn .ico { width: 14px; height: 14px; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn--danger { color: var(--danger); border-color: #efc7bf; }
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn--quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn--quiet:hover { background: var(--bg-2); border-color: transparent; color: var(--ink); }
.btn--chrome { background: var(--chrome-field); border-color: transparent; color: var(--chrome-text); }
.btn--chrome:hover { background: var(--chrome-hover); border-color: transparent; color: var(--chrome-strong); }
.btn--sm { height: 24px; padding: 0 9px; font-size: 11.5px; }
.btn--lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn--lg .ico { width: 18px; height: 18px; }
.btn--xl { height: 52px; padding: 0 28px; font-size: 15px; font-weight: 700; }
.btn--xl .ico { width: 20px; height: 20px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 8px; border: 0;
  background: transparent; color: var(--muted);
  transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.sidebar .icon-btn { color: var(--chrome-muted); }
.sidebar .icon-btn:hover { background: var(--chrome-hover); color: var(--chrome-strong); }
.link-btn { border: 0; background: none; padding: 0; color: var(--link); font-weight: 500; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }

/* ---------- karty ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; min-width: 0; scroll-margin-top: 60px; }
.card__head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  min-height: 38px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line);
}
.card__head h2, .card__head h3 { margin: 0; font-size: 13.5px; font-weight: 700; }
.card__head .card__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.card__body { padding: 12px; }
.card__body > :first-child { margin-top: 0; }
.card__body > :last-child { margin-bottom: 0; }
.card__scroll { overflow-x: auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.grid-2 > .card, .grid-2 > div > .card:last-child { margin-bottom: 0; }
.stack > .card:last-child { margin-bottom: 0; }

/* ---------- tabulky: kompaktní ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.3; }
.tbl th {
  padding: 5px 8px 5px 12px; text-align: left; white-space: nowrap;
  font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-1); border-bottom: 1px solid var(--line);
}
.tbl td { padding: 4px 8px 4px 12px; height: 30px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--bg-1); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .nowrap { white-space: nowrap; }
.tbl .muted { color: var(--muted); }
.tbl td.empty { color: var(--muted); text-align: center; height: 56px; }
.tbl input[type=text], .tbl input[type=number], .tbl select { height: 28px; padding: 3px 8px; }

/* ---------- formuláře ---------- */
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field > label, .flabel {
  display: block; margin: 0;
  font-size: 11px; font-weight: 500; color: var(--muted);
}
.fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.fields + .fields, .fields + .check, .check + .fields { margin-top: 10px; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; height: 30px; padding: 5px 10px;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface);
  font-size: 13px; color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
}
textarea { height: auto; min-height: 64px; line-height: 1.45; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 2px var(--link-soft); }
input:disabled, select:disabled, textarea:disabled, input[readonly], textarea[readonly] { background: var(--bg-1); color: var(--muted); }
input[type=color] { width: 40px; height: 30px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
input[type=file] { font-size: 12px; max-width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand-600); width: 15px; height: 15px; margin: 0; flex: none; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; line-height: 1.35; }
.check input { margin-top: 1px; }
.help { color: var(--muted); font-size: 12px; line-height: 1.5; }
p.help { margin: 8px 0 0; }
.search-field { position: relative; }
.search-field .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.search-field input { padding-left: 32px; }

/* ---------- štítky ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 999px; white-space: nowrap;
  background: var(--bg-2); color: var(--ink-3);
  font-size: 10.5px; font-weight: 600; line-height: 16px;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.err { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--link-soft); color: var(--link); }
.pill.brand { background: var(--brand-soft); color: var(--brand-strong); }

/* ---------- ikona (i) s bublinou (ui.js); štítek .pill.info je jen barva ---------- */
.info:not(.pill) {
  width: 17px; height: 17px; padding: 0; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-3); background: var(--surface); color: var(--muted);
  font: 600 10.5px/1 var(--font); font-style: normal; cursor: help;
  transition: border-color var(--t), color var(--t);
}
.info:not(.pill):hover, .info:not(.pill):focus-visible, .info.is-open { border-color: var(--brand); color: var(--link); outline: none; }
.bubble {
  position: fixed; z-index: 90;
  width: 22rem; max-width: calc(100vw - 16px);
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(31,26,23,.18);
  padding: 10px 12px; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere;
}
.bubble b { color: var(--ink); }
.bubble--tip { width: auto; max-width: min(18rem, calc(100vw - 16px)); padding: 6px 10px; font-size: 12px; line-height: 1.4; }
/* podrobnosti záznamu (data-info-html): nadpis a dvojice popisek – hodnota */
.bubble--rich { width: 26rem; padding: 10px 14px 6px; }
.bubble h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.bubble dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 0; line-height: 18px; }
.bubble dt, .bubble dd { margin: 0; padding: 4px 0; border-top: 1px solid var(--line); }
.bubble dt { padding-right: 14px; font-size: 11.5px; color: var(--muted); }
.bubble dd.err { color: var(--danger); }

/* ---------- oznámení vpravo nahoře ---------- */
.toast {
  position: fixed; top: 58px; right: 16px; z-index: 60;
  display: flex; align-items: center; gap: 8px; max-width: min(360px, calc(100vw - 32px));
  padding: 10px 14px; border-radius: 12px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(31,26,23,.16);
  font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.toast.show { opacity: 1; transform: none; }

/* ---------- modální okna ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(29,25,23,.5); backdrop-filter: blur(3px);
}
.modal {
  width: min(620px, 100%); max-height: calc(100vh - 40px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
}
.modal__head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.modal__head h2, .modal__head h3 { margin: 0; font-size: 15px; font-weight: 700; flex: 1; }
.modal__body { padding: 14px 16px; background: var(--canvas); overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--bg-1); }

/* ---------- přihlášení a stránky s heslem ---------- */
.auth {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 120% at 50% 0%, #3a302b 0%, var(--rail) 55%, var(--header) 100%);
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 12px;
}
.auth-card__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.auth-card__dot { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); display: inline-block; }
.auth-card__title { font-weight: 800; font-size: 20px; letter-spacing: .04em; }
.auth-card__app { font-size: 13px; font-weight: 600; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line-2); }
.auth-card h1 { font-size: 17px; margin: 4px 0 0; }
.auth-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-3); font-weight: 600; margin: 0; }
.auth-card form > label { margin-bottom: -6px; }
.auth-card input[type=text], .auth-card input[type=password] {
  height: auto; font-size: 14px; padding: 11px 12px;
  border: 1px solid var(--line-3); border-radius: 8px; background: var(--bg-1);
}
.auth-card input:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.auth-card button[type=submit], .auth-card .btn-submit {
  width: 100%; height: 42px; border: 0; border-radius: 999px; margin-top: 2px;
  background: var(--brand); color: var(--on-brand); font-size: 15px; font-weight: 700;
}
.auth-card button[type=submit]:hover { background: var(--brand-hover); }
.auth-card a { color: var(--link); font-weight: 600; }
.auth-card .err { color: var(--danger); background: var(--danger-soft); padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.auth-card .who { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; }
.auth-card .who div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; }
.auth-card .who span { color: var(--muted); }
.auth-card .who b { word-break: break-all; text-align: right; }
.auth-card .setup { background: var(--brand-soft); border: 1px solid #f3dc9a; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; }
.auth-card .setup p { margin: 6px 0; color: var(--ink); font-size: 12.5px; }
.auth-card .setup code { display: block; background: var(--surface); padding: 6px 8px; border-radius: 8px; font-size: 11.5px; word-break: break-word; margin: 6px 0; }
.auth-card .setup p code { display: inline; padding: 1px 4px; }
.auth-version { text-align: center; font-size: 11px; color: var(--muted-2); }

/* ---------- menší obrazovky ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: auto; align-self: stretch;
    transform: translateX(-100%); transition: transform var(--t);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .sidebar-back { position: fixed; inset: 0; z-index: 19; background: rgba(29,25,23,.45); }
  .menu-btn { display: inline-grid; }
  .route { margin-right: 0; border-radius: 16px 16px 0 0; padding: 12px 12px 48px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .page-head__actions { margin-left: 0; width: 100%; }
  .btn { height: 40px; padding: 0 14px; font-size: 13px; }
  .btn--sm { height: 32px; padding: 0 11px; font-size: 12px; }
  input[type=text], input[type=number], input[type=date], input[type=password], select { height: 40px; font-size: 16px; }
  .icon-btn { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --t: 0ms; }
}
