﻿/* =============================================
   MATLEX RIDE — Driver Interface Styles
   Mobile-first, app-like design
   ============================================= */

:root {
  --brand:        #D946EF;
  --brand-dark:   #7C3AED;
  --brand-light:  rgba(217,70,239,.12);
  --dark:         #0F172A;
  --dark2:        #1e293b;
  --dark3:        #334155;
  --body-bg:      #f4f6ff;
  --card-bg:      #ffffff;
  --success:      #28c76f;
  --danger:       #EF4444;
  --info:         #0EA5E9;
  --warning:      #ff9f43;
  --purple:       #7C3AED;
  --text:         #0F172A;
  --muted:        #475569;
  --border:       rgba(15,23,42,.12);
  --radius:       16px;
  --radius-sm:    10px;
  --transition:   0.22s ease;

  /* Phone shell */
  --shell-w: 390px;
  --shell-h: 844px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #eef1ff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 40px;
}

/* =============================================
   DEMO TOOLBAR (browser-only preview bar)
   ============================================= */
.demo-toolbar {
  width: 100%;
  max-width: 900px;
  background: var(--dark);
  border-radius: 14px 14px 0 0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.demo-toolbar .brand {
  display: flex; align-items: center; gap: 10px;
}
.demo-toolbar .brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 8px; display: grid; place-items: center;
  font-weight: 800; color: #fff; font-size: 16px;
}
.demo-toolbar .brand-name {
  font-size: 14px; font-weight: 700; color: #fff;
}
.demo-toolbar .brand-sub {
  font-size: 10px; color: var(--brand); letter-spacing: 1.5px; text-transform: uppercase;
}
.demo-screens {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.demo-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 600;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.demo-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.demo-btn.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: var(--brand);
  color: #fff;
}

/* =============================================
   PHONE SHELL WRAPPER
   ============================================= */
.phones-grid {
  width: 100%;
  max-width: 900px;
  background: var(--dark2);
  border-radius: 0 0 14px 14px;
  padding: 24px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.phone-shell {
  width: var(--shell-w);
  max-width: 100%;
  background: #000;
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 0 0 2px #333,
    0 30px 80px rgba(0,0,0,.5);
  position: relative;
  flex-shrink: 0;
}
.phone-notch {
  width: 120px; height: 32px;
  background: #000;
  border-radius: 0 0 20px 20px;
  margin: 0 auto 0;
  position: relative;
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
}
.phone-notch .notch-camera {
  width: 10px; height: 10px; border-radius: 50%;
  background: #1a1a1a; border: 1.5px solid #2a2a2a;
}
.phone-notch .notch-speaker {
  width: 60px; height: 4px; border-radius: 2px;
  background: #1a1a1a;
}
.phone-screen {
  background: var(--body-bg);
  border-radius: 36px;
  overflow: hidden;
  height: 760px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone-home-bar {
  height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-bg);
  flex-shrink: 0;
}
.phone-home-bar span {
  width: 120px; height: 4px; border-radius: 2px;
  background: #ccc;
}

/* =============================================
   STATUS BAR
   ============================================= */
.status-bar {
  height: 44px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: inherit;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: inherit;
}
.status-bar.dark { background: var(--dark); color: #fff; }
.status-bar.light { background: var(--card-bg); color: var(--dark); }
.status-bar.transparent-dark { background: transparent; color: #fff; position: absolute; top: 44px; left: 0; right: 0; z-index: 5; }
.status-icons { display: flex; align-items: center; gap: 5px; font-size: 12px; }

/* =============================================
   APP SCREEN BASE
   ============================================= */
.app-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}
.app-screen::-webkit-scrollbar { display: none; }

/* Bottom Tab Bar */
.bottom-tab-bar {
  height: 72px;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
  padding: 0 8px;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 12px;
  cursor: pointer; color: var(--muted);
  font-size: 10px; font-weight: 600;
  transition: color var(--transition);
  flex: 1; border-radius: 12px;
  position: relative;
}
.tab-item i { font-size: 22px; }
.tab-item.active { color: var(--brand); }
.tab-item .tab-badge {
  position: absolute; top: 6px; right: 14px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--card-bg);
}

/* =============================================
   SCREEN 1 — LOGIN
   ============================================= */
.screen-login {
  background: var(--dark);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}
.screen-login::-webkit-scrollbar { display: none; }

.login-hero {
  background: linear-gradient(160deg, var(--dark) 0%, var(--dark3) 100%);
  padding: 40px 28px 32px;
  display: flex; flex-direction: column; align-items: center;
  position: relative; overflow: hidden;
}
.login-hero::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(217,70,239,.08);
}
.login-hero::after {
  content: '';
  position: absolute; bottom: -40px; left: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(217,70,239,.05);
}
.login-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 20px;
  display: grid; place-items: center;
  font-size: 32px; font-weight: 800; color: #fff;
  margin-bottom: 16px;
  position: relative; z-index: 1;
  box-shadow: 0 8px 24px rgba(217,70,239,.4);
}
.login-app-name {
  font-size: 22px; font-weight: 800; color: #fff;
  position: relative; z-index: 1;
}
.login-app-sub {
  font-size: 12px; color: rgba(255,255,255,.5);
  margin-top: 4px; letter-spacing: 1px; text-transform: uppercase;
  position: relative; z-index: 1;
}

