/* ==========================================================================
   iSafedrive — iOS-Native Design System
   White & Blue theme · Nigeria, Africa
   ========================================================================== */

/* ---- CSS custom properties ---- */
:root {
  --accent: #1463ff;
  --accent-light: #4a8aff;
  --accent-soft: #e8f0ff;
  --green: #1463ff;
  --amber: #f59e0b;
  --red: #ef4444;
  --bg: #f2f2f7;
  --panel: #ffffff;
  --panel2: #f9f9fb;
  --panel3: #e5e5ea;
  --text: #1c1c1e;
  --text2: #3a3a3c;
  --muted: #8e8e93;
  --faint: #aeaeb2;
  --line: rgba(60, 60, 67, 0.12);
  --line2: rgba(60, 60, 67, 0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);
  --blur: blur(20px);
  --blur-heavy: blur(40px);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 100px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', system-ui, sans-serif;
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.47;
  letter-spacing: -0.01em;
  overflow: hidden;
  height: 100dvh;
  width: 100vw;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
}

a { color: var(--accent); text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font-family: var(--font); -webkit-tap-highlight-color: transparent; cursor: pointer; }
input, select { font-family: var(--font); }
img { max-width: 100%; display: block; }
.mt { margin-top: 12px; }

/* ---- Typography ---- */
.h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.h3 { font-size: 17px; font-weight: 600; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.flex { display: flex; }
.between { justify-content: space-between; align-items: center; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }

/* ==========================================================================
   SPLASH SCREEN
   ========================================================================== */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--text);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-font-smoothing: antialiased;
  will-change: opacity, transform;
}

.splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}

.splash-logo {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  animation: splashPulse 2s ease-in-out infinite;
  border-radius: 44px;
}

.splash-logo img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: 44px;
}

@media (max-height: 650px) {
  .splash-logo, .splash-logo img { width: 140px; height: 140px; }
  .splash-title { font-size: 26px; }
}

@media (max-width: 400px) {
  .splash-logo, .splash-logo img { width: 160px; height: 160px; }
}

.splash-logo svg { width: 80px; height: 80px; }

.splash-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.splash-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.splash-role {
  margin-top: 32px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(20, 99, 255, 0.15);
}

.splash-dots {
  display: flex;
  gap: 8px;
  margin-top: 40px;
}

.splash-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--panel3);
  animation: dotBounce 1.4s ease-in-out infinite;
}

.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes splashPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes dotBounce {
  0%, 80%, 100% { background: var(--panel3); transform: scale(1); }
  40% { background: var(--accent); transform: scale(1.3); }
}

/* ==========================================================================
   TOP BAR (iOS-style)
   ========================================================================== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: calc(56px + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  padding-left: 16px;
  padding-right: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 0.5px solid var(--line);
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand .shield { width: 28px; height: 28px; flex-shrink: 0; }

.brand .sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.spacer { flex: 1; }

.safety-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

.safety-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ==========================================================================
   MAP
   ========================================================================== */
#map {
  position: fixed;
  top: calc(56px + var(--safe-top));
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  background: #e8f0fe;
}

/* ---- Map markers ---- */
.pickup-marker {
  width: 24px; height: 24px;
  background: var(--accent);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(20,99,255,0.5);
  animation: markerPulse 2s infinite;
}

@keyframes markerPulse {
  0% { box-shadow: 0 0 0 0 rgba(20,99,255,0.4); }
  70% { box-shadow: 0 0 0 12px rgba(20,99,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(20,99,255,0); }
}

.dropoff-marker {
  animation: dropBounce 0.5s ease-out;
}

@keyframes dropBounce {
  0% { transform: translateY(-20px); opacity: 0; }
  60% { transform: translateY(4px); }
  100% { transform: translateY(0); opacity: 1; }
}

.dropoff-pin { filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25)); }

