/* ═══════════════════════════════════════════════════════════
   UTKARSH CABS — Global Design System
   Covers: Customer PWA · Driver Portal · Admin Panel
   Font: DM Sans (body) + DM Serif Display (headings)
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:         #0f1923;
  --bg2:        #161f2b;
  --bg3:        #1c2736;
  --surface:    #1e2d3d;
  --surface2:   #243345;
  --surface3:   #2a3b50;

  /* Borders */
  --border:     rgba(255,255,255,0.08);
  --border2:    rgba(255,255,255,0.14);
  --border3:    rgba(255,255,255,0.22);

  /* Brand */
  --accent:     #f5c800;
  --accent2:    #e8941a;
  --accent3:    #d4830f;
  --accent-dim: rgba(245,166,35,0.12);
  --accent-glow:rgba(245,166,35,0.22);

  /* Semantic */
  --success:       #34c785;
  --success-dim:   rgba(52,199,133,0.12);
  --danger:        #e85d5d;
  --danger-dim:    rgba(232,93,93,0.12);
  --warning:       #f5c800;
  --warning-dim:   rgba(245,166,35,0.12);
  --info:          #4da8e8;
  --info-dim:      rgba(77,168,232,0.12);

  /* Text */
  --text:      #f0ede8;
  --text2:     #9aabb8;
  --text3:     #5f7282;
  --text4:     #3d4f5e;

  /* Typography */
  --sans:    'DM Sans', system-ui, -apple-system, sans-serif;
  --serif:   'DM Serif Display', Georgia, serif;
  --mono:    'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;

  /* Radii */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);

  /* Transitions */
  --ease:    cubic-bezier(0.4,0,0.2,1);
  --dur:     0.2s;
  --dur-md:  0.28s;
  --dur-lg:  0.4s;

  /* Layout */
  --max-w:         430px;   /* Customer / Driver: mobile max */
  --admin-sidebar: 220px;   /* Admin panel sidebar width */
  --topbar-h:      56px;
  --bottomnav-h:   64px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border3); }

/* ── Focus visible ─────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ════════════════════════════════════════════════════════════
   LAYOUT — App Shell (Customer + Driver: mobile single column)
   ════════════════════════════════════════════════════════════ */

.app-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
}

.scroll-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 56px;
  padding-bottom: calc(var(--bottomnav-h) + 16px);
  -webkit-overflow-scrolling: touch;
  view-transition-name: main-content;
  scrollbar-width: none;
}
.scroll-body::-webkit-scrollbar { display: none; }

/* No bottom nav padding for admin */
.admin-body .scroll-body { padding-bottom: 16px; }

/* ── Top Bar ────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  padding: 12px 18px 10px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
  flex-shrink: 0;
}

.top-bar h1, .top-bar .page-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.3px;
  flex: 1;
}

.top-bar .top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Back button */
.btn-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
}
.btn-back:hover { background: var(--surface2); color: var(--text); }

/* ── Bottom Navigation (Customer + Driver) ─────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 40;
  height: var(--bottomnav-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  cursor: pointer;
  color: var(--text3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--dur) var(--ease);
  border: none;
  background: none;
  font-family: var(--sans);
  position: relative;
  text-decoration: none;
}
.nav-item svg, .nav-item i { font-size: 22px; line-height: 1; }
.nav-item:hover { color: var(--text2); }
.nav-item.active { color: var(--accent); }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 var(--r-full) var(--r-full);
}

/* Notification badge on nav item */
.nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 14px);
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  border-radius: var(--r-full);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ════════════════════════════════════════════════════════════
   ADMIN LAYOUT — sidebar + main content (desktop-first)
   ════════════════════════════════════════════════════════════ */

.admin-shell {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

.admin-sidebar {
  width: var(--admin-sidebar);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  overflow-y: auto;
}

.admin-sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-sidebar-logo span {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.2px;
}

.admin-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-nav-section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text4);
  padding: 12px 10px 6px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--r-md);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  border: none;
  background: none;
  font-family: var(--sans);
  text-decoration: none;
  width: 100%;
  text-align: left;
  position: relative;
}
.admin-nav-item i, .admin-nav-item svg { font-size: 18px; flex-shrink: 0; color: var(--text3); }
.admin-nav-item:hover { background: var(--surface); color: var(--text); }
.admin-nav-item:hover i { color: var(--text2); }
.admin-nav-item.active { background: var(--accent-dim); color: var(--accent); }
.admin-nav-item.active i { color: var(--accent); }
.admin-nav-item .nav-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--danger);
  color: #fff;
  border-radius: var(--r-full);
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

.admin-main {
  margin-left: var(--admin-sidebar);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-topbar-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.3px;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-content {
  padding: 24px;
  flex: 1;
}

/* Admin mobile sidebar toggle */
.admin-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform var(--dur-md) var(--ease);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-menu-btn { display: flex; }
  .admin-content { padding: 16px; }
  .admin-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 55; display: none;
  }
  .admin-overlay.show { display: block; }
}

/* ════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ════════════════════════════════════════════════════════════ */

.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }

.page-heading {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.2;
}
.page-subheading {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text3);
}

.text-xs   { font-size: 11px; }
.text-sm   { font-size: 13px; }
.text-base { font-size: 15px; }
.text-lg   { font-size: 17px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }

.text-muted   { color: var(--text2); }
.text-dim     { color: var(--text3); }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-info    { color: var(--info); }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.1px;
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}
.btn svg, .btn i { font-size: 17px; flex-shrink: 0; }

/* Full width */
.btn-block { width: 100%; }

/* Sizes */
.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  border-radius: var(--r-sm);
}
/* When btn-icon and btn-sm are combined, btn-sm's padding must not override */
.btn-icon.btn-sm {
  padding: 0;
  border-radius: 50%;
  /* Inherit the centered-flex layout from .btn-icon */
}

