/* Spis treści (szukaj po nagłówku „---- … ----”). Reguły są w kolejności dodawania — późniejsze
   nadpisują wcześniejsze, więc NIE przenoś bloków między plikami/miejscami bez sprawdzenia wyglądu.
   - v64: historia zamówień klienta (na końcu pliku)
   - v63: kopie automatyczne i OneDrive (na końcu pliku)
   - v62: sekcja Rozliczone (na końcu pliku)
   - v61: własne wpisy do rozliczenia (na końcu pliku)
   - v60: Rozliczenia Polkurier, wybór nadań z sumą (na końcu pliku)
   - v59: strona zamówienia w panelu: nagłówek i przyciski (na końcu pliku)
   - v58: filtr i lista zamówień na telefonie (na końcu pliku)
   - v57: tabela wariantów w sklepie bez przewijania w bok (na końcu pliku)
   - v56: koszyk, zamówienia i rozmowa z klientem (na końcu pliku)
   - v2: role, historia, etykiety, admin
   - v3: sekcje historii, pobieranie zdjęcia
   - v4: wysyłki (Polkurier)
   - v5: przywracanie kopii
   - v6: lista kopii
   - v7: potwierdzanie hasłem
   - v8: diagnostyka połączenia
   - v9: katalog — produkty z wariantami, filtry, lokalizacje, ceny
   - v10: lista wyboru lokalizacji
   - v11: tytuł w dwóch liniach, ilość + cena zamiast −/+ na stanie
   - v11: przełącznik motywu
   - v12: galeria i karuzela zdjęć
   - v12: filtry i menu na telefonie
   - v13: logo z rybą
   - v14: kolor akcentu #f8cd3a dla przycisków głównych
   - v14: lista rozwijana z wyszukiwaniem
   - v14: profil, pasek użytkownika
   - v14: galeria z przeciąganiem, strefa wgrywania, przyciski zdjęć
   - v14: edycja aktualnego stanu
   - v14: adresy lokalizacji
   - v14: ceny kurierów na żywo
   - v14: notatki
   - v14: zysk
   - v15: TODO
   - v15: flagi (Windows nie ma emoji flag — dołączona czcionka Twemoji Country Flags, CC-BY 4.0)
   - v15: rozmiar odzieży
   - v16: kategorie z podkategoriami, zakładki bez paska przewijania
   - v17: kolejność zadań i notatek, zadania w Markdown
   - v18: górne menu — przyciski i listy rozwijane
   - v18: ładniejsze przyciski na zdjęciach
   - v18: kafelki równej wysokości
   - v18: zakładki jako wyraźne przyciski (segmenty)
   - v19: sklep — publiczna strona główna
   - v20: widoczność w sklepie, stan dla klienta
   - v21: sklep — lista kategorii z podkategoriami
   - v22: strona Aplikacja (instalacja na telefonie)
   - v23: kafelki Aplikacji równej wysokości, strona Kontakt, stopka sklepu
   - v24: podgląd zdjęć na cały ekran (lightbox)
   - v25: 2FA i logowanie przez Authentik
   - v26: telefony — nic poza ekranem, zakładki jako przyciski (jak w Kategoriach)
   - v27: kraje w lokalizacjach
   - v28: Kategorie jako kafelki + strona pozycji, opis przy kopii
   - v29: sklep — obserwowane, baner powitalny, nowości
   - v30: sklep — pasek (motyw, ikona administracji), stopka w 5 kolumnach
   - v31: grupy i uprawnienia
   - v32: treści — Polecenia i rekordy, Pomoc
   - v33: menu ☰ na telefonie, przełącznik widoczności w sklepie, działy strony
   - v34: rozliczenia Polkurier
   - v35: oś czasu historii, pola e-mail, menu ☰, większe przełączniki, stopka panelu
   - v36: czcionka Archivo z własnego serwera, cookies, Omnibus, stan towaru
   - v37: sklep — 5 nowości na głównej, zaproszenie do całego asortymentu (/sklep)
   - v38: sklep — pasek podzielony separatorami, przycisk powrotu na górę
   - v39: panel — link „Strona główna” obok „Wyloguj”
   - v40: sklep — menu ☰ na telefonie z podpisanymi sekcjami
   - v41: strona produktu w panelu — galeria z podglądem, stan i historia pod nią, formularz po prawej
   - v42: formularz produktu w sekcjach (Produkt, Wariant, Magazyn, Ceny, Notatki), przycisk zapisu przyklejony
   - v43: historia ruchów produktu jako karty z podpisanymi polami
   - v44: widoczność w sklepie przy stanie, opis produktu w formularzu
   - v45: karta produktu w sklepie — Obserwuj w prawym górnym rogu, cena bez ramki, opis w ramce
   - v46: karta produktu — stan obok Obserwuj, cena większa na żółtym tle
   - v47: szerokie ekrany (od 1800 px), „Nasza cena” na żółto, mniejsza cena i większa plakietka obniżki
   - v48: karta produktu w sklepie — większe zdjęcie (3/7 szerokości)
   - v49: przyciski akcji produktu (Usuń na górze, oddzielone kreską)
   - v50: sklep — udostępnianie, zapytanie o produkt, polecane i wyprzedaż, podobne produkty
   - v51: opinie klientów (sklep i panel), grupy konta jako checkboxy
*/
/* Magazyn — paleta: grafit, jasny tusz, żółta taśma ostrzegawcza dla niskich stanów.
   Domyślny motyw: ciemny. Jasny: <html data-theme="light"> (przełącznik w górnym pasku, zapamiętany w ciasteczku). */
:root {
  --paper: #151B20;
  --surface: #1E262D;
  --ink: #E6E9E5;
  --muted: #9AA5AD;
  --line: #34404A;
  --tape: #F2C230;
  --tape-dark: #1C2630;
  --ok: #62C291;
  --out: #F08068;
  --in-bg: #1D3229;
  --out-bg: #3A2420;
  --focus: #7FB0E8;
  --r-s: 4px;
  --r-m: 8px;
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --paper: #ECEEE9;
  --surface: #FFFFFF;
  --ink: #1C2630;
  --muted: #5B6770;
  --line: #D3D8D4;
  --ok: #2E7650;
  --out: #B4402A;
  --in-bg: #E3F0E8;
  --out-bg: #F7E3DE;
  --focus: #2563A8;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1 { font-size: 1.875rem; font-weight: 800; font-stretch: 85%; line-height: 1.1; margin: 0 0 .25rem; }
h2 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 .75rem; line-height: 1.3; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .875rem; margin: 0; }
.opt { font-weight: 400; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pasek ostrzegawczy — jedyny ozdobnik w aplikacji, niesie informację o stanie */
.tape, .tile-low::before, .tile-out::before, .auth-card::before, .brand::before {
  background: repeating-linear-gradient(-45deg, var(--tape) 0 9px, var(--tape-dark) 9px 18px);
}

/* Górny pasek */
.topbar {
  display: flex; align-items: center; gap: 1.75rem;
  padding: .7rem clamp(1rem, 3vw, 2rem);
  background: #1C2630; color: #ECEEE9;
}
.brand {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 800; font-stretch: 72%; font-size: 1.375rem; text-decoration: none; line-height: 1;
}
.brand::before { content: ""; width: 1.1rem; height: 1.1rem; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--tape); }
.nav { display: flex; gap: 1.25rem; flex: 1; }
.nav a { text-decoration: none; opacity: .72; padding: .2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { opacity: 1; }
.nav a[aria-current="page"] { opacity: 1; border-bottom-color: var(--tape); }
.who { display: flex; align-items: center; gap: 1rem; font-size: .9375rem; }
.who a { text-decoration: none; }
.who a:hover { text-decoration: underline; }
.who form { margin: 0; }
button.link { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; opacity: .72; }
button.link:hover { opacity: 1; text-decoration: underline; }

.page { max-width: 1240px; margin: 0 auto; padding: 1.75rem clamp(1rem, 3vw, 2rem) 4rem; }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.625rem; padding: .5rem 1.05rem;
  border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 84%, var(--paper)); }
.btn-in { background: var(--in-bg); color: var(--ok); border-color: currentColor; }
.btn-out { background: var(--out-bg); color: var(--out); border-color: currentColor; }
.btn-danger { color: var(--out); border-color: color-mix(in srgb, var(--out) 50%, var(--line)); }
.btn-danger:hover { border-color: var(--out); background: var(--out-bg); }

/* Formularze */
.form { display: flex; flex-direction: column; gap: 1.05rem; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .875rem; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 2.625rem; padding: .55rem .7rem;
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s);
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input[type="file"] { padding: .45rem; }
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: center; gap: .55rem; font-weight: 400; font-size: .9375rem; }
label.check input { width: 1.1rem; min-height: 0; height: 1.1rem; accent-color: var(--ink); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.actions { display: flex; gap: .75rem; padding-top: .25rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 1.25rem; }

/* Komunikaty */
.flashes { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.flash { margin: 0; padding: .65rem .9rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: var(--r-s); }
.flash-error { border-left-color: var(--out); }

/* Lista stanów */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.summary { margin: 0; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.5rem; }
.filters input[type="search"] { flex: 1 1 260px; width: auto; }
.filters select { flex: 0 1 210px; width: auto; }
.clear { color: var(--muted); padding: 0 .25rem; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem;
}
.tile {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  overflow: hidden; scroll-margin-top: 1rem;
}
.tile:target { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile-low { border-color: var(--tape); }
.tile-out { border-color: var(--out); }
.tile-low::before, .tile-out::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; z-index: 1; }
.tile-out::before { background: repeating-linear-gradient(-45deg, var(--out) 0 9px, var(--tape-dark) 9px 18px); }

.tile-photo { display: block; text-decoration: none; aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--line) 40%, var(--surface)); }
.tile-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.noph { display: grid; place-items: center; height: 100%; font-size: 3.25rem; font-weight: 800; font-stretch: 62%; color: color-mix(in srgb, var(--muted) 70%, var(--surface)); }
.tile-body { flex: 1; padding: .75rem .9rem .35rem; }
.tile-body h2 { font-size: 1rem; margin: 0 0 .2rem; }
.tile-body h2 a { text-decoration: none; }
.tile-body h2 a:hover { text-decoration: underline; }
.meta { margin: 0; display: flex; flex-wrap: wrap; gap: .1rem .8rem; font-size: .8125rem; color: var(--muted); }
.flag { margin: .25rem .9rem 0; font-size: .8125rem; font-weight: 600; }
.tile-low .flag { color: color-mix(in srgb, var(--tape) 35%, var(--ink)); }
.tile-out .flag { color: var(--out); }

.stock { display: grid; grid-template-columns: 2.75rem 1fr 2.75rem; align-items: center; gap: .5rem; padding: .55rem .9rem .9rem; }
.stock form { margin: 0; }
.step {
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1.375rem; font-weight: 600; line-height: 1; cursor: pointer;
}
.step:hover:not(:disabled) { border-color: var(--ink); }
.step:active:not(:disabled) { background: var(--paper); }
.step:disabled { opacity: .35; cursor: not-allowed; }
.qty { margin: 0; text-align: center; line-height: 1; }
.qty strong { font-size: 1.875rem; font-weight: 800; font-stretch: 78%; }
.qty span { font-size: .875rem; color: var(--muted); }
.tile-out .qty strong { color: var(--out); }

.empty { text-align: center; padding: 4rem 1rem; border: 2px dashed var(--line); border-radius: var(--r-m); }
.empty p { color: var(--muted); max-width: 42ch; margin: .25rem auto 1.25rem; }

/* Pozycja */
.back { display: inline-block; margin-bottom: .6rem; color: var(--muted); text-decoration: none; font-size: .9375rem; }
.back::before { content: "‹ "; }
.back:hover { color: var(--ink); text-decoration: underline; }
.item-layout, .admin-layout { display: grid; gap: 1.25rem; align-items: start; margin-top: 1.25rem; }
.item-layout { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); }
.admin-layout { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
.photo-field { display: flex; flex-direction: column; gap: .6rem; }
.photo-preview { display: block; width: 100%; max-height: 340px; object-fit: contain; background: var(--paper); border-radius: var(--r-s); }
.side { display: flex; flex-direction: column; gap: 1.25rem; }
.qty-big { margin: 0 0 1rem; color: var(--muted); }
.qty-big strong { font-size: 3.25rem; font-weight: 800; font-stretch: 72%; line-height: 1; color: var(--ink); }
.qty-big.is-out strong { color: var(--out); }
.adjust { display: flex; flex-direction: column; gap: .8rem; }
.adjust-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.history { list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.history li { display: flex; flex-wrap: wrap; gap: .15rem .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; padding-top: 0; }
.delta { font-weight: 700; min-width: 3.5ch; }
.delta.plus { color: var(--ok); }
.delta.minus { color: var(--out); }
.note { flex-basis: 100%; }

/* Logowanie */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem 1rem; }
.auth .flashes { width: 100%; max-width: 380px; margin: 0; }
.auth-card {
  position: relative; overflow: hidden; width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: 1.05rem;
  padding: 2.25rem 2rem 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
}
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 10px; }
.auth-card p { margin: 0; }
.brand-lg { font-size: 2.5rem; font-stretch: 70%; margin: 0 0 .15rem; }

.warn { display: flex; flex-direction: column; gap: .5rem; padding: .85rem 1rem; font-size: .875rem; background: color-mix(in srgb, var(--tape) 20%, var(--surface)); border: 1px solid var(--tape); border-radius: var(--r-s); }
.warn p { margin: 0; }
.warn code { font-size: .8125rem; background: var(--surface); padding: 0 .25rem; border-radius: 3px; }

/* Admin */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th { text-align: left; font-size: .8125rem; font-weight: 600; color: var(--muted); padding: 0 .6rem .55rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.inactive td { color: var(--muted); }
td.right { text-align: right; white-space: nowrap; }
.role { display: inline-block; margin: .1rem .25rem .1rem 0; padding: .05rem .45rem; border-radius: 3px; font-size: .8125rem; background: var(--paper); white-space: nowrap; }
.role-admin { background: var(--ink); color: var(--paper); }
.role-pending { background: color-mix(in srgb, var(--tape) 30%, var(--surface)); }
.secret { margin-bottom: 1.25rem; padding: 1rem 1.25rem; background: color-mix(in srgb, var(--tape) 20%, var(--surface)); border: 1px solid var(--tape); border-radius: var(--r-m); }
.secret p { margin: 0; }
.pw { display: inline-block; margin: .5rem 0; padding: .35rem .65rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.25rem; font-weight: 600; background: var(--surface); border-radius: var(--r-s); user-select: all; }
.spaced { margin-top: 1.75rem; }
.panel > p.muted { margin: 0 0 .9rem; }
.narrow { max-width: 440px; }
.narrow .panel { margin-top: 1rem; }

@media (max-width: 820px) {
  .item-layout, .admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; gap: .5rem 1rem; }
  .nav { order: 3; flex-basis: 100%; }
  .who { margin-left: auto; }
  h1 { font-size: 1.625rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: .65rem; }
  .tile-body { padding: .6rem .65rem .25rem; }
  .flag { margin-inline: .65rem; }
  .stock { grid-template-columns: 2.5rem 1fr 2.5rem; gap: .3rem; padding: .45rem .6rem .7rem; }
  .step { width: 2.5rem; height: 2.5rem; }
  .qty strong { font-size: 1.5rem; }
  .filters select { flex: 1 1 45%; }
}

/* ---- v2: role, historia, etykiety, admin ---- */
.who-role { margin-left: .35rem; padding: .05rem .4rem; border-radius: 3px; font-size: .75rem; background: rgba(236, 238, 233, .14); }
.head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.tools { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: -.75rem 0 1.25rem; font-size: .9375rem; }
.tools a { color: var(--muted); }
.tools a:hover { color: var(--ink); }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.stock-ro { grid-template-columns: 1fr; }
.delta.zero { color: var(--muted); }
.more { margin-top: .75rem; }

.details { display: flex; flex-direction: column; gap: 1rem; }
.details dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.details dt { font-size: .8125rem; color: var(--muted); }
.details dd { margin: .1rem 0 0; font-weight: 600; }
.details .wide { grid-column: 1 / -1; }
.pre { white-space: pre-wrap; font-weight: 400 !important; }

.stocktake { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.stocktake summary { cursor: pointer; font-weight: 600; font-size: .9375rem; }
.stocktake form { margin-top: .9rem; }

label.inline { flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; color: var(--muted); }
label.inline input { width: auto; }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
table.moves td { vertical-align: top; }
tr.is-alert td { background: color-mix(in srgb, var(--out-bg) 60%, transparent); }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; }

.tabs { display: flex; gap: 1.5rem; margin: -.5rem 0 1.5rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: .5rem 0; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

.stats { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin: 0 0 1.25rem; }
.stats dt { font-size: .8125rem; color: var(--muted); }
.stats dd { margin: 0; font-size: 1.5rem; font-weight: 800; font-stretch: 80%; }
.steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .6rem; font-size: .9375rem; }
.steps code, .hint code { font-size: .8125rem; background: var(--paper); padding: .05rem .3rem; border-radius: 3px; }
.spaced-s { margin-top: .75rem; }

.scanner { width: min(92vw, 520px); padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); }
.scanner::backdrop { background: rgba(10, 14, 18, .7); }
.scanner video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #000; border-radius: var(--r-s); }
.scanner .hint { margin: .75rem 0; }

@media (max-width: 560px) {
  .who-role { display: none; }
  label.inline { flex: 1 1 45%; }
  label.inline input { flex: 1; }
}

