

:root {
  --ink: #15202b;
  --ink-2: #435362;
  --ink-3: #66788a;
  --paper: #f4f6f9;
  --band: #0a66b0;          
  --band-edge: #3f9b2a;     
  --gutter: max(40px, calc((100% - 1180px) / 2));
  --shadow: 0 1px 2px rgba(16, 40, 70, .06), 0 6px 18px rgba(16, 40, 70, .06);
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #d9e1e8;
  --line-2: #e9eef2;

  --brand: #0a66b0;
  --brand-ink: #074f8a;
  --brand-soft: #e6f0f9;
  --accent: #3f9b2a;           

  --ok: #2b7a1b;
  --ok-soft: #e8f5e2;
  --bad: #b3261e;
  --bad-soft: #fcebea;
  --warn: #7a4f00;
  --warn-soft: #fff3d1;

  --slip: #fdf1f3;
  --slip-line: #e2a9b4;
  --slip-ink: #8d2840;
  --slip-field: #ffffff;

  --r-sm: 4px;
  --r: 8px;
  --r-lg: 12px;

  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --side: 248px;
  --focus: 0 0 0 3px rgba(10, 102, 176, .35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6edf3;
    --ink-2: #b4c1cd;
    --ink-3: #8b9aa8;
    --paper: #0f161d;
    --band: #0d2c47;
    --band-edge: #4f9a3a;
    --shadow: none;
    --surface: #17212b;
    --surface-2: #1c2834;
    --line: #2c3a47;
    --line-2: #23303c;
    --brand: #5aa9ea;
    --brand-ink: #8cc4f2;
    --brand-soft: #16324a;
    --accent: #6cc04f;
    --ok: #7fd06a;
    --ok-soft: #173321;
    --bad: #ff8a80;
    --bad-soft: #3a1b1b;
    --warn: #f5c76b;
    --warn-soft: #362a10;
    --slip: #2a1c22;
    --slip-line: #6f3a48;
    --slip-ink: #f0a9b9;
    --slip-field: #1f161a;
    --focus: 0 0 0 3px rgba(90, 169, 234, .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 .75rem; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-ink); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
img { max-width: 100%; }
.num, td.kw, .kwota { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic-lg { width: 26px; height: 26px; }
.plus { color: var(--ok); }
.minus { color: var(--bad); }

.app {
  min-height: 100vh; display: grid; grid-template-columns: var(--side) minmax(0, 1fr);

  background: linear-gradient(90deg, var(--surface) calc(var(--side) - 1px), var(--line) calc(var(--side) - 1px) var(--side), transparent var(--side));
}

.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  overflow-y: auto;
}
.side-logo { display: block; padding: 4px 10px 18px; text-decoration: none; }
.side-logo img { height: 44px; width: auto; display: block; }
.side-logo span { display: block; margin-top: 6px; font-size: .8125rem; color: var(--ink-3); }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r);
  color: var(--ink-2); text-decoration: none; font-weight: 600;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 3px 0 0 var(--brand); }
