@import url("../design/fonts/fonts.f9125eb80289.css");
@import url("../design/tokens.5bc01516597c.css");

/* TSS Live – portál podľa dizajn manuálu v1 (docs/DIZAJN.md). Hodnoty sú v design/tokens.css (--tl-*);
   staré názvy premenných zostávajú ako aliasy (používajú ich šablóny aj náhľad návrhov preview.css). */
:root {
  --blue: var(--tl-primary);
  --blue-2: var(--tl-focus);
  --blue-dark: var(--tl-primary-hover);
  --gray: var(--tl-text);
  --bg: var(--tl-bg);
  --surface: var(--tl-surface);
  --surface-2: var(--tl-surface-2);
  --border: var(--tl-border);
  --text: var(--tl-text);
  --muted: var(--tl-text-muted);
  --sidebar-bg: var(--tl-navy);
  --sidebar-fg: #d9e6f2;
  --sidebar-muted: #8ea7bf;
  --ok: var(--tl-ok);
  --ok-bg: var(--tl-ok-bg);
  --warn: var(--tl-warn);
  --warn-bg: var(--tl-warn-bg);
  --err: var(--tl-err);
  --err-bg: var(--tl-err-bg);
  --info-bg: var(--tl-info-bg);
  --radius: var(--tl-radius-lg);
  --radius-sm: var(--tl-radius-md);
  --shadow: var(--tl-shadow-1);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--tl-font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.75rem; color: var(--gray); }
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; font-weight: 600; }
code { font-size: 0.85em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }

/* --- rozloženie --- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  padding: 1rem 0.75rem 2rem;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  border-right: 1px solid color-mix(in srgb, var(--tl-border) 60%, transparent);
}
.sidebar__brand { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.5rem 1rem; color: #fff; font-weight: 700; font-size: 1.1rem; }
.sidebar__brand img { height: 32px; width: auto; display: block; }
.sidebar__brand:hover { text-decoration: none; }

.company-switch { padding: 0.5rem; margin-bottom: 0.5rem; background: rgba(255, 255, 255, 0.06); border-radius: var(--radius-sm); }
.company-switch label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sidebar-muted); margin-bottom: 0.25rem; }
.company-switch select { width: 100%; padding: 0.4rem; border-radius: var(--radius-sm); border: 0; font: inherit; font-size: 0.9rem; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav__group { margin: 1rem 0.5rem 0.25rem; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sidebar-muted); }
.nav__group--platform { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.12); color: #f6c26b; }
.nav__item { display: block; padding: 0.45rem 0.75rem; border-radius: var(--radius-sm); color: var(--sidebar-fg); font-size: 0.92rem; }
.nav__item:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.nav__item.is-active { background: var(--tl-blue); color: #fff; font-weight: 700; }
.nav__item.is-disabled { opacity: 0.45; cursor: default; }
.sidebar__footer { margin-top: 1.5rem; padding: 1rem 0.5rem 0; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.85rem; }
.sidebar__footer a { color: var(--sidebar-muted); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar__menu { display: none; border: 0; background: none; font-size: 1.4rem; cursor: pointer; }
.topbar__context { flex: 1; font-weight: 600; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__user { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.topbar__name { color: var(--muted); }
.topbar__link { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }

.lang-switch { display: flex; gap: 0.25rem; }
.lang-switch--center { justify-content: center; margin-top: 1.5rem; }
.lang-switch__item {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.45rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; font-size: 0.75rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.lang-switch__item img { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.lang-switch__item.is-active { border-color: var(--blue); color: var(--blue); background: var(--info-bg); }

.content { padding: 1.5rem; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.page-head__actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* --- komponenty --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.card--narrow { max-width: 640px; }
.card--danger { border-color: var(--tl-err); }
.card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.card__head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.grid-2 .card { margin-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stats--compact { grid-template-columns: repeat(auto-fit, minmax(120px, 180px)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem; box-shadow: var(--shadow); }
.stat__value { display: block; font-size: 1.6rem; font-weight: 700; color: var(--gray); }
.stat__label { font-size: 0.8rem; color: var(--muted); }
.stat--live .stat__value { color: var(--ok); }
.stat--offline .stat__value { color: var(--err); }
.stat--warn .stat__value { color: var(--warn); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.muted { color: var(--muted); font-size: 0.85em; }
.empty { color: var(--muted); padding: 1rem 0; margin: 0; }
.list-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); font-size: 0.85rem; }
.facts dd { margin: 0; }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge--live, .badge--active { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge--offline, .badge--account_disabled, .badge--suspended, .badge--ended { background: var(--err-bg); color: var(--err); border-color: transparent; }
.badge--warn, .badge--invited, .badge--new { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge--disabled, .badge--inactive, .badge--unknown { background: var(--surface-2); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.5rem 0.95rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--gray); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn--primary { background: var(--blue); border-color: var(--blue); color: var(--tl-on-primary); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--danger { background: var(--err); border-color: var(--err); color: var(--tl-on-primary); }
.btn--light { background: #fff; color: var(--gray); }
.btn--sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.btn--block { width: 100%; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.filters input, .filters select { padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; background: var(--surface); }
.filters input[type="search"] { min-width: 240px; flex: 1; max-width: 360px; }

.form { display: flex; flex-direction: column; gap: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--gray); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; background: var(--surface); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-2); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tl-focus) 35%, transparent); }
.field--check label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.field--error input, .field--error select { border-color: var(--err); }
.field__help { margin: 0.3rem 0 0; font-size: 0.8rem; color: var(--muted); }
.field__error { margin: 0.3rem 0 0; font-size: 0.8rem; color: var(--err); font-weight: 600; }
.req { color: var(--err); }
.form__actions { display: flex; gap: 0.5rem; justify-content: flex-end; }

.alert { padding: 0.7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 0.75rem; font-size: 0.9rem; background: var(--info-bg); word-break: break-word; }
.alert--success { background: var(--ok-bg); color: var(--tl-ok); }
.alert--warning { background: var(--warn-bg); color: var(--tl-warn); }
.alert--error { background: var(--err-bg); color: var(--tl-err); }
.pager { display: flex; gap: 0.75rem; align-items: center; justify-content: center; padding-top: 1rem; }

.support-band {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.6rem 1rem; background: #b3261e; color: #fff; font-size: 0.9rem;
}
.support-band form { margin: 0; }

.form__actions--start { justify-content: flex-start; flex-wrap: wrap; margin-top: 0.75rem; }
.copy-row { display: flex; gap: 0.5rem; }
.copy-row input { flex: 1; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.8rem; }
textarea.code { width: 100%; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.8rem; padding: 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); resize: vertical; }
.section-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 1rem; position: sticky; top: 56px; z-index: 5; background: var(--bg); padding-block: 0.4rem; }
.section-nav a { padding: 0.35rem 0.75rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; }
.presets { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin: 0.5rem 0 0.75rem; }
.timeline { margin: 0.5rem 0 1rem; }
.timeline__bar { position: relative; height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--surface-2) 0 calc(100% / 24 - 1px), var(--border) calc(100% / 24 - 1px) calc(100% / 24)); border: 1px solid var(--border); overflow: hidden; }
.timeline__seg { position: absolute; top: 0; bottom: 0; background: var(--blue); opacity: 0.85; }
.timeline__scale { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted); margin-top: 0.2rem; }
.intervals { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.interval-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.interval-row label { display: flex; gap: 0.4rem; align-items: center; font-size: 0.85rem; font-weight: 600; }
.interval-row input[type="time"] { padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; }
.interval-row__del { margin-left: auto; font-weight: 500 !important; color: var(--muted); }
.timeline__bar .timeline__seg--somedays { opacity: 0.45; background: repeating-linear-gradient(135deg, var(--blue) 0 6px, transparent 6px 9px); }
.interval-row__days { display: inline-flex; flex-wrap: wrap; gap: 0.2rem; }
.interval-row .day-check { gap: 0; font-weight: 500; }
.day-check { position: relative; }
.day-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day-check span { display: inline-block; min-width: 2.1rem; padding: 0.2rem 0.35rem; border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; color: var(--muted); background: var(--surface); cursor: pointer; }
.day-check input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.day-check input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.badge--offair { background: var(--info-bg); color: var(--blue-dark); border-color: transparent; }
[hidden] { display: none !important; }

.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.asset { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.asset__preview { aspect-ratio: 16 / 9; display: grid; place-items: center; background: repeating-conic-gradient(#e8edf2 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.asset__preview img { max-width: 90%; max-height: 90%; object-fit: contain; }
.asset__preview--photo img, .asset__preview--offair img, .asset__preview--disconnected img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.asset__body { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.asset__actions { display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0 0.75rem 0.75rem; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem 1rem; }
.block-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.9rem; margin: 0 0 0.9rem; display: flex; flex-direction: column; gap: 0.75rem; background: var(--surface-2); }
.block-row__foot { display: flex; justify-content: space-between; align-items: center; }
.field__limit { margin: 0 0 0.35rem; font-size: 0.8rem; font-weight: 700; color: var(--warn); letter-spacing: 0.02em; }
.field__limit.is-over { color: var(--err); }
.field input[type="color"] { height: 2.4rem; padding: 0.2rem; }

.geo-search { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 0.75rem; background: var(--surface-2); }
.geo-search > label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.geo-search__row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.geo-search__row input { flex: 1; min-width: 180px; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; }
.geo-search__row select { padding: 0.45rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; }
.geo-search__results { list-style: none; margin: 0.5rem 0 0; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.geo-search__results button { display: block; width: 100%; text-align: left; padding: 0.45rem 0.6rem; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; font-size: 0.85rem; cursor: pointer; }
.geo-search__results button:hover { background: var(--info-bg); }

.stat__delta { display: inline-block; margin-top: 0.2rem; font-size: 0.75rem; font-weight: 700; color: var(--ok); }
.stat__delta.is-down { color: var(--err); }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding: 0.25rem 0; border-bottom: 1px solid var(--border); }
.chart__col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.chart__bar { display: block; width: 100%; min-height: 1px; background: var(--blue); border-radius: 3px 3px 0 0; opacity: 0.85; }
.chart__col:hover .chart__bar { opacity: 1; background: var(--blue-dark); }
.chart__axis { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; }
.filters input[type="date"] { min-width: 0; }

/* --- prihlásenie --- */
.auth { display: grid; place-items: center; min-height: 100vh; padding: 1rem; background: linear-gradient(160deg, var(--tl-navy) 0%, var(--tl-blue-700) 100%); }
.auth__card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 14px; padding: 2rem; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.auth__logo { display: block; margin: 0 auto 1.5rem; height: 40px; width: auto; }
/* logo podľa režimu – rovnaké podmienky ako tmavé tokeny v tokens.css */
.auth__logo--on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth__logo--on-light { display: none; }
  :root:not([data-theme="light"]) .auth__logo--on-dark { display: block; }
}
:root[data-theme="dark"] .auth__logo--on-light { display: none; }
:root[data-theme="dark"] .auth__logo--on-dark { display: block; }
.auth h1 { font-size: 1.25rem; text-align: center; }
.auth__links { text-align: center; font-size: 0.9rem; margin: 1rem 0 0; }