.login-form-area {
  background: var(--card-bg);
  border-radius: 28px 28px 0 0;
  flex: 1;
  padding: 28px 24px;
}
.login-heading { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.login-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

.input-group-app {
  position: relative; margin-bottom: 14px;
}
.input-group-app i {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-size: 15px;
  pointer-events: none;
}
.input-app {
  width: 100%;
  padding: 14px 14px 14px 42px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px; color: var(--dark);
  background: #fafbfc;
  outline: none;
  transition: border var(--transition);
}
.input-app:focus { border-color: var(--brand); background: #fff; }
.input-app::placeholder { color: var(--muted); }

.btn-app-primary {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--brand), var(--info));
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(217,70,239,.35);
  margin-top: 4px;
}
.btn-app-primary:active { transform: scale(.98); }

.btn-app-ghost {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  border-radius: 14px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 10px;
}

.divider-or {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0;
  color: var(--muted); font-size: 12px;
}
.divider-or::before, .divider-or::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.forgot-link {
  text-align: right; font-size: 12.5px;
  color: var(--brand); font-weight: 600;
  cursor: pointer; margin-bottom: 18px;
}

/* =============================================
   SCREEN 2 — HOME (DRIVER DASHBOARD)
   ============================================= */
.screen-home {
  background: var(--body-bg);
  flex: 1; display: flex; flex-direction: column;
}

