/* ─── GetTransfer Driver App CSS v5.4 ────────────────────────────────── */
:root {
  /* Dark mode: ciepłe oliwkowe ciemne (GPT palette) */
  --black:    #0c0b09;
  --surface:  #18170f;
  --surface2: #201f16;
  --surface3: #2a2920;
  --border:   rgba(201,168,76,.22);   /* złota obwódka */
  --border2:  rgba(255,255,255,.07);  /* subtelna granica */
  --gold:     #c9a84c;
  --gold2:    #efd27a;
  --gold-dim: rgba(201,168,76,.14);
  --gold-glow:rgba(201,168,76,.3);
  --green:    #22c55e;
  --green-dim:rgba(34,197,94,.13);
  --red:      #dc2626;
  --red-dim:  rgba(220,38,38,.13);
  --blue:     #38bdf8;
  --blue-dim: rgba(56,189,248,.1);
  --text:     #f2f2f2;
  --text2:    #b7b09f;  /* cieplejszy secondary text */
  --text3:    #776f5e;  /* cieplejszy dimmed text */
  --radius:   10px;     /* tighter: 14 → 10 */
  --nav-h:    66px;     /* wyższy nav dla pill tabs */
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  height: 100%;
  background:
    radial-gradient(circle at 50% -4%, rgba(201,168,76,.11), transparent 28%),
    var(--black);
  color: var(--text);
  font-family: -apple-system, 'Segoe UI', Inter, sans-serif;
  font-size: 15px;
  overscroll-behavior: none;
}

/* ─── Splash ──────────────────────────────────────────────────────────── */
#splash {
  position: fixed; inset: 0;
  background: var(--black);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 999;
  animation: splashFadeOut .4s ease forwards 2s;
}

@keyframes splashFadeOut {
  to { opacity: 0; pointer-events: none; }
}

.splash-logo {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: splashFadeUp .6s ease forwards;
  opacity: 0; transform: translateY(16px);
}

@keyframes splashFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.splash-icon {
  width: 88px; height: 88px;
  background: var(--gold);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  margin-bottom: 20px;
  box-shadow: 0 0 40px var(--gold-glow);
}

.splash-title { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.splash-sub   { font-size: 13px; color: var(--gold); letter-spacing: .15em; text-transform: uppercase; margin-top: 4px; }

.splash-spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--surface2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-top: 40px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Layout ──────────────────────────────────────────────────────────── */
.page {
  display: flex; flex-direction: column;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-bot));
}

.page-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12,11,9,.95);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 14px;
  display: flex; align-items: center; gap: 12px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-title { font-size: 18px; font-weight: 900; flex: 1; letter-spacing: -.02em; }

.page-body { flex: 1; overflow-y: auto; padding: 16px 16px 8px; }

/* ─── Status Chip (home — unified hamburger + driver info + online pill) */
#status-chip {
  position: fixed;
  top: calc(env(safe-area-inset-top,0px) + 12px);
  left: 12px; right: 12px;
  z-index: 50;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(18,17,13,.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
}

.chip-hamburger {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.chip-info b { display: block; font-size: 14px; font-weight: 900; color: var(--text); line-height: 1.2; }
.chip-info span { display: block; font-size: 11px; color: var(--text3); margin-top: 3px; }

.chip-online-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 999px;
  border: none; cursor: pointer;
  font-size: 11px; font-weight: 900;
  white-space: nowrap; font-family: inherit;
  transition: all .2s;
  background: var(--green-dim);
  color: var(--green);
}
.chip-online-pill::before {
  content: ''; width: 7px; height: 7px;
  border-radius: 50%; background: currentColor;
}
body:not(.driver-online) .chip-online-pill {
  background: rgba(255,255,255,.06);
  color: var(--text3);
}

/* ─── Stats strip (pod chipem na home) ───────────────────────────────── */
#stats-strip {
  position: fixed;
  top: calc(env(safe-area-inset-top,0px) + 92px);
  left: 12px; right: 12px;
  z-index: 49;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.stat-mini {
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(18,17,13,.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border2);
  text-align: center;
}
.stat-mini b {
  display: block; font-size: 16px;
  font-weight: 900; color: var(--gold); line-height: 1;
}
.stat-mini span {
  display: block; font-size: 9px;
  color: var(--text3); margin-top: 3px;
  font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}

