/* ============================================================================
   THEIS — vrstva designu Qeris (v991)
   ----------------------------------------------------------------------------
   Načítá se jako POSLEDNÍ sdílený styl (po nav.css a board.css). Přepisuje vzhled
   shellu a sdílených komponent; barvy a rozměry bere z tokenů ve variables.css.
   Obrazovky si své vlastní třídy drží v sobě (injektované <style>), tady se řeší
   jen to, co sdílí celá appka: menu, tlačítka, karty, formuláře, tabulky,
   přepínače, odznaky, prázdné stavy a pohyb.

   Pravidla pohybu: jedna křivka (--ease), vstup obsahu 0,5–0,7 s, hover 0,25 s,
   stisk scale(.96) za 0,08 s. Všechno respektuje prefers-reduced-motion.
   ============================================================================ */

/* ---- Ikony: Material Symbols Rounded (tenčí a oblejší, blíž SF Symbols) ----
   Názvy ikon se nemění — Symbols znají všechna jména z Material Icons. */
.material-icons-outlined,
.material-icons {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

/* ---- Základ --------------------------------------------------------------- */
body {
  font-size: 14px;
  line-height: 1.45;
}

/* Dotyk: žádný šedý obdélník při ťuknutí (odezvu dává stisk, app.js) a žádné čekání
   na dvojité ťuknutí — klepnutí platí hned. */
html {
  -webkit-tap-highlight-color: transparent;
}

a,
button,
[role="button"],
label,
summary,
input,
select,
textarea {
  touch-action: manipulation;
}

::selection {
  background: rgba(63, 199, 34, 0.25);
}

/* Neutrální prstenec jako v Qerisu — modrý kruh po kliknutí působil jako chyba. */
:focus-visible {
  outline: 2px solid rgba(var(--tint-fg-rgb), 0.3);
  outline-offset: 2px;
}

.main-content {
  background: var(--bg);
  scroll-padding-top: 24px;
}

/* ============================================================================
   SHELL — postranní menu
   ============================================================================ */

.sidebar {
  background: var(--sidebar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
}

/* ⚠⚠ Na počítači BEZ rozmazání. `backdrop-filter` dělá z menu rámec pro `position: fixed`,
   takže vysunutý panel „Víc" (stojí vpravo vedle menu) se otevřel uvnitř menu a to ho
   ořízlo — klik na „Víc" pak nic neukázal. Na telefonu se panel rozbaluje na místě, tam
   rozmazání nevadí. */
@media (min-width: 769px) {
  .sidebar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: color-mix(in srgb, var(--surface-100) 82%, var(--bg));
  }
}

.sidebar-nav {
  position: relative;
}

/* Jezdící pilulka pod aktivní položkou — přejede z položky na položku místo
   skokového přebarvení. Polohu nastavuje THEIS.navGlide() v app.js. */
.nav-glide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  border-radius: var(--radius-xxl);
  background: var(--brand);
  box-shadow: var(--shadow-pill);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transform: translate3d(0, 0, 0);
  transition: transform 0.55s var(--ease), height 0.55s var(--ease), opacity 0.3s var(--ease-out);
}

.nav-glide.is-instant {
  transition: none;
}

.sidebar-nav .nav-item,
.sidebar-nav .nav-sec-t {
  position: relative;
  z-index: 1;
}

.nav-sec-t {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted-fg);
}

.nav-item .badge {
  font-variant-numeric: tabular-nums;
}

/* ---- Plné menu (počítač od 1025 px) ---------------------------------------
   Qeris: 232–244 px široké, průsvitné, vždy rozbalené. Úzký dok z dřívějška zůstává
   jen na tabletu (769–1024 px). Rozbalený stav drží třída .hov, kterou app.js
   na téhle šířce nesundává — všechna pravidla „sbaleného doku" tak mlčí. */
@media (min-width: 1025px) {
  .app-container {
    padding-left: 0;
  }

  .app-container .sidebar {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    height: 100%;
    width: var(--sidebar-width);
    padding: 22px 12px 14px;
    border: 0;
    border-right: 1px solid var(--border-muted);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    transition: none;
  }

  .app-container .sidebar:hover,
  .app-container .sidebar.hov {
    width: var(--sidebar-width);
  }

  .app-container .sidebar > .sidebar-header {
    min-height: 0;
    height: auto;
    padding: 0 6px 18px 18px;
    justify-content: flex-start;
  }

  .app-container .sidebar .sidebar-logo img {
    height: 28px;
  }

  .app-container .sidebar #sidebarOrgLogo {
    max-height: 28px;
  }

  .app-container .sidebar > .sidebar-nav {
    padding: 4px 0 8px;
    gap: 2px;
  }

  .app-container .sidebar .nav-item {
    gap: 14px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-xxl);
    color: var(--text-muted-fg);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
  }

  .app-container .sidebar .nav-item .nav-ico,
  .app-container .sidebar .nav-item .material-icons-outlined:not(.nav-zamek) {
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 20px;
  }

  .app-container .sidebar .nav-item:hover {
    background: rgba(var(--tint-fg-rgb), 0.04);
    color: var(--text);
  }

  .app-container .sidebar .nav-item:hover .nav-ico,
  .app-container .sidebar .nav-item:hover .material-icons-outlined:not(.nav-zamek) {
    background: none;
    color: inherit;
  }

  .app-container .sidebar .sidebar-nav .nav-item.active {
    background: transparent;
    color: var(--brand-fg);
  }

  .app-container .sidebar .sidebar-nav .nav-item.active .nav-ico,
  .app-container .sidebar .sidebar-nav .nav-item.active .material-icons-outlined:not(.nav-zamek) {
    background: none;
    box-shadow: none;
    color: var(--brand-fg);
  }

  .app-container .sidebar .sidebar-nav:not(.ma-glide) .nav-item.active {
    background: var(--brand);
    box-shadow: var(--shadow-pill);
  }

  .app-container .sidebar .nav-sec-t {
    max-height: none;
    padding: 16px 18px 6px;
    opacity: 1;
  }

  .app-container .sidebar .nav-sec + .nav-sec::before {
    display: none;
  }

  .app-container .sidebar .nav-more-dot {
    position: static;
  }

  .app-container .sidebar > .sidebar-footer {
    margin-top: 8px;
    padding: 12px;
    border: 0;
    border-radius: 18px;
    background: rgba(var(--tint-fg-rgb), 0.025);
    transition: background 0.25s var(--ease);
  }

  .app-container .sidebar > .sidebar-footer:hover {
    background: rgba(var(--tint-fg-rgb), 0.05);
  }

  .app-container .sidebar .sidebar-footer .avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .sidebar.roluje > .sidebar-footer::before {
    display: none;
  }
}

/* Menu jen tak široké, jak je potřeba — dřív 290 px, polovina byla prázdná plocha. */
@media (min-width: 1025px) {
  :root {
    --sidebar-width: 244px;
  }
}

@media (min-width: 1025px) and (max-width: 1440px) {
  :root {
    --sidebar-width: 232px;
  }
}

/* ---- Výběr organizace / akce (karta nahoře v menu) ------------------------ */
.nav-ctx {
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--surface-100);
  box-shadow: 0 0 0 1px rgba(var(--tint-fg-rgb), 0.06);
  transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-ctx:hover {
  box-shadow: 0 0 0 1px rgba(var(--tint-fg-rgb), 0.1), var(--shadow-soft);
}

.nav-ctx-ic {
  border-radius: 9px;
  background: var(--brand);
  color: var(--brand-fg);
}

.nav-ctx-ic.ma-logo {
  background: var(--surface-100);
}

.nav-ctx-org {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted-fg);
}

.nav-ctx-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-ctx-list {
  border-top-color: var(--border-muted);
}

.nav-ctx-item {
  border-radius: var(--radius-md);
}

.nav-ctx-item.on .nav-ctx-dot {
  background: var(--green);
}

@media (min-width: 1025px) {
  .app-container .sidebar .nav-ctx {
    margin: 0 0 12px;
  }

  .app-container .sidebar .nav-ctx-btn {
    padding: 9px 10px;
  }
}

/* ---- Nahrát (hlavní akce v menu) ------------------------------------------ */
.nav-primary {
  border: 0;
  background: var(--surface-200);
  color: var(--text);
  transition: background 0.25s var(--ease), transform 0.12s var(--ease);
}

.nav-primary:hover,
.nav-primary.on {
  background: var(--surface-300);
  border-color: transparent;
}

.nav-primary:active {
  transform: scale(0.98);
}

.nav-primary > svg:first-of-type {
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-fg);
}

@media (min-width: 1025px) {
  .app-container .sidebar .nav-primary {
    min-height: 46px;
    margin: 0 0 8px;
    padding: 8px 14px 8px 8px;
    border-radius: var(--radius-xl);
    font-size: 15px;
  }

  .app-container .sidebar .nav-primary > svg:first-of-type {
    width: 30px;
    height: 30px;
    padding: 7px;
    box-sizing: border-box;
  }
}

