/* Hlášení závad — vzhled v2 (plátno https://claude.ai/artifact/Ybi1D51fPF5VddDEvN3g3r)
   Figtree, teplá šedá, akcent = barva školy, každý druh závady má svou barvu a ikonu. */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap');

:root {
  --akcent: #9f5c9f;          /* přepíše app.js barvou školy */
  --akcent-tx: color-mix(in srgb, var(--akcent) 85%, #000);   /* tlačítka a odkazy: kontrast s bílou aspoň 4,5 : 1 */
  --akcent-svetly: color-mix(in srgb, var(--akcent) 12%, #fff);
  --bg: #F6F5F3;
  --karta: #FFFFFF;
  --tx: #1F1D1A;
  --tx2: #5F5A53;
  --tx3: #3D3A36;
  --linka: #EDE8E1;
  --ramec: #E0D9CF;
  --cervena: #D7261E;
  --cervena-tx: #A3150F;
  --cervena-bg: #FDE2DF;
  --zelena: #2E8552;
  --zelena-tx: #1F6440;
  --zelena-bg: #DDF2E5;
  --zluta-bg: #FFF2D1;
  --zluta-tx: #7A5000;
  --r: 14px;

  /* druhy závad */
  --kat-it: #2B63D9;         --kat-it-tint: #E7EEFC;         --kat-it-ink: #1E4FB8;
  --kat-voda: #0E9AA7;       --kat-voda-tint: #DDF3F4;       --kat-voda-ink: #0A6670;
  --kat-elektro: #F0A100;    --kat-elektro-tint: #FFF2D1;    --kat-elektro-ink: #7A5000;
  --kat-nabytek: #B5603A;    --kat-nabytek-tint: #F6E6DC;    --kat-nabytek-ink: #8A4122;
  --kat-uklid: #3C9A4E;      --kat-uklid-tint: #E2F2E4;      --kat-uklid-ink: #24622F;
  --kat-bezp: #D7261E;       --kat-bezp-tint: #FDE2DF;       --kat-bezp-ink: #A3150F;

  /* stavy */
  --stav-nahlaseno: #5B6B80;   --stav-nahlaseno-tint: #E9EDF2;   --stav-nahlaseno-ink: #3E4B5C;
  --stav-resi: #C05A00;        --stav-resi-tint: #FDEAD6;        --stav-resi-ink: #8F4300;
  --stav-dil: #6B55C9;         --stav-dil-tint: #ECE8FB;         --stav-dil-ink: #4B379F;
  --stav-vedeni: #C0306A;      --stav-vedeni-tint: #FBE2EC;      --stav-vedeni-ink: #94204F;
  --stav-hotovo: #2E8552;      --stav-hotovo-tint: #DDF2E5;      --stav-hotovo-ink: #1F6440;
  --stav-uzavreno: #57534E;    --stav-uzavreno-tint: #ECEAE7;    --stav-uzavreno-ink: #3D3A36;
  color-scheme: light;
}

.d-it { --d: var(--kat-it); --d-tint: var(--kat-it-tint); --d-ink: var(--kat-it-ink); }
.d-voda { --d: var(--kat-voda); --d-tint: var(--kat-voda-tint); --d-ink: var(--kat-voda-ink); }
.d-elektro { --d: var(--kat-elektro); --d-tint: var(--kat-elektro-tint); --d-ink: var(--kat-elektro-ink); }
.d-nabytek { --d: var(--kat-nabytek); --d-tint: var(--kat-nabytek-tint); --d-ink: var(--kat-nabytek-ink); }
.d-uklid { --d: var(--kat-uklid); --d-tint: var(--kat-uklid-tint); --d-ink: var(--kat-uklid-ink); }
.d-bezp { --d: var(--kat-bezp); --d-tint: var(--kat-bezp-tint); --d-ink: var(--kat-bezp-ink); }
.s-nahlaseno { --s: var(--stav-nahlaseno); --s-tint: var(--stav-nahlaseno-tint); --s-ink: var(--stav-nahlaseno-ink); }
.s-resi { --s: var(--stav-resi); --s-tint: var(--stav-resi-tint); --s-ink: var(--stav-resi-ink); }
.s-dil { --s: var(--stav-dil); --s-tint: var(--stav-dil-tint); --s-ink: var(--stav-dil-ink); }
.s-vedeni { --s: var(--stav-vedeni); --s-tint: var(--stav-vedeni-tint); --s-ink: var(--stav-vedeni-ink); }
.s-hotovo { --s: var(--stav-hotovo); --s-tint: var(--stav-hotovo-tint); --s-ink: var(--stav-hotovo-ink); }
.s-uzavreno { --s: var(--stav-uzavreno); --s-tint: var(--stav-uzavreno-tint); --s-ink: var(--stav-uzavreno-ink); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tx); font: 16px/1.45 Figtree, system-ui, sans-serif; }
a { color: var(--akcent-tx); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ilustrace { display: block; max-width: 100%; height: auto; }

/* rám aplikace */
.hlavicka { background: var(--karta); box-shadow: 0 1px 0 var(--linka); position: sticky; top: 0; z-index: 5; }
.hlavicka .in { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.znak { width: 42px; height: 42px; border-radius: 12px; background: var(--akcent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.hlavicka .skola { font-size: 13px; color: var(--tx2); }
.hlavicka h1 { font-size: 19px; font-weight: 800; }
.hlavicka .zpet { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--tx); margin-left: -10px; }
.hlavicka .zpet .ico { width: 26px; height: 26px; }
.hlavicka .vpravo { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.obsah { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(110px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.obsah.siroke { max-width: 1240px; }

.lista { position: fixed; left: 0; right: 0; bottom: 0; background: var(--karta); box-shadow: 0 -1px 0 var(--linka); display: flex; justify-content: center; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 6; }
.lista a { flex: 1 1 0; max-width: 140px; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--tx2); font-size: 12.5px; font-weight: 600; position: relative; }
.lista a .ico { width: 24px; height: 24px; }
.lista a[aria-current] { color: var(--akcent-tx); font-weight: 800; }
.lista .pocet { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--cervena); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center; }
@media (min-width: 900px) {
  .lista { position: sticky; top: 67px; bottom: auto; box-shadow: 0 1px 0 var(--linka); justify-content: flex-start; padding: 0 max(12px, calc(50% - 608px)); gap: 4px; }
  .lista a { flex: 0 0 auto; max-width: none; flex-direction: row; gap: 8px; min-height: 52px; padding: 0 16px; font-size: 16px; }
  .lista a .ico { width: 20px; height: 20px; }
  .lista a[aria-current] { box-shadow: inset 0 -3px 0 var(--akcent); }
  .lista .pocet { position: static; }
  .obsah { padding-bottom: 48px; padding-top: 24px; }
}

/* karty a prvky */
.karta { background: var(--karta); box-shadow: 0 0 0 1px var(--linka); border-radius: var(--r); padding: 16px; }
.karta.akcent { box-shadow: 0 0 0 2px var(--akcent); }
.karta.zluta { background: var(--zluta-bg); box-shadow: none; color: var(--zluta-tx); }
.karta.prazdno { text-align: center; color: var(--tx2); padding: 28px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.radek { display: flex; align-items: center; gap: 12px; }
.sloupec { display: flex; flex-direction: column; gap: 4px; }
.mezera { flex-grow: 1; }
.male { font-size: 14px; color: var(--tx2); }
.nadpis-sekce { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #4A4640; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.nadpis-sekce .ico { width: 16px; height: 16px; }
.tucne { font-weight: 700; }
.nadpis-kroku { font-size: 19px; font-weight: 800; }

.btn { min-height: 54px; border-radius: var(--r); border: 0; background: var(--akcent-tx); color: #fff; font-size: 17px; font-weight: 800; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; }
.btn.plny { width: 100%; }
.btn.druhy { background: var(--karta); color: var(--tx); box-shadow: inset 0 0 0 2px var(--ramec); font-weight: 700; }
.btn.jemny { background: var(--akcent-svetly); color: var(--akcent-tx); }
.btn.maly { min-height: 44px; font-size: 15px; border-radius: 12px; padding: 0 14px; }
.btn.bila { background: #fff; color: var(--cervena-tx); }
.btn.zeleny { background: var(--zelena); }
.btn:disabled { opacity: .5; cursor: default; }
.odkaz { background: none; border: 0; color: var(--akcent-tx); font-weight: 700; font-size: 15px; padding: 10px 4px; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }

/* výběr druhu: barevné dlaždice s ikonou */
.volby { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dlazdice { position: relative; min-height: 128px; border: 0; border-radius: var(--r); background: var(--karta); box-shadow: 0 0 0 1px #E6E0D8; padding: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; text-align: left; cursor: pointer; color: var(--tx); }
.dlazdice .jmeno { font-size: 17px; font-weight: 800; line-height: 1.2; }
.dlazdice .komu { font-size: 13px; color: #4A4640; line-height: 1.3; }
.dlazdice.d-bezp { background: #FFF7F6; box-shadow: 0 0 0 2px var(--kat-bezp); }
.dlazdice.d-bezp .jmeno { color: var(--kat-bezp-ink); }
.dlazdice[aria-pressed="true"] { background: var(--d-tint); box-shadow: 0 0 0 3px var(--d); }
.dlazdice .fajfka { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--d); color: #fff; display: none; align-items: center; justify-content: center; }
.dlazdice .fajfka .ico { width: 16px; height: 16px; stroke-width: 3; }
.dlazdice[aria-pressed="true"] .fajfka { display: flex; }
.dlazdice:focus-visible { outline: 3px solid color-mix(in srgb, var(--akcent) 45%, transparent); outline-offset: 2px; }
.komu-info { border-radius: 12px; background: var(--d-tint, var(--bg)); color: var(--d-ink, var(--tx2)); padding: 12px 14px; font-size: 15px; font-weight: 600; display: flex; gap: 10px; align-items: center; }

/* ikona a štítek druhu */
.druh-ik { width: var(--v, 44px); height: var(--v, 44px); border-radius: 50%; background: var(--d, var(--tx2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.druh-ik .ico { width: calc(var(--v, 44px) * .52); height: calc(var(--v, 44px) * .52); }
.druh-ik.d-bezp { border-radius: 28%; }
.druh-ik.d-elektro { color: #3D2A00; }
.druh-st { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 7px; border-radius: 8px; background: var(--d-tint); color: var(--d-ink); font-size: 13.5px; font-weight: 700; white-space: nowrap; align-self: flex-start; }
.druh-st .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.druh-st.d-bezp { background: var(--kat-bezp); color: #fff; }

/* stavy: kulatý štítek s ikonou */
.stitek { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 8px; border-radius: 999px; background: var(--s-tint, #ECEAE7); color: var(--s-ink, var(--tx3)); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.stitek .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.vek { flex-shrink: 0; display: inline-flex; align-items: center; height: 28px; padding: 0 9px; border-radius: 8px; background: #F1EEEA; color: var(--tx3); font-size: 14px; font-weight: 800; white-space: nowrap; }
.vek.v-zluta { background: var(--zluta-bg); color: var(--zluta-tx); }
.vek.v-cervena { background: var(--cervena-bg); color: var(--cervena-tx); }
.postup { display: flex; gap: 4px; }
.postup span { flex: 1; height: 6px; border-radius: 3px; background: #E6E1DA; }
.postup span.ano { background: var(--s); }

label.pole { display: flex; flex-direction: column; gap: 6px; }
label.pole > span { font-size: 15px; font-weight: 700; }
.vstup { width: 100%; min-height: 52px; border: 2px solid var(--ramec); border-radius: 12px; padding: 12px 14px; font-size: 17px; background: var(--karta); }
textarea.vstup { resize: vertical; min-height: 84px; line-height: 1.45; }
.vstup:focus { border-color: var(--akcent); box-shadow: 0 0 0 4px var(--akcent-svetly); outline: none; }
.btn:focus-visible, .odkaz:focus-visible { outline: 3px solid color-mix(in srgb, var(--akcent) 45%, transparent); outline-offset: 2px; }

.foto-dvojice { display: flex; gap: 10px; }
.foto-tlacitko { flex: 2 1 0; height: 108px; border: 2px dashed var(--akcent); border-radius: var(--r); background: var(--akcent-svetly); color: var(--akcent-tx); font-weight: 800; font-size: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-align: center; padding: 0 8px; }
.foto-tlacitko .ico { width: 32px; height: 32px; stroke-width: 2; }
.foto-tlacitko.druhe { flex: 1 1 0; border: 2px solid var(--ramec); background: var(--karta); color: var(--tx); font-size: 16px; font-weight: 700; }
.foto-tlacitko.druhe .ico { width: 26px; height: 26px; }
label.foto-tlacitko, label.btn { position: relative; }
/* Výběr souboru schovaný, ale ne display:none (starší iPhony pak na štítek nereagují) */
.skryty { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
label:has(> .skryty:focus-visible) { outline: 3px solid color-mix(in srgb, var(--akcent) 45%, transparent); outline-offset: 2px; }
.verze { text-align: center; font-size: 12px; color: #6F6A62; padding-top: 8px; }
.foto-nahled { position: relative; }
.foto-nahled img { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r); display: block; }
.foto-nahled button { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.foto { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--r); display: block; background: #E9E6E1; }
.fotky { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.fotky figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.fotky figure img { width: 100%; height: 170px; object-fit: cover; border-radius: var(--r); display: block; background: #E9E6E1; }
.fotky figcaption { font-size: 14px; font-weight: 700; }
.mini { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #E9E6E1; flex-shrink: 0; }

/* přihlášení */
.vitejte { display: flex; flex-direction: column; gap: 18px; }
.vitejte-hlava { margin: -16px -16px 0; background: var(--akcent); color: #fff; padding: 22px 24px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; border-radius: 0 0 24px 24px; overflow: hidden; }
@media (min-width: 672px) { .vitejte-hlava { margin: 8px 0 0; border-radius: 24px; } }

/* karta místnosti v barvě školy */
.mistnost-karta { border-radius: var(--r); background: var(--akcent); color: #fff; padding: 20px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.mistnost-karta::after { content: ''; position: absolute; right: -28px; top: -28px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.12); }
.mistnost-karta h2 { font-size: 32px; font-weight: 800; letter-spacing: -.01em; }
.mistnost-karta .info { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.mistnost-karta .info .ico { width: 18px; height: 18px; }
.mistnost-karta .odznak { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.2); font-size: 13px; font-weight: 700; }
.mistnost-karta .odznak .ico { width: 15px; height: 15px; }
.mistnost-karta .odkaz { color: #fff; align-self: flex-start; text-decoration: underline; padding-left: 0; position: relative; z-index: 1; }

/* výběr místnosti bez QR */
.mist-volba { width: 100%; min-height: 64px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; border: 0; border-top: 1px solid var(--linka); background: none; text-align: left; cursor: pointer; color: var(--tx); }
.mist-volba:hover { background: #FBFAF8; }
.mist-volba .stitek { height: 26px; font-size: 13px; padding: 0 10px; }
.mist-zkratka { width: 42px; height: 42px; border-radius: 12px; background: var(--akcent-svetly); color: var(--akcent-tx); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; font-weight: 800; }

/* položka v seznamu (moje hlášení, fronta) */
.polozka { display: flex; gap: 12px; text-decoration: none; color: var(--tx); }
.polozka .sloupec { flex-grow: 1; min-width: 0; gap: 6px; }
.polozka .nazev { font-size: 17px; font-weight: 800; line-height: 1.25; }
.polozka.bezp { box-shadow: 0 0 0 2px var(--kat-bezp); }
.polozka-hlava { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.polozka-pata { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.uryvek { font-size: 14px; color: var(--tx3); background: var(--bg); border-radius: 10px; padding: 10px 12px; line-height: 1.4; }
.cara { border-top: 1px solid var(--linka); margin: 2px 0; }

/* výzva k potvrzení opravy */
.potvrzeni { border-radius: var(--r); background: var(--zelena); color: #fff; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.potvrzeni .hlava { display: flex; gap: 12px; align-items: center; }
.potvrzeni .kruh { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--zelena); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.potvrzeni .btn { flex: 1 1 0; }
.potvrzeni .btn.bila { color: var(--zelena-tx); }
.potvrzeni .btn.obrys { background: transparent; box-shadow: inset 0 0 0 2px rgba(255,255,255,.8); color: #fff; }
.potvrzeni .vstup { color: var(--tx); }
.potvrzeni label.pole > span { color: #fff; }

/* bezpečnost ve frontě */
.bezp-blok { border-radius: var(--r); background: var(--kat-bezp); color: #fff; padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.bezp-blok .hlava { display: flex; align-items: center; gap: 8px; padding: 8px 12px 6px; font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.bezp-blok .hlava .ico { width: 18px; height: 18px; }
.bezp-blok .karta { box-shadow: none; border-radius: 11px; }

/* souhrnná čísla ve frontě */
.souhrn { display: flex; gap: 8px; }
.souhrn > div { flex: 1; border-radius: 12px; background: var(--karta); box-shadow: 0 0 0 1px var(--linka); padding: 10px 12px; display: flex; flex-direction: column; }
.souhrn b { font-size: 26px; font-weight: 800; line-height: 1.1; }
.souhrn span { font-size: 13px; font-weight: 600; color: var(--tx2); }
.souhrn .cervene { background: var(--cervena-bg); box-shadow: none; color: var(--cervena-tx); }
.souhrn .cervene span { color: var(--cervena-tx); }

/* přepínač (segment) */
.segment { display: inline-flex; background: #EAE6E0; border-radius: 14px; padding: 4px; gap: 4px; }
.segment.cely { display: flex; }
.segment.cely button { flex: 1; }
.segment button { min-height: 44px; border: 0; background: none; border-radius: 11px; padding: 0 16px; font-size: 15px; font-weight: 600; color: #4A4640; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; }
.segment button .ico { width: 18px; height: 18px; }
.segment button[aria-selected="true"], .segment button[aria-pressed="true"] { background: var(--karta); color: var(--tx); font-weight: 800; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* časová osa (krokovník) */
.osa { display: flex; flex-direction: column; }
.osa .bod { display: flex; gap: 14px; }
.osa .znacka { display: flex; flex-direction: column; align-items: center; width: 34px; flex-shrink: 0; }
.osa .kolecko { width: 34px; height: 34px; border-radius: 50%; background: var(--s, var(--tx2)); color: #fff; display: flex; align-items: center; justify-content: center; }
.osa .kolecko .ico { width: 17px; height: 17px; stroke-width: 2.4; }
.osa .bod.posledni .kolecko { box-shadow: 0 0 0 5px var(--s-tint, var(--bg)); }
.osa .bod.budouci .kolecko { background: #ECEAE7; color: #8A847C; }
.osa .spoj { flex: 1; width: 3px; min-height: 14px; background: var(--ramec); border-radius: 2px; margin: 4px 0; }
.osa .bod:last-child .spoj { display: none; }
.osa .text { flex: 1; display: flex; flex-direction: column; gap: 3px; padding-bottom: 14px; font-size: 15px; min-width: 0; }

/* tlačítka stavů pro řešitele */
.stavy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stav-btn { min-height: 80px; border: 0; border-radius: var(--r); background: var(--s-tint); color: var(--s-ink); font-size: 17px; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 6px; }
.stav-btn .ico { width: 26px; height: 26px; stroke-width: 2.4; }
.stav-btn[aria-pressed="true"] { background: var(--s); color: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--s); }
.stav-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--akcent) 45%, transparent); outline-offset: 4px; }

.hlaska { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--tx); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.hlaska.chyba { background: var(--cervena-tx); }

/* přehled vedení */
.cisla { display: flex; flex-wrap: wrap; gap: 16px; }
.cislo { flex: 1 1 180px; background: var(--karta); box-shadow: 0 0 0 1px var(--linka); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.cislo .popis { font-size: 15px; font-weight: 700; color: #4A4640; display: flex; align-items: center; gap: 6px; }
.cislo .popis .ico { width: 18px; height: 18px; }
.cislo > b { font-size: 44px; font-weight: 800; line-height: 1; }
.cislo.cervene { background: var(--cervena-bg); box-shadow: none; color: var(--cervena-tx); }
.cislo.cervene .popis { color: var(--cervena-tx); }
.cislo.zelene { background: var(--zelena-bg); box-shadow: none; color: var(--zelena-tx); }
.cislo.zelene .popis { color: var(--zelena-tx); }
.cislo.druhy { flex: 2 1 340px; gap: 12px; }
.pruh { display: flex; height: 16px; border-radius: 8px; overflow: hidden; gap: 2px; background: #F1EEEA; }
.pruh span { background: var(--d); }
.legenda { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.legenda > span { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--tx3); }
.dva-sloupce { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.dva-sloupce > .hlavni { flex: 999 1 600px; min-width: 0; }
.dva-sloupce > .bok { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.tabulka-box { overflow-x: auto; }
table.tab { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; }
table.tab th { text-align: left; color: var(--tx2); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 10px 10px; border-bottom: 1px solid var(--linka); border-top: 1px solid var(--linka); }
table.tab td { padding: 12px 10px; border-bottom: 1px solid var(--linka); vertical-align: middle; }
table.tab th:first-child, table.tab td:first-child { padding-left: 20px; }
table.tab th:last-child, table.tab td:last-child { padding-right: 20px; }
table.tab tr.klik { cursor: pointer; }
table.tab tr.klik:hover td { background: #FAF9F7; }
table.tab tr.bezp td { background: #FFF5F4; }
.zavada-bunka { display: flex; align-items: center; gap: 12px; }
.filtry { display: flex; flex-wrap: wrap; gap: 6px; }
.filtr { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 2px var(--ramec); background: var(--karta); font-size: 15px; font-weight: 600; cursor: pointer; }
.filtr[aria-pressed="true"] { background: var(--akcent-tx); color: #fff; box-shadow: none; font-weight: 800; }
.bok-karta { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.bok-karta h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.bok-karta.vedeni { box-shadow: inset 0 4px 0 var(--stav-vedeni), 0 0 0 1px var(--linka); }
.bok-karta.vedeni h2 .ico { color: var(--stav-vedeni); }
.ceka { border-radius: 12px; background: var(--stav-vedeni-tint); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--tx); }
.ceka .male { color: #5B1530; }
.opak { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--linka); }
.opak:first-of-type { border-top: 0; }

/* lidé: úpravy přímo v řádku */
.resitele { display: flex; flex-wrap: wrap; gap: 12px; }
.resitele > div { flex: 1 1 260px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #F1EEEA; color: var(--tx3); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.avatar.vedeni { background: var(--akcent-svetly); color: var(--akcent-tx); }
.l-radek, .l-hlavicka { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(180px, 1.4fr) 290px minmax(260px, 2.4fr) 44px; gap: 8px; align-items: center; padding: 6px 20px; }
.l-radek { border-top: 1px solid var(--linka); min-height: 64px; }
.l-hlavicka { color: var(--tx2); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding-top: 10px; padding-bottom: 10px; border-top: 1px solid var(--linka); }
.l-jmeno { display: flex; align-items: center; gap: 10px; }
.role { display: inline-flex; background: #F1EEEA; border-radius: 10px; padding: 3px; gap: 2px; }
.role button { min-height: 38px; border: 0; background: none; border-radius: 8px; padding: 0 10px; font-size: 14px; font-weight: 600; color: #4A4640; cursor: pointer; }
.role button[aria-checked="true"] { background: var(--karta); color: var(--tx); font-weight: 800; box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.druhy-vyber { display: flex; flex-wrap: wrap; gap: 6px; }
.druhy-vyber button { min-height: 36px; border: 0; border-radius: 8px; padding: 0 10px 0 7px; display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; cursor: pointer; background: var(--karta); color: #6F6A62; box-shadow: inset 0 0 0 1.5px #D9D2C8; }
.druhy-vyber button .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.druhy-vyber button[aria-pressed="true"] { background: var(--d-tint); color: var(--d-ink); box-shadow: none; }
.druhy-vyber button.d-bezp[aria-pressed="true"] { background: var(--kat-bezp); color: #fff; }

/* správa budov, pater a místností — buňky jako v Excelu, ukládá se po opuštění pole */
.bunka { min-height: 40px; border: 2px solid transparent; border-radius: 8px; padding: 6px 8px; background: transparent; font-size: 15px; width: 100%; min-width: 0; }
.bunka:hover { border-color: var(--linka); background: #FAF9F7; }
.bunka:focus { border-color: var(--akcent); background: #fff; outline: none; }
select.bunka { color: var(--tx2); }
.nadpis-bunka { font-size: 20px; font-weight: 800; flex: 1 1 auto; }
.patro-bunka { font-weight: 800; color: var(--tx); max-width: 240px; }
.ibtn { width: 44px; height: 44px; border: 0; background: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--tx2); cursor: pointer; flex-shrink: 0; }
.ibtn:hover { background: var(--cervena-bg); color: var(--cervena-tx); }
.ibtn .ico { width: 18px; height: 18px; }
.ibtn.prepinac { width: 36px; margin-left: -8px; color: var(--akcent-tx); }
.ibtn.prepinac:hover { background: var(--akcent-svetly); color: var(--akcent-tx); }
.ibtn.prepinac .ico { width: 20px; height: 20px; transition: transform .15s; }

/* Místnosti: vlevo přehled budov a pater, vpravo seznam nebo náhled štítků */
.mist { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; }
.mist-bok { position: sticky; top: 136px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 150px); overflow-y: auto; padding: 2px; }
.mist-hlavni { gap: 16px; min-width: 0; }
.mist-souhrn-karta { border-radius: var(--r); background: var(--akcent); color: #fff; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.mist-souhrn-karta h2 { font-size: 18px; font-weight: 800; }
.mist-souhrn { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mist-souhrn div { display: flex; flex-direction: column; background: rgba(255,255,255,.18); border-radius: 12px; padding: 10px; }
.mist-souhrn b { font-size: 26px; line-height: 1.1; }
.mist-souhrn span { font-size: 13px; font-weight: 600; }
.mist-strom { display: flex; flex-direction: column; gap: 2px; }
.mist-strom button { border: 0; background: none; text-align: left; cursor: pointer; border-radius: 10px; font-size: 15px; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.mist-strom button:hover { background: var(--akcent-svetly); color: var(--akcent-tx); }
.strom-b { font-weight: 800; padding: 0 10px; font-size: 16px !important; }
.strom-b .ico { width: 20px; height: 20px; }
.strom-p { padding: 0 10px 0 40px; color: var(--tx3); justify-content: space-between; }
.strom-pocet { font-size: 13px; color: var(--tx2); display: inline-flex; align-items: center; gap: 8px; }
.tecka { width: 10px; height: 10px; border-radius: 5px; background: var(--stav-resi); display: inline-block; }
.tecka.prazdna { background: transparent; box-shadow: inset 0 0 0 2px #D9D2C8; }
.mist-nastroje { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hledat { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; min-height: 48px; border: 2px solid var(--ramec); border-radius: 12px; background: var(--karta); padding: 0 12px; color: var(--tx2); }
.hledat:focus-within { border-color: var(--akcent); }
label.pole > .hledat { flex: none; }
.hledat .ico { width: 20px; height: 20px; }
.hledat input { border: 0; outline: none; background: none; flex: 1; min-width: 0; font-size: 16px; color: var(--tx); }
.vyber-lista { display: flex; align-items: center; gap: 12px; background: var(--akcent-svetly); color: var(--akcent-tx); border-radius: 12px; padding: 2px 6px 2px 14px; font-size: 15px; }
.jen-mobil { display: none; }
.archy.jen-tisk { display: none; }

.budova { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; scroll-margin-top: 140px; }
.budova-hlava { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: #FBFAF8; border-bottom: 1px solid var(--linka); }
.budova-ik { width: 44px; height: 44px; border-radius: 12px; background: var(--akcent-svetly); color: var(--akcent-tx); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.patro { display: flex; flex-direction: column; gap: 0; padding: 10px 20px 10px; border-top: 1px solid var(--linka); scroll-margin-top: 140px; }
.budova-hlava + .patro { border-top: 0; }
.patro-hlava { display: flex; align-items: center; gap: 8px; }
.pocet-chip { font-size: 13px; font-weight: 600; color: var(--tx2); background: var(--bg); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.patro-prazdne { padding: 6px 0 4px 36px; }
.pridani { gap: 8px; margin: 8px 0 4px 36px; max-width: 600px; border-radius: 12px; background: var(--akcent-svetly); padding: 14px; }
.m-radek, .m-hlavicka { display: grid; grid-template-columns: 28px minmax(0, 1.2fr) minmax(0, 1.2fr) 130px 150px 44px; gap: 8px; align-items: center; padding: 0 0 0 8px; border-radius: 10px; }
.m-hlavicka { padding-top: 6px; padding-bottom: 2px; }
.m-hlavicka span { padding-left: 9px; }
.m-radek { border-top: 1px solid #F0ECE6; min-height: 56px; }
.m-radek:hover { background: #FBFAF8; }
.m-radek.vybrany { background: var(--akcent-svetly); }
.m-zavady { padding-left: 9px; }
.m-zavady .stitek { height: 26px; font-size: 13px; }
.zaskrt { width: 20px; height: 20px; accent-color: var(--akcent); cursor: pointer; margin: 0; }
select.bunka.presun { color: var(--tx3); font-size: 14px; cursor: pointer; background: #F1EEEA; }
select.bunka.presun:hover { color: var(--tx); }

@media (max-width: 980px) {
  .mist { grid-template-columns: minmax(0, 1fr); }
  .mist-bok { display: none; }
  .jen-mobil { display: inline-flex; }
}
@media (max-width: 640px) {
  .budova-hlava { padding: 12px; }
  .patro { padding: 8px 12px; }
  .budova-hlava, .patro-hlava { flex-wrap: wrap; gap: 4px 8px; }
  .budova-hlava .nadpis-bunka { flex: 1 1 160px; }
  .patro-hlava .patro-bunka { flex: 1 1 120px; max-width: none; }
  .m-radek { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 2px 6px; padding: 4px 0 6px 6px; }
  .m-radek [data-pole="nazev"] { grid-column: 2 / 4; }
  .m-radek [data-odebrat] { grid-column: 4; grid-row: 1; }
  .m-radek [data-pole="vyucujici"] { grid-column: 2 / -1; border-color: var(--linka); }
  .m-radek .m-zavady { grid-column: 2; padding-left: 9px; }
  .m-radek .presun { grid-column: 3 / -1; }
  .m-hlavicka span { display: none; }
  .m-hlavicka { grid-template-columns: 28px 1fr; }
  .patro-prazdne, .pridani { margin-left: 0; padding-left: 14px; }
  .segment button { padding: 0 10px; }
  .souhrn b { font-size: 22px; }
  .cisla { gap: 10px; }
  .cislo { flex: 1 1 140px; padding: 14px; }
  .cislo > b { font-size: 36px; }
  .cislo.druhy { flex-basis: 100%; }
}

/* QR štítky, tisk na A4: čitelné i černobíle, pruh v barvě školy */
.archy { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.arch { width: 210mm; height: 297mm; background: #fff; padding: 10.5mm; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, 1fr); box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.stitek-qr { border: 1px dashed #8A847C; display: flex; flex-direction: column; overflow: hidden; color: #1F1D1A; }
.stitek-qr .pas { height: 3mm; background: var(--akcent); flex-shrink: 0; }
.stitek-qr .telo { flex: 1; padding: 3.5mm 4.5mm 0; display: flex; gap: 4mm; min-height: 0; }
.stitek-qr .kod { width: 34mm; height: 34mm; flex-shrink: 0; }
.stitek-qr .kod svg { width: 100%; height: 100%; display: block; }
.stitek-qr .skola { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; }
.stitek-qr .skola i { width: 20px; height: 20px; border-radius: 5px; background: var(--akcent); color: #fff; font-style: normal; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stitek-qr .nazev { font-size: 26px; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; margin-top: 2px; }
.stitek-qr .nazev.dlouhy { font-size: 20px; }
.stitek-qr .kde { font-size: 12.5px; line-height: 1.3; }
.stitek-qr .pata { margin: 0 4.5mm 3.5mm; padding-top: 2.5mm; border-top: 2px solid #1F1D1A; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.stitek-qr .vyzva { font-size: 13px; line-height: 1.3; font-weight: 700; }
.stitek-qr .vyzva span { font-weight: 500; }
.stitek-qr .kod-mistnosti { font-size: 13px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; border: 2px solid #1F1D1A; border-radius: 6px; padding: 1px 6px; }
@media screen and (max-width: 860px) { .arch { width: 100%; height: auto; grid-template-columns: 1fr; grid-template-rows: none; padding: 0; } .stitek-qr { min-height: 200px; } }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .hlavicka, .lista, .netisk, #hlaska { display: none !important; }
  .obsah { padding: 0; max-width: none; gap: 0; }
  .mist { display: block; }
  .archy.jen-tisk { display: flex; }
  .archy { gap: 0; }
  .arch { box-shadow: none; break-after: page; }
  .stitek-qr .skola i, .stitek-qr .pas { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* lišta „Pracovní listy na papír“ ve frontě */
.tisk-lista { flex-wrap: wrap; gap: 10px 12px; padding: 12px 16px; }
.tisk-lista > .ico { width: 22px; height: 22px; color: var(--akcent-tx); }
.tisk-lista select.vstup { width: auto; min-width: 180px; flex: 0 1 220px; }

/* Pracovní list A4 (tisk.js): školník bez telefonu dostane závadu na papíře, vedení odškrtne převzetí.
   Na obrazovce se nezobrazuje, jen se připraví mimo plochu a hned tiskne. */
#pracovni-listy { position: fixed; left: -10000px; top: 0; }
.pl-strana { width: 210mm; height: 297mm; padding: 13mm 14mm 10mm; background: #fff; color: #1F1D1A; display: flex; flex-direction: column; gap: 4.2mm; overflow: hidden; font: 10.5pt/1.4 Figtree, system-ui, sans-serif; break-after: page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pl-strana .ico { width: 1.15em; height: 1.15em; flex: none; }
.pl-hlava { display: flex; align-items: flex-end; justify-content: space-between; gap: 6mm; padding-bottom: 3.5mm; border-bottom: 1.2mm solid var(--akcent); }
.pl-skola { font-size: 10pt; font-weight: 700; color: var(--akcent-tx); text-transform: uppercase; letter-spacing: .06em; }
.pl-hlava h1 { margin: .5mm 0 0; font-size: 25pt; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.pl-cislo { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.pl-cislo small { font-size: 8.5pt; font-weight: 700; color: #5F5A53; text-transform: uppercase; letter-spacing: .06em; }
.pl-cislo b { font-size: 25pt; font-weight: 800; }
.pl-pruh { display: flex; align-items: center; justify-content: space-between; gap: 4mm; font-size: 9.5pt; color: #5F5A53; font-weight: 600; }
.pl-druh { display: inline-flex; align-items: center; gap: 1.6mm; padding: 1.2mm 3mm; border-radius: 1.6mm; background: var(--d-tint); color: var(--d-ink); font-weight: 800; font-size: 10pt; }
.pl-bezp { display: flex; gap: 2.5mm; align-items: flex-start; padding: 2.8mm 3.5mm; border-radius: 2mm; background: var(--cervena-bg); color: var(--cervena-tx); border: .5mm solid var(--cervena); font-size: 10.5pt; }
.pl-bezp .ico { width: 5mm; height: 5mm; margin-top: .2mm; }
.pl-stitek { display: flex; align-items: center; gap: 1.4mm; font-size: 8.5pt; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #5F5A53; }
.pl-kde { padding: 3.2mm 4mm; border-radius: 2.4mm; background: var(--akcent-svetly); display: flex; flex-direction: column; gap: .8mm; }
.pl-mistnost { font-size: 20pt; font-weight: 800; line-height: 1.1; }
.pl-umisteni { font-size: 11pt; font-weight: 600; color: #3D3A36; }
.pl-co { flex: none; display: flex; gap: 5mm; }
.pl-co > .sloupec { flex: 1; }
.pl-popis { margin: 0; font-size: 15pt; font-weight: 700; line-height: 1.3; }
.pl-kdo { font-size: 10pt; color: #3D3A36; }
.pl-poznamka { font-size: 10pt; padding: 2mm 3mm; border-left: .9mm solid var(--ramec); background: #F6F5F3; }
.pl-co figure { margin: 0; flex: 0 0 62mm; display: flex; flex-direction: column; gap: 1.2mm; min-height: 0; }
.pl-co img { width: 62mm; max-height: 68mm; object-fit: cover; border-radius: 2mm; border: .3mm solid #E0D9CF; }
.pl-co figcaption { font-size: 8pt; color: #5F5A53; }
.pl-ram { border: .45mm solid #1F1D1A; border-radius: 2.4mm; padding: 3.5mm 4.5mm 4mm; display: flex; flex-direction: column; gap: 3mm; break-inside: avoid; }
.pl-ram h2 { margin: 0; display: flex; align-items: center; gap: 2.2mm; font-size: 13pt; font-weight: 800; }
.pl-ram h2 small { margin-left: auto; font-size: 9pt; font-weight: 600; color: #5F5A53; }
.pl-krok { width: 6mm; height: 6mm; border-radius: 50%; background: #1F1D1A; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 10pt; font-weight: 800; }
.pl-volby { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.pl-volby.dve { grid-template-columns: repeat(2, 1fr); }
.pl-volba { display: flex; gap: 2.2mm; align-items: flex-start; font-size: 10.5pt; line-height: 1.25; }
.pl-volba small { display: block; font-size: 8.5pt; color: #5F5A53; font-weight: 500; margin-top: .4mm; }
.pl-box { width: 5.2mm; height: 5.2mm; flex: none; border: .45mm solid #1F1D1A; border-radius: .9mm; background: #fff; }
.pl-podnadpis { font-size: 9pt; font-weight: 700; color: #3D3A36; margin-bottom: -1mm; }
/* řádky na psaní zaberou, co na stránce zbude (bez fotky víc) */
.pl-zaznam { flex: 1 1 auto; min-height: 0; }
.pl-linky { flex: 1 1 auto; min-height: 32mm; background: linear-gradient(to top, #A8A196 .3mm, transparent .3mm) 0 0 / 100% 8mm repeat-y; }
.pl-radek { display: flex; gap: 6mm; margin-top: 1mm; }
.pl-pole { display: flex; flex-direction: column; gap: .8mm; }
.pl-pole span { height: 8.5mm; border-bottom: .3mm solid #1F1D1A; }
.pl-pole small { font-size: 8pt; font-weight: 600; color: #5F5A53; text-transform: uppercase; letter-spacing: .05em; }
.pl-vedeni { flex-direction: row; gap: 6mm; align-items: stretch; background: #FAF9F7; }
.pl-qr { flex: 0 0 31mm; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5mm; text-align: center; padding-left: 5mm; border-left: .25mm dashed #A8A196; }
.pl-qr svg { width: 27mm; height: 27mm; }
.pl-qr small { font-size: 7.5pt; color: #5F5A53; font-weight: 600; line-height: 1.2; }
.pl-pata { display: flex; justify-content: space-between; font-size: 8pt; color: #8A847B; border-top: .25mm solid #E0D9CF; padding-top: 2mm; margin-top: auto; }

@media print {
  body.tisk-listy > :not(#pracovni-listy) { display: none !important; }
  body.tisk-listy #pracovni-listy { position: static; }
  body.tisk-listy .pl-strana:last-child { break-after: auto; }
}