/* ─── Airport Alert Banner ───────────────────────────────────────────── */
#airport-alert {
  position: fixed;
  top: calc(env(safe-area-inset-top,0px) + 170px);
  left: 12px; right: 12px;
  z-index: 48;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(56,189,248,.3);
  background: rgba(56,189,248,.08);
  color: #d9f4ff;
  font-size: 11px; line-height: 1.5;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#airport-alert strong { color: var(--blue, #38bdf8); }

/* ─── Bottom Nav — gold pill active (GPT style) ───────────────────────── */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-bot));
  padding: 7px 8px var(--safe-bot);
  background: rgba(17,16,13,.97);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-item {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text3);
  border-radius: var(--radius);
  transition: background .2s, color .2s;
  padding: 0 4px;
  -webkit-tap-highlight-color: transparent;
  border: none; background: transparent; cursor: pointer;
  font-family: inherit;
}

/* ★ GPT: aktywna zakładka = złote tło + ciemny tekst */
.nav-item.active {
  background: var(--gold);
  color: #050505;
}
.nav-item:not(.active) { color: var(--text3); }
.nav-item:active { opacity: .75; }

/* Ikony: aktywne = ciemne, nieaktywne = text3 */
.nav-item.active svg { stroke: #050505 !important; }
.nav-item:not(.active) svg { stroke: var(--text3); }

.nav-icon {
  font-size: 0;
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
}
.nav-label { font-size: 9px; font-weight: 800; letter-spacing: .03em; }

/* Badge (counter) na zakładce */
.nav-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 20px);
  min-width: 16px; height: 16px;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  font-size: 9px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid var(--black);
}
/* Badge na aktywnej zakładce — ciemny */
.nav-item.active .nav-badge {
  background: #050505;
  color: var(--gold);
  border-color: var(--gold);
}

/* ─── Online Toggle Bar ───────────────────────────────────────────────── */
.online-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: rgba(12,11,9,.95);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  min-height: 54px;
  touch-action: manipulation;
  user-select: none;
}
.online-bar:active { background: var(--surface2); }

.online-status {
  display: flex; align-items: center; gap: 10px;
}

.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text3);
  transition: background .3s;
}

.status-dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }

.status-text { font-size: 14px; font-weight: 600; }
.status-text.online { color: var(--green); }

.toggle-btn {
  width: 52px; height: 28px;
  background: var(--surface3);
  border-radius: 14px;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background .3s;
}

.toggle-btn::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--text3);
  transition: transform .3s, background .3s;
}

.toggle-btn.on { background: var(--green-dim); border: 1px solid var(--green); }
.toggle-btn.on::after { transform: translateX(24px); background: var(--green); }

/* ─── Map container ───────────────────────────────────────────────────── */
#map {
  width: 100%;
  height: calc(100dvh - 48px - 56px);
  min-height: 260px;
}

/* ─── Order Cards ─────────────────────────────────────────────────────── */
.order-list { display: flex; flex-direction: column; gap: 10px; }

.order-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.018));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.order-card:active { transform: scale(.98); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.order-card.new-order {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,.2), 0 4px 20px rgba(201,168,76,.15);
  animation: pulse-gold 1.5s ease infinite;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 2px rgba(201,168,76,.2), 0 4px 20px rgba(201,168,76,.1); }
  50%       { box-shadow: 0 0 0 4px rgba(201,168,76,.35), 0 8px 28px rgba(201,168,76,.25); }
}

/* Karta — nowa hierarchia: cena dominuje */
.order-header {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px;
}
.order-header-left { flex: 1; min-width: 0; }
.order-header-right { text-align: right; flex-shrink: 0; }

.order-id   { font-size: 11px; color: var(--text3); font-family: monospace; margin-bottom: 2px; }
.order-time { font-size: 12px; color: var(--gold); font-weight: 700; }
/* Cena — dominant element jak w Bolt (duży, gold) */
.order-price {
  font-size: 26px; font-weight: 900; color: var(--gold);
  letter-spacing: -0.5px; line-height: 1;
}
.order-price-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }

