@charset "utf-8";
/* Shared components – modules reuse these and only add module-specific CSS. */

/* ---------- Page header ---------- */
.stranka { width: calc(100% - 48px); max-width: var(--obsah-max); margin: 0 auto; padding-bottom: 64px; }
.hlava { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 24px 0 16px; }
.hlava-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hlava-popis { color: var(--text-3); font-size: var(--fs-sm); }
.hlava-akce { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.tlacitko {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; width: fit-content;
  font: 500 var(--fs)/1 var(--font); color: var(--na-accentu);
  background: var(--accent); border: 1px solid transparent; border-radius: var(--r);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12), var(--shadow-1);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .06s;
}
.tlacitko:hover { background: var(--accent-2); color: var(--na-accentu); }
.tlacitko:active { transform: translateY(.5px); }
.tlacitko:disabled { opacity: .5; cursor: not-allowed; }
.tlacitko .ikona { font-size: 16px; }
.tlacitko.sekundarni { background: var(--panel); color: var(--text); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.tlacitko.sekundarni:hover { background: var(--hover); color: var(--text); }
.tlacitko.jemne { background: none; color: var(--text-2); box-shadow: none; }
.tlacitko.jemne:hover { background: var(--hover); color: var(--text); }
.tlacitko.nebezpecne { background: var(--danger); }
.tlacitko.nebezpecne:hover { background: color-mix(in srgb, var(--danger), #000 12%); }
.tlacitko.plna-sirka { width: 100%; }
.tlacitko.velke { height: 40px; padding: 0 18px; font-size: 14px; }

.ikonbtn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; flex: none;
  border: 0; padding: 0; background: none; border-radius: var(--r);
  color: var(--text-2); cursor: pointer; transition: background .12s, color .12s;
}
.ikonbtn:hover { background: var(--hover); color: var(--text); }
.ikonbtn.aktivni { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- Forms ---------- */
.pole { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pole > label, .pole-popisek { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.pole-napoveda { font-size: var(--fs-xs); color: var(--text-3); }
.pole-chyba { font-size: var(--fs-xs); color: var(--danger-text); }

:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=hidden], [type=submit], [type=button]), select, textarea) {
  width: 100%; min-height: 36px; padding: 7px 10px;
  font: var(--fs) var(--font); color: var(--text);
  background-color: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r);
  outline: none; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
:where(input, select, textarea):hover { border-color: color-mix(in srgb, var(--line-2) 55%, var(--text-3)); }
:where(input, select, textarea):focus { border-color: var(--accent); box-shadow: var(--focus); }
:where(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); }
:where(input, select, textarea)[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
:where(input, select, textarea):disabled { background-color: var(--panel-2); color: var(--text-3); cursor: not-allowed; }
:where(input, textarea)::placeholder { color: var(--text-3); }
:where(input[type=checkbox], input[type=radio]) { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
textarea { min-height: 90px; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: url('../img/chevron.svg'); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.pole-zaskrtnuti { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* ---------- Tabs (306) ---------- */
.zalozky { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.zalozky.lista { padding-bottom: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.zalozka {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2);
  font: inherit; white-space: nowrap; cursor: pointer; text-decoration: none;
}
.zalozka:hover { background: var(--hover); color: var(--text); }
.zalozka.aktivni, .zalozka[aria-current="page"] { background: var(--field); color: var(--text); font-weight: 500; }
.zalozka .pocet { font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- Segmented control (306) – buttons or radio labels ---------- */
.segment { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r); background: var(--hover); flex: none; }
.segment > button, .segment > label {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 22px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none;
  font: 500 var(--fs-xs)/1 var(--font); color: var(--text-2); cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s;
}
.segment > label > input { position: absolute; opacity: 0; pointer-events: none; }
.segment > :hover { color: var(--text); }
.segment > button[aria-checked="true"], .segment > button.aktivni, .segment > label:has(input:checked) {
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-1);
}
.segment > label:has(input:focus-visible) { box-shadow: var(--focus); }
.segment > label:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.segment.plny { display: flex; width: 100%; }
.segment.plny > * { flex: 1; height: 28px; font-size: var(--fs-sm); }
/* level colours in the role editor */
.segment > label.u1:has(input:checked) { color: var(--info-text); }
.segment > label.u2:has(input:checked) { color: var(--violet); }
.segment > label.u3:has(input:checked) { color: var(--accent-text); }

/* ---------- Settings sections & rows (306 v2-formular) ---------- */
.sekce { margin-bottom: 28px; }
.sekce-hlava { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sekce-hlava h2 { font-size: var(--fs-h3); font-weight: 600; }
.sekce-hlava p { margin: 2px 0 0; color: var(--text-3); font-size: var(--fs-sm); }
.sekce-hlava .segment-popis { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: var(--fs-xs); }

.formular { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.formular > .radek:last-child, .formular > :last-child > .radek:last-child { border-bottom: 0; }
.radek {
  display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 8px 24px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.radek-popis { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.radek-popis > label, .radek-popis > strong { font-size: var(--fs-sm); font-weight: 500; color: var(--text); }
.radek-popis > small { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.4; }
.radek-ovladac { display: flex; flex-direction: column; gap: 6px; max-width: 520px; min-width: 0; }
.radek-ovladac.vpravo { align-items: flex-end; justify-self: end; }
.radek-ovladac.rada { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.radek-ovladac.siroky { max-width: none; }
.radek-hodnota { color: var(--text-2); }
.formular-pata { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--panel-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ---------- Connected list rows (306 v2-seznam-uzivatelu) ---------- */
.seznam { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.seznam-radek {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px 10px 16px;
  border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; position: relative;
}
.seznam-radek:last-child { border-bottom: 0; }
a.seznam-radek:hover, .seznam-radek.odkaz:hover { background: var(--panel-2); color: var(--text); }
.seznam-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.seznam-text strong { font-size: var(--fs-sm); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.seznam-text small { color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seznam-meta { display: flex; align-items: center; gap: 8px; flex: none; color: var(--text-3); font-size: var(--fs-xs); }
.seznam-meta select { min-height: 30px; padding-top: 4px; padding-bottom: 4px; min-width: 220px; font-size: var(--fs-sm); }
.seznam-chevron { color: var(--text-3); flex: none; }
.seznam-radek .roztazeny::after { content: ""; position: absolute; inset: 0; }
.seznam-radek a.roztazeny { color: var(--text); text-decoration: none; }
.seznam-radek .nad { position: relative; z-index: 1; }
.castka-meta { color: var(--text); font-size: var(--fs-sm); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Avatar (306: soft accent) ---------- */
.avatar.mekky { background: var(--accent-soft); color: var(--accent-text); width: 32px; height: 32px; font-size: var(--fs-xs); }
.avatar.hlava-avatar { width: 44px; height: 44px; font-size: 15px; background: var(--accent-soft); color: var(--accent-text); }

/* ---------- Switch (306 littleswiper) ---------- */
.prepinac { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; flex: none; }
.prepinac input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.prepinac-kolej { width: 28px; height: 16px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.prepinac-kolej::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s var(--easing);
}
.prepinac input:checked + .prepinac-kolej { background: var(--ok); }
.prepinac input:checked + .prepinac-kolej::after { transform: translateX(12px); }
.prepinac input:focus-visible + .prepinac-kolej { box-shadow: var(--focus); }
.prepinac input:disabled + .prepinac-kolej { opacity: .5; cursor: not-allowed; }

/* ---------- Chips ---------- */
.cipy { display: flex; flex-wrap: wrap; gap: 4px; }
.cip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-sm); font: 500 var(--fs-xs)/1 var(--font); background: var(--hover); color: var(--text-2); white-space: nowrap; }
.cip.u1 { background: var(--info-soft); color: var(--info-text); }
.cip.u2 { background: var(--violet-soft); color: var(--violet); }
.cip.u3 { background: var(--accent-soft); color: var(--accent-text); }
.cip.ok { background: var(--ok-soft); color: var(--ok-text); }
.legenda { display: flex; gap: 14px; color: var(--text-3); font-size: var(--fs-xs); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda span::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: currentColor; }
.legenda .u1 { color: var(--info-text); }
.legenda .u2 { color: var(--violet); }
.legenda .u3 { color: var(--accent-text); }

/* ---------- Secret input with eye (306 v2-tajne) ---------- */
.tajne { position: relative; display: flex; }
.tajne input { padding-right: 38px; }
.tajne .ikonbtn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; }
.tajne-stav { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ok-text); }

/* ---------- Dialog ---------- */
.dialog {
  width: min(420px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-pop);
}
.dialog[open] { animation: pop .16s var(--easing); }
.dialog::backdrop { background: rgba(10, 10, 14, .35); animation: zatmivani .16s; }
.dialog-hlava { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.dialog-hlava h2 { font-size: var(--fs-h2); }
.dialog-telo { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 16px; }
.vzhled { width: min(380px, calc(100% - 32px)); }
.vzhled-radek { display: flex; flex-direction: column; gap: 8px; }
.vzhled-titul { font-size: var(--fs-sm); font-weight: 500; }
.vzhled-poznamka { margin: 0; font-size: var(--fs-xs); color: var(--text-3); }

form.pracuje { opacity: .6; pointer-events: none; }

/* ---------- Form helpers (used inside .radek-ovladac) ---------- */
.bez-ramu { border: 0; margin: 0; padding: 0; min-width: 0; }
.mesto-psc { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
.dve-pole { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.s-jednotkou { display: flex; align-items: center; gap: 8px; }
.s-jednotkou input { width: 140px; }
.s-jednotkou span { color: var(--text-3); }
.s-tlacitkem { display: flex; gap: 8px; }
.s-tlacitkem input { flex: 1; }
.s-tlacitkem .tlacitko { height: 36px; }
.tajne-radek { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tajne-stav.nic { color: var(--text-3); }
.pole-zaskrtnuti.mala { font-size: var(--fs-xs); color: var(--text-2); gap: 6px; }
.pole-zaskrtnuti.mala input { width: 14px; height: 14px; }
.zaskrtnuti-mrizka { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; }
.nebezpecny-text { color: var(--danger-text); }
.nebezpecny-text:hover { color: var(--danger-text); background: var(--danger-soft); }
.pod-formularem { padding-bottom: 32px; margin-top: -40px; }

/* ---------- Filter bar: tabs + search ---------- */
.filtr { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.filtr-prava { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hledani { position: relative; display: flex; align-items: center; width: 240px; }
.hledani .ikona { position: absolute; left: 9px; color: var(--text-3); pointer-events: none; font-size: 16px; }
.hledani input { min-height: 30px; padding: 4px 10px 4px 30px; background: var(--field); border-color: transparent; font-size: var(--fs-sm); }
.filtr select { min-height: 30px; padding-top: 4px; padding-bottom: 4px; width: auto; font-size: var(--fs-sm); }

/* ---------- Status chips with dot ---------- */
.stav { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font: 500 var(--fs-xs)/1 var(--font); white-space: nowrap; background: var(--hover); color: var(--text-2); }
.stav::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stav.info { background: var(--info-soft); color: var(--info-text); }
.stav.violet { background: var(--violet-soft); color: var(--violet); }
.stav.warn { background: var(--warn-soft); color: var(--warn-text); }
.stav.ok { background: var(--ok-soft); color: var(--ok-text); }
.stav.accent { background: var(--accent-soft); color: var(--accent-text); }

/* Event type dot (calendar colours shared by Kalendář, Projekty, Přehled) */
.udalost-tecka { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.udalost-tecka.info { background: var(--info); }
.udalost-tecka.violet { background: var(--violet); }
.udalost-tecka.warn { background: var(--warn); }
.udalost-tecka.ok { background: var(--ok); }
.udalost-tecka.accent { background: var(--accent); }

.avatar.maly { width: 24px; height: 24px; font-size: 10px; }
.skryty-vstup { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

/* ---------- Cards ---------- */
.karta { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.karta-telo { padding: 16px; }
.karta-hlava { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.karta-hlava h2 { font-size: var(--fs-h3); }

.mrizka { display: grid; gap: 12px; }
.mrizka.statistiky { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.mrizka.dva { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.statistika { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.statistika-hlava { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
.statistika-hlava .ikona { color: var(--text-3); }
.statistika-hodnota { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.statistika-pata { font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- Table ---------- */
.tabulka-obal { overflow-x: auto; }
.tabulka { width: 100%; border-collapse: collapse; font-size: var(--fs); }
.tabulka th {
  text-align: left; font-weight: 500; font-size: var(--fs-xs); color: var(--text-3);
  text-transform: uppercase; letter-spacing: .04em; padding: 10px 16px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2);
}
.tabulka td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabulka tbody tr:last-child td { border-bottom: 0; }
.tabulka tbody tr:hover td { background: var(--panel-2); }
.tabulka .vpravo { text-align: right; }
.tabulka a.radek-odkaz { color: var(--text); font-weight: 500; }
.tabulka a.radek-odkaz:hover { color: var(--accent-text); }

.osoba { display: flex; align-items: center; gap: 10px; min-width: 0; }
.osoba-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.osoba-text small { color: var(--text-3); font-size: var(--fs-xs); }

/* ---------- Avatar ---------- */
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--znacka-svetla), var(--znacka));
  color: #fff; font: 600 var(--fs-xs) var(--font);
}
.avatar.velky { width: 40px; height: 40px; font-size: 14px; }

/* ---------- Badges ---------- */
.stitek {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px;
  border-radius: 999px; font: 500 var(--fs-xs)/1 var(--font); white-space: nowrap;
  background: var(--hover); color: var(--text-2);
}
.stitek::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.stitek.ok { background: var(--ok-soft); color: var(--ok-text); }
.stitek.warn { background: var(--warn-soft); color: var(--warn-text); }
.stitek.danger { background: var(--danger-soft); color: var(--danger-text); }
.stitek.info { background: var(--info-soft); color: var(--info-text); }
.stitek.accent { background: var(--accent-soft); color: var(--accent-text); }
.stitek.bez-tecky::before { display: none; }

/* ---------- Alerts ---------- */
.upozorneni { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--info-soft); color: var(--info-text); margin-bottom: 14px; font-size: var(--fs); }
.upozorneni.chyba { background: var(--danger-soft); color: var(--danger-text); }
.upozorneni.ok { background: var(--ok-soft); color: var(--ok-text); }
.upozorneni.warn { background: var(--warn-soft); color: var(--warn-text); }

/* ---------- Empty state ---------- */
.prazdne { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px; text-align: center; color: var(--text-3); }
.prazdne .ikona { color: var(--text-3); }
.prazdne h2 { color: var(--text); font-size: var(--fs-h2); }
.prazdne p { max-width: 420px; margin: 0; }

/* ---------- Dark menu (Figma style) ---------- */
.menu {
  background: var(--ink); color: #fff; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px;
  padding: 6px; min-width: 220px; box-shadow: 0 12px 32px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .18);
  font-size: var(--fs);
}
.menu-polozka {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 30px; padding: 0 10px;
  border: 0; background: none; border-radius: 6px; color: rgba(255, 255, 255, .92);
  font: inherit; cursor: pointer; text-decoration: none; text-align: left; white-space: nowrap;
}
.menu-polozka .ikona { font-size: 16px; opacity: .8; }
.menu-polozka:hover, .menu-polozka.fokus { background: var(--znacka); color: #fff; }
.menu-polozka:hover .ikona { opacity: 1; }
.menu-oddelovac { height: 1px; background: rgba(255, 255, 255, .1); margin: 5px 4px; }
.menu-hlava { padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 2px; max-width: 280px; }
.menu-hlava strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-hlava span { font-size: var(--fs-xs); color: rgba(255, 255, 255, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-popisek { padding: 6px 10px 4px; font-size: 10px; font-weight: 600; color: rgba(255, 255, 255, .45); text-transform: uppercase; letter-spacing: .05em; }
/* ---------- Toasts ---------- */
.toasty { position: fixed; right: 16px; bottom: 16px; z-index: 5000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px;
  padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #fff;
  box-shadow: var(--shadow-pop); font-size: var(--fs); pointer-events: auto;
  animation: vyjet .2s var(--easing);
}
.toast .ikona { color: var(--ok); }
.toast.chyba .ikona { color: var(--danger); }
.toast.warn .ikona { color: var(--warn); }
.toast.info .ikona { color: var(--info); }
.toast.mizi { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }

@keyframes vyjet { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-3px); } to { opacity: 1; transform: none; } }
@keyframes zatmivani { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Error page ---------- */
.chyba-box { width: min(440px, calc(100% - 32px)); margin: 10vh auto; padding: 32px 28px; text-align: center; }
.chyba-kod { font-size: 44px; font-weight: 700; letter-spacing: -.03em; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.chyba-box h1 { font-size: 18px; margin-bottom: 6px; }
.chyba-box p { color: var(--text-2); overflow-wrap: anywhere; }
.chyba-box .tlacitko { margin-top: 10px; }
.auth .chyba-box { width: 100%; margin: 0; }

/* ---------- Placeholder sections ---------- */
.rozpracovano { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 72px 16px; text-align: center; }
.rozpracovano .ikona { color: var(--text-3); }
.rozpracovano p { color: var(--text-2); font-size: 14px; margin: 0; }

@media (max-width: 760px) {
  .radek { grid-template-columns: minmax(0, 1fr); }
  .radek-ovladac { max-width: none; }
  .radek-ovladac.vpravo { align-items: flex-start; justify-self: start; }
  .seznam-meta select { min-width: 0; max-width: 150px; }
  .filtr, .filtr-prava, .hledani { width: 100%; }
  .dve-pole { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 899px) {
  .stranka { width: calc(100% - 32px); }
  .hlava { padding: 16px 0 12px; }
  .toasty { left: 12px; right: 12px; bottom: calc(var(--mobil-lista-h) + 12px + env(safe-area-inset-bottom)); }
  .toast { min-width: 0; max-width: none; }
  :where(input, select, textarea) { font-size: 16px; }
}

/* ---------- Document line item editor (core/views/doklady/polozky.php) ---------- */
.polozky-editor { --sloupce: 28px minmax(180px, 1fr) 80px 84px 104px 72px 76px 112px 32px; padding: 6px 0 0; }
.polozky-editor.neplatce { --sloupce: 28px minmax(180px, 1fr) 80px 84px 104px 72px 112px 32px; }
.polozky-editor.neplatce .sloupec-dph { display: none; }

.polozka-radek { display: grid; grid-template-columns: var(--sloupce); gap: 8px; align-items: start; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.polozka-radek input, .polozka-radek select, .polozka-radek textarea { min-width: 0; width: 100%; }
.polozka-radek .cislo { text-align: right; font-variant-numeric: tabular-nums; }
.polozky-hlava { padding-top: 4px; padding-bottom: 6px; color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; }
.polozka-nazev { display: flex; flex-direction: column; gap: 4px; }
.polozka-nazev textarea { min-height: 48px; resize: vertical; font-size: var(--fs-xs); color: var(--text-2); }
.polozka-posun { display: flex; flex-direction: column; }
.polozka-posun .ikonbtn { width: 28px; height: 18px; min-height: 0; }
.polozka-celkem { align-self: center; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: var(--fs-sm); }
.polozka-radek > .ikonbtn { align-self: center; color: var(--text-3); }
[data-polozky-telo] .polozka-radek:first-child .polozka-posun [data-posun="-1"],
[data-polozky-telo] .polozka-radek:last-child .polozka-posun [data-posun="1"] { visibility: hidden; }

.polozky-pata { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 12px; background: var(--panel-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.polozky-akce { display: flex; gap: 8px; flex-wrap: wrap; }
.polozky-akce select { width: auto; max-width: 320px; }
.polozky-souhrn { display: grid; grid-template-columns: auto auto; gap: 4px 24px; margin: 0; font-variant-numeric: tabular-nums; }
.polozky-souhrn dt { color: var(--text-3); font-size: var(--fs-sm); }
.polozky-souhrn dd { margin: 0; text-align: right; font-size: var(--fs-sm); }
.polozky-souhrn .hlavni { font-size: var(--fs-h3); font-weight: 600; color: var(--text); }

@media (max-width: 899px) {
  .polozky-hlava { display: none; }
  .polozka-radek, .polozky-editor.neplatce .polozka-radek {
    grid-template-columns: 28px repeat(4, minmax(0, 1fr)) 32px;
    grid-template-areas: "posun nazev nazev nazev nazev pryc" "posun mn jedn cena sleva sleva" "posun dph dph celk celk celk";
  }
  .polozka-posun { grid-area: posun; }
  .polozka-nazev { grid-area: nazev; }
  .polozka-radek > [name$="[mnozstvi]"] { grid-area: mn; }
  .polozka-radek > [name$="[jednotka]"] { grid-area: jedn; }
  .polozka-radek > [name$="[cena]"] { grid-area: cena; }
  .polozka-radek > [name$="[sleva]"] { grid-area: sleva; }
  .polozka-radek > .sloupec-dph { grid-area: dph; }
  .polozka-celkem { grid-area: celk; }
  .polozka-radek > .ikonbtn { grid-area: pryc; align-self: start; }
}

/* ---------- Documents: list, detail, editor (quotes, invoices) ---------- */
.cislo-dokladu { flex: none; width: 92px; color: var(--text-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

.podtitul-dokladu { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.podtitul-dokladu a { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; }
.podtitul-dokladu a:hover { color: var(--text); }
.lista-dokladu { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.meta-dokladu { color: var(--text-3); font-size: var(--fs-xs); }
.akce-dokladu { display: flex; gap: 6px; flex-wrap: wrap; }
.akce-dokladu form { margin: 0; }
.nahled-dokladu { overflow-x: auto; padding-bottom: 32px; }
.nahled-dokladu .doklad { margin: 0 auto; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }

.editor-dokladu .sekce { max-width: 1100px; }

/* ---------- E-maily dokladů ---------- */
.upozorneni-emailu { display: flex; gap: 8px; align-items: center; max-width: 1100px; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--r); background: var(--info-soft); color: var(--info-text); font-size: var(--fs-sm); }
.emaily-karta { margin-bottom: 20px; }
.emaily-karta h2 { font-size: var(--fs-sm); font-weight: 600; padding: 12px 16px 4px; }
.emaily .seznam-radek > .stav { flex: none; }
.emaily .pole-chyba { white-space: normal; }
.vyber-sablony { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1100px; margin-bottom: 12px; }
.vyber-sablony:empty { display: none; }
.vyber-sablony > .tlacitko:only-child { margin-left: auto; }
