/* =========================================================================
   LUCY — Portal kierowcy. System wizualny 1:1 z zatwierdzonym projektem
   („Portal Kierowcy Focus"). Wartości kolorów, skali typograficznej,
   promieni i cieni pochodzą wprost z handoffu — nie zmieniamy ich „na oko".

   Różnica wobec prototypu: prototyp rysował telefon w ramce na desktopie,
   produkcja zajmuje cały ekran urządzenia. Stąd 100dvh i safe-area — bez
   tego dolny pasek iPhone'a zasłania główne CTA.
   ========================================================================= */

:root {
  --accent: #FB8225;
  --accent-hi: #fd9440;
  --accent-ink: #1a0d02;
  --warn: #FFC24B;
  --warn-ink: #2a1c02;
  --danger: #FF5C5C;
  --danger-mid: #FF7A45;
  --success: #57C97A;
  /* Żywa zieleń doręczeń — jaśniejsza i bardziej nasycona od --success, żeby na ciemnym tle
     czytała się z jednego rzutu oka jako nagroda za zrobiony punkt (pastel ginął przy 46 px miasta). */
  --done-green: #2FE070;
  --info: #4DA6FF;
  --bg: #070910;
  --bg-map: #0a0d12;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .07);
  --text: #EAF0F6;
  --text-2: #C9D4E0;
  --text-3: #8B96A5;
  --text-4: #6E7A89;
  --medal-bronze: #C98B4B;
  --medal-silver: #A9B4C0;

  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pad-x: 24px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body { overflow: hidden; }

.app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}