/* ---- Vysunutá menu (Nahrát / Víc) — popover Qerisu ------------------------- */
@media (min-width: 769px) {
  .nav-fly {
    padding: 8px;
    border: 0;
    border-radius: 20px;
    background: var(--surface-overlay);
    box-shadow: 0 0 0 1px rgba(var(--tint-fg-rgb), 0.06), 0 18px 48px rgba(0, 0, 0, 0.14);
    transform: scale(0.96) translateX(-6px);
    transform-origin: left top;
    transition: opacity 0.2s var(--ease-out), transform 0.4s var(--ease), visibility 0s linear 0.4s;
  }

  .nav-fly.show {
    transform: none;
  }

  .nav-fly .nav-item,
  .nav-fly .nav-fly-item {
    border-radius: var(--radius-lg);
  }

  .nav-fly .nav-item.active {
    background: var(--brand);
    color: var(--brand-fg);
  }

  /* ⚠ Jezdící pilulka do vysunutého panelu nedosáhne (zůstane pod „Víc"). Aktivní položka
     v panelu si proto nese vlastní černé pozadí — jinak měla bílé písmo na bílém a zmizela. */
  .app-container .sidebar .sidebar-nav .nav-fly .nav-item.active {
    background: var(--brand);
    color: var(--brand-fg);
    box-shadow: none;
  }

  .nav-fly .nav-item.active .nav-ico {
    background: transparent;
    color: var(--brand-fg);
  }

  .nav-fly.show .nav-item,
  .nav-fly.show .nav-fly-item {
    animation: q-rise 0.45s var(--ease) backwards;
  }

  .nav-fly.show > :nth-child(2) { animation-delay: 30ms; }
  .nav-fly.show > :nth-child(3) { animation-delay: 60ms; }
  .nav-fly.show > :nth-child(4) { animation-delay: 90ms; }
  .nav-fly.show > :nth-child(5) { animation-delay: 120ms; }
  .nav-fly.show > :nth-child(6) { animation-delay: 150ms; }
  .nav-fly.show > :nth-child(7) { animation-delay: 180ms; }
  .nav-fly.show > :nth-child(8) { animation-delay: 210ms; }
  .nav-fly.show > :nth-child(9) { animation-delay: 240ms; }
}

/* ---- Tablet (769–1024 px): úzký dok v Qeris barvách ----------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    border: 0;
    box-shadow: 0 0 0 1px rgba(var(--tint-fg-rgb), 0.06), var(--shadow-medium);
  }

  .nav-glide {
    display: none;
  }
}

/* ---- Telefon: šuplík a plovoucí lišta ------------------------------------ */
@media (max-width: 768px) {
  .sidebar {
    width: min(320px, 86vw);
    border: 0;
    border-radius: 0 var(--radius-sheet) var(--radius-sheet) 0;
    background: var(--surface-100);
    box-shadow: var(--shadow-strong);
    transition: transform 0.5s var(--ease);
  }

  .sidebar-nav {
    padding: 4px 12px 8px;
  }

  .sidebar .nav-item {
    min-height: 46px;
    padding: 0 16px;
    border-radius: var(--radius-xxl);
    color: var(--text-muted-fg);
    font-size: 16px;
    font-weight: 600;
  }

  .sidebar .sidebar-nav .nav-item.active {
    background: transparent;
    color: var(--brand-fg);
  }

  .sidebar .sidebar-nav:not(.ma-glide) .nav-item.active {
    background: var(--brand);
  }

  .sidebar .sidebar-nav .nav-item.active .nav-ico,
  .sidebar .sidebar-nav .nav-item.active .material-icons-outlined {
    color: var(--brand-fg);
  }

  .nav-glide {
    height: 46px;
  }

  .sidebar-backdrop {
    background: rgba(20, 20, 24, 0.36);
    transition: opacity 0.4s var(--ease-out);
  }

  .mobile-tab-bar {
    padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  }

  .mobile-tab-bar nav {
    padding: 6px;
    border: 0;
    background: var(--tabbar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    box-shadow: 0 0 0 1px rgba(var(--tint-fg-rgb), 0.06), var(--tabbar-shadow);
    animation: q-bar-in 0.7s var(--ease) backwards;
  }

  .tab-indicator {
    top: 6px;
    height: calc(100% - 12px);
    background: var(--tab-indicator-bg);
    transition: transform 0.55s var(--ease), width 0.55s var(--ease), opacity 0.25s var(--ease-out);
  }

  .tab-item {
    color: var(--text-muted-fg);
    font-size: 10.5px;
    font-weight: 600;
    transition: color 0.3s var(--ease), transform 0.12s var(--ease);
  }

  .tab-item:active {
    transform: scale(0.92);
  }

  .tab-item.active,
  .tab-item.active .material-icons-outlined {
    color: var(--green-ink);
  }

  .tab-item.active .material-icons-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  }

  .tab-item .tab-badge {
    background: #FF3B30;
    color: #fff;
  }
}

@keyframes q-bar-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
}

/* ============================================================================
   HLAVIČKA STRÁNKY
   ============================================================================ */

.page-header {
  padding: 40px 48px 24px;
  align-items: flex-end;
}

.page-header h1 {
  margin-bottom: 4px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.page-header p,
.page-header .subtitle {
  color: var(--text-light);
  font-size: 15px;
}

.page-body {
  padding: 0 48px 64px;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .page-header {
    padding: 32px 28px 20px;
  }

  .page-body {
    padding: 0 28px 48px;
  }
}

@media (max-width: 768px) {
  .page-body {
    padding: 0 16px calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .page-header h1 {
    font-size: 30px !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
  }
}

/* ============================================================================
   TLAČÍTKA — pilulky
   ============================================================================ */

.btn {
  gap: 8px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease),
              box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:active {
  transform: scale(0.96);
  transition-duration: 80ms;
}

.btn .material-icons-outlined,
.btn .material-icons {
  font-size: 18px;
}

.btn-primary {
  background: var(--brand);
  border-color: transparent;
  color: var(--brand-fg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background: var(--brand-hover);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-100);
  border-color: rgba(var(--tint-fg-rgb), 0.1);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-100);
  border-color: rgba(var(--tint-fg-rgb), 0.18);
  box-shadow: var(--shadow-soft);
}

.btn-ghost {
  color: var(--text-light);
}

.btn-ghost:hover {
  background: rgba(var(--tint-fg-rgb), 0.05);
  color: var(--text);
}

.btn-danger {
  background: #FF3B30;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.25);
}

.btn-danger:hover {
  background: #E5342A;
  filter: none;
}

.btn-sm {
  padding: 0 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
}

.btn-lg {
  padding: 0 24px;
  font-size: 15px;
}

.btn-icon {
  border-radius: var(--radius-lg);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn-icon:hover {
  background: rgba(var(--tint-fg-rgb), 0.05);
  border-color: transparent;
}

.btn-icon:active {
  transform: scale(0.9);
  transition-duration: 80ms;
}

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

.glass-card {
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface-100);
  box-shadow: var(--shadow-card);
  transition: background 0.35s var(--ease), box-shadow 0.45s var(--ease), transform 0.45s var(--ease);
}

.glass-card.interactive:hover {
  background: var(--surface-100);
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.glass-card.interactive:active {
  transform: translateY(-1px) scale(0.99);
}

.card-header {
  min-height: 52px;
  padding: 16px var(--card-padding-x) 12px;
  border-bottom: 0;
}

.card-header h2,
.card-header h3,
.card-header h4 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.card-footer {
  border-top: 1px solid var(--border-muted);
  background: transparent;
}

/* ============================================================================
   FORMULÁŘE — měkká šedá pole, modrý prstenec při psaní
   ============================================================================ */

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-light);
}

.form-control {
  height: var(--control-h);
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--surface-200);
  font-size: 14px;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), box-shadow 0.25s var(--ease);
}

.form-control:hover:not(:focus) {
  border-color: transparent;
  background: var(--surface-300);
}

.form-control:focus {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: var(--surface-100);
  box-shadow: var(--ring-focus);
}

textarea.form-control {
  padding: 12px 14px;
}

select.form-control {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
}

input[type="checkbox"],
input[type="radio"],
input[type="range"] {
  accent-color: var(--green);
}

/* ============================================================================
   ODZNAKY — „bubliny" Qerisu
   ============================================================================ */

/* Bez verzálek — křičely víc než obsah kolem (uživatel 15. 10. 2026). */
.badge {
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.badge-filled {
  border-radius: var(--radius-full);
}

.avatar {
  border: 0;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-ink);
  font-weight: 700;
}

/* ============================================================================
   TABULKY
   ============================================================================ */