.btn-lg {
  padding: 16px 28px;
  font-size: 16px;
  border-radius: var(--r-lg);
}

/* Variants */
.btn-primary {
  background: var(--accent);
  color: #0f1923;
}
.btn-primary:hover:not(:disabled) { background: var(--accent2); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface3); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(232,93,93,0.25);
}
.btn-danger:hover:not(:disabled) { background: rgba(232,93,93,0.2); }

.btn-success {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(52,199,133,0.25);
}

.btn-link {
  background: none;
  color: var(--accent);
  border: none;
  padding: 4px 0;
  font-weight: 500;
}
.btn-link:hover { color: var(--accent2); }

/* Icon-only button */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  flex-shrink: 0;
  /* Fix: must be flex to centre the SVG child */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;   /* when used as <a> */
  line-height: 1;
}
.btn-icon:hover { background: var(--surface2); color: var(--text); }
.btn-icon svg   { display: block; flex-shrink: 0; }

/* Loading state */
.btn.loading { pointer-events: none; }
.btn.loading .btn-text { opacity: 0; }
.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(15,25,35,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-primary.loading::after { border-top-color: #0f1923; }
.btn-secondary.loading::after, .btn-ghost.loading::after { border-top-color: var(--text); }

/* ════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ════════════════════════════════════════════════════════════ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text3);
}

.form-control {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--dur) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.form-control::placeholder { color: var(--text3); }
.form-control:focus { border-color: var(--accent); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
.form-control[readonly] { background: var(--surface); cursor: default; }

/* Input with icon */
.input-wrap {
  position: relative;
}
.input-wrap .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 16px;
  pointer-events: none;
}
.input-wrap .form-control { padding-left: 38px; }
.input-wrap .input-icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 16px;
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%235f7282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}
select.form-control option { background: var(--bg2); color: var(--text); }

/* Date/time inputs */
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control {
  color-scheme: dark;
}

/* Search input */
.search-wrap { position: relative; }
.search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 16px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 10px 14px 10px 38px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus { border-color: var(--accent); }

/* Form validation */
.form-control.error { border-color: var(--danger); }
.form-error {
  font-size: 11px;
  color: var(--danger);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-hint {
  font-size: 11px;
  color: var(--text3);
}

/* Checkbox & Radio */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  user-select: none;
}
.check-row input[type="checkbox"],
.check-row input[type="radio"] {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border2);
  border-radius: 4px;
  background: var(--bg3);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all var(--dur) var(--ease);
}
.check-row input[type="radio"] { border-radius: 50%; }
.check-row input[type="checkbox"]:checked,
.check-row input[type="radio"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 6px; height: 10px;
  border: 2px solid #0f1923;
  border-left: none; border-top: none;
  transform: rotate(45deg);
}
.check-row input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: #0f1923;
  border-radius: 50%;
}

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-full);
  transition: all var(--dur) var(--ease);
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 2px; top: 2px;
  background: var(--text2);
  border-radius: 50%;
  transition: all var(--dur) var(--ease);
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: #0f1923; }

/* ════════════════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════════════════ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.card-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.card-subtitle {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

.card-body { padding: 16px 18px; }
.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg3);
}

/* Clickable card */
.card-link {
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  text-decoration: none;
  display: block;
  color: inherit;
}
.card-link:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
  text-decoration: none;
}
.card-link:active { transform: none; }

/* Stat card */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.stat-card .stat-meta {
  font-size: 12px;
  color: var(--text2);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.stat-delta-up   { color: var(--success); }
.stat-delta-down { color: var(--danger); }

/* ════════════════════════════════════════════════════════════
   BADGES & PILLS
   ════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge i, .badge svg { font-size: 12px; }

.badge-accent  { background: var(--accent-dim);   color: var(--accent);  border: 1px solid rgba(245,166,35,0.2); }
.badge-success { background: var(--success-dim);  color: var(--success); border: 1px solid rgba(52,199,133,0.2); }
.badge-danger  { background: var(--danger-dim);   color: var(--danger);  border: 1px solid rgba(232,93,93,0.2); }
.badge-info    { background: var(--info-dim);     color: var(--info);    border: 1px solid rgba(77,168,232,0.2); }
.badge-neutral { background: var(--surface2);     color: var(--text2);   border: 1px solid var(--border); }
.badge-warning { background: var(--warning-dim);  color: var(--warning); border: 1px solid rgba(245,166,35,0.2); }

/* Ride status badges */
.badge-enquiry        { background:rgba(77,168,232,0.1);  color:var(--info);    border:1px solid rgba(77,168,232,0.2); }
.badge-confirmed      { background:rgba(245,166,35,0.12); color:var(--accent);  border:1px solid rgba(245,166,35,0.2); }
.badge-driver_assigned{ background:rgba(245,166,35,0.12); color:var(--accent);  border:1px solid rgba(245,166,35,0.2); }
.badge-started        { background:rgba(52,199,133,0.1);  color:var(--success); border:1px solid rgba(52,199,133,0.2); }
.badge-in_progress    { background:rgba(52,199,133,0.12); color:var(--success); border:1px solid rgba(52,199,133,0.2); }
.badge-reached        { background:rgba(52,199,133,0.1);  color:var(--success); border:1px solid rgba(52,199,133,0.2); }
.badge-waiting        { background:rgba(245,166,35,0.1);  color:var(--warning); border:1px solid rgba(245,166,35,0.2); }
.badge-completed      { background:rgba(52,199,133,0.08); color:var(--success); border:1px solid rgba(52,199,133,0.15); }
.badge-cancelled      { background:rgba(232,93,93,0.1);   color:var(--danger);  border:1px solid rgba(232,93,93,0.2); }
.badge-breakdown      { background:rgba(232,93,93,0.1);   color:var(--danger);  border:1px solid rgba(232,93,93,0.2); }

/* Dot indicator */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-success { background: var(--success); }
.dot-danger  { background: var(--danger); }
.dot-accent  { background: var(--accent); }
.dot-info    { background: var(--info); }
.dot-neutral { background: var(--text3); }

/* ════════════════════════════════════════════════════════════
   LISTS & ROWS (ride cards, driver cards, etc.)
   ════════════════════════════════════════════════════════════ */

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
  text-decoration: none;
  color: inherit;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface2); }
