/* Cesťáky — dizajn podľa Material Design 3 (Expressive).
   Farby, tvary aj typografia idú výhradne cez `--md-sys-*` tokeny, nikde nie
   sú natvrdo zapísané hodnoty. Paleta vychádza zo značkovej modrej (tón 40
   v svetlom režime, tón 80 v tmavom); zelená je vyhradená pre peniaze
   a potvrdenia. */

/* ============================================================== TOKENY ==== */

:root {
  /* --- farebné roly (svetlý režim) --- */
  --md-sys-color-primary: #38608F;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #D3E4FF;
  --md-sys-color-on-primary-container: #001D36;

  --md-sys-color-secondary: #545F70;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-secondary-container: #D8E3F8;
  --md-sys-color-on-secondary-container: #111C2B;

  --md-sys-color-tertiary: #2E6A45;
  --md-sys-color-on-tertiary: #FFFFFF;
  --md-sys-color-tertiary-container: #B1F1C4;
  --md-sys-color-on-tertiary-container: #00210F;

  --md-sys-color-error: #BA1A1A;
  --md-sys-color-on-error: #FFFFFF;
  --md-sys-color-error-container: #FFDAD6;
  --md-sys-color-on-error-container: #410002;

  --md-sys-color-surface: #F8F9FF;
  --md-sys-color-on-surface: #191C20;
  --md-sys-color-on-surface-variant: #43474E;
  --md-sys-color-surface-container-lowest: #FFFFFF;
  --md-sys-color-surface-container-low: #F2F3FA;
  --md-sys-color-surface-container: #ECEEF4;
  --md-sys-color-surface-container-high: #E7E8EE;
  --md-sys-color-surface-container-highest: #E1E2E9;

  --md-sys-color-outline: #73777F;
  --md-sys-color-outline-variant: #C3C7CF;
  --md-sys-color-inverse-surface: #2E3135;
  --md-sys-color-inverse-on-surface: #EFF0F7;

  /* --- typografia --- */
  /* Roboto, nie Roboto Flex — Roboto Flex má chybne nakreslený mäkčeň nad
     "ť" (aj "ľ", "ď"), overené priamo v prehliadači na oboch váhach. */
  --md-sys-typescale-font: "Roboto", system-ui, -apple-system,
                           "Segoe UI", sans-serif;
  --md-sys-typescale-display-small-size: 2.25rem;
  --md-sys-typescale-display-small-line-height: 2.75rem;
  --md-sys-typescale-headline-medium-size: 1.75rem;
  --md-sys-typescale-headline-medium-line-height: 2.25rem;
  --md-sys-typescale-headline-small-size: 1.5rem;
  --md-sys-typescale-headline-small-line-height: 2rem;
  --md-sys-typescale-title-large-size: 1.375rem;
  --md-sys-typescale-title-large-line-height: 1.75rem;
  --md-sys-typescale-title-medium-size: 1rem;
  --md-sys-typescale-body-large-size: 1rem;
  --md-sys-typescale-body-large-line-height: 1.5rem;
  --md-sys-typescale-body-medium-size: 0.875rem;
  --md-sys-typescale-label-large-size: 0.875rem;
  --md-sys-typescale-label-large-weight: 500;
  --md-sys-typescale-label-medium-size: 0.75rem;
  --md-sys-typescale-label-medium-weight: 500;

  /* --- tvary --- */
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 9999px;

  /* --- elevácia (hierarchiu nesie hlavne tón plochy, tieň len dopĺňa) --- */
  --md-sys-elevation-1: 0 1px 2px rgba(0, 0, 0, .08), 0 1px 3px 1px rgba(0, 0, 0, .06);
  --md-sys-elevation-2: 0 1px 2px rgba(0, 0, 0, .10), 0 2px 6px 2px rgba(0, 0, 0, .07);
  --md-sys-elevation-3: 0 4px 8px 3px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .12);

  /* --- pohyb --- */
  --md-sys-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-duration-short: 150ms;

  /* --- odstupy (základ 8dp) --- */
  --odstup-1: 4px;
  --odstup-2: 8px;
  --odstup-3: 12px;
  --odstup-4: 16px;
  --odstup-6: 24px;
  --odstup-8: 32px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --md-sys-color-primary: #A2C9FE;
    --md-sys-color-on-primary: #00315B;
    --md-sys-color-primary-container: #1D4875;
    --md-sys-color-on-primary-container: #D3E4FF;

    --md-sys-color-secondary: #BCC7DC;
    --md-sys-color-on-secondary: #263141;
    --md-sys-color-secondary-container: #3C4858;
    --md-sys-color-on-secondary-container: #D8E3F8;

    --md-sys-color-tertiary: #96D5A9;
    --md-sys-color-on-tertiary: #00391D;
    --md-sys-color-tertiary-container: #14512D;
    --md-sys-color-on-tertiary-container: #B1F1C4;

    --md-sys-color-error: #FFB4AB;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000A;
    --md-sys-color-on-error-container: #FFDAD6;

    --md-sys-color-surface: #111318;
    --md-sys-color-on-surface: #E1E2E9;
    --md-sys-color-on-surface-variant: #C3C7CF;
    --md-sys-color-surface-container-lowest: #0C0E13;
    --md-sys-color-surface-container-low: #191C20;
    --md-sys-color-surface-container: #1D2024;
    --md-sys-color-surface-container-high: #282A2F;
    --md-sys-color-surface-container-highest: #33353A;

    --md-sys-color-outline: #8D9199;
    --md-sys-color-outline-variant: #43474E;
    --md-sys-color-inverse-surface: #E1E2E9;
    --md-sys-color-inverse-on-surface: #2E3135;

    --md-sys-elevation-1: 0 1px 3px rgba(0, 0, 0, .5);
    --md-sys-elevation-2: 0 2px 6px rgba(0, 0, 0, .55);
    --md-sys-elevation-3: 0 6px 14px rgba(0, 0, 0, .6);

    color-scheme: dark;
  }
}