.data-table-wrapper {
  border: 0;
  border-radius: 20px;
  background: var(--surface-100);
  box-shadow: var(--shadow-card);
}

.data-table thead th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-muted);
  background: rgba(var(--tint-fg-rgb), 0.015);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted-fg);
}

.data-table tbody tr {
  border-bottom-color: var(--border-muted);
  transition: background 0.2s var(--ease-out);
}

.data-table tbody tr:hover {
  background: rgba(var(--tint-fg-rgb), 0.025);
}

.data-table tbody td {
  padding: 12px 16px;
}

/* ============================================================================
   PŘEPÍNAČ — zelený, pružný
   ============================================================================ */

.toggle-switch {
  width: 42px;
  height: 26px;
}

.toggle-slider {
  border: 0;
  background: rgba(var(--tint-fg-rgb), 0.12);
  transition: background 0.3s var(--ease);
}

.toggle-slider::before {
  width: 22px;
  height: 22px;
  left: 2px;
  bottom: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.45s var(--ease-spring), width 0.2s var(--ease);
}

.toggle-switch:active .toggle-slider::before {
  width: 26px;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--green);
  border-color: transparent;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.toggle-switch:active input:checked + .toggle-slider::before {
  transform: translateX(12px);
}

@media (max-width: 768px) {
  .toggle-switch { width: 51px; height: 31px; }
  .toggle-slider::before { width: 27px; height: 27px; }
  .toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
  .toggle-switch:active input:checked + .toggle-slider::before { transform: translateX(16px); }
}

/* ============================================================================
   PRŮBĚH, PRÁZDNÉ STAVY, NAČÍTÁNÍ
   ============================================================================ */

.progress-bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(var(--tint-fg-rgb), 0.08);
}

.progress-bar-fill {
  border-radius: var(--radius-full);
  background: var(--green);
  transition: width 0.6s var(--ease);
}

.render-bar-fill {
  background: var(--green);
}

/* Prázdný stav: místo velké šedé ikony drobná animace z teček (pixelová rampa). */
.empty-state {
  gap: 12px;
  padding: 56px 24px;
  color: var(--text-light);
  animation: q-fade 0.6s var(--ease) backwards;
}

.empty-state .material-icons-outlined {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--surface-200);
  color: var(--text-muted-fg);
  font-size: 30px;
  animation: q-float 4s ease-in-out infinite;
}

.load-error-state .material-icons-outlined {
  color: var(--error);
}

.skeleton {
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg,
    rgba(var(--tint-fg-rgb), 0.04) 25%,
    rgba(var(--tint-fg-rgb), 0.08) 37%,
    rgba(var(--tint-fg-rgb), 0.04) 63%);
  background-size: 800px 100%;
}

/* ============================================================================
   POHYB — vstup obrazovky, karty postupně, drobné reakce
   ============================================================================ */

@keyframes q-fade {
  from { opacity: 0; }
}

@keyframes q-rise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
}

@keyframes q-pop {
  from { opacity: 0; transform: scale(0.96) translate3d(0, 10px, 0); }
}

@keyframes q-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -5px, 0); }
}

/* Přepnutí obrazovky: stará (duch, app.js `_routeDuch`) se rozplyne nad novou.
   ⚠⚠ Samotný obsah už NEvyjíždí z průhlednosti — mezi dvěma obrazovkami pak
   probliklo pozadí (každé ťuknutí na záložku). Nová obrazovka je vidět od prvního
   snímku, jen se pod rozplývajícím se duchem lehce usadí. */
.route-enter {
  animation: none;
}

.route-duch {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 900;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
  animation: q-duch-ven 0.26s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes q-duch-ven {
  to { opacity: 0; }
}

@keyframes q-usaz {
  from { opacity: 0.55; transform: translate3d(0, 8px, 0); }
}

.route-enter .page-header {
  animation: q-usaz 0.5s var(--ease) backwards;
}

.route-enter .glass-card {
  animation: q-usaz 0.55s var(--ease) backwards;
}

.route-enter .glass-card:nth-child(1) { animation-delay: 30ms; }
.route-enter .glass-card:nth-child(2) { animation-delay: 60ms; }
.route-enter .glass-card:nth-child(3) { animation-delay: 90ms; }
.route-enter .glass-card:nth-child(4) { animation-delay: 120ms; }
.route-enter .glass-card:nth-child(5) { animation-delay: 150ms; }
.route-enter .glass-card:nth-child(n+6) { animation-delay: 180ms; }

.route-enter .data-table tbody tr:nth-child(-n+14) {
  animation: q-usaz 0.45s var(--ease) backwards;
}

.route-enter .data-table tbody tr:nth-child(2) { animation-delay: 30ms; }
.route-enter .data-table tbody tr:nth-child(3) { animation-delay: 60ms; }
.route-enter .data-table tbody tr:nth-child(4) { animation-delay: 90ms; }
.route-enter .data-table tbody tr:nth-child(5) { animation-delay: 120ms; }
.route-enter .data-table tbody tr:nth-child(6) { animation-delay: 150ms; }
.route-enter .data-table tbody tr:nth-child(7) { animation-delay: 180ms; }
.route-enter .data-table tbody tr:nth-child(8) { animation-delay: 210ms; }
.route-enter .data-table tbody tr:nth-child(9) { animation-delay: 240ms; }
.route-enter .data-table tbody tr:nth-child(10) { animation-delay: 270ms; }
.route-enter .data-table tbody tr:nth-child(n+11) { animation-delay: 300ms; }

.animate-slide-up {
  animation: q-rise 0.6s var(--ease) both;
}

.animate-scale-in {
  animation: q-pop 0.55s var(--ease) both;
}

.animate-fade-in {
  animation: q-fade 0.5s var(--ease-out) both;
}

/* Odznak s číslem „naskočí", když se objeví. */
.nav-item .badge-filled,
.tab-item .tab-badge {
  animation: q-badge 0.5s var(--ease-spring) backwards;
}

@keyframes q-badge {
  from { transform: scale(0.4); opacity: 0; }
}

/* ============================================================================
   TOAST — bílá pilulka vpravo dole (styl dodává toast.js třídou .q-toast)
   ============================================================================ */

#toastContainer {
  gap: 10px !important;
  /* ⚠ Nad okny (detail příspěvku a spol. mají z-index 10000 a leží v DOM později) —
     jinak se „Ukládám do Fotek…" schovalo pod okno a ťuknutí vypadalo bez odezvy. */
  z-index: 10500 !important;
}

.q-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  max-width: 420px;
  padding: 12px 16px 12px 12px;
  border-radius: var(--radius-xl);
  background: var(--surface-overlay);
  box-shadow: 0 0 0 1px rgba(var(--tint-fg-rgb), 0.06), 0 18px 48px rgba(0, 0, 0, 0.14);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  animation: q-toast-in 0.6s var(--ease) backwards;
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease);
}

.q-toast.is-out {
  opacity: 0;
  transform: translate3d(24px, 0, 0) scale(0.98);
}

.q-toast-ic {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.q-toast-ic .material-icons-outlined {
  font-size: 18px;
}

@keyframes q-toast-in {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.96); }
}

/* ============================================================================
   MODÁLNÍ OKNO (THEIS.Modal) — karta r28, závoj bez rozmazání
   ============================================================================ */

#theisModalOverlay .modal-card {
  border-radius: var(--radius-sheet);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

@media (min-width: 769px) {
  #theisModalOverlay .modal-card {
    transform: scale(0.96) translate3d(0, 12px, 0);
    transition: transform 0.5s var(--ease);
  }

  #theisModalOverlay .modal-card.modal-visible {
    transform: none;
  }
}

/* ============================================================================
   OMEZENÍ POHYBU
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .nav-glide,
  .route-enter,
  .route-enter .page-header,
  .route-enter .glass-card,
  .route-enter .data-table tbody tr,
  .nav-fly.show .nav-item,
  .nav-fly.show .nav-fly-item,
  .mobile-tab-bar nav,
  .empty-state,
  .empty-state .material-icons-outlined,
  .q-toast,
  .nav-item .badge-filled,
  .tab-item .tab-badge {
    animation: none;
    transition: none;
  }
}

/* ============================================================================
   ZJEDNODUŠENÉ MENU (v993) — jen logo, karta organizace, hledání, položky
   a karta uživatele. Bez nadpisů skupin, bez druhého loga, bez verze a duh.
   ============================================================================ */

.sidebar-wordmark {
  display: none;
  margin-left: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
}

.app-container .sidebar .dual-logo-divider,
.app-container .sidebar .dual-logo-half:nth-child(3) {
  display: none !important;
}

.nav-sec-t {
  display: none !important;
}

.nav-sec + .nav-sec {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-muted);
}

.sidebar-footer div:has(> a[href*="tetify.cz"]),
#userRainbows {
  display: none !important;
}

#userRole {
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--text-muted-fg) !important;
}

