/* ═══════════════════════════════════════════════════════════════════
   Systemia UI Kit — components.css
   Komponenty wielokrotnego użytku. Wymaga tokens.css.
   Zasada: ZERO stylów inline w HTML (CSP bez unsafe-inline) — wszystko,
   co w draftach było w style="", ma tu klasę (sekcja „utilities" na dole).
   Zachowania: public/js/kit.js (API i markup — patrz KIT.md).
   ═══════════════════════════════════════════════════════════════════ */

/* ── Pasek aplikacji ─────────────────────────────────────────────── */
.appbar {
    position: sticky; top: 0; z-index: 30;
    background: var(--card); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; box-shadow: var(--shadow);
}
.appbar .logo { height: 34px; flex: 0 0 auto; display: block; }
.appbar .t { flex: 1; min-width: 0; }
.appbar .t h1 { font-size: 16px; font-weight: 700; margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .t .sub { font-size: 11px; color: var(--muted); margin: 0; }

/* ── Układ strony ────────────────────────────────────────────────── */
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 12px 24px; }
.sec-label {
    font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--muted); margin: 22px 2px 8px;
}
.sec-label:first-child { margin-top: 2px; }

/* ── Karty ───────────────────────────────────────────────────────── */
.card {
    background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--red);
    border-radius: var(--r-card); box-shadow: var(--shadow);
    padding: 16px 16px 18px; margin: 0 0 14px;
}
.card.plain { border-top: 1px solid var(--line); }
.card-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.card-h h2 { font-size: 16px; font-weight: 700; margin: 0; flex: 1; }
.card-h .ic { color: var(--red); flex: 0 0 auto; display: flex; }

/* ── Pola formularza ─────────────────────────────────────────────── */
.field { margin: 0 0 14px; }
.field:last-child { margin-bottom: 0; }
.field > label {
    display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--muted); margin: 0 0 5px;
}
.help { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.err-msg { font-size: 12px; color: var(--err); font-weight: 700; margin: 4px 0 0; }

.input, .textarea, select.input {
    width: 100%; min-height: var(--touch); padding: 10px 12px;
    font: inherit; color: var(--ink);
    background: var(--card); border: 1px solid var(--ctl-border); border-radius: var(--r-ctl);
}
.input:focus, .textarea:focus { border-color: var(--red); outline: none; box-shadow: var(--focus-ring); }
.field.invalid .input, .field.invalid .textarea { border-color: var(--err); background: #fffafa; }
.input:disabled, .textarea:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.textarea { min-height: 96px; resize: vertical; }
.counter { font-size: 11px; color: var(--muted); text-align: right; margin-top: 3px; }

/* select natywny w opakowaniu ze strzałką */
.selectwrap { position: relative; }
.selectwrap select { appearance: none; -webkit-appearance: none; padding-right: 38px; }
.selectwrap::after {
    content: ""; position: absolute; right: 14px; top: 50%;
    width: 8px; height: 8px; margin-top: -6px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); pointer-events: none;
}

/* wyszukiwarka z ikoną */
.searchwrap { position: relative; }
.searchwrap .input { padding-left: 38px; }
.searchwrap .sic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }

/* combobox z filtrem — kit.js: [data-combo] + data-options */
.combo { position: relative; }
.combo-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ctl);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    max-height: 210px; overflow: auto; display: none;
}
.combo.open .combo-list { display: block; }
.combo-list button {
    display: block; width: 100%; text-align: left; padding: 11px 12px;
    font: inherit; background: none; border: 0; border-bottom: 1px solid var(--bg);
    cursor: pointer; color: var(--ink);
}
.combo-list button:hover { background: var(--err-bg); }
.combo-list .none { padding: 11px 12px; color: var(--muted); font-size: 13px; }

