/* ============================================================
   PERUN — skin "Atlas" v1
   Úplne nový vzhľad: svetlý, vzdušný, navigácia v hornom menu
   (rozbaľovacie mega-menu namiesto čierneho sidebaru), veľké biele
   karty s mäkkým tieňom, pastelové stavové dlaždice, písmo Plus
   Jakarta Sans. Na mobile spodná lišta + celoobrazovkové menu.

   Načítava sa po perun-nova.css (tá dodáva funkčný základ: tabuľky,
   modály, mobilné opravy). Štruktúru (hlavička, menu) stavia
   perun-atlas.js zo sidebaru — sidebar ostáva v DOM ako zdroj pravdy.

   Rollback bez zásahu do kódu:
     • /?skin=nova      — predošlý tmavý vzhľad (cookie, per prehliadač)
     • /?skin=classic   — pôvodný Warm Studio v5
     • PERUN_UI_SKIN=nova v .env + systemctl restart perun-push.service
   ============================================================ */

/* ---------- 1. TOKENY ---------- */
:root {
  --font-ui: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  color-scheme: light;
  --bg:            #f6f7f9;
  --bg-elevated:   #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #fafbfc;
  --bg-input:      #f2f4f7;
  --bg-hover:      #f4f5f8;
  --bg-subtle:     #f9fafb;
  --border:        #eaecf0;
  --border-strong: #d0d5dd;
  --text:          #101828;
  --text-dim:      #98a2b3;
  --text-muted:    #667085;

  --accent:        #5b4cf0;
  --accent-2:      #0ea5e9;
  --accent-hover:  #4a3bd9;
  --accent-soft:   #f0eeff;
  --accent-glow:   0 0 0 4px rgba(91,76,240,.14);
  --accent-grad:   linear-gradient(135deg, #5b4cf0 0%, #7c6cff 100%);

  --ok:            #079455;
  --ok-soft:       #ecfdf3;
  --warn:          #dc6803;
  --warn-soft:     #fffaeb;
  --crit:          #d92d20;
  --crit-soft:     #fef3f2;
  --unkn:          #7a5af8;
  --unkn-soft:     #f4f3ff;
  --gpu:           #0891b2;   /* GPU tyrkysová, CPU = fialový akcent — nesmú splynúť */

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.05);
  --shadow-lift: 0 12px 24px -6px rgba(16,24,40,.10), 0 4px 8px -4px rgba(16,24,40,.05);
  --shadow-pop:  0 24px 48px -12px rgba(16,24,40,.22), 0 0 0 1px rgba(16,24,40,.05);

  --header-h: 64px;
  --tabbar-h: 66px;
  --content-max: 1680px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:            #0e0f12;
  --bg-elevated:   #1a1c21;
  --bg-card:       #16181c;
  --bg-card-hover: #1c1f24;
  --bg-input:      #20232a;
  --bg-hover:      #1f2228;
  --bg-subtle:     #1a1c21;
  --border:        #262a31;
  --border-strong: #363b45;
  --text:          #f2f4f7;
  --text-dim:      #667085;
  --text-muted:    #98a2b3;

  --accent:        #9b8cff;
  --accent-2:      #38bdf8;
  --accent-hover:  #b3a8ff;
  --accent-soft:   rgba(155,140,255,.14);
  --accent-glow:   0 0 0 4px rgba(155,140,255,.22);
  --accent-grad:   linear-gradient(135deg, #7c6cff 0%, #9b8cff 100%);

  --ok:            #47cd89;
  --ok-soft:       rgba(71,205,137,.12);
  --warn:          #fdb022;
  --warn-soft:     rgba(253,176,34,.12);
  --crit:          #f97066;
  --crit-soft:     rgba(249,112,102,.13);
  --unkn:          #bdb4fe;
  --unkn-soft:     rgba(189,180,254,.12);
  --gpu:           #22d3ee;

  --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 1px 3px rgba(0,0,0,.4);
  --shadow-lift: 0 16px 32px -8px rgba(0,0,0,.6);
  --shadow-pop:  0 24px 56px -12px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.06);
}

/* ---------- 2. ZÁKLAD ---------- */
body { font: 14px/1.55 var(--font-ui); background: var(--bg); letter-spacing: -.005em; }
b, strong, [style*="font-weight:700"], [style*="font-weight: 700"], [style*="font-weight:800"], [style*="font-weight:bold"] { font-weight: 650 !important; }

