:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: rgba(13, 148, 136, 0.15);
    --accent: #f59e0b;
    --accent-light: rgba(245, 158, 11, 0.15);
    --bg: #0b1220;
    --bg-card: #141c2e;
    --bg-soft: #1e293b;
    --bg-hover: #263348;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0,0,0,0.35);
    --nav-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 18px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 18px; }

/* ========== NAVBAR ========== */
.navbar {
    background: rgba(11, 18, 32, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-h);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none !important;
}
.logo span.accent { color: var(--accent); }
.logo-icon { font-size: 1.5rem; }

.nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-link {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.15s;
    text-decoration: none !important;
}
.nav-link:hover { color: var(--text); background: var(--bg-soft); }
.nav-link.active { color: var(--primary); background: var(--primary-light); }
.nav-link.btn-solid {
    background: var(--primary);
    color: #fff !important;
}
.nav-link.btn-solid:hover { background: var(--primary-dark); }
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: var(--bg-soft);
    border-radius: 999px;
    font-size: 0.85rem;
}
.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem; color: #fff;
}
.mobile-toggle {
    display: none;
    background: none; border: none; color: var(--text);
    font-size: 1.5rem; cursor: pointer;
}

/* ========== HERO ========== */
.hero {
    padding: 70px 0 50px;
    background: radial-gradient(ellipse at 50% 0%, rgba(13,148,136,0.18) 0%, transparent 60%);
    text-align: center;
}
.hero h1 {
    font-size: clamp(2rem, 5.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}
.hero h1 .gold { color: var(--accent); }
.hero p.lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 28px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none !important;
    font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-soft); color: var(--text); border: 1px solid rgba(255,255,255,0.08); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-accent { background: var(--accent); color: #111; }
.btn-accent:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ========== CARDS & LAYOUT ========== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 24px;
    box-shadow: var(--shadow);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.page-header { padding: 32px 0 16px; }
.page-header h1 { font-size: 1.7rem; font-weight: 700; margin-bottom: 4px; }
.page-header p { color: var(--text-muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* ========== FEATURES ========== */
.features { padding: 50px 0; }
.section-title {
    text-align: center;
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.section-sub {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 36px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(13,148,136,0.3);
}
.feature-card .icon { font-size: 1.8rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ========== FORMS ========== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.form-control {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--bg-soft);
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

/* ========== VEHICLE SELECTOR ========== */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 14px 0;
}
.vehicle-option {
    background: var(--bg);
    border: 2px solid var(--bg-soft);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
}
.vehicle-option:hover { border-color: var(--primary); }
.vehicle-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}
.vehicle-option .v-icon { font-size: 1.7rem; }
.vehicle-option .v-name { font-weight: 600; font-size: 0.9rem; margin: 4px 0 2px; }
.vehicle-option .v-price { color: var(--accent); font-size: 0.82rem; font-weight: 600; }
.vehicle-option .v-eta { color: var(--text-dim); font-size: 0.75rem; }

/* ========== MAP ========== */
#map, .map-box {
    height: 280px;
    border-radius: var(--radius);
    margin: 16px 0;
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.06);
}

/* ========== STATS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.04);
}
.stat-card .value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}
.stat-card .label {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 4px;
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: rgba(16,185,129,0.18); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.18); color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,0.18); color: var(--danger); }
.badge-info    { background: rgba(59,130,246,0.18); color: var(--info); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ========== TABLES ========== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
th { color: var(--text-dim); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ========== TRACKING ========== */
.tracking-box {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-top: 16px;
}
.progress-track {
    height: 6px;
    background: var(--bg-soft);
    border-radius: 3px;
    overflow: hidden;
    margin: 12px 0;
}
.progress-track .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 3px;
}

/* ========== AUTH ========== */
.auth-wrap {
    min-height: calc(100vh - var(--nav-h) - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { text-align: center; font-size: 1.5rem; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 0.95rem; }

/* ========== ALERTS ========== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.25); color: var(--success); }
.alert-error   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); color: var(--danger); }
.alert-info    { background: rgba(13,148,136,0.12); border: 1px solid rgba(13,148,136,0.25); color: var(--primary); }
.alert-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); color: var(--warning); }

/* ========== FOOTER ========== */
.footer {
    background: #070d18;
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 48px 0 28px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.4fr;
    gap: 36px;
    margin-bottom: 36px;
}
.footer h4, .footer h5 { margin-bottom: 12px; font-size: 0.95rem; }
.footer a {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 7px;
    text-decoration: none;
}
.footer a:hover { color: var(--primary); }
.footer p { color: var(--text-muted); font-size: 0.88rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 20px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-dim);
}
.footer-bottom .disclaimer { margin-top: 6px; opacity: 0.7; }

/* ========== WALLET / PROFILE ========== */
.wallet-balance {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}
.profile-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; color: #fff;
}

/* ========== RIDE CARD ========== */
.ride-card {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.04);
}
.ride-card .route { font-weight: 600; margin-bottom: 4px; }
.ride-card .meta { color: var(--text-muted); font-size: 0.85rem; }

/* ========== TOGGLE SWITCH ========== */
.switch {
    position: relative;
    width: 52px; height: 28px;
    display: inline-block;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-soft);
    border-radius: 28px;
    transition: 0.25s;
}
.slider:before {
    content: "";
    position: absolute;
    height: 22px; width: 22px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.25s;
}
input:checked + .slider { background: var(--primary); }
input:checked + .slider:before { transform: translateX(24px); }

/* ========== NOTIFICATION DOT ========== */
.notif-dot {
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    display: inline-block;
    margin-left: 4px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-h);
        right: 12px;
        background: var(--bg-card);
        padding: 14px;
        border-radius: var(--radius);
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: var(--shadow);
        min-width: 200px;
        z-index: 999;
    }
    .mobile-toggle { display: block; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero { padding: 48px 0 36px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; gap: 10px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.hidden { display: none !important; }
