/* ════════════════ O2 Toolkit ════════════════ */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --border: #e2e5ee;
  --border-strong: #cdd2df;
  --text: #151a2d;
  --text-2: #586178;
  --text-3: #868ea4;
  --accent: #1f4fe0;
  --accent-hover: #1a43c2;
  --accent-ink: #ffffff;
  --accent-soft: #e9eefe;
  --ok: #0d7a53;      --ok-soft: #e1f4ec;
  --warn: #9a5b00;    --warn-soft: #fdf1da;
  --bad: #b8312f;     --bad-soft: #fce7e6;
  --wait: #6a4fc8;    --wait-soft: #efebfc;
  --neutral-soft: #eceef3;
  --pruh-schvaleno: #1f4fe0;
  --pruh-ceka: #a7b8f3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(21 26 45 / 5%), 0 2px 10px rgb(21 26 45 / 4%);
  --shadow-lg: 0 12px 40px rgb(21 26 45 / 18%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e111c;
    --surface: #161a29;
    --surface-2: #1d2235;
    --border: #272d44;
    --border-strong: #363e5b;
    --text: #e7eaf4;
    --text-2: #a2aac0;
    --text-3: #707a95;
    --accent: #7d9bff;
    --accent-hover: #98b0ff;
    --accent-ink: #0e111c;
    --accent-soft: #212b52;
    --ok: #4cd29f;      --ok-soft: #133528;
    --warn: #f0b350;    --warn-soft: #382a12;
    --bad: #ff8783;     --bad-soft: #3d1c1d;
    --wait: #b5a2ff;    --wait-soft: #2a2348;
    --neutral-soft: #242a3f;
    --pruh-schvaleno: #7d9bff;
    --pruh-ceka: #3b4b86;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / 50%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.skryte { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tlumene { color: var(--text-2); font-size: 13px; }
.ikona { width: 18px; height: 18px; flex: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Tlačítka ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-weight: 550; font-size: 14px; white-space: nowrap;
  cursor: pointer; transition: background .15s, border-color .15s, opacity .15s;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-nebezpecne:hover:not(:disabled) { color: var(--bad); background: var(--bad-soft); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-plna { width: 100%; }
.btn.ceka { position: relative; color: transparent !important; }
.btn.ceka::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 2px solid var(--text-3); border-top-color: transparent; border-radius: 50%;
  animation: tocit .7s linear infinite;
}
.btn-ikona {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2);
  cursor: pointer;
}
.btn-ikona:hover { background: var(--surface-2); color: var(--text); }
@keyframes tocit { to { transform: rotate(360deg); } }

/* ── Formuláře ── */
.pole { display: grid; gap: 5px; margin-bottom: 14px; min-width: 0; }
.pole > span { font-size: 13px; font-weight: 550; color: var(--text-2); }
.pole small { font-size: 12px; color: var(--text-3); min-height: 1em; }
.pole-hlavicka { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
input:not([type=checkbox], [type=radio], [type=file]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mrizka-2, .mrizka-3 { display: grid; gap: 0 12px; }
.mrizka-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mrizka-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chyba-text { color: var(--bad); font-size: 14px; margin-bottom: 12px; }

/* ── Přihlášení ── */
.prihlaseni { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.prihlaseni-karta {
  width: min(360px, 100%); padding: 32px 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.znacka { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.znacka .ikona { color: var(--accent); width: 22px; height: 22px; }
.znacka-velka { font-size: 20px; margin-bottom: 24px; }

/* ── Horní lišta ── */
.lista { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.lista-vnitrek { max-width: 1120px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 20px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); text-decoration: none; font-weight: 550; font-size: 14px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.aktivni { background: var(--accent-soft); color: var(--accent); }
.lista-akce { display: flex; gap: 2px; }

.obsah { max-width: 1120px; margin: 0 auto; padding: 28px 16px 64px; }

/* ── Modul ── */
.modul { position: relative; }
.modul-hlavicka { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.modul-hlavicka h1 { font-size: 26px; letter-spacing: -.02em; line-height: 1.2; }
.podtitul { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.modul-hlavicka-akce { display: flex; gap: 8px; flex-wrap: wrap; }

/* Dlaždice se statistikami */
.dlazdice { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.dlazdice-polozka {
  display: grid; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.dlazdice-hodnota { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dlazdice-popis { font-size: 13px; font-weight: 600; margin-top: 2px; }
.dlazdice-pod { font-size: 12px; color: var(--text-3); }

/* Taby */
.taby { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.taby button {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.taby button:hover { color: var(--text); }
.taby button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.pocitadlo:not(:empty) { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; line-height: 20px; text-align: center; }

/* Nástroje nad seznamem */
.nastroje { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.segment { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 10px; }
.segment button {
  padding: 6px 12px; border: 0; border-radius: 7px; background: none;
  color: var(--text-2); font-weight: 550; font-size: 13px; cursor: pointer;
}
.segment button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.hledani { position: relative; flex: 1; min-width: 200px; max-width: 320px; margin-left: auto; }
.hledani .ikona { position: absolute; left: 11px; top: 50%; translate: 0 -50%; color: var(--text-3); pointer-events: none; }
.hledani input { padding-left: 36px; }

.seznam { display: grid; gap: 8px; }

/* Roky a měsíce */
.roky { display: inline-flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.roky button {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface);
  color: var(--text-2); font-weight: 650; font-size: 14px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.roky button span { font-size: 12px; font-weight: 600; color: var(--text-3); }
.roky button:hover { color: var(--text); }
.roky button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.roky button[aria-pressed="true"] span { color: inherit; opacity: .75; }
.mesic + .mesic { margin-top: 22px; }
.mesic-nadpis {
  position: sticky; top: 56px; z-index: 2; display: flex; align-items: baseline; gap: 8px;
  padding: 8px 2px; margin-bottom: 4px; background: var(--bg);
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2);
}
.mesic-nadpis span { font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.prepinac-probehle {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 6px 10px;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer;
}
.prepinac-probehle:hover { background: var(--surface-2); color: var(--text); }
.prepinac-probehle[aria-expanded="true"] .sipka { rotate: 180deg; }
.probehle { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px dashed var(--border-strong); }

/* ── Štítky ── */
.stitek {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 18px;
}
.stitek-schvaleno { background: var(--ok-soft); color: var(--ok); }
.stitek-ceka { background: var(--wait-soft); color: var(--wait); }
.stitek-nahradnik { background: var(--warn-soft); color: var(--warn); }
.stitek-zamitnuto { background: var(--bad-soft); color: var(--bad); }
.stitek-volno { background: var(--ok-soft); color: var(--ok); }
.stitek-neutral { background: var(--neutral-soft); color: var(--text-2); }

/* ── Akce ── */
.akce { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.akce.minula { opacity: .8; }
.akce-hlava { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
.akce-radek {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) 170px 110px 18px; align-items: center; gap: 16px;
  padding: 12px 8px 12px 16px; background: none; border: 0; text-align: left; cursor: pointer;
}
.akce-radek:hover .akce-nazev { color: var(--accent); }
.datum-blok { display: grid; justify-items: center; line-height: 1.1; padding: 6px 0; border-radius: var(--radius-sm); background: var(--surface-2); }
.datum-blok .den { font-size: 20px; font-weight: 700; }
.datum-blok .mesic { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--accent); }
.datum-blok .detail { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.datum-blok .bez-data { font-size: 11px; color: var(--text-3); text-align: center; padding: 6px 4px; }
.akce-info { display: grid; gap: 4px; min-width: 0; }
.akce-nazev { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.akce-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.akce-doprovod { font-size: 12px; color: var(--text-3); }
.obsazenost { display: grid; gap: 5px; }
.pruh { display: flex; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.pruh-schvaleno { background: var(--pruh-schvaleno); }
.pruh-ceka { background: var(--pruh-ceka); }
.obsazenost-text { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.obsazenost-text strong { color: var(--text); }
.muj-stav { justify-self: start; }
.sipka { color: var(--text-3); transition: rotate .2s; }
.akce.otevrena .sipka { rotate: 180deg; }
.akce-nominovat { flex: none; width: 118px; }

.akce-detail { padding: 4px 16px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
.tabulka-obal { overflow-x: auto; }
.tabulka { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.tabulka th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 12px; padding: 8px 10px; }
.tabulka td { padding: 8px 10px; border-top: 1px solid var(--border); }
.tabulka tr.moje td { background: var(--accent-soft); }
.tabulka tr.moje td:first-child { box-shadow: inset 3px 0 var(--accent); }
.tabulka .cislo { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Připravené nominace ── */
.navrh {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
  padding: 14px 12px 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.navrh-pocet { display: grid; place-items: center; height: 48px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 17px; }
.navrh-info { display: grid; gap: 2px; min-width: 0; }
.navrh-info h3 { font-size: 15px; }
.navrh-info p { font-size: 13px; color: var(--text-2); }
.napoveda-mala { color: var(--warn) !important; font-size: 12px !important; }
.navrh-tlacitka { display: flex; }
.lista-akci { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.mezera { flex: 1; }

/* ── Historie ── */
.firma { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.firma-hlavicka { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.firma-hlavicka h3 { font-size: 15px; }
.firma-listky { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.firma-listky strong { font-size: 20px; color: var(--text); margin-right: 3px; }
.firma-zaznamy { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.firma-zaznamy li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 8px 8px 16px; }
.firma-zaznamy li + li { border-top: 1px solid var(--border); }
.hist-akce { display: grid; min-width: 0; }
.hist-nazev { font-weight: 550; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input.hist-poznamka { min-height: 34px; font-size: 13px; background: var(--surface-2); border-color: transparent; }
input.hist-poznamka:hover { border-color: var(--border-strong); }

/* ── Nápovědy ve formuláři ── */
.napovedy { display: grid; gap: 6px; margin: -4px 0 14px; }
.napoveda { display: flex; gap: 8px; align-items: flex-start; padding: 8px 11px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.45; }
.napoveda .ikona { width: 16px; height: 16px; margin-top: 1px; }
.napoveda-info { background: var(--surface-2); color: var(--text-2); }
.napoveda-info .ikona { color: var(--accent); }
.napoveda-warn { background: var(--warn-soft); color: var(--text); }
.napoveda-warn .ikona { color: var(--warn); }

/* ── Prázdný stav a načítání ── */
.prazdno {
  display: grid; justify-items: center; gap: 8px; padding: 48px 24px; text-align: center;
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius);
}
.prazdno-ikona { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.prazdno-ikona .ikona { width: 22px; height: 22px; }
.prazdno h3 { font-size: 16px; }
.prazdno p { color: var(--text-2); font-size: 14px; max-width: 420px; margin-bottom: 8px; }
.nacitani { height: 160px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%) 0 0 / 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.drop-vrstva {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); backdrop-filter: blur(2px); pointer-events: none;
}
.drop-vrstva > div { display: grid; justify-items: center; gap: 8px; padding: 32px 48px; border: 2px dashed var(--accent); border-radius: 16px; background: var(--surface); color: var(--accent); font-weight: 600; }
.drop-vrstva .ikona { width: 32px; height: 32px; }

/* ── Dialog ── */
.dialog {
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.dialog.siroky { width: min(720px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgb(10 13 25 / 45%); backdrop-filter: blur(2px); }
.dialog-telo { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.dialog-hlavicka { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 8px 22px; }
.dialog-hlavicka h2 { font-size: 18px; letter-spacing: -.01em; }
.dialog-obsah { padding: 8px 22px 6px; overflow-y: auto; }
.dialog-obsah > p { color: var(--text-2); margin-bottom: 12px; }
.dialog-paticka { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 22px 18px; border-top: 1px solid var(--border); }

/* ── Toasty ── */
#toasty { position: fixed; bottom: 20px; left: 50%; translate: -50% 0; z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast {
  padding: 11px 16px; border-radius: 10px; background: var(--text); color: var(--bg);
  font-size: 14px; box-shadow: var(--shadow-lg); animation: vjezd .2s ease-out; transition: opacity .3s, translate .3s;
}
.toast-ok { background: var(--ok); color: #fff; }
.toast-chyba { background: var(--bad); color: #fff; }
.toast.mizi { opacity: 0; translate: 0 8px; }
@keyframes vjezd { from { opacity: 0; translate: 0 8px; } }

/* ── Mobil ── */
@media (max-width: 860px) {
  .dlazdice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .akce-radek { grid-template-columns: 56px minmax(0, 1fr) 18px; gap: 12px; }
  .akce-radek .obsazenost { grid-column: 2; grid-row: 2; }
  .akce-radek .muj-stav { grid-column: 2; grid-row: 3; }
  .akce-radek .muj-stav:empty { display: none; }
  .akce-radek .datum-blok { grid-row: span 2; align-self: start; }
  .akce-radek .sipka { grid-column: 3; grid-row: 1; }
  .akce-nazev { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .akce-nominovat span { display: none; }
  .akce-nominovat { width: 36px; padding: 0; }
  .roky { flex-basis: 100%; }
}

@media (max-width: 600px) {
  .obsah { padding-top: 20px; }
  .lista-vnitrek { gap: 8px; }
  .nav a span { display: none; }
  .modul-hlavicka h1 { font-size: 22px; }
  .modul-hlavicka-akce { width: 100%; }
  .modul-hlavicka-akce > * { flex: 1; }
  .hledani { max-width: none; margin-left: 0; flex-basis: 100%; }
  .segment { width: 100%; }
  .segment button { flex: 1; }
  .mrizka-2, .mrizka-3 { grid-template-columns: minmax(0, 1fr); }
  .navrh { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; }
  .navrh-pocet { height: 40px; }
  .navrh-stav { grid-column: 2; grid-row: 2; }
  .navrh-tlacitka { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; }
  .firma-zaznamy li { grid-template-columns: minmax(0, 1fr) auto; }
  .firma-zaznamy .hist-poznamka { grid-column: 1; grid-row: 2; }
  .firma-zaznamy .btn-ikona { grid-row: 1 / span 2; grid-column: 2; }
  .lista-akci > .btn { flex: 1; }
  .mezera { display: none; }
}

/* ── Co je nového ── */
.odkaz { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.odkaz:hover { text-decoration: underline; }
.zmeny-sekce { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; }
.zmeny-sekce summary {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer;
  font-weight: 650; font-size: 14px; list-style: none;
}
.zmeny-sekce summary::-webkit-details-marker { display: none; }
.zmeny-sekce summary::after { content: "▾"; margin-left: auto; color: var(--text-3); transition: rotate .2s; }
.zmeny-sekce:not([open]) summary::after { rotate: -90deg; }
.zmeny-sekce summary span { min-width: 22px; padding: 0 7px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 12px; text-align: center; }
.zmeny-sekce ul { list-style: none; margin: 0; padding: 0 12px 6px; }
.zmeny-sekce li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; }
.zmeny-sekce li + li { border-top: 1px solid var(--border); }
.zmena-text { min-width: 0; }
.zmena-akce { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.dialog-obsah > .napoveda { margin-bottom: 12px; }
@media (max-width: 600px) {
  .zmeny-sekce li { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── Přepínač tabulky (Akce / Hokej Sparta) ── */
.zdroje { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.zdroje button {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text-2); font-weight: 650; font-size: 14px; cursor: pointer;
}
.zdroje button:hover { color: var(--text); }
.zdroje button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ── Liberec: permice ── */
.zapas-radek { grid-template-columns: 64px minmax(0, 1fr) auto 18px; }
.permice-rada { display: inline-flex; gap: 4px; }
.permice {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; border: 1.5px solid transparent;
}
.permice-volna { border: 1.5px dashed var(--ok); color: var(--ok); background: var(--ok-soft); }
.permice-moje { background: var(--accent); color: var(--accent-ink); }
.permice-obsazena { background: var(--surface-2); color: var(--text-3); }
.permice-rezervace {
  color: var(--text-3);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--neutral-soft) 4px 8px);
}
.legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4px 0 16px; font-size: 12px; color: var(--text-2); }
.legenda .permice { width: 22px; height: 22px; font-size: 11px; margin-right: -4px; }
.tc-mista { margin-top: 10px; font-size: 13px; }
.tc-mista summary { cursor: pointer; color: var(--text-2); font-weight: 600; padding: 4px 0; }
.vyber-permic { display: flex; gap: 8px; flex-wrap: wrap; }
.permice-volba input { position: absolute; opacity: 0; }
.permice-volba span {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; cursor: pointer;
  border: 1.5px dashed var(--ok); color: var(--ok); font-weight: 700;
}
.permice-volba input:checked + span { background: var(--accent); border: 1.5px solid var(--accent); color: var(--accent-ink); }
.permice-volba input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }


@media (max-width: 860px) {
  .zapas-radek { grid-template-columns: 56px minmax(0, 1fr) 18px; }
  .zapas-radek .permice-rada { grid-column: 2; grid-row: 2; }
}
@media (max-width: 600px) {
  .zdroje button { flex: 1; justify-content: center; }
  .legenda .tlumene { flex-basis: 100%; }
}