/* ---------- 3. ROZLOŽENIE: hlavička hore, žiadny sidebar ---------- */
.app {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  height: 100vh; height: 100dvh;
}
.app > .sidebar, #mob-overlay, #mob-nav-toggle { display: none !important; }
.main { background: var(--bg); grid-template-rows: minmax(0, 1fr); }
.content { padding: 0 40px 64px; }
.content > * { max-width: var(--content-max); margin-left: auto; margin-right: auto; }

/* ---------- 4. HLAVIČKA ---------- */
.at-header {
  position: relative; z-index: 300;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.at-header-inner {
  height: var(--header-h); max-width: calc(var(--content-max) + 80px); margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; gap: 28px;
}
.at-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; cursor: pointer; }
.at-brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.at-brand b { font-size: 16px; font-weight: 800 !important; letter-spacing: .02em; color: var(--text); }

.at-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; }
.at-tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  font-size: 14px; font-weight: 550; color: var(--text-muted); white-space: nowrap;
  transition: background .15s, color .15s;
}
.at-tab:hover, .at-tab[aria-expanded="true"] { background: var(--bg-hover); color: var(--text); }
.at-tab.active { color: var(--text); font-weight: 650; }
.at-tab.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: calc((36px - var(--header-h)) / 2);
  height: 2px; border-radius: 2px; background: var(--accent);
}
.at-tab .at-chev { width: 14px; height: 14px; opacity: .6; transition: transform .2s; }
.at-tab[aria-expanded="true"] .at-chev { transform: rotate(180deg); }
.at-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 2px var(--bg-elevated); }

.at-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.at-tools .search-box {
  flex: 0 1 300px; width: 300px; height: 38px; border-radius: 10px;
  background: var(--bg-input); border: 1px solid transparent; box-shadow: none;
}
.at-tools .search-box:focus-within { background: var(--bg-elevated); border-color: var(--accent); box-shadow: var(--accent-glow); }
.at-tools .topbar-actions { margin: 0; gap: 8px; }
.at-iconbtn {
  position: relative; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: background .15s, color .15s;
}
.at-iconbtn:hover { background: var(--bg-hover); color: var(--text); }
.at-iconbtn svg { width: 20px; height: 20px; }
.at-iconbtn .at-count {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: var(--crit); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-elevated);
}
.at-count:empty, .at-count[data-n="0"] { display: none; }
.at-tools .btn-ghost, .at-tools .nv-palette-btn {
  height: 38px; border-radius: 10px; border: none; background: transparent; color: var(--text-muted); font-weight: 550;
}
.at-tools .btn-ghost { box-shadow: none; }
.at-tools .btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.topbar-avatar {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  background: var(--accent-grad); color: #fff; font-weight: 700; font-size: 12.5px;
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px var(--accent-soft);
}
.at-ws { position: relative; }
.at-ws::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--text-dim); box-shadow: 0 0 0 2px var(--bg-elevated);
}
.at-ws[data-ws="connected"]::after { background: var(--ok); }
.at-ws[data-ws="disconnected"]::after { background: var(--crit); }

/* ---------- 5. ROZBAĽOVACIE MENU (mega-menu, užívateľ, notifikácie) ---------- */
.at-pop {
  position: fixed; z-index: 1000; display: none;
  background: var(--bg-elevated); border-radius: 16px; box-shadow: var(--shadow-pop);
  padding: 10px; max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto;
  animation: atPop .16s cubic-bezier(.2,.8,.2,1);
}
.at-pop.open { display: block; }
@keyframes atPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.at-mega { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 4px; }
.at-mega-col { padding: 6px; }
.at-mega-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dim); padding: 6px 10px 8px;
}
.at-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 550; color: var(--text); text-align: left;
  transition: background .12s;
}
.at-link:hover { background: var(--bg-hover); }
.at-link.active { background: var(--accent-soft); color: var(--accent); }
.at-link-ico {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-input); color: var(--text-muted);
}
.at-link.active .at-link-ico, .at-link:hover .at-link-ico { background: var(--bg-elevated); color: var(--accent); box-shadow: var(--shadow-card); }
.at-link-ico svg { width: 16px; height: 16px; }
.at-link-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-link-ext { width: 14px; height: 14px; color: var(--text-dim); }
.at-link-badge {
  font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  background: var(--crit-soft); color: var(--crit);
}