.order-route { margin-bottom: 12px; }

.route-point {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 4px 0;
}

.route-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.route-dot.from { background: var(--gold); }
.route-dot.to   { background: var(--text2); }

.route-line-v {
  width: 2px; height: 16px;
  background: var(--border);
  margin: 2px 0 2px 4px;
  border-radius: 1px;
}

.route-addr { font-size: 13px; color: var(--text); line-height: 1.4; }
.route-addr .route-sub { font-size: 11px; color: var(--text3); margin-top: 1px; }

.order-meta {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px;
}

.meta-chip {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}

.meta-chip.gold { background: var(--gold-dim); color: var(--gold); border-color: rgba(201,168,76,.25); }
.meta-chip.green { background: rgba(34,197,94,.1); color: var(--green); border-color: rgba(34,197,94,.25); }

/* ─── Accept/Reject Panel — redesign Bolt-style ───────────────────────── */
.accept-panel {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-bot));
  left: 0; right: 0;
  background: var(--surface);
  border-top: 3px solid var(--gold);
  padding: 20px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 -8px 32px rgba(0,0,0,.55);
}

.accept-panel.visible { transform: translateY(0); }

.accept-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}

.accept-title {
  font-size: 18px; font-weight: 800; color: var(--text);
  letter-spacing: -0.3px;
}
.accept-subtitle {
  font-size: 12px; color: var(--text3); margin-top: 3px;
}

/* Timer ring — animated via JS */
.accept-timer {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: var(--gold);
  position: relative; flex-shrink: 0;
}
.accept-timer-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--pct, 100%), var(--surface3) 0%);
}
.accept-timer-inner {
  position: relative; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900; color: var(--gold);
}

/* Panel route & price (nowa struktura) */
.accept-route {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.accept-price {
  font-size: 32px; font-weight: 900; color: var(--gold);
  letter-spacing: -1px; text-align: center;
  margin-bottom: 16px;
  line-height: 1;
}
.accept-price-label {
  font-size: 12px; color: var(--text3); text-align: center;
  margin-top: 4px; margin-bottom: 16px;
}

.accept-btns { display: flex; gap: 12px; }

.btn-reject {
  flex: 1; padding: 14px;
  background: var(--red-dim);
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: var(--radius);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  min-height: 52px;
  touch-action: manipulation;
  transition: opacity .15s, transform .12s;
}
.btn-reject:active { opacity: .8; transform: scale(.97); }

.btn-accept {
  flex: 2; padding: 14px;
  background: var(--green);
  border: none;
  color: #000;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  min-height: 52px;
  touch-action: manipulation;
  transition: opacity .15s, transform .12s;
}
.btn-accept:active { opacity: .85; transform: scale(.97); }

/* ─── Ride Screen ─────────────────────────────────────────────────────── */
#ride-map {
  width: 100%;
  height: 42dvh;
  min-height: 200px;
}

.ride-panel {
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: -16px;
  position: relative; z-index: 10;
  padding: 20px 20px 8px;
}

.ride-handle {
  width: 36px; height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.passenger-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: var(--surface2);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.passenger-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--gold);
  flex-shrink: 0;
}

.passenger-name { font-size: 16px; font-weight: 700; }
.passenger-phone { font-size: 13px; color: var(--text2); margin-top: 2px; }
.passenger-rating { font-size: 12px; color: var(--gold); margin-top: 2px; }

.passenger-actions {
  margin-left: auto;
  display: flex; gap: 8px;
}

.action-btn-sm {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--surface3);
  background: var(--surface3);
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  touch-action: manipulation;
  transition: background .2s, transform .12s;
}
.action-btn-sm:active { transform: scale(.92); background: var(--surface2); }

/* ─── Ride Status Buttons ─────────────────────────────────────────────── */
.ride-status-btn {
  width: 100%; padding: 16px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-size: 16px; font-weight: 800;
  cursor: pointer;
  margin-bottom: 8px;
  transition: opacity .2s;
}