#userName {
  font-size: 13px !important;
  font-weight: 600 !important;
}

/* Hledání (⌘K) — šedá pilulka pod kartou organizace. */
.nav-hledat {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  margin: 0 0 10px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-200);
  color: var(--text-muted-fg);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.12s var(--ease);
}

.nav-hledat:hover {
  background: var(--surface-300);
  color: var(--text);
}

.nav-hledat:active {
  transform: scale(0.98);
}

.nav-hledat svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-hledat-t {
  flex: 1;
  white-space: nowrap;
}

.nav-hledat kbd {
  padding: 2px 6px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: var(--surface-100);
  color: var(--text-muted-fg);
  font: 600 11px -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (min-width: 1025px) {
  .app-container .sidebar .sidebar-wordmark {
    display: inline;
  }

  .app-container .sidebar .dual-logo-half:first-child {
    justify-content: flex-start;
  }

  .app-container .sidebar > .sidebar-header {
    padding: 0 6px 22px 16px;
  }

  .app-container .sidebar .sidebar-logo img {
    height: 26px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar:not(:hover):not(.hov) .nav-hledat {
    justify-content: center;
    padding: 0;
  }

  .sidebar:not(:hover):not(.hov) .nav-hledat-t,
  .sidebar:not(:hover):not(.hov) .nav-hledat kbd {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-hledat {
    width: calc(100% - 24px);
    min-height: 46px;
    margin: 0 12px 12px;
  }

  .nav-hledat kbd {
    display: none;
  }

  .sidebar-wordmark {
    display: inline;
  }
}

/* ============================================================================
   PALETA RYCHLÉHO HLEDÁNÍ (js/components/hledani.js)
   ============================================================================ */

.qp-ov {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  background: rgba(20, 20, 24, 0.36);
  animation: q-fade 0.3s var(--ease-out) backwards;
  transition: opacity 0.25s var(--ease-out);
}

.qp-ov.is-out {
  opacity: 0;
}

.qp-card {
  display: flex;
  flex-direction: column;
  width: min(580px, 100%);
  max-height: 70vh;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface-overlay);
  box-shadow: 0 0 0 1px rgba(var(--tint-fg-rgb), 0.06), 0 24px 60px rgba(0, 0, 0, 0.22);
  animation: q-pop 0.5s var(--ease) backwards;
  transition: transform 0.3s var(--ease);
}

.qp-ov.is-out .qp-card {
  transform: scale(0.97) translate3d(0, 6px, 0);
}

.qp-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-muted);
}

.qp-field .material-icons-outlined {
  color: var(--text-muted-fg);
  font-size: 22px;
}

.qp-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.qp-input::placeholder {
  color: var(--text-muted-fg);
}

.qp-card kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  padding: 2px 6px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: var(--surface-200);
  color: var(--text-muted-fg);
  font: 600 11px -apple-system, BlinkMacSystemFont, sans-serif;
}

.qp-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.qp-sec {
  padding: 10px 12px 6px;
  color: var(--text-muted-fg);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 6px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s var(--ease-out);
}

.qp-ov.is-new .qp-item {
  animation: q-rise 0.4s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 18ms);
}

.qp-item.is-on {
  background: rgba(var(--tint-fg-rgb), 0.06);
}

.qp-ic {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-200);
  color: var(--text-light);
  transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}

.qp-item.is-on .qp-ic {
  background: var(--brand);
  color: var(--brand-fg);
}

.qp-ic svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qp-ic .material-icons-outlined {
  font-size: 18px;
}

.qp-t {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.qp-n,
.qp-pod {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qp-pod {
  margin-top: 1px;
  color: var(--text-muted-fg);
  font-size: 12px;
  font-weight: 400;
}

.qp-n mark {
  border-radius: 3px;
  background: rgba(48, 177, 88, 0.2);
  color: inherit;
  box-shadow: 0 0 0 1px rgba(48, 177, 88, 0.2);
}

.qp-go {
  flex: none;
  color: var(--text-muted-fg);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.15s var(--ease-out);
}

.qp-item.is-on .qp-go {
  opacity: 1;
}

.qp-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 40px 24px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.qp-empty small {
  max-width: 340px;
  margin: 0 auto;
  color: var(--text-muted-fg);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.qp-zrus {
  display: none;
  flex: none;
  padding: 6px 2px 6px 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.qp-foot {
  display: flex;
  gap: 18px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-muted);
  color: var(--text-muted-fg);
  font-size: 12px;
}

.qp-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 768px) {
  .qp-ov {
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 12px;
  }

  .qp-card {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 24px);
    border-radius: 22px;
  }

  .qp-field {
    padding: 14px 16px;
  }

  .qp-field kbd,
  .qp-foot {
    display: none;
  }

  .qp-zrus {
    display: block;
  }

  .qp-item {
    min-height: 54px;
  }

  .qp-go {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qp-ov, .qp-card, .qp-item {
    animation: none;
    transition: none;
  }
}

/* ============================================================================
   MENU PŘESNĚ PODLE QERISU (v993)
   logo s nápisem · karta organizace s rolí a černým pruhem členů · šedé hledání
   · položky s ikonou 22 px oddělené čarami · karta úložiště · karta uživatele
   ============================================================================ */

.nav-ctx {
  overflow: hidden;
  border: 1px solid rgba(var(--tint-fg-rgb), 0.08);
  border-radius: 18px;
  background: var(--surface-100);
  box-shadow: none;
}

.nav-ctx:hover {
  border-color: rgba(var(--tint-fg-rgb), 0.12);
  box-shadow: none;
}

.nav-ctx-btn {
  gap: 10px;
  padding: 9px 12px 9px 9px;
}

.nav-ctx-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1d1d1f;
  color: #fff;
}

.nav-ctx-ic svg {
  width: 17px;
  height: 17px;
}

.nav-ctx-org {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.nav-ctx-name {
  margin-top: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted-fg);
}

.nav-ctx-chev {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted-fg);
}

.nav-ctx.open .nav-ctx-chev {
  transform: none;
}

.nav-tym {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 10px;
  background: #1d1d1f;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s var(--ease);
}

.nav-tym:hover {
  background: #000;
  color: #fff;
}

.nav-tym-faces {
  display: flex;
  flex: none;
}

.nav-tym-av {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: -7px;
  overflow: hidden;
  border: 2px solid #1d1d1f;
  border-radius: 50%;
  background: #48484a;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.nav-tym-av:first-child {
  margin-left: 0;
}


.nav-tym-t {
  flex: 1;
  white-space: nowrap;
}

.nav-tym-chev {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}

.nav-tym:hover .nav-tym-chev {
  transform: translateX(3px);
}

.nav-hledat {
  min-height: 36px;
  margin: 12px 0 6px;
  padding: 0 8px 0 12px;
  border-radius: 12px;
  background: var(--surface-200);
  color: var(--text-muted-fg);
  font-size: 13.5px;
}

.nav-hledat svg {
  width: 16px;
  height: 16px;
}

.nav-hledat kbd {
  padding: 1px 6px;
  border: 1px solid rgba(var(--tint-fg-rgb), 0.08);
  border-radius: 6px;
  background: var(--surface-100);
  font-size: 10.5px;
}

.sidebar .nav-sec + .nav-sec {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(var(--tint-fg-rgb), 0.07);
}

.nav-akce {
  font: inherit;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

@media (min-width: 1025px) {
  .app-container .sidebar {
    padding: 22px 12px 12px;
  }

  .app-container .sidebar > .sidebar-header {
    padding: 0 0 18px 12px;
  }

  .app-container .sidebar .sidebar-logo img {
    height: 22px;
  }

  .app-container .sidebar .sidebar-wordmark {
    margin-left: 8px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.03em;
  }

  .app-container .sidebar .nav-ctx {
    margin: 0;
  }

  .app-container .sidebar > .sidebar-nav {
    padding: 4px 0 10px;
    gap: 0;
  }

  .app-container .sidebar .nav-item {
    gap: 11px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 11px;
    color: var(--text-muted-fg);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  .app-container .sidebar .nav-item .nav-ico {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
  }

  .app-container .sidebar .nav-item:hover {
    background: rgba(var(--tint-fg-rgb), 0.04);
    color: var(--text);
  }

  .app-container .sidebar .sidebar-nav .nav-item.active {
    color: var(--brand-fg);
    font-weight: 600;
  }

  .app-container .sidebar .sidebar-nav:not(.ma-glide) .nav-item.active {
    background: var(--brand);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }

  .app-container .sidebar .nav-glide {
    border-radius: 11px;
  }

  .app-container .sidebar .sidebar-nav .nav-item.active .nav-ico {
    color: var(--brand-fg);
  }

  .app-container .sidebar > .sidebar-footer {
    margin-top: 8px;
    padding: 8px 8px 8px 10px;
    border: 1px solid rgba(var(--tint-fg-rgb), 0.08);
    border-radius: 18px;
    background: var(--surface-100);
    cursor: pointer;
  }

  .app-container .sidebar > .sidebar-footer:hover {
    background: var(--surface-100);
    border-color: rgba(var(--tint-fg-rgb), 0.14);
  }

  .app-container .sidebar .sidebar-footer .avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .app-container .sidebar .sidebar-footer .btn-icon {
    width: 28px;
    height: 28px;
    color: var(--text-muted-fg);
  }

  .app-container .sidebar .sidebar-footer .btn-icon .material-icons-outlined {
    font-size: 17px;
  }
}

body.theme-dark .nav-ctx-ic {
  background: #f5f5f7;
  color: #1d1d1f;
}

body.theme-dark .nav-tym {
  background: #f5f5f7;
  color: #1d1d1f;
}

body.theme-dark .nav-tym-av {
  border-color: #f5f5f7;
  background: #d1d1d6;
  color: #1d1d1f;
}

body.theme-dark .nav-tym-chev {
  stroke: rgba(0, 0, 0, 0.5);
}


/* Karta úložiště */
.nav-uloziste {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--tint-fg-rgb), 0.08);
  border-radius: 18px;
  background: var(--surface-100);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.25s var(--ease);
}