.list-row:active { background: var(--surface3); }

.list-row-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text2);
  flex-shrink: 0;
}

.list-row-body { flex: 1; min-width: 0; }
.list-row-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row-sub {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.list-row-right .amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.list-row-right .time {
  font-size: 11px;
  color: var(--text3);
}

/* Ride card (bigger, with route display) */
.ride-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 10px;
}
.ride-card-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.ride-card-ref {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text3);
}
.ride-card-body { padding: 14px 16px; }
.ride-card-route {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  padding-left: 18px;
}
.ride-card-route::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border2) 0, var(--border2) 4px,
    transparent 4px, transparent 8px
  );
}
.route-point {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  position: relative;
}
.route-point::before {
  content: '';
  position: absolute;
  left: -14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.route-point.pickup::before { background: var(--success); }
.route-point.drop::before   { background: var(--accent); }
.route-point .rp-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  width: 38px;
  flex-shrink: 0;
}
.route-point .rp-addr {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ride-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ════════════════════════════════════════════════════════════
   TABLES (Admin)
   ════════════════════════════════════════════════════════════ */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
table.data-table {
  width: 100%;
  font-size: 13px;
}
.data-table thead tr {
  border-bottom: 1px solid var(--border);
}
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface2); }
.data-table td .cell-primary { color: var(--text); font-weight: 500; margin-bottom: 2px; }
.data-table td .cell-sub     { font-size: 11px; color: var(--text3); }
.data-table .col-actions     { text-align: right; white-space: nowrap; }

/* ════════════════════════════════════════════════════════════
   SECTION HEADINGS (page sections with padding)
   ════════════════════════════════════════════════════════════ */

.section-head {
  padding: 20px 18px 12px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.4px;
  color: var(--text);
  line-height: 1.2;
}
.section-head p {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
}

.px-page { padding-left: 18px; padding-right: 18px; }
.py-page { padding-top: 16px; padding-bottom: 16px; }
.p-page  { padding: 16px 18px; }

/* ════════════════════════════════════════════════════════════
   MODALS & BOTTOM SHEETS
   ════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-md) var(--ease);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.bottom-sheet {
  width: 100%;
  max-width: var(--max-w);
  background: var(--bg2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding-bottom: env(safe-area-inset-bottom, 16px);
  transform: translateY(100%);
  transition: transform var(--dur-lg) cubic-bezier(0.32,0.72,0,1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border2);
  border-radius: var(--r-full);
  margin: 12px auto 8px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.sheet-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
}
.sheet-body { padding: 20px; }

/* ── Policy modals (Privacy / Terms) — v2.2.2 ─────────────────
   A tall bottom-sheet whose header stays fixed while the long
   legal copy scrolls inside its own viewport.                   */