.ride-status-btn:disabled { opacity: .4; cursor: not-allowed; }
.ride-status-btn.secondary {
  background: transparent;
  border: 1px solid var(--surface3);
  color: var(--text2);
}

.ride-status-btn.danger {
  background: var(--red-dim);
  border: 1px solid var(--red);
  color: var(--red);
}

/* ─── Navigate button ─────────────────────────────────────────────────── */
.nav-directions {
  display: flex; gap: 8px; margin-bottom: 12px;
}

.nav-app-btn {
  flex: 1; padding: 10px 8px;
  background: var(--surface2);
  border: 1px solid var(--surface3);
  border-radius: 10px;
  color: var(--text);
  font-size: 12px; font-weight: 600;
  text-align: center;
  text-decoration: none;
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}

.nav-app-btn span { font-size: 20px; }

/* ─── Earnings ────────────────────────────────────────────────────────── */
.earnings-header {
  background: var(--surface);
  padding: 20px;
  margin: -16px -16px 16px;
  border-bottom: 1px solid var(--surface2);
}

.earnings-big {
  font-size: 40px; font-weight: 800; color: var(--gold);
  margin-bottom: 4px;
}

.earnings-sub { font-size: 13px; color: var(--text2); }

.period-tabs {
  display: flex; gap: 0;
  background: var(--surface2);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}

.period-tab {
  flex: 1; padding: 8px;
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: 13px; font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.period-tab.active {
  background: var(--surface3);
  color: var(--gold);
}

.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
}

.stat-val { font-size: 20px; font-weight: 800; color: var(--gold); }
.stat-lbl { font-size: 10px; color: var(--text3); margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }

/* ─── History list ────────────────────────────────────────────────────── */
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
}

.history-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

.history-body { flex: 1; min-width: 0; }
.history-route { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-date  { font-size: 11px; color: var(--text3); margin-top: 2px; }
.history-price { font-size: 16px; font-weight: 800; color: var(--gold); white-space: nowrap; }

/* ─── Profile ─────────────────────────────────────────────────────────── */
.profile-header {
  display: flex; flex-direction: column;
  align-items: center;
  padding: 28px 20px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--surface2);
  margin: -16px -16px 16px;
}

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: var(--gold);
  margin-bottom: 12px;
}

.profile-name { font-size: 20px; font-weight: 800; }
.profile-email { font-size: 13px; color: var(--text2); margin-top: 4px; }

.profile-rating {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px;
  font-size: 14px; color: var(--gold); font-weight: 600;
}

.car-card {
  background: var(--surface2);
  border: 1px solid var(--surface3);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.car-plate {
  font-family: monospace;
  font-size: 18px; font-weight: 800;
  color: var(--gold);
  letter-spacing: .1em;
}

.car-model { font-size: 14px; color: var(--text2); margin-top: 4px; }

.menu-list { display: flex; flex-direction: column; gap: 2px; }

.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  border: none; width: 100%;
  transition: background .15s;
}

.menu-item:active { background: var(--surface2); }
.menu-item-icon { font-size: 20px; width: 28px; text-align: center; }
.menu-item-arrow { margin-left: auto; color: var(--text3); }
.menu-item.danger { color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════
   TRYB JASNY — [data-theme="light"] — domyślny dla kierowcy
   Jasny = lepiej czytelny w dzień (słońce za oknem w aucie)
   ═══════════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --black:    #f4f3ef;   /* tło strony — ciepłe kremowe */
  --surface:  #ffffff;
  --surface2: #f0efe9;
  --surface3: #e8e6de;
  --border:   rgba(140,110,40,.25);  /* złota obwódka w jasnym trybie */
  --border2:  rgba(0,0,0,.08);
  --gold-dim: rgba(201,168,76,.15);
  --gold-glow:rgba(201,168,76,.22);
  --text:     #111113;
  --text2:    #4a4a52;
  --text3:    #737378;
}
[data-theme="light"] body {
  color-scheme: light;
  background: var(--black);
}
[data-theme="light"] .page-header {
  background: rgba(244,243,239,.94);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}