.nav-uloziste:hover {
  border-color: rgba(var(--tint-fg-rgb), 0.14);
  color: var(--text);
}

.nav-ul-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.nav-ul-n {
  flex: none;
  color: var(--text-muted-fg);
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.nav-ul-n b {
  color: var(--text);
  font-weight: 700;
}

.nav-ul-px {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 2px;
}

.nav-ul-px i {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--px-0);
}

.nav-ul-px i.on {
  background: #3fc722;
  animation: q-badge 0.5s var(--ease-spring) backwards;
  animation-delay: calc(var(--i, 0) * 30ms + 300ms);
}

.nav-ul-px i.on.hot {
  background: #ff9500;
}

.nav-ul-volno {
  color: var(--text-muted-fg);
  font-size: 11px;
}

@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar:not(:hover):not(.hov) .nav-uloziste,
  .sidebar:not(:hover):not(.hov) .nav-tym-t,
  .sidebar:not(:hover):not(.hov) .nav-tym-chev {
    display: none;
  }

  .sidebar:not(:hover):not(.hov) .nav-tym {
    justify-content: center;
    padding: 8px 0;
  }

  .sidebar:not(:hover):not(.hov) .nav-tym-av:not(:first-child) {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-ctx {
    margin: 8px 12px 0;
  }

  .nav-hledat {
    width: calc(100% - 24px);
    margin: 12px 12px 6px;
  }

  .nav-uloziste {
    margin: 10px 12px 0;
  }

  .sidebar-footer {
    margin: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 12px);
    border: 1px solid rgba(var(--tint-fg-rgb), 0.08);
    border-radius: 18px;
  }

  /* Na telefonu roluje celé menu, ne jen seznam položek: úložiště a karta účtu
     jinak ukrojily spodek seznamu a „Víc" a „Nastavení" nešlo dorolovat. */
  .app-container .sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .app-container .sidebar > .sidebar-nav {
    flex: none;
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-ul-px i.on {
    animation: none;
  }
}

/* ============================================================================
   PŘEHLED (js/screens/dashboard.js) — podle návrhu z canvasu
   ============================================================================ */

body {
  --soft: #a1a1a6;
}

body.theme-dark {
  --soft: #6e6e73;
}

.qd-root {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 48px 64px;
}

.qd-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  animation: q-rise 0.6s var(--ease) backwards;
}

.qd-eyebrow {
  margin: 0 0 6px;
  color: var(--text-muted-fg);
  font-size: 13px;
  font-weight: 600;
}

.qd-eyebrow::first-letter {
  text-transform: uppercase;
}

.qd-h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.qd-soft {
  display: block;
  color: var(--soft);
}

.qd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.qd-card {
  min-width: 0;
  padding: 24px;
  border-radius: 24px;
  background: var(--surface-100);
  box-shadow: var(--shadow-card);
  animation: q-pop 0.7s var(--ease) backwards;
}

.qd-row:nth-of-type(1) .qd-card:nth-child(2) { animation-delay: 70ms; }
.qd-row:nth-of-type(2) .qd-card { animation-delay: 120ms; }
.qd-row:nth-of-type(2) .qd-card:nth-child(2) { animation-delay: 170ms; }
.qd-row:nth-of-type(2) .qd-card:nth-child(3) { animation-delay: 220ms; }
.qd-row:nth-of-type(3) .qd-card { animation-delay: 260ms; }
.qd-row:nth-of-type(3) .qd-card:nth-child(2) { animation-delay: 310ms; }

.qd-ch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-muted-fg);
  font-size: 13px;
  font-weight: 600;
}

.qd-r {
  margin-left: auto;
}

.qd-muted {
  font-weight: 500;
}

.qd-link {
  color: var(--green-ink);
  font-weight: 600;
}

.qd-ic {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--c, var(--text)) 14%, transparent);
  color: var(--c, var(--text));
}

.qd-ic .material-icons-outlined {
  font-size: 17px;
}

.qd-bub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(var(--tint-fg-rgb), 0.05);
  border-radius: 8px;
  background: var(--surface-200);
  color: var(--text-muted-fg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.qd-bub--g { background: rgba(52, 199, 89, 0.1); border-color: rgba(52, 199, 89, 0.2); color: var(--success); }
.qd-bub--o { background: rgba(255, 149, 0, 0.1); border-color: rgba(255, 149, 0, 0.22); color: var(--warning); }
.qd-bub--b { background: rgba(0, 113, 227, 0.08); border-color: rgba(0, 113, 227, 0.18); color: var(--info); }
.qd-bub--r { background: rgba(255, 59, 48, 0.08); border-color: rgba(255, 59, 48, 0.2); color: var(--error); }

.qd-big {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.qd-px {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  height: 152px;
  margin-top: 22px;
}

.qd-pxc {
  display: flex;
  flex: 1;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
  max-width: 14px;
}

.qd-pxc i {
  display: block;
  width: 100%;
  max-width: 12px;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--px-0);
}

.qd-pxc i.l1 { background: var(--px-1); }
.qd-pxc i.l2 { background: var(--px-2); }
.qd-pxc i.l3 { background: var(--px-3); }
.qd-pxc i.l4 { background: var(--px-4); }
.qd-pxc i.l5 { background: var(--px-5); }

.qd-px.is-in .qd-pxc i[class^="l"] {
  animation: q-cell 0.5s var(--ease-spring) backwards;
  animation-delay: calc(var(--c, 0) * 22ms + var(--r, 0) * 30ms + 150ms);
}

@keyframes q-cell {
  from { opacity: 0; transform: scale(0.2); }
}

.qd-axis {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.qd-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-muted);
}

.qd-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qd-stats b {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.qd-stats span {
  color: var(--text-muted-fg);
  font-size: 12px;
}

.qd-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qd-todo,
.qd-top,
.qd-up {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  animation: q-rise 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 50ms + 200ms);
  transition: background 0.2s var(--ease-out), transform 0.12s var(--ease);
}

.qd-todo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
}

.qd-todo:hover,
.qd-top:hover,
.qd-up:hover {
  background: var(--surface-200);
}

.qd-todo:active,
.qd-top:active,
.qd-up:active {
  transform: scale(0.99);
}

.qd-todo .qd-ic {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.qd-todo-t {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.qd-todo-t strong {
  font-size: 14px;
  font-weight: 600;
}

.qd-todo-t small {
  overflow: hidden;
  color: var(--text-muted-fg);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qd-todo-n {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-200);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.qd-chev {
  color: var(--text-muted-fg);
  font-size: 18px;
}

.qd-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 16px;
  text-align: center;
  animation: q-fade 0.6s var(--ease-out) backwards;
}

.qd-done-ic {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--c, var(--green)) 14%, transparent);
  color: var(--c, var(--green));
  animation: q-float 4s ease-in-out infinite;
}

.qd-done strong {
  font-size: 15px;
}

.qd-done span:last-child {
  color: var(--text-muted-fg);
  font-size: 13px;
}

.qd-top {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding: 10px 8px;
  border-radius: 12px;
}

.qd-top-n {
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.qd-top-t {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qd-top-v {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.qd-top-bar {
  grid-column: 2 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-200);
}

.qd-top-bar i {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: 999px;
  background: var(--px-4);
  transform-origin: left;
  animation: q-grow 0.9s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 60ms + 300ms);
}

@keyframes q-grow {
  from { transform: scaleX(0); }
}

.qd-waf {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
}

.qd-waf i {
  aspect-ratio: 1;
  border-radius: 3px;
}

.qd-waf.is-in i {
  animation: q-cell 0.4s var(--ease-spring) backwards;
  animation-delay: calc(var(--i, 0) * 7ms + 200ms);
}

.qd-leg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
}