/* Ekran = jedno zadanie. Pulpit NIE przewija się — decyzja projektowa. */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: calc(28px + var(--safe-t)) var(--pad-x) calc(20px + var(--safe-b));
}
.screen--scroll { overflow-y: auto; scrollbar-width: none; }
.screen--scroll::-webkit-scrollbar { width: 0; height: 0; }
.screen--login { background: radial-gradient(120% 70% at 20% 0%, #231506 0%, #070910 55%); padding-left: 26px; padding-right: 26px; }
.screen--route { background: radial-gradient(120% 60% at 50% 0%, #241608 0%, #070910 55%); }
.screen--issue { background: radial-gradient(110% 60% at 50% 0%, #2a0f0f 0%, #070910 60%); padding-left: 20px; padding-right: 20px; }
.screen--done  { background: radial-gradient(120% 65% at 50% 8%, #231607 0%, #070910 58%); padding-left: 20px; padding-right: 20px; }
.screen--plain { background: var(--bg); }
.screen--map   { background: var(--bg-map); padding: 0; }

.spacer { flex: 1; min-height: 0; }

/* ---------------------------------------------------------------- typografia */
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); }
.kicker--warn { color: var(--warn); letter-spacing: 1.2px; font-size: 12px; }
.label { font-size: 9px; letter-spacing: .8px; text-transform: uppercase; color: var(--text-4); }
.label--lg { font-size: 10px; letter-spacing: 1.1px; font-weight: 700; }
.h1 { font-size: 34px; line-height: 1.06; font-weight: 800; letter-spacing: -1.2px; text-wrap: pretty; }
.h2 { font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.h3 { font-size: 26px; font-weight: 800; letter-spacing: -.8px; }
.lead { font-size: 14px; line-height: 1.5; color: var(--text-3); text-wrap: pretty; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-3); }

/* Miasto na pulpicie — największy element ekranu, kierowca czyta go w ruchu */
.city { font-size: 46px; font-weight: 800; letter-spacing: -2px; line-height: .98; }
.city--sm { font-size: 32px; letter-spacing: -1.1px; line-height: 1.08; }
.recipient { font-size: 17px; font-weight: 700; color: var(--text-2); }
.addr { font-size: 14px; color: var(--text-3); }

/* ETA — 84px, monospace, ujemny tracking (handoff 3.3 pkt 5) */
.eta-big { font-family: var(--mono); font-size: 84px; font-weight: 600; line-height: .9; letter-spacing: -3px; color: var(--accent); }
.eta-row { display: flex; align-items: flex-end; gap: 22px; }
.eta-side { padding-bottom: 8px; }
.eta-km { font-family: var(--mono); font-size: 20px; font-weight: 600; }
.eta-min { font-size: 12px; color: var(--text-3); }

/* ---------------------------------------------------------------- nagłówek */
.topbar { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; color: var(--accent-ink); }
.brand__name { font-size: 14px; font-weight: 800; letter-spacing: -.2px; }
.brand__name span { color: var(--text-3); font-weight: 600; }
.brand__sub { font-size: 10px; color: var(--text-4); letter-spacing: .3px; text-transform: uppercase; }

.langs { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.05); }
.langs > button { padding: 6px 10px; border-radius: 7px; font-size: 11px; font-weight: 700; border: 0; background: none; color: var(--text-3); font-family: inherit; }
.langs > button.is-on { background: rgba(251,130,37,.16); color: var(--accent); }

/* ---------------------------------------------------------------- pigułki */
.pill { padding: 8px 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11px; font-weight: 700; color: var(--text-2); }
.pill--grow { flex: 1; }
.pill--warn { background: rgba(255,194,75,.12); border-color: transparent; color: var(--warn); display: flex; align-items: center; gap: 5px; font-size: 10px; }
.pill--ok { background: rgba(87,201,122,.12); color: var(--success); border-color: transparent; }
/* Wpis odrzucony przez serwer — POD albo zgłoszenie, które NIE dojdzie samo. Czerwona,
   klikalna (ponowienie), bo to jedyny sygnał dla kierowcy poza czatem. */
.pill--err { background: rgba(255,92,92,.16); border-color: transparent; color: var(--danger); font-size: 10px; font-family: inherit; cursor: pointer; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.dot--live { animation: pulseRing 1.8s ease-out infinite; }

.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-2); flex-shrink: 0; }
.icon-btn--lg { width: 48px; height: 48px; border-radius: 15px; font-size: 16px; }
.icon-btn--warn { color: var(--warn); }
.icon-btn--back { width: 38px; height: 38px; border-radius: 12px; font-size: 17px; background: var(--surface-2); border: 0; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; border: 2px solid #0a0d13; }

/* ---------------------------------------------------------------- pasek okna czasowego */
.slack { margin-top: 16px; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; font-size: 13px; font-weight: 600; text-wrap: pretty; border: 1px solid transparent; }
.slack--ok    { background: rgba(87,201,122,.12);  border-color: rgba(87,201,122,.28); color: var(--success); }
.slack--tight { background: rgba(255,194,75,.12);  border-color: rgba(255,194,75,.3);  color: var(--warn); }
.slack--edge  { background: rgba(255,122,69,.12);  border-color: rgba(255,122,69,.3);  color: var(--danger-mid); }
.slack--late  { background: rgba(255,92,92,.12);   border-color: rgba(255,92,92,.3);   color: var(--danger); }
/* Okno znane, ale bez ETA — albo brak okna. Neutralnie, bo nie mamy czego oceniać. */
.slack--none  { background: var(--surface); border-color: var(--border); color: var(--text-3); }

/* ---------------------------------------------------------------- karty */
.card { padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.card--tight { padding: 14px 16px; border-radius: 18px; }
.card--accent { background: rgba(251,130,37,.1); border-color: rgba(251,130,37,.2); }
.card__head { display: flex; align-items: center; justify-content: space-between; }

.progress { margin-top: 12px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; display: flex; }
.progress > i { background: var(--accent); display: block; }

.stats { margin-top: 14px; display: flex; justify-content: space-between; }
.stats__v { margin-top: 3px; font-family: var(--mono); font-size: 17px; font-weight: 600; }
.stats__v small { color: var(--text-4); font-size: inherit; }

.rowlink { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 18px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); gap: 12px; }
.rowlink__t { margin-top: 3px; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowlink__v { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--text-3); flex-shrink: 0; }

/* ---------------------------------------------------------------- przyciski */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; font-family: inherit; font-weight: 800; }
.btn--cta { height: 62px; border-radius: 20px; background: var(--accent); color: var(--accent-ink); font-size: 17px; letter-spacing: -.2px; width: 100%; }
.btn--cta:active { background: var(--accent-hi); }
.btn--pulse { animation: pulseRing 2.6s ease-out infinite; }
.btn--ghost { height: 48px; border-radius: 15px; background: var(--surface-2); border: 1px solid rgba(255,255,255,.08); color: var(--text-2); font-size: 13px; font-weight: 700; flex: 1; }
.btn--off { background: rgba(255,255,255,.07); color: var(--text-4); }
.btn--warn { background: var(--warn); color: var(--warn-ink); }
.btn--link { background: none; color: var(--text-3); font-size: 13px; font-weight: 600; padding: 8px; width: 100%; }

/* Główne „Nawiguj" — 78px, cień pomarańczowy; kierowca trafia w nie w rękawicy */
.nav-cta { margin-top: 10px; height: 78px; border-radius: 24px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 26px; box-shadow: 0 18px 40px -14px rgba(251,130,37,.55); border: 0; width: 100%; font-family: inherit; text-align: left; }
.nav-cta__t { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.nav-cta__s { font-size: 11px; font-weight: 700; opacity: .6; }
.nav-cta__i { width: 54px; height: 54px; border-radius: 17px; background: rgba(11,16,6,.14); display: flex; align-items: center; justify-content: center; font-size: 22px; }

.actions { display: flex; gap: 8px; }

/* pasek kroków — klikalne segmenty */
.dots { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.dots > button { height: 5px; border-radius: 3px; border: 0; padding: 0; background: rgba(255,255,255,.1); }
/* Doręczone punkty świecą pełną zielenią z delikatną poświatą — to jedyny licznik postępu,
   jaki kierowca widzi na pulpicie w trakcie jazdy. */
.dots > button.is-done { background: var(--done-green); width: 22px; box-shadow: 0 0 10px rgba(47,224,112,.55); }
.dots > button.is-now { background: var(--accent); width: 34px; }
.dots > button.is-next { width: 22px; }

/* ---------------------------------------------------------------- logowanie */
.token-card { margin-top: 26px; position: relative; overflow: hidden; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, rgba(251,130,37,.13), rgba(255,255,255,.03)); border: 1px solid rgba(251,130,37,.22); }
.token-card::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.09), transparent); animation: sheen 3.4s ease-in-out infinite; }
.token-card__url { margin-top: 12px; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--text-2); word-break: break-all; }
.token-card__url b { color: var(--accent); font-weight: 400; }
.chip-mini { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: rgba(251,130,37,.16); color: var(--accent); }

.field { margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.field.is-on { border-color: rgba(251,130,37,.45); }
.field__v { margin-top: 5px; font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: 6px; color: var(--text); min-height: 28px; }
.field__v--pin { letter-spacing: 8px; }
.field__pre { font-family: var(--mono); font-size: 15px; color: var(--text-4); }
.caret { width: 2px; height: 26px; background: transparent; }
.field.is-on .caret { background: var(--accent); animation: blink 1.1s steps(1) infinite; }

.keypad { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad > button { height: 64px; border-radius: 16px; background: rgba(255,255,255,.05); border: 0; color: var(--text); font-family: var(--mono); font-size: 24px; font-weight: 500; }
.keypad > button:active { background: rgba(251,130,37,.18); }

/* ---------------------------------------------------------------- mapy */
.map { position: absolute; left: 0; right: 0; top: 0; background: var(--bg-map); }
.map--nav { bottom: 208px; }
.map--route { bottom: 216px; }
/* Atrybucja Google MUSI zostać widoczna — dlatego mapa kończy się nad panelem. */
.gm-style-cc { font-size: 9px !important; opacity: .75; }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px calc(20px + var(--safe-b)); border-radius: 26px 26px 0 0; background: rgba(10,13,19,.94); backdrop-filter: blur(20px); border-top: 1px solid rgba(255,255,255,.1); }
.sheet__grab { width: 40px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.18); margin: 0 auto 16px; }

.overlay-card { position: absolute; left: 16px; right: 16px; padding: 14px 16px; border-radius: 18px; background: rgba(10,13,18,.92); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.1); }
.maneuver { top: calc(16px + var(--safe-t)); display: flex; align-items: center; gap: 16px; }
.maneuver__arrow { font-size: 38px; line-height: 1; color: var(--accent); flex-shrink: 0; }
.maneuver__dist { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: -1px; line-height: 1; }

.speed { position: absolute; left: 16px; display: flex; align-items: center; gap: 10px; }
.speed__limit { width: 62px; height: 62px; border-radius: 50%; background: #f4f7fa; border: 4px solid #d9232d; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 21px; font-weight: 600; color: #101820; }
.speed__now { padding: 10px 14px; border-radius: 16px; background: rgba(10,13,19,.8); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.1); }
.speed__now b { display: block; font-family: var(--mono); font-size: 24px; font-weight: 600; line-height: 1; }
.speed.is-over .speed__now { background: rgba(255,92,92,.16); border-color: rgba(255,92,92,.45); }
.speed.is-over .speed__now b { color: var(--danger); }

.cam-card { border-color: rgba(77,166,255,.35); animation: riseIn .25s ease both; display: flex; align-items: center; gap: 12px; }
.cam-card__i { width: 30px; height: 30px; border-radius: 50%; background: rgba(77,166,255,.16); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--info); flex-shrink: 0; }
.cam-card__t { font-size: 14px; font-weight: 800; color: var(--info); }

.fleet-card { border-color: rgba(255,194,75,.28); }
.fleet-card__t { font-size: 13px; font-weight: 700; color: var(--warn); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.report-btn { position: absolute; right: 16px; display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-radius: 17px; background: rgba(10,13,19,.9); backdrop-filter: blur(14px); border: 1px solid rgba(255,194,75,.3); font-size: 13px; font-weight: 800; color: var(--warn); font-family: inherit; }

.geofence { position: absolute; left: 16px; right: 16px; bottom: 262px; padding: 16px 18px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: space-between; gap: 12px; animation: riseIn .35s ease both; box-shadow: 0 18px 40px -14px rgba(251,130,37,.6); border: 0; width: calc(100% - 32px); font-family: inherit; text-align: left; }

.modal { position: absolute; inset: 0; z-index: 80; background: rgba(4,6,10,.72); backdrop-filter: blur(6px); }
.modal__panel { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px calc(20px + var(--safe-b)); border-radius: 26px 26px 0 0; background: #0d1118; border-top: 1px solid rgba(255,255,255,.1); animation: riseIn .25s ease both; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--border); width: 100%; font-family: inherit; text-align: left; color: var(--text); }
.list-row__i { width: 34px; height: 34px; border-radius: 11px; background: rgba(255,194,75,.14); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--warn); flex-shrink: 0; }
.list-row__t { flex: 1; font-size: 14px; font-weight: 700; }
.list-row.is-on { background: rgba(255,194,75,.12); border-color: rgba(255,194,75,.45); }

/* ---------------------------------------------------------------- POD */
.photos { margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo { aspect-ratio: 1; border-radius: 14px; overflow: hidden; position: relative; background: linear-gradient(140deg, #263140, #131a22); border: 1px solid rgba(251,130,37,.22); display: flex; align-items: flex-end; padding: 7px; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo__n { position: relative; font-family: var(--mono); font-size: 8px; color: var(--accent); text-shadow: 0 1px 3px #000; }
.photo__ok { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; }
.photo--add { border: 1.5px dashed rgba(255,255,255,.16); background: rgba(255,255,255,.02); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--text-3); }
.photo--add b { font-size: 20px; font-weight: 400; color: var(--text); }
.photo--add span { font-size: 10px; font-weight: 700; }

.chips { margin-top: 10px; display: flex; gap: 7px; flex-wrap: wrap; }
.chip { padding: 10px 13px; border-radius: 13px; font-size: 12px; font-weight: 700; background: var(--surface); color: var(--text-3); border: 1px solid var(--border); font-family: inherit; }
.chip.is-on { background: rgba(251,130,37,.16); color: var(--accent); border-color: rgba(251,130,37,.35); }
.chip.is-on-warn { background: rgba(255,194,75,.16); color: var(--warn); border-color: rgba(255,194,75,.35); }

.note { margin-top: 8px; width: 100%; background: transparent; border: 0; outline: 0; resize: none; color: var(--text); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.45; }

.sig { margin-top: 10px; position: relative; height: 158px; border-radius: 18px; overflow: hidden; background: #f4f7fa; border: 1px solid rgba(255,255,255,.1); }
.sig canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.sig__line { position: absolute; left: 18px; right: 18px; bottom: 34px; height: 1px; background: rgba(20,30,45,.18); pointer-events: none; }
.sig__hint { position: absolute; left: 18px; bottom: 12px; font-size: 10px; font-weight: 700; letter-spacing: .5px; color: rgba(20,30,45,.45); pointer-events: none; }

.fade-bottom { position: absolute; z-index: 50; bottom: 0; left: 0; right: 0; height: 100px; background: linear-gradient(transparent, var(--bg) 55%); pointer-events: none; }
.dock { position: absolute; z-index: 51; bottom: calc(16px + var(--safe-b)); left: 20px; right: 20px; height: 60px; border-radius: 19px; font-size: 16px; }

/* ---------------------------------------------------------------- czat */
.chat { flex: 1; overflow-y: auto; scrollbar-width: none; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 12px; }
.chat::-webkit-scrollbar { width: 0; }
.bubble { max-width: 268px; padding: 12px 14px; font-size: 14px; line-height: 1.45; text-wrap: pretty; }
.msg { display: flex; flex-direction: column; gap: 4px; }
.msg--me { align-items: flex-end; }
.msg--me .bubble { background: rgba(251,130,37,.15); border-radius: 18px 18px 6px 18px; color: var(--text); }
.msg--them { align-items: flex-start; }
.msg--them .bubble { background: rgba(255,255,255,.05); border-radius: 18px 18px 18px 6px; color: var(--text); }
.msg__meta { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; color: var(--text-4); }
.tick-ok { color: var(--accent); }
.tick-queued { color: var(--warn); }
/* Trzeci stan bąbelka: wiadomość NIE wyszła. Musi być klikalna — to przycisk ponowienia. */
.tick-failed { border: 0; padding: 3px 8px; border-radius: 8px; background: rgba(255,92,92,.16); color: var(--danger); font-family: var(--mono); font-size: 10px; font-weight: 600; }
.day-sep { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-4); }

.change-card { padding: 16px; border-radius: 20px; background: linear-gradient(155deg, rgba(255,194,75,.16), rgba(255,255,255,.03)); border: 1px solid rgba(255,194,75,.3); }
.quick { padding: 0 18px 6px; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { height: 0; }
.quick > button { flex-shrink: 0; padding: 9px 13px; border-radius: 13px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; font-family: inherit; }
.composer { padding: 10px 18px calc(16px + var(--safe-b)); display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--border); }
.composer input { width: 100%; background: transparent; border: 0; outline: 0; color: var(--text); font-family: inherit; font-size: 14px; font-weight: 500; }
.composer__box { flex: 1; height: 44px; border-radius: 15px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; padding: 0 14px; }
.composer__send { width: 44px; height: 44px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 17px; border: 0; flex-shrink: 0; background: rgba(255,255,255,.07); color: var(--text-4); }
.composer__send.is-on { background: var(--accent); color: var(--accent-ink); }
.chat-head { padding: calc(20px + var(--safe-t)) 18px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); background: rgba(10,13,19,.9); backdrop-filter: blur(16px); }
.avatar { width: 40px; height: 40px; border-radius: 14px; background: linear-gradient(140deg, #2a3340, #171d26); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--text-2); }

/* ---------------------------------------------------------------- ustawienia / koniec dnia */
.toggle { position: relative; width: 44px; height: 26px; border-radius: 14px; background: rgba(255,255,255,.12); flex-shrink: 0; border: 0; }
.toggle.is-on { background: var(--accent); }
.toggle > i { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #f4f7fa; transition: left .18s ease; }
.toggle.is-on > i { left: 20px; }
.setting { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.setting__t { font-size: 14px; font-weight: 700; }
.setting__d { margin-top: 3px; font-size: 11px; line-height: 1.45; color: var(--text-3); text-wrap: pretty; }
.setting input { margin-top: 6px; width: 100%; background: transparent; border: 0; outline: 0; color: var(--text); font-family: inherit; font-size: 17px; font-weight: 700; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.tile__v { margin-top: 4px; font-family: var(--mono); font-size: 22px; font-weight: 600; }
.medal { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; font-weight: 600; background: rgba(255,255,255,.04); border: 1.5px solid rgba(255,255,255,.08); color: #4A545F; }
.medal.is-bronze { background: rgba(201,139,75,.18); border-color: var(--medal-bronze); color: var(--medal-bronze); }
.medal.is-silver { background: rgba(169,180,192,.1); border: 1.5px dashed rgba(169,180,192,.5); color: var(--medal-silver); }
.done-mark { width: 72px; height: 72px; border-radius: 50%; background: rgba(251,130,37,.14); border: 1px solid rgba(251,130,37,.3); display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--accent); animation: pulseRing 2.6s ease-out infinite; }

/* ---------------------------------------------------------------- komunikaty */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(24px + var(--safe-b)); z-index: 200; padding: 13px 16px; border-radius: 16px; background: rgba(255,194,75,.16); border: 1px solid rgba(255,194,75,.4); backdrop-filter: blur(14px); font-size: 12px; font-weight: 700; color: var(--warn); animation: riseIn .25s ease both; }
.toast--err { background: rgba(255,92,92,.16); border-color: rgba(255,92,92,.45); color: var(--danger); }
.toast--ok { background: rgba(87,201,122,.16); border-color: rgba(87,201,122,.45); color: var(--success); }

.center-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px; text-align: center; }

@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(251,130,37,.45); } 70% { box-shadow: 0 0 0 14px rgba(251,130,37,0); } 100% { box-shadow: 0 0 0 0 rgba(251,130,37,0); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sheen { 0% { transform: translateX(-120%); } 100% { transform: translateX(220%); } }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

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

/* Ekrany o wysokości poniżej 720 px (starsze telefony) — pulpit nadal bez przewijania,
   więc zbijamy największe elementy zamiast pozwolić im wypchnąć CTA poza ekran. */
@media (max-height: 720px) {
  .city { font-size: 38px; }
  .eta-big { font-size: 64px; }
  .nav-cta { height: 68px; }
  .h1 { font-size: 28px; }
}