[data-theme="light"] #bottom-nav {
  background: rgba(244,243,239,.96);
  backdrop-filter: blur(18px);
  border-top-color: var(--border);
}
/* Light: nav active — gold pill nadal działa */
[data-theme="light"] .nav-item.active { background: var(--gold); color: #050505; }
[data-theme="light"] .nav-item:not(.active) { color: var(--text3); }
[data-theme="light"] .splash-icon {
  box-shadow: 0 0 40px rgba(201,168,76,.22);
}
[data-theme="light"] .login-wrap { background: var(--black); }
[data-theme="light"] .form-input {
  background: #f0f0f2;
  border: 1.5px solid var(--border);
  color: var(--text);
}
[data-theme="light"] .form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
[data-theme="light"] .online-bar {
  background: #fff;
  border-bottom-color: var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
/* Karty zleceń w jasnym trybie — wyraźne cienie zamiast ciemnych tła */
[data-theme="light"] .order-card {
  box-shadow: 0 2px 12px rgba(0,0,0,.1), 0 0 0 1px var(--border);
  background: #ffffff;
  border-color: transparent;
}
[data-theme="light"] .order-card:active {
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
[data-theme="light"] .order-card.new-order {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,.25), 0 4px 20px rgba(201,168,76,.12);
}
[data-theme="light"] .accept-panel {
  background: #fff;
  box-shadow: 0 -8px 32px rgba(0,0,0,.15);
}
[data-theme="light"] .accept-route {
  background: var(--surface2);
  border-color: var(--border);
}
[data-theme="light"] .msg-bubble.theirs {
  background: #e8e8ea; color: var(--text);
}
[data-theme="light"] .info-msg {
  background: #dcfce7; color: #15803d; border-color: #86efac;
}
[data-theme="light"] .passenger-card {
  background: #f0f0f2; border: 1px solid var(--border);
}
[data-theme="light"] .ride-status-btn {
  background: var(--gold); color: #000;
}
[data-theme="light"] .ride-status-btn.secondary {
  background: #f0f0f2; border-color: var(--border); color: var(--text);
}
[data-theme="light"] .nav-item { color: var(--text3); }
[data-theme="light"] .nav-item.active { color: var(--gold); }

/* ─── Chat ────────────────────────────────────────────────────────────── */
.chat-wrap {
  display: flex; flex-direction: column;
  height: calc(100dvh - var(--nav-h) - 57px - var(--safe-bot));
}

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 8px;
}

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px; line-height: 1.5;
  word-break: break-word;
}

.msg-bubble.mine {
  background: var(--gold);
  color: #000;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-bubble.theirs {
  background: var(--surface2);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-time { font-size: 10px; opacity: .6; margin-top: 4px; }

.chat-input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--surface2);
  background: var(--surface);
}

.chat-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--surface3);
  color: var(--text);
  border-radius: 22px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
}

.chat-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Login ───────────────────────────────────────────────────────────── */
.login-wrap {
  display: flex; flex-direction: column;
  min-height: 100dvh;
  padding: 0 24px;
  justify-content: center;
}

.login-logo {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  margin-bottom: 40px;
}

.login-logo-icon {
  width: 72px; height: 72px;
  background: var(--gold);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin-bottom: 8px;
}

.login-logo-title { font-size: 22px; font-weight: 800; }
.login-logo-sub   { font-size: 12px; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; }

.form-group { margin-bottom: 14px; }
.form-label { font-size: 12px; color: var(--text2); font-weight: 600; margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: .05em; }

.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface3);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}

/* ── Rating / Oceny ──────────────────────────────────────────────────── */
.stars-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 16px 0 20px;
}
.star-btn {
  font-size: 38px;
  cursor: pointer;
  background: none;
  border: none;
  filter: grayscale(1) opacity(.35);
  transition: filter .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  padding: 0;
}
.star-btn.active {
  filter: none;
  transform: scale(1.18);
}

.form-input:focus { border-color: var(--gold); }

.btn-primary {
  width: 100%; padding: 16px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-size: 16px; font-weight: 800;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity .2s;
}

.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.error-msg {
  background: var(--red-dim);
  border: 1px solid var(--red);
  color: #f87171;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}

.info-msg {
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,.3);
  color: var(--gold);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ─── Badges ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase; letter-spacing: .04em;
}