/* ============================================================== ZÁKLAD ==== */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--md-sys-typescale-font);
  font-size: var(--md-sys-typescale-body-large-size);
  line-height: var(--md-sys-typescale-body-large-line-height);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--md-sys-color-primary); text-underline-offset: 2px; }

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 24px;
  line-height: 1;
  user-select: none;
}

:focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 2px; }

/* ============================================================ NAVIGÁCIA === */

.aplikacia { display: flex; min-height: 100vh; }

.navigacia-rail {
  width: 88px; flex: none;
  background: var(--md-sys-color-surface);
  padding: var(--odstup-3) var(--odstup-2) var(--odstup-4);
  display: flex; flex-direction: column; align-items: center; gap: var(--odstup-2);
  position: sticky; top: 0; height: 100vh;
}
.rail-znacka {
  display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  text-decoration: none; margin-bottom: var(--odstup-2);
}
.rail-polozka {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  gap: var(--odstup-1); text-decoration: none; padding: var(--odstup-1) 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-medium-size);
  font-weight: var(--md-sys-typescale-label-medium-weight);
  text-align: center;
}
.rail-polozka .indikator {
  display: grid; place-items: center; width: 56px; height: 32px;
  border-radius: var(--md-sys-shape-corner-full);
  transition: background var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}
.rail-polozka:hover .indikator {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
}
.rail-polozka.aktivna { color: var(--md-sys-color-on-surface); }
.rail-polozka.aktivna .indikator {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.rail-polozka.aktivna .material-symbols-rounded { font-variation-settings: "FILL" 1; }

.horny-pruh {
  display: flex; align-items: center; gap: var(--odstup-4);
  padding: var(--odstup-3) var(--odstup-6);
  background: var(--md-sys-color-surface);
  position: sticky; top: 0; z-index: 10;
}
.horny-pruh h1 {
  font-size: var(--md-sys-typescale-headline-small-size);
  line-height: var(--md-sys-typescale-headline-small-line-height);
  font-weight: 400; margin: 0; flex: 1;
}
.pruh-akcie { display: flex; align-items: center; gap: var(--odstup-2); }

.menu-uctu { position: relative; }
.menu-uctu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: var(--odstup-2);
  padding: var(--odstup-1) var(--odstup-3) var(--odstup-1) var(--odstup-1);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
}
.menu-uctu summary::-webkit-details-marker { display: none; }
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-size: var(--md-sys-typescale-label-large-size);
}
.rozbalene {
  position: absolute; right: 0; top: calc(100% + var(--odstup-2));
  min-width: 16rem; z-index: 30; padding: var(--odstup-2);
  background: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-sys-shape-corner-medium);
  box-shadow: var(--md-sys-elevation-2);
  display: flex; flex-direction: column;
}
.rozbalene a, .rozbalene button {
  display: flex; align-items: center; gap: var(--odstup-3);
  padding: var(--odstup-3); border: 0; background: none; width: 100%;
  border-radius: var(--md-sys-shape-corner-full); cursor: pointer;
  color: var(--md-sys-color-on-surface); text-decoration: none;
  font: inherit; font-size: var(--md-sys-typescale-body-medium-size);
  text-align: left;
}
.rozbalene a:hover, .rozbalene button:hover {
  background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
}
.rozbalene-nadpis {
  padding: var(--odstup-2) var(--odstup-3); margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-medium-size);
}
.rozbalene hr {
  border: 0; border-top: 1px solid var(--md-sys-color-outline-variant);
  margin: var(--odstup-2) 0;
}