.policy-sheet { display: flex; flex-direction: column; max-height: 88vh; }
.policy-sheet .sheet-header {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.policy-body {
  /* 25px left · 25px right · 25px bottom — as specified */
  padding: 8px 25px 25px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}
.policy-body h3 {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin: 24px 0 9px; letter-spacing: .01em;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.policy-body h3:first-child { margin-top: 10px; }
.policy-body p {
  font-size: 13px; line-height: 1.72; color: var(--text2);
  margin: 0 0 12px;
}
/* Top-level list item — clear spacing between each bullet */
.policy-body li {
  font-size: 13px; line-height: 1.72; color: var(--text2);
  margin: 0 0 12px;      /* 12px gap between bullet points */
  padding-left: 3px;
}
/* Top-level bullet list */
.policy-body ul {
  margin: 6px 0 14px;
  padding-left: 24px;    /* 24px total indent for top-level bullets */
}
/* Sub-points — nested ul indented further */
.policy-body ul ul {
  margin: 8px 0 6px;
  padding-left: 20px;    /* additional 20px from parent bullet marker */
}
.policy-body ul ul li {
  margin-bottom: 7px;
  list-style-type: circle;   /* hollow circle distinguishes sub-bullets */
  color: var(--text3);       /* slightly dimmer for hierarchy */
}
/* Numbered list */
.policy-body ol {
  margin: 6px 0 14px;
  padding-left: 24px;
}
.policy-body ol li { margin-bottom: 12px; }
.policy-body strong { color: var(--text); font-weight: 600; }
.policy-body a { color: var(--accent); text-decoration: none; }
/* Date / version meta line */
.policy-meta {
  font-size: 11.5px; color: var(--text3);
  margin: 0 0 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  line-height: 1.65;
}
/* Cross-link at bottom of each policy */
.policy-switch {
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text3);
  line-height: 1.7;
}
.policy-switch button {
  display: block;            /* force the link onto its own line */
  background: none; border: none; padding: 2px 0 0;
  color: var(--accent); font-weight: 600; font-size: inherit;
  cursor: pointer; font-family: inherit;
  text-decoration: none;
}

/* Admin modal (centered) */
.modal-overlay.modal-center { align-items: center; }
.modal-dialog {
  width: calc(100% - 32px);
  max-width: 480px;
  background: var(--bg2);
  border-radius: var(--r-xl);
  border: 1px solid var(--border2);
  /* Allow the dialog to shrink on short viewports but never overflow */
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;  /* children use overflow-y:auto instead */
  transform: scale(0.96) translateY(10px);
  transition: transform var(--dur-md) var(--ease);
}
.modal-overlay.open .modal-dialog {
  transform: scale(1) translateY(0);
}
/* Body of the dialog scrolls independently */
.modal-dialog-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;         /* takes all space between header and footer */
  -webkit-overflow-scrolling: touch;
}
.modal-dialog-header {
  padding: 16px 20px 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.modal-dialog-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  flex: 1;
  min-width: 0;
}
/* Close button inside modal header — centred in its circle */
.modal-dialog-header .btn-icon {
  flex-shrink: 0;
  margin: 0;
  align-self: center;
}
.modal-dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   TOASTS
   ════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: calc(var(--max-w) - 32px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* Admin toasts appear top-right */
.admin-shell .toast-container {
  left: auto;
  right: 24px;
  transform: none;
  max-width: 360px;
}

.toast {
  padding: 11px 15px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  pointer-events: all;
  animation: toastIn 0.3s var(--ease);
  box-shadow: var(--shadow-md);
}
.toast i, .toast svg { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.toast.success { background: rgba(52,199,133,0.15); border: 1px solid rgba(52,199,133,0.3); color: var(--success); }
.toast.error   { background: rgba(232,93,93,0.15);  border: 1px solid rgba(232,93,93,0.3);  color: var(--danger); }
.toast.info    { background: rgba(77,168,232,0.15); border: 1px solid rgba(77,168,232,0.3); color: var(--info); }
.toast.warning { background: rgba(245,166,35,0.15); border: 1px solid rgba(245,166,35,0.3); color: var(--warning); }

/* ════════════════════════════════════════════════════════════
   SKELETON LOADERS
   ════════════════════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
.sk-text  { height: 14px; width: 100%; }
.sk-text-sm { height: 12px; }
.sk-circle { border-radius: 50%; }
.sk-card {
  height: 80px;
  border-radius: var(--r-lg);
  margin-bottom: 10px;
}

/* ════════════════════════════════════════════════════════════
   DIVIDERS
   ════════════════════════════════════════════════════════════ */

.divider { height: 1px; background: var(--border); }
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
}
.divider-label::before, .divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ════════════════════════════════════════════════════════════
   DRIVER-SPECIFIC COMPONENTS
   ════════════════════════════════════════════════════════════ */

/* Status action buttons (large, full-width, contextual) */
.status-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
}
.status-btn {
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  border: none;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--dur) var(--ease);
  letter-spacing: -0.1px;
}
.status-btn i, .status-btn svg { font-size: 22px; }
.status-btn:active { transform: scale(0.99); }

.status-btn-started    { background: var(--accent-dim);   color: var(--accent);  border: 1px solid rgba(245,166,35,0.25); }
.status-btn-reached    { background: var(--info-dim);     color: var(--info);    border: 1px solid rgba(77,168,232,0.25); }
.status-btn-begin      { background: var(--success-dim);  color: var(--success); border: 1px solid rgba(52,199,133,0.25); }
.status-btn-waiting    { background: var(--warning-dim);  color: var(--warning); border: 1px solid rgba(245,166,35,0.25); }
.status-btn-completed  { background: var(--success);      color: #0f1923; }
.status-btn-breakdown  { background: var(--danger-dim);   color: var(--danger);  border: 1px solid rgba(232,93,93,0.25); }

.status-btn-started:hover   { background: rgba(245,166,35,0.2); }
.status-btn-reached:hover   { background: rgba(77,168,232,0.2); }
.status-btn-begin:hover     { background: rgba(52,199,133,0.2); }
.status-btn-completed:hover { background: #2db872; }

/* Availability toggle (large top-of-driver-screen) */
.availability-toggle {
  margin: 0 18px 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.availability-toggle .av-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.availability-toggle .av-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.availability-toggle .av-sub {
  font-size: 12px;
  color: var(--text2);
}

/* Leaderboard row */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.leaderboard-row:last-child { border-bottom: none; }
.lb-rank {
  width: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  text-align: center;
  flex-shrink: 0;
}
.lb-rank.top3 { color: var(--accent); }
.lb-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--text2);
  flex-shrink: 0;
}
.lb-name  { flex: 1; font-size: 14px; font-weight: 500; color: var(--text); }
.lb-score { font-size: 13px; font-weight: 600; color: var(--accent); }

/* ════════════════════════════════════════════════════════════
   ADMIN-SPECIFIC COMPONENTS
   ════════════════════════════════════════════════════════════ */

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-bar .form-control { flex: 1; min-width: 140px; }

/* Page header (admin) */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-header-left h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.4px;
}
.page-header-left p {
  font-size: 13px;
  color: var(--text2);
  margin-top: 2px;
}

/* Tabs (admin) */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-item {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: var(--sans);
  margin-bottom: -1px;
}
.tab-item:hover { color: var(--text); }
.tab-item.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Pill tabs (customer) */
.pill-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 18px 4px;
}
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.pill-tab:hover { border-color: var(--accent); color: var(--accent); }
.pill-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f1923;
  font-weight: 600;
}

/* Inline key-value detail rows */
.detail-rows { display: flex; flex-direction: column; }
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 12px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .dr-label { color: var(--text2); flex-shrink: 0; }
.detail-row .dr-value { color: var(--text); font-weight: 500; text-align: right; }

/* ════════════════════════════════════════════════════════════
   EMPTY STATES
   ════════════════════════════════════════════════════════════ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}
.empty-state .empty-icon {
  width: 56px; height: 56px;
  background: var(--surface2);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: var(--text3);
  margin-bottom: 4px;
}
.empty-state h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}
.empty-state p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 260px;
}

/* ════════════════════════════════════════════════════════════
   CTA BAR (fixed bottom — customer + driver)
   ════════════════════════════════════════════════════════════ */

.cta-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  padding: 12px 18px calc(var(--bottomnav-h) + 4px);
  background: linear-gradient(to top, var(--bg) 65%, transparent);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 38;
  pointer-events: none;
}
.cta-bar > * { pointer-events: all; }

/* When no bottom nav (driver active ride screen) */
.cta-bar.no-nav {
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
}

/* ════════════════════════════════════════════════════════════
   FARE DISPLAY
   ════════════════════════════════════════════════════════════ */

.fare-hero {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}
.fare-hero::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.fare-amount {
  font-family: var(--serif);
  font-size: 42px;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
}
.fare-amount .fare-currency { font-size: 22px; color: var(--text2); }
.fare-meta {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.fare-meta-item .lbl { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
.fare-meta-item .val { font-size: 14px; font-weight: 500; color: var(--text); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════
   MAP CONTAINER
   ════════════════════════════════════════════════════════════ */

.map-container {
  width: 100%;
  height: 220px;
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}
.map-container iframe,
.map-container .gmap-embed { width: 100%; height: 100%; border: none; }

.map-overlay-card {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
}

/* ════════════════════════════════════════════════════════════
   STEP INDICATOR
   ════════════════════════════════════════════════════════════ */

.step-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}
.step-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border2);
  transition: all var(--dur-md) var(--ease);
}
.step-dot.active { background: var(--accent); width: 20px; border-radius: 4px; }
.step-dot.done   { background: var(--success); }

/* ════════════════════════════════════════════════════════════
   OTP INPUT BOXES
   ════════════════════════════════════════════════════════════ */

.otp-inputs {
  display: flex;
  gap: 8px;
}
.otp-box {
  flex: 1;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg3);
  border: 1.5px solid var(--border2);
  border-radius: var(--r-sm);
  outline: none;
  font-family: var(--sans);
  transition: border-color var(--dur) var(--ease);
  caret-color: var(--accent);
  -webkit-appearance: none;
}
.otp-box:focus { border-color: var(--accent); }

/* ════════════════════════════════════════════════════════════
   AVATAR
   ════════════════════════════════════════════════════════════ */