.badge-pending    { background: rgba(234,179,8,.12);  color: #facc15; }
.badge-confirmed  { background: rgba(59,130,246,.12); color: #60a5fa; }
.badge-inprogress { background: var(--green-dim);     color: var(--green); }
.badge-done       { background: var(--surface2);      color: var(--text3); }
.badge-cancelled  { background: var(--red-dim);       color: var(--red); }

/* ─── Toast ───────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; width: 90vw; max-width: 360px;
}

.toast {
  background: var(--surface2);
  border: 1px solid var(--surface3);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  animation: toastIn .25s ease, toastOut .3s ease forwards 3s;
  pointer-events: auto;
  text-align: center;
  width: 100%;
}

.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }
.toast.warning { border-color: var(--gold);  color: var(--gold); }

@keyframes toastIn  { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* ─── Loading overlay ─────────────────────────────────────────────────── */
#loading-overlay {
  position: fixed; inset: 0;
  background: rgba(13,13,13,.85);
  display: none; align-items: center; justify-content: center;
  z-index: 500;
}

#loading-overlay.show { display: flex; }

.loading-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--surface2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ─── Empty state ─────────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 24px;
  text-align: center;
  color: var(--text3);
}

.empty-icon { font-size: 52px; margin-bottom: 16px; opacity: .5; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.empty-sub { font-size: 13px; line-height: 1.6; }

/* ─── Leaflet overrides ───────────────────────────────────────────────── */
.leaflet-container { background: #111; }
.leaflet-control-attribution { display: none; }

/* ─── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ─── v5.3 UX Fixes ───────────────────────────────────────────────────── */

/* Elevation shadows — karty, panele, nav */
.page-header {
  box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 2px 12px rgba(0,0,0,.3);
}
#bottom-nav {
  box-shadow: 0 -8px 24px rgba(0,0,0,.4), 0 -1px 0 rgba(255,255,255,.05);
}
.passenger-card {
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.history-item {
  box-shadow: 0 1px 6px rgba(0,0,0,.25);
}

/* Ride status button — prominent primary action */
.ride-status-btn {
  box-shadow: 0 4px 16px rgba(201,168,76,.2);
}

/* Accept panel — elevation */
.accept-panel {
  box-shadow: 0 -8px 32px rgba(0,0,0,.55), 0 -1px 0 rgba(255,255,255,.06);
}

/* GO button on home — stronger glow */
#online-toggle {
  box-shadow: 0 0 0 0 rgba(201,168,76,.4), 0 12px 40px rgba(201,168,76,.35) !important;
}

/* Border on elements using surface2 bg — adds definition */
.car-card, .stat-card {
  border: 1px solid var(--border);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .order-card, .ride-status-btn, #online-toggle { animation: none !important; transition: none; }
  .accept-panel { transition: none; }
}

/* Skeleton loader animation */
@keyframes skeleton-pulse {
  0%,100% { opacity:.5 }
  50%     { opacity:1  }
}
.skeleton-line {
  height: 12px; border-radius: 6px;
  background: var(--surface2);
  animation: skeleton-pulse 1.5s ease infinite;
}

/* All interactive elements min 44x44 touch target */
button, a, [role="button"], [role="switch"] {
  min-height: 44px;
  /* Buttons w listach już mają własną wysokość — to reset-safe */
}
/* Ale kompaktowe tagi i meta-chipy mogą być mniejsze: */
.meta-chip, .tag, .pill { min-height: unset; }

/* Go-Online panel layout */
#go-panel   { min-height: calc(100dvh - 68px - env(safe-area-inset-bottom,0px)); }
#online-panel { flex: 1; display: flex; flex-direction: column; }

/* Empty state — wskazówka dla kierowcy offline */
.empty-state .empty-cta {
  margin-top: 16px;
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
}

/* Shimmer effect for skeletons */
@keyframes shimmer-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%);  }
}
.shimmer {
  position: relative; overflow: hidden;
  background: var(--surface2);
  border-radius: 8px;
}
.shimmer::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,transparent 0%,rgba(255,255,255,.04) 50%,transparent 100%);
  animation: shimmer-slide 1.4s infinite;
}
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }
