@charset "utf-8";
/* App shell: sidebar (240 → 56 px rail), top bar, ⌘K palette, mobile bottom bar. */

.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; transition: grid-template-columns .22s var(--easing); }
html.sbaleny .shell { grid-template-columns: var(--sb-w-sbaleny) minmax(0, 1fr); }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-width: 0; background: var(--panel); border-right: 1px solid var(--line); z-index: 60; }
.sb-hlava { display: flex; align-items: center; gap: 6px; height: var(--tb-h); padding: 0 10px 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.sb-logo { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.sb-logo:hover { color: var(--text); }
.sb-znak { width: 38px; height: 26px; flex: none; object-fit: contain; }
html.sbaleny .sb-znak { width: 34px; height: 24px; }
.sb-nazev { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.sb-nazev strong { font-weight: 600; font-size: 13px; letter-spacing: -.01em; }
.sb-nazev small { font-size: var(--fs-xs); color: var(--text-3); }
.sb-zavrit { display: none; }

.sb-hledat {
  display: flex; align-items: center; gap: 8px; height: 32px; margin: 10px 10px 4px; padding: 0 6px 0 10px;
  border: 0; border-radius: var(--r); background: var(--field); color: var(--text-3);
  font: var(--fs) var(--font); cursor: pointer; flex: none; transition: background .15s;
}
.sb-hledat:hover { background: color-mix(in srgb, var(--field), var(--text) 3%); color: var(--text-2); }
.sb-hledat .ikona { font-size: 16px; }
.kbd { margin-left: auto; font: 500 10px/1 var(--font); color: var(--text-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; background: var(--panel); white-space: nowrap; }

.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 8px 12px; }
.nav-sekce + .nav-sekce { margin-top: 14px; }
.nav-titul { padding: 4px 8px 6px; font-size: 10.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; }
.nav-seznam { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.nav-odkaz {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 8px;
  border: 0; background: none; border-radius: var(--r-sm); color: var(--text-2);
  font: 400 var(--fs) var(--font); cursor: pointer; text-align: left; text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-odkaz:hover { background: var(--hover); color: var(--text); }
.nav-odkaz.aktivni { background: var(--accent-soft); color: var(--accent-text); font-weight: 500; }
.nav-odkaz.aktivni .ikona { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
.nav-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-pocet { flex: none; min-width: 18px; height: 16px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.sb-pata { border-top: 1px solid var(--line); padding: 6px 8px; flex: none; }

/* Collapsed rail */
html.sbaleny .sb-nazev, html.sbaleny .nav-text, html.sbaleny .nav-titul, html.sbaleny .sb-hledat span:not(.ikona), html.sbaleny .sb-hledat .kbd { display: none; }
html.sbaleny .sb-hlava { padding: 0; justify-content: center; }
html.sbaleny .sb-logo { flex: none; }
html.sbaleny .sb-hledat { justify-content: center; padding: 0; margin: 10px 8px 4px; }
html.sbaleny .nav-odkaz { justify-content: center; padding: 0; }
html.sbaleny .nav-sekce + .nav-sekce { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
html.sbaleny .nav-pocet { position: absolute; top: 4px; right: 8px; min-width: 0; width: 7px; height: 7px; padding: 0; font-size: 0; box-shadow: 0 0 0 2px var(--panel); }
html.sbaleny .sb-sbalit .ikona { transform: scaleX(-1); }

/* ---------- Main + top bar ---------- */
.hlavni { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--tb-h); display: flex; align-items: center; gap: 12px; padding: 0 16px 0 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(14px); backdrop-filter: saturate(1.8) blur(14px);
  border-bottom: 1px solid var(--line);
}
.tb-menu, .tb-hledat { display: none; }
.drobky { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; font-size: var(--fs); color: var(--text-3); white-space: nowrap; overflow: hidden; }
.drobky a { color: var(--text-2); padding: 4px 6px; border-radius: var(--r-sm); }
.drobky a:hover { background: var(--hover); color: var(--text); }
.drobky .ikona { font-size: 16px; color: var(--text-3); }
.drobky-aktivni { color: var(--text); font-weight: 500; padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; }
.tb-akce { display: flex; align-items: center; gap: 6px; flex: none; }

.uzivatel { position: relative; }
.uzivatel > summary { list-style: none; cursor: pointer; border-radius: 50%; }
.uzivatel > summary::-webkit-details-marker { display: none; }
.uzivatel > summary .avatar { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
.uzivatel-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 1500; animation: pop .14s var(--easing); }

.obsah { flex: 1; min-width: 0; }
.spodni-lista, .zaves { display: none; }

/* ---------- Command palette ---------- */
.paleta-zaves {
  position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 12px 12px; background: rgba(12, 12, 18, .36);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: zatmivani .12s;
}
.paleta-zaves[hidden] { display: none; }
.paleta { width: min(600px, 100%); max-height: min(520px, 76vh); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 28px 70px rgba(0, 0, 0, .3); overflow: hidden; animation: pop .16s var(--easing); }
.paleta-vstup { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 54px; border-bottom: 1px solid var(--line); color: var(--text-3); flex: none; }
.paleta-vstup input, .paleta-vstup input:focus, .paleta-vstup input:hover { flex: 1; height: 100%; border: 0; background: none; box-shadow: none; padding: 0; font-size: 15px; }
.paleta-seznam { list-style: none; margin: 0; overflow-y: auto; padding: 6px; flex: 1; }
.paleta-polozka { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--text); }
.paleta-polozka:hover { color: var(--text); }
.paleta-polozka.vybrana { background: var(--accent-soft); }
.paleta-ikona { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); flex: none; }
.paleta-ikona .ikona { font-size: 16px; }
.paleta-polozka.vybrana .paleta-ikona { background: var(--accent); border-color: var(--accent); color: #fff; }
.paleta-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.paleta-popis { margin-left: auto; padding-left: 12px; color: var(--text-3); font-size: var(--fs-sm); white-space: nowrap; }
.paleta-prazdne { padding: 32px 16px; text-align: center; color: var(--text-3); }
.paleta-pata { display: flex; gap: 16px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-3); background: var(--panel-2); flex: none; }
.paleta-pata .kbd { margin: 0 4px 0 0; }

/* ---------- Mobile ---------- */
@media (max-width: 899px) {
  .shell, html.sbaleny .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw);
    transform: translateX(-100%); transition: transform .24s var(--easing); z-index: 2000;
    box-shadow: var(--shadow-pop);
  }
  html.menu-otevrene .sidebar { transform: none; }
  html.menu-otevrene .zaves { display: block; position: fixed; inset: 0; z-index: 1999; background: rgba(12, 12, 18, .4); animation: zatmivani .2s; }
  html.sbaleny .sb-nazev, html.sbaleny .nav-text, html.sbaleny .nav-titul { display: revert; }
  html.sbaleny .nav-odkaz { justify-content: flex-start; padding: 0 10px; }
  html.sbaleny .sb-hlava { padding: 0 10px 0 14px; justify-content: flex-start; }
  html.sbaleny .sb-logo { flex: 1; }
  .sb-zavrit { display: inline-grid; }
  .sb-pata { display: none; }
  .nav-odkaz { height: 40px; font-size: 15px; }
  .sb-hledat { display: none; }

  .topbar { padding: 0 8px; gap: 4px; padding-top: env(safe-area-inset-top); height: calc(var(--tb-h) + env(safe-area-inset-top)); }
  .tb-menu, .tb-hledat { display: inline-grid; }
  .drobky a, .drobky .ikona { display: none; }
  .drobky-aktivni { font-size: 15px; font-weight: 600; }

  .obsah { padding-bottom: calc(var(--mobil-lista-h) + env(safe-area-inset-bottom)); }
  .spodni-lista {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--mobil-lista-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    -webkit-backdrop-filter: saturate(1.8) blur(14px); backdrop-filter: saturate(1.8) blur(14px);
    border-top: 1px solid var(--line);
  }
  .spodni-odkaz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--text-3); font: 500 10.5px var(--font); text-decoration: none; cursor: pointer; }
  .spodni-odkaz .ikona { font-size: 24px; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
  .spodni-odkaz.aktivni { color: var(--accent-text); }
  .spodni-odkaz.aktivni .ikona { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

  .paleta-zaves { padding: 8px; align-items: flex-start; }
  .paleta { max-height: 80vh; }
  .paleta-pata { display: none; }
}