.avatar {
  border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  color: var(--text2);
  flex-shrink: 0;
  overflow: hidden;
  font-size: 13px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm  { width: 32px; height: 32px; font-size: 12px; }
.avatar-md  { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg  { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl  { width: 72px; height: 72px; font-size: 22px; }

/* ════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ════════════════════════════════════════════════════════════ */

/* Display */
.d-flex   { display: flex; }
.d-grid   { display: grid; }
.d-block  { display: block; }
.d-none   { display: none !important; }
.d-inline { display: inline; }
.d-inline-flex { display: inline-flex; }

/* Flex */
.flex-col  { flex-direction: column; }
.flex-1    { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }

/* Grid */
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: repeat(4,1fr); }

/* Spacing */
.mt-1{margin-top:var(--space-1)} .mt-2{margin-top:var(--space-2)} .mt-3{margin-top:var(--space-3)}
.mt-4{margin-top:var(--space-4)} .mt-6{margin-top:var(--space-6)} .mt-8{margin-top:var(--space-8)}
.mb-2{margin-bottom:var(--space-2)} .mb-3{margin-bottom:var(--space-3)} .mb-4{margin-bottom:var(--space-4)}
.mb-6{margin-bottom:var(--space-6)} .mb-8{margin-bottom:var(--space-8)}
.p-4 {padding:var(--space-4)} .p-5{padding:var(--space-5)} .p-6{padding:var(--space-6)}
.px-4{padding-left:var(--space-4);padding-right:var(--space-4)}
.py-4{padding-top:var(--space-4);padding-bottom:var(--space-4)}

/* Text align */
.text-left{text-align:left} .text-center{text-align:center} .text-right{text-align:right}

/* Min-width zero (flex child truncation) */
.min-w-0 { min-width: 0; }

/* Truncate */
.truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Rounded */
.rounded    { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-full { border-radius: var(--r-full); }

/* Border */
.border     { border: 1px solid var(--border); }
.border-top { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }

/* Width */
.w-full { width: 100%; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* No select */
.no-select { user-select: none; }

/* Safe area padding (for notched phones) */
.safe-top    { padding-top:    env(safe-area-inset-top, 0); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }

/* ════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */

@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes shimmer     { to { background-position: -200% 0; } }
@keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp      { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeDown    { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn     { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes toastIn     { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse       { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes blink       { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.anim-fade-in   { animation: fadeIn var(--dur-md) var(--ease); }
.anim-fade-up   { animation: fadeUp var(--dur-md) var(--ease); }
.anim-scale-in  { animation: scaleIn var(--dur-md) var(--ease); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE TWEAKS
   ════════════════════════════════════════════════════════════ */

@media (min-width: 480px) {
  :root { --max-w: 430px; }
}

@media (min-width: 768px) {
  /* On tablets/desktop customer shell stays centered */
  .app-shell { box-shadow: 0 0 60px rgba(0,0,0,0.5); }
}

/* Print (admin reports) */
@media print {
  .bottom-nav, .cta-bar, .top-bar, .admin-sidebar,
  .btn, .modal-overlay { display: none !important; }
  .admin-main { margin-left: 0 !important; }
  body { background: #fff; color: #000; }
}

/* ══ MODULE 06 — Ride Detail Sheet additions ═══════════════ */

/* Scrollable timeline in ride detail */
#rideDetailTimeline {
  padding: 0 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
#rideDetailTimeline::-webkit-scrollbar { display: none; }

/* History card — pointer cursor since it now opens the detail sheet */
.ride-hist-card {
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
  user-select: none;
}
.ride-hist-card:hover  { background: var(--surface2); }
.ride-hist-card:active { transform: scale(0.99); background: var(--surface3); }

/* Read-only star display in rating section */
#rideDetailRatingContent div {
  border-bottom: 1px solid var(--border);
}
#rideDetailRatingContent div:last-child {
  border-bottom: none;
}

/* ══ MODULE 03 — Icon System ════════════════════════════════ */

/* SVG children sizing in icon container divs */
.rtc-icon svg,
.cc-icon svg,
.trust-icon svg {
  width: 100%;
  height: 100%;
  max-width: 28px;
  max-height: 28px;
  display: block;
}

/* .trust-icon: was font-size:26px for emoji — update for SVG */
.trust-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--r-lg);
}
/* Slightly larger SVG for trust pillars */
.trust-icon svg {
  max-width: 26px;
  max-height: 26px;
}

/* .rtc-icon: ensure SVG is centred */
.rtc-icon {
  align-items: center;
  justify-content: center;
}

/* mini-ride-dot: SVG fallback sizing */
.mini-ride-dot svg {
  width: 18px;
  height: 18px;
}

/* addr-icon: SVG sizing */
.addr-icon svg {
  width: 18px;
  height: 18px;
}

/* Tab pill icon alignment (address selector buttons) */
.tab-pill svg {
  vertical-align: middle;
  margin-right: 3px;
}

/* ══ MODULE 01 — Navigation Redesign v1.1 ══════════════════ */

/* ── Shared drawer overlay ──────────────────────────────────── */
.drawer-overlay,
.driver-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.drawer-overlay.open,
.driver-drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── FAB (raised Book / Active button) ──────────────────────── */
.nav-fab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding: 4px 4px 8px;
  cursor: pointer;
  color: var(--text3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: none;
  background: none;
  font-family: var(--sans);
  position: relative;
}
.nav-fab-circle {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -18px;
  box-shadow: 0 4px 16px rgba(245,200,0,0.45);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  flex-shrink: 0;
}
.nav-fab span {
  font-size: 10px;
  color: var(--text3);
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.nav-fab:active .nav-fab-circle {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(245,200,0,0.3);
}
.nav-fab.active .nav-fab-circle {
  box-shadow: 0 4px 20px rgba(245,200,0,0.6);
}

/* ── Notification dot on bell ────────────────────────────────── */
.notif-btn-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#notifDot {
  position: absolute;
  top: -2px;
  right: -3px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg2);
  display: none;
}

/* ── Customer menu drawer (slides from right) ────────────────── */
.menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(300px, 85vw);
  background: var(--bg2);
  border-left: 1px solid var(--border2);
  z-index: 120;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.menu-drawer.open { transform: translateX(0); }

.menu-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.menu-drawer-logo { height: 30px; width: auto; object-fit: contain; }
.menu-drawer-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.menu-drawer-close:hover { background: var(--surface2); color: var(--text); }

.menu-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: none;
}
.menu-drawer-body::-webkit-scrollbar { display: none; }

.menu-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  transition: background 0.15s;
}
.menu-drawer-item:hover { background: var(--surface); }
.menu-drawer-item svg  { flex-shrink: 0; color: var(--text2); }
.menu-drawer-item.danger { color: var(--danger); }
.menu-drawer-item.danger svg { color: var(--danger); }
.menu-drawer-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.menu-drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ── Notification drawer (slides up from bottom) ─────────────── */
.notif-drawer {
  position: fixed;
  bottom: var(--bottomnav-h, 64px);
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: var(--max-w, 430px);
  max-height: 70vh;
  background: var(--bg2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border: 1px solid var(--border2);
  border-bottom: none;
  z-index: 120;
  display: flex;
  flex-direction: column;
  transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
  overflow: hidden;
}
.notif-drawer.open { transform: translateX(-50%) translateY(0); }

.notif-drawer-handle {
  width: 36px; height: 4px;
  background: var(--border2);
  border-radius: var(--r-full);
  margin: 10px auto 4px;
  flex-shrink: 0;
}
.notif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notif-drawer-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
}
.notif-mark-read {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  padding: 4px 0;
}
.notif-mark-read:hover { text-decoration: underline; }

.notif-drawer-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.notif-drawer-list::-webkit-scrollbar { display: none; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(255,255,255,0.025); }
.notif-item:hover { background: var(--surface); }

.notif-dot-wrap {
  padding-top: 3px;
  flex-shrink: 0;
}
.notif-dot-indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.notif-item-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}
.notif-item.unread .notif-item-title { font-weight: 600; color: var(--text); }

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  gap: 10px;
}
.notif-empty-icon {
  width: 52px; height: 52px;
  background: var(--surface2);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3);
  margin-bottom: 4px;
}
.notif-empty h3 { font-size: 15px; font-weight: 500; color: var(--text); }
.notif-empty p  { font-size: 13px; color: var(--text2); }

/* ── Driver drawer (slides from right) ───────────────────────── */
.driver-menu-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(280px, 82vw);
  background: var(--bg2);
  border-left: 1px solid var(--border2);
  z-index: 120;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.driver-menu-drawer.open { transform: translateX(0); }

.driver-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 115;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}
.driver-drawer-overlay.open { opacity: 1; pointer-events: all; }

.driver-drawer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}
.driver-drawer-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  flex-shrink: 0;
}
.driver-drawer-info { flex: 1; min-width: 0; padding-left: 0; }
.driver-drawer-name { font-size: 14px; font-weight: 600; color: var(--text); }
.driver-drawer-role {
  font-size: 11px; color: var(--text3); margin-top: 1px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.driver-drawer-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: absolute;
  top: 14px; right: 14px;
  transition: background 0.15s;
}
.driver-drawer-close:hover { background: var(--surface2); }