/* ---- v3: sekcje historii, pobieranie zdjęcia ---- */
.sec { display: inline-block; min-width: 4.6rem; margin-right: .35rem; padding: .05rem .4rem; border-radius: 3px; font-size: .75rem; font-weight: 600; text-align: center; background: var(--paper); color: var(--muted); }
.sec-konto { background: color-mix(in srgb, var(--focus) 14%, var(--surface)); color: var(--focus); }
.sec-admin { background: var(--ink); color: var(--paper); }
.photo-dl { align-self: flex-start; font-size: .875rem; color: var(--muted); }
.photo-dl:hover { color: var(--ink); }
.photo-dl::before { content: "↓ "; }

/* ---- v4: wysyłki (Polkurier) ---- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875em; }
.small { font-size: .8125rem; }
.count { display: inline-block; min-width: 1.4rem; margin-left: .2rem; padding: 0 .35rem; border-radius: 9px; background: var(--paper); font-size: .75rem; text-align: center; color: var(--muted); }
.notice { margin-bottom: 1.25rem; padding: .9rem 1.1rem; background: color-mix(in srgb, var(--tape) 18%, var(--surface)); border: 1px solid var(--tape); border-radius: var(--r-m); }
.notice p { margin: 0; }
.notice code, .steps code { font-size: .8125rem; background: var(--surface); padding: 0 .25rem; border-radius: 3px; }

.st { display: inline-block; padding: .1rem .5rem; border-radius: 3px; font-size: .8125rem; font-weight: 600; white-space: nowrap; background: var(--paper); color: var(--muted); }
.st-P { background: color-mix(in srgb, var(--focus) 14%, var(--surface)); color: var(--focus); }
.st-WP { background: color-mix(in srgb, var(--tape) 30%, var(--surface)); color: var(--ink); }
.st-D { background: var(--in-bg); color: var(--ok); }
.st-W, .st-Z { background: var(--out-bg); color: var(--out); }
.st-A { text-decoration: line-through; }
.st-lg { font-size: .9375rem; padding: .3rem .75rem; }
.st.small { font-size: .75rem; }

.ready { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0 1.25rem; padding: 1.1rem 1.25rem; border-radius: var(--r-m); background: var(--in-bg); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.ready h2 { margin: 0 0 .2rem; color: var(--ok); }
.ready p { margin: 0; }
.ready-actions, .doc-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.doc-list form { margin: 0; }

.progress-panel { margin: 1rem 0 0; }
.progress { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.progress li { padding: 0 .15rem; position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; font-size: .875rem; color: var(--muted); }
.progress li::before { content: ""; position: absolute; top: .55rem; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.progress li:first-child::before { display: none; }
.progress .dot { position: relative; z-index: 1; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); }
.progress li.done, .progress li.current { color: var(--ink); }
.progress li.done::before, .progress li.current::before { background: var(--ok); }
.progress li.done .dot { background: var(--ok); border-color: var(--ok); }
.progress li.current .dot { border-color: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.progress li.current .lbl { font-weight: 700; }
.progress.has-problem li.current .dot { border-color: var(--out); box-shadow: 0 0 0 4px color-mix(in srgb, var(--out) 20%, transparent); }
.progress.has-problem li.current { color: var(--out); }
.cancelled { margin: 0; color: var(--muted); font-weight: 600; }

.kv { margin: 0; display: grid; gap: .55rem; }
.kv div { display: grid; grid-template-columns: 9rem 1fr; gap: .75rem; }
.kv dt { color: var(--muted); font-size: .875rem; }
.kv dd { margin: 0; }
.addr { margin: 0; line-height: 1.6; }
.plain { margin: 0; padding-left: 1.1rem; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; font-size: .875rem; }

.ship-form .side { gap: 1.25rem; }
.row-addr { grid-template-columns: minmax(0, 1fr) 6rem 6rem; }
.row-point { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.row-item { grid-template-columns: minmax(0, 1fr) 6rem; }
.grow { min-width: 0; }
.checks { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.checks legend { font-size: .875rem; font-weight: 600; margin-bottom: .4rem; }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: .9375rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.btn-wide { width: 100%; }
.prices { width: 100%; }
.prices td { padding: .45rem .2rem; }
.prices label.check { font-size: .9375rem; }
.chip { margin: .4rem .4rem 0 0; padding: .25rem .6rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: .8125rem; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.pickup { display: flex; flex-direction: column; gap: .6rem; padding-top: .25rem; }

body.public { min-height: 100vh; }
.public-wrap { max-width: 560px; margin: 0 auto; padding: 2.5rem 1rem; }
.public-card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 1.1rem; padding: 2.25rem 1.75rem 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.public-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 10px; background: repeating-linear-gradient(-45deg, var(--tape) 0 9px, var(--tape-dark) 9px 18px); }
.public-card p { margin: 0; }
.public-card .history li { flex-direction: column; gap: .1rem; }

@media (max-width: 560px) {
  .row-addr { grid-template-columns: 1fr 1fr; }
  .row-addr .grow { grid-column: 1 / -1; }
  .progress { font-size: .75rem; }
  .kv div { grid-template-columns: 1fr; gap: .1rem; }
}

/* ---- v5: przywracanie kopii ---- */
.restore-check { margin-bottom: 1.25rem; border-color: var(--tape); box-shadow: inset 0 4px 0 var(--tape); display: flex; flex-direction: column; gap: .9rem; }
.restore-check p { margin: 0; }
.compare { max-width: 560px; }
.restore-confirm { gap: .75rem; }
.btn-danger-solid { background: var(--out); border-color: var(--out); color: #fff; }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--out) 85%, #000); }
.spaced-panel { margin-top: 1.25rem; }
.right-actions { justify-content: flex-end; flex-wrap: nowrap; }

/* ---- v6: lista kopii ---- */
.btn-sm { min-height: 2.1rem; padding: .3rem .7rem; font-size: .875rem; }
.bk { display: inline-block; padding: .05rem .45rem; border-radius: 3px; font-size: .8125rem; font-weight: 600; background: var(--paper); }
.bk-kopia { background: color-mix(in srgb, var(--focus) 14%, var(--surface)); color: var(--focus); }
.bk-przed-przywroceniem { background: color-mix(in srgb, var(--tape) 30%, var(--surface)); }
.backups td { vertical-align: middle; }
tr.is-selected td { background: color-mix(in srgb, var(--tape) 14%, transparent); }
.title-row .hint { align-self: center; }

/* ---- v7: potwierdzanie hasłem ---- */
.lock-note { margin: -.75rem 0 1.25rem; }
.reauth { width: min(92vw, 420px); padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); }
.reauth::backdrop { background: rgba(10, 14, 18, .6); }
.reauth h2 { margin: 0; }
.reauth p { margin: 0; overflow-wrap: anywhere; }
.pw-confirm { max-width: 320px; }

/* ---- v8: diagnostyka połączenia ---- */
.verdict { margin: -.5rem 0 1.25rem; padding: .9rem 1.1rem; border-radius: var(--r-m); border: 1px solid; }
.verdict p { margin: 0; }
.verdict-ok { background: var(--in-bg); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.verdict-warn { background: color-mix(in srgb, var(--tape) 18%, var(--surface)); border-color: var(--tape); }
.kv dd.mono { overflow-wrap: anywhere; }

/* ---- v9: katalog — produkty z wariantami, filtry, lokalizacje, ceny ---- */
.chips-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .9rem; }
.chip-link { padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .875rem; text-decoration: none; }
.chip-link span { color: var(--muted); font-size: .8125rem; margin-left: .15rem; }
.chip-link:hover { border-color: var(--ink); }
.chip-link.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-link.is-on span { color: inherit; opacity: .7; }
.filters select { flex: 0 1 180px; }

.pgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; align-items: start; }
.pcard { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); scroll-margin-top: 1rem; }
.pcard:target { outline: 3px solid var(--focus); outline-offset: 2px; }
.pcard-low { border-color: var(--tape); }
.pcard-out { border-color: var(--out); }
.pcard-low::before, .pcard-out::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: repeating-linear-gradient(-45deg, var(--tape) 0 9px, var(--tape-dark) 9px 18px); }
.pcard-out::before { background: repeating-linear-gradient(-45deg, var(--out) 0 9px, var(--tape-dark) 9px 18px); }
.pcard-top { display: flex; gap: .85rem; padding: .9rem .9rem .6rem; }
.pcard-photo { flex: none; width: 76px; height: 76px; border-radius: var(--r-s); overflow: hidden; display: block; text-decoration: none; background: color-mix(in srgb, var(--line) 40%, var(--surface)); }
.pcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-photo .noph { font-size: 2rem; }
.pcard-head { min-width: 0; }
.pcard-head h2 { font-size: 1.0625rem; margin: 0 0 .15rem; }
.pcard-head h2 a { text-decoration: none; }
.pcard-head h2 a:hover { text-decoration: underline; }
.mchips { display: flex; flex-wrap: wrap; gap: .25rem; margin: .35rem 0 0; }
.mchips span, .mchips a { padding: .05rem .45rem; border-radius: 3px; font-size: .75rem; font-weight: 600; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); text-decoration: none; }
.vlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.vrow { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .9rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.vrow:last-child { border-bottom: 0; }
.vrow:target { background: color-mix(in srgb, var(--focus) 10%, transparent); }
.vinfo { min-width: 0; display: flex; flex-direction: column; }
.vname { font-weight: 600; text-decoration: none; }
.vname:hover { text-decoration: underline; }
.vmeta { font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.vflag { align-self: flex-start; margin-top: .2rem; padding: 0 .4rem; border-radius: 3px; font-size: .75rem; font-weight: 600; background: var(--out-bg); color: var(--out); }
.vflag-low { background: color-mix(in srgb, var(--tape) 30%, var(--surface)); color: var(--ink); }
.vrow .stock { flex: none; padding: 0; grid-template-columns: 2.4rem minmax(3.6rem, auto) 2.4rem; gap: .3rem; }
.vrow .qty, .stock-inline .qty { white-space: nowrap; }
.vrow .step { width: 2.4rem; height: 2.4rem; }
.vrow .qty strong { font-size: 1.375rem; }
.vrow-out .qty strong { color: var(--out); }
.qty-ro { flex: none; }
.pcard-more { margin: 0; padding: .5rem .9rem; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }

.product-head { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.product-photo { aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; background: color-mix(in srgb, var(--line) 40%, var(--surface)); border: 1px solid var(--line); }
.product-photo img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.product-photo .noph { font-size: 5rem; }
.product-info { display: flex; flex-direction: column; gap: .75rem; }
.product-info h1 { margin: 0; }
.product-info .summary, .product-info .mchips { margin: 0; }
.desc { margin: 0; max-width: 70ch; }
.stats dd.money { font-size: 1.125rem; }
table.variants td { vertical-align: middle; }
tr.vt-out td { background: color-mix(in srgb, var(--out-bg) 50%, transparent); }
tr.vt-low td { background: color-mix(in srgb, var(--tape) 10%, transparent); }
.stock-inline { display: inline-grid; grid-template-columns: 2.3rem 3.4rem 2.3rem; gap: .25rem; padding: 0; align-items: center; }
.stock-inline .step { width: 2.3rem; height: 2.3rem; font-size: 1.125rem; }
.stock-inline .qty strong { font-size: 1.125rem; }
.is-out { color: var(--out); }
.is-low { color: color-mix(in srgb, var(--tape) 40%, var(--ink)); }
.neg { color: var(--out); }
.pos { color: var(--ok); }

.row-gen { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.mode-switch label.check { align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; }
.mode-switch label.check:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mode-switch input { margin-top: .2rem; }
.checks-inline { flex-direction: row; flex-wrap: wrap; gap: .3rem 1rem; }
.checks-inline legend { width: 100%; }
fieldset.checks input[name=attr_names] { margin-bottom: .4rem; }
.price-summary { margin: 0; font-size: .9375rem; }
.vlabel { color: var(--ink); }
.siblings li { padding: .2rem 0; }

.loc-tree { list-style: none; margin: 0; padding: 0; }
.loc-tree li { padding: .45rem 0 .45rem calc(var(--depth) * 1.4rem); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
.loc-tree li:last-child { border-bottom: 0; }
.loc-tree li a { text-decoration: none; }
.loc-tree li a:hover { text-decoration: underline; }
.kind { padding: 0 .4rem; border-radius: 3px; font-size: .75rem; background: var(--paper); color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; font-size: .9375rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.loc-children { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.loc-children li { padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--r-s); }
.loc-children a { text-decoration: none; }
.loc-items td { vertical-align: middle; }
.loc-items .thumb { width: 52px; }
.loc-items .thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-s); display: block; }

@media (max-width: 820px) {
  .product-head { grid-template-columns: 1fr; }
  .product-photo { max-width: 220px; }
}
@media (max-width: 560px) {
  .pgrid { grid-template-columns: 1fr; }
  .mode-switch { grid-template-columns: 1fr; }
  .row-gen { grid-template-columns: 1fr; }
  .filters select { flex: 1 1 45%; }
}

/* ---- v10: lista wyboru lokalizacji ---- */
.loc-picker { display: flex; flex-direction: column; gap: .5rem; }
.loc-select option[value="__new"] { font-weight: 600; }
.loc-new { display: flex; flex-direction: column; gap: .75rem; padding: .9rem 1rem; border: 1px dashed var(--ink); border-radius: var(--r-s); background: color-mix(in srgb, var(--paper) 60%, var(--surface)); }
.loc-new-title { margin: 0; font-weight: 700; font-size: .9375rem; }
.loc-new .actions { padding-top: 0; }
.loc-err { margin: 0; color: var(--out); font-size: .875rem; font-weight: 600; }
.loc-added { margin: 0; color: var(--ok); }

/* ---- v11: tytuł w dwóch liniach, ilość + cena zamiast −/+ na stanie ---- */
.ptitle { display: flex; flex-direction: column; gap: .1rem; }
.ptitle a { display: flex; flex-direction: column; gap: .1rem; text-decoration: none; }
.ptitle a:hover .ptitle-sub, .ptitle a:hover .ptitle-main { text-decoration: underline; }
.ptitle-main { font-weight: 800; line-height: 1.15; }
.ptitle-sub { font-weight: 500; font-size: .82em; line-height: 1.25; color: var(--muted); }
h1.ptitle .ptitle-sub { font-size: .62em; font-weight: 600; }
.pcard-head .ptitle { font-size: 1.0625rem; margin: 0 0 .2rem; }
.vside { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; text-align: right; }
.vqty { margin: 0; line-height: 1; white-space: nowrap; }
.vqty strong { font-size: 1.375rem; font-weight: 800; font-stretch: 80%; }
.vqty span { font-size: .8125rem; color: var(--muted); }
.vqty.is-out strong { color: var(--out); }
.vprice { margin: 0; font-weight: 700; font-size: .9375rem; white-space: nowrap; }

/* ---- v11: przełącznik motywu ---- */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; padding: 0; border: 1px solid rgba(236, 238, 233, .25); border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .8; }
.theme-toggle:hover { opacity: 1; border-color: var(--tape); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
.auth-theme { align-self: center; }
.auth-theme .theme-toggle { border-color: var(--line); color: var(--muted); }

/* ---- v12: galeria i karuzela zdjęć ---- */
.carousel { position: relative; overflow: hidden; background: color-mix(in srgb, var(--line) 35%, var(--surface)); }
.car-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.car-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; aspect-ratio: 4 / 3; display: block; text-decoration: none; }
.car-slide img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.car-contain .car-slide img { object-fit: contain; }
.car-empty { display: grid; place-items: center; }
.car-empty span { font-size: 3.25rem; font-weight: 800; font-stretch: 62%; color: color-mix(in srgb, var(--muted) 70%, var(--surface)); }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 2.3rem; height: 2.3rem; display: grid; place-items: center; padding: 0 0 .15rem; border: 0; border-radius: 50%; background: rgba(10, 14, 18, .55); color: #fff; font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.car-prev { left: .5rem; }
.car-next { right: .5rem; }
.carousel:hover .car-btn, .car-btn:focus-visible { opacity: 1; }
@media (hover: none) { .car-btn { opacity: .85; width: 2rem; height: 2rem; } }
.car-dots { position: absolute; left: 0; right: 0; bottom: .55rem; display: flex; justify-content: center; gap: .35rem; pointer-events: none; }
.car-dots span { width: .5rem; height: .5rem; border-radius: 50%; background: rgba(255, 255, 255, .5); box-shadow: 0 0 2px rgba(0, 0, 0, .6); }
.car-dots span.on { background: #fff; }
.car-count { position: absolute; top: .55rem; right: .55rem; padding: .05rem .45rem; border-radius: 9px; background: rgba(10, 14, 18, .6); color: #fff; font-size: .75rem; font-weight: 600; pointer-events: none; }

.pcard > .carousel { border-bottom: 1px solid var(--line); }
.pcard-low::before, .pcard-out::before { z-index: 2; }
.pcard-top { padding-top: .75rem; }
.product-head { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
.product-photo { aspect-ratio: auto; }
.product-photo .carousel, .photo-field .carousel { border-radius: var(--r-m); }
.photo-links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0; font-size: .875rem; }
.photo-links a { color: var(--muted); }

.gallery { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.gallery li { position: relative; display: flex; flex-direction: column; gap: .4rem; }
.gthumb { display: block; aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--line); }
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gmain { position: absolute; top: .35rem; left: .35rem; padding: .05rem .45rem; border-radius: 3px; background: var(--tape); color: #1C2630; font-size: .75rem; font-weight: 700; }
.gactions { display: flex; flex-wrap: wrap; gap: .3rem; }
.gactions form { margin: 0; }
.gactions .btn-sm { min-height: 1.9rem; padding: .2rem .55rem; }
.gallery-upload { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.gallery-upload label { flex: 1 1 280px; }
@media (max-width: 820px) { .product-head { grid-template-columns: 1fr; } .product-photo { max-width: none; } }

/* ---- v12: filtry i menu na telefonie ---- */
.filter-more { display: contents; }
.filter-more > summary { display: none; }
.filter-more-body { display: contents; }
@media (max-width: 699px) {
  .filter-more { display: block; flex: 1 1 100%; }
  .filter-more > summary { display: list-item; cursor: pointer; padding: .4rem 0; color: var(--muted); font-weight: 600; }
  .filter-more-body { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .3rem; }
  .filter-more-body select { flex: 1 1 100%; }
  .nav { overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .head .summary { font-size: .9375rem; }
}

/* ---- v13: logo z rybą ---- */
.brand::before { content: none; }
.brand { gap: .6rem; }
.brand .logo { width: 30px; height: 30px; flex: none; border-radius: 8px; box-shadow: 0 0 0 1px rgba(242, 194, 48, .35); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-main { font-weight: 800; font-stretch: 75%; font-size: 1.3rem; letter-spacing: .01em; }
.brand-sub { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; opacity: .7; margin-top: .1rem; }
.brand-lg { display: flex; align-items: center; gap: .8rem; }
.brand-lg .logo-lg { width: 56px; height: 56px; flex: none; border-radius: 14px; }
.brand-lg > span { display: flex; flex-direction: column; line-height: 1; }
.brand-lg .brand-main { font-size: 2.25rem; }
.brand-lg .brand-sub { font-size: .8125rem; color: var(--muted); opacity: 1; margin-top: .25rem; }
@media (max-width: 560px) { .brand .logo { width: 26px; height: 26px; } .brand-main { font-size: 1.15rem; } }
.auth-card .brand-lg { margin-bottom: .55rem; }
.brand-lg .logo-lg { box-shadow: 0 0 0 1px rgba(242, 194, 48, .35); }

/* ---- v14: kolor akcentu #f8cd3a dla przycisków głównych ---- */
:root { --accent: #f8cd3a; --accent-ink: #1C2630; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); border-color: color-mix(in srgb, var(--accent) 86%, #000); }
.btn-primary:disabled { opacity: .55; }
.btn-accent-outline { border-color: var(--accent); color: var(--ink); }
.btn-accent-outline:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.chip-link.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* ---- v14: lista rozwijana z wyszukiwaniem ---- */
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; font-size: .875rem; font-weight: 600; }
.field-link { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.field-link:hover { color: var(--ink); }
.combo { position: relative; }
.combo input { padding-right: 2.4rem; }
.combo-toggle { position: absolute; top: 0; right: 0; height: 100%; width: 2.3rem; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; }
.combo-toggle svg { width: 1.1rem; height: 1.1rem; transition: transform .15s; }
.combo.is-open .combo-toggle svg { transform: rotate(180deg); }
.combo.is-open input { border-color: var(--accent); }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 16rem; overflow-y: auto; margin: 0; padding: .3rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
.combo-item { padding: .5rem .65rem; border-radius: var(--r-s); cursor: pointer; font-size: .9375rem; }
.combo-item mark { background: color-mix(in srgb, var(--accent) 45%, transparent); color: inherit; border-radius: 2px; }
.combo-item.is-active { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); }
.combo-item.is-current::after { content: "✓"; float: right; color: var(--ok); font-weight: 700; }
.combo-add { color: var(--ink); border-top: 1px dashed var(--line); margin-top: .2rem; }
.combo-empty { padding: .5rem .65rem; color: var(--muted); font-size: .875rem; }

.dict-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; align-items: start; }
.dict-grid .panel { scroll-margin-top: 1rem; }
.dict-add { display: flex; gap: .5rem; margin-bottom: .9rem; }
.dict-add input { flex: 1; }
.dict-list { list-style: none; margin: 0; padding: 0; }
.dict-list li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.dict-list li:first-child { border-top: 0; }
.dict-rename { flex: 1; display: flex; gap: .4rem; min-width: 0; }
.dict-rename input { flex: 1; min-height: 2.1rem; padding: .3rem .55rem; }
.dict-used { flex: none; font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.dict-list form { margin: 0; }
.dict-value { flex: 1; }

/* ---- v14: profil, pasek użytkownika ---- */
.who-me { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.who-me:hover .who-name { text-decoration: underline; }
.who-text { display: flex; flex-direction: column; line-height: 1.15; }
.who-name { font-weight: 600; }
.who .who-role { margin: 0; padding: 0; background: none; font-size: .75rem; opacity: .7; }
.avatar { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .8125rem; letter-spacing: .02em; flex: none; }
.avatar-lg { width: 4rem; height: 4rem; font-size: 1.4rem; }
.profile-head { display: flex; align-items: center; gap: 1rem; }
.profile-head h1 { margin: 0; }
@media (max-width: 560px) { .who-text { display: none; } .who .who-role { display: none; } }

/* ---- v14: galeria z przeciąganiem, strefa wgrywania, przyciski zdjęć ---- */
.photo-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.photo-panel { display: flex; flex-direction: column; }
.photo-panel .carousel { border-radius: var(--r-m); }
.gallery li { cursor: default; }
.gallery[data-sortable] li { cursor: grab; }
.gallery li.is-dragging { opacity: .4; }
.gallery li .gmain { display: none; }
.gallery li.is-first .gmain { display: block; }
.gallery li.is-first .gthumb { outline: 3px solid var(--accent); outline-offset: -3px; }
.gtools { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: center; }
.gtools form { margin: 0; }
.gbtn { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 .4rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font: inherit; font-size: .9375rem; text-decoration: none; cursor: pointer; }
.gbtn:hover { border-color: var(--accent); }
.gbtn-del:hover { border-color: var(--out); color: var(--out); }
.dropzone { margin-top: .5rem; }
.dz-zone { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.4rem 1rem; border: 2px dashed var(--line); border-radius: var(--r-m); text-align: center; font-weight: 400; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.dz-zone:hover, .dz-zone.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--ink); }
.dz-zone svg { width: 2.2rem; height: 2.2rem; color: var(--accent); }
.dz-zone strong { color: var(--ink); font-size: 1rem; }
.dz-zone span { font-size: .875rem; max-width: 44ch; }
.dz-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-js .dz-fallback { display: none; }
.dz-previews { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.dz-previews img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--line); }
.dz-status { margin: .4rem 0 0; }
#galeria { scroll-margin-top: 1rem; }

/* ---- v14: edycja aktualnego stanu ---- */
.stock-edit { display: flex; flex-direction: column; gap: .8rem; }
.stock-edit-row { display: flex; align-items: baseline; gap: .6rem; }
.stock-input { width: 9rem; font-size: 2.25rem; font-weight: 800; font-stretch: 78%; padding: .2rem .6rem; min-height: 3.4rem; }
.stock-input.is-out, .qty-inline input.is-out { color: var(--out); }
.stock-unit { color: var(--muted); font-size: 1.1rem; }
.qty-inline { display: inline-flex; align-items: center; gap: .35rem; margin: 0; }
.qty-inline input { width: 5rem; min-height: 2.1rem; padding: .25rem .5rem; text-align: right; font-weight: 700; }
.qty-inline .btn-sm { min-height: 2.1rem; padding: .2rem .6rem; }

/* ---- v14: adresy lokalizacji ---- */
.loc-address { flex-basis: 100%; font-size: .8125rem; color: var(--muted); }
.loc-address-lg { margin: 0 0 .2rem; color: var(--muted); }
.loc-addr { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

/* ---- v14: ceny kurierów na żywo ---- */
.price-list { display: flex; flex-direction: column; gap: .4rem; transition: opacity .15s; min-height: 2rem; }
.price-list.is-loading { opacity: .5; }
.price-card { position: relative; display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; font-weight: 400; flex-direction: row; }
.price-card:hover { border-color: var(--accent); }
.price-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.price-card input { width: auto; min-height: 0; accent-color: var(--accent); }
.pc-name { flex: 1; font-weight: 600; }
.pc-price { text-align: right; white-space: nowrap; }
.pc-price strong { font-size: 1.0625rem; }
.pc-price s { color: var(--muted); font-size: .8125rem; }
.pc-badge { position: absolute; top: -.55rem; right: .6rem; padding: 0 .4rem; border-radius: 3px; background: var(--accent); color: var(--accent-ink); font-size: .6875rem; font-weight: 700; }
.hint.err { color: var(--out); }
.courier-select { margin-top: .4rem; }
.cancel-form { display: flex; gap: .4rem; flex-wrap: wrap; }
.cancel-form input { width: 10rem; flex: 1; }

/* ---- v14: notatki ---- */
.note-editor { gap: .6rem; }
.ne-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.ne-toolbar button, .ne-img { min-width: 2.1rem; height: 2.1rem; padding: 0 .5rem; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font: inherit; font-size: .9375rem; cursor: pointer; }
.ne-toolbar button:hover, .ne-img:hover { border-color: var(--accent); }
.ne-sep { flex: 1; }
.ne-tab.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.note-editor textarea { min-height: 9rem; font-size: .9375rem; line-height: 1.55; }
.note-editor textarea.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.ne-preview { min-height: 9rem; padding: .7rem .9rem; border: 1px dashed var(--line); border-radius: var(--r-s); }
.ne-status { margin: 0; }
.ne-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.ne-actions { display: flex; gap: .5rem; }
.note { margin-top: 1rem; scroll-margin-top: 1rem; }
.note.is-pinned { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.note:target { outline: 3px solid var(--focus); outline-offset: 2px; }
.note-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .6rem; }
.note-head h2 { margin: .1rem 0 .2rem; font-size: 1.125rem; }
.note-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .8125rem; color: var(--muted); }
.note-meta strong { color: var(--ink); }
.note-pin { display: inline-block; padding: 0 .4rem; border-radius: 3px; background: var(--accent); color: var(--accent-ink); font-size: .6875rem; font-weight: 700; }
.note-actions { display: flex; gap: .35rem; flex: none; }
.note-actions form { margin: 0; }
.avatar-sm { width: 1.4rem; height: 1.4rem; font-size: .6875rem; }
.markdown { overflow-wrap: anywhere; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown img { max-width: 100%; max-height: 420px; border-radius: var(--r-s); border: 1px solid var(--line); display: block; margin: .4rem 0; }
.markdown code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .875em; background: var(--paper); padding: .05rem .3rem; border-radius: 3px; }
.markdown pre { background: var(--paper); padding: .7rem .9rem; border-radius: var(--r-s); overflow-x: auto; }
.markdown pre code { background: none; padding: 0; }
.markdown table { width: auto; border: 1px solid var(--line); }
.markdown th, .markdown td { border: 1px solid var(--line); padding: .35rem .6rem; }
.markdown blockquote { margin: .5rem 0; padding-left: .9rem; border-left: 3px solid var(--accent); color: var(--muted); }
.markdown h1, .markdown h2, .markdown h3 { margin: 1rem 0 .4rem; }

/* ---- v14: zysk ---- */
.money-stats { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: .5rem 0 .2rem; }
.money-stats dt { font-size: .75rem; color: var(--muted); }
.money-stats dd { margin: 0; font-size: 1.125rem; font-weight: 800; font-stretch: 85%; }
.money-stats .profit dd { color: var(--ok); }
.money-stats .profit.neg dd { color: var(--out); }
.summary-end { margin: 0; }
.price-list { padding-top: .65rem; gap: .65rem; }

/* ---- v15: TODO ---- */
.nav-badge { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; margin-left: .15rem; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: .6875rem; font-weight: 800; vertical-align: 1px; }
.todo-add { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.todo-add input[name=text] { flex: 1 1 320px; }
.todo-add input[type=date], .todo-add select { flex: 0 1 170px; width: auto; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; align-items: flex-start; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.todo:first-child { border-top: 0; }
.todo form { margin: 0; }
.todo-check { width: 1.6rem; height: 1.6rem; margin-top: .05rem; display: grid; place-items: center; border: 2px solid var(--muted); border-radius: 50%; background: none; color: var(--accent-ink); font-weight: 800; cursor: pointer; }
.todo-check:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, transparent); }
.todo-check.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.todo-body { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.todo-text { font-size: 1rem; overflow-wrap: anywhere; }
.todo-meta { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .8125rem; color: var(--muted); }
.todo-due { font-weight: 600; }
.todo.is-late .todo-due { color: var(--out); }
.todo.is-today .todo-due { color: var(--accent); }
.todo.is-done .todo-text { text-decoration: line-through; color: var(--muted); }
.todo-done summary { cursor: pointer; font-weight: 700; }

/* ---- v15: flagi (Windows nie ma emoji flag — dołączona czcionka Twemoji Country Flags, CC-BY 4.0) ---- */
@font-face {
  font-family: "Twemoji Country Flags";
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  src: url("fonts/TwemojiCountryFlags.woff2") format("woff2");
  font-display: swap;
}
.flag-font, .phone-field select, .phone-field option { font-family: "Twemoji Country Flags", var(--font); }
.phone-field { display: grid; grid-template-columns: minmax(9.5rem, 12rem) minmax(0, 1fr); gap: .4rem; }
.phone-field select { padding-right: .4rem; }

/* ---- v15: rozmiar odzieży ---- */
.size-badge { display: inline-block; min-width: 1.6rem; padding: 0 .4rem; border-radius: 3px; background: var(--accent); color: var(--accent-ink); font-size: .8125rem; font-weight: 800; text-align: center; line-height: 1.5; vertical-align: 1px; }
.size-fields legend { font-size: .875rem; font-weight: 600; margin-bottom: .4rem; }

/* ---- v16: kategorie z podkategoriami, zakładki bez paska przewijania ---- */
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.dict-panel { margin-top: .25rem; }
.dict-panel .dict-add { max-width: 640px; }
.cat-tree { display: flex; flex-direction: column; gap: .5rem; }
.cat-node { border: 1px solid var(--line); border-radius: var(--r-m); background: color-mix(in srgb, var(--paper) 35%, var(--surface)); scroll-margin-top: 1rem; }
.cat-node[open] { border-color: var(--accent); }
.cat-node > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; padding: .75rem 1rem; cursor: pointer; list-style: none; }
.cat-node > summary::-webkit-details-marker { display: none; }
.cat-node > summary::before { content: "›"; display: inline-block; width: .8rem; color: var(--muted); font-weight: 700; transition: transform .15s; }
.cat-node[open] > summary::before { transform: rotate(90deg); color: var(--accent); }
.cat-name { font-weight: 700; font-size: 1.0625rem; }
.cat-subcount { color: var(--muted); font-size: .875rem; }
.cat-node > summary .dict-used { margin-left: auto; }
.cat-body { display: flex; flex-direction: column; gap: .6rem; padding: 0 1rem 1rem 2.2rem; }
.cat-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.cat-actions .dict-rename { flex: 1 1 320px; max-width: 520px; }
.cat-actions form { margin: 0; }
.sub-list li { gap: .6rem; }
.sub-arrow { color: var(--muted); flex: none; }
.sub-add { margin: 0; align-items: center; max-width: 640px; }
.muted-link { color: inherit; text-decoration: none; }
.muted-link:hover { text-decoration: underline; }
.combo input:disabled { opacity: .55; cursor: not-allowed; }

/* ---- v17: kolejność zadań i notatek, zadania w Markdown ---- */
.drag-handle { flex: none; align-self: flex-start; padding: .2rem .25rem; color: var(--muted); cursor: grab; user-select: none; letter-spacing: -.15em; font-weight: 700; line-height: 1.4; }
.drag-handle:hover { color: var(--accent); }
.is-dragging { opacity: .45; }
.todo .row-tools { display: flex; gap: .25rem; flex: none; }
.todo .row-tools form { margin: 0; }
.todo .row-tools .gbtn { min-width: 1.9rem; height: 1.9rem; }
.todo-text.markdown p { margin: 0 0 .3rem; }
.todo-text.markdown img { max-height: 260px; }
.todo-editor textarea { min-height: 4.5rem; }
.todo-opts { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.todo-opts input, .todo-opts select { width: auto; }
.notes-list { display: flex; flex-direction: column; }
.note-actions { align-items: center; }
.note-actions .gbtn { min-width: 1.9rem; height: 1.9rem; }
@media (max-width: 560px) { .todo .row-tools { flex-direction: column; } }

/* ---- v18: górne menu — przyciski i listy rozwijane ---- */
.topbar { gap: 1rem; }
.nav { gap: .3rem; align-items: center; }
.nav a, .nav-right > a, .nav-menu > summary {
  display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border-radius: 999px;
  border: 1px solid transparent; text-decoration: none; opacity: 1; color: rgba(236, 238, 233, .82); font-weight: 600; font-size: .9375rem;
  transition: background .15s, color .15s, border-color .15s;
}
.nav a:hover, .nav-right > a:hover, .nav-menu > summary:hover { background: rgba(236, 238, 233, .08); color: #fff; }
.nav a[aria-current="page"], .nav-right > a[aria-current="page"], .nav-menu > summary[aria-current="page"] {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent); border-bottom-color: var(--accent);
}
.nav-right { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu[open] > summary { background: rgba(236, 238, 233, .12); color: #fff; border-color: rgba(236, 238, 233, .2); }
.nav-menu[open] > summary[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.nav-menu .chev { width: .95rem; height: .95rem; transition: transform .15s; }
.nav-menu[open] .chev { transform: rotate(180deg); }
.nav-panel { position: absolute; z-index: 50; top: calc(100% + .5rem); right: 0; min-width: 16rem; padding: .4rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 16px 36px rgba(0, 0, 0, .4); }
.nav-panel a { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border-radius: var(--r-s); text-decoration: none; color: var(--ink); }
.nav-panel a:hover { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.nav-panel a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 24%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.nav-panel strong { display: block; font-size: .9375rem; }
.nav-panel small { display: block; color: var(--muted); font-size: .75rem; }
.np-icon { width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 8px; background: var(--paper); font-size: 1rem; flex: none; }
.nav-menu > summary .nav-badge { margin-left: 0; }
.nav-menu > summary[aria-current="page"] .nav-badge { background: var(--accent-ink); color: var(--accent); }
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav-right { margin-left: auto; }
}
@media (max-width: 560px) {
  .nav-right { order: 2; }
  .nav-panel { right: -4rem; }
  .nav a, .nav-right > a, .nav-menu > summary { padding: .4rem .65rem; font-size: .875rem; }
}

/* ---- v18: ładniejsze przyciski na zdjęciach ---- */
.car-btn { width: 2.5rem; height: 2.5rem; padding: 0; background: rgba(255, 255, 255, .9); color: #1C2630; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  font-size: 0; backdrop-filter: blur(4px); transition: opacity .15s, transform .15s, background .15s; }
.car-btn::before { content: ""; width: .6rem; height: .6rem; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; display: block; }
.car-prev::before { transform: translateX(.12rem) rotate(-135deg); }
.car-next::before { transform: translateX(-.12rem) rotate(45deg); }
.car-btn:hover { background: var(--accent); transform: translateY(-50%) scale(1.08); }
.car-prev { left: .65rem; }
.car-next { right: .65rem; }
.car-count { top: .65rem; right: .65rem; padding: .15rem .55rem; background: rgba(255, 255, 255, .92); color: #1C2630; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.car-dots { bottom: .65rem; gap: .4rem; }
.car-dots span { width: .55rem; height: .55rem; background: rgba(255, 255, 255, .55); transition: width .2s, background .2s; }
.car-dots span.on { width: 1.4rem; border-radius: 999px; background: var(--accent); }
@media (hover: none) { .car-btn { opacity: .95; width: 2.2rem; height: 2.2rem; } }

/* ---- v18: kafelki równej wysokości ---- */
.pgrid { align-items: stretch; }
.pcard { display: flex; flex-direction: column; }
.pcard > .carousel { flex: none; }
.pcard-top { flex: 1 1 auto; }
.pcard .ptitle-main, .pcard .ptitle-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pcard .ptitle-main { -webkit-line-clamp: 1; }
.pcard .ptitle-sub { min-height: 2.5em; }
.vlist { margin-top: auto; }

/* ---- v18: zakładki jako wyraźne przyciski (segmenty) ---- */
.dict-tabs { display: inline-flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1.25rem; padding: .35rem; border: 1px solid var(--line); border-bottom: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); overflow: visible; }
.dict-tabs a { margin: 0; padding: .55rem 1.1rem; border: 0; border-radius: 999px; color: var(--muted); font-weight: 600; text-decoration: none; }
.dict-tabs a:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.dict-tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.dict-tabs a[aria-current="page"] .count { background: var(--accent-ink); color: var(--accent); }
.pcard-more { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem .8rem; }
.pcard-more a { color: var(--ink); font-weight: 600; text-decoration: none; }
.pcard-more a:hover { color: var(--accent); }
.vrow-multi .vname { color: var(--ink); }
.vrow-multi .vname:hover { color: var(--accent); }
.vlabels { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.vlabels .size-badge { font-size: .6875rem; min-width: 1.3rem; }

/* ---- v19: sklep — publiczna strona główna ---- */
.shop-topbar { justify-content: space-between; }
.shop-admin { color: #ECEEE9; border-color: rgba(236, 238, 233, .35); background: transparent; }
.who a.shop-admin:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.shop-hero { margin: .25rem 0 1.25rem; }
.shop-hero h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.5rem); font-stretch: 75%; }
.shop-hero p { margin: .2rem 0 0; }
.shop-card-out .carousel { opacity: .6; }
.shop-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-top: auto; padding: .7rem .9rem .85rem; border-top: 1px solid var(--line); }
.shop-price { display: flex; flex-direction: column; margin: 0; line-height: 1.15; }
.shop-price-lbl { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.shop-price strong { font-size: 1.375rem; font-weight: 800; }
.shop-avail { flex: none; padding: .15rem .55rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.shop-avail.is-ok { background: var(--in-bg); color: var(--ok); }
.shop-avail.is-out { background: var(--out-bg); color: var(--out); }
.shop-buy { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.shop-buy .shop-price strong { font-size: 1.75rem; }
.shop-variants td { vertical-align: middle; }

/* ---- v20: widoczność w sklepie, stan dla klienta ---- */
.shop-hidden-badge { display: inline-block; padding: .05rem .5rem; border: 1px dashed var(--muted); border-radius: 999px; color: var(--muted); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.meta .shop-hidden-badge { margin-left: .4rem; }
.shop-visible-check .opt { font-weight: 400; }
.shop-price .shop-price-ask { font-size: 1.125rem; }

/* ---- v21: sklep — lista kategorii z podkategoriami ---- */
.shop-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.shop-side { position: sticky; top: 1rem; }
.shop-catbox > summary { display: none; }
.shop-catlist, .shop-catlist ul { list-style: none; margin: 0; padding: 0; }
.shop-catlist { display: flex; flex-direction: column; gap: .15rem; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.shop-catlist a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem .7rem; border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-weight: 600; }
.shop-catlist a:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.shop-catlist a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.shop-catlist .count { flex: none; min-width: 1.6rem; padding: 0 .4rem; border-radius: 999px; background: color-mix(in srgb, var(--line) 60%, transparent); color: var(--muted); font-size: .75rem; font-weight: 700; text-align: center; }
.shop-catlist a[aria-current="page"] .count { background: var(--accent-ink); color: var(--accent); }
.shop-catlist ul { margin: .1rem 0 .3rem .9rem; padding-left: .6rem; border-left: 1px solid var(--line); }
.shop-catlist ul a { padding: .3rem .6rem; font-weight: 400; font-size: .9375rem; color: var(--muted); }
.shop-catlist ul a:hover { color: var(--ink); }
.shop-catlist ul a[aria-current="page"] { font-weight: 700; }
.shop-crumbs { margin: 0 0 .2rem; color: var(--muted); font-size: .9375rem; }
.shop-crumbs a { color: var(--muted); }
.shop-crumbs a:hover { color: var(--ink); }
.shop-main .filters { margin-bottom: 1.25rem; }
.shop-main .pgrid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 799px) {
  .shop-layout { grid-template-columns: 1fr; gap: 1rem; }
  .shop-side { position: static; }
  .shop-catbox > summary { display: list-item; cursor: pointer; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
  .shop-catbox[open] > summary { border-radius: var(--r-m) var(--r-m) 0 0; border-bottom: 0; }
  .shop-catbox[open] .shop-catlist { border-radius: 0 0 var(--r-m) var(--r-m); }
}

/* ---- v22: strona Aplikacja (instalacja na telefonie) ---- */
.appi { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }
.appi-hero { display: flex; align-items: center; gap: 1.25rem; }
.appi-hero h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.5rem); font-stretch: 75%; }
.appi-hero p { margin: .25rem 0 0; max-width: 56ch; }
.appi-icon { flex: none; width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.appi-btn { min-height: 3rem; padding-inline: 1.6rem; font-size: 1.0625rem; }
.appi-auto .hint { margin: .4rem 0 0; }
.appi-installed p { margin: 0; color: var(--ok); }
.appi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; align-items: start; }
.appi-card h2 { margin: 0 0 .6rem; font-size: 1.1875rem; }
.appi-card ol { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .45rem; }
.appi-card.is-mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.appi-card.is-mine h2::after { content: "Twoje urządzenie"; margin-left: .5rem; padding: .1rem .5rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .6875rem; font-weight: 700; vertical-align: middle; }
.appi-share { display: inline-flex; vertical-align: -3px; }
.appi-share svg { width: 1.1rem; height: 1.1rem; color: var(--focus); }
.shop-app-link { gap: .35rem; }
.shop-admin[aria-current="page"] { border-color: var(--accent); color: var(--accent); }
@media (max-width: 560px) {
  .shop-topbar { flex-wrap: nowrap; gap: .5rem; }
  .shop-topbar .who { gap: .4rem; flex-wrap: nowrap; }
  .shop-topbar .btn-sm { padding-inline: .55rem; }
  .shop-app-text { display: none; }
  .appi-hero { flex-direction: column; align-items: flex-start; }
  .appi-icon { width: 72px; height: 72px; border-radius: 16px; }
}

/* ---- v23: kafelki Aplikacji równej wysokości, strona Kontakt, stopka sklepu ---- */
.appi-grid { align-items: stretch; }
.appi-card { display: flex; flex-direction: column; height: 100%; }
.contact { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }
.contact-hero h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.5rem); font-stretch: 75%; }
.contact-hero p { margin: .25rem 0 0; max-width: 60ch; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; align-items: stretch; }
.contact-card { display: flex; flex-direction: column; gap: .2rem; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.contact-card:hover { border-color: var(--accent); }
.contact-ico { font-size: 1.6rem; line-height: 1; margin-bottom: .35rem; }
.contact-lbl { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.contact-val { font-size: 1.1875rem; overflow-wrap: anywhere; }
.contact-act { margin-top: auto; padding-top: .6rem; color: var(--accent); font-weight: 600; font-size: .9375rem; }
.contact-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; align-items: stretch; }
.contact-more h2 { margin: 0 0 .75rem; font-size: 1.1875rem; }
.contact-more p { margin: 0 0 .5rem; }
.contact-hours { margin: 0; }
.contact-hours div { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.contact-hours div:last-child { border-bottom: 0; }
.contact-hours dt { color: var(--muted); }
.contact-hours dd { margin: 0; font-weight: 600; }
.contact-social { display: flex; gap: .5rem; flex-wrap: wrap; }
.shop-footer { max-width: 1240px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 2.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.shop-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.shop-footer a { color: var(--muted); }
.shop-footer a:hover { color: var(--ink); }
@media (max-width: 420px) {
  .shop-topbar .brand-sub { display: none; }
}

/* ---- v24: podgląd zdjęć na cały ekran (lightbox) ---- */
.product-photo { position: relative; }
.lb-ready img { cursor: zoom-in; }
.lb-open-btn { position: absolute; right: .65rem; bottom: .65rem; z-index: 3; display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .7rem; border: 0; border-radius: 999px; background: rgba(28, 38, 48, .82); color: #fff; font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.lb-open-btn:hover { background: var(--accent); color: var(--accent-ink); }
.lb-open-btn svg { width: 1.05rem; height: 1.05rem; }
.lb-ready .car-count { left: .65rem; right: auto; }
html.lb-open { overflow: hidden; }
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 11, 14, .96); color: #fff; overflow: hidden; }
.lightbox::backdrop { background: rgba(8, 11, 14, .96); }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; touch-action: none; user-select: none; overflow: hidden; }
.lb-img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; transform-origin: center; cursor: zoom-in; will-change: transform; }
.lightbox.is-zoomed .lb-img { cursor: grab; }
.lightbox.is-zoomed .lb-img:active { cursor: grabbing; }
.lb-bar { position: absolute; inset: 0 0 auto; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: calc(.75rem + env(safe-area-inset-top, 0px)) 1rem .75rem; background: linear-gradient(rgba(0, 0, 0, .55), transparent); pointer-events: none; }
.lb-bar > * { pointer-events: auto; }
.lb-count { font-weight: 700; font-size: .9375rem; }
.lb-tools { display: flex; gap: .5rem; }
.lb-btn, .lb-nav { display: inline-grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(28, 38, 48, .7); color: #fff; font: inherit; cursor: pointer; }
.lb-btn { width: 2.6rem; height: 2.6rem; font-size: 1.25rem; font-weight: 700; }
.lb-btn:hover:not(:disabled), .lb-nav:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lb-btn:disabled { opacity: .35; cursor: default; }
.lb-btn:focus:not(:focus-visible) { outline: none; }
.lb-nav { position: absolute; top: 50%; z-index: 2; width: 3.2rem; height: 3.2rem; margin-top: -1.6rem; font-size: 2rem; line-height: 1; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lightbox.is-single .lb-nav, .lightbox.is-zoomed .lb-nav { display: none; }
.lb-hint { position: absolute; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 2; margin: 0; transform: translateX(-50%); padding: .3rem .8rem; border-radius: 999px; background: rgba(28, 38, 48, .7); color: rgba(255, 255, 255, .8); font-size: .8125rem; white-space: nowrap; pointer-events: none; }
.lightbox.is-zoomed .lb-hint { display: none; }
@media (max-width: 799px) {
  .shop .product-photo { max-width: none; }
  .lb-nav { width: 2.6rem; height: 2.6rem; margin-top: -1.3rem; font-size: 1.6rem; }
  .lb-prev { left: .5rem; }
  .lb-next { right: .5rem; }
}

/* ---- v25: 2FA i logowanie przez Authentik ---- */
.stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.or-sep { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .8125rem; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.oidc-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.oidc-btn svg { width: 1.15rem; height: 1.15rem; color: var(--accent); }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.375rem; letter-spacing: .2em; text-align: center; }
.sec-on { color: var(--ok); font-weight: 600; }
.sec-off { color: var(--muted); }
.sec-badge { display: inline-block; padding: .05rem .45rem; border: 1px solid var(--line); border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.sec-badge-on { border-color: var(--ok); color: var(--ok); }
.sec-badge-warn { border-color: var(--tape); color: var(--tape); }
.recovery-codes { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .4rem; }
.recovery-codes li { padding: .35rem .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); font-size: 1rem; text-align: center; }
.twofa-steps { margin: 0; padding-left: 1.4rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem 2rem; }
.twofa-steps h2 { margin: 0 0 .5rem; font-size: 1.0625rem; }
.twofa-steps p { margin: 0; }
.twofa-qr { width: 200px; max-width: 100%; padding: 10px; background: #fff; border-radius: var(--r-m); }
.twofa-qr svg { display: block; width: 100%; height: auto; }
.twofa-key { margin: .5rem 0 .25rem; font-size: 1rem; letter-spacing: .05em; overflow-wrap: anywhere; }
.pw-inline { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.pw-inline input { flex: 1 1 10rem; width: auto; }
.setup-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .55rem; font-size: .9375rem; }
.copy-url { display: block; margin-top: .3rem; padding: .35rem .5rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); font-size: .8125rem; overflow-wrap: anywhere; user-select: all; }

/* ---- v26: telefony — nic poza ekranem, zakładki jako przyciski (jak w Kategoriach) ---- */
html, body { overflow-x: clip; }
img, svg, video { max-width: 100%; }
input, select, textarea { min-width: 0; max-width: 100%; }
.panel, .field, .row > *, .stack > * { min-width: 0; }

.tabs, .dict-tabs { display: flex; flex-wrap: wrap; gap: .4rem; width: auto; margin: 0 0 1.25rem; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
.tabs a, .dict-tabs a { display: inline-flex; align-items: center; gap: .3rem; margin: 0; padding: .45rem .95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.tabs a:hover, .dict-tabs a:hover { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.tabs a[aria-current="page"], .dict-tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs .count, .dict-tabs .count { margin: 0; background: color-mix(in srgb, var(--line) 70%, transparent); color: var(--muted); font-weight: 700; }
.tabs a[aria-current="page"] .count, .dict-tabs a[aria-current="page"] .count { background: var(--accent-ink); color: var(--accent); }

.phone-field { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
.row > .field:has(.phone-field) { grid-column: 1 / -1; }
table.variants td, table.ships td { white-space: nowrap; }

@media (max-width: 820px) {
  .item-layout, .admin-layout, .shop-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .page { padding-inline: 1rem; }
  .nav-right { position: relative; }
  .nav-menu { position: static; }
  .nav-panel { left: auto; right: 0; min-width: 0; width: min(20rem, calc(100vw - 2rem)); }
  .tabs a, .dict-tabs a { padding: .4rem .8rem; font-size: .875rem; }
  .note-head { flex-direction: column; gap: .5rem; }
  .note-actions { flex-wrap: wrap; }
  .loc-items, .loc-items tbody { display: block; }
  .loc-items tr { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .25rem .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .loc-items td { display: block; padding: 0; border: 0; }
  .loc-items .thumb { width: 44px; }
  .loc-items td.num { grid-column: 2; text-align: left; }
  .loc-items .qty-inline { justify-content: flex-start; }
  .kv div { grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); }
  .head { flex-wrap: wrap; }
  /* Użytkownicy: wiersze jako karty (login + Edytuj u góry, reszta pod spodem). */
  table.users thead { display: none; }
  table.users, table.users tbody { display: block; }
  table.users tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  table.users tr:last-child { border-bottom: 0; }
  table.users td { display: block; padding: 0; border: 0; grid-column: 1 / -1; }
  table.users td:first-child { grid-column: 1; font-size: 1.0625rem; }
  table.users td:last-child { grid-column: 2; grid-row: 1; }
  table.users td:nth-child(6)::before { content: "Ostatnie logowanie: "; color: var(--muted); font-size: .8125rem; }
  /* Sklep: warianty — nazwa i cena w wierszu, stan pod spodem (bez uciętej kolumny). */
  .shop-variants thead { display: none; }
  .shop-variants, .shop-variants tbody { display: block; }
  .shop-variants tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .shop-variants tr:last-child { border-bottom: 0; }
  .shop-variants td { display: block; padding: 0; border: 0; white-space: normal; }
  .shop-variants td:last-child { grid-column: 1 / -1; }
}
/* Tabele szersze niż ekran: cień przy krawędzi pokazuje, że można przewinąć w bok. */
.table-wrap {
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left center / 2rem 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right center / 2rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .35), transparent) left center / .8rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .35), transparent) right center / .8rem 100% no-repeat scroll;
}

/* ---- v27: kraje w lokalizacjach ---- */
.loc-tree li.is-country { padding-top: .6rem; padding-bottom: .6rem; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.loc-tree li.is-country strong { font-size: 1.0625rem; }
.loc-tree .flag-font, .crumbs .flag-font, h1 .flag-font { font-style: normal; }
.check .loc-address { display: block; }

/* ---- v28: Kategorie jako kafelki + strona pozycji, opis przy kopii ---- */
.dict-panel { margin-top: .25rem; }
.dict-tools { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.dict-search { flex: 1 1 16rem; width: auto; }
.dict-tools .dict-add { flex: 1 1 18rem; display: flex; gap: .5rem; margin: 0; }
.dict-tools .dict-add input { flex: 1; width: auto; }
.dict-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.dict-tile { position: relative; display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: .9rem 2.2rem .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.dict-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.dict-tile.is-unused { border-style: dashed; }
.dict-tile-name { font-weight: 700; font-size: 1.0625rem; overflow-wrap: anywhere; }
.dict-tile-meta { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; font-size: .8125rem; }
.dict-tile-subs { font-size: .8125rem; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.dict-tile-go { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--muted); }
.dict-tile:hover .dict-tile-go { color: var(--accent); }
.dict-badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--ink); font-weight: 600; font-size: .8125rem; text-decoration: none; white-space: nowrap; }
a.dict-badge:hover { background: var(--accent); color: var(--accent-ink); }
.sub-rows { list-style: none; margin: 0 0 .5rem; padding: 0; }
.sub-rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.sub-rows li:last-child { border-bottom: 0; }
.sub-rows .dict-rename { display: flex; gap: .4rem; flex: 1 1 14rem; margin: 0; }
.sub-rows .dict-rename input { flex: 1; width: auto; }
.sub-row-side { display: flex; align-items: center; gap: .5rem; }
.sub-row-side form { margin: 0; }
.dict-products { list-style: none; margin: 0; padding: 0; columns: 2 16rem; column-gap: 1.5rem; }
.dict-products li { break-inside: avoid; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.dict-products li a { font-weight: 600; }
.dict-products .muted { display: block; }
.bk-note { display: block; margin-top: .15rem; padding: .1rem .5rem; border-left: 3px solid var(--accent); color: var(--ink); font-size: .875rem; font-style: italic; white-space: normal; }
@media (max-width: 560px) {
  /* Kopie: wiersze jako karty (data + opis, rodzaj i zawartość, przyciski pod spodem). */
  table.backups thead { display: none; }
  table.backups, table.backups tbody { display: block; }
  table.backups tr { display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  table.backups td { display: block; padding: 0; border: 0; white-space: normal; text-align: left; }
  table.backups td:nth-child(2), table.backups td:last-child { flex-basis: 100%; }
  table.backups .right-actions { justify-content: flex-start; margin-top: .3rem; }
}
.bk-file { display: block; }
/* Kafelki słowników: wszystkie tej samej wysokości, podkategorie najwyżej 3 linijki (12 nazw + „… +N”). */
.dict-grid { grid-auto-rows: 1fr; align-items: stretch; }
.dict-grid > li { min-width: 0; display: flex; }
.dict-grid > li[hidden] { display: none; }
.dict-grid .dict-tile { flex: 1; }
.dict-tile-subs { -webkit-line-clamp: 4; line-height: 1.4; }
@media (max-width: 560px) { .dict-grid { grid-auto-rows: auto; } }
.dict-more { color: var(--ink); font-weight: 700; white-space: nowrap; }

/* ---- v29: sklep — obserwowane, baner powitalny, nowości ---- */
.heart { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; flex: none; }
.shop-card-media { position: relative; }
.shop-card .car-count { left: .65rem; right: auto; }
.watch-btn { position: absolute; top: .6rem; right: .6rem; z-index: 3; display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #1C2630; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); transition: transform .15s; }
.watch-btn:hover { transform: scale(1.08); }
.watch-btn.is-on { color: #E0473A; }
.watch-btn.is-on .heart { fill: currentColor; }
.watch-btn.is-on .heart { animation: watch-pop .3s ease; }
@keyframes watch-pop { 50% { transform: scale(1.3); } }
.watch-btn-big { position: static; width: auto; height: auto; display: inline-flex; gap: .45rem; padding: .5rem .95rem; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; font-weight: 600; }
.watch-btn-big.is-on { color: #E0473A; border-color: currentColor; }
.shop-buy { align-items: center; }
.shop-buy .watch-btn-big { margin-left: auto; }
.shop-watch-link { position: relative; gap: .35rem; }
.shop-watch-link .heart { width: 1rem; height: 1rem; }
.watch-count { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 999px; background: #E0473A; color: #fff; font-size: .6875rem; font-weight: 800; }
.heart-inline { color: #E0473A; }
.watch-toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 60; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  padding: .6rem 1rem; border-radius: 999px; background: #1C2630; color: #fff; font-weight: 600; font-size: .9375rem; white-space: nowrap; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); transition: opacity .2s, transform .2s; }
.watch-toast.is-shown { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.watch-toast a { color: var(--accent); }
.shop-card.is-leaving { opacity: 0; transform: scale(.96); transition: opacity .25s, transform .25s; }
.footer-theme { opacity: 1; color: var(--muted); }

.shop-welcome { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; margin: .25rem 0 2rem;
  padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: 14px; color: #ECEEE9;
  background: radial-gradient(120% 140% at 100% 0%, rgba(248, 205, 58, .22), transparent 55%), linear-gradient(135deg, #1C2630 0%, #22313d 55%, #1a2a33 100%); }
.shop-welcome::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, #1C2630 10px 20px); }
.shop-welcome-kicker { margin: 0 0 .4rem; color: var(--accent); font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.shop-welcome h1 { margin: 0; max-width: 20ch; font-size: clamp(1.9rem, 5vw, 3.1rem); font-stretch: 72%; line-height: 1.05; }
.shop-welcome-lead { margin: .8rem 0 1.25rem; max-width: 52ch; color: rgba(236, 238, 233, .82); }
.shop-welcome-search { display: flex; gap: .5rem; max-width: 36rem; }
.shop-welcome-search input { flex: 1; width: auto; min-height: 3rem; border-color: rgba(236, 238, 233, .25); background: rgba(255, 255, 255, .08); color: #fff; }
.shop-welcome-search input::placeholder { color: rgba(236, 238, 233, .6); }
.shop-welcome-search .btn { min-height: 3rem; padding-inline: 1.3rem; }
.shop-stats { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1.25rem 0 0; padding: 0; color: rgba(236, 238, 233, .75); font-size: .9375rem; }
.shop-stats strong { color: #fff; font-size: 1.25rem; font-weight: 800; margin-right: .15rem; }
.shop-welcome-art img { width: clamp(120px, 16vw, 190px); height: auto; border-radius: 34px; box-shadow: 0 16px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(248, 205, 58, .35); transform: rotate(-6deg); }
.shop-newest { margin-bottom: 2rem; }
.shop-newest .title-row { align-items: baseline; justify-content: flex-start; gap: .75rem; margin-bottom: .75rem; }
.shop-newest h2, .shop-all-title { margin: 0; font-size: 1.375rem; }
.shop-all-title { margin-bottom: 1rem; }
.shop-strip { list-style: none; margin: 0; padding: 0 0 .5rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: .9rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shop-strip > li { scroll-snap-align: start; }
.shop-card-compact .ptitle-sub { min-height: 0; }
.shop-card-compact .shop-price strong { font-size: 1.125rem; }
.shop-card-compact .shop-card-foot { flex-wrap: wrap; }
@media (max-width: 700px) {
  .shop-welcome { grid-template-columns: 1fr; }
  .shop-welcome-art { display: none; }
}
@media (max-width: 420px) {
  .shop-welcome-search { flex-direction: column; }
  .shop-strip { grid-auto-columns: 78%; }
}

/* ---- v30: sklep — pasek (motyw, ikona administracji), stopka w 5 kolumnach ---- */
.shop-topbar .who { gap: .5rem; }
.admin-ico { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.shop-admin-main { display: inline-flex; align-items: center; gap: .4rem; }
.shop-admin-main .admin-ico { color: var(--accent); }
.shop-admin-main:hover .admin-ico { color: inherit; }
@media (max-width: 420px) {
  .shop-topbar .who { gap: .3rem; }
  .shop-topbar .theme-toggle { width: 2rem; height: 2rem; }
  .shop-admin-main { padding-inline: .55rem; }
}

.shop-footer { display: block; max-width: none; margin: 3rem 0 0; padding: 0; border-top: 0; color: var(--muted); font-size: .9375rem;
  background: color-mix(in srgb, var(--surface) 70%, var(--paper)); }
.shop-footer::before { content: ""; display: block; height: 6px; background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, var(--tape-dark) 10px 20px); }
.sf-grid { max-width: 1240px; margin: 0 auto; padding: 2.25rem clamp(1rem, 3vw, 2rem) 1.5rem; display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 2rem; }
.sf-grid h2 { margin: 0 0 .8rem; color: var(--ink); font-size: .8125rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sf-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.sf-grid a { color: var(--muted); text-decoration: none; }
.sf-grid a:hover { color: var(--accent); }
.sf-brand { display: inline-flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
.sf-brand img { border-radius: 10px; box-shadow: 0 0 0 1px rgba(248, 205, 58, .35); }
.sf-brand strong { display: block; color: var(--ink); font-size: 1.375rem; font-stretch: 75%; line-height: 1; }
.sf-brand small { display: block; margin-top: .15rem; font-size: .6875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.sf-about p { margin: 0; max-width: 34ch; line-height: 1.55; }
.sf-soon { color: var(--muted); }
.sf-soon small { margin-left: .3rem; padding: 0 .4rem; border: 1px solid var(--line); border-radius: 999px; font-size: .6875rem; }
.sf-more { font-weight: 600; color: var(--ink) !important; }
.sf-contact ul { margin-bottom: .9rem; }
.sf-contact li { overflow-wrap: anywhere; }
.sf-contact .sf-contact-btn { color: var(--ink); }
.sf-bottom { max-width: 1240px; margin: 0 auto; padding: 1rem clamp(1rem, 3vw, 2rem) 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem;
  border-top: 1px solid var(--line); font-size: .8125rem; }
.sf-bottom a { color: var(--muted); }
@media (max-width: 960px) {
  .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-about { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .sf-grid { gap: 1.5rem 1.25rem; }
  .sf-contact { grid-column: 1 / -1; }
}
@media (max-width: 330px) {
  .sf-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Stopka zawsze przy dolnej krawędzi ekranu (krótkie strony, np. Kontakt). */
body:has(.shop-footer) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body:has(.shop-footer) > main { flex: 1 0 auto; width: 100%; }

/* ---- v31: grupy i uprawnienia ---- */
.group-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .9rem; align-content: start; }
.group-card { display: flex; flex-direction: column; gap: .45rem; height: 100%; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.group-card:hover { border-color: var(--accent); }
.group-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; font-size: 1.0625rem; }
.group-lock { font-size: .75rem; color: var(--accent); font-weight: 700; }
.group-perms { display: flex; flex-wrap: wrap; gap: .3rem; }
.perm-chip { padding: .05rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); font-size: .75rem; font-weight: 600; }
.group-members { margin-top: auto; padding-top: .3rem; color: var(--muted); font-size: .875rem; font-weight: 600; }
.perm-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem 1.5rem; }
.perm-section { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: .35rem; }
.perm-section legend { margin-bottom: .4rem; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.perm-row { display: flex; flex-direction: row; gap: .65rem; align-items: flex-start; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; }
.perm-row:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.perm-row input { margin-top: .2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); flex: none; }
.perm-row strong { display: block; font-size: .9375rem; }
.perm-row small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.35; }

/* ---- v32: treści — Polecenia i rekordy, Pomoc ---- */
.shop-subnav { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; padding: 0 clamp(1rem, 3vw, 2rem); background: #1C2630; border-top: 1px solid rgba(236, 238, 233, .08); }
.shop-subnav::-webkit-scrollbar { display: none; }
.shop-subnav a { flex: none; padding: .6rem .9rem; color: rgba(236, 238, 233, .75); font-weight: 600; font-size: .9375rem; text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.shop-subnav a:hover { color: #fff; }
.shop-subnav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }

.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 1rem; }
.post-card-link { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.post-card-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-cover { position: relative; display: block; aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--line) 40%, var(--surface)); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-cover-empty { display: grid; place-items: center; height: 100%; font-size: 3rem; }
.post-kind { position: absolute; left: .6rem; top: .6rem; padding: .15rem .6rem; border-radius: 999px; background: rgba(28, 38, 48, .88); color: #fff; font-size: .75rem; font-weight: 700; }
.post-kind-rekord { background: var(--accent); color: var(--accent-ink); }
.post-card-body { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem 1rem; flex: 1; }
.post-card-title { font-size: 1.0625rem; line-height: 1.3; }
.post-catch { color: var(--ok); font-weight: 700; font-size: .875rem; }
.post-lead { color: var(--muted); font-size: .9375rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.post-meta { margin-top: auto; padding-top: .3rem; color: var(--muted); font-size: .8125rem; }

.post { max-width: 780px; margin: 0 auto; }
.post-title { margin: .2rem 0 .3rem; font-size: clamp(1.75rem, 4.5vw, 2.6rem); font-stretch: 75%; line-height: 1.1; }
.post-byline { margin: 0 0 1.25rem; }
.post-cover-lg { margin: 0 0 1.25rem; position: relative; border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); }
.post-cover-lg img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.catch-box { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; margin: 0 0 1.5rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--r-m); background: var(--surface); }
.catch-box div { display: flex; flex-direction: column; }
.catch-box span { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.catch-box strong { font-size: 1.125rem; }
.catch-map { margin-left: auto; }
.post-body { font-size: 1.0625rem; line-height: 1.7; }
.post-body img { border-radius: var(--r-m); }
.gear-box { margin: 1.75rem 0 0; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.gear-box h2 { margin: 0 0 .7rem; font-size: 1.1875rem; }
.gear-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.gear-box li { display: flex; flex-wrap: wrap; gap: .2rem .6rem; padding-bottom: .45rem; border-bottom: 1px dashed var(--line); }
.gear-box li:last-child { border-bottom: 0; padding-bottom: 0; }
.gear-box li span { min-width: 7.5rem; color: var(--muted); }
.post-products, .post-more { margin-top: 2.5rem; }
.post-products h2, .post-more h2 { font-size: 1.375rem; margin: 0 0 1rem; }

.help-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; max-width: 860px; }
.help-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); text-decoration: none; }
.help-item:hover { border-color: var(--accent); }
.help-ico { font-size: 1.6rem; flex: none; }
.help-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
.help-text strong { font-size: 1.0625rem; }
.help-go { font-size: 1.5rem; color: var(--muted); }

.content-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.content-row { display: flex; align-items: center; gap: 1rem; padding: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.content-row.is-draft { border-style: dashed; }
.content-thumb { flex: none; width: 72px; height: 54px; border-radius: var(--r-s); overflow: hidden; display: grid; place-items: center; background: var(--paper); font-size: 1.6rem; text-decoration: none; }
.content-thumb img { width: 100%; height: 100%; object-fit: cover; }
.content-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.content-title { font-weight: 700; color: var(--ink); text-decoration: none; }
.content-title:hover { color: var(--accent); }
.content-side { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; justify-content: flex-end; }
.content-form textarea[name="body"] { min-height: 18rem; }
.prod-filter { margin-bottom: .4rem; }
.prod-pick { max-height: 16rem; overflow-y: auto; display: flex; flex-direction: column; gap: .2rem; padding: .5rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); }
.prod-pick .check { padding: .2rem .3rem; }
.cover-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--r-s); }
.publish-check strong { font-size: 1rem; }
@media (max-width: 560px) {
  .content-row { flex-wrap: wrap; }
  .content-side { width: 100%; justify-content: flex-start; }
  .catch-map { margin-left: 0; width: 100%; }
}

/* ---- v33: menu ☰ na telefonie, przełącznik widoczności w sklepie, działy strony ---- */
.mnav { display: none; }
.mnav > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem; border: 1px solid rgba(236, 238, 233, .3); border-radius: 999px; color: #fff; font-weight: 700; cursor: pointer; user-select: none; }
.mnav > summary::-webkit-details-marker { display: none; }
.mnav > summary svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.mnav[open] > summary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mnav-panel { position: absolute; z-index: 60; left: .75rem; right: .75rem; top: calc(100% + .35rem); max-height: calc(100vh - 5.5rem); max-height: calc(100dvh - 5.5rem); overflow-y: auto;
  display: flex; flex-direction: column; padding: .5rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.mnav-panel a, .mnav-btn { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border: 0; border-radius: var(--r-s); background: none; color: var(--ink); font: inherit; font-weight: 600; font-size: 1rem; text-align: left; text-decoration: none; cursor: pointer; width: 100%; }
.mnav-panel a:hover, .mnav-btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.mnav-panel a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.mnav-panel form { margin: 0; }
.mnav-head { margin: .7rem .8rem .2rem; font-size: .6875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mnav-user { gap: .7rem !important; padding: .6rem .8rem !important; margin-bottom: .2rem; border-bottom: 1px solid var(--line) !important; border-radius: var(--r-s) var(--r-s) 0 0 !important; }
.mnav-user strong, .mnav-user small { display: block; }
.mnav-user small { color: var(--muted); font-weight: 400; font-size: .8125rem; }
.mnav-logout { color: var(--out); }
.mnav .nav-badge { margin-left: auto; }
.mnav-panel .watch-count { margin-left: auto; }
@media (max-width: 860px) {
  .topbar { position: relative; }
  .topbar:not(.shop-topbar) { flex-wrap: nowrap; }
  .topbar:not(.shop-topbar) > .nav, .topbar:not(.shop-topbar) > .nav-right, .topbar:not(.shop-topbar) > .who { display: none; }
  .topbar > .mnav { display: block; margin-left: auto; }
}
@media (max-width: 700px) {
  .shop-topbar .who > :not(.shop-grp-main):not(.mnav) { display: none; }
  .shop-grp-main > :not(.shop-watch-link):not(.shop-cart-link) { display: none; }
  .shop-topbar .mnav { display: block; position: static; }
  .shop-topbar .mnav > summary { padding: .45rem .6rem; }
  .shop-subnav { display: none; }
}

.shop-toggle { margin: .45rem 0 0; }
.toggle-row { display: flex; flex-wrap: wrap; gap: .35rem; margin: .45rem 0 0; }
.toggle-row .shop-toggle { margin: 0; }
.stock-shop-row form { margin: 0; }
.vis-btn { display: inline-flex; align-items: center; padding: .2rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer; }
.vis-btn .vis-on { display: none; }
.vis-btn.is-on { border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); background: var(--in-bg); color: var(--ok); }
.vis-btn.is-on .vis-on { display: inline; }
.vis-btn.is-on .vis-off { display: none; }
.vis-btn:not(.is-on) { border-style: dashed; }
.vis-btn:hover { border-color: var(--accent); }
.vis-btn:disabled { opacity: .6; cursor: wait; }
.product-shop-line { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; }
.product-shop-line .shop-toggle { margin: 0; }
.site-switches { display: flex; flex-direction: column; gap: .6rem; }
.site-switch strong { font-size: 1.0625rem; }
.site-state { margin-top: .25rem; font-weight: 700; color: var(--ink) !important; }
.perm-lock { font-size: .8125rem; }

/* ---- v34: rozliczenia Polkurier ---- */
.bill-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .9rem; margin: 1rem 0 0; }
.bill-tile { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.bill-tile span { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bill-tile strong { font-size: 1.75rem; font-stretch: 80%; line-height: 1.1; }
.bill-tile small { color: var(--muted); font-size: .8125rem; }
.bill-tile.is-alert { border-color: var(--out); box-shadow: inset 4px 0 0 var(--out); }
.bill-tile.is-alert strong { color: var(--out); }
.bill-tile.is-new { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.bill-sync { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.bill-sync form { margin: 0; display: flex; gap: .4rem; align-items: center; }
.bill-table tr.bill-new td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav .nav-badge { margin-left: .25rem; }

/* ---- v35: oś czasu historii, pola e-mail, menu ☰, większe przełączniki, stopka panelu ---- */
/* E-mail obok telefonu: oba na całą szerokość (telefon z kierunkowym potrzebuje miejsca). */
.row:has(.phone-field) > * { grid-column: 1 / -1; }

/* Historia jako oś czasu */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.tl-day { margin: 1rem 0 .1rem; }
.tl-day:first-child { margin-top: 0; }
.tl-day h2 { margin: 0; font-size: .8125rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tl-item { display: flex; gap: .85rem; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--r-m); }
.tl-item.tl-bad { border-left-color: var(--out); background: color-mix(in srgb, var(--out) 7%, var(--surface)); }
.tl-item.tl-warn { border-left-color: #E8923A; }
.tl-item.tl-in { border-left-color: var(--ok); }
.tl-item.tl-out { border-left-color: var(--focus); }
.tl-ico { flex: none; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--paper); font-size: 1.15rem; }
.tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.tl-title { font-size: 1rem; }
.tl-sec { padding: .05rem .5rem; border-radius: 999px; font-size: .6875rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--paper); color: var(--muted); }
.tl-sec-produkty { color: var(--ok); }
.tl-sec-wysylki { color: var(--focus); }
.tl-sec-konto { color: var(--accent); }
.tl-sec-admin { color: #E8923A; }
.tl-sec-strona { color: #C58AF0; }
.tl-time { margin-left: auto; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.tl-item-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; }
.tl-item-line a { font-weight: 600; }
.tl-details { font-size: .9375rem; overflow-wrap: anywhere; }
.tl-details ul { margin: .25rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .1rem; color: var(--ink); }
.tl-meta { margin: 0; display: flex; flex-wrap: wrap; gap: .2rem 1rem; color: var(--muted); font-size: .8125rem; }

/* Menu ☰: wyraźne sekcje, przycisk wyloguj */
.mnav-head { margin: 1rem .4rem .35rem; padding: .45rem .5rem; border-top: 2px solid var(--line); font-size: .875rem; letter-spacing: .14em; color: var(--accent); }
.mnav-user + .mnav-head { border-top: 0; margin-top: .4rem; }
.mnav-panel form:last-child { margin-top: .6rem; padding-top: .6rem; border-top: 2px solid var(--line); }
.mnav-logout { width: 100%; justify-content: center; gap: .5rem; min-height: 2.9rem; border-color: color-mix(in srgb, var(--out) 55%, var(--line)); color: var(--out); font-size: 1rem; }
.mnav-logout:hover { background: var(--out-bg); border-color: var(--out); }
.mnav-logout svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Widoczność w sklepie: większe przyciski i checkbox (telefon) */
.product-shop-line .vis-btn { padding: .45rem 1rem; font-size: .9375rem; }
.shop-visible-check input[type="checkbox"] { width: 1.35rem; height: 1.35rem; flex: none; accent-color: var(--accent); }
@media (max-width: 560px) {
  .vis-btn { padding: .4rem .85rem; font-size: .875rem; }
  .product-shop-line { font-size: .9375rem; }
}

/* Stopka panelu magazynu */
body:has(.panel-footer) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body:has(.panel-footer) > main { flex: 1 0 auto; width: 100%; }
.panel-footer { margin-top: 2.5rem; background: color-mix(in srgb, var(--surface) 70%, var(--paper)); border-top: 1px solid var(--line); }
.panel-footer::before { content: ""; display: block; height: 4px; background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, var(--tape-dark) 10px 20px); }
.pf-inner { max-width: 1240px; margin: 0 auto; padding: 1.1rem clamp(1rem, 3vw, 2rem) 1.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.pf-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; }
.pf-brand img { border-radius: 8px; }
.pf-links { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; flex: 1; }
.pf-links a { color: var(--muted); text-decoration: none; font-size: .9375rem; }
.pf-links a:hover { color: var(--accent); }
.pf-meta { color: var(--muted); font-size: .8125rem; }
@media (max-width: 560px) {
  .pf-inner { flex-direction: column; align-items: flex-start; }
}

/* ---- v36: czcionka Archivo z własnego serwera, cookies, Omnibus, stan towaru ---- */
/* Archivo (SIL OFL 1.1, licencja: static/fonts/Archivo-OFL.txt) — bez Google Fonts, więc IP odwiedzających nie trafia do Google. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/Archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/Archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.promo-badge { display: inline-block; padding: .05rem .45rem; border-radius: 999px; background: #E0473A; color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: 0; text-transform: none; vertical-align: middle; }
.price-line { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
.price-old { color: var(--muted); font-size: .9375rem; font-weight: 600; }
.shop-price.is-promo strong { color: #E0473A; }
.omnibus { display: block; margin-top: .2rem; color: var(--muted); font-size: .75rem; font-weight: 400; line-height: 1.3; }
.cond-badge { display: inline-block; margin-right: .4rem; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 800; vertical-align: middle; }
.cond-outlet { background: color-mix(in srgb, var(--focus) 20%, var(--surface)); color: var(--focus); }
.cond-uzywany { background: color-mix(in srgb, #E8923A 22%, var(--surface)); color: #E8923A; }
.cond-nowy { background: var(--in-bg); color: var(--ok); }
.cond-box { padding: .8rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: var(--r-m); background: var(--surface); }
.cond-box p { margin: 0; }
.cond-box p + p { margin-top: .45rem; }
.cond-box-outlet { border-left-color: var(--focus); }
.cond-box-uzywany { border-left-color: #E8923A; }
.cookie-bar { position: fixed; z-index: 70; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); max-width: 46rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 1rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-m); box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.cookie-bar p { margin: 0; flex: 1 1 18rem; font-size: .9375rem; }
.cookie-bar[hidden] { display: none !important; }
.doc-page { max-width: 860px; }
.doc-section { margin-top: 1.5rem; }
.doc-section h2 { margin: 0 0 .5rem; font-size: 1.1875rem; }
.doc-section p { margin: 0 0 .6rem; line-height: 1.65; }
.doc-table td { vertical-align: top; }

/* ---- v37: sklep — 5 nowości na głównej, zaproszenie do całego asortymentu (/sklep) ---- */
.shop-strip { grid-auto-columns: minmax(200px, 1fr); }
.shop-newest-more { margin-left: auto; }
.shop-cta { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: center;
  margin: .5rem 0 1rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 14px; color: #ECEEE9;
  background: radial-gradient(120% 140% at 0% 100%, rgba(248, 205, 58, .2), transparent 55%), linear-gradient(135deg, #1C2630 0%, #22313d 55%, #1a2a33 100%); }
.shop-cta::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, #1C2630 10px 20px); }
.shop-cta h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.3rem); font-stretch: 75%; line-height: 1.1; color: #fff; }
.shop-cta-text p:not(.shop-welcome-kicker) { margin: .7rem 0 1.25rem; max-width: 50ch; color: rgba(236, 238, 233, .82); }
.shop-cta-btn { min-height: 3rem; padding-inline: 1.4rem; font-size: 1.0625rem; }
.shop-cta-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-content: center; }
.shop-cta-cats a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid rgba(236, 238, 233, .25);
  background: rgba(255, 255, 255, .06); color: #fff; font-weight: 600; text-decoration: none; }
.shop-cta-cats a:hover { border-color: var(--accent); background: rgba(248, 205, 58, .15); }
.shop-cta-cats .count { color: rgba(236, 238, 233, .65); font-size: .8125rem; font-weight: 700; }
@media (max-width: 700px) {
  .shop-cta { grid-template-columns: 1fr; }
  .shop-cta-btn { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
  .shop-strip { grid-auto-columns: 78%; }
}

/* ---- v38: sklep — pasek podzielony separatorami, przycisk powrotu na górę ---- */
.shop-grp { display: inline-flex; align-items: center; gap: .35rem; }
.shop-sep { align-self: center; width: 1px; height: 1.5rem; background: rgba(236, 238, 233, .25); flex: none; }
.shop-topbar .who { gap: .65rem; }
@media (max-width: 420px) {
  .shop-topbar .who { gap: .3rem; }
}
.to-top { position: fixed; z-index: 60; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; padding: 0; border-radius: 50%; border: 2px solid var(--accent); background: #0d1114; color: var(--accent); cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35); transition: transform .15s ease, background .15s ease; }
:root[data-theme="light"] .to-top { background: #fff; box-shadow: 0 2px 10px rgba(28, 38, 48, .25); }
.to-top svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover { transform: translateY(-2px); background: #1C2630; }
:root[data-theme="light"] .to-top:hover { background: #fff8dc; }
.to-top[hidden] { display: none; }
body:has(.cookie-bar:not([hidden])) .to-top { bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }
@media print { .to-top { display: none; } }

/* ---- v39: panel — link Strona główna obok Wyloguj ---- */
a.link { color: inherit; opacity: .72; text-decoration: none; }
a.link:hover { opacity: 1; text-decoration: underline; }
.who-home { padding-right: .75rem; margin-right: .1rem; border-right: 1px solid rgba(236, 238, 233, .25); line-height: 1.2; }

/* ---- v40: sklep — menu ☰ na telefonie z podpisanymi sekcjami ---- */
.mnav-panel > .mnav-head:first-child { border-top: 0; margin-top: .4rem; }

/* ---- v41: strona produktu w panelu — galeria z podglądem, stan i historia pod nią, formularz po prawej ---- */
@media (min-width: 821px) {
  .item-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
.gallery .gthumb { cursor: zoom-in; }
.gallery li.gown .gown-label { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gallery li.gown .gthumb { outline: 2px dashed var(--line); outline-offset: -2px; }

/* ---- v42: formularz produktu w sekcjach (Produkt, Wariant, Magazyn, Ceny, Notatki), przycisk zapisu przyklejony ---- */
.form-sections { gap: 0; }
.fsec { display: flex; flex-direction: column; gap: 1.05rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.fsec:first-of-type { padding-top: 0; border-top: 0; }
.fsec-title { margin: 0; padding-left: .6rem; border-left: 4px solid var(--accent); font-size: .8125rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); line-height: 1.3; }
.form-sections > .size-fields:not([hidden]) { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.form-save { position: sticky; bottom: 0; z-index: 5; margin-top: .25rem; padding: .8rem 0 .2rem; border-top: 1px solid var(--line); background: var(--surface); }
.form-save .btn { width: 100%; justify-content: center; min-height: 2.9rem; }

/* ---- v43: historia ruchów produktu jako karty z podpisanymi polami ---- */
.hlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.hcard { padding: .65rem .8rem; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--r-s); background: var(--paper); }
.hcard.hc-plus { border-left-color: var(--ok); }
.hcard.hc-minus { border-left-color: var(--out); }
.hcard-kind { display: block; margin-bottom: .45rem; font-size: .9375rem; }
.hcard-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .5rem .9rem; margin: 0; }
.hcard-meta dt { font-size: .6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hcard-meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.hcard-note { grid-column: 1 / -1; }
.hcard-note dd { font-weight: 400; }

/* ---- v44: widoczność w sklepie przy stanie, opis produktu w formularzu ---- */
.stock-shop { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.stock-shop-title { margin: 0 0 .55rem; padding-left: .6rem; border-left: 4px solid var(--accent); font-size: .8125rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; }
.stock-shop-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.stock-shop .shop-toggle { margin: 0; }

/* ---- v45: karta produktu w sklepie — Obserwuj w prawym górnym rogu, cena bez ramki, opis w ramce ---- */
.shop-title-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1rem; }
.shop-title-row .ptitle { flex: 1 1 14rem; min-width: 0; }
.shop-title-aside { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin-top: .15rem; }
.shop-title-aside .shop-avail { padding: .4rem .8rem; font-size: .9375rem; }
.shop-buy { padding: 0; border: 0; border-radius: 0; background: none; }
.shop-desc-box { margin-top: 1.1rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.shop-desc-box h2 { margin: 0 0 .5rem; padding-left: .6rem; border-left: 4px solid var(--accent); font-size: .8125rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; }
.shop-desc-box .desc { max-width: none; line-height: 1.65; }

/* ---- v46: karta produktu — stan obok Obserwuj, cena większa na żółtym tle ---- */
.shop-buy .shop-price { gap: .35rem; }
.shop-buy .shop-price-lbl { font-size: .8125rem; }
.shop-buy .shop-price strong { display: inline-block; padding: .05em .45em .1em; border-radius: var(--r-s); background: var(--accent); color: var(--accent-ink); font-size: clamp(1.6rem, 4.5vw, 2.1rem); line-height: 1.1; }
.shop-buy .shop-price.is-promo strong { color: var(--accent-ink); }
.shop-buy .shop-price .shop-price-ask { font-size: 1.25rem; }

/* ---- v47: szerokie ekrany (od 1800 px), „Nasza cena” na żółto, mniejsza cena i większa plakietka obniżki ---- */
.shop-buy .shop-price-lbl { font-size: .9375rem; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
:root[data-theme="light"] .shop-buy .shop-price-lbl { color: #8a6700; }
.shop-buy .price-line { align-items: center; }
.shop-buy .shop-price .promo-badge { padding: .15rem .65rem; font-size: .9375rem; }
@media (min-width: 1800px) {
  .page, .sf-grid, .sf-bottom, .pf-inner { max-width: 1560px; }
  .topbar { padding-inline: calc((100% - 1560px) / 2 + 2rem); }
}
@media (min-width: 2400px) {
  .page, .sf-grid, .sf-bottom, .pf-inner { max-width: 1880px; }
  .topbar { padding-inline: calc((100% - 1880px) / 2 + 2rem); }
}

/* ---- v48: karta produktu w sklepie — większe zdjęcie (3/7 szerokości) ---- */
@media (min-width: 821px) {
  .shop .product-head { grid-template-columns: minmax(0, 3fr) minmax(0, 4fr); gap: 1.5rem 2.25rem; }
}
.shop .product-photo .car-slide { aspect-ratio: 8 / 7; }

/* ---- v49: przyciski akcji produktu (Usuń na górze, oddzielone kreską) ---- */
.head-actions, .doc-list { align-items: center; }
.act-sep { align-self: stretch; width: 1px; min-height: 1.75rem; margin: 0 .35rem; background: var(--line); flex: none; }
.act-delete { margin: 0; }

/* ---- v50: sklep — udostępnianie, zapytanie o produkt, polecane i wyprzedaż, podobne produkty ---- */
.shop-price-ask { font-size: 1.125rem; font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.shop-price-ask:hover { color: var(--accent-ink); background: var(--accent); text-decoration: none; }
.shop-buy .shop-ask-btn { min-height: 2.75rem; padding-inline: 1.2rem; }
.share { position: relative; display: inline-block; }
.share-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem; border-radius: 999px; }
.share-btn svg { width: 1.1rem; height: 1.1rem; }
.share-pop { position: absolute; z-index: 40; right: 0; top: calc(100% + .4rem); min-width: 12.5rem; display: flex; flex-direction: column; padding: .35rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.share-pop[hidden] { display: none; }
.share-pop a, .share-pop button { display: block; padding: .6rem .8rem; border: 0; border-radius: var(--r-s); background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.share-pop a:hover, .share-pop button:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.vis-btn-star.is-on { border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); background: color-mix(in srgb, var(--accent) 22%, var(--paper)); color: var(--ink); }
.ask-box { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; border-left: 4px solid var(--accent); }
.ask-head { display: flex; align-items: center; gap: 1rem; }
.ask-photo { flex: none; width: 84px; height: 84px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); }
.ask-kicker { margin: 0 0 .15rem; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ask-head h2 { margin: 0; font-size: 1.25rem; }
.ask-head h2 a { color: inherit; }
.ask-head p { margin: .2rem 0 0; }
.ask-box textarea { width: 100%; resize: vertical; }
.ask-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 560px) {
  .share-pop { right: auto; left: 0; }
  .ask-photo { width: 64px; height: 64px; }
}
/* Paski produktów (nowości, polecane, wyprzedaż, podobne): kafelek zawsze 1/5 szerokości, także przy mniejszej liczbie. */
.shop-strip { grid-auto-columns: max(200px, calc((100% - 3.6rem) / 5)); }
@media (max-width: 420px) {
  .shop-strip { grid-auto-columns: 78%; }
}
.shop-title-row .ptitle { flex-basis: 8rem; }
.similar-products { margin-top: 2rem; }
.shop-title-aside { flex: 0 1 auto; min-width: 0; }
@media (max-width: 560px) {
  .shop-title-aside { flex-basis: 100%; }
}
/* Rząd przycisków przy tytule karty: zwarty, żeby na 1440 px zmieścił się obok tytułu. */
.shop-title-aside { gap: .4rem; }
.shop-title-aside .btn, .shop-title-aside .shop-avail, .shop-title-aside .watch-btn-big { padding: .4rem .75rem; font-size: .875rem; min-height: 0; }
.shop-title-aside .shop-avail { padding: .4rem .7rem; }
.shop-title-aside .share-btn svg, .shop-title-aside .watch-btn-big .heart { width: 1rem; height: 1rem; }
/* Pasek działów (Produkty, Polecane, Wyprzedaż) równo z treścią i logo — tekst pierwszego odnośnika zaczyna się tam, gdzie logo. */
.shop-subnav { padding-inline: calc(clamp(1rem, 3vw, 2rem) - .9rem); }
@media (min-width: 1800px) {
  .shop-subnav { padding-inline: calc((100% - 1560px) / 2 + 2rem - .9rem); }
}
@media (min-width: 2400px) {
  .shop-subnav { padding-inline: calc((100% - 1880px) / 2 + 2rem - .9rem); }
}

/* ---- v51: opinie klientów (sklep i panel), grupy konta jako checkboxy ---- */
.stars { display: inline-block; color: var(--accent); letter-spacing: .08em; font-size: 1.05rem; line-height: 1; white-space: nowrap; }
.stars-off { color: color-mix(in srgb, var(--muted) 45%, transparent); }
:root[data-theme="light"] .stars { color: #d9a400; }
.review-summary { display: inline-flex; align-items: center; gap: .4rem; }
.review-line a { color: inherit; text-decoration: none; }
.review-line a:hover { text-decoration: underline; }
.review-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: .9rem; }
.review { padding: .9rem 1.05rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin-bottom: .45rem; }
.review-author { font-size: 1rem; }
.review-body { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.review .small { margin: .5rem 0 0; }
.review-write > summary { display: inline-flex; list-style: none; cursor: pointer; }
.review-write > summary::-webkit-details-marker { display: none; }
.review-write[open] > summary { margin-bottom: 1rem; }
.review-form { max-width: 44rem; }
.review-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.star-input { border: 0; margin: 0; padding: 0; display: flex; flex-direction: row-reverse; justify-content: flex-end; flex-wrap: wrap; gap: .1rem; }
.star-input legend { float: left; width: 100%; margin-bottom: .35rem; font-weight: 600; font-size: .9375rem; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 2rem; line-height: 1; cursor: pointer; color: color-mix(in srgb, var(--muted) 45%, transparent); padding: 0 .1rem; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--accent); }
:root[data-theme="light"] .star-input input:checked ~ label, :root[data-theme="light"] .star-input label:hover, :root[data-theme="light"] .star-input label:hover ~ label { color: #d9a400; }
.star-input input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.review-cta { margin: -.25rem 0 1.5rem; }
.rv-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.rv { display: flex; flex-direction: column; gap: .35rem; border-left: 4px solid var(--line); }
.rv-pending { border-left-color: var(--accent); }
.rv-approved { border-left-color: var(--ok); }
.rv-rejected { border-left-color: var(--out); }
.rv-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; }
.rv p { margin: 0; }
.rv-body { line-height: 1.55; overflow-wrap: anywhere; }
.rv-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.rv-actions form { margin: 0; }
.group-checks { gap: .6rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--r-s); }
.group-checks legend { padding: 0 .4rem; }
.group-checks label.check { align-items: flex-start; }
.group-checks label.check.is-disabled { opacity: .5; }
.group-checks .opt { font-weight: 400; }
.discount-state { margin: 0 0 .9rem; padding: .55rem .8rem; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--paper); }
.discount-state.is-active { border-color: color-mix(in srgb, var(--ok) 60%, var(--line)); background: var(--in-bg); color: var(--ok); }
.discount-state.is-planned { border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); background: color-mix(in srgb, var(--accent) 16%, var(--paper)); }
.discount-state.is-ended { color: var(--muted); }
.promo-until { font-weight: 600; }
.group-checks input { flex: none; }

/* ---- Konta klientów sklepu: logowanie, rejestracja, Moje konto ---- */
.cust-wrap { max-width: 34rem; margin: 0 auto; }
.cust-wrap.cust-wide { max-width: 60rem; }
.cust-card { margin-bottom: 1.25rem; }
.cust-card h2 { margin-top: 0; font-size: 1.15rem; }
.cust-note { margin-bottom: 1.25rem; }
.cust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem; }
.cust-captcha { margin: .25rem 0 .75rem; min-height: 65px; }
.cust-danger { margin-top: 1rem; }
.cust-danger summary { cursor: pointer; }
.form label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.form label.check input { width: auto; margin-top: .2rem; flex: none; }
.review-login { margin: 1rem 0; }

/* ---- Pasek sklepu: sama ikona aplikacji tuż przed przełącznikiem motywu ---- */
.shop-app-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border: 1px solid rgba(236, 238, 233, .25); border-radius: 50%; color: inherit; text-decoration: none; font-size: 1rem; line-height: 1; opacity: .8; }
.shop-app-icon:hover, .shop-app-icon[aria-current="page"] { opacity: 1; border-color: var(--tape); }
.shop-app-icon:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---- Logowanie i rejestracja klienta: duży przycisk na środku, wyraźne drugie wyjście ---- */
.cust-submit { display: block; width: 100%; max-width: 20rem; margin: .5rem auto 0; padding: .8rem 1.25rem; font-size: 1.05rem; }
.cust-forgot { margin: .9rem 0 0; text-align: center; }
.cust-forgot a { font-weight: 600; }
.cust-card .or-sep { margin: 1.25rem 0 .9rem; text-align: center; }
.cust-alt { display: block; width: 100%; max-width: 20rem; margin: 0 auto; padding: .7rem 1.25rem; text-align: center; border-color: var(--accent); color: var(--accent); font-weight: 700; }
.cust-alt:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
:root[data-theme="light"] .cust-alt { color: #8a6700; border-color: #8a6700; }

/* ---- v51: opinie z edycją, usuwanie konta klienta ---- */
.cust-reviews .review { gap: .5rem; }
.cust-edit { margin-top: .6rem; }
.cust-edit .review-form { margin-top: .6rem; }
.rv-diff { border-left: 4px solid var(--line); padding: .35rem .75rem; border-radius: 6px; background: color-mix(in srgb, var(--line) 30%, transparent); margin-top: .35rem; }
.rv-diff p { margin: .2rem 0; }
.rv-diff-new { border-left-color: var(--accent); }
.rv-diff-old { opacity: .85; }
.rv-diff-label { font-weight: 700; font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; }
.cust-delete { border: 2px solid var(--out); }
.cust-delete h2 { color: var(--out); }
.cust-delete-actions { display: flex; justify-content: flex-end; margin-top: .75rem; }
.cust-delete-btn { font-size: 1.0625rem; font-weight: 800; letter-spacing: .03em; padding: .8rem 1.6rem; }
.cust-archive { margin-top: 1.5rem; }

/* ---- v52: porównanie opinii Stare / Nowe ---- */
.rv-compare { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .5rem 0; }
.rv-box { border: 2px solid var(--line); border-radius: 10px; padding: .6rem .85rem; min-width: 0; }
.rv-box p { margin: .25rem 0; }
.rv-box-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-bottom: .2rem; }
.rv-box-tag { font-weight: 800; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; padding: .1rem .55rem; border-radius: 999px; }
.rv-box-old { border-color: color-mix(in srgb, var(--out) 55%, var(--line)); background: color-mix(in srgb, var(--out) 7%, transparent); }
.rv-box-old .rv-box-tag { background: color-mix(in srgb, var(--out) 22%, transparent); color: var(--out); }
.rv-box-old .rv-body, .rv-box-old p.pre { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--out) 55%, transparent); opacity: .85; }
.rv-box-new { border-color: color-mix(in srgb, var(--ok, #3fb950) 60%, var(--line)); background: color-mix(in srgb, var(--ok, #3fb950) 8%, transparent); }
.rv-box-new .rv-box-tag { background: color-mix(in srgb, var(--ok, #3fb950) 25%, transparent); color: var(--ok, #3fb950); }
@media (max-width: 640px) { .rv-compare { grid-template-columns: 1fr; } }

/* ---- v53: grupy klientów (kolor, rabat), kody rabatowe ---- */
.tier-dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--tier, var(--muted)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tier, var(--muted)) 35%, transparent); flex: none; }
.tier-chip { display: inline-flex; align-items: center; gap: .4em; font-size: .8125rem; font-weight: 700; padding: .1rem .6rem; border-radius: 999px; border: 1px solid var(--tier, var(--muted)); background: color-mix(in srgb, var(--tier, var(--muted)) 16%, transparent); color: var(--text); white-space: nowrap; }
.review-tier { border-left: 4px solid var(--tier); }
.review-head .tier-chip { margin-left: .5rem; }
.shop-app-link .tier-dot { margin: 0 .1rem 0 -.1rem; }
.member-price { display: flex; align-items: center; gap: .45em; margin-top: .3rem; padding: .25rem .6rem; border-radius: 8px; font-size: .875rem; background: color-mix(in srgb, var(--tier, var(--muted)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tier, var(--muted)) 55%, var(--line)); }
.member-price strong { font-size: 1.05rem; }
.cust-tier-card p { margin: 0; }
.cust-code-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .35rem; }
.cust-code-row input { flex: 1 1 14rem; }
.cust-vouchers { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .4rem; }
.cust-voucher { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; padding: .45rem .75rem; border: 1px dashed var(--line); border-radius: 8px; }
.cust-voucher-active { border-color: var(--accent); }
.cust-voucher-used, .cust-voucher-expired, .cust-voucher-exhausted, .cust-voucher-off { opacity: .6; }
.voucher-code { font-weight: 700; letter-spacing: .04em; }
.voucher-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.voucher-value { font-size: 1.15rem; color: var(--accent); }
.voucher { border-left: 4px solid var(--accent); }
.voucher-off, .voucher-expired, .voucher-exhausted { border-left-color: var(--line); opacity: .8; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .75rem; }
.grid-2 input[type="color"] { max-width: 6rem; height: 2.6rem; padding: .15rem; cursor: pointer; }
.title-actions { display: inline-flex; flex-wrap: wrap; gap: .5rem; }
.tiers-table td { vertical-align: middle; }
.tiers-table input[type="text"], .tiers-table input:not([type]) { min-width: 11rem; }
.tier-pct { width: 5.5rem; }
.tiers-table input[type="color"] { width: 4.5rem; max-width: 4.5rem; height: 2.4rem; padding: .15rem; cursor: pointer; }
/* ---- v54: ruch na stronie (mapa ścieżek) ---- */
.traffic-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.tstat { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem; display: flex; flex-direction: column; }
.tstat strong { font-size: 1.6rem; color: var(--accent); }
.tstat span { color: var(--muted); font-size: .8125rem; }
.traffic-tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.traffic-tops ol { margin: .4rem 0 0; padding-left: 1.2rem; }
.visits { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.visit { border-left: 4px solid var(--line); }
.visit-customer { border-left-color: #4aa3ff; }
.visit-staff, .visit-bot { opacity: .65; }
.visit-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.visit-meta { margin: .3rem 0 .5rem; }
.visit-path { list-style: none; margin: 0; padding: 0 0 0 .75rem; border-left: 2px dotted var(--line); display: grid; gap: .25rem; }
.visit-path li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.visit-path li::before { content: "↳"; color: var(--muted); margin-left: -1rem; }
.pager { display: flex; gap: .75rem; align-items: center; justify-content: center; margin: 1.25rem 0; }

/* ---- v55: porządek na stronach Klienci, Rabaty klientów, Kody rabatowe ---- */
.admin-stack { display: grid; gap: 1rem; align-content: start; }
.admin-stack > * { margin-top: 0; margin-bottom: 0; }
.admin-stack > .panel + .panel, .admin-stack > ul > li + li { margin-top: 0; }
.admin-stack .rv-list { display: grid; gap: 1rem; }
.fld { display: flex; flex-direction: column; gap: .35rem; }
.fld > span { font-weight: 600; }
.fld > small { color: var(--muted); font-size: .8125rem; font-weight: 400; line-height: 1.35; }
.grid-2 { align-items: start; }
.cust-table td, .tiers-table td { vertical-align: middle; padding-top: .7rem; padding-bottom: .7rem; }
.cust-table .num, .tiers-table .num { text-align: center; white-space: nowrap; }
.cust-mail { word-break: break-all; font-weight: 600; }
.cust-name { color: var(--muted); font-size: .875rem; }
.cust-ok { color: var(--ok); font-weight: 600; }
.cust-dates { font-size: .875rem; line-height: 1.6; white-space: nowrap; }
.cust-table .grp-select { min-width: 10.5rem; width: auto; }
.col-actions { text-align: right; }
td.col-actions .rv-actions { justify-content: flex-end; margin-top: 0; }
.cust-table td.col-actions { min-width: 16rem; }
.tier-color { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.tier-note { display: block; margin-top: .25rem; }
.tiers-table input[type="color"] { margin: 0; }
.voucher .table-wrap { margin: .8rem 0; }
.voucher-head { margin-bottom: .25rem; }
.voucher .rv-actions { margin-top: .5rem; }
.cust-archive { margin-top: 0; }
.cust-table td:first-child { min-width: 15rem; }
.cust-mail { word-break: normal; overflow-wrap: anywhere; }

/* ---- v56: koszyk, zamówienia i rozmowa z klientem ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cart-add { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.cart-qty { width: 4.5rem; margin: 0; text-align: center; }
.cart-add-compact .cart-qty { width: 3.75rem; }
.cart-qty-form { display: flex; gap: .4rem; align-items: center; margin: 0; }
.shop-cart-row { margin: .9rem 0; }
.shop-cart-row .cart-add .btn { padding: .65rem 1.1rem; }
.cart-bad td { background: color-mix(in srgb, var(--out) 8%, transparent); }
.cart-warn { color: var(--out); font-weight: 600; font-size: .875rem; }
.cart-lines td { vertical-align: middle; }
.cart-voucher { margin: 0 0 .6rem; }
.ord-sep { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.ord-lines td, .ord-list td { vertical-align: middle; }
.ord-list .num, .ord-lines .num { text-align: right; white-space: nowrap; }
.ord-unread td { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.ord-chip { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8125rem; font-weight: 700; background: var(--surface-2, var(--line)); border: 1px solid var(--line); }
.ord-new { color: var(--accent); border-color: var(--accent); }
.ord-accepted, .ord-done { color: var(--ok); border-color: var(--ok); }
.ord-rejected, .ord-cancelled { color: var(--out); border-color: var(--out); }
.ord-totals { margin: 1rem 0 0; display: grid; gap: .35rem; }
.ord-totals > div { display: flex; justify-content: space-between; gap: 1rem; }
.ord-totals dt, .ord-totals dd { margin: 0; }
.ord-total { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .25rem; }
.ord-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.ord-thread { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; max-height: 32rem; overflow-y: auto; }
.ord-msg { display: flex; }
.ord-msg-mine { justify-content: flex-end; }
.ord-bubble { max-width: 85%; padding: .55rem .8rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.ord-msg-mine .ord-bubble { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.ord-bubble p { margin: 0; }
.ord-author { font-size: .8125rem; font-weight: 700; color: var(--muted); }
.ord-body { overflow-wrap: anywhere; }
.ord-msg-system { justify-content: center; text-align: center; flex-direction: column; align-items: center; font-size: .875rem; color: var(--muted); }
.ord-reply textarea { width: 100%; }
.ord-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 900px) { .ord-layout { grid-template-columns: 1fr; } .ord-bubble { max-width: 95%; } }
.ord-layout form[action*="anuluj"] { margin-top: 1rem; }

/* ---- v57: tabela wariantów w sklepie nie wychodzi poza ekran (zawijanie zamiast przewijania w bok) ---- */
.shop-variants td { white-space: normal; }
.shop-variants td.col-cart { white-space: nowrap; width: 1%; }
.shop-variants .member-price { white-space: normal; }
@media (max-width: 820px) {
  .shop-variants thead { display: none; }
  .shop-variants, .shop-variants tbody { display: block; }
  .shop-variants tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .shop-variants tr:last-child { border-bottom: 0; }
  .shop-variants td { display: block; padding: 0; border: 0; }
  .shop-variants td:last-child { grid-column: 1 / -1; }
  .shop-variants td.num { text-align: right; }
}

/* ---- v58: filtr listy zamówień w panelu ---- */
.ord-filters { margin-bottom: 0; }
@media (max-width: 700px) {
  .ord-list thead { display: none; }
  .ord-list, .ord-list tbody { display: block; }
  .ord-list tr { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .ord-list tr:last-child { border-bottom: 0; }
  .ord-list td { display: block; padding: 0; border: 0; white-space: normal; min-width: 0; }
  .ord-list .c-nr { order: 1; font-size: 1.0625rem; }
  .ord-list .c-status { order: 2; }
  .ord-list .c-sum { order: 3; margin-left: auto; font-weight: 700; }
  .ord-list .c-client { order: 4; flex: 1 1 100%; }
  .ord-list .c-date { order: 5; }
  .ord-list .c-n { display: none; }
  .ord-list .c-act { order: 6; margin-left: auto; min-width: 0; }
  .cust-mail { word-break: normal; overflow-wrap: anywhere; }
  .ord-list tr { padding-left: .6rem; padding-right: .6rem; }
  .ord-list tr.ord-unread { background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: var(--r-s); }
  .ord-list tr.ord-unread td { background: none; }
}
@media (max-width: 900px) { .ord-layout { margin-top: .75rem; } }

/* ---- v59: strona zamówienia w panelu: nagłówek i przyciski akcji ---- */
.ord-head { margin-bottom: 1rem; align-items: center; }
.ord-head h1 { margin: 0; }
.ord-actions { display: grid; gap: .6rem; }
.ord-actions .ord-send { width: 100%; justify-content: center; }
.ord-statuses { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .5rem; }
.ord-statuses .btn { width: 100%; justify-content: center; white-space: nowrap; }
@media (max-width: 900px) { .ord-layout .ord-chat { order: -1; } }

/* ---- v60: Rozliczenia Polkurier, wybór nadań do rozliczenia z sumą na żywo ---- */
.settle-bar { position: sticky; top: .5rem; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin: .75rem 0; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r-m); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.settle-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.settle-sum > span { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.settle-sum strong { font-size: 1.6rem; color: var(--accent); }
.settle-sum small { color: var(--muted); }
.settle-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.settle-table td.c-check { width: 2.5rem; text-align: center; }
.settle-table input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin: 0; cursor: pointer; }
.settle-table tr[data-settle-row] { cursor: pointer; }
.settle-table tr.is-picked td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (max-width: 560px) {
  .settle-sum strong { font-size: 1.4rem; }
  .settle-table thead { display: none; }
  .settle-table, .settle-table tbody { display: block; }
  .settle-table tr[data-settle-row] { display: flex; align-items: center; gap: .3rem .75rem; padding: .65rem .4rem; border-bottom: 1px solid var(--line); }
  .settle-table td { display: block; padding: 0; border: 0; white-space: normal; }
  .settle-table td:nth-child(3), .settle-table td:nth-child(4), .settle-table tr:not(.settle-extra) td:nth-child(6) { display: none; }
  .settle-table td:nth-child(2) { flex: 1 1 0; min-width: 0; }
  .settle-table td.num { flex: 0 0 auto; text-align: right; }
  .settle-table .settle-note-m { display: block; }
  .settle-table tr.is-picked { background: color-mix(in srgb, var(--accent) 12%, transparent); }
  .settle-table tr.is-picked td { background: none; }
}
.settle-note-m { display: none; }

/* ---- v61: własne wpisy do rozliczenia ---- */
.settle-add { margin: .5rem 0 .75rem; }
.settle-add > summary { display: inline-flex; cursor: pointer; list-style: none; }
.settle-add > summary::-webkit-details-marker { display: none; }
.settle-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; align-items: end; margin-top: .75rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2, transparent); }
.settle-form .settle-note { grid-column: 1 / 3; }
.settle-form .actions { margin: 0; }
.settle-table tr.settle-extra td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 700px) { .settle-form { grid-template-columns: 1fr; } .settle-form .settle-note { grid-column: auto; } }

/* ---- v62: sekcja Rozliczone ---- */
.settle-actions form { margin: 0; }
.settled-batch { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.settled-batch:first-of-type { border-top: 0; margin-top: .5rem; padding-top: 0; }
.settled-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
.settled-sum { margin-left: auto; color: var(--accent); font-size: 1.15rem; }

/* ---- v63: kopie automatyczne i OneDrive ---- */
.bk-nocna { background: color-mix(in srgb, #7a8cff 16%, var(--surface)); color: #9aa8ff; }
.auto-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.auto-card { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.auto-card h3 { margin: 0 0 .5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.auto-facts { margin: .75rem 0; display: grid; gap: .35rem; }
.auto-facts > div { display: flex; justify-content: space-between; gap: 1rem; }
.auto-facts dt { color: var(--muted); }
.auto-facts dd { margin: 0; text-align: right; }
.auto-steps { margin: .5rem 0 0; padding-left: 1.25rem; display: grid; gap: .5rem; font-size: .9375rem; }
.auto-code { font-size: 2rem; font-weight: 800; letter-spacing: .25em; text-align: center; padding: .75rem; border: 2px dashed var(--accent); border-radius: var(--r-m); color: var(--accent); font-family: ui-monospace, monospace; }
.auto-form { margin-top: .75rem; }
@media (max-width: 900px) { .auto-grid { grid-template-columns: 1fr; } }
.auto-trouble { margin: .75rem 0; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: var(--r-m); }
.auto-trouble > summary { cursor: pointer; font-weight: 600; }
.auto-trouble p { margin: .6rem 0 0; }
.auto-url { word-break: break-all; }
.auto-grid .auto-card .fld { margin-bottom: .6rem; }
.auto-grid { display: block; column-count: 2; column-gap: 1rem; }
.auto-grid > .auto-card { break-inside: avoid; margin-bottom: 1rem; }
@media (max-width: 900px) { .auto-grid { column-count: 1; } }

/* ---- v64: historia zamówień klienta ---- */
.ord-tabs { display: flex; gap: .5rem; margin: 0 0 .75rem; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.ord-list .c-act { white-space: normal; }
.ord-list .c-act > * { margin-left: .25rem; }

/* ---- v65: strony błędów ---- */
.err-page { max-width: 36rem; margin: 3rem auto; padding: 0 1rem; text-align: center; }
.err-icon { font-size: 3.5rem; line-height: 1; }
.err-code { margin: .25rem 0 0; font-size: clamp(4rem, 14vw, 6.5rem); font-weight: 800; font-stretch: 75%; line-height: 1; color: var(--accent); letter-spacing: .02em; }

.err-page h1 { margin: .5rem 0 .25rem; font-size: clamp(1.4rem, 4vw, 1.9rem); font-stretch: 75%; }
.err-page p.muted { margin: 0 auto; max-width: 28rem; }
.err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.5rem; }
:root[data-theme="light"] .err-code { color: #8a6700; }
.err-switch { display: flex; align-items: center; gap: .75rem; justify-content: space-between; }
.err-switch .site-switch { flex: 1; }
.err-preview { margin-bottom: 0; }

/* ---- v66: kod QR sklepu ---- */
.qr-targets { margin-bottom: 1rem; }
.qr-box { width: min(100%, 22rem); margin: 0 auto; padding: 1rem; background: #fff; border-radius: var(--r-m); border: 1px solid var(--line); }
.qr-box svg { display: block; width: 100%; height: auto; fill: #000; }
.qr-url { text-align: center; margin: .75rem 0 0; word-break: break-all; }
.qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1rem; }

/* ---- v67: klucze API ---- */
.api-token { display: block; padding: .75rem 1rem; border: 1px dashed var(--accent); border-radius: var(--r-m); background: var(--surface); word-break: break-all; font-size: 1rem; user-select: all; }
.api-example { overflow-x: auto; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-size: .8125rem; }
.api-new { border-color: var(--accent); }
.badge { display: inline-block; padding: 0 .4rem; border: 1px solid var(--line); border-radius: 999px; font-size: .6875rem; white-space: nowrap; }
form.inline { display: inline; margin: 0; }
.api-form { display: grid; gap: 1.1rem; }
.api-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .9rem; }
.api-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.api-fs legend { padding: 0; margin-bottom: .55rem; font-weight: 600; }
.api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .55rem; }
.api-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.api-table th, .api-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.api-table th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.api-table td.col-actions > div { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.api-table code { white-space: nowrap; }
@media (max-width: 700px) {
  .api-table, .api-table thead, .api-table tbody, .api-table tr, .api-table td { display: block; }
  .api-table thead { display: none; }
  .api-table tr { border: 1px solid var(--line); border-radius: var(--r-s); padding: .5rem .6rem; margin-bottom: .75rem; }
  .api-table td { border: 0; padding: .2rem 0; }
  .api-table td.col-actions > div { justify-content: flex-start; margin-top: .4rem; }
  .api-table code { white-space: normal; word-break: break-all; }
}
.api-grid .perm-row:not(:has(small)) { align-items: center; }

/* ---- v68: kopie — rodzaje i miejsce przechowywania ---- */
.bk-wgrana { background: color-mix(in srgb, var(--muted) 18%, var(--surface)); }
.bk-srv { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.bk-nas { background: color-mix(in srgb, var(--focus) 18%, var(--surface)); color: var(--focus); }
.bk-nonas { background: transparent; color: var(--muted); border: 1px dashed var(--line); font-weight: 400; }
.where { white-space: nowrap; }
.where .bk + .bk { margin-left: .25rem; }
.nas-files-h { margin: 1rem 0 .4rem; }
.nas-files { font-size: .8125rem; }
.ret-box { margin: .9rem 0; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--r-m); }
.ret-box > summary { cursor: pointer; font-weight: 600; }
.ret-form { margin-top: .75rem; }
.ret-form input[type=number] { max-width: 8rem; }
.dest-box { margin: .75rem 0; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--r-m); display: grid; gap: .45rem; }
.dest-box legend { padding: 0 .35rem; font-weight: 600; }
.dest-box .check { margin: 0; }
.nas-only td { opacity: .85; }
.nas-only .bk-file { word-break: break-all; }
.refresh-nas { display: flex; align-items: center; gap: .75rem; margin-top: .75rem; }
.ret-h { margin: 1.1rem 0 .4rem; }
.ret-box { border: 0; padding: 0; border-top: 1px solid var(--line); margin-top: 1rem; }
.backups td.right { min-width: 15rem; }
.backups .right-actions { flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }

/* ---- v70: powiadomienia (dzwonek, alerty, lista, dymki) ---- */
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; color: var(--ink); text-decoration: none; }
.bell:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.bell svg { width: 1.2rem; height: 1.2rem; }
.bell-badge { position: absolute; top: -.1rem; right: -.15rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .6875rem; font-weight: 800; line-height: 1.1rem; text-align: center; }
.bell-red { color: #ff6b5b; }
.bell-red .bell-badge { background: #e5392a; color: #fff; }
.bell-red svg { animation: bell-ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bell-ring { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(14deg); } 94% { transform: rotate(-12deg); } 97% { transform: rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .bell-red svg { animation: none; } }
.alert-bar { display: grid; gap: 0; }
.alert-item { display: block; padding: .5rem 1rem; font-weight: 600; text-decoration: none; color: #fff; text-align: center; }
.alert-danger { background: #c62f21; }
.alert-warn { background: #b86e00; }
.alert-item:hover { filter: brightness(1.1); }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.notif-item a { display: grid; gap: .1rem; padding: .6rem .8rem; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--r-s); text-decoration: none; color: var(--ink); background: var(--surface); }
.notif-item a:hover { border-color: var(--accent); }
.notif-warn a { border-left-color: #e0a800; }
.notif-danger a { border-left-color: #e5392a; background: color-mix(in srgb, #e5392a 8%, var(--surface)); }
.notif-unread a { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.notif-alerts { margin-bottom: 1rem; border-color: #e5392a; }
.push-bad { color: #ff7b6b; }
.toasts { position: fixed; right: 1rem; bottom: 4.5rem; z-index: 60; display: grid; gap: .5rem; max-width: min(24rem, calc(100vw - 2rem)); }
.toast { display: grid; gap: .15rem; padding: .7rem .9rem; border-radius: var(--r-m); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 5px solid var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.35); text-decoration: none; }
.toast-danger { border-left-color: #e5392a; }
.toast-warn { border-left-color: #e0a800; }
.st-OC { background: #e0a800; color: #1c2630; font-weight: 700; }
.ship-card { margin: .6rem 0 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.ship-card-problem { border-color: #e5392a; }
.ship-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.ship-note { margin: .6rem 0; padding: .5rem .7rem; border-radius: var(--r-s); background: color-mix(in srgb, var(--focus) 12%, var(--surface)); }
.ship-note-problem { background: color-mix(in srgb, #e5392a 18%, var(--surface)); }
.ship-kv { margin: .6rem 0; display: grid; gap: .3rem; }
.ship-kv > div { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; }
.ship-kv dt { color: var(--muted); min-width: 9rem; }
.ship-kv dd { margin: 0; }
.ship-no { font-size: 1.05rem; font-weight: 700; word-break: break-all; }
.ship-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.ship-box h2 { margin: .25rem 0; }
.ship-assign { margin-top: .75rem; }
.ship-assign select { max-width: 100%; }
.alert-item { padding: .4rem 1rem; }
.notif-item a > .sec-badge { justify-self: start; }
.cust-no { white-space: nowrap; font-weight: 700; color: var(--accent); }
.ship-h3 { margin: .9rem 0 .3rem; font-size: 1rem; }
.ship-account { margin: .5rem 0; align-items: flex-start; }
.ship-account small { display: block; }
.copy-row .btn { white-space: nowrap; }
.lead-note { margin: .25rem 0 .75rem; color: var(--muted); }

/* Kopie zapasowe: zaznaczanie wielu */
.backups .bk-sel { width: 2rem; text-align: center; }
.backups .bk-sel input { width: 1.1rem; height: 1.1rem; cursor: pointer; accent-color: var(--accent); }
.bk-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .8rem; padding: .6rem .8rem; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; }
.bk-bulk[hidden] { display: none; }
.bk-bulk form { margin: 0; }
@media (max-width: 720px) {
  .backups td.bk-sel { flex-basis: auto; }
}

/* Akcje zbiorcze (bulk.js): pole wyboru w wierszu i pływający pasek */
.bulk-bar { position: sticky; bottom: .8rem; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: 1rem 0; padding: .6rem .8rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
.bulk-bar[hidden] { display: none; }
.bulk-pick, .bulk-all { width: 1.15rem; height: 1.15rem; cursor: pointer; accent-color: var(--accent); }
.bulk-check { display: inline-flex; align-items: center; gap: .4rem; }
.pcard { position: relative; }
.pcard > .bulk-check { position: absolute; top: .5rem; left: .5rem; z-index: 5; padding: .25rem; background: var(--bg); border-radius: 6px; opacity: .9; }
[data-bulk-row].is-picked { outline: 2px solid var(--accent); outline-offset: -2px; }
.bulk-selectall { margin: .5rem 0; }
.note-head > .bulk-pick { flex: none; margin-top: .35rem; }
.note-head > .bulk-pick + div { flex: 1; min-width: 0; }
.todo > .bulk-pick, .content-row > .bulk-pick, .rv-head > .bulk-pick { flex: none; }
.todo > .bulk-pick { margin-top: .2rem; }

/* Siatka stanów i akcje przy wariantach */
.grid-table th, .grid-table td { white-space: nowrap; }
.grid-table th[scope=row] { text-align: left; }
.grid-table input[type=number] { width: 5rem; text-align: right; }
.grid-table input.grid-new { opacity: .7; border-style: dashed; }
.grid-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; margin-bottom: 1rem; }
.variants .bk-sel { width: 2rem; text-align: center; }

/* Notatki przy pozycjach rozliczeń */
.settle-notebox { margin-top: .25rem; }
.settle-notebox summary { cursor: pointer; }
.settle-noteform { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.settle-noteform input { flex: 1; min-width: 12rem; }
.settle-note-m { color: var(--accent); font-size: .875rem; font-style: italic; }

/* Menu języka sklepu (rozwijane, z flagą) */
.lang-menu { position: relative; display: inline-block; }
.lang-menu summary { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .55rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink); font-size: .8125rem; font-weight: 600; cursor: pointer; list-style: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--accent); }
.lang-menu .chev { width: .8rem; height: .8rem; }
.lang-panel { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 60; min-width: 10.5rem; display: flex; flex-direction: column; padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.lang-panel a { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-size: .9375rem; }
.lang-panel a:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.lang-panel a[aria-current] { font-weight: 700; background: color-mix(in srgb, var(--accent) 28%, transparent); }
.lang-menu.lang-foot .lang-panel { top: auto; bottom: calc(100% + .3rem); right: auto; left: 0; }
@media (max-width: 640px) { .lang-menu.lang-top .lang-code { display: none; } }

/* PDF przy notatkach i zadaniach */
.ne-pdfs { display: flex; flex-direction: column; gap: .35rem; margin: .5rem 0; }
.ne-pdf-add { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; cursor: pointer; }
.ne-pdf-old { color: var(--muted); }
.pdf-list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.pdf-list a { font-weight: 600; }

/* Panel języków */
.lang-table td { vertical-align: top; }
.lang-table input, .lang-table textarea { width: 100%; min-width: 11rem; }
.lang-table .lang-src { min-width: 14rem; max-width: 26rem; white-space: normal; }
.lang-table .is-empty { border-style: dashed; }
.lang-own { display: block; margin-top: .15rem; }
.pager { display: flex; align-items: center; gap: .8rem; justify-content: center; margin: 1rem 0; }
.imp-bar { position: sticky; top: 0; z-index: 60; display: flex; gap: .8rem; align-items: center; justify-content: center; flex-wrap: wrap; padding: .4rem 1rem; background: #b3261e; color: #fff; font-size: .9rem; }
.imp-bar form { margin: 0; }