.qd-leg div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qd-leg i {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 3px;
}

.qd-leg b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.qd-up {
  display: grid;
  grid-template-columns: 52px 4px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
}

.qd-up-tm {
  display: flex;
  flex: none;
  flex-direction: column;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.qd-up-tm small {
  color: var(--text-muted-fg);
  font-size: 11px;
  font-weight: 500;
}

.qd-up-bar {
  width: 4px;
  height: 36px;
  border-radius: 2px;
  background: var(--soft);
}

.qd-tone-g { background: #3fc722; }
.qd-tone-o { background: #ff9500; }
.qd-tone-b { background: #0071e3; }
.qd-tone-r { background: #ff3b30; }

.qd-up-tx {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.qd-up-tx strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qd-up-tx > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qd-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qd-live i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fc722;
}

.qd-live i::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #3fc722;
  animation: q-ping 2s var(--ease) infinite;
}

@keyframes q-ping {
  0% { opacity: 0.6; transform: scale(1); }
  80%, 100% { opacity: 0; transform: scale(2.8); }
}

.qd-cm {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-muted);
  color: inherit;
  text-decoration: none;
  animation: q-rise 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 60ms + 200ms);
}

.qd-cm:last-child {
  border-bottom: 0;
}

.qd-cm:hover {
  color: inherit;
}

.qd-cm-net {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-200);
}

.qd-cm-t {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qd-cm-p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.qd-cm-t small {
  color: var(--text-muted-fg);
  font-size: 12px;
}

.qd-cm-when {
  flex: none;
  color: var(--text-muted-fg);
  font-size: 12px;
  white-space: nowrap;
}

.qd-prod {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qd-prod-r {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  animation: q-rise 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 60ms + 200ms);
}

.qd-prod-l {
  overflow: hidden;
  color: var(--text-light);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qd-prod-px {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}

.qd-prod-px i {
  aspect-ratio: 1;
  max-width: 18px;
  border-radius: 4px;
  background: var(--px-0);
}

.qd-prod-px i.on {
  background: var(--c);
  animation: q-cell 0.45s var(--ease-spring) backwards;
  animation-delay: calc(var(--i, 0) * 60ms + var(--k, 0) * 35ms + 250ms);
}

.qd-prod-r b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#qdProdCard {
  display: flex;
  flex-direction: column;
}

.qd-prod-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px -8px 16px;
}

.qd-prod-list:empty {
  display: none;
}

.qd-prod-list:not(:empty) + .qd-prod-me {
  margin-top: 0;
}

.qd-prod-v {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
  animation: q-rise 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 50ms + 350ms);
}

.qd-prod-v:hover {
  background: var(--surface-200);
}

.qd-prod-th {
  flex: none;
  width: 56px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-200);
  color: var(--text-muted-fg);
}

.qd-prod-th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qd-prod-vt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.qd-prod-vt b {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qd-prod-vt small {
  font-size: 12px;
  color: var(--text-muted-fg);
}

.qd-prod-go {
  flex: none;
  font-size: 18px;
  color: var(--text-muted-fg);
}

.qd-prod-me {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--brand);
  color: var(--brand-fg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--ease);
}

.qd-prod-me:hover {
  color: var(--brand-fg);
  transform: translateY(-2px);
}

.qd-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px 20px;
}

.qd-banner .qd-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.qd-banner-t {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.qd-banner-t strong {
  font-size: 15px;
}

.qd-banner-t span {
  color: var(--text-muted-fg);
  font-size: 13px;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .qd-root {
    padding: 32px 28px 48px;
  }
}

@media (max-width: 768px) {
  .qd-root {
    padding: 20px 16px 120px;
  }

  .qd-h1 {
    font-size: 30px;
  }

  .qd-head .btn {
    width: 100%;
  }

  .qd-row {
    gap: 14px;
    margin-bottom: 14px;
  }

  .qd-card {
    flex-basis: 100% !important;
    padding: 20px;
  }

  .qd-big {
    font-size: 38px;
  }

  .qd-px {
    gap: 2px;
    height: 120px;
  }

  .qd-pxc {
    gap: 3px;
  }

  .qd-banner {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qd-head, .qd-card, .qd-todo, .qd-top, .qd-up, .qd-cm, .qd-prod-r, .qd-done, .qd-done-ic,
  .qd-px.is-in .qd-pxc i[class^="l"], .qd-waf.is-in i, .qd-top-bar i, .qd-prod-px i.on, .qd-live i::after {
    animation: none;
  }
}

#userRole {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer > div:not(.avatar) {
  min-width: 0;
}

/* ---- Loga organizací podle vzhledu (značkuje app.js → logaPodleVzhledu) ------ */
body.theme-light img[data-ton="svetle"] {
  filter: brightness(0);
}

body.theme-dark img[data-ton="tmave"] {
  filter: brightness(0) invert(1);
}

/* ---- Přehled členů (klik na pruh členů v menu) -------------------------------- */
.qtm-ov {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(17, 17, 19, 0.22);
  animation: qtm-fade .24s ease both;
}

.qtm-ov.is-out {
  animation: qtm-fade-out .2s ease forwards;
}

.qtm {
  display: flex;
  flex-direction: column;
  width: min(500px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  border-radius: 28px;
  background: var(--surface-100);
  box-shadow: 0 0 0 1px rgba(var(--tint-fg-rgb), 0.06), 0 30px 80px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: qtm-in .5s var(--ease) both;
}

.qtm-ov.is-out .qtm {
  animation: qtm-out .2s ease forwards;
}

@keyframes qtm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qtm-fade-out { to { opacity: 0; } }
@keyframes qtm-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes qtm-out { to { opacity: 0; transform: scale(.98); } }

.qtm-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px 14px 22px;
}

.qtm-org {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-200);
  overflow: hidden;
}

.qtm-org img {
  max-width: 30px;
  max-height: 30px;
  object-fit: contain;
}

.qtm-org svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.qtm-org:empty {
  display: none;
}

.qtm-tt {
  flex: 1 1 auto;
  min-width: 0;
}

.qtm-tt h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.qtm-tt p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qtm-x {
  flex: none;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-200);
  color: var(--text-light);
  cursor: pointer;
  transition: background .2s ease, transform .2s var(--ease);
}

.qtm-x:hover {
  background: var(--surface-300);
  color: var(--text);
}

.qtm-x:active {
  transform: scale(.92);
}

.qtm-x .material-icons-outlined {
  font-size: 18px;
}

.qtm-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 14px;
  overscroll-behavior: contain;
}

.qtm-hledat {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin: 0 8px 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-200);
  color: var(--text-muted-fg);
}

.qtm-hledat .material-icons-outlined {
  font-size: 18px;
}

.qtm-hledat input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.qtm-sec + .qtm-sec {
  margin-top: 6px;
}

.qtm-sec[hidden],
.qtm-row[hidden] {
  display: none;
}

.qtm-sh {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted-fg);
}

.qtm-sh i {
  font-style: normal;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-200);
  color: var(--text-light);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.qtm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 16px;
  transition: background .2s ease;
  animation: qtm-row .5s var(--ease) backwards;
  animation-delay: calc(80ms + var(--i, 0) * 28ms);
}

.qtm-row:hover {
  background: var(--surface-200);
}

@keyframes qtm-row { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.qtm-av {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  object-fit: cover;
  background: var(--surface-200);
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.qtm-row:hover span.qtm-av {
  background: var(--surface-300);
}

.qtm-who {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
}

.qtm-who b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qtm-who small {
  font-size: 12.5px;
  color: var(--text-muted-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qtm-ty {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-fg);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 15px;
}

.qtm-roles {
  flex: none;
  display: flex;
  gap: 4px;
  max-width: 45%;
  overflow: hidden;
}

.qtm-role {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-200);
  color: var(--text-light);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.qtm-ft {
  position: sticky;
  bottom: -14px;
  display: flex;
  justify-content: flex-end;
  margin: 8px -12px -14px;
  padding: 12px 20px 18px;
  background: linear-gradient(to bottom, transparent, var(--surface-100) 30%);
}

.qtm-ft .btn .material-icons-outlined {
  font-size: 18px;
}

.qtm-empty {
  padding: 36px 12px 44px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted-fg);
}

.qtm-load {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 10px 18px;
}

.qtm-load span {
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--surface-200), var(--surface-300), var(--surface-200));
  background-size: 200% 100%;
  animation: qtm-shimmer 1.2s linear infinite;
}

@keyframes qtm-shimmer { to { background-position: -200% 0; } }