/* chipsy / multiselect — kit.js: [data-chips] */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    border: 1px solid var(--ctl-border); background: var(--card); border-radius: 999px;
    padding: 8px 14px; font: inherit; font-size: 13px; color: var(--ink);
    cursor: pointer; min-height: 36px;
}
.chip.on { border-color: var(--red); background: var(--err-bg); color: var(--red); font-weight: 700; }
.chip[disabled] { color: var(--muted); cursor: not-allowed; }

/* checkbox / radio / przełącznik */
.checkline { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; font-size: 15px; }
.checkline input { width: 22px; height: 22px; accent-color: var(--red); flex: 0 0 auto; margin: 1px 0 0; }
.switchline { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.switchline .lbl { flex: 1; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .tr { position: absolute; inset: 0; background: var(--ctl-border); border-radius: 999px; transition: background .15s; }
.switch .tr::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
    background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .15s;
}
.switch input:checked + .tr { background: var(--red); }
.switch input:checked + .tr::after { left: 23px; }
.switch input:disabled + .tr { opacity: .45; }

/* stepper — kit.js: [data-stepper] */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--ctl-border); border-radius: var(--r-ctl); overflow: hidden; }
.stepper button { width: var(--touch); height: var(--touch); border: 0; background: var(--bg); font-size: 20px; font-weight: 700; color: var(--ink); cursor: pointer; }
.stepper input { width: 56px; height: var(--touch); border: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Przyciski ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: var(--touch); padding: 10px 18px;
    border-radius: var(--r-ctl); border: 1px solid transparent;
    font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn-pri { background: var(--red); color: #fff; }
.btn-pri:hover { background: var(--red-dark); }
.btn-sec { background: var(--card); color: var(--red); border-color: var(--coral); }
.btn-sec:hover { background: var(--err-bg); }
.btn-ghost { background: none; color: var(--ink); border-color: var(--ctl-border); }
.btn-ghost:hover { background: var(--bg); }
.btn-del { background: var(--card); color: var(--err); border-color: var(--err); }
.btn-del:hover { background: var(--err-bg); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Plakietki i alerty ──────────────────────────────────────────── */
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.b-ok   { color: var(--ok);   background: var(--ok-bg);   border: 1px solid var(--ok-line); }
.b-warn { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.b-err  { color: var(--err);  background: var(--err-bg);  border: 1px solid var(--err-line); }
.b-mut  { color: var(--muted); background: var(--info-bg); border: 1px solid var(--info-line); }

.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-ctl); padding: 11px 13px; font-size: 14px; margin: 0 0 12px; border: 1px solid; }
.alert .ic { flex: 0 0 auto; margin-top: 1px; display: flex; }
.a-info { background: var(--info-bg); border-color: var(--info-line); color: var(--ink); }
.a-ok   { background: var(--ok-bg);   border-color: var(--ok-line);   color: var(--ok); }
.a-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.a-err  { background: var(--err-bg);  border-color: var(--err-line);  color: var(--err); }

/* ── Klucz → wartość ─────────────────────────────────────────────── */
.kv { margin: 0; }
.kv div { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--bg); font-size: 14px; }
.kv div:last-child { border-bottom: 0; }
.kv dt { flex: 0 0 128px; color: var(--muted); }
.kv dd { margin: 0; flex: 1; font-weight: 700; overflow-wrap: anywhere; }
.kv a { color: var(--red); }

/* ── Tabela → lista na telefonie ─────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--bg); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
    .tbl thead { display: none; }
    .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
    .tbl tr { border: 1px solid var(--line); border-radius: var(--r-ctl); margin: 0 0 8px; padding: 6px 10px; background: var(--card); }
    .tbl td { border: 0; padding: 3px 0; display: flex; gap: 10px; }
    .tbl td::before {
        content: attr(data-l); flex: 0 0 110px; color: var(--muted);
        font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding-top: 2px;
    }
}

/* ── Kalendarz: pasek dni ────────────────────────────────────────── */
.daystrip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; }
.day {
    flex: 0 0 auto; min-width: 52px; text-align: center;
    border: 1px solid var(--line); background: var(--card); border-radius: var(--r-ctl);
    padding: 7px 6px; cursor: pointer; font: inherit;
}
.day .dw { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.day .dn { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.day.today .dn { color: var(--red); }
.day.sel { background: var(--red); border-color: var(--red); }
.day.sel .dw, .day.sel .dn { color: #fff; }

/* ── Kalendarz miesięczny — kafelki (spójne z .day) ──────────────── */
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.mcal-h { text-align: center; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 2px 0; }
.mday {
    position: relative; font: inherit; font-size: 14px; font-weight: 700; min-height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ctl);
    color: var(--ink); cursor: pointer; padding: 0 0 4px;
}
.mday.out { background: none; border-color: transparent; color: #c2c2c2; font-weight: 400; }
.mday.has::after { content: ""; position: absolute; left: 26%; right: 26%; bottom: 5px; height: 3px; border-radius: 2px; background: var(--coral); }
.mday.today { border-color: var(--coral); color: var(--red); }
.mday.sel { background: var(--red); border-color: var(--red); color: #fff; }
.mday.sel::after { background: #fff; }

/* ── Datepicker i timepicker kitu — [data-datepick] / [data-timepick]
      (zamiast natywnych input[type=date|time], których popupy
      przeglądarki nie pasują do UI) ─────────────────────────────────── */
.datepick, .timepick { position: relative; }
.datepick > .input, .timepick > .input { padding-right: 46px; cursor: pointer; }
.dp-btn {
    position: absolute; right: 4px; top: 4px; width: 36px; height: 36px;
    border: 0; background: none; color: var(--muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center; border-radius: 6px;
}
.dp-btn:hover { color: var(--red); }
.dp-pop {
    position: absolute; z-index: 50; left: 0; top: calc(100% + 6px);
    width: 292px; max-width: 92vw;
    background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--red);
    border-radius: var(--r-card); box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    padding: 12px; display: none;
}
.dp-pop.flip { left: auto; right: 0; }
.datepick.open .dp-pop, .timepick.open .dp-pop { display: block; }
.dp-head { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.dp-title {
    flex: 1; text-align: center; font-weight: 700; font-size: 14px;
    border: 0; background: none; font-family: inherit; color: var(--ink);
    cursor: pointer; padding: 6px; border-radius: 6px;
}
.dp-title:hover:not([disabled]) { color: var(--red); }
.dp-title[disabled] { cursor: default; }
.dp-nav {
    width: 36px; height: 36px; border: 1px solid var(--line); background: var(--card);
    border-radius: var(--r-ctl); cursor: pointer; font: inherit; font-size: 15px;
    color: var(--ink); display: flex; align-items: center; justify-content: center;
}
.dp-nav:hover:not([disabled]) { border-color: var(--coral); color: var(--red); }
.dp-nav[disabled] { opacity: .35; cursor: default; }
.dp-pop .mcal { gap: 4px; }
.dp-pop .mday { min-height: 36px; font-size: 13px; }
.dp-grid { display: grid; gap: 4px; }
.dp-g3 { grid-template-columns: repeat(3, 1fr); }
.dp-g4 { grid-template-columns: repeat(4, 1fr); }
.dp-g6 { grid-template-columns: repeat(6, 1fr); }

/* ── Karta zlecenia na osi dnia ──────────────────────────────────── */
.evt {
    display: flex; gap: 12px; width: 100%; text-align: left; font: inherit;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
    box-shadow: var(--shadow); padding: 12px 14px; margin: 0 0 10px; cursor: pointer;
}
.evt .tm { flex: 0 0 58px; font-weight: 700; font-size: 13px; color: var(--red); line-height: 1.5; font-variant-numeric: tabular-nums; }
.evt .tm small { display: block; font-weight: 400; color: var(--muted); }
.evt .bd { flex: 1; min-width: 0; }
.evt .bd .ti { font-weight: 700; margin: 0 0 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.evt .bd .mt { font-size: 13px; color: var(--muted); margin: 0; }

/* ── Galeria zdjęć + lightbox — kit.js: [data-gallery] ───────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.ph { position: relative; aspect-ratio: 1; border-radius: var(--r-ctl); overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.ph .del {
    position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%;
    border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.addtile {
    aspect-ratio: 1; border: 2px dashed #c9c9c9; border-radius: var(--r-ctl);
    display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center;
    color: var(--muted); font-size: 11px; cursor: pointer; background: var(--card); text-align: center; padding: 4px;
}
.addtile:hover { border-color: var(--coral); color: var(--red); }
.addtile svg { color: var(--red); }
.lightbox {
    position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .88);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 86vh; border-radius: 6px; }
.lightbox .close { position: absolute; top: 14px; right: 14px; width: var(--touch); height: var(--touch); border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 22px; cursor: pointer; }

/* ── Wiersz pliku + pasek postępu — kit.js: [data-progress] ──────── */
.file-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 13px; margin: 0 0 8px; }
.file-row .fic { color: var(--red); display: flex; flex: 0 0 auto; }
.file-row .fmain { flex: 1; min-width: 0; }
.file-row .fn { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.file-row .fs { color: var(--muted); flex: 0 0 auto; }
.file-row .progress { margin-top: 5px; }
.progress { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--red); border-radius: 999px; }

/* ── Widget GPS — kit.js: SysUI.gps / [data-gps] ─────────────────── */
.gps { display: flex; align-items: center; gap: 10px; border: 1px dashed #c9c9c9; border-radius: var(--r-ctl); padding: 11px 13px; font-size: 13px; color: var(--muted); }
.gps.ok { border-style: solid; border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.gps.err { border-style: solid; border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.gps .ic { display: flex; flex: 0 0 auto; }
.gps b { font-variant-numeric: tabular-nums; }
.gps .spinner { width: 14px; height: 14px; border-width: 2px; margin-left: 6px; }

/* ── Toast i modal — kit.js: SysUI.toast / SysUI.confirm ─────────── */
.toast {
    position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%) translateY(12px); z-index: 80;
    background: var(--ink); color: #fff; font-size: 14px; padding: 11px 18px; border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
    max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); display: none; align-items: flex-end; justify-content: center; padding: 16px; }
.modal-bg.open { display: flex; }
@media (min-width: 560px) { .modal-bg { align-items: center; } }
.modal {
    background: var(--card); border-radius: 14px; border-top: 4px solid var(--red);
    max-width: 420px; width: 100%; padding: 20px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
.modal h3 { margin: 0 0 8px; font-size: 16px; }
.modal p { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.modal .btnrow { justify-content: flex-end; }

/* ── Zakładki i akordeon — kit.js: [data-tabs] ───────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--line); gap: 2px; margin: 0 0 14px; overflow-x: auto; }
.tabs button {
    font: inherit; font-weight: 700; font-size: 14px; background: none; border: 0;
    border-bottom: 3px solid transparent; padding: 10px 14px; color: var(--muted);
    cursor: pointer; margin-bottom: -2px; white-space: nowrap;
}
.tabs button.on { color: var(--red); border-bottom-color: var(--red); }
details.acc { border: 1px solid var(--line); border-radius: var(--r-ctl); margin: 0 0 8px; background: var(--card); }
details.acc summary { padding: 12px 14px; font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.acc summary::after {
    content: ""; width: 8px; height: 8px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); margin-left: auto; transition: transform .15s;
}
details.acc[open] summary::after { transform: rotate(-135deg); }
details.acc .acc-b { padding: 0 14px 12px; font-size: 14px; color: var(--muted); }

/* ── Ładowanie i stany puste ─────────────────────────────────────── */
.skel { background: linear-gradient(90deg, var(--bg) 25%, #ececec 45%, var(--bg) 65%); background-size: 200% 100%; animation: sysui-sk 1.2s infinite; border-radius: 6px; }
@keyframes sysui-sk { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: sysui-sp .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes sysui-sp { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 26px 14px; color: var(--muted); }
.empty svg { color: #c9c9c9; margin-bottom: 8px; }
.empty p { margin: 0; font-size: 14px; }

/* ── Konsola (transcript narzędzi) ───────────────────────────────── */
.console {
    background: #1d1f21; color: #c5c8c6; border-radius: var(--r-ctl); padding: 12px 14px;
    font: 12px/1.7 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre;
}
.console .g { color: #7cb342; } .console .y { color: #fdd835; } .console .r { color: #ef5350; }
.console .b { color: #64b5f6; } .console .d { color: #8a8d8f; }

/* ── OTP segmentowane — kit.js: [data-otp] ───────────────────────── */
.otp { display: flex; gap: 8px; justify-content: flex-start; }
.otp input { width: 44px; height: 52px; text-align: center; font: inherit; font-size: 22px; font-weight: 700; border: 1px solid var(--ctl-border); border-radius: var(--r-ctl); }
.otp input:focus { border-color: var(--red); outline: none; box-shadow: var(--focus-ring); }

/* ── Podpis palcem — kit.js: canvas.sig ──────────────────────────── */
.sig { border: 1px solid var(--ctl-border); border-radius: var(--r-ctl); background: #fff; touch-action: none; width: 100%; height: 150px; display: block; }

/* ── Kod QR — [data-qr] + qrcode.js ──────────────────────────────── */
.qr { display: flex; justify-content: center; padding: 10px 0; }
.qr canvas {
    width: 220px; max-width: 70vw; height: auto;
    image-rendering: pixelated;
    border: 1px solid var(--line); border-radius: var(--r-ctl);
}

/* ── Kafel-zapowiedź (placeholder przyszłej funkcji) ─────────────── */
.ph-tile { border: 2px dashed #c9c9c9; border-radius: var(--r-ctl); padding: 20px 14px; text-align: center; color: var(--muted); font-size: 13px; }
.ph-tile svg { color: #b5b5b5; margin-bottom: 6px; }

/* ── Wizard kroków ───────────────────────────────────────────────── */
.wiz { display: flex; align-items: center; gap: 0; margin: 0 0 6px; }
.wiz .st { flex: 1; text-align: center; position: relative; font-size: 11px; color: var(--muted); }
.wiz .st i {
    display: flex; width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid var(--line); background: var(--card); color: var(--muted);
    font-style: normal; font-weight: 700; align-items: center; justify-content: center;
    margin: 0 auto 4px; position: relative; z-index: 1;
}
.wiz .st::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.wiz .st:first-child::before { display: none; }
.wiz .st.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.wiz .st.cur i { border-color: var(--red); color: var(--red); }
.wiz .st.cur { color: var(--red); font-weight: 700; }

/* ── Dolna nawigacja ─────────────────────────────────────────────── */
.bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--card); border-top: 1px solid var(--line);
    display: flex; box-shadow: 0 -1px 6px rgba(0, 0, 0, .07);
    padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav button {
    flex: 1; font: inherit; background: none; border: 0; padding: 8px 2px 7px;
    cursor: pointer; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px;
}
.bottomnav button span { font-size: 10px; font-weight: 700; }
.bottomnav button.on { color: var(--red); }
body.has-bottomnav { padding-bottom: 76px; }

/* ── Utilities (zamiast style="" — wymóg CSP) ────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-2a { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.vsp { height: 12px; }
.u-mt8 { margin-top: 8px; }
.u-mt10 { margin-top: 10px; }
.u-mt14 { margin-top: 14px; }
.u-mb10 { margin-bottom: 10px; }
.u-mb12 { margin-bottom: 12px; }
.u-center { text-align: center; }
.u-fs14 { font-size: 14px; margin: 0 0 12px; }