.home-map-area {
  height: 260px;
  background: linear-gradient(145deg, #1e3a5f 0%, #0f2744 100%);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
/* Fake map grid lines */
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.map-road-h {
  position: absolute;
  left: 0; right: 0;
  height: 10px;
  background: rgba(255,255,255,.12);
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.map-road-v {
  position: absolute;
  top: 0; bottom: 0;
  width: 10px;
  background: rgba(255,255,255,.12);
  border-left: 1px solid rgba(255,255,255,.08);
  border-right: 1px solid rgba(255,255,255,.08);
}
.map-location-dot {
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid #fff;
  box-shadow: 0 0 0 8px rgba(217,70,239,.25);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 8px rgba(217,70,239,.25); }
  50%       { box-shadow: 0 0 0 16px rgba(217,70,239,.08); }
}
.map-overlay-top {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 48px 16px 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent);
  display: flex; align-items: center; justify-content: space-between;
}
.map-overlay-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  display: flex; align-items: center; justify-content: space-between;
}
.map-location-label {
  font-size: 11px; color: rgba(255,255,255,.7);
  background: rgba(0,0,0,.35);
  padding: 4px 10px; border-radius: 20px;
  backdrop-filter: blur(4px);
}
.map-zoom-btns {
  display: flex; flex-direction: column; gap: 4px;
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
}
.map-zoom-btn {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.9);
  border: none; border-radius: 8px;
  font-size: 18px; font-weight: 700;
  cursor: pointer; color: var(--dark);
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* Online toggle pill */
.online-toggle-wrap {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 30px;
}
.online-toggle-label {
  font-size: 13px; font-weight: 700; color: #fff;
}
.toggle-switch {
  position: relative; width: 46px; height: 26px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  border-radius: 26px;
  background: rgba(255,255,255,.2);
  cursor: pointer;
  transition: background .25s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; left: 3px; top: 3px;
  transition: transform .25s;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Status badge on map */
.status-badge-map {
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}
.badge-online  { background: rgba(40,199,111,.9); color: #fff; }
.badge-offline { background: rgba(234,84,85,.9);  color: #fff; }

/* Home scroll content */
.home-scroll {
  flex: 1; overflow-y: auto; padding: 16px;
  scrollbar-width: none; display: flex; flex-direction: column; gap: 14px;
}
.home-scroll::-webkit-scrollbar { display: none; }

/* Today earnings card */
.earnings-card {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark3) 100%);
  border-radius: var(--radius);
  padding: 18px;
  color: #fff;
  position: relative; overflow: hidden;
}
.earnings-card::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(217,70,239,.1);
}
.earnings-label  { font-size: 11px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 1px; }
.earnings-amount { font-size: 30px; font-weight: 800; color: var(--brand); line-height: 1.1; margin: 4px 0 12px; }
.earnings-meta { display: flex; gap: 16px; }
.earnings-meta-item { font-size: 11px; color: rgba(255,255,255,.6); }
.earnings-meta-item strong { color: #fff; display: block; font-size: 14px; }

/* Quick stats row */
.quick-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick-stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.qs-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 15px; margin: 0 auto 8px;
}
.qs-value { font-size: 16px; font-weight: 700; color: var(--dark); }
.qs-label { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Section header */
.section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.section-hdr h3 { font-size: 13px; font-weight: 700; color: var(--dark); }
.section-hdr a  { font-size: 12px; color: var(--brand); font-weight: 600; cursor: pointer; }

/* Recent trip item */
.trip-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  margin-bottom: 8px;
}
.trip-item:last-child { margin-bottom: 0; }
.trip-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 16px; flex-shrink: 0;
}
.trip-details { flex: 1; min-width: 0; }
.trip-route { font-size: 12.5px; font-weight: 600; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-meta   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.trip-fare   { font-size: 14px; font-weight: 700; color: var(--dark); white-space: nowrap; }
.trip-status { font-size: 10px; font-weight: 600; text-align: right; margin-top: 2px; }

/* =============================================
   SCREEN 3 — TRIP REQUEST
   ============================================= */
.screen-request {
  background: var(--dark);
  flex: 1; display: flex; flex-direction: column;
}

.request-map {
  flex: 1;
  background: linear-gradient(160deg, #1a2744 0%, #0d1a33 100%);
  position: relative; overflow: hidden;
}
.request-map .map-grid { opacity: .6; }
.request-route-line {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 140px; height: 3px;
  background: linear-gradient(90deg, var(--success), var(--danger));
  border-radius: 2px;
}
.request-route-line::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--success); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(40,199,111,.5);
}
.request-route-line::after {
  content: '';
  position: absolute;
  right: -8px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--danger); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(234,84,85,.5);
}

/* Countdown ring */
.countdown-overlay {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  z-index: 5;
}
.countdown-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(217,70,239,.15);
  border: 3px solid var(--brand);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800; color: var(--brand);
  animation: ring-pulse 1s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,70,239,.4); }
  50%       { box-shadow: 0 0 0 10px rgba(217,70,239,.0); }
}
.countdown-label { font-size: 10px; color: rgba(255,255,255,.6); font-weight: 600; }

.request-sheet {
  background: var(--card-bg);
  border-radius: 24px 24px 0 0;
  padding: 20px;
  flex-shrink: 0;
}
.sheet-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 0 auto 18px;
}
.new-ride-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(217,70,239,.12); color: var(--brand-dark);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 14px;
}
.new-ride-badge i { font-size: 12px; }

.passenger-info {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.passenger-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #a855f7);
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  border: 3px solid rgba(115,103,240,.3);
}
.passenger-name  { font-size: 16px; font-weight: 700; color: var(--dark); }
.passenger-rating {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted);
}
.passenger-rating i { color: var(--brand); font-size: 11px; }
.passenger-trips { font-size: 11px; color: var(--muted); margin-top: 2px; }