.nav-sep { height: 1px; background: var(--line-2); margin: 10px 8px; }
.side-user { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line-2); font-size: .875rem; }
.side-user strong { display: block; color: var(--ink); overflow-wrap: anywhere; }
.side-user form { margin-top: 8px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 16px;
  padding: 30px var(--gutter) 30px;
  background: var(--band); color: #fff;
  border-bottom: 4px solid var(--band-edge);
}
.top h1 { margin-right: auto; color: #fff; }
.saldo-chip {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink-2); font-size: .9375rem;
}
.saldo-chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.saldo-chip.dlug b { color: var(--bad); }
.menu-btn { display: none; }
.sesja { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .85); font-size: .875rem; white-space: nowrap; }
.sesja b { color: #fff; font-variant-numeric: tabular-nums; min-width: 3.2em; display: inline-block; }
.sesja .ic { width: 18px; height: 18px; }
.sesja.konczy b { color: #ffd166; }
.sesja-okno {
  border: 0; border-radius: var(--r-lg); padding: 24px 26px; max-width: 440px; width: calc(100% - 32px);
  background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(10, 30, 50, .35);
}
.sesja-okno::backdrop { background: rgba(10, 25, 40, .55); }
.sesja-okno h2 { margin-bottom: 10px; }
.sesja-okno p b { font-variant-numeric: tabular-nums; }
.sesja-okno form { margin: 0; }
.content { padding: 28px var(--gutter) 56px; width: 100%; }
.foot { margin-top: auto; padding: 20px var(--gutter) 28px; color: var(--ink-3); font-size: .8125rem; }

.admin-bar {
  background: var(--warn-soft); color: var(--warn);
  padding: 8px var(--gutter); font-size: .9375rem; border-bottom: 1px solid var(--line);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 18px;
  border-radius: var(--r); border: 1px solid transparent;
  background: var(--brand); color: #fff;
  font: inherit; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brand-ink); color: #fff; }
.btn-2 { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-2:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--brand); font-weight: 600; text-decoration: underline; }
.btn-link:hover { background: none; color: var(--brand-ink); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9375rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (prefers-color-scheme: dark) { .btn { color: #0f161d; } .btn:hover { color: #0f161d; } .btn-2, .btn-2:hover { color: var(--ink); } }

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--r);
  background: var(--brand-soft); color: var(--ink);
  border-left: 4px solid var(--brand);
  margin-bottom: 12px;
}
.alert .ic { margin-top: 2px; color: var(--brand); }
.alert-success { background: var(--ok-soft); border-color: var(--ok); }
.alert-success .ic { color: var(--ok); }
.alert-error { background: var(--bad-soft); border-color: var(--bad); }
.alert-error .ic { color: var(--bad); }
.alert-warning { background: var(--warn-soft); border-color: var(--warn); }
.alert-warning .ic { color: var(--warn); }
.alert ul { margin: 0; padding-left: 18px; }

.tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: .8125rem; font-weight: 700; line-height: 1.6;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-bad { background: var(--bad-soft); color: var(--bad); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-brand { background: var(--brand-soft); color: var(--brand-ink); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.blankiet { box-shadow: var(--shadow); }
.panel-pad { padding: 22px 24px; }
.sekcja { margin-top: 36px; }
.sekcja:first-child { margin-top: 0; }
.sekcja-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.sekcja-head h2 { margin-right: auto; }
.sekcja-head a { font-weight: 600; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: .9375rem; }
.field .hint { font-size: .875rem; color: var(--ink-3); }
.input, select.input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font: inherit;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 52px; }
.pass-toggle {
  position: absolute; right: 4px; top: 4px; width: 40px; height: 38px;
  border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: var(--r-sm);
}
.meter { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: 2px; }
.meter i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s, background .2s; }
.meter[data-ok="1"] i { background: var(--ok); }

.tabela-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tabela { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.tabela th, .tabela td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tabela thead th { font-size: .8125rem; color: var(--ink-3); font-weight: 700; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tabela th.r, .tabela td.r { text-align: right; }
.tabela tbody tr:hover td { background: var(--surface-2); }
.tabela .grupa td { background: var(--surface-2); font-weight: 700; color: var(--ink-2); padding-top: 14px; }
.tabela .grupa:hover td { background: var(--surface-2); }
.tabela tfoot td { font-weight: 700; border-bottom: 0; }

dl.kv { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; margin: 0; }
dl.kv dt, dl.kv dd { padding: 9px 0; border-bottom: 1px solid var(--line-2); margin: 0; }
dl.kv dt { color: var(--ink-3); padding-right: 16px; }
dl.kv dd { font-weight: 600; overflow-wrap: anywhere; }
dl.kv > :nth-last-child(-n+2) { border-bottom: 0; }

.zakladki { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.zakladki a {
  padding: 10px 16px; text-decoration: none; color: var(--ink-2); font-weight: 700;
  border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.zakladki a[aria-current="page"] { color: var(--brand-ink); border-bottom-color: var(--brand); }

.pusto { padding: 28px 24px; text-align: left; color: var(--ink-2); }
.pusto strong { display: block; color: var(--ink); font-size: 1.0625rem; margin-bottom: 4px; }

.pulpit-gora { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 24px; align-items: start; }

.saldo-blok { padding: 26px 28px; }
.saldo-blok .powitanie { color: var(--ink-3); margin-bottom: 14px; }
.saldo-blok .etykieta { font-size: 1.0625rem; font-weight: 700; color: var(--ink-2); }
.saldo-blok .wartosc {
  font-size: clamp(2.5rem, 6vw, 3.6rem); font-weight: 700; line-height: 1.05; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; margin: 4px 0 10px;
}
.saldo-blok.dlug .wartosc { color: var(--bad); }
.saldo-blok.ok .wartosc { color: var(--ok); }
.saldo-blok .opis { color: var(--ink-2); max-width: 46ch; }
.saldo-blok .btn-row { margin-top: 18px; }
.saldo-fakty { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.saldo-fakty div { display: grid; }
.saldo-fakty span { font-size: .875rem; color: var(--ink-3); }
.saldo-fakty b { font-size: 1.125rem; font-variant-numeric: tabular-nums; }

.blankiet {
  background: var(--slip);
  border: 1px solid var(--slip-line);
  border-radius: var(--r);
  padding: 16px 16px 18px;
  color: var(--slip-ink);
  position: relative;
}
.blankiet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.blankiet-head h2 { font-size: 1rem; color: var(--slip-ink); }
.blankiet-head span { font-size: .8125rem; }
.pole { margin-top: 8px; }
.pole-et { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; font-size: .75rem; font-weight: 700; margin-bottom: 2px; min-height: 26px; }
.pole > div:not(.pole-et) {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  min-height: 38px; padding: 6px 10px;
  background: var(--slip-field);
  border: 1px solid var(--slip-line);
  color: var(--ink); font-weight: 700;
  overflow-wrap: anywhere;
}
.pole-nrb > div:not(.pole-et) {
  font-variant-numeric: tabular-nums; letter-spacing: .02em; font-size: clamp(.95rem, 2.6vw, 1.0625rem);
}
.pole-rzad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kopiuj {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: none; padding: 4px 6px; border-radius: var(--r-sm);
  color: var(--slip-ink); font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer;
}
.kopiuj:hover { background: var(--slip); }
.kopiuj .ic { width: 16px; height: 16px; }
.blankiet-qr { display: flex; gap: 14px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--slip-line); }
.blankiet-qr img { width: 112px; height: 112px; background: #fff; padding: 4px; border-radius: var(--r-sm); image-rendering: pixelated; }
.blankiet-qr p { margin: 0; font-size: .875rem; color: var(--ink-2); }
.blankiet .uwaga { margin: 12px 0 0; font-size: .875rem; color: var(--ink-2); }

.dwie-kol { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.lista-uslug { list-style: none; margin: 0; padding: 0; }
.lista-uslug li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.lista-uslug li:last-child { border-bottom: 0; }
.lista-uslug .ic-box { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); flex: none; }
.lista-uslug .tresc { min-width: 0; flex: 1; }
.lista-uslug .tresc strong { display: block; }
.lista-uslug .tresc span { color: var(--ink-3); font-size: .875rem; }
.lista-uslug .cena { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.lista-uslug .cena s { display: block; font-weight: 400; color: var(--ink-3); font-size: .8125rem; }
.adres-grupa + .adres-grupa { margin-top: 16px; }
.adres-naglowek { display: flex; gap: 10px; align-items: center; padding: 16px 24px 12px; border-bottom: 1px solid var(--line-2); }
.adres-naglowek .ic { color: var(--brand); }
.umowa-mini { padding: 4px 24px 6px; }
.umowa-mini + .umowa-mini { border-top: 1px dashed var(--line); }
.umowa-nr { padding-top: 12px; font-size: .8125rem; color: var(--ink-3); font-weight: 700; }
.rozwin { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 10px; padding: 6px 10px 6px 6px; border: 0; border-radius: var(--r); background: none; color: var(--brand-ink); font: inherit; font-size: .875rem; font-weight: 700; cursor: pointer; }
.rozwin:hover { background: var(--brand-soft); }
.rozwin:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rozwin .ic { transition: transform .15s; }
.rozwin[aria-expanded="true"] .ic { transform: rotate(180deg); }
.szukaj { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.szukaj > .ic { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.szukaj input { flex: 1; min-width: 0; height: 48px; padding: 0 14px 0 44px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface, #fff); font: inherit; font-size: 1rem; color: inherit; }
.szukaj input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.szukaj-ile { white-space: nowrap; }
.razem-wszystko { display: flex; justify-content: space-between; gap: 16px; margin: 14px 4px 0; font-weight: 700; }
.suma-rzad { display: flex; justify-content: space-between; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); font-weight: 700; }

.mini-lista { list-style: none; margin: 0; padding: 0; }
.mini-lista li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); align-items: center; }
.mini-lista li:last-child { border-bottom: 0; }
.mini-lista .co { min-width: 0; }
.mini-lista .co a, .mini-lista .co strong { font-weight: 700; display: block; }
.mini-lista .co span { color: var(--ink-3); font-size: .875rem; }
.mini-lista .ile { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.umowa { margin-bottom: 28px; overflow: hidden; }
.umowa-head { padding: 20px 24px 16px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); }
.umowa-head .linia { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.umowa-head h2 { margin-right: 4px; }
.umowa-numer { font-size: .9375rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.umowa-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--ink-2); font-size: .9375rem; }
.zakres { padding: 18px 24px 4px; }
.zakres + .zakres { border-top: 1px dashed var(--line); }
.zakres-nowy { background: var(--brand-soft); }
.zakres h3 { margin-bottom: 4px; }
.pozycja { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.zakres-nowy .pozycja { border-bottom-color: var(--line); }
.pozycja:last-child { border-bottom: 0; }
.pozycja .nazwa { font-weight: 700; }
.pozycja .cena { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pozycja .szczegoly { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .875rem; color: var(--ink-2); }
.pozycja .szczegoly .tag { font-size: .75rem; }
.sumy { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 28px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface-2); }
.sumy div { text-align: right; }
.sumy span { display: block; font-size: .8125rem; color: var(--ink-3); }
.sumy b { font-size: 1.125rem; font-variant-numeric: tabular-nums; }

.grupa-uslug { margin-bottom: 32px; }
.grupa-uslug > h2 { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.grupa-uslug > h2 .ic { color: var(--brand); }
.usluga-karta { padding: 20px 24px; margin-bottom: 12px; }
.usluga-karta .naglowek { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; margin-bottom: 12px; }
.usluga-karta .naglowek strong { font-size: 1.125rem; }
.usluga-karta .numer { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.usluga-karta .naglowek .gdzie { color: var(--ink-3); font-size: .875rem; width: 100%; }
.uk-siatka { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 32px; }
.zuzycie { display: grid; gap: 14px; margin: 6px 0 4px; }
.zuzycie-rzad .opis { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; margin-bottom: 4px; }
.zuzycie-rzad .opis b { font-variant-numeric: tabular-nums; }
.pasek { height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.pasek i { display: block; height: 100%; background: var(--brand); border-radius: 5px; min-width: 2px; }
.pasek.blisko i { background: var(--warn); }
.pasek.koniec i { background: var(--bad); }
.usluga-karta .akcje { margin-top: 14px; }

.filtr { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin-bottom: 18px; }
.filtr .field { margin: 0; }
.filtr .field .input { min-width: 140px; }
.historia td.dok strong { display: block; }
.historia td.dok span { display: block; color: var(--ink-3); font-size: .875rem; overflow-wrap: anywhere; }
.historia .otwarcie td { color: var(--ink-2); font-style: italic; }
.saldo-pasek { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; padding: 16px 24px; margin-bottom: 22px; }
.saldo-pasek .s { display: grid; }
.saldo-pasek .s span { font-size: .875rem; color: var(--ink-3); }
.saldo-pasek .s b { font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.saldo-pasek .btn-row { margin-left: auto; }

.faktura-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 4px 0 18px; }
.faktura-meta div { display: grid; }
.faktura-meta span { font-size: .875rem; color: var(--ink-3); }
.faktura-meta b { font-variant-numeric: tabular-nums; }
.papier { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 0; overflow: hidden; }
.papier iframe { display: block; width: 100%; min-height: 600px; height: 1100px; border: 0; background: #fff; }
.wstecz { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; text-decoration: none; margin-bottom: 10px; }

.gsm-naglowek { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; margin: 4px 0 8px; }
.gsm-naglowek .numer { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.wybor-lista { border: 0; margin: 0; padding: 0; }
.wybor { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.wybor:hover { background: var(--surface-2); }
.wybor input { width: 20px; height: 20px; accent-color: var(--brand); }
.wybor-tresc { display: grid; gap: 2px; }
.wybor-cena { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wybor:has(input:checked) { background: var(--brand-soft); }
.wybor-off { opacity: .6; cursor: default; }
.zatwierdz { display: grid; gap: 14px; justify-items: start; }
.zatwierdz p { margin: 0; }
.zgoda-check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-size: .9375rem; color: var(--ink-2); cursor: pointer; }
.zgoda-check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--brand); }
.roaming h2 { margin-bottom: 10px; }
.roaming h3 { margin: 24px 0 10px; }
.roaming > p { max-width: 75ch; }
.dokumenty { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.dokumenty li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.roaming-info { padding-left: 22px; max-width: 75ch; display: grid; gap: 10px; color: var(--ink-2); }
.roaming-info strong { color: var(--ink); }
.oswiadczenia { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.oswiadczenia fieldset { border: 0; padding: 0; margin: 0; }
.oswiadczenia fieldset:disabled { opacity: .5; }
.oswiadczenia em { font-style: normal; color: var(--ink-3); }

.billing-sumy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 18px; }
.billing-sumy div { padding: 16px 20px; border-right: 1px solid var(--line-2); }
.billing-sumy div:last-child { border-right: 0; }
.billing-sumy span { display: block; font-size: .875rem; color: var(--ink-3); }
.billing-sumy b { font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.typ { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: .8125rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); }
.typ-moc { background: var(--brand-soft); color: var(--brand-ink); }
.typ-smo { background: var(--ok-soft); color: var(--ok); }
.typ-mms { background: var(--warn-soft); color: var(--warn); }

.zgody { list-style: none; margin: 0; padding: 0; }
.zgody li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; padding: 16px 24px; border-bottom: 1px solid var(--line-2); align-items: center; }
.zgody li:last-child { border-bottom: 0; }
.zgody .tresc { font-size: .9375rem; color: var(--ink-2); }
.zgody .tresc .tag { margin-left: 6px; }
.przelacznik { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.przelacznik input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 14px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.przelacznik input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.przelacznik input:checked { background: var(--ok); }
.przelacznik input:checked::after { transform: translateX(20px); }
.przelacznik input:focus-visible { box-shadow: var(--focus); }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-brand {
  background: var(--brand); color: #fff;
  padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-brand .logo-tlo { background: #fff; display: inline-block; padding: 14px 18px; border-radius: var(--r-lg); align-self: flex-start; }
.auth-brand .logo-tlo img { height: 64px; width: auto; display: block; }
.auth-brand h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); max-width: 16ch; line-height: 1.15; margin: 40px 0 16px; }
.auth-brand ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 1.0625rem; max-width: 34ch; }
.auth-brand li { display: flex; gap: 10px; align-items: flex-start; }
.auth-brand li .ic { margin-top: 3px; color: #b9e3a9; }
.auth-brand .kontakt { font-size: .9375rem; opacity: .9; margin-top: 32px; }
.auth-brand .kontakt a { color: #fff; }
@media (prefers-color-scheme: dark) { .auth-brand { background: #0b3d66; } }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form h1 { margin-bottom: 8px; }
.auth-form .lead { color: var(--ink-2); margin-bottom: 24px; }
.auth-form .btn { width: 100%; margin-top: 4px; }
.auth-form .pod { margin-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .9375rem; }
.auth-form .logo-mob { display: none; height: 48px; width: auto; margin-bottom: 24px; }

.blad-strona { max-width: 560px; margin: 12vh auto; padding: 0 24px; }
.blad-strona .kod { font-size: 4rem; font-weight: 700; color: var(--line); line-height: 1; }

@media (max-width: 1100px) {
  .pulpit-gora { grid-template-columns: 1fr; }
  .dwie-kol { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; background: none; }
  .side {
    position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: min(300px, 86vw);
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0);
  }
  .menu-otwarte .side { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 20, 30, .45); }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--r);
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  }
  .top { padding: 14px 16px 18px; flex-wrap: wrap; }
  .top .menu-btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); color: #fff; }
  .top h1 { order: 3; width: 100%; font-size: 1.5rem; margin-top: 6px; }
  .top .saldo-chip { margin-left: auto; }
  .top .sesja { order: 4; width: 100%; font-size: .8125rem; }
  .content { padding: 16px 16px 40px; }
  .foot { padding: 16px; }
  .admin-bar { padding: 8px 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form { align-items: flex-start; padding-top: 48px; }
  .auth-form .logo-mob { display: block; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .panel-pad, .saldo-blok { padding: 18px 16px; }
  .umowa-head, .zakres, .sumy, .usluga-karta, .suma-rzad, .umowa-mini, .adres-naglowek { padding-left: 16px; padding-right: 16px; }
  .zgody li { grid-template-columns: 1fr; padding: 14px 16px; }
  .wybor { padding: 14px 16px; grid-template-columns: auto minmax(0, 1fr); }
  .wybor-cena { grid-column: 2; }
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dt { border-bottom: 0; padding-bottom: 0; }
  .pole-rzad { grid-template-columns: 1fr; }
  .billing-sumy { grid-template-columns: 1fr; }
  .billing-sumy div { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .saldo-pasek .btn-row { margin-left: 0; }
  .mini-lista li { padding: 12px 16px; }

  .tabela.karty thead { display: none; }
  .tabela.karty, .tabela.karty tbody, .tabela.karty tr, .tabela.karty td { display: block; width: 100%; }
  .tabela.karty tr { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  .tabela.karty td { border: 0; padding: 2px 16px; text-align: left !important; }
  .tabela.karty td[data-l]::before { content: attr(data-l) ": "; color: var(--ink-3); font-weight: 400; }
  .tabela.karty .grupa td { padding: 10px 16px; }
  .papier iframe { min-height: 80vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .side, .top .saldo-chip, .menu-btn, .foot, .btn, .btn-row, .admin-bar { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .content { padding: 0; }
}