.car-marker {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.route-line {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-casing {
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   PANEL (iOS-style bottom sheet)
   ========================================================================== */
.panel {
  position: fixed;
  top: calc(56px + var(--safe-top));
  left: 0;
  width: 420px;
  max-width: 100vw;
  bottom: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: var(--blur-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  border-right: 0.5px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 16px calc(20px + var(--safe-bottom));
}

/* iOS scroll indicators */
.panel::-webkit-scrollbar { width: 0; }

.screen { display: none; animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.screen.active { display: block; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (min-width: 900px) {
  .panel {
    left: 0;
    width: 400px;
    border-right: 0.5px solid var(--line);
    border-radius: 0;
  }
  #map {
    left: 400px;
  }
}

@media (max-width: 440px) {
  .panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-height: 45vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-right: none;
    z-index: 500;
  }
  #map {
    top: calc(56px + var(--safe-top));
    bottom: 0;
    left: 0;
    right: 0;
    display: block !important;
  }
}

/* ==========================================================================
   FORM CONTROLS (iOS-style)
   ========================================================================== */
.field {
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 48px;
  margin-top: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  gap: 10px;
}

.field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.12);
}

.field input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 16px;
  color: var(--text);
  min-width: 0;
}

.field input::placeholder { color: var(--faint); }

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

.dot.from { background: var(--accent); }
.dot.to { background: var(--red); }

.clear {
  border: none;
  background: var(--panel3);
  color: var(--muted);
  font-size: 14px;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.clear:active { background: var(--line); }

select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  padding: 0 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.2s;
  margin-top: 10px;
}

select:focus { border-color: var(--accent); outline: none; }

/* ---- Location button ---- */
.use-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 14px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  transition: background 0.15s, border-color 0.15s;
}

.use-loc:active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ---- Quick place chips ---- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
  transition: all 0.15s;
}

.chip:active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.chip .ic { font-size: 16px; }

/* ==========================================================================
   BUTTONS (iOS-style)
   ========================================================================== */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  padding: 15px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.15s;
}

.btn:active::after { background: rgba(0,0,0,0.08); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-danger {
  background: #fff;
  color: var(--red);
  border: 1px solid var(--red);
}

.btn-sm {
  display: inline-flex;
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--panel2);
  font-size: 20px;
  transition: all 0.15s;
}

.btn-icon:active { transform: scale(0.92); }

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ---- Segmented control ---- */
.seg {
  display: flex;
  background: var(--panel3);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 0;
}

.seg button {
  flex: 1;
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  padding: 9px;
  border-radius: 8px;
  transition: all 0.2s;
}

.seg button.on {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.seg.seg-sm { padding: 2px; border-radius: 8px; }
.seg.seg-sm button { font-size: 12px; padding: 6px 10px; border-radius: 6px; }

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.driver-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 1px solid var(--line);
  margin-top: 10px;
}

.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}

.driver-card .n { font-weight: 600; font-size: 15px; }
.driver-card .m { font-size: 13px; color: var(--muted); margin-top: 2px; }
.driver-card .stars { color: var(--amber); font-size: 12px; }

/* ---- Ride options ---- */
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--panel);
  margin-top: 8px;
  width: 100%;
  text-align: left;
  transition: all 0.2s;
}

.opt.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.1);
}

.opt .car { border-radius: var(--radius-sm); padding: 8px; }
.opt .t { font-weight: 600; font-size: 14px; }
.opt .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.opt .eta { font-size: 12px; color: var(--muted); }
.opt .price { font-size: 18px; font-weight: 800; color: var(--text); }

.surge-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 3px;
}

/* ---- Status box (iOS notification style) ---- */
.status-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 1px solid var(--line);
  margin-top: 12px;
}

.pulse-ring {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.pulse-ring::before {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(2.5); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.status-box .st-title { font-weight: 600; font-size: 15px; }
.status-box .st-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ==========================================================================
   SEARCHING
   ========================================================================== */
.searching-note { text-align: center; padding: 12px 0; }

.spinner {
  width: 44px; height: 44px;
  margin: 18px auto 14px;
  border: 3.5px solid var(--panel3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

/* ==========================================================================
   FARE BREAKDOWN
   ========================================================================== */
.fare-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
  color: var(--text2);
  border-bottom: 0.5px solid var(--line2);
}

.fare-row.total {
  border-bottom: none;
  font-weight: 700;
  font-size: 17px;
  padding-top: 12px;
  color: var(--text);
}

/* ---- Stars / Rating ---- */
.stars-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.stars-row button {
  font-size: 32px;
  background: none;
  border: none;
  color: var(--panel3);
  transition: all 0.15s;
  padding: 4px;
}

.stars-row button.on { color: var(--amber); transform: scale(1.1); }

.tips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.tip-chip {
  background: var(--panel2);
  border: 1.5px solid var(--line);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  transition: all 0.15s;
}

.tip-chip.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Receipt ---- */
.receipt-check {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
}

.share-code {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 16px;
  margin: 16px 0;
  background: var(--panel2);
  border-radius: var(--radius-md);
  color: var(--accent);
  border: 1.5px dashed var(--accent);
}

/* ==========================================================================
   ONLINE / OFFLINE SWITCH (iOS-style toggle)
   ========================================================================== */
.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: var(--panel3);
  border-radius: 100px;
  padding: 4px 14px 4px 6px;
  height: 34px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.3s;
  flex-shrink: 0;
}

.switch.on {
  background: #dcfce7;
  color: #16a34a;
}

.switch .knob {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch.on .knob { transform: translateX(4px); }

.driver-select {
  margin-top: 0;
  height: 34px;
  font-size: 13px;
  width: auto;
  min-width: 180px;
}

/* ---- Stats strip ---- */
.stats-strip {
  display: flex;
  gap: 8px;
}

.stat-card {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
}

.stat-card .v {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.stat-card .l {
  font-size: 10px;
  color: var(--faint);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* ==========================================================================
   MODALS (iOS alert style)
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--panel);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 20px calc(24px + var(--safe-bottom));
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-center {
  align-items: center;
}

.modal-center .modal {
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
  max-width: 340px;
}

.sos-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #fee2e2;
  color: var(--red);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

/* ==========================================================================
   HISTORY SCREEN
   ========================================================================== */
.history-stats { display: flex; gap: 8px; }

.history-stats .stat-card { flex: 1; }
.history-stats .stat-card .v { color: var(--accent); }

.hist-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.hist-card:active {
  transform: scale(0.98);
  background: var(--panel2);
}

.hist-route {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.hist-meta { display: flex; justify-content: space-between; align-items: flex-start; }

.hist-left { flex: 1; min-width: 0; }

.hist-driver {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hist-right { text-align: right; flex-shrink: 0; margin-left: 12px; }

.hist-fare { font-weight: 800; font-size: 16px; }
.hist-date { font-size: 12px; color: var(--faint); margin-top: 2px; }

.hist-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  margin-top: 8px;
}

.hist-badge.completed {
  background: #dcfce7;
  color: #166534;
}

.hist-badge.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.hist-stars { color: #f59e0b; font-size: 13px; margin-top: 3px; }

.hist-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---- History search ---- */
.hist-search {
  display: flex;
  align-items: center;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 12px;
  height: 42px;
  margin-top: 10px;
  gap: 8px;
}

.hist-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
}

.hist-search input::placeholder { color: var(--faint); }

.hist-search-icon {
  color: var(--faint);
  font-size: 16px;
}

/* ==========================================================================
   AUTH SCREENS (Login / Register) — Fullscreen, iOS-native
   ========================================================================== */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 24px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 20px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  will-change: opacity, transform;
}

.auth-screen.fade-in {
  animation: authSlideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-screen.slide-out-left {
  animation: authSlideOutLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.auth-screen.slide-in-right {
  animation: authSlideInRight 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes authSlideOutLeft {
  to { opacity: 0; transform: translateX(-30px) scale(0.97); }
}

@keyframes authSlideInRight {
  from { opacity: 0; transform: translateX(30px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes authAppReveal {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.auth-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-scroll {
  padding-bottom: 40px;
}

.auth-logo {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  margin-top: 0;
}

.auth-logo img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 40px;
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  color: #1c1c1e !important;
  margin-bottom: 2px;
}

.auth-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: #6b7280 !important;
  text-align: center;
  margin-bottom: 16px;
}

.auth-container .field {
  width: 100%;
  background: #ffffff !important;
  border-color: #d1d5db !important;
}

.auth-container .field input {
  color: #1c1c1e !important;
  background: transparent !important;
}

.auth-container .field input::placeholder {
  color: #9ca3af !important;
}

.auth-container .muted,
.auth-container .small {
  color: #6b7280 !important;
}

.auth-container a {
  color: #1463ff !important;
  font-weight: 600;
}

.auth-container .btn {
  color: #ffffff !important;
}

.auth-container .toggle-pw {
  color: #6b7280 !important;
}

.auth-container .h3,
.auth-container .h2 {
  color: #1c1c1e !important;
}

.auth-container .checkbox-row span {
  color: #374151 !important;
}



.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
  z-index: 2;
}

/* ---- Divider line ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---- Biometric button ---- */
.btn-biometric {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-biometric:active {
  transform: scale(0.97);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.btn-biometric .bio-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.btn-biometric .bio-pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0;
  animation: bioPulse 1.5s ease-in-out infinite;
}

.btn-biometric.scanning .bio-pulse {
  opacity: 0.08;
}

.btn-biometric.scanning .bio-icon {
  animation: bioSpin 1s linear infinite;
}

@keyframes bioPulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.08; }
}

@keyframes bioSpin {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ---- Screen transition for app entry ---- */
.panel.app-enter {
  animation: authAppReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar.app-enter {
  animation: topbarSlideDown 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes topbarSlideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   REGISTRATION FORMS
   ========================================================================== */
.reg-errors {
  background: #fee2e2;
  color: #991b1b;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
}

.reg-errors div + div { margin-top: 4px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* ---- Document upload ---- */
.doc-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.doc-upload:active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.doc-upload.uploaded {
  border-style: solid;
  border-color: #22c55e;
  background: #f0fdf4;
}

.doc-icon { font-size: 24px; flex-shrink: 0; }
.doc-label { font-size: 14px; font-weight: 500; color: var(--text2); }

.driver-reg-select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  padding: 0 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  margin-top: 10px;
}

/* ==========================================================================
   OTP VERIFICATION
   ========================================================================== */
.otp-container {
  text-align: center;
  padding: 20px 0;
}

.otp-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
}

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.otp-inputs input {
  width: 48px;
  height: 56px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel);
  transition: border-color 0.2s;
  outline: none;
}

.otp-inputs input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.12);
}

.otp-inputs input.filled {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.otp-timer {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}

.otp-resend {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  margin-top: 8px;
  padding: 8px;
}

.otp-resend:disabled {
  color: var(--faint);
  cursor: default;
}

/* ==========================================================================
   FLOATING CHAT BUTTONS
   ========================================================================== */
.fab {
  position: fixed;
  z-index: 1500;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab:active { transform: scale(0.9); }

.fab-chat {
  bottom: calc(24px + var(--safe-bottom));
  right: 20px;
  background: var(--accent);
  color: #fff;
}

.fab-help {
  bottom: calc(90px + var(--safe-bottom));
  right: 20px;
  background: var(--panel);
  color: var(--accent);
  border: 1.5px solid var(--line);
}

.fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Chat Panel ---- */
.chat-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 65vh;
  z-index: 2000;
  background: var(--panel);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 0.5px solid var(--line);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.chat-header .avatar { width: 36px; height: 36px; font-size: 13px; }
.chat-header .n { font-weight: 600; font-size: 15px; }
.chat-header .status { font-size: 12px; color: #22c55e; }
.chat-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
  padding: 4px;
}

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

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  animation: bubbleIn 0.2s ease-out;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble.sent {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.chat-bubble.received {
  align-self: flex-start;
  background: var(--panel2);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.chat-bubble .time {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 0.5px solid var(--line);
  background: var(--panel);
}

.chat-input-bar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background: var(--panel2);
  transition: border-color 0.2s;
}

.chat-input-bar input:focus { border-color: var(--accent); }

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.chat-send:active { transform: scale(0.9); }

/* ---- Helpdesk ---- */
.help-panel .chat-header {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
}

.help-panel .chat-header .n { color: #fff; }
.help-panel .chat-header .status { color: rgba(255,255,255,0.8); }
.help-panel .chat-close { color: rgba(255,255,255,0.8); }

/* ==========================================================================
   TRIP DETAILS MODAL
   ========================================================================== */
.trip-detail-route {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.trip-detail-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.trip-detail-map {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-md);
  background: var(--panel3);
  margin-bottom: 16px;
  overflow: hidden;
}

.trip-detail-section {
  margin-bottom: 14px;
}

.trip-detail-section .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.trip-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.trip-detail-row .key { color: var(--muted); }
.trip-detail-row .val { font-weight: 600; }

/* ---- Trip Calculator ---- */
.calc-result {
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-top: 16px;
  border: 1.5px solid var(--accent);
}

.calc-result .fare {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.calc-result .meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.calc-breakdown {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.calc-chip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  text-align: center;
  flex: 1;
}

.calc-chip .v { font-weight: 700; font-size: 14px; }
.calc-chip .l { font-size: 11px; color: var(--faint); margin-top: 2px; }

/* ==========================================================================
   TOAST (iOS banner style)
   ========================================================================== */
#toast {
  position: fixed;
  top: calc(70px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 9000;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   UTILITY / ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); }

/* ---- 3D Map styles ---- */
.map-3d-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px;
  border-radius: 100px;
  box-shadow: var(--shadow-lg);
}

.map-3d-controls button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: var(--panel2);
  color: var(--text);
  transition: all 0.15s;
}

.map-3d-controls button.on {
  background: var(--accent);
  color: #fff;
}

/* ---- Responsive fine-tuning ---- */
@media (max-width: 380px) {
  .brand { font-size: 16px; }
  .brand .shield { width: 24px; height: 24px; }
  .safety-pill { font-size: 11px; padding: 5px 10px; }
  .otp-inputs input { width: 40px; height: 48px; font-size: 18px; }
  .auth-logo { width: 150px; height: 150px; }
  .auth-logo img { width: 150px; height: 150px; }
  .auth-title { font-size: 24px; }
  .auth-screen { padding: 0 20px; }
}

@media (max-height: 700px) {
  .splash-logo { width: 80px; height: 80px; }
  .splash-logo img { width: 80px; height: 80px; }
  .splash-logo svg { width: 40px; height: 40px; }
  .splash-title { font-size: 26px; }
  .auth-logo { width: 130px; height: 130px; }
  .auth-logo img { width: 130px; height: 130px; }
}

@media (min-width: 900px) {
  .auth-screen {
    padding-top: 60px;
  }
}

/* Fullscreen on iOS */
@supports (height: 100dvh) {
  .splash-screen, .auth-screen { height: 100dvh; }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --panel: #1c1c1e;
    --panel2: #2c2c2e;
    --panel3: #3a3a3c;
    --text: #ffffff;
    --text2: #e5e5ea;
    --muted: #8e8e93;
    --faint: #636366;
    --line: rgba(84, 84, 88, 0.6);
    --line2: rgba(84, 84, 88, 0.3);
  }

  /* Keep auth screens light in dark mode */
  .auth-screen {
    background: #ffffff !important;
  }
  .auth-screen, .auth-screen * {
    color-scheme: light !important;
  }
  .auth-screen .auth-title { color: #1c1c1e !important; }
  .auth-screen .auth-subtitle { color: #6b7280 !important; }
  .auth-screen .muted, .auth-screen .small { color: #6b7280 !important; }
  .auth-screen a { color: #1463ff !important; }
  .auth-screen .checkbox-row span { color: #374151 !important; }
  .auth-screen .toggle-pw { color: #6b7280 !important; }

  .topbar { background: rgba(28, 28, 30, 0.82); }
  .panel { background: rgba(28, 28, 30, 0.92); }
  .modal { background: var(--panel); }
  .chat-panel { background: var(--panel); }
}

/* ==========================================================================
   FARE SPLIT
   ========================================================================== */
.split-card {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 12px;
}

.split-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.split-header .h3 {
  font-size: 15px;
}

.split-members {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.split-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel2);
  border-radius: var(--radius-sm);
}

.split-member .avatar {
  width: 34px; height: 34px;
  font-size: 12px;
}

.split-member .grow {
  flex: 1;
}

.split-member .name {
  font-size: 14px;
  font-weight: 600;
}

.split-member .share {
  font-size: 13px;
  color: var(--muted);
}

.split-member .amount {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}

.split-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  background: none;
  width: 100%;
  margin-top: 8px;
  transition: all 0.15s;
}

.split-add-btn:active {
  background: var(--accent-soft);
}

.split-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.split-total-row .label {
  font-size: 13px;
  color: var(--muted);
}

.split-total-row .value {
  font-size: 16px;
  font-weight: 700;
}

.split-invite-modal {
  text-align: center;
}

.split-code {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  border: 1.5px dashed var(--accent);
}

/* ==========================================================================
   SCHEDULED RIDES
   ========================================================================== */
.schedule-picker {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 12px;
}

.schedule-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.schedule-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  min-width: 50px;
}

.schedule-input {
  flex: 1;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 15px;
  color: var(--text);
  background: var(--panel2);
  outline: none;
  font-family: var(--font);
  transition: border-color 0.2s;
}

.schedule-input:focus {
  border-color: var(--accent);
}

.schedule-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #eff6ff;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--accent);
  line-height: 1.4;
}

.schedule-notice .icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.schedule-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eff6ff;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  margin-top: 4px;
}

/* ==========================================================================
   PUSH NOTIFICATION TOAST
   ========================================================================== */
.notif-banner {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 16px;
  right: 16px;
  z-index: 9500;
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: notifSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 0.5px solid var(--line);
  max-width: 400px;
  margin: 0 auto;
}

.notif-banner.hide-anim {
  animation: notifSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes notifSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-40px); }
}

.notif-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.notif-content .title {
  font-size: 14px;
  font-weight: 600;
}

.notif-content .body {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.notif-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  padding: 4px;
}

/* ==========================================================================
   GPS TRACKING ANIMATION
   ========================================================================== */
.car-marker {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.gps-trail {
  opacity: 0.3;
  stroke-dasharray: 4 4;
}

.tracking-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

.tracking-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: trackingPulse 1.5s infinite;
}

@keyframes trackingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ==========================================================================
   NOTIFICATION PERMISSION BANNER
   ========================================================================== */
.notif-perm {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  margin-top: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.notif-perm:active {
  transform: scale(0.98);
}

.notif-perm .icon {
  font-size: 22px;
  flex-shrink: 0;
}

.notif-perm .text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  line-height: 1.4;
}

.notif-perm .arrow {
  color: var(--muted);
  font-size: 14px;
}

/* ==========================================================================
   WALLET
   ========================================================================== */
.wallet-card {
  background: linear-gradient(135deg, var(--accent) 0%, #0044cc 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.wallet-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.wallet-balance {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wallet-label {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.wallet-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.wallet-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.wallet-btn-topup {
  background: #fff;
  color: var(--accent);
}

.wallet-btn-withdraw {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.wallet-btn:active { transform: scale(0.97); }

.wallet-txns {
  margin-top: 16px;
}

.wallet-txn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--line);
}

.wallet-txn:last-child { border-bottom: none; }

.wallet-txn-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.wallet-txn-icon.credit { background: #dcfce7; }
.wallet-txn-icon.debit { background: #fee2e2; }

.wallet-txn-info { flex: 1; min-width: 0; }
.wallet-txn-title { font-size: 14px; font-weight: 600; }
.wallet-txn-date { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wallet-txn-amount { font-size: 15px; font-weight: 700; text-align: right; }
.wallet-txn-amount.credit { color: #16a34a; }
.wallet-txn-amount.debit { color: var(--red); }

/* ---- Top-up presets ---- */
.topup-preset {
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.topup-preset:active,
.topup-preset.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Earnings screen ---- */
.earnings-tabs {
  display: flex;
  gap: 0;
  background: var(--panel3);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-top: 12px;
}

.earnings-tabs button {
  flex: 1;
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  padding: 9px;
  border-radius: 8px;
  transition: all 0.2s;
}

.earnings-tabs button.on {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.earnings-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding: 12px 0;
}

.earnings-bar {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: var(--accent-soft);
  position: relative;
  min-height: 8px;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.earnings-bar.highlight {
  background: var(--accent);
}

.earnings-bar-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.earnings-bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* ---- Calendar view ---- */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.calendar-header button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.calendar-grid .day-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 0;
}

.calendar-grid .day-cell {
  padding: 8px 2px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.calendar-grid .day-cell:hover { background: var(--panel3); }
.calendar-grid .day-cell.today { background: var(--accent); color: #fff; font-weight: 700; }
.calendar-grid .day-cell.has-rides::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.calendar-grid .day-cell.today.has-rides::after { background: #fff; }
.calendar-grid .day-cell.other-month { color: var(--faint); }
.calendar-grid .day-cell.selected { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* ==========================================================================
   SURGE PRICING
   ========================================================================== */
.surge-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #c2410c;
}

.surge-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid #fed7aa;
}

.surge-zone-overlay {
  opacity: 0.25;
  border: 2px solid #ef4444;
  fill: #ef4444;
}