/* --- mobil --- */
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 30; left: 0; transform: translateX(-100%); transition: transform 0.2s; box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3); }
  .sidebar.is-open { transform: none; }
  .topbar__menu { display: block; }
  .topbar { padding: 0.5rem 1rem; gap: 0.5rem; }
  .topbar__name, .topbar__context, .topbar__link--secondary { display: none; }
  .topbar__user { margin-left: auto; }
  .lang-switch__item { padding: 0.2rem 0.3rem; }
  .lang-switch__item span { display: none; }
  .content { padding: 1rem; }
  .hide-sm { display: none; }
  .table td, .table th { padding: 0.55rem 0.5rem; }
}

/* Diagnostika kamery */
.checks { list-style: none; margin: 0 0 1rem; padding: 0; }
.check { display: flex; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
.check:last-child { border-bottom: 0; }
.check__icon { flex: 0 0 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.check--ok .check__icon { background: var(--ok-bg); color: var(--ok); }
.check--error .check__icon { background: var(--err-bg); color: var(--err); }
.check--warn .check__icon { background: var(--warn-bg); color: var(--warn); }
.check--info .check__icon { background: var(--info-bg); color: var(--blue-dark); }
.check__body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.check__title { font-weight: 600; overflow-wrap: anywhere; }
.check__hint { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.check__side { display: inline-block; margin-right: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; vertical-align: 0.1em; background: var(--surface-2); color: var(--muted); }
.check__side--camera { background: var(--warn-bg); color: var(--warn); }
.check__side--server { background: var(--info-bg); color: var(--blue-dark); }
.check__side--network { background: var(--err-bg); color: var(--err); }
.health__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 1rem; }
.facts--compact { grid-template-columns: max-content 1fr; }

/* Pomocník */
.help { max-width: 60rem; line-height: 1.6; }
.help h2 { margin-top: 1.6rem; scroll-margin-top: 4rem; }
.help h2:first-child { margin-top: 0; }
.help code { background: var(--surface-2); padding: 0.05rem 0.3rem; border-radius: 4px; font-size: 0.9em; overflow-wrap: anywhere; }
.help .table th { white-space: nowrap; vertical-align: top; }
.help-toc ol { margin: 0; padding-left: 1.2rem; columns: 2 16rem; }
.filters__date { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.9rem; }

/* náhľad prehrávača (demo stránka) */
.player-preview { aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm); overflow: hidden; margin-top: 1rem; }
.player-preview iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --- sledovanosť a analytika platformy --- */
.grid-2--gap { margin-bottom: 1.25rem; }
.small { font-size: 0.8rem; }
.live-now h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.live-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 3px var(--err-bg); }
.live-list { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.25rem 1.25rem; }
.live-list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.live-list li[hidden] { display: none; }
.flag { font-family: "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif; }
.share { display: block; width: 100%; height: 4px; margin-top: 0.3rem; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.share__bar { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.table--top { width: 100%; table-layout: auto; }
.table--top td:nth-child(n+2), .table--top th:nth-child(n+2) { white-space: nowrap; text-align: right; width: 1%; font-variant-numeric: tabular-nums; }
.table--top td:first-child { word-break: break-word; }
.flag { white-space: nowrap; }
.sortbar { font-size: 0.85rem; color: var(--muted); margin: -0.25rem 0 0.75rem; }
.sortbar a { color: var(--blue); text-decoration: none; }
.sortbar a.is-active { color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hbars { display: grid; gap: 0.3rem; }
.hbars__row { display: grid; grid-template-columns: 7.5rem 1fr 3.5rem; align-items: center; gap: 0.6rem; font-size: 0.85rem; }
.hbars__label { color: var(--muted); white-space: nowrap; }
.hbars__track { height: 0.9rem; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.hbars__bar { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; min-width: 1px; }
.hbars__value { text-align: right; font-variant-numeric: tabular-nums; }
.linechart { margin: 0; }
.linecharts { display: grid; gap: 1.5rem; margin: 1.25rem 0 0.75rem; }
.linechart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.linechart__legend { display: inline-flex; flex-wrap: wrap; gap: 0.75rem; font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.linechart__legend i { display: inline-block; width: 0.9rem; height: 2px; margin-right: 0.3rem; vertical-align: middle; }
.linechart svg { display: block; width: 100%; height: auto; overflow: visible; }
.linechart__grid { stroke: var(--tl-chart-grid); stroke-width: 1; }
.linechart__tick { fill: var(--muted); font-size: 12px; }
.linechart__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.linechart__hit { fill: transparent; }
.linechart__hit:hover { fill: color-mix(in srgb, var(--tl-text) 7%, transparent); }
.viewers-now { display: inline-flex; align-items: center; gap: 0.4rem; margin-left: auto; margin-right: 0.5rem; font-size: 0.9rem; color: var(--muted); }

/* zoznam zaškrtávacích políčok (výber kamier pre upozornenia) */
fieldset.field { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
fieldset.field legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.checklist { display: grid; gap: .35rem; max-height: 16rem; overflow: auto; padding: .5rem .75rem; border: 1px solid var(--border, #e3eaf1); border-radius: 6px; }
.checklist__item { display: flex; align-items: center; gap: .5rem; font-weight: 400; }

/* marketing – náhľad newslettera */
.nl-row { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 760px) { .nl-row { grid-template-columns: 1fr; } }
.nl-thumb { display: block; width: 100%; height: auto; border-radius: 8px; }
.nl-preview { margin-top: .75rem; }
.nl-preview summary { cursor: pointer; font-weight: 600; }
.nl-preview iframe { width: 100%; max-width: 720px; height: 900px; border: 1px solid var(--border); border-radius: 8px; background: #f3f6f9; margin-top: .5rem; }

/* Kvalita linky kamery (24 h) */
.quality { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; margin-bottom: 1rem; }
.quality__kpi { display: grid; }
.quality__value { font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.quality__value--good { color: var(--tl-ok); }
.quality__value--fair { color: var(--tl-warn); }
.quality__value--bad { color: var(--tl-err); }
.quality__facts { margin: 0; }
.quality__pct { font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.badge--q-good { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge--q-fair { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge--q-bad { background: var(--err-bg); color: var(--err); border-color: transparent; }
.timeline { margin: 0 0 0.75rem; }
.timeline svg { display: block; width: 100%; height: 34px; }
.timeline__seg--ok { fill: var(--tl-ok); background: var(--tl-ok); }
.timeline__seg--partial { fill: var(--tl-warn); background: var(--tl-warn); }
.timeline__seg--down { fill: var(--tl-err); background: var(--tl-err); }
.timeline__seg--none { fill: var(--surface-2); background: var(--surface-2); }
.timeline__tick { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.timeline__labels { position: relative; height: 1.1rem; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline__labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.timeline__legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.timeline__legend i { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 3px; margin-right: 0.35rem; vertical-align: -0.1rem; border: 1px solid var(--border); }
.qmini { display: grid; gap: 0.25rem; min-width: 7rem; text-decoration: none; }
.qmini__bar { display: block; width: 100%; height: 8px; border-radius: 2px; overflow: hidden; }

/* Pomocník – kategórie a tabuľka oprávnení */
.help-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: -0.25rem 0 1rem; }
.help-tabs__item { padding: 0.45rem 0.9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.help-tabs__item:hover { border-color: var(--blue); }
.help-tabs__item.is-active { background: var(--blue); border-color: var(--blue); color: var(--tl-on-primary); }
.perm-table th[scope="row"] { white-space: normal; font-weight: 500; min-width: 16rem; text-transform: none; letter-spacing: normal; font-size: 0.9rem; color: var(--text); background: none; }
.perm-table thead th { white-space: normal; text-align: center; vertical-align: bottom; }
.perm-table thead th:first-child { text-align: left; }
.perm { text-align: center; white-space: nowrap; }
.perm--yes { color: var(--ok); font-weight: 800; }
.perm--no { color: var(--muted); }
.perm--part { color: var(--text); font-size: 0.85rem; white-space: normal; }
.role-list dt { font-weight: 800; margin-top: 0.8rem; }
.role-list dd { margin: 0.2rem 0 0; }
/* Firma: prevzatie údajov z adresára ABRA */
.abra-pick { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 0.75rem; margin: 0 0 1rem; background: var(--surface-2); min-width: 0; }
.abra-pick legend { font-weight: 600; padding: 0 0.25rem; }
.abra-pick__source { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-bottom: 0.6rem; }
.abra-pick__source label { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.abra-pick__search > label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.abra-pick__results button strong { font-weight: 600; }
.abra-pick__exists { color: var(--warn); font-weight: 600; }
.abra-pick__linked { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.6rem 0 0; }

/* --- objednávky a výzva na úhradu --- */
.alert--info { background: var(--info-bg); color: var(--tl-info, var(--text)); }
.link-list { margin: 0; padding-left: 1.1rem; line-height: 2; }
.mono { font-family: var(--tl-font-mono, ui-monospace, monospace); letter-spacing: 0.02em; }
.table .num, .paydoc .num { text-align: right; white-space: nowrap; }
.order-table select { min-width: 10.5rem; max-width: 100%; }
.period-pick { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.period-pick__item { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; min-width: 9rem; }
.period-pick__item:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.order-summary tfoot td { font-weight: 600; }
.order-summary__total td, .paydoc__total td { font-size: 1.1rem; font-weight: 700; }
.order-admin { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.order-admin__form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
.order-admin__form input[type="date"] { padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); width: 9.5rem; }

.paydoc { display: grid; gap: 1.25rem; color: var(--text); }
.paydoc__head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.paydoc__title { margin: 0; font-size: 1.35rem; }
.paydoc__sub, .paydoc__small { margin: 0.25rem 0 0; font-size: 0.82rem; color: var(--muted); }
.paydoc__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.paydoc__parties h3, .paydoc__dates dt, .paydoc__bank dt { margin: 0 0 0.3rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.paydoc__parties p { margin: 0 0 0.4rem; line-height: 1.5; }
.paydoc__dates, .paydoc__bank { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.75rem; margin: 0; padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.paydoc__dates dd, .paydoc__bank dd { margin: 0; font-weight: 600; }
.paydoc__items { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.paydoc__items th { text-align: left; font-size: 0.75rem; color: var(--muted); border-bottom: 1px solid var(--border); padding: 0.5rem 0.4rem; }
.paydoc__items td { padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.paydoc__items tfoot td { border-bottom: 0; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.paydoc__items tfoot td:first-child { text-align: right; color: var(--muted); }
.paydoc__total td { border-top: 2px solid var(--text) !important; color: var(--text) !important; }
.paydoc__pay { display: grid; grid-template-columns: 1fr auto; gap: 1.25rem; align-items: center; }
.paydoc__bank { grid-template-columns: 1fr 1fr; }
.paydoc__qr { margin: 0; text-align: center; max-width: 12rem; }
.paydoc__qr svg { display: block; width: 11rem; height: auto; margin: 0 auto; background: #fff; border-radius: 6px; }
.paydoc__qr figcaption { font-size: 0.72rem; color: var(--muted); margin-top: 0.35rem; }
@media (max-width: 640px) {
  .paydoc__parties, .paydoc__pay { grid-template-columns: 1fr; }
  .paydoc__qr { margin: 0 auto; }
}
.paypage { background: var(--bg); }
.paypage__wrap { max-width: 52rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.paypage__wrap .paydoc { background: var(--surface); padding: 1.75rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.paypage__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.paypage__hint { font-size: 0.8rem; color: var(--muted); }
@media print {
  .paypage { background: #fff; }
  .paypage__hint { display: none; }
  .paypage__wrap { padding: 0; max-width: none; }
  .paypage__wrap .paydoc { box-shadow: none; padding: 0; background: #fff; color: #000; }
  .paydoc__dates, .paydoc__bank { background: #f2f4f7; }
}
.list-issue { display: block; margin-top: 0.3rem; font-size: 0.82rem; color: var(--text); text-decoration: none; }
.list-issue:hover { text-decoration: underline; }
.sides-legend { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 0.7rem; margin: 0.8rem 0 0; font-size: 0.86rem; color: var(--muted); }
.sides-legend dt { margin: 0; }
.sides-legend dd { margin: 0; }

/* Kontrola nastavenia kamery (detail kamery) */
.setup__summary { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; cursor: pointer; list-style: none; }
.setup__summary::-webkit-details-marker { display: none; }
.setup__summary::before { content: "▸"; color: var(--muted); transition: transform 0.15s; }
.setup[open] > .setup__summary::before { transform: rotate(90deg); }
.setup__summary h2 { margin: 0; }
.setup[open] > .setup__summary { margin-bottom: 0.6rem; }
.setup__list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.setup__item { display: grid; grid-template-columns: 1.6rem minmax(8rem, max-content) 1fr; gap: 0.15rem 0.6rem; align-items: baseline; padding: 0.45rem 0.6rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.setup__icon { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font-weight: 700; font-size: 0.8rem; background: var(--border); color: var(--muted); }
.setup__item--ok .setup__icon { background: var(--ok-bg); color: var(--ok); }
.setup__item--change { background: var(--warn-bg); }
.setup__item--change .setup__icon { background: var(--warn); color: #fff; }
.setup__label { font-weight: 600; }
.setup__hint { grid-column: 2 / -1; font-size: 0.86rem; }
@media (max-width: 640px) {
  .setup__item { grid-template-columns: 1.6rem 1fr; }
  .setup__value, .setup__hint { grid-column: 2; }
}

/* Zoznam kamier – filter, hľadanie, radenie */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin: 0 0 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.86rem; color: inherit; text-decoration: none; background: var(--surface); }
.chip:hover { border-color: var(--muted); }
.chip__count { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip--warn { border-color: var(--warn); }
.chip--warn .chip__count { color: var(--warn); font-weight: 700; }
.chip--active { background: var(--blue); border-color: var(--blue); color: var(--tl-on-primary); }
.chip--active .chip__count { color: inherit; opacity: 0.8; }
.list-tools__fields { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.list-tools__fields input[type=search] { min-width: 14rem; padding: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; font-size: 0.9rem; }
.list-tools__fields select { padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; font-size: 0.9rem; }
@media (max-width: 640px) {
  .list-tools__fields, .list-tools__fields input[type=search] { width: 100%; min-width: 0; }
  .list-tools__fields input[type=search] { flex: 1 1 100%; }
}

/* Detail kamery – automatická obnova, udalosti, mobil */
.live-stamp { font-size: 0.78rem; font-weight: 400; margin-left: 0.4rem; }
.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-list__item { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.6rem; padding: 0.4rem 0 0.4rem 0.9rem; border-left: 3px solid var(--border); font-size: 0.92rem; }
.timeline-list__item + .timeline-list__item { border-top: 1px dashed var(--border); }
.timeline-list__item time { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline-list__item--outage { border-left-color: var(--err); }
.timeline-list__item--warn, .timeline-list__item--network { border-left-color: var(--warn); }
.timeline-list__item--ok { border-left-color: var(--ok); }
.timeline-list__item--restart { border-left-color: var(--blue); }
@media (max-width: 640px) {
  .timeline-list__item { grid-template-columns: 1fr; gap: 0.1rem; }
  .health__actions form, .health__actions .btn { width: 100%; }
  .health__actions .btn { min-height: 2.75rem; font-size: 1rem; justify-content: center; }
  #diagnostika .card__head { flex-wrap: wrap; gap: 0.5rem; }
  #diagnostika .card__head form, #diagnostika .card__head .btn { width: 100%; }
  #diagnostika .card__head .btn { min-height: 2.75rem; }
}

/* Prehľad – stav kamier */
.card--attention { border-left: 4px solid var(--warn); }
.card--attention .card__head h2 { display: flex; align-items: center; gap: 0.5rem; }
.all-ok { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 1rem; padding: 0.55rem 0.9rem; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); font-size: 0.92rem; }
.all-ok__icon { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--ok); color: #fff; font-size: 0.8rem; font-weight: 700; }

/* Údržba kamery */
.badge--maintenance { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--muted); }
.maintenance-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; margin: 0 0 1rem; padding: 0.5rem 0.9rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; }
.maintenance-bar__text { flex: 1 1 18rem; }
.maintenance-bar__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.maintenance-bar--on { border: 1px solid var(--muted); background: var(--surface-2); }
.maintenance-line { margin: 0 0 1rem; font-size: 0.92rem; }

/* Náhľady v zozname kamier */
.cam-cell { display: flex; align-items: center; gap: 0.7rem; min-width: 14rem; }
.cam-thumb { flex: 0 0 auto; display: block; width: 112px; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2) linear-gradient(135deg, transparent 45%, var(--border) 45% 55%, transparent 55%); }
.cam-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cam-thumb--stale img { filter: grayscale(1); opacity: 0.55; }
@media (max-width: 640px) {
  .cam-thumb { width: 80px; }
  .cam-cell { min-width: 0; }
}

/* Dostupnosť za 30 dní */
.month { margin-top: 1rem; }
.month h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.month-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; }
.month-strip__cell { display: block; width: 100%; height: 28px; padding: 0; border: 0; border-radius: 3px; cursor: pointer; background: var(--surface-2); }
.month-strip__cell--good { background: var(--tl-ok); }
.month-strip__cell--fair { background: var(--tl-warn); }
.month-strip__cell--bad { background: var(--tl-err); }
.month-strip__cell--today { outline: 2px solid var(--muted); outline-offset: 1px; }
.month-strip__cell[aria-pressed="true"] { outline: 2px solid var(--blue); outline-offset: 1px; }
.month-strip__cell:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.month-strip__axis { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }
.month-strip__detail { margin: 0.4rem 0 0; font-size: 0.88rem; }
@media (max-width: 640px) { .month-strip { gap: 2px; } .month-strip__cell { height: 22px; } }


/* Rýchle hľadanie (Ctrl+K) */
.topbar__search { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font: inherit; font-size: 0.88rem; cursor: pointer; }
.topbar__search:hover { border-color: var(--muted); color: inherit; }
.topbar__search kbd { font: inherit; font-size: 0.72rem; padding: 0.05rem 0.35rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); }
.qs { width: min(40rem, calc(100vw - 2rem)); max-height: min(32rem, calc(100vh - 4rem)); margin: 8vh auto auto; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: inherit; box-shadow: 0 18px 50px rgba(10, 33, 49, 0.25); }
.qs::backdrop { background: rgba(10, 33, 49, 0.35); }
.qs__form { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); }
.qs__input { flex: 1; min-width: 0; padding: 0.45rem 0.2rem; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 1.05rem; }
.qs__close { border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); color: var(--muted); font: inherit; font-size: 0.75rem; padding: 0.1rem 0.4rem; cursor: pointer; }
.qs__results { list-style: none; margin: 0; padding: 0.3rem; overflow-y: auto; max-height: 24rem; }
.qs__results:empty { display: none; }
.qs__item a { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.1rem 0.6rem; align-items: baseline; padding: 0.5rem 0.6rem; border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.qs__item[aria-selected="true"] a, .qs__item a:hover { background: var(--surface-2); }
.qs__type { grid-row: span 2; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.qs__label { font-weight: 600; }
.qs__sub { font-size: 0.82rem; color: var(--muted); }
.qs__hint { margin: 0; padding: 0.6rem 0.9rem; font-size: 0.85rem; }
@media (max-width: 640px) {
  .topbar__search-label, .topbar__search kbd { display: none; }
  .topbar__search { padding: 0.3rem 0.5rem; font-size: 1.1rem; }
  .qs { margin-top: 1rem; }
}


/* Časozberné video */
.timelapse__video { display: block; width: 100%; max-height: 70vh; border-radius: var(--radius-sm); background: #000; }
.timelapse__meta { margin: 0.5rem 0; }
.timelapse__note { margin: 0.6rem 0 0; font-size: 0.85rem; }
#timelapse .chips { margin-top: 0.4rem; }

/* Videostena */
.nav__item--sub { padding-left: 2rem; font-size: 0.9rem; }
.wall:fullscreen { padding: 1rem; overflow-y: auto; background: var(--bg, #0a2131); }
.wall__summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin: 0 0 0.8rem; font-size: 0.92rem; }
.wall__count { font-weight: 600; }
.wall__count--warn { color: var(--warn); }
.wall__count--ok { color: var(--ok); }
.wall__clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.wall__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; }
.wall:fullscreen .wall__grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.wall__tile a { display: block; height: 100%; padding: 0.4rem; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; }
.wall__tile a:hover { border-color: var(--muted); }
.wall__tile--ok a { border-color: var(--tl-ok); }
.wall__tile--warn a { border-color: var(--tl-warn); }
.wall__tile--error a { border-color: var(--tl-err); }
.wall__tile--maintenance a { border-style: dashed; border-color: var(--muted); }
.wall__image { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); }
.wall__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wall__tile--error .wall__image img, .wall__tile--unknown .wall__image img, .wall__tile--maintenance .wall__image img { filter: grayscale(1); opacity: 0.55; }
.wall__flag { position: absolute; left: 0.4rem; top: 0.4rem; padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: rgba(10, 33, 49, 0.8); color: #fff; }
.wall__flag--off { background: var(--tl-err); }
.wall__time { position: absolute; right: 0.4rem; bottom: 0.3rem; padding: 0 0.35rem; border-radius: 4px; font-size: 0.72rem; background: rgba(0, 0, 0, 0.55); color: #fff; font-variant-numeric: tabular-nums; }
.wall__caption { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.4rem; font-size: 0.9rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wall__dot { flex: 0 0 auto; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--surface-2); }
.wall__tile--ok .wall__dot { background: var(--tl-ok); }
.wall__tile--warn .wall__dot { background: var(--tl-warn); }
.wall__tile--error .wall__dot { background: var(--tl-err); }
.wall__tile--maintenance .wall__dot { background: var(--muted); }
.wall__issue { display: block; margin-top: 0.2rem; font-size: 0.8rem; color: var(--warn); white-space: normal; }
.wall__tile--error .wall__issue { color: var(--err); }
@media (max-width: 640px) {
  .wall__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; }
  .wall__caption { font-size: 0.82rem; }
}

/* Dvojstupňové prihlásenie */
.hint-line { margin: 0 0 1rem; padding: 0.5rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; }
.security__state { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.security__box { margin-top: 0.8rem; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.security__box summary { cursor: pointer; font-weight: 600; }
.security__steps { padding-left: 1.2rem; }
.security__qr { display: inline-block; margin: 0.4rem 0 0.6rem; padding: 0.4rem; border-radius: var(--radius-sm); background: #fff; line-height: 0; }
.security__qr svg { width: 200px; height: auto; }
.security__secret { font-size: 0.95rem; letter-spacing: 0.06em; user-select: all; }
.security__codes { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 1rem; font-size: 1.1rem; }
@media print { .sidebar, .topbar, .form__actions, .alert { display: none !important; } }

/* Dátový tok kamery, prepínač obdobia, diváci na videostene, grafy servera, mesačný report */
.period-switch { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }
.traffic__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem 1.25rem; margin: 0 0 1rem; }
.traffic__stats dt { font-size: 0.8rem; color: var(--muted); }
.traffic__stats dd { margin: 0.1rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.wall__viewers { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin: 0 0 1rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.wall__viewers-now { display: flex; align-items: baseline; gap: 0.4rem; min-width: 9rem; }
.wall__viewers-now strong { font-size: 1.8rem; line-height: 1; font-variant-numeric: tabular-nums; }
.wall__viewers .linechart { flex: 1 1 22rem; min-width: 0; }
.wall__eye { position: absolute; right: 0.4rem; top: 0.4rem; padding: 0.1rem 0.45rem; border-radius: 999px; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.viewers-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.server-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.25rem 1.5rem; margin: 1rem 0 0.5rem; }
.avail-table td.num, .avail-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.avail-days { display: grid; grid-template-columns: repeat(31, minmax(4px, 1fr)); gap: 2px; min-width: 9rem; }
.avail-days i { display: block; height: 0.9rem; border-radius: 2px; background: var(--tl-chart-grid); }
.avail-days i.lvl-good { background: #1baf7a; }
.avail-days i.lvl-fair { background: #eb6834; }
.avail-days i.lvl-bad { background: #c5221f; }
.avail-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; }
.avail-summary { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin: 0.5rem 0 1rem; }
.avail-summary strong { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .wall__viewers-now strong { font-size: 1.4rem; }
  .avail-table .hide-sm { display: none; }
}
@media print {
  .avail-actions, .period-switch { display: none !important; }
  .avail-days i { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
a.stat { color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--accent, var(--border)); }
.avail-days i.lvl-future { background: transparent; border: 1px dashed var(--tl-chart-grid); }
.avail-legend i { display: inline-block; width: 0.7rem; height: 0.7rem; margin: 0 0.2rem 0 0.5rem; border-radius: 2px; vertical-align: -0.05rem; }
.avail-legend i.lvl-good { background: #1baf7a; } .avail-legend i.lvl-fair { background: #eb6834; } .avail-legend i.lvl-bad { background: #c5221f; }
.facts { grid-template-columns: max-content minmax(0, 1fr); }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .facts, .facts--compact { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .facts dd { margin-bottom: 0.45rem; }
}
.avail-delta { display: block; font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.avail-delta--up { color: #1baf7a; }
.avail-delta--down { color: #c5221f; }
.avail-worst { margin: 0 0 1rem; padding: 0.55rem 0.8rem; border-left: 3px solid #eb6834; background: var(--surface-2); border-radius: var(--radius-sm); }
.heat { display: grid; gap: 2px; overflow-x: auto; padding-bottom: 0.25rem; }
.heat__row { display: grid; grid-template-columns: 2rem repeat(24, minmax(0.7rem, 1fr)); gap: 2px; align-items: center; min-width: 22rem; }
.heat__day, .heat__hour { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.heat__hour { text-align: left; }
.heat__cell { display: block; height: 1.15rem; border-radius: 2px; background: var(--tl-chart-grid); }
.heat__cell--1 { background: color-mix(in srgb, var(--tl-chart-1) 22%, transparent); }
.heat__cell--2 { background: color-mix(in srgb, var(--tl-chart-1) 40%, transparent); }
.heat__cell--3 { background: color-mix(in srgb, var(--tl-chart-1) 60%, transparent); }
.heat__cell--4 { background: color-mix(in srgb, var(--tl-chart-1) 80%, transparent); }
.heat__cell--5 { background: var(--tl-chart-1); }
/* Verejná stavová stránka a plánované odstávky */
.auth__card--wide { max-width: 760px; }
.status-hero { display: flex; align-items: center; gap: 0.6rem; margin: 0.5rem 0 1.25rem; padding: 0.9rem 1rem; border-radius: var(--radius-sm); font-size: 1.15rem; font-weight: 700; background: color-mix(in srgb, #1baf7a 14%, transparent); }
.status-hero--degraded, .status-hero--maintenance { background: color-mix(in srgb, #eb6834 16%, transparent); }
.status-hero--down { background: color-mix(in srgb, #c5221f 16%, transparent); }
.status-dot { flex: none; display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: #1baf7a; }
.status-dot--degraded, .status-dot--maintenance { background: #eb6834; }
.status-dot--down { background: #c5221f; }
.status-block { margin: 0 0 1.5rem; }
.status-block h2 { font-size: 1rem; margin: 0 0 0.6rem; }
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.2rem 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.status-list__state { font-size: 0.85rem; font-weight: 600; color: #1baf7a; }
.status-list__state--degraded { color: #eb6834; }
.status-list__state--down { color: #c5221f; }
.status-list__note { grid-column: 2 / -1; font-size: 0.82rem; }
.status-history { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; }
.status-history i { display: block; height: 1.8rem; border-radius: 3px; background: var(--tl-chart-grid); }
.status-history i.lvl-good { background: #1baf7a; }
.status-history i.lvl-fair { background: #eb6834; }
.status-history i.lvl-bad { background: #c5221f; }
.status-history__axis { display: flex; justify-content: space-between; margin-top: 0.25rem; }
.status-outage { padding: 0.6rem 0.8rem; margin: 0 0 0.5rem; border-left: 3px solid #eb6834; background: var(--surface-2); border-radius: var(--radius-sm); }
.status-outage p { margin: 0.3rem 0 0; }
.status-outage--past { border-left-color: var(--border); }
.status-past summary { cursor: pointer; font-size: 0.85rem; color: var(--muted); margin: 0.25rem 0 0.5rem; }
.status-foot { margin-top: 1rem; }
.outage-banner { margin: 0 0 1rem; padding: 0.6rem 0.9rem; border-radius: var(--radius-sm); border: 1px solid #eb6834; background: color-mix(in srgb, #eb6834 12%, transparent); }
.outage-banner--now { border-color: #c5221f; background: color-mix(in srgb, #c5221f 12%, transparent); }
.outage-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.outage-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.outage-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.5rem 1rem; align-items: end; }
@media (max-width: 560px) {
  .auth__card--wide { padding: 1.25rem; }
  .status-history i { height: 1.4rem; }
  .status-history { gap: 2px; }
}
.sessions { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.sessions__item { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.sessions__body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; overflow-wrap: anywhere; }

/* vloženie na web: voľby kódu, statický obrázok, náhľad prehrávača, weby so sledovaním */
.embed-builder { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.25rem 0 0.75rem; }
.embed-builder label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; font-weight: 600; }
.embed-builder select { padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; font-weight: 400; background: var(--surface); }
.snapshot-box { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.snapshot-box img { display: block; width: 320px; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.snapshot-box__code { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.snapshot-box__code label { font-size: 0.85rem; font-weight: 600; }
.snapshot-box__code input.code { width: 100%; }
.player-preview { position: relative; margin: 0.75rem 0 0.25rem; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.player-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sites-table td:first-child { word-break: break-all; }
.disk-forecast { margin: 1rem 0 0.5rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.disk-forecast h3 { margin: 0 0 0.35rem; }
.disk-forecast p { margin: 0.2rem 0; }
.disk-forecast--warn { border-color: var(--warn); background: var(--warn-bg); }
.audit-details { margin-top: 0.2rem; font-size: 0.8rem; word-break: break-word; }
.audit-break { word-break: break-all; }