.driver-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: none;
}
.driver-drawer-body::-webkit-scrollbar { display: none; }

.driver-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  transition: background 0.15s;
}
.driver-drawer-item:hover { background: var(--surface); }
.driver-drawer-item svg  { flex-shrink: 0; color: var(--text2); }
.driver-drawer-item.danger { color: var(--danger); }
.driver-drawer-item.danger svg { color: var(--danger); }
.driver-drawer-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.driver-drawer-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* ── Admin mobile nav extras ─────────────────────────────────── */
.admin-mob-badge {
  position: absolute;
  top: -3px; right: -4px;
  min-width: 14px; height: 14px;
  background: var(--danger);
  border-radius: 20px;
  font-size: 9px; font-weight: 700;
  color: #fff;
  display: none;
  align-items: center; justify-content: center;
  padding: 0 3px; line-height: 1;
}

/* ══ MODULE 02 — Header Standardisation ════════════════════ */

/* ── Back button (← arrow) for detail/secondary pages ──────── */
.uc-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
  margin-right: 4px;
}
.uc-back-btn:hover  { background: var(--surface2); color: var(--text); }
.uc-back-btn:active { transform: scale(0.95); }

/* ── Logo link — remove underline ───────────────────────────── */
.uc-logo-link { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.uc-logo-link:hover { text-decoration: none; }

/* ── Portal identity pill (DRIVER badge) ─────────────────────── */
.driver-role-pill,
.portal-pill {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(245,200,0,0.25);
  border-radius: 20px;
  padding: 2px 8px;
  flex-shrink: 0;
  user-select: none;
  white-space: nowrap;
}

/* ── Topbar notification bell ────────────────────────────────── */
.uc-notif-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#topbarNotifDot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg);
  display: none;
  pointer-events: none;
}

/* ── Admin sidebar logo update ───────────────────────────────── */
.sidebar-logo {
  align-items: center;
}
.sidebar-logo a { display: inline-flex; text-decoration: none; }
.sidebar-logo img { border-radius: 4px; }

/* ── Login page logo (replaces emoji icon boxes) ─────────────── */
.login-hero img.login-brand-logo {
  display: block;
  margin: 0 auto 16px;
  height: 48px;
  width: auto;
  border-radius: 6px;
  object-fit: contain;
}

/* ══ MODULE 08 — Page Transition Animations ════════════════ */

/* ── CSS View Transitions API (Chrome 111+, Safari 18+) ─────
   Forward navigation:  old page slides left  → new slides in from right
   Back navigation:     old page slides right → new slides in from left
   Direction is set by JS via data-nav-dir="back|forward" on <html>
   ──────────────────────────────────────────────────────────── */
@view-transition {
  navigation: auto;
}

/* Default: forward navigation */
::view-transition-old(root) {
  animation: 280ms cubic-bezier(0.4, 0, 1, 1) both slideOutLeft;
}
::view-transition-new(root) {
  animation: 280ms cubic-bezier(0, 0, 0.2, 1) both slideInRight;
}

/* Back navigation (set by JS click listener on <html data-nav-dir="back">) */
html[data-nav-dir="back"] ::view-transition-old(root) {
  animation-name: slideOutRight;
}
html[data-nav-dir="back"] ::view-transition-new(root) {
  animation-name: slideInLeft;
}

/* Slide keyframes — subtle 20px horizontal shift with opacity */
@keyframes slideOutLeft  { to   { transform: translateX(-20px); opacity: 0; } }
@keyframes slideInRight  { from { transform: translateX(20px);  opacity: 0; } }
@keyframes slideOutRight { to   { transform: translateX(20px);  opacity: 0; } }
@keyframes slideInLeft   { from { transform: translateX(-20px); opacity: 0; } }

/* Named transition for the main scroll body — enables isolated animation */
::view-transition-old(main-content),
::view-transition-new(main-content) {
  animation-duration: 240ms;
}

/* Freeze top bar and bottom nav during transition (no slide on chrome) */
.uc-topbar,
.driver-topbar,
.admin-topbar,
.bottom-nav,
.admin-mobile-nav {
  view-transition-name: none;
}

/* Accessibility: honour prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-old(main-content),
  ::view-transition-new(main-content) {
    animation-duration: 0.01ms !important;
    animation-delay:    0s    !important;
  }
}

/* ══ MODULE 09 — Swipe-to-Dismiss sheet handle ═════════════ */
.sheet-handle          { cursor: grab; }
.sheet-handle:active   { cursor: grabbing; background: var(--border3); }

/* ══ v1.2 — UI/UX Updates (customer frontend) ══════════════ */

/* Make cards/surfaces semi-transparent so bg car shows through */
.card,
.form-section-card,
.section-card,
.avg-scores-card,
.rating-item,
.ride-hist-card,
.active-card,
.trust-card,
.mini-ride,
.install-banner,
.about-card,
.earn-stat,
.earn-table-wrap {
  background: rgba(20, 20, 20, 0.75) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(255,255,255,0.08) !important;
}