@media (max-width: 768px) {
  .qtm-ov {
    align-items: flex-end;
    padding: 0;
  }

  .qtm {
    width: 100%;
    max-height: calc(100vh - 48px);
    border-radius: 28px 28px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    animation-name: qtm-up;
  }

  @keyframes qtm-up { from { transform: translateY(100%); } to { transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  .qtm-ov, .qtm, .qtm-row, .qtm-load span {
    animation: none !important;
  }
}


/* ---- Výběrové pole jako v Qerisu (js/components/vyber.js) ---------------------
   Systémový <select> zůstává schovaný pod tlačítkem; nabídka visí na <body>, aby ji
   neořízl modál ani posuvný seznam. Varianty: is-filter (bílé pilulky v lištách),
   is-compact (malé editory), vyb-cela (pole přes celou šířku jako form-control). */
select.vyb-skryty {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
}

.vyb {
  position: relative;
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.vyb.vyb-cela {
  display: flex;
  width: 100%;
}

.vyb-tl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px 8px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--surface-200);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s var(--ease);
}

.vyb-tl:hover:not(:disabled) {
  background: var(--surface-300);
}

.vyb-tl:active:not(:disabled) {
  transform: scale(.985);
}

.vyb.is-open .vyb-tl {
  border-color: rgba(var(--tint-fg-rgb), .12);
  background: var(--surface-100);
  box-shadow: 0 0 0 3px rgba(var(--tint-fg-rgb), .04);
}

.vyb-tl:disabled {
  cursor: default;
  opacity: .55;
}

.vyb-hodnota {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.vyb-hodnota > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vyb-hodnota.is-placeholder {
  color: var(--text-muted-fg);
}

.vyb-ic {
  flex: none;
  font-size: 17px;
  color: var(--text-light);
}

.vyb-sipka {
  flex: none;
  font-size: 18px;
  color: var(--text-muted-fg);
  transition: transform .25s var(--ease);
}

.vyb.is-open .vyb-sipka {
  transform: rotate(180deg);
}

.vyb.is-compact .vyb-tl {
  min-height: 34px;
  padding: 5px 8px 5px 10px;
  border-radius: 9px;
  font-size: 13px;
}

.vyb.is-filter {
  max-width: 240px;
}

.vyb.is-filter .vyb-tl {
  min-height: 36px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-100);
  box-shadow: var(--shadow-card);
  font-size: 13px;
  font-weight: 600;
}

.vyb.is-filter .vyb-tl:hover:not(:disabled) {
  background: var(--surface-100);
  box-shadow: var(--shadow-card-hover);
}

.vyb.is-filter.is-active .vyb-tl {
  background: var(--brand);
  color: var(--brand-fg);
}

.vyb.is-filter.is-active .vyb-sipka,
.vyb.is-filter.is-active .vyb-ic {
  color: var(--brand-fg);
  opacity: .75;
}

.sch-lens-wrap.vyb-hotovo .sch-lens-ic,
.sch-lens-wrap.vyb-hotovo .sch-lens-chev {
  display: none;
}

.vyb-menu {
  position: fixed;
  z-index: 30000;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(var(--tint-fg-rgb), .08);
  border-radius: 14px;
  background: var(--surface-overlay, var(--surface-100));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .14);
  transform-origin: top left;
  animation: vyb-pop .18s var(--ease) both;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.vyb-menu.nahoru {
  transform-origin: bottom left;
  animation-name: vyb-pop-nahoru;
}

.vyb-menu.is-out {
  animation: vyb-ven .12s ease forwards;
  pointer-events: none;
}

@keyframes vyb-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes vyb-pop-nahoru { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes vyb-ven { to { opacity: 0; transform: scale(.98); } }

.vyb-hledat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 0 10px;
  border-radius: 9px;
  background: var(--surface-200);
  color: var(--text-muted-fg);
}

.vyb-hledat .material-icons-outlined {
  font-size: 16px;
}

.vyb-hledat input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.vyb-pol {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.vyb-pol.is-active {
  background: var(--surface-200);
}

.vyb-pol.is-selected {
  font-weight: 600;
}

.vyb-pol.is-disabled {
  cursor: default;
  opacity: .45;
}

.vyb-pol-t {
  flex: 1;
  min-width: 0;
}

.vyb-pol-t small {
  display: block;
  margin-top: 1px;
  color: var(--text-muted-fg);
  font-size: 12px;
  font-weight: 400;
}

.vyb-fajfka {
  flex: none;
  font-size: 16px;
  color: var(--green);
}

.vyb-skupina {
  padding: 10px 10px 4px;
  color: var(--text-muted-fg);
  font-size: 11.5px;
  font-weight: 600;
}

.vyb-prazdne {
  padding: 10px;
  color: var(--text-muted-fg);
  font-size: 13px;
}

@media (max-width: 768px) {
  .vyb-tl {
    min-height: 44px;
    font-size: 16px;
  }

  .vyb-pol {
    min-height: 44px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vyb-menu, .vyb-menu.is-out, .vyb-sipka {
    animation: none;
    transition: none;
  }
}

/* ============================================================================
   SEGMENT S JEZDÍCÍ PILULKOU, KULATÉ IKONOVÉ TLAČÍTKO (Analytika, Streamy)
   Poloha pilulky jde z --gx/--gy/--gw/--gh, které nastavuje THEIS.jezdecDojed.
   Třída has-glide musí být už v HTML — kdyby ji přidal až skript, vybrané tlačítko
   by mezitím mělo vlastní pozadí a to by pohasínalo vedle jedoucí pilulky.
   ============================================================================ */

/* ⚠⚠ iOS (Safari i appka): pilulka s 3D posunem dostala vlastní vrstvu a v rolující
   liště (Banka „Vše · Fotky · Videa") se kreslila NAD textem — bílá pilulka bez popisku.
   Pořadí proto drží výslovně: vlastní kontext vrstvení, pilulka na nule, tlačítka nad ní
   ve vlastní vrstvě. Posun pilulky je 2D, takže v klidu vlastní vrstvu nemá. */
[data-glide] {
  position: relative;
  isolation: isolate;
}

[data-glide] > * {
  position: relative;
  z-index: 1;
  transform: translateZ(0);
}

[data-glide].has-glide::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: var(--gw, 0);
  height: var(--gh, 0);
  transform: translate(var(--gx, 0), var(--gy, 0));
  transition: transform 0.5s var(--ease), width 0.5s var(--ease), height 0.5s var(--ease);
  pointer-events: none;
}

[data-glide].no-tr::before {
  transition: none !important;
}

.q-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-200);
}

.q-seg.has-glide::before {
  border-radius: 999px;
  background: var(--surface-100);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(var(--tint-fg-rgb), 0.06);
}

.q-seg > button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted-fg);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s var(--ease);
}

.q-seg > button:hover,
.q-seg > button.on {
  color: var(--text);
}

.q-seg > button small {
  color: var(--text-muted-fg);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.q-ib {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-200);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.15s var(--ease);
}

.q-ib .material-icons-outlined {
  font-size: 19px;
}

.q-ib:hover:not(:disabled) {
  background: var(--surface-300);
  color: var(--text);
}

.q-ib:active:not(:disabled) {
  transform: scale(0.92);
}

.q-ib.on {
  background: var(--brand);
  color: var(--brand-fg);
}

.q-ib:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  [data-glide].has-glide::before {
    transition: none;
  }
}

/* ============================================================================
   PŘIHLÁŠENÍ (v1056)
   Na počítači dvě poloviny: vlevo tmavý panel se značkou a „dlaždicemi práce“
   (pixelová mřížka jako graf aktivity), vpravo samotný formulář. Na telefonu
   jen formulář. Tmavý panel je tmavý v obou vzhledech — je to značka, ne plocha.
   ============================================================================ */

#loginOverlay {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow-y: auto;
}

.lg {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  min-height: 100%;
}

.lg-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  margin: 12px;
  padding: 36px 40px 40px;
  overflow: hidden;
  border-radius: 28px;
  background: #0f0f10;
  color: #fff;
  animation: q-fade 0.8s var(--ease) both;
}

.lg-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lg-mark img {
  width: 26px;
  height: 26px;
}

.lg-brand .lg-mark b {
  color: #fff;
}

.lg-px {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  max-width: 480px;
}

.lg-px i {
  display: block;
  aspect-ratio: 1;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  animation: lgPx 0.6s var(--ease-spring) backwards;
  animation-delay: calc(var(--d, 0) * 18ms + 200ms);
}

