/* Noiserun admin – písma a farby appky, svetlá aj tmavá podľa systému.
   Grafy: jedna farba série (--series, overená na kontrast a farbosleposť pre oba povrchy),
   tenké stĺpce so zaobleným koncom, mriežka len vlasová, hodnoty v tooltipe aj v tabuľke. */
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url(fonts/instrument-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url(fonts/instrument-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url(fonts/instrument-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url(fonts/instrument-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url(fonts/instrument-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url(fonts/instrument-sans-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Unbounded'; font-weight: 600; font-display: swap; src: url(fonts/unbounded-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Unbounded'; font-weight: 600; font-display: swap; src: url(fonts/unbounded-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F; }

:root {
  color-scheme: light;
  --page: #FBF6F1; --card: #FFFFFF; --sunk: #F5EEE8; --hover: #F7F1EC;
  --text: #22122E; --text-2: #5C4E66; --muted: #8C8094; --line: #EDE4DE; --grid: #EEE7E2; --axis: #D9CFD6;
  --brand: #FF5C7A; --series: #E8456A; --series-wash: rgba(232, 69, 106, .12);
  --up: #13814A; --down: #C33A3A; --warn: #A6561B;
  --nav: #22122E; --nav-text: rgba(255, 246, 238, .72); --nav-active: #FFF4EC;
  --shadow: 0 1px 2px rgba(34, 18, 46, .05), 0 6px 24px rgba(34, 18, 46, .05);
  --ui: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Unbounded', 'Instrument Sans', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0E0817; --card: #1A1128; --sunk: #140C20; --hover: #221733;
    --text: #F7EFE6; --text-2: #C9BDCF; --muted: #8F8399; --line: #2A1F38; --grid: #261B33; --axis: #3A2D49;
    --series: #E8456A; --series-wash: rgba(232, 69, 106, .16);
    --up: #3BC47C; --down: #F07070; --warn: #F0965F;
    --nav: #120A1F; --nav-text: rgba(247, 239, 230, .62); --nav-active: #F7EFE6;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 400 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
code, pre { font-family: var(--mono); font-size: 12px; }
pre { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--sunk); white-space: pre-wrap; word-break: break-all; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
button, .btn { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--text); color: var(--page); font: 600 13px var(--ui); text-decoration: none; cursor: pointer; }
button:hover, .btn:hover { opacity: .88; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
input, select { min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--card); color: var(--text); font: 14px var(--ui); box-shadow: inset 0 0 0 1px var(--line); }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 0; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- rozloženie ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1px; padding: 20px 14px 16px; background: var(--nav); color: var(--nav-text); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.brand { display: flex; align-items: baseline; gap: 8px; margin: 0 10px 14px; color: var(--nav-active); font: 600 17px var(--display); letter-spacing: -.01em; text-decoration: none; }
.brand b { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); align-self: center; }
.brand span { font: 500 12px var(--ui); color: var(--nav-text); letter-spacing: .04em; text-transform: uppercase; }
.nav h6 { margin: 14px 10px 4px; font: 600 11px var(--ui); letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.nav a.item { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 500; }
.nav a.item:hover { background: rgba(255, 255, 255, .06); color: var(--nav-active); }
.nav a.item[aria-current] { background: rgba(255, 255, 255, .1); color: var(--nav-active); }
.nav a.item[aria-current] .ic { color: var(--brand); }
.nav .soon { margin-left: auto; font-size: 11px; opacity: .55; }
.nav .me { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }
.nav .me strong { display: block; color: var(--nav-active); font-weight: 600; }
.nav .me button { margin-top: 10px; min-height: 32px; padding: 0 12px; background: rgba(255, 255, 255, .1); color: var(--nav-active); }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 64px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.head h1 { margin: 0; font: 600 26px/1.15 var(--ui); letter-spacing: -.01em; }
.head .sub { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 400; }
.crumb { display: inline-block; margin-bottom: 6px; color: var(--muted); font-size: 13px; text-decoration: none; }
.crumb:hover { color: var(--text); }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: sticky; z-index: 5; height: auto; flex-direction: row; align-items: center; gap: 4px; padding: 10px 12px; overflow-x: auto; }
  .brand { margin: 0 8px 0 4px; }
  .brand span, .nav h6, .nav .soon { display: none; }
  .nav a.item { flex: none; padding: 7px 10px; }
  .nav a.item .lbl { display: none; }
  .nav a.item[aria-current] .lbl { display: inline; }
  .nav .me { margin: 0 0 0 auto; padding: 0; border: 0; }
  .nav .me strong { display: none; }
  .nav .me button { margin: 0; }
}

/* obdobie: segmentový prepínač */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.seg a { padding: 6px 13px; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: 13px; text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--text); }
.seg a[aria-current] { background: var(--text); color: var(--page); }

/* ---------- karty a mriežka ---------- */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { padding: 20px 22px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); min-width: 0; }
.card > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 14px; font: 600 15px var(--ui); }
.card > h2 a { color: var(--muted); font-weight: 500; font-size: 13px; text-decoration: none; }
.card > h2 a:hover { color: var(--text); }
.card > h2 small { color: var(--muted); font-weight: 400; font-size: 12px; }
.section { margin-top: 16px; }
.flash { margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.note { color: var(--muted); font-size: 13px; }
.status { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; color: var(--muted); font-size: 12px; }
.status a { color: inherit; }

/* hlavné číslo a dlaždice */
.overview { display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(0, 2.6fr); gap: 16px; }
@media (max-width: 1100px) { .overview { grid-template-columns: 1fr; } }
.hero { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 24px; border-radius: var(--r); background: var(--nav); color: var(--nav-active); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 92, 122, .35), transparent); pointer-events: none; }
.hero-l { color: var(--nav-text); font-weight: 500; }
.hero-v { display: block; margin-top: 6px; font: 600 56px/1 var(--ui); letter-spacing: -.02em; }
.hero-v small { font-size: 18px; font-weight: 500; color: var(--nav-text); margin-left: 6px; letter-spacing: 0; }
.hero .delta { background: rgba(255, 255, 255, .1); }
.hero .delta.up { color: #5FE0A0; } .hero .delta.down { color: #FF8F8F; }
.hero-n { margin: 0 0 8px; color: var(--nav-text); font-size: 13px; }
span.hero-n { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.overview .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .overview .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 14px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); min-width: 0; }
.stat-l { color: var(--text-2); font-size: 13px; }
.stat-v { font: 600 26px/1.15 var(--ui); letter-spacing: -.01em; }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.stat-n { color: var(--muted); font-size: 12px; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: var(--sunk); font-size: 12px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--up); } .delta.down { color: var(--down); } .delta.flat { color: var(--muted); }
.spark { width: 84px; height: 24px; overflow: visible; }
.spark path { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.spark circle { fill: var(--series); }

/* graf */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .bar { fill: var(--series); transition: opacity .12s; }
.chart .bar.part { opacity: .45; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .hit:focus + .bar { opacity: .75; }
.chart .hit:focus { outline: none; }
.chart text { fill: var(--muted); font: 11px var(--ui); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .chart.wide text { font-size: 22px; } }
.stats.s6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1240px) { .stats.s6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .stats.s6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart .sum { fill: var(--text-2); font-weight: 600; }
.chart-table summary { margin-top: 10px; color: var(--muted); font-size: 12px; cursor: pointer; }
.tip { position: fixed; z-index: 50; padding: 8px 11px; border-radius: 10px; background: var(--text); color: var(--page); font-size: 12px; line-height: 1.35; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.tip strong { display: block; font-size: 15px; font-weight: 600; }
.tip[hidden] { display: none; }

/* zoznam s pruhmi (rebríčky) */
.bars { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 6px 8px; margin: 0 -8px; border-radius: 10px; }
.bars li.link { cursor: pointer; }
.bars li.link:hover { background: var(--hover); }
.bars .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bars .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .who em { color: var(--muted); font-style: normal; font-size: 12px; margin-left: 6px; }
.bars .val { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bars .val small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.bars .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.bars .track svg, td .meter svg { display: block; width: 100%; height: 6px; }
.bars .track rect, td .meter rect { fill: var(--series); }
.rank { width: 18px; color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; flex: none; }
.thumb { width: 52px; height: 30px; border-radius: 6px; object-fit: cover; background: var(--sunk); flex: none; }
.thumb-lg { width: 100%; max-width: 420px; aspect-ratio: 16 / 9; height: auto; border-radius: 14px; object-fit: cover; background: var(--sunk); }

/* tabuľka */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
th a { text-decoration: none; }
th a:hover, th a[aria-current] { color: var(--text); }
th a[aria-current]::after { content: ' ↓'; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr[data-href] { cursor: pointer; }
tbody tr:hover { background: var(--hover); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
td.dim { color: var(--muted); }
td .name { display: flex; align-items: center; gap: 12px; min-width: 220px; }
td .name a { font-weight: 600; text-decoration: none; }
td .name small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
td .meter { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 140px; }
td .meter svg { width: 80px; flex: none; border-radius: 3px; background: var(--sunk); overflow: hidden; }
tr.nodata td { color: var(--muted); }
tr.nodata .name a { font-weight: 500; }
td details summary { color: var(--muted); font-family: var(--mono); font-size: 12px; cursor: pointer; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--sunk); color: var(--text-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip.live { color: var(--up); } .chip.soon { color: var(--warn); } .chip.hidden { color: var(--muted); }
.chip.ok { color: var(--up); } .chip.fail { color: var(--down); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar input[type=search] { min-width: 240px; }
.toolbar label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }

/* prázdny stav */
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 26px 22px; border-radius: var(--r); background: var(--sunk); color: var(--text-2); }
.empty strong { color: var(--text); font-size: 15px; }
.empty.sm { padding: 16px; font-size: 13px; }

/* katalóg */
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pack { display: flex; flex-direction: column; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); overflow: hidden; text-decoration: none; }
.pack:hover { box-shadow: var(--shadow), inset 0 0 0 1px var(--axis); }
.pack img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--sunk); display: block; }
.pack-b { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.pack-b strong { font-size: 15px; }
.pack-b span { color: var(--muted); font-size: 12px; }
.pack-b .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; margin: 0; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.detail { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }

/* ---------- prihlásenie ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 80% -10%, rgba(255, 92, 122, .28), transparent 60%), #120A1F; color: #F7EFE6; }
.auth .box { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 30px 28px; border-radius: 22px; background: rgba(26, 17, 40, .86); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 80px rgba(0, 0, 0, .4); }
.auth .brand { margin: 0 0 6px; color: #F7EFE6; }
.auth .brand span { color: rgba(247, 239, 230, .6); }
.auth h1 { margin: 0; font: 600 22px var(--ui); }
.auth p { margin: 0; color: rgba(247, 239, 230, .74); }
.auth label { display: flex; flex-direction: column; gap: 6px; color: rgba(247, 239, 230, .8); font-weight: 500; }
.auth input { min-height: 46px; background: rgba(255, 255, 255, .06); color: #F7EFE6; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font-size: 16px; }
.auth input[name=code] { letter-spacing: .3em; font-size: 22px; text-align: center; }
.auth button { min-height: 46px; justify-content: center; background: #F7EFE6; color: #120A1F; font-size: 15px; }
.auth .err { padding: 10px 12px; border-radius: 10px; background: rgba(240, 112, 112, .14); color: #FFB3B3; }
.auth .steps { margin: 0; padding-left: 20px; color: rgba(247, 239, 230, .8); }
.auth .steps li { margin-bottom: 4px; }
.auth .qr { align-self: center; padding: 10px; border-radius: 12px; background: #fff; }
.auth .qr svg { display: block; width: 200px; height: auto; }
.auth .secret { font-size: 13px; text-align: center; }
.auth .secret code { font-size: 13px; letter-spacing: .06em; color: #F7EFE6; }
.auth .alt { background: none; color: rgba(247, 239, 230, .6); min-height: 0; padding: 0; font-weight: 500; text-decoration: underline; align-self: center; }
