/* ---------- motywy: ciemny (domyslny), jasny, noc ---------- */
:root {
  --bg: #0b0e13;
  --panel: #11161d;
  --panel-2: #161c25;
  --line: #222a36;
  --text: #e6e8ec;
  --muted: #8a93a3;
  --gold: #c8aa6e;
  --gold-ink: #1a1408;
  --gold-hover: #b39760;
  --good: #3dbb8f;
  --bad: #e5484d;
  --warn: #e0a43a;
  --hover: #1d2430;
  --top-bg: rgba(11, 14, 19, 0.92);
  --faint: #3a4250;
  --dot-empty: #2a313d;
  --me-bg: rgba(200, 170, 110, 0.06);
  --gold-line: #4a3f29;
  --good-line: #1e4a3a;
  --bad-line: #5a2224;
  --warn-line: #5a4320;
  --bad-ink: #ffb4b6;
  --radius: 8px;
  --h-btn: 32px;
  --h-field: 36px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --panel-2: #eceef2;
  --line: #d8dce3;
  --text: #161a20;
  --muted: #5d6676;
  --gold: #96752f;
  --gold-ink: #ffffff;
  --gold-hover: #7f6226;
  --good: #1a8a61;
  --bad: #cf3338;
  --warn: #a86d0c;
  --hover: #e1e4ea;
  --top-bg: rgba(255, 255, 255, 0.9);
  --faint: #b9bfca;
  --dot-empty: #dde1e7;
  --me-bg: rgba(150, 117, 47, 0.08);
  --gold-line: #dccaa3;
  --good-line: #a9dcc8;
  --bad-line: #f0b9bb;
  --warn-line: #e8cf9f;
  --bad-ink: #a3242a;
  color-scheme: light;
}
:root[data-theme="night"] {
  --bg: #0a1428;
  --panel: #0f1c36;
  --panel-2: #152544;
  --line: #22365c;
  --text: #e3e9f6;
  --muted: #8b9aba;
  --gold: #d2b678;
  --gold-ink: #17120a;
  --gold-hover: #bea063;
  --good: #45c49a;
  --bad: #ef5a60;
  --warn: #e6ad45;
  --hover: #1c2f54;
  --top-bg: rgba(10, 20, 40, 0.92);
  --faint: #34497a;
  --dot-empty: #22365c;
  --me-bg: rgba(210, 182, 120, 0.08);
  --gold-line: #4d4530;
  --good-line: #1f4a48;
  --bad-line: #5c2636;
  --warn-line: #5a4628;
  --bad-ink: #ffb8bc;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.pad { padding: 16px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- pasek gorny ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px; height: 56px;
  background: var(--top-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand b { color: var(--gold); font-weight: 600; }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  height: var(--h-btn); display: inline-flex; align-items: center; padding: 0 12px;
  border-radius: var(--radius); text-decoration: none; color: var(--muted); white-space: nowrap;
}
.tabs a:hover { background: var(--panel-2); color: var(--text); }
.tabs a.on { background: var(--panel-2); color: var(--text); }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; }

