/* Tokeny i zasady: telefon-web/DESIGN.md. Biel + błękit + czerwień; zieleń tylko po pozytywnym wyniku. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/nowy/fonty/plex-sans-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20C0; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/nowy/fonty/plex-sans-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+25A0-25FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url("/nowy/fonty/plex-sans-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20C0; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url("/nowy/fonty/plex-sans-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+25A0-25FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/nowy/fonty/plex-mono-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20C0; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/nowy/fonty/plex-mono-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+25A0-25FF; }
@font-face { font-family: "Archivo Black"; font-weight: 400; font-display: swap; src: url("/nowy/fonty/archivo-black-400-latin.woff2") format("woff2"); }

:root {
  --ink: #17212b; --paper: #fff; --muted: #46535f; --rule: #c6ced4; --pale: #e4e8eb;
  --action: #1746a2; --done: #14633a; --stop: #d3201a; --on-color: #fff;
  --gap: 8px; --block: 12px; --screen: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.35 "IBM Plex Sans", system-ui, sans-serif; }
[hidden] { display: none !important; }
.ekran { max-width: 560px; margin: 0 auto; padding: var(--screen); display: flex; flex-direction: column; gap: var(--block); }
.ekran > section { display: flex; flex-direction: column; gap: var(--block); min-width: 0; }
h1 { margin: 0; font-size: 29px; line-height: 1.1; font-weight: 700; }
h2 { margin: 12px 0 0; font-size: 20px; line-height: 1.2; }
.dane { font: 400 12px/1.4 "IBM Plex Mono", monospace; color: var(--muted); overflow-wrap: anywhere; }
.wiersz { display: flex; justify-content: space-between; gap: var(--gap); align-items: center; }
.dwa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.dwa:not(:has(> :not([hidden]))) { display: none; }

button, input, select { font: inherit; }
button { min-height: 44px; border-radius: 10px; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.glowny { min-height: 60px; border: 0; background: var(--action); color: var(--on-color); font-weight: 700; font-size: 18px; }
.drugi { border: 2px solid var(--action); background: var(--paper); color: var(--action); font-weight: 700; }
.wybor { border: 2px solid var(--action); background: var(--paper); color: var(--action); font-weight: 700; }
.wybor[aria-pressed="true"] { background: var(--action); color: var(--on-color); }
.tekstowy { border: 0; background: none; color: var(--muted); text-decoration: underline; }
.stop { width: 100%; min-height: 68px; border: 0; border-radius: 14px; background: var(--stop); color: var(--on-color); font: 400 34px "Archivo Black", "IBM Plex Sans", sans-serif; }
.pasek-stop { position: sticky; top: 0; z-index: 5; margin: calc(var(--screen) * -1) calc(var(--screen) * -1) 0; padding: 8px var(--screen); background: var(--paper); }

.pola { display: flex; flex-direction: column; gap: var(--block); }
.pola label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
input, select, textarea { width: 100%; max-width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--muted); border-radius: 8px; background: var(--paper); color: var(--ink); font-weight: 400; }
input[type="checkbox"] { width: 22px; min-height: 22px; }

.komunikat { margin: 0; padding: 10px 12px; border-radius: 10px; font-weight: 700; overflow-wrap: anywhere; border: 1px solid var(--rule); }
.komunikat[data-klasa="ok"] { background: var(--done); border-color: var(--done); color: var(--on-color); }
.komunikat[data-klasa="blad"] { background: var(--paper); border: 2px solid var(--stop); color: var(--stop); }
/* Informacja dla osoby bez konta: ma być widać ją od razu, ale to nie błąd — stąd kolor akcji, nie czerwień. */
.bez-konta { margin: 0; padding: 12px 14px; border: 2px solid var(--action); border-radius: 10px; background: var(--pale); font-size: 17px; }
.bez-konta strong { display: block; color: var(--action); }
.miganie { margin: 0; padding: 2px 0 2px 10px; border-left: 4px solid var(--stop); font-size: 14px; }

.kroki { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--action); }
.kroki li { display: flex; gap: var(--block); padding: var(--block) 0; border-bottom: 1px solid var(--rule); }
.kroki li > span:last-child { min-width: 0; }
.kroki strong, .kroki small { display: block; }
.kroki small { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.znak { flex: 0 0 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--pale); color: var(--muted); }
[data-status="teraz"] .znak { background: var(--action); color: var(--on-color); }
[data-status="zrobione"] .znak { background: var(--done); color: var(--on-color); }

.klawisze { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 92px; gap: var(--gap); }
.klawisze button { border: 0; border-radius: 14px; background: var(--action); color: var(--on-color); font-size: 34px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.k-naprzod { grid-area: 1 / 2; } .k-lewo { grid-area: 2 / 1; } .k-prawo { grid-area: 2 / 3; } .k-tyl { grid-area: 3 / 2; }
.podpowiedz { grid-area: 2 / 2; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: 14px; line-height: 1.15; }

.ilustracja-blokady { margin: 0; padding: 8px; border: 2px solid var(--stop); border-radius: 10px; }
.ilustracja-blokady img { display: block; width: 100%; height: auto; }
.ilustracja-blokady figcaption { margin-top: 6px; font-size: 14px; }
.scena-blokady { position: relative; }
.krok-blokady { display: none; }

/* Panel administratora */
.naglowek-admina { padding: 7px 10px; border-radius: 8px; background: var(--action); color: var(--on-color); font: 400 13px/1.4 "IBM Plex Mono", monospace; overflow-wrap: anywhere; }
.piec { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
/* Nazwa konta i „Wyloguj” w przypiętym pasku nad STOP: mały tekst, żeby STOP został największym celem na ekranie. */
.pasek-konto { margin-bottom: 4px; }
.pasek-konto .tekstowy { flex: 0 0 auto; padding: 0 0 0 12px; }
.wiersz-testu { padding: 10px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.wiersz-testu .wiersz strong { overflow-wrap: anywhere; }
.pigulka { padding: 2px 9px; border-radius: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pigulka[data-wynik="OK"] { background: var(--done); color: var(--on-color); }
.pigulka[data-wynik="NIE"] { background: var(--stop); color: var(--on-color); }
.pigulka[data-wynik="BRAK"] { background: var(--pale); color: var(--muted); }
.pigulka[data-wynik="klient"] { background: var(--action); color: var(--on-color); }
.drobne { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.przyciski-wiersza { display: flex; flex-wrap: wrap; gap: 6px; }
.przyciski-wiersza button { flex: 1 1 130px; }
.przyciski-wiersza .glowny { min-height: 44px; font-size: 15px; }
a.drugi { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; text-align: center; text-decoration: none; padding: 6px 10px; }
