:root {
  --orange: #ff8a00;
  --orange-dark: #d96d00;
  --navy: #1c3d5a;
  --navy-dark: #0f2a40;
  --bg: #f5f7fb;
  --text: #1f2033;
  --muted: #6b7280;
  --primary: #ff8a00;
  --primary-dark: #d96d00;
  --secondary: #1c3d5a;
  --card: #ffffff;
  --border: rgba(0,0,0,0.08);
  --border-solid: #e5e7eb;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #fff; color: var(--text); }

/* BUTTONS */
.btn { display: inline-block; text-decoration: none; text-align: center; cursor: pointer; border: none; font-weight: 700; border-radius: 12px; transition: all 0.2s; }
.btn-orange { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: #fff; padding: 13px 28px; font-size: 15px; box-shadow: 0 6px 20px rgba(255,138,0,0.3); }
.btn-primary { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: #fff; padding: 13px 28px; font-size: 15px; box-shadow: 0 6px 20px rgba(255,138,0,0.3); display: block; width: 100%; border: 0; border-radius: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,138,0,0.4); }
.btn-orange:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,138,0,0.4); }
.btn-navy { background: var(--navy); color: #fff; padding: 13px 28px; font-size: 15px; }
.btn-navy:hover { background: var(--navy-dark); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border-solid); padding: 11px 24px; font-size: 14px; }
.btn-outline:hover { background: var(--bg); border-color: #d1d5db; }
.btn-sm { padding: 7px 16px; font-size: 13px; border-radius: 8px; }
.btn-full { width: 100%; display: block; }

/* INPUTS */
.input { width: 100%; border: 1.5px solid var(--border-solid); border-radius: 12px; padding: 12px 16px; font-size: 14px; outline: none; transition: border 0.2s; background: #fff; color: var(--text); font-family: inherit; }
.input-field { width: 100%; border: 1.5px solid var(--border-solid); border-radius: 12px; padding: 12px 16px; font-size: 14px; outline: none; transition: border 0.2s, box-shadow 0.2s; background: #fff; color: var(--text); font-family: inherit; }
.input-field:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,138,0,0.1); }
.input-field::placeholder { color: #9ca3af; }
.input:focus { border-color: var(--orange); }
.input::placeholder { color: #9ca3af; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; display: block; }
.input-group { display: flex; border: 1.5px solid var(--border-solid); border-radius: 12px; overflow: hidden; transition: border 0.2s; }
.input-group:focus-within { border-color: var(--orange); }
.input-group .prefix { background: #f9fafb; padding: 0 14px; display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--muted); border-right: 1.5px solid var(--border-solid); white-space: nowrap; }
.input-group input { flex: 1; border: none; padding: 12px 14px; font-size: 14px; outline: none; font-family: inherit; }

/* CARD */
.card { background: #fff; border-radius: 20px; border: 1.5px solid var(--border); box-shadow: 0 4px 24px rgba(0,0,0,0.06); padding: 24px; }

/* NAVBAR */
.navbar { background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 0 32px; height: 68px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 200; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-icon { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--orange), #ffb200); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 13px; flex-shrink: 0; }
.logo-name { font-weight: 900; font-size: 16px; line-height: 1.2; }
.logo-tag { font-size: 11px; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--navy); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* BADGES */
.badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; }
.badge-orange { background: #fff3e0; color: var(--orange-dark); }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-yellow { background: #fef9c3; color: #ca8a04; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-blue { background: #dbeafe; color: #2563eb; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-navy { background: #e0f0ff; color: var(--navy); }

/* SECTION */
.section { padding: 80px 0; }
.section-bg { background: var(--bg); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-tag { display: inline-block; background: #fff3e0; color: var(--orange-dark); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 5px 14px; border-radius: 20px; margin-bottom: 12px; }
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 900; letter-spacing: -0.5px; margin-bottom: 10px; }
.section-sub { color: var(--muted); font-size: 16px; max-width: 520px; }

/* GRID */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* ADMIN LAYOUT */
.admin-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #0f172a; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 300; }
.sidebar-head { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.sidebar-menu { padding: 12px 0; flex: 1; overflow-y: auto; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: 14px; font-weight: 600; color: #94a3b8; cursor: pointer; transition: all 0.2s; text-decoration: none; border: none; background: none; width: 100%; text-align: left; }
.sidebar-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar-item.active { background: var(--orange); color: #fff; }
.sidebar-footer { padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.07); }
.admin-content { margin-left: 220px; padding: 32px; flex: 1; background: var(--bg); min-height: 100vh; }
.admin-page { display: none; }
.admin-page.active { display: block; }

/* TABLES */
.table-wrap { background: #fff; border-radius: 16px; border: 1.5px solid var(--border); overflow: hidden; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid #f3f4f6; background: #fafafa; }
td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid #f9fafb; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* STAT CARDS */
.stat-card { background: #fff; border-radius: 16px; border: 1.5px solid var(--border); padding: 20px 24px; }
.stat-val { font-size: 34px; font-weight: 900; letter-spacing: -1px; }
.stat-lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* BOTTOM NAV (mobile) */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); display: flex; z-index: 100; }
.bottom-nav a { flex: 1; text-align: center; padding: 10px 0; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; cursor: pointer; }
.bottom-nav a.active { color: var(--orange); }
.bottom-nav a span { display: block; font-size: 20px; margin-bottom: 2px; }
.dash-page { display: none; }
.dash-page.active { display: block; }
.dash-content { padding: 20px 16px 90px; max-width: 640px; margin: 0 auto; }

/* STEPS */
.steps-bar { display: flex; align-items: center; margin-bottom: 28px; }
.step-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; background: #e5e7eb; color: var(--muted); }
.step-dot.active { background: var(--orange); color: #fff; }
.step-dot.done { background: #16a34a; color: #fff; }
.step-line { flex: 1; height: 2px; background: #e5e7eb; }
.step-line.done { background: #16a34a; }
.booking-step { display: none; }
.booking-step.active { display: block; }

/* SPINNER */
.spinner { width: 48px; height: 48px; border: 4px solid #e5e7eb; border-top-color: var(--orange); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* OTP BOXES */
.otp-row { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.otp-box { width: 48px; height: 54px; text-align: center; font-size: 22px; font-weight: 700; border: 1.5px solid var(--border-solid); border-radius: 12px; outline: none; transition: border 0.2s; }
.otp-box:focus { border-color: var(--orange); }

/* VEHICLE CARD */
.vehicle-card { border: 2px solid var(--border-solid); border-radius: 14px; padding: 14px; text-align: center; cursor: pointer; transition: all 0.2s; background: #fff; }
.vehicle-card:hover { border-color: var(--orange); }
.vehicle-card.selected { border-color: var(--orange); background: #fff8f0; }
.vehicle-card img { width: 90px; height: 56px; object-fit: contain; margin-bottom: 8px; }
.vehicle-card .v-name { font-size: 13px; font-weight: 700; }
.vehicle-card .v-rate { font-size: 12px; color: var(--muted); margin-top: 3px; }
.vehicle-card.selected .v-rate { color: var(--orange-dark); }

/* LEGACY PAGE COMPATIBILITY */
.role-btn, .cab-card, .cab-detail, .action-card, .ride-card, .status-toggle, .stat-mini, .ride-request, .earning-card { background: var(--card); border-color: var(--border-solid); }
.role-btn:hover, .cab-card:hover, .cab-detail:hover { border-color: var(--orange); box-shadow: 0 10px 28px rgba(28,61,90,0.08); }
.role-btn.selected, .cab-card.selected { border-color: var(--orange); background: #fff8f0; }
.country-code, select.input-field { background: #fff; color: var(--text); border: 1.5px solid var(--border-solid); }
.fare-row { border-color: #f1f3f5; }
.spec { background: #eef6ff; color: var(--navy); }
.info-note { background: linear-gradient(135deg, #eef6ff, #f8fbff); border-left-color: var(--orange); }
.active-ride { background: linear-gradient(135deg, #fff7eb, #eef6ff); border-color: var(--orange); }

/* SERVICE CARD */
.service-card { background: #fff; border: 1.5px solid var(--border); border-radius: 16px; padding: 20px; transition: all 0.2s; cursor: pointer; }
.service-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-3px); }
.service-icon { font-size: 32px; margin-bottom: 12px; }
.service-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.service-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* TOGGLE */
.toggle-wrap { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 14px; border: 1.5px solid var(--border); padding: 16px 20px; }
.toggle { position: relative; width: 52px; height: 28px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #d1d5db; border-radius: 28px; cursor: pointer; transition: 0.3s; }
.toggle-slider:before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.3s; }
input:checked + .toggle-slider { background: #16a34a; }
input:checked + .toggle-slider:before { transform: translateX(24px); }

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; height: 60px; }
  .nav-links, .nav-actions .btn-outline { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 250; }
  .sidebar-overlay.show { display: block; }
  .admin-content { margin-left: 0; padding: 16px 16px 80px; }
  .mobile-admin-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #0f172a; display: flex; z-index: 100; border-top: 1px solid rgba(255,255,255,0.08); }
  .mobile-admin-nav a { flex: 1; text-align: center; padding: 10px 0; color: #94a3b8; font-size: 10px; font-weight: 600; text-decoration: none; cursor: pointer; }
  .mobile-admin-nav a.active { color: var(--orange); }
  .mobile-admin-nav a span { display: block; font-size: 18px; margin-bottom: 2px; }
  .hide-mob { display: none !important; }
  .section { padding: 50px 0; }
  .hero { min-height: auto !important; padding: 56px 20px !important; }
  .hero h1 { font-size: clamp(34px, 10vw, 52px) !important; }
  .navbar .logo span { font-size: 15px !important; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