.navigacia-bar { display: none; }

/* ============================================================== OBSAH ===== */

.plocha { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.obsah { padding: 0 var(--odstup-6) var(--odstup-8); max-width: 1240px; width: 100%; }

h2 {
  font-size: var(--md-sys-typescale-title-large-size);
  line-height: var(--md-sys-typescale-title-large-line-height);
  font-weight: 500; margin: var(--odstup-8) 0 var(--odstup-3);
}
h3 { font-size: var(--md-sys-typescale-title-medium-size); font-weight: 500;
     margin: 0 0 var(--odstup-3); }
.podnadpis {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
  margin: 0 0 var(--odstup-6); max-width: 70ch;
}

.spravy { display: flex; flex-direction: column; gap: var(--odstup-2);
          margin-bottom: var(--odstup-4); }
.sprava {
  display: flex; gap: var(--odstup-3); align-items: flex-start;
  padding: var(--odstup-3) var(--odstup-4);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-size: var(--md-sys-typescale-body-medium-size);
}
.sprava-success { background: var(--md-sys-color-tertiary-container);
                  color: var(--md-sys-color-on-tertiary-container); }
.sprava-error { background: var(--md-sys-color-error-container);
                color: var(--md-sys-color-on-error-container); }
.sprava-warning { background: var(--md-sys-color-secondary-container);
                  color: var(--md-sys-color-on-secondary-container); }

/* ============================================================== KARTY ===== */

.karty { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
         gap: var(--odstup-4); }
.karta {
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-large);
  padding: var(--odstup-4);
  display: flex; flex-direction: column; gap: var(--odstup-1);
}
.karta-popis {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
}
.karta-hodnota {
  font-size: var(--md-sys-typescale-headline-medium-size);
  line-height: var(--md-sys-typescale-headline-medium-line-height);
  font-weight: 400; font-variant-numeric: tabular-nums;
}
.karta-poznamka {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}
.karta.zvyraznena {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
.karta.zvyraznena .karta-popis,
.karta.zvyraznena .karta-poznamka { color: inherit; opacity: .85; }
.karta.zvyraznena a { color: inherit; }

.panel {
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-large);
  padding: var(--odstup-6); margin-top: var(--odstup-4);
}

/* ============================================================ TABUĽKY ===== */

.tabulka-obal {
  overflow-x: auto;
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
}
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: var(--odstup-4); text-align: left;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}
th {
  color: var(--md-sys-color-on-surface-variant);
  font-weight: var(--md-sys-typescale-label-large-weight);
  font-size: var(--md-sys-typescale-label-large-size);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 4%, transparent); }
td.cislo, th.cislo { text-align: right; font-variant-numeric: tabular-nums; }
tr.sucet td { font-weight: 500; background: var(--md-sys-color-surface-container); }

/* ============================================================== ČIPY ====== */

.odznak {
  display: inline-flex; align-items: center; gap: var(--odstup-1);
  height: 32px; padding: 0 var(--odstup-3);
  border-radius: var(--md-sys-shape-corner-small);
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  white-space: nowrap;
}
.odznak-ok { background: var(--md-sys-color-tertiary-container);
             color: var(--md-sys-color-on-tertiary-container); }
.odznak-upozornenie { background: var(--md-sys-color-secondary-container);
                      color: var(--md-sys-color-on-secondary-container); }
.odznak-chyba { background: var(--md-sys-color-error-container);
                color: var(--md-sys-color-on-error-container); }

/* =========================================================== FORMULÁRE ==== */

form .pole { display: flex; flex-direction: column; gap: var(--odstup-1);
             margin-bottom: var(--odstup-4); }
form label {
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--md-sys-typescale-body-medium-size);
}
input, select, textarea {
  font: inherit; font-size: var(--md-sys-typescale-body-large-size);
  padding: var(--odstup-3) var(--odstup-4);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small);
  background: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface);
  width: 100%;
  transition: border-color var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--md-sys-color-primary); }