/* ---------- przelacznik motywu ---------- */
.themes, .langs {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.themes button, .langs button {
  width: 26px; height: 26px; border-radius: calc(var(--radius) - 3px); border: 0; padding: 0; cursor: pointer;
  display: inline-grid; place-items: center; background: transparent; color: var(--muted);
}
.themes button:hover, .langs button:hover { color: var(--text); background: var(--panel-2); }
.themes button[aria-pressed="true"], .langs button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.themes button:focus-visible, .langs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.themes svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* jezyk + motyw obok siebie w pasku */
.prefs { display: flex; align-items: center; gap: 8px; }
/* przelacznik jezyka – ten sam ksztalt co motywy, z napisami PL / EN */
.langs button { font-family: inherit; font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .02em; }
html.theme-anim, html.theme-anim * { transition: background-color .2s, border-color .2s, color .2s !important; }

/* ---------- kontrolki ---------- */
.btn {
  height: var(--h-btn); padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.btn.primary:hover { background: var(--gold-hover); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

input, select {
  height: var(--h-field); padding: 0 10px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; min-width: 0;
}
input:focus, select:focus, .btn:focus-visible, .pick:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
input[type=number] { width: 56px; }
input[type=checkbox] { height: auto; }
label.field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }

/* ---------- uklad ---------- */
.view { max-width: 1120px; margin: 0 auto; padding: 20px 16px 64px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.pill.gold { color: var(--gold); border-color: var(--gold-line); }
.pill.good { color: var(--good); border-color: var(--good-line); }
.pill.bad { color: var(--bad); border-color: var(--bad-line); }
.pill.warn { color: var(--warn); border-color: var(--warn-line); }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.live.off::before { background: var(--bad); }

/* ---------- logowanie ---------- */
.auth { max-width: 380px; margin: 40px auto; padding: 24px; display: grid; gap: 14px; }
.auth p { margin: 0; }
.err { color: var(--bad); min-height: 1.4em; margin: 0; }
.okmsg { color: var(--good); margin: 0; }

/* ---------- ranking ---------- */
.rank { width: 100%; border-collapse: collapse; }
.rank-wrap { overflow-x: auto; }
.rank th, .rank td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.rank th { font-size: 12px; color: var(--muted); font-weight: 500; }
.rank tr:last-child td { border-bottom: 0; }
.rank tr.me td { background: var(--me-bg); }
.rank tr.dead td { color: var(--muted); }
.rank .place { width: 44px; color: var(--muted); }
.rank .p1 { color: var(--gold); font-weight: 700; }
.rank .nick { font-weight: 600; }
.pill.out { margin-left: 8px; }
.hearts { display: inline-flex; gap: 2px; vertical-align: middle; }
.heart { width: 16px; height: 16px; }
.heart.full { fill: var(--bad); }
.heart.empty { fill: none; stroke: var(--faint); stroke-width: 2; }
.heart.bonus { fill: var(--gold); }
.heart.half { fill: none; }
.heart.half .rest { fill: none; stroke: var(--faint); stroke-width: 2; }
.heart.half.full .fill { fill: var(--bad); }
.heart.half.bonus .fill { fill: var(--gold); }
.who .heart { width: 13px; height: 13px; }   /* 7 serc w pasku zajmuje tyle miejsca co dawniej 5 */
.heart.inline { width: 1.05em; height: 1.05em; vertical-align: -0.18em; }
.gallows { width: 34px; height: 34px; vertical-align: middle; }
.gallows path, .gallows circle, .gallows line { fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.gallows .frame { stroke: var(--faint); }
.gallows .dead { stroke: var(--bad); }
.dots { display: inline-flex; gap: 3px; flex-wrap: wrap; max-width: 260px; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--dot-empty); }
.dot.hit { background: var(--good); }
.dot.exact { background: var(--gold); }
.dot.miss { background: var(--bad); }
.dot.none { background: transparent; border: 1.5px solid var(--bad); }
.dot.late { background: transparent; border: 1.5px solid var(--faint); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span.t { display: inline; }
/* ranking: liczba graczy po lewej, legenda kolorow po prawej – jedna linia */
.rank-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: -6px 0 12px; }
.rank-bar .legend { margin: 0; justify-content: flex-end; }
.info {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--line); font-size: 11px; font-weight: 600; color: var(--muted); cursor: help; vertical-align: 1px;
}
.info:hover, .info:focus { color: var(--text); border-color: var(--muted); outline: none; }

/* ---------- mecze ---------- */
.stage { display: grid; gap: 10px; margin-bottom: 28px; }
.stage-head { display: flex; align-items: baseline; gap: 10px; }
.day { color: var(--muted); font-size: 12px; margin: 6px 0 2px; text-transform: capitalize; }
.match {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px 16px; align-items: center;
  padding: 20px 18px; min-height: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.match .when { color: var(--muted); font-size: 12px; line-height: 1.3; justify-self: start; }
.match .when b { display: block; color: var(--text); font-size: 15px; font-weight: 600; }
/* wynik zawsze na srodku karty; po obu stronach: logo, potem skrot */
.vs { display: grid; grid-template-columns: 150px 96px 150px; align-items: center; gap: 12px; }
.team { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.team.b { justify-content: flex-start; }
.team .code { font-size: 20px; font-weight: 700; letter-spacing: 0.02em; }
.ticon.lg { width: 36px; height: 36px; font-size: 15px; }
.team .full { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team.win .code { color: var(--gold); }
.team.lose { opacity: 0.55; }
.team.tbd .code { color: var(--muted); font-weight: 500; }
.score { font-size: 28px; font-weight: 700; text-align: center; line-height: 1; white-space: nowrap; }
.score.pending { color: var(--muted); font-size: 18px; font-weight: 500; }
.meta { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; justify-self: end; }
.match .left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-self: start; min-width: 0; }
.match .status { display: flex; gap: 6px; flex-wrap: wrap; }
/* mecze otwarte do typowania: zielona ramka i lekko podbarwione tło */
.match.open {
  border-color: var(--good-line);
  background: color-mix(in srgb, var(--good) 7%, var(--panel));
}
.match .meta a.pill { text-decoration: none; }
.match .meta a.pill:hover { background: var(--panel-2); }
/* bieżący mecz: złota ramka */
.match.current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-line); scroll-margin: 80px 0; }

/* ---------- obstawianie ---------- */
.picks { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); gap: 8px; align-items: stretch; }
.picks.bo5 { grid-template-columns: repeat(3, minmax(0, 1fr)) 1px repeat(3, minmax(0, 1fr)); }
.picks.bo3 { grid-template-columns: repeat(2, minmax(0, 1fr)) 1px repeat(2, minmax(0, 1fr)); }
table.join { border-collapse: collapse; margin-top: 4px; }
table.join th, table.join td { text-align: left; padding: 6px 16px 6px 0; border-bottom: 1px solid var(--line); }
table.join td.num { white-space: nowrap; }
.pick-sep { background: var(--line); width: 1px; }
.pick.saving { opacity: 1; outline: 2px dashed var(--gold); outline-offset: 1px; }
.pick {
  height: 40px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel-2);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; padding: 0 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pick small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; line-height: 1; }