.route-card {
  background: var(--body-bg);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.route-point {
  display: flex; align-items: flex-start; gap: 12px;
  position: relative;
}
.route-point:not(:last-child) { margin-bottom: 12px; }
.route-point:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 10px; top: 22px;
  width: 2px; height: 14px;
  background: var(--border);
}
.route-dot {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 8px; flex-shrink: 0; margin-top: 1px;
}
.dot-pickup  { background: rgba(40,199,111,.15); color: var(--success); border: 2px solid var(--success); }
.dot-dropoff { background: rgba(234,84,85,.15);  color: var(--danger);  border: 2px solid var(--danger); }
.route-text { flex: 1; }
.route-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 2px; }
.route-address { font-size: 13px; font-weight: 600; color: var(--dark); line-height: 1.3; }
.route-dist { font-size: 11px; color: var(--muted); margin-top: 2px; }

.trip-fare-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand-light);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.fare-label  { font-size: 12px; color: var(--muted); }
.fare-amount { font-size: 22px; font-weight: 800; color: var(--dark); }
.fare-note   { font-size: 10px; color: var(--muted); margin-top: 2px; }
.fare-method {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--purple);
  background: rgba(115,103,240,.1);
  padding: 6px 12px; border-radius: 20px;
}

.action-btns {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 10px;
}
.btn-decline {
  padding: 15px;
  background: rgba(234,84,85,.1);
  color: var(--danger);
  border: 1.5px solid rgba(234,84,85,.2);
  border-radius: 14px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all var(--transition);
}
.btn-decline:active { transform: scale(.97); }
.btn-accept {
  padding: 15px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(40,199,111,.4);
}
.btn-accept:active { transform: scale(.97); }

/* =============================================
   SCREEN 4 — ACTIVE TRIP
   ============================================= */
.screen-active {
  background: var(--body-bg);
  flex: 1; display: flex; flex-direction: column;
}

.active-map {
  height: 320px;
  background: linear-gradient(160deg, #1a3050 0%, #0f2035 100%);
  position: relative; overflow: hidden; flex-shrink: 0;
}
.active-map .map-grid { opacity: .5; }

/* Animated car icon */
.car-icon {
  position: absolute;
  top: 45%; left: 50%; transform: translate(-50%, -50%);
  font-size: 28px;
  filter: drop-shadow(0 4px 10px rgba(217,70,239,.6));
  animation: car-drive 3s ease-in-out infinite alternate;
  z-index: 5;
}
@keyframes car-drive {
  from { transform: translate(-50%, -50%) translateX(-20px); }
  to   { transform: translate(-50%, -50%) translateX(20px);  }
}

/* Route path SVG-like */
.route-path {
  position: absolute;
  bottom: 60px; left: 40px; right: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--success) 0%, var(--brand) 50%, var(--danger) 100%);
  border-radius: 2px;
  opacity: .7;
}

/* Progress overlay on map */
.active-map-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 52px 14px 12px;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.trip-status-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(40,199,111,.9);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
  backdrop-filter: blur(4px);
}
.trip-status-pill .blink {
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff;
  animation: blink 1.2s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}
.trip-eta-chip {
  background: rgba(0,0,0,.5);
  color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px;
  backdrop-filter: blur(4px);
  display: flex; align-items: center; gap: 5px;
}

/* Active trip sheet */
.active-sheet {
  flex: 1; overflow-y: auto; scrollbar-width: none;
  background: var(--card-bg);
  border-radius: 22px 22px 0 0;
  padding: 16px 18px;
  margin-top: -20px;
  position: relative; z-index: 2;
  box-shadow: 0 -4px 20px rgba(0,0,0,.1);
}
.active-sheet::-webkit-scrollbar { display: none; }