input:hover, select:hover, textarea:hover { border-color: var(--md-sys-color-on-surface); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--md-sys-color-primary);
  box-shadow: inset 0 0 0 1px var(--md-sys-color-primary);
}
.pomocka, .chyba-pola {
  font-size: var(--md-sys-typescale-body-medium-size);
  color: var(--md-sys-color-on-surface-variant);
  padding-left: var(--odstup-4);
}
.chyba-pola { color: var(--md-sys-color-error); }
.mriezka-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
             gap: 0 var(--odstup-4); }

/* ============================================================ TLAČIDLÁ ==== */

.tlacidla { display: flex; flex-wrap: wrap; gap: var(--odstup-2); margin-top: var(--odstup-4); }
.tlacidlo {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--odstup-2); min-height: 40px; padding: 0 var(--odstup-6);
  border-radius: var(--md-sys-shape-corner-full);
  border: 1px solid var(--md-sys-color-outline);
  background: transparent; color: var(--md-sys-color-primary);
  font: inherit; font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  cursor: pointer; text-decoration: none;
  transition: background var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}
.tlacidlo:hover { background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); }
.tlacidlo:active { background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent); }
.tlacidlo-hlavne {
  background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary);
  border-color: transparent;
}
.tlacidlo-hlavne:hover {
  background: color-mix(in srgb, var(--md-sys-color-on-primary) 8%, var(--md-sys-color-primary));
  box-shadow: var(--md-sys-elevation-1);
}
.tlacidlo-tonalne {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container); border-color: transparent;
}
.tlacidlo-nebezpecne { color: var(--md-sys-color-error); border-color: var(--md-sys-color-error); }
.tlacidlo-nebezpecne:hover { background: color-mix(in srgb, var(--md-sys-color-error) 8%, transparent); }
.tlacidlo-male { min-height: 32px; padding: 0 var(--odstup-3);
                 font-size: var(--md-sys-typescale-label-medium-size); }
.tlacidlo-text { border-color: transparent; padding: 0 var(--odstup-3); }

.fab {
  position: fixed; right: var(--odstup-6); bottom: var(--odstup-6); z-index: 20;
  display: inline-flex; align-items: center; gap: var(--odstup-2);
  height: 56px; padding: 0 var(--odstup-4);
  border-radius: var(--md-sys-shape-corner-large);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--md-sys-elevation-3); text-decoration: none;
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
}

.filtre { display: flex; flex-wrap: wrap; gap: var(--odstup-3); align-items: end;
          margin-bottom: var(--odstup-4); }
.filtre .pole { margin-bottom: 0; min-width: 12rem; }

.prazdne { text-align: center; padding: var(--odstup-8) var(--odstup-4);
           color: var(--md-sys-color-on-surface-variant); }

/* ====================================================== PRIHLÁSENIE ======= */

.stred { max-width: 26rem; margin: 8vh auto; padding: 0 var(--odstup-4); }
.stred .karta {
  background: var(--md-sys-color-surface-container-low);
  border-radius: var(--md-sys-shape-corner-extra-large);
  padding: var(--odstup-8); box-shadow: var(--md-sys-elevation-1);
}
.stred h1 {
  font-size: var(--md-sys-typescale-display-small-size);
  line-height: var(--md-sys-typescale-display-small-line-height);
  font-weight: 400; text-align: center; margin: 0 0 var(--odstup-2);
}
.stred .podnadpis { text-align: center; }
.stred .tlacidlo { width: 100%; }

/* ========================================================== DVA STĹPCE ==== */

.dva-stlpce {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
  gap: var(--odstup-4); align-items: start;
}
.dva-stlpce > aside { display: flex; flex-direction: column; gap: var(--odstup-4); }
.dva-stlpce .panel { margin-top: 0; }

.riadok-medzi {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--odstup-3); flex-wrap: wrap;
  padding: var(--odstup-2) 0;
}

/* zoznam popis → hodnota, bez tabuľky */
dl.udaje { display: grid; grid-template-columns: auto 1fr; gap: var(--odstup-1) var(--odstup-4);
           margin: 0; font-size: var(--md-sys-typescale-body-medium-size); }
dl.udaje dt { color: var(--md-sys-color-on-surface-variant); }
dl.udaje dd { margin: 0; }

table.suhrn { width: 100%; }
table.suhrn td { padding: var(--odstup-2) 0; border-bottom: 0; }
table.suhrn tr.sucet td {
  border-top: 1px solid var(--md-sys-color-outline-variant);
  background: none; font-weight: 500;
}

tr.stlmene td, .panel.stlmene { opacity: .55; }
tr.chybny td { background: var(--md-sys-color-error-container);
               color: var(--md-sys-color-on-error-container); }

/* zaškrtávacie pole aj s popisom na jednom riadku */
.pole.prepinac { flex-direction: row; align-items: flex-start; gap: var(--odstup-3);
                 margin-bottom: var(--odstup-3); }
.pole.prepinac label { display: flex; align-items: center; gap: var(--odstup-3);
                       color: var(--md-sys-color-on-surface); cursor: pointer; }
.pole.prepinac input[type="checkbox"] { flex: none; }

.pole ul { list-style: none; margin: 0; padding: 0;
           display: flex; flex-wrap: wrap; gap: var(--odstup-2) var(--odstup-4); }
.pole ul li label { display: flex; align-items: center; gap: var(--odstup-2);
                    color: var(--md-sys-color-on-surface); }
.pole ul li input { width: auto; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
       font-size: var(--md-sys-typescale-body-medium-size);
       background: var(--md-sys-color-surface-container);
       padding: 0 var(--odstup-1); border-radius: var(--md-sys-shape-corner-extra-small);
       overflow-wrap: anywhere; }

img.ukazka-podpisu {
  max-width: 220px; max-height: 90px; display: block;
  padding: var(--odstup-2);
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-small);
}

hr.jemna { border: 0; border-top: 1px solid var(--md-sys-color-outline-variant);
            margin: var(--odstup-3) 0; }

/* ============================================================ KALENDÁR ==== */

table.kalendar { table-layout: fixed; }
table.kalendar th {
  text-align: center; padding: var(--odstup-1) 0;
  font-size: var(--md-sys-typescale-label-medium-size);
}
table.kalendar td {
  text-align: center; padding: var(--odstup-1); border-bottom: 0;
  height: 44px; vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
table.kalendar tbody tr:hover { background: none; }
table.kalendar td.mimo { color: transparent; }
table.kalendar td a {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 3px; text-decoration: none; color: inherit;
  width: 34px; padding: var(--odstup-1) 0;
  border-radius: var(--md-sys-shape-corner-full);
}
table.kalendar td.s-cestou a { background: var(--md-sys-color-secondary-container);
                               color: var(--md-sys-color-on-secondary-container); }
table.kalendar td .bodka {
  width: 5px; height: 5px; border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary); display: block;
}
table.kalendar td.dnes { font-weight: 600; }
table.kalendar td.dnes::after {
  content: ""; display: block; height: 2px; width: 20px; margin: 2px auto 0;
  background: var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-corner-full);
}

/* ============================================================== MOBIL ===== */

@media (max-width: 1099px) {
  .dva-stlpce { grid-template-columns: 1fr; }
}

@media (max-width: 839px) {
  .navigacia-rail { display: none; }
  .horny-pruh { padding: var(--odstup-3) var(--odstup-4); }
  .horny-pruh h1 { font-size: var(--md-sys-typescale-title-large-size); }
  .obsah { padding: 0 var(--odstup-4) 96px; }
  .panel { padding: var(--odstup-4); }
  th, td { padding: var(--odstup-3); }
  .fab { bottom: 88px; right: var(--odstup-4); }

  .navigacia-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--md-sys-color-surface-container);
    padding: var(--odstup-2) var(--odstup-2)
             calc(var(--odstup-2) + env(safe-area-inset-bottom));
    box-shadow: var(--md-sys-elevation-2);
  }
  .navigacia-bar a {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: var(--odstup-1); text-decoration: none;
    color: var(--md-sys-color-on-surface-variant);
    font-size: var(--md-sys-typescale-label-medium-size);
    font-weight: var(--md-sys-typescale-label-medium-weight);
  }
  .navigacia-bar .indikator {
    display: grid; place-items: center; width: 64px; height: 32px;
    border-radius: var(--md-sys-shape-corner-full);
  }
  .navigacia-bar a.aktivna { color: var(--md-sys-color-on-surface); }
  .navigacia-bar a.aktivna .indikator {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
  }
  .navigacia-bar a.aktivna .material-symbols-rounded { font-variation-settings: "FILL" 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .navigacia-rail, .navigacia-bar, .horny-pruh, .tlacidla, .filtre, .fab { display: none !important; }
  body { background: #fff; }
}