.pick:hover { background: var(--hover); }
.pick.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.pick.on small { color: var(--gold-ink); }
.pick:disabled { cursor: not-allowed; opacity: 0.5; }
.betcard { padding: 14px; display: grid; gap: 12px; }
.betcard .top-line { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.status-banner { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 16px; }
.status-banner.warn { border-color: var(--warn-line); }
.status-banner.bad { border-color: var(--bad-line); }
.others { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- admin ---------- */
.admin-grid { display: grid; gap: 24px; }
.utable { width: 100%; border-collapse: collapse; }
.utable td, .utable th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.utable th { font-size: 12px; color: var(--muted); font-weight: 500; }
.medit {
  display: grid; gap: 8px; align-items: center; padding: 10px 12px;
  grid-template-columns: minmax(150px, 1fr) 200px 76px 92px 124px 92px 150px auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.medit.dirty { border-color: var(--gold); }
.medit .sc { display: flex; gap: 4px; align-items: center; justify-content: center; }
.medit .chk { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.medit input, .medit select { width: 100%; }
.medit .sc input { width: 48px; }
.medit .opts { gap: 4px; }
.medit .opts select { height: 30px; font-size: 12px; }
h3.pad-top { margin-top: 28px; }
.view > div > h3 { margin: 8px 0 10px; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20;
  background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; max-width: calc(100% - 32px);
}
.toast.bad { border-color: var(--bad-line); color: var(--bad-ink); }

.rules { max-width: 720px; padding: 20px 24px; line-height: 1.6; }
.rules li { margin: 4px 0; }

@media (max-width: 1000px) {
  .medit { grid-template-columns: 1fr 1fr 1fr; }
  .medit .lbl { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .top { height: auto; flex-wrap: wrap; padding: 8px 16px; gap: 8px; }
  .tabs { order: 4; width: 100%; }
  /* język + motyw trzymają się razem: obok logo albo (gdy brak miejsca) we własnym wierszu */
  .prefs { order: 1; margin-left: auto; }
  /* drugi wiersz: serca, nick … i Zaloguj/Wyloguj skrajnie po prawej */
  .who { order: 2; flex: 1 1 60%; margin-left: 0; justify-content: flex-end; }
  .top-auth { order: 3; }
  .match { grid-template-columns: 1fr; gap: 12px; padding: 16px 14px; }
  .vs { grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr); gap: 8px; }
  .score { font-size: 24px; }
  .score.pending { font-size: 16px; }
  .team .code { font-size: 17px; }
  .ticon.lg { width: 30px; height: 30px; }
  .meta { justify-self: start; }
  .match .when { display: flex; gap: 8px; align-items: baseline; }
  .match .when b { display: inline; font-size: 14px; }
  .meta { justify-content: flex-start; }
  .team .full { display: none; }
  .picks.bo5 { gap: 4px; }
  .picks.bo5 .pick { padding: 0 2px; }
  .rank-bar .legend { justify-content: flex-start; }
  .rank .hide-sm { display: none; }
  .rank th, .rank td { padding: 8px 6px; }
  .rank .pill.out { margin-left: 4px; padding: 0 6px; }
  .medit { grid-template-columns: 1fr 1fr; }
}

/* ---------- poprawki 17.10 ---------- */
.live[hidden] { display: none; }
.live::before { background: var(--bad); }
.stage-head.sec { margin: 4px 0 10px; }
.stage-head.pad-top { margin-top: 28px; }
/* ikona drużyny (na razie "?") */
.ticon {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1;
}
img.ticon { object-fit: contain; background: none; border: 0; border-radius: 0; }
.betcard .bt { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pick .pick-team { display: inline-flex; align-items: center; gap: 6px; }
.rules-page { max-width: 720px; }
.rules h2 { margin-bottom: 6px; }
.rules p { margin: 0; }

.top-auth { display: flex; align-items: center; }

/* ---------- druzyny ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.tteam {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.ticon.xl { width: 48px; height: 48px; font-size: 18px; }
.tinfo { display: grid; gap: 3px; min-width: 0; }
.tline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tcode { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
.tname { font-weight: 500; }
/* tagi nad nazwą: [LCK | #1] [START | Swiss] [KONIEC | Play-In] */
.tteam { display: grid; grid-template-columns: auto minmax(0, 1fr); row-gap: 10px; }
.tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: stretch; height: 20px; border-radius: 5px; overflow: hidden;
  border: 1px solid var(--line); font-size: 11px; line-height: 1; white-space: nowrap;
}
.tag .k, .tag .v { display: inline-flex; align-items: center; padding: 0 7px; }
.tag .k {
  background: var(--panel-2); color: var(--muted); border-right: 1px solid var(--line);
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.tag .v { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tag.seed { border-color: var(--gold-line); }
.tag.seed .k { border-color: var(--gold-line); }
.tag.seed .v { color: var(--gold); }
.tag.end { border-color: var(--bad-line); }
.tag.end .k { border-color: var(--bad-line); color: var(--bad); }
.tag.end .v { color: var(--bad); }
/* odpadnięte drużyny: wyciszone, logo w szarości */
.tteam.out { background: transparent; border-style: dashed; }
.tteam.out .tcode, .tteam.out .tname, .tteam.out .twhy, .tteam.out .tag:not(.end) { opacity: 0.5; }
.tteam.out img.ticon { filter: grayscale(1); opacity: 0.45; }
:root:not([data-theme="light"]) .tteam.out img.ticon.mono { filter: invert(1) grayscale(1); }
.twhy { font-size: 13px; }
.tnote { font-size: 12px; }
.tnote::before { content: "· "; }
/* czarne loga w ciemnych motywach */
:root:not([data-theme="light"]) img.ticon.mono { filter: invert(1); }
@media (max-width: 720px) {
  .tgrid { grid-template-columns: 1fr; }
  .tnote { flex-basis: 100%; }
  .tnote::before { content: none; }
  .stage-head { flex-wrap: wrap; }
}

/* ---------- admin: zakładki ---------- */
.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.subtabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px;
  color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent;
}
.subtabs a:hover { color: var(--text); }
.subtabs a.on { color: var(--text); font-weight: 600; border-bottom-color: var(--gold); }
.subtabs .cnt {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center;
  background: var(--warn); color: var(--gold-ink); font-size: 11px; font-weight: 700;
}

/* ---------- admin: drużyny ---------- */
.alist { gap: 6px; margin-bottom: 18px; }
.alist .stage-head { margin-bottom: 2px; }
.arow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.arow .aname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.arow .tcode { font-size: 15px; min-width: 44px; }
.arow .tname { color: var(--muted); font-weight: 400; }
.arow.out { background: transparent; border-style: dashed; }
.arow.out .aname { opacity: 0.5; }
.arow.out img.ticon { filter: grayscale(1); }
:root:not([data-theme="light"]) .arow.out img.ticon.mono { filter: invert(1) grayscale(1); }
.actl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg-lab { font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button {
  height: 28px; padding: 0 10px; border: 0; border-right: 1px solid var(--line);
  background: var(--panel-2); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.seg button:last-child { border-right: 0; }
.seg button:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.seg button:disabled { cursor: wait; }
.seg button.na { cursor: default; color: var(--faint); background: transparent; }
.seg button.on.alive { background: color-mix(in srgb, var(--good) 16%, var(--panel-2)); color: var(--good); font-weight: 600; }
.seg button.on.out { background: color-mix(in srgb, var(--bad) 16%, var(--panel-2)); color: var(--bad); font-weight: 600; }
@media (max-width: 720px) {
  .actl { width: 100%; }
  .seg { max-width: 100%; overflow-x: auto; }
}

/* ---------- admin: nowe hasło po resecie ---------- */
.reset-box { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 0; }
.reset-box .stack { gap: 6px; }
.temp-pw {
  justify-self: start; padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--warn-line);
  background: var(--bg); font: 600 20px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.06em;
  user-select: all;
}