.lg-px i.l1 { background: #1F4D2A; }
.lg-px i.l2 { background: #2A7A3A; }
.lg-px i.l3 { background: #3FA94A; }
.lg-px i.l4 { background: #3FC722; }
.lg-px i.l5 { background: #72DF4D; }

.lg-px i.tep {
  animation: lgPx 0.6s var(--ease-spring) backwards, lgTep 3.2s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 18ms + 200ms), calc(var(--t, 0) * 1s + 1.5s);
}

@keyframes lgPx {
  from { opacity: 0; transform: scale(0.3); }
}

@keyframes lgTep {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.lg-brand-t {
  max-width: 420px;
}

.lg-brand-t b {
  display: block;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.lg-brand-t span {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  line-height: 1.55;
}

.lg-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px 24px;
}

.lg-card {
  width: 100%;
  max-width: 380px;
  animation: q-rise 0.6s var(--ease) 80ms backwards;
}

.lg-card.lg-swap {
  animation: lgSwap 0.45s var(--ease) both;
}

@keyframes lgSwap {
  from { opacity: 0.2; transform: translate3d(0, 8px, 0); }
}

.lg-mark-m {
  display: none;
  margin-bottom: 28px;
}

.lg-h1 {
  margin: 0;
  color: var(--text);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.lg-p {
  margin: 8px 0 26px;
  color: var(--text-muted-fg);
  font-size: 15px;
  line-height: 1.5;
}

.lg-oauth {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s var(--ease), box-shadow 0.25s var(--ease);
}

.lg-btn:active {
  transform: scale(0.98);
}

.lg-btn img {
  width: 18px;
  height: 18px;
}

.lg-apple {
  background: var(--brand);
  color: var(--brand-fg);
}

.lg-apple:hover {
  opacity: 0.88;
}

.lg-google {
  background: var(--surface-100);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.lg-google:hover {
  box-shadow: var(--shadow-card-hover);
}

.lg-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-muted-fg);
  font-size: 13px;
  font-weight: 500;
}

.lg-or::before,
.lg-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-muted);
}

html.no-native-oauth #loginOr {
  display: none !important;
}

.lg-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lg-f {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lg-f span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.lg-f input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-100);
  box-shadow: var(--shadow-card);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: box-shadow 0.2s var(--ease);
}

.lg-f input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--text);
}

.lg-f input:-webkit-autofill,
.lg-f input:-webkit-autofill:hover,
.lg-f input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 100px var(--surface-100) inset, var(--shadow-card);
  caret-color: var(--text);
}

.lg-f input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px var(--surface-100) inset, 0 0 0 2px var(--text);
}

.lg-f input::placeholder {
  color: var(--text-muted-fg);
}

.lg-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-fg);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s var(--ease);
}

.lg-submit:hover:not(:disabled) {
  opacity: 0.88;
}

.lg-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.lg-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.lg-submit .material-icons-outlined {
  font-size: 19px;
}

.lg-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-200);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.lg-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
  color: var(--text-muted-fg);
  font-size: 14px;
}

.lg-switch a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.lg-switch a:hover {
  text-decoration: underline;
}

.lg-legal {
  max-width: 380px;
  margin: 0;
  color: var(--text-muted-fg);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.lg-legal {
  display: flex;
  gap: 8px;
}

.lg-legal a {
  color: var(--text-muted-fg);
  text-decoration: none;
}

.lg-legal a:hover {
  color: var(--text);
}

@media (max-width: 900px) {
  .lg {
    grid-template-columns: minmax(0, 1fr);
  }

  .lg-brand {
    display: none;
  }

  .lg-mark-m {
    display: inline-flex;
  }

  .lg-main {
    justify-content: flex-start;
    padding: calc(48px + env(safe-area-inset-top, 0px)) 20px calc(32px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .lg-brand,
  .lg-card,
  .lg-card.lg-swap,
  .lg-px i,
  .lg-px i.tep {
    animation: none !important;
  }
}

/* ============================================================================
   ZAMČENÉ A UVÍTACÍ OBRAZOVKY (v1056)
   „Účet čeká na schválení", „Díky za zájem", údržba — jedna stavba: logo, ikona
   v dlaždici, nadpis, věta, pilulky. Světlá plocha místo černé clony.
   ============================================================================ */

.qz {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background: var(--bg);
}

.qz-obal {
  width: 100%;
  max-width: 480px;
  text-align: center;
  animation: q-rise 0.6s var(--ease) backwards;
}

.qz-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.qz-logo img {
  width: 26px;
  height: 26px;
}

.qz-ic {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 22px;
  background: var(--surface-100);
  box-shadow: var(--shadow-card);
  color: var(--text-secondary);
}

.qz-ic .material-icons-outlined {
  font-size: 34px;
}

.qz-ic.ceka .material-icons-outlined {
  color: #c27b00;
}

.qz-ic.ok .material-icons-outlined {
  color: var(--green);
}

.qz-ic.chyba .material-icons-outlined {
  color: var(--error);
}

.qz-h1 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.qz-p {
  margin: 12px auto 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}

.qz-akce {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.qz-tl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-100);
  box-shadow: var(--shadow-card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.25s var(--ease), transform 0.15s var(--ease), opacity 0.2s;
}

.qz-tl:hover {
  box-shadow: var(--shadow-card-hover);
}

.qz-tl:active {
  transform: scale(0.97);
}

.qz-tl .material-icons-outlined {
  font-size: 18px;
}

.qz-tl--cerna {
  background: var(--brand);
  box-shadow: none;
  color: var(--brand-fg);
}

.qz-tl--cerna:hover {
  box-shadow: none;
  opacity: 0.88;
}

#maintenanceOverlay .qz-obal {
  margin: auto;
}

@media (prefers-reduced-motion: reduce) {
  .qz-obal {
    animation: none;
  }
}

/* TikTok: označení obsahu a interakce (v1123). Sdílené detailem příspěvku i plánovačem videí
   (THEIS.ttOznaceniHTML / ttInterakceHTML v posts.js). Podklad je poloprůhledný, aby byl
   vidět na bílé kartě počítače i na šedé kartě telefonu. */
.tt-blok { display: flex; flex-direction: column; gap: 10px; }
.tt-prepinac {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 0; border-radius: 16px;
  background: color-mix(in srgb, var(--text-primary) 5%, transparent); color: var(--text-primary);
  font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s ease;
}
.tt-prepinac:hover { background: color-mix(in srgb, var(--text-primary) 8%, transparent); }
.tt-prepinac:focus-visible, .tt-karta:focus-visible, .tt-volba:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }
.tt-prepinac-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tt-prepinac-t b { font-size: 14px; font-weight: 600; }
.tt-prepinac-t span { font-size: 12px; line-height: 1.35; color: var(--text-muted-fg, var(--text-muted)); }
.tt-switch { flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px;
  background: color-mix(in srgb, var(--text-primary) 18%, transparent); transition: background .25s var(--ease); }
.tt-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.tt-prepinac.on .tt-switch { background: var(--success); }
.tt-prepinac.on .tt-switch::after { transform: translateX(18px); }
.tt-karty { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .tt-karty { grid-template-columns: 1fr; } }
.tt-karta {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 0; border-radius: 16px;
  background: color-mix(in srgb, var(--text-primary) 5%, transparent); color: var(--text-primary);
  font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1.5px transparent;
  -webkit-tap-highlight-color: transparent; transition: box-shadow .2s ease, background .2s ease;
}
.tt-karta.on { background: var(--surface-100); box-shadow: inset 0 0 0 1.5px var(--text-primary); }
.tt-karta-ik { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text-primary) 28%, transparent); transition: background .2s ease, box-shadow .2s ease; }
.tt-karta-ik .material-icons-outlined { font-size: 16px; color: var(--brand-fg); opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .3s var(--ease); }
.tt-karta.on .tt-karta-ik { background: var(--brand); box-shadow: none; }
.tt-karta.on .tt-karta-ik .material-icons-outlined { opacity: 1; transform: none; }
.tt-karta-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tt-karta-t b { font-size: 13px; font-weight: 600; line-height: 1.3; }
.tt-karta-t span { font-size: 11.5px; color: var(--text-muted-fg, var(--text-muted)); }
.tt-stav { font-size: 12.5px; line-height: 1.4; color: var(--text-muted-fg, var(--text-muted)); }
.tt-stav b { color: var(--text-primary); font-weight: 600; }
.tt-stav.warn { color: #C8862B; }
.tt-volby { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tt-volba {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 64px; padding: 0 8px;
  border: 0; border-radius: 16px; background: color-mix(in srgb, var(--text-primary) 6%, transparent); color: var(--text-primary);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .2s ease, color .2s ease, transform .15s var(--ease);
}
.tt-volba .material-icons-outlined { font-size: 20px; }
.tt-volba:active { transform: scale(.96); }
.tt-volba.on { background: var(--brand); color: var(--brand-fg); }
.tt-volba.zam { cursor: not-allowed; color: var(--text-muted-fg, var(--text-muted)); background: color-mix(in srgb, var(--text-primary) 4%, transparent); }
.tt-pozn { margin-top: 8px; font-size: 12px; line-height: 1.4; color: var(--text-muted-fg, var(--text-muted)); }
@media (prefers-reduced-motion: reduce) { .tt-switch, .tt-switch::after, .tt-karta, .tt-volba, .tt-karta-ik .material-icons-outlined { transition: none; } }