/* Hero sections — darken slightly for readability */
.hero,
.profile-hero {
  background: rgba(10,10,10,0.55) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Topbar and bottom nav — solid #101010 already set via inline CSS;
   this ensures any overrides from app.css don't win */
.uc-topbar,
.bottom-nav {
  background: #101010 !important;
}
.uc-topbar   {
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  z-index: 999999 !important;
}
.bottom-nav  { border-top:    1px solid rgba(255,255,255,0.08) !important; }

/* Scroll body — full height, transparent so bg shows */
.scroll-body {
  background: transparent !important;
}

/* Nav item active indicator — brighter on dark bg */
.nav-item.active::before {
  background: #f5c800;
  height: 2px;
}

/* Bottom nav Book label — ensure it aligns at bottom with siblings */
.nav-fab > span {
  font-size: 10px;
  font-weight: 500;
  color: var(--text3);
  letter-spacing: 0.02em;
  margin-top: 0;
  line-height: 1;
}
.nav-fab.active > span { color: var(--accent); }

/* Menu drawer — dark chrome matching header/footer */
.menu-drawer {
  background: rgba(16,16,16,0.97) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.menu-drawer-header {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}
.menu-drawer-item { color: rgba(240,237,232,0.9); }
.menu-drawer-item:hover { background: rgba(255,255,255,0.06) !important; }
.menu-drawer-divider { background: rgba(255,255,255,0.08) !important; }

/* Notif drawer — match */
.notif-drawer {
  background: rgba(16,16,16,0.97) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Empty state — transparent bg */
.empty-state {
  background: transparent !important;
}

/* Skeleton — slightly visible on dark bg */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 75%
  ) !important;
  background-size: 200% 100% !important;
  animation: shimmer 1.5s infinite !important;
}

/* Input fields — dark glass */
.form-control {
  background: rgba(255,255,255,0.07) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: var(--text) !important;
}
.form-control:focus {
  background: rgba(255,255,255,0.10) !important;
  border-color: rgba(245,200,0,0.5) !important;
}

/* ══ PWA Install Sheet — v1.3 ══════════════════════════════ */
#pwa-install-sheet {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none; opacity: 0;
  transition: opacity .35s ease;
}
#pwa-install-sheet.pwa-sheet-visible {
  pointer-events: all; opacity: 1;
}
#pwa-sheet-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.65); backdrop-filter: blur(6px);
}
#pwa-sheet-panel {
  position: relative; z-index: 1;
  background: #141e28; border-radius: 24px 24px 0 0;
  border: 1px solid rgba(255,255,255,.1); border-bottom: none;
  width: 100%; max-width: 430px; padding-bottom: env(safe-area-inset-bottom,12px);
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(.32,.72,0,1);
}
#pwa-install-sheet.pwa-sheet-visible #pwa-sheet-panel {
  transform: translateY(0);
}
#pwa-sheet-handle {
  width: 40px; height: 4px; background: rgba(255,255,255,.2);
  border-radius: 2px; margin: 12px auto 0;
}
#pwa-sheet-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none;
  color: var(--text2); display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: background .15s;
}
#pwa-sheet-close:hover { background: rgba(255,255,255,.18); }
#pwa-sheet-body { padding: 16px 24px 24px; text-align: center; }
#pwa-sheet-icon img {
  width: 72px; height: 72px; border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  margin-bottom: 14px;
}
#pwa-sheet-title {
  font-family: var(--serif); font-size: 22px; font-weight: 400;
  color: var(--text); margin: 0 0 8px;
}
#pwa-sheet-desc {
  font-size: 14px; color: var(--text2); line-height: 1.6;
  margin: 0 0 20px; max-width: 300px; margin-inline: auto;
}
#pwa-sheet-features {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 22px; text-align: left;
}
.pwa-feat {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text2);
}
.pwa-feat svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }

/* iOS instruction steps */
#pwa-ios-steps {
  background: rgba(255,255,255,.05); border-radius: 12px;
  padding: 14px; margin-bottom: 18px; text-align: left;
}
.pwa-ios-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text3); margin: 0 0 12px;
}
.pwa-ios-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text2); margin-bottom: 10px;
}
.pwa-ios-step:last-child { margin-bottom: 0; }
.pwa-ios-step svg { flex-shrink: 0; color: var(--accent); }
.pwa-ios-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #1a1a1a;
  font-size: 11px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}

/* Install button */
.pwa-btn-install {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px; background: var(--accent);
  border: none; border-radius: 14px; color: #1a1a1a;
  font-size: 16px; font-weight: 700; font-family: var(--sans);
  cursor: pointer; margin-bottom: 10px; transition: background .15s;
}
.pwa-btn-install:hover { background: var(--accent2); }
.pwa-btn-ghost {
  width: 100%; padding: 13px; background: none;
  border: 1px solid rgba(255,255,255,.2); border-radius: 14px;
  color: var(--text2); font-size: 15px; font-weight: 500;
  font-family: var(--sans); cursor: pointer; margin-bottom: 10px;
}
#pwa-sheet-later {
  background: none; border: none; color: var(--text3);
  font-size: 12px; font-family: var(--sans); cursor: pointer;
  padding: 4px; text-decoration: underline; text-underline-offset: 2px;
}

/* Update banner */
#pwa-update-banner {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 398px;
  background: #f5a623; color: #0f1923; border-radius: 14px;
  padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  z-index: 9999; box-shadow: 0 8px 32px rgba(0,0,0,.4);
  font-size: 14px; font-weight: 500;
  animation: fadeUp .35s ease;
}
#pwa-update-banner button {
  background: #0f1923; color: #f5a623; border: none;
  border-radius: 8px; padding: 6px 14px; font-size: 13px;
  font-weight: 600; cursor: pointer;
}

/* iOS 'already installed' banner */
#pwa-ios-open-banner {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 398px;
  background: #141e28; border: 1px solid rgba(245,200,0,.3);
  border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  z-index: 9999; box-shadow: 0 8px 32px rgba(0,0,0,.4);
  font-size: 13px; color: var(--text2);
}
#pwa-ios-open-banner img { border-radius: 8px; flex-shrink: 0; }
#pwa-ios-open-banner span { flex: 1; }
#pwa-ios-open-banner button {
  background: none; border: none; color: var(--text3);
  font-size: 16px; cursor: pointer; padding: 4px; flex-shrink: 0;
}

/* Network banner keyframes */
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } }
