/* Ave Lišta web (app.avegroup.cz), styl jako avegroup.cz: černobílý, Inter, světlý i tmavý */
:root {
  --bg: #ffffff; --bg-2: #f6f6f6; --bg-3: #ececec; --card: #ffffff;
  --fg: #111111; --fg-2: #555555; --fg-3: #8a8a8a; --line: #e6e6e6;
  --inv-bg: #111111; --inv-fg: #ededed; --danger: #c0392b; --ok: #1f8a4c;
  --side: 232px; --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0b; --bg-2: #141414; --bg-3: #1f1f1f; --card: #121212;
    --fg: #ededed; --fg-2: #a8a8a8; --fg-3: #6f6f6f; --line: #242424;
    --inv-bg: #ededed; --inv-fg: #111111; --danger: #ff6b5b; --ok: #4cc27f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0b; --bg-2: #141414; --bg-3: #1f1f1f; --card: #121212;
  --fg: #ededed; --fg-2: #a8a8a8; --fg-3: #6f6f6f; --line: #242424;
  --inv-bg: #ededed; --inv-fg: #111111; --danger: #ff6b5b; --ok: #4cc27f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
svg { display: block; }

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.01em; text-decoration: none; font-size: 16px; }
.logo-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--inv-bg); color: var(--inv-fg); display: grid; place-items: center; flex: none; }

/* Tlačítka a pole */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: opacity .15s, background .15s;
}
.btn:hover { background: var(--bg-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-main { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.btn-main:hover { background: var(--inv-bg); opacity: .88; }
.btn-full { width: 100%; height: 46px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--fg-2); cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--fg); }
.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); outline: none; font-size: 15px;
}
.input:focus { border-color: var(--fg-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 8%, transparent); }
select.input { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; cursor: pointer; }
.chyba { color: var(--danger); font-size: 14px; min-height: 20px; margin: 10px 0 0; }

/* Přihlášení */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login-box { width: 100%; max-width: 380px; }
.login-box .logo { justify-content: center; margin-bottom: 40px; }
.login h1 { font-size: 28px; letter-spacing: -0.025em; font-weight: 600; text-align: center; margin: 0 0 8px; }
.login p.pod { text-align: center; color: var(--fg-2); margin: 0 0 28px; }
.login form { display: grid; gap: 12px; }
.kod { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.kod input { height: 56px; text-align: center; font-size: 22px; font-weight: 600; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--card); outline: none; min-width: 0; }
.kod input:focus { border-color: var(--fg-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 8%, transparent); }
.login-odkazy { display: flex; justify-content: center; gap: 22px; margin-top: 18px; }

/* Rozvržení */
.shell { display: flex; min-height: 100%; }
.side {
  width: var(--side); flex: none; border-right: 1px solid var(--line); padding: 18px 12px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; background: var(--bg);
}
.side .logo { padding: 4px 10px; }
.org-nazev { padding: 0 10px; font-size: 13px; color: var(--fg-3); margin-top: -12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--fg-2); font-weight: 500; font-size: 14.5px; }
.nav a:hover { background: var(--bg-2); color: var(--fg); }
.nav a[aria-current] { background: var(--bg-3); color: var(--fg); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-spodek { margin-top: auto; padding: 0 10px; font-size: 13px; color: var(--fg-3); }
.main { flex: 1; min-width: 0; }
.obsah { max-width: 1040px; margin: 0 auto; padding: 32px 40px 80px; }
.hlava { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
h1.nadpis { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; margin: 0; }
.pocet { color: var(--fg-3); font-weight: 500; font-size: 15px; margin-left: 8px; letter-spacing: 0; }
.tabbar { display: none; }

/* Filtry */
.filtry { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; height: 32px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--fg-2); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.filtry .input { height: 38px; width: auto; font-size: 14px; }
.hledat { flex: 1; min-width: 200px; position: relative; }
.hledat .input { width: 100%; padding-left: 36px; }
.hledat svg { position: absolute; left: 12px; top: 11px; color: var(--fg-3); }

/* Seznam nahrávek */
.seznam { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.radek { display: flex; gap: 14px; padding: 14px 16px; text-decoration: none; border-top: 1px solid var(--line); align-items: flex-start; }
.radek:first-child { border-top: 0; }
.radek:hover { background: var(--bg-2); }
.ikona { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-2); display: grid; place-items: center; flex: none; color: var(--fg-2); }
.radek-telo { min-width: 0; flex: 1; }
.radek-nazev { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radek-meta { color: var(--fg-3); font-size: 13px; margin-top: 1px; }
.radek-kratce { color: var(--fg-2); font-size: 13.5px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.prazdno { padding: 48px 16px; text-align: center; color: var(--fg-3); }
.vic { display: flex; justify-content: center; margin-top: 16px; }

/* Detail */
.zpet { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); text-decoration: none; font-size: 14px; margin-bottom: 16px; }
.zpet:hover { color: var(--fg); }
.detail-nazev { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 6px; line-height: 1.2; }
.detail-meta { color: var(--fg-3); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.prehravac { margin: 22px 0 6px; }
.prehravac audio { width: 100%; }
.prehravac video { width: 100%; max-height: 62vh; border-radius: var(--r); background: #000; }
.akce { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.zalozky { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 26px 0 20px; }
.zalozky button { border: 0; background: none; padding: 10px 0; font-weight: 600; font-size: 14.5px; color: var(--fg-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.zalozky button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.shrnuti-text { font-size: 15.5px; line-height: 1.6; margin: 0 0 18px; max-width: 72ch; }
.karty { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.karta { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; background: var(--card); }
.karta h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); font-weight: 600; }
.karta ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.prepis { white-space: pre-wrap; font-size: 14.5px; line-height: 1.7; color: var(--fg-2); max-width: 78ch; }

/* Úkoly */
.clovek { margin-bottom: 26px; }
.clovek-hlava { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--inv-bg); color: var(--inv-fg); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.clovek-hlava b { font-size: 16px; }
.clovek-hlava span { color: var(--fg-3); font-size: 13.5px; }
.ukol-nahravka { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; margin-bottom: 10px; background: var(--card); }
.ukol-nahravka a { font-weight: 600; text-decoration: none; }
.ukol-nahravka a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ukol-nahravka .radek-meta { margin-bottom: 8px; }
.ukol-nahravka ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }

/* Organizace a účet */
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin-bottom: 18px; }
.panel-hlava { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-hlava h2 { margin: 0; font-size: 16px; font-weight: 600; }
.panel-telo { padding: 18px 20px; }
.stitek { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.clen { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.clen:first-child { border-top: 0; }
.clen-telo { flex: 1; min-width: 0; }
.clen-telo b { display: block; font-weight: 600; font-size: 14.5px; }
.clen-telo span { color: var(--fg-3); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clen select.input { width: 120px; height: 34px; font-size: 13.5px; }
.clen .role { color: var(--fg-2); font-size: 13.5px; }
.x { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--fg-3); cursor: pointer; display: grid; place-items: center; flex: none; }
.x:hover { background: var(--bg-2); color: var(--danger); }
.pridat { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); }
.pridat .input { height: 40px; }
.radek-udaj { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.radek-udaj:first-child { border-top: 0; padding-top: 0; }
.radek-udaj span { color: var(--fg-3); }
.radek-udaj b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* Člen bez přístupu */
.stop { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; text-align: center; }
.stop h1 { font-size: 24px; letter-spacing: -0.02em; font-weight: 600; margin: 28px 0 24px; }
.stop .akce { justify-content: center; }

/* Hláška */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--inv-bg); color: var(--inv-fg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: .2s; z-index: 50; max-width: calc(100% - 32px); }
#toast.vidim { opacity: 1; transform: translate(-50%, 0); }
.nacitani { padding: 60px 0; text-align: center; color: var(--fg-3); }

/* Telefon */
@media (max-width: 760px) {
  .side { display: none; }
  .obsah { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .mobil-hlava { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0; }
  h1.nadpis { font-size: 24px; }
  .detail-nazev { font-size: 22px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--fg-3); text-decoration: none; padding: 4px 0; }
  .tabbar a[aria-current] { color: var(--fg); }
  .tabbar svg { width: 22px; height: 22px; }
  .filtry .seg { width: 100%; }
  .filtry .seg button { flex: 1; }
  .filtry select.input { flex: 1; }
  .hledat { min-width: 100%; order: -1; }
  .radek { padding: 12px 14px; }
  .clen { padding: 12px 14px; flex-wrap: wrap; }
  .clen-telo { flex-basis: calc(100% - 50px); }
  .clen select.input { margin-left: 42px; }
  .pridat { flex-direction: column; padding: 14px; }
  .panel-hlava, .panel-telo { padding: 16px 14px; }
  .karty { grid-template-columns: 1fr; }
}
@media (min-width: 761px) { .mobil-hlava { display: none; } }

#app { min-height: 100%; height: 100%; }
.stop .logo { justify-content: center; }
.login { align-items: start; padding-top: 12vh; }
.stop { align-items: start; padding-top: 18vh; }

/* přepínač organizace (víc organizací, 24. 10. 2026) */
.org-prep { position: relative; overflow: visible; }
.side .org-prep { padding: 0 4px; }
.org-tl { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.org-tl:hover { background: var(--bg-3); }
.org-tl .org-jmeno { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-sipka { display: inline-flex; color: var(--fg-3); flex: none; }
.org-menu { position: absolute; z-index: 50; top: 36px; left: 4px; min-width: 240px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.org-mobil .org-menu { left: auto; right: 0; }
.org-polozka { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.org-polozka:hover, .org-polozka:focus-visible { background: var(--bg-3); outline: none; }
.org-polozka .org-jmeno { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-check { display: inline-flex; width: 14px; visibility: hidden; }
.org-polozka[aria-checked="true"] .org-check { visibility: visible; }
.org-role { font-size: 12px; color: var(--fg-3); }
.org-mobil { position: relative; min-width: 0; }
.org-mobil .org-tl { max-width: 52vw; }

/* Právě probíhá (24. 10. 2026) */
:root { --live: #e5484d; }
.nav-ikona { position: relative; display: inline-flex; }
.odznak { position: absolute; top: -6px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--live); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.odznak[hidden] { display: none; }
.zive-nazev { font-weight: 400; color: var(--fg-2); margin-left: 8px; }
.zive-radek { align-items: center; }
.zive-cas { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; flex: none; }
.zive-tecka { width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; animation: zive-puls 1.6s ease-in-out infinite; }
@keyframes zive-puls { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .zive-tecka { animation: none; } }
.zive-skoncilo { margin-top: 28px; }
.zive-skoncilo h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); font-weight: 600; margin: 0 0 10px; }
.zive-konec { padding: 10px 16px; align-items: center; }
.zive-konec .radek-nazev { font-size: 14px; font-weight: 500; }
.zive-stav { color: var(--fg-3); font-size: 13px; flex: none; }
.zive-hlava { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 16px 0 14px; margin: -12px 0 18px; border-bottom: 1px solid var(--line); }
.zive-hlava .detail-meta { font-variant-numeric: tabular-nums; }
.zive-ted { display: inline-flex; align-items: center; gap: 7px; color: var(--live); font-weight: 600; }
.zive-zprac { color: var(--fg-3); font-size: 14px; align-self: center; }
.zive-prepis { display: grid; gap: 6px; white-space: normal; }
.zive-t { color: var(--fg-3); font-variant-numeric: tabular-nums; }
.prazdno-prepis { color: var(--fg-3); }
@media (max-width: 760px) {
  .tabbar { grid-template-columns: repeat(5, 1fr); }
  .zive-nazev { display: block; margin-left: 0; font-size: 13px; }
  .zive-radek .radek-nazev, .zive-konec .radek-nazev { white-space: normal; }
}