/* Progress steps */
.trip-progress-steps {
  display: flex; align-items: center; margin-bottom: 18px;
}
.step {
  flex: 1; text-align: center; position: relative;
}
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--body-bg); border: 2px solid var(--border);
  display: grid; place-items: center;
  margin: 0 auto 4px;
  font-size: 11px; color: var(--muted);
  transition: all .3s;
}
.step.done .step-dot {
  background: var(--success); border-color: var(--success); color: #fff;
}
.step.active .step-dot {
  background: var(--brand); border-color: var(--brand); color: #fff;
  font-weight: 700;
}
.step-label { font-size: 9.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.step.done .step-label { color: var(--success); }
.step.active .step-label { color: var(--brand-dark); }
.step-line {
  flex: 1; height: 2px; background: var(--border); margin-top: -16px;
}
.step-line.done { background: var(--success); }

/* Passenger card in active trip */
.active-passenger-card {
  background: var(--body-bg);
  border-radius: 14px;
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.active-passenger-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #a855f7);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.active-passenger-name { font-size: 14px; font-weight: 700; color: var(--dark); }
.active-passenger-dest { font-size: 12px; color: var(--muted); margin-top: 2px; }
.active-passenger-dest i { color: var(--danger); font-size: 11px; }

.contact-btns {
  display: flex; gap: 8px; margin-left: auto;
}
.contact-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  border: none; cursor: pointer; font-size: 15px;
  transition: all var(--transition);
}
.contact-btn.call { background: rgba(40,199,111,.12); color: var(--success); }
.contact-btn.msg  { background: rgba(115,103,240,.12); color: var(--purple); }

/* Live metrics row */
.live-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.live-metric {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 10px; text-align: center;
}
.live-metric-value { font-size: 16px; font-weight: 700; color: var(--dark); }
.live-metric-label { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Action strip */
.action-strip {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.action-strip-btn {
  flex: 1; padding: 14px 10px;
  border-radius: 14px; border: none;
  font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 6px;
  transition: all var(--transition);
}
.btn-arrived {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(217,70,239,.35);
}
.btn-start-trip {
  background: var(--info);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,207,232,.35);
}
.btn-complete {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 12px rgba(40,199,111,.4);
  flex: 2;
}
.btn-sos {
  background: rgba(234,84,85,.1);
  color: var(--danger);
  border: 1.5px solid rgba(234,84,85,.25) !important;
}

/* =============================================
   SCREEN 5 — EARNINGS
   ============================================= */
.screen-earnings {
  background: var(--body-bg);
  flex: 1; display: flex; flex-direction: column; overflow-y: auto;
  scrollbar-width: none;
}
.screen-earnings::-webkit-scrollbar { display: none; }

.earnings-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark3) 100%);
  padding: 16px 18px 32px;
  position: relative; overflow: hidden;
}
.earnings-header::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(217,70,239,.08);
}
.earnings-header-title { font-size: 13px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 1px; }
.earnings-header-amount { font-size: 34px; font-weight: 800; color: var(--brand); margin: 4px 0; line-height: 1; }
.earnings-header-sub    { font-size: 12px; color: rgba(255,255,255,.5); }

/* Period tabs */
.period-tabs {
  display: flex;
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 4px;
  margin-top: 16px;
}
.period-tab {
  flex: 1; text-align: center;
  padding: 7px 4px;
  border-radius: 9px;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,.5);
  cursor: pointer; transition: all var(--transition);
}
.period-tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.earnings-body { padding: 16px; }

/* Breakdown list */
.breakdown-item {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.breakdown-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 16px; flex-shrink: 0;
}
.breakdown-info { flex: 1; }
.breakdown-title  { font-size: 13px; font-weight: 600; color: var(--dark); }
.breakdown-detail { font-size: 11px; color: var(--muted); margin-top: 2px; }
.breakdown-amount { font-size: 15px; font-weight: 700; }
.breakdown-amount.positive { color: var(--success); }
.breakdown-amount.negative { color: var(--danger); }
.breakdown-amount.neutral  { color: var(--muted); }

/* Payout card */
.payout-card {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.payout-card-label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.7); }
.payout-card-amount { font-size: 22px; font-weight: 800; color: #fff; margin-top: 4px; }
.btn-withdraw {
  padding: 10px 18px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}

/* =============================================
   SCREEN 6 — PROFILE
   ============================================= */
.screen-profile {
  background: var(--body-bg);
  flex: 1; display: flex; flex-direction: column; overflow-y: auto;
  scrollbar-width: none;
}
.screen-profile::-webkit-scrollbar { display: none; }

.profile-header {
  background: linear-gradient(145deg, var(--dark) 0%, var(--dark3) 100%);
  padding: 24px 20px 40px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; position: relative; overflow: hidden;
}
.profile-header::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(217,70,239,.07);
}
.profile-avatar-wrap {
  position: relative; margin-bottom: 12px;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  display: grid; place-items: center;
  font-size: 30px; font-weight: 800; color: #fff;
  border: 4px solid rgba(255,255,255,.15);
}
.profile-edit-btn {
  position: absolute; bottom: 0; right: -4px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 11px;
  border: 2px solid var(--dark);
  cursor: pointer;
}
.profile-name   { font-size: 20px; font-weight: 800; color: #fff; }
.profile-phone  { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 2px; }
.profile-rating {
  display: flex; align-items: center; gap: 4px;
  margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.6);
}
.profile-rating i { color: var(--brand); }

.profile-stats {
  display: flex;
  background: rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 12px;
  margin-top: 16px; gap: 1px; width: 100%;
}
.profile-stat {
  flex: 1; text-align: center;
  padding: 4px 0;
  border-right: 1px solid rgba(255,255,255,.1);
}
.profile-stat:last-child { border-right: none; }
.profile-stat-value { font-size: 16px; font-weight: 700; color: #fff; }
.profile-stat-label { font-size: 10px; color: rgba(255,255,255,.4); margin-top: 2px; }

.profile-body {
  background: var(--card-bg);
  border-radius: 22px 22px 0 0;
  flex: 1;
  padding: 20px 18px;
  margin-top: -18px; position: relative; z-index: 1;
}

.profile-section-title {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--muted); margin-bottom: 10px;
}
.profile-menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--transition);
}
.profile-menu-item:active { opacity: .7; }
.profile-menu-item:last-child { border-bottom: none; }
.pm-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  font-size: 15px; flex-shrink: 0;
}
.pm-text { flex: 1; }
.pm-title    { font-size: 13.5px; font-weight: 600; color: var(--dark); }
.pm-subtitle { font-size: 11px; color: var(--muted); margin-top: 1px; }
.pm-chevron  { color: var(--muted); font-size: 12px; }
.pm-badge    {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  background: rgba(234,84,85,.1); color: var(--danger);
}

/* =============================================
   DRIVER REGISTRATION SCREEN
   ============================================= */
.screen-register {
  background: var(--card-bg);
  flex: 1; overflow-y: auto; scrollbar-width: none;
}
.screen-register::-webkit-scrollbar { display: none; }

.reg-header {
  background: var(--dark);
  padding: 20px 20px 24px;
  display: flex; align-items: center; gap: 14px;
}
.reg-back-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.1);
  border: none; color: #fff; font-size: 16px;
  cursor: pointer; display: grid; place-items: center;
}
.reg-header-text h2 { font-size: 17px; font-weight: 700; color: #fff; }
.reg-header-text p  { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 2px; }

/* Step indicators */
.reg-steps {
  display: flex; gap: 6px;
  padding: 16px 20px;
  background: var(--dark);
  padding-top: 0;
}
.reg-step-dot {
  flex: 1; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.15);
  transition: background var(--transition);
}
.reg-step-dot.done   { background: var(--success); }
.reg-step-dot.active { background: var(--brand); }

.reg-body { padding: 20px; }
.reg-section-title {
  font-size: 13px; font-weight: 700; color: var(--dark);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.reg-section-title i { color: var(--brand); }

.input-label { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 5px; }

.upload-box {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border var(--transition);
}
.upload-box:hover { border-color: var(--brand); }
.upload-box i { font-size: 28px; color: var(--muted); margin-bottom: 8px; display: block; }
.upload-box p { font-size: 13px; color: var(--muted); margin: 0; }
.upload-box span { font-size: 11px; color: var(--brand); font-weight: 600; }

/* =============================================
   RESPONSIVE: on real mobile, fill full screen
   ============================================= */
@media (max-width: 500px) {
  body {
    background: var(--body-bg);
    padding: 0;
    align-items: stretch;
  }
  .demo-toolbar { display: none; }
  .phones-grid  { display: none; }
  /* Show single active phone inline */
  .mobile-fullscreen {
    display: flex !important;
    flex-direction: column;
    min-height: 100vh;
  }
}

@media (min-width: 501px) {
  .mobile-fullscreen { display: none; }
}