.at-user { width: 280px; }
.at-user-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.at-user-head .topbar-avatar { cursor: default; }
.at-user-name { font-weight: 700; font-size: 14.5px; }
.at-user-ws { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.at-user-ws i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); }
.at-user-ws[data-ws="connected"] i { background: var(--ok); }
.at-user-ws[data-ws="disconnected"] i { background: var(--crit); }
.at-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.at-link.at-danger { color: var(--crit); }
.at-link.at-danger .at-link-ico { color: var(--crit); }

/* notifikácie "Čo pribudlo" — pôvodný #unread-center ako popover */
.at-unread.unread-center {
  display: none; position: fixed; z-index: 1000; top: calc(var(--header-h) + 8px); right: 24px;
  width: 380px; max-height: 70vh; border: none; border-radius: 16px; box-shadow: var(--shadow-pop);
}
.at-unread.unread-center.open { display: block; animation: atPop .16s cubic-bezier(.2,.8,.2,1); }
.at-unread .unread-toggle { display: none; }
.at-unread .unread-head { font-size: 15px; font-weight: 700; padding: 16px 18px; }
.at-unread .unread-item { padding: 11px 12px; border-radius: 10px; font-size: 13.5px; }

/* ---------- 6. HLAVIČKA STRÁNKY (bývalý topbar, teraz súčasť obsahu) ---------- */
.content > .topbar {
  position: static; height: auto; background: none; border: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 36px 0 24px; display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap;
}
.content > .topbar .topbar-title { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1 1 auto; }
.content > .topbar #page-title { font-size: 30px; line-height: 1.15; font-weight: 750; letter-spacing: -.03em; white-space: normal; max-width: none; }
.content > .topbar .topbar-subtitle { display: block !important; font-size: 15px; color: var(--text-muted); max-width: 70ch; white-space: normal; }
.at-greet { font-size: 14px; font-weight: 600; color: var(--accent); }
.at-greet[hidden] { display: none; }

.content > .topbar .topbar-live {
  /* živé čísla klastra: vlastný riadok na celú šírku, dlaždice sa prispôsobia šírke
     (široký monitor = všetky v rade, užší = 3–4 stĺpce, mobil = 2 stĺpce) */
  display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
  flex: 1 1 100%; width: 100%; padding: 0; background: none; border: none; box-shadow: none; overflow: visible;
}
.content > .topbar .topbar-live .tl-item {
  display: flex !important; flex-direction: column; justify-content: center; gap: 4px; min-width: 0;
  padding: 14px 18px; border-radius: 14px;
  background: var(--bg-card); box-shadow: var(--shadow-card); border: 1px solid var(--border);
}
.content > .topbar .tl-label { font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content > .topbar .tl-val { font-family: var(--font-ui); font-size: clamp(20px, 1.6vw, 26px); line-height: 1.15; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.content > .topbar .tl-updated, .content > .topbar .tl-trend { display: none !important; }

/* ---------- 7. KARTY ---------- */
.sl-card, .card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); margin-bottom: 24px;
}
.card-header-row, .sl-card-header, .card-header { padding: 20px 24px 4px; border-bottom: none; gap: 10px; }
.card-title, .sl-card-header-title { font-size: 16px; font-weight: 700; letter-spacing: -.015em; gap: 10px; }
.card-title svg:not([data-x]) { width: 18px; height: 18px; color: var(--accent); }
.sl-card-body, .card-body { padding: 16px 24px 24px; }
.grid-2, .two-col, .three-col { gap: 24px; }
.sl-card-over { box-shadow: var(--shadow-card), inset 4px 0 0 var(--crit); }
.sl-card-warn { box-shadow: var(--shadow-card), inset 4px 0 0 var(--warn); }
.insights-section-heading { border-bottom: none; margin: 40px 0 16px; }
.insights-section-heading .ish-title { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }

/* ---------- 8. ČÍSELNÉ DLAŽDICE — pastelové ---------- */
.sl-stats, .stats { gap: 16px; margin-bottom: 24px; }
.sl-stat, .stat, .stat-period-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px; box-shadow: var(--shadow-card);
}
.sl-stat-label, .stat-label, .stat-period-label {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--text-muted); margin-bottom: 10px;
}
.sl-stat-value, .stat-value, .stat-period-value {
  font-family: var(--font-ui); font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.sl-stat .sl-stat-value, .stat .stat-value { font-size: clamp(20px, 15cqi, 34px); }
.sl-stat[class*="sl-stat-"], .stat-crit, .stat-warn, .stat-ok, .stat-gpu {
  background: color-mix(in srgb, var(--tone) 7%, var(--bg-card));
  border-color: color-mix(in srgb, var(--tone) 18%, var(--border));
  box-shadow: var(--shadow-card);
}
.sl-stat[class*="sl-stat-"] .sl-stat-label, .stat-crit .stat-label, .stat-warn .stat-label, .stat-ok .stat-label, .stat-gpu .stat-label {
  color: color-mix(in srgb, var(--tone) 75%, var(--text));
}
.stat-clickable:hover, #overview-kpi-grid .stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

/* prehľad klastra: samostatné dlaždice namiesto pruhov v jednom paneli */
#overview-kpi-grid { gap: 16px !important; }
#overview-kpi-grid .stat {
  background: var(--bg-subtle); border: 1px solid var(--border) !important; border-radius: 14px; padding: 18px 20px;
}
#overview-kpi-grid .stat + .stat { border-left: 1px solid var(--border) !important; border-top: 1px solid var(--border) !important; }
#overview-kpi-grid .stat-value { font-family: var(--font-ui) !important; font-size: 22px !important; font-weight: 750; }

/* stavový pás "čo horí teraz" — banner */
.nv-strip {
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card);
  box-shadow: var(--shadow-card); overflow: hidden; margin-bottom: 24px;
}
.nv-strip-cell small { font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.nv-strip-cell b { font-family: var(--font-ui); font-size: 26px; font-weight: 750; }
.nv-strip-ov-text b { font-size: 17px; font-weight: 750; }

/* ---------- 9. TABUĽKY ---------- */
.sl-table, .alerts-table { font-size: 13.5px; }
.sl-table th, .alerts-table th {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--text-muted); background: var(--bg-subtle); padding: 11px 16px; border-bottom: 1px solid var(--border);
  backdrop-filter: none;
}
.sl-table td, .alerts-table td { padding: 13px 16px; border-bottom-color: var(--border); }
.sl-table tbody tr:hover, .alerts-table tbody tr:hover { background: var(--bg-subtle); }
.card-body > .scroll-x, .sl-card-body > .sl-tbl-wrap { border-radius: 12px; }
.td-time { font-family: var(--font-ui); font-size: 12.5px; }

/* ---------- 10. TLAČIDLÁ, PREPÍNAČE, ŠTÍTKY ---------- */
.btn-ghost, .sl-btn, .sl-back, .fbtn, .icon-btn {
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-card);
  color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.btn-ghost:hover, .sl-btn:hover, .sl-back:hover, .fbtn:hover, .icon-btn:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.fbtn.active, .fbtn[data-active="true"] { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary, .login-submit {
  background: var(--accent); border-radius: 10px; font-weight: 650;
  box-shadow: 0 1px 2px rgba(16,24,40,.08), inset 0 -1px 0 rgba(0,0,0,.12);
}
.btn-primary:hover, .login-submit:hover { background: var(--accent-hover); filter: none; }

.period-toggle { background: var(--bg-input) !important; padding: 4px !important; border-radius: 12px; gap: 2px; }
.period-btn, .period-btn-sm { border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--text-muted); padding: 6px 13px; }
.period-btn:hover { background: transparent; color: var(--text); }
.period-btn.active, .period-btn.active:hover, .period-btn-sm.active {
  background: var(--bg-elevated); color: var(--text); box-shadow: 0 1px 3px rgba(16,24,40,.12), 0 1px 2px rgba(16,24,40,.06);
}

.sl-badge, .badge { font-family: var(--font-ui); font-size: 12px; font-weight: 650; letter-spacing: 0; padding: 2px 10px; border: none; }
.s-ok, .s-warning, .s-critical, .s-unknown { border: none; padding-left: 19px; }
.s-ok::before, .s-warning::before, .s-critical::before, .s-unknown::before { left: 8px; width: 6px; height: 6px; margin-top: -3px; box-shadow: none; }

.sl-progress, .sl-usage-bar, .host-bar, .mttr-bar, .sla-bar-wrap, .week-bar-wrap { background: var(--bg-input); }
.sl-progress-bar, .host-bar-fill, .mttr-fill, .sla-bar-fill, .week-bar-fill { background: var(--accent); }

.sl-search, input.sl-search, .sl-select, .filter-input,
:where(.content, .sl-modal, .text-modal) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea) {
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-card);
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.filter-label { font-family: var(--font-ui); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }

/* modály */
.sl-modal, .text-modal { border-radius: 20px !important; border: none !important; box-shadow: var(--shadow-pop) !important; }

/* ---------- 11. PRIHLÁSENIE ---------- */
.login-card, .login-box { border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow-lift); }

/* ============================================================
   12. MOBIL (≤ 900 px)
   ============================================================ */
.at-tabbar, .at-sheet, .at-search-btn { display: none; }

@media (max-width: 1280px) {
  .at-header-inner { gap: 16px; padding: 0 24px; }
  .content { padding: 0 24px 56px; }
  .at-tools .search-box { width: 220px; flex-basis: 220px; }
  .at-tab { padding: 0 10px; }
}
@media (max-width: 1100px) {
  .at-tools .search-box { width: 44px; flex-basis: 44px; padding: 0 12px; transition: width .2s; }
  .at-tools .search-box input::placeholder { color: transparent; }
  .at-tools .search-box:focus-within { width: 280px; }
  #btn-kbd { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 58px; }
  .at-tabs { display: none; }
  .at-header-inner { padding: 0 16px; gap: 10px; padding-top: env(safe-area-inset-top, 0px); height: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
  .at-tools { gap: 4px; }
  .at-tools .nv-palette-btn { display: none; }
  .at-tools .search-box:focus-within { position: absolute; left: 12px; right: 12px; width: auto; z-index: 5; }

  .content { padding: 0 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom, 0px)); }
  .content > .topbar { padding: 22px 0 16px; gap: 14px; }
  .content > .topbar #page-title { font-size: 25px; }
  .content > .topbar .topbar-subtitle { font-size: 14px; }
  .content > .topbar .topbar-live { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
  .content > .topbar .topbar-live .tl-item { padding: 12px 14px; border-radius: 14px; }
  .content > .topbar .tl-label { font-size: 12.5px; }
  .content > .topbar .tl-val { font-size: 21px; }

  .sl-card, .card { border-radius: 16px; margin-bottom: 16px; }
  .card-header-row, .sl-card-header, .card-header { padding: 16px 16px 2px; }
  .sl-card-body, .card-body { padding: 12px 16px 16px; }
  .sl-stat, .stat, .stat-period-card { padding: 16px; border-radius: 16px; }
  .sl-stats, .stats { gap: 12px; }
  #overview-kpi-grid { gap: 10px !important; }
  .at-unread.unread-center { left: 12px; right: 12px; width: auto; }
  .toasts { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; max-width: none; }

  /* spodná lišta */
  .at-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding: 6px 8px env(safe-area-inset-bottom, 0px);
    background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
    backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--border);
  }
  .at-tabbar button {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: var(--text-dim); font-size: 11px; font-weight: 650; -webkit-tap-highlight-color: transparent;
  }
  .at-tabbar svg { width: 23px; height: 23px; transition: transform .15s; }
  .at-tabbar button:active svg { transform: scale(.88); }
  .at-tabbar button.active { color: var(--accent); }
  .at-tabbar .at-count { position: absolute; top: 2px; left: calc(50% + 5px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--crit); color: #fff; font-size: 10.5px; line-height: 17px; box-shadow: 0 0 0 2px var(--bg-elevated); }

  /* celoobrazovkové menu */
  .at-sheet {
    display: block; position: fixed; inset: 0; z-index: 290; overflow-y: auto;   /* pod hlavičkou (300) aj lištou (400) */
    background: var(--bg); padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 8px) 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom, 0px));
    transform: translateY(16px); opacity: 0; visibility: hidden; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s, visibility 0s .22s;
  }
  .at-sheet.open { transform: none; opacity: 1; visibility: visible; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s; }
  .at-sheet-group { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 6px; margin-bottom: 14px; box-shadow: var(--shadow-card); }
  .at-sheet-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); padding: 22px 6px 8px; }
  .at-sheet .at-link { padding: 11px 10px; font-size: 15px; }
  .at-sheet .at-link + .at-link { border-top: 1px solid var(--border); border-radius: 0; }
  .at-sheet .at-link:first-child { border-radius: 12px 12px 0 0; }
  .at-sheet .at-link:last-child { border-radius: 0 0 12px 12px; }
  .at-sheet .at-link:only-child { border-radius: 12px; }
  body.at-sheet-open { overflow: hidden; }
}
@media (max-width: 520px) {
  .at-brand b { display: none; }
  .content > .topbar #page-title { font-size: 23px; }
}

@media print {
  .at-header, .at-tabbar, .at-sheet { display: none !important; }
  .content > .topbar { padding-top: 0; }
}
