/* ==========================================
   CSS Variables & Reset
   ========================================== */

:root {
    color-scheme: light dark;

    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --purple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --blue-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f5576c;

    --text-dark: #1d1d1f;
    --text-medium: #515154;
    --text-light: #86868b;
    --bg-light: #f5f5f7;
    --bg-white: #ffffff;
    --page-bg: #ffffff;
    --navbar-surface: rgba(255, 255, 255, 0.72);
    --navbar-border: rgba(0, 0, 0, 0.06);
    --mobile-nav-bg: #ffffff;
    --focus-ring: rgba(102, 126, 234, 0.45);

    --how-section-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --benefit-card-bg: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    --footer-bg: #1a202c;
    --footer-text: #ffffff;
    --footer-muted: rgba(255, 255, 255, 0.72);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.16);

    --border-radius: 12px;
    --radius-sm: 8px;
    --space-unit: 8px;
    --transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

html[data-theme="dark"] {
    --text-dark: #f5f5f7;
    --text-medium: #a1a1a6;
    --text-light: #8e8e93;
    --bg-light: #2c2c2e;
    --bg-white: #1c1c1e;
    --page-bg: #000000;
    --navbar-surface: rgba(28, 28, 30, 0.86);
    --navbar-border: rgba(255, 255, 255, 0.08);
    --mobile-nav-bg: #1c1c1e;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.6);
    --how-section-bg: linear-gradient(135deg, #0d0d12 0%, #12161f 100%);
    --benefit-card-bg: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
    --footer-bg: #000000;
    --footer-text: #f5f5f7;
    --footer-muted: rgba(245, 245, 247, 0.72);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
        --text-dark: #f5f5f7;
        --text-medium: #a1a1a6;
        --text-light: #8e8e93;
        --bg-light: #2c2c2e;
        --bg-white: #1c1c1e;
        --page-bg: #000000;
        --navbar-surface: rgba(28, 28, 30, 0.86);
        --navbar-border: rgba(255, 255, 255, 0.08);
        --mobile-nav-bg: #1c1c1e;
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
        --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.6);
        --how-section-bg: linear-gradient(135deg, #0d0d12 0%, #12161f 100%);
        --benefit-card-bg: linear-gradient(135deg, #2c2c2e 0%, #1c1c1e 100%);
        --footer-bg: #000000;
        --footer-text: #f5f5f7;
        --footer-muted: rgba(245, 245, 247, 0.72);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .gradient-orb,
    .phone-frame {
        animation: none !important;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--page-bg);
    transition: background-color 0.25s ease, color 0.25s ease;
}

*:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   Navigation
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--navbar-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--navbar-border);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 24px;
    color: var(--text-dark);
    flex-shrink: 0;
}

.nav-brand .brand-name {
    white-space: nowrap;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 22%;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: nowrap;
}

/* Keep each nav control on one line; avoid flex-shrink wrapping label text */
.nav-links > a,
.nav-links > .btn-login,
.nav-links > .btn-nav {
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links > .theme-control,
.nav-links > .language-selector {
    flex-shrink: 0;
}

.theme-control {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--navbar-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-light);
}

.theme-btn {
    margin: 0;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-medium);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    transition: var(--transition);
}

.theme-btn:hover {
    background: var(--bg-white);
    color: var(--text-dark);
}

.theme-btn.theme-btn-active {
    background: var(--primary-color);
    color: #ffffff;
}

.theme-btn:focus-visible {
    outline-offset: -2px;
}

.nav-links a:not(.btn-nav) {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:not(.btn-nav):hover {
    color: var(--primary-color);
}

.btn-nav {
    padding: 10px 24px;
    background: var(--primary-gradient);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--purple-gradient);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--blue-gradient);
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--secondary-gradient);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 120px 0 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 24px;
    animation: fadeInDown 1s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-icon {
    font-size: 18px;
}

.hero-title {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 1s ease-out 0.2s both;
    color: #ffffff;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(18px, 3vw, 22px);
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto 40px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

/* ==========================================
   Sections
   ========================================== */

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-description {
    font-size: 18px;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   Problem Section
   ========================================== */

.problem-section {
    background: var(--bg-light);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.problem-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.problem-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.problem-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.problem-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.problem-card ul {
    list-style: none;
}

.problem-card li {
    padding: 12px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-medium);
}

.problem-card li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 24px;
    line-height: 1;
}

/* ==========================================
   Solution Section
   ========================================== */

.solution-section {
    background: var(--bg-white);
}

.solution-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.lead-text {
    font-size: 20px;
    color: var(--text-medium);
    margin-bottom: 32px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: start;
}

.feature-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.feature-content p {
    color: var(--text-medium);
    font-size: 15px;
}

/* Phone Mockup */

.phone-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.phone-frame {
    width: 300px;
    height: 600px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: phoneFloat 6s ease-in-out infinite;
    overflow: hidden;
}

@keyframes phoneFloat {
    0%, 100% { transform: translateY(0) rotateY(-5deg); }
    50% { transform: translateY(-20px) rotateY(5deg); }
}

.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.app-demo {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.demo-header {
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    text-align: center;
    position: relative;
}

.demo-time {
    position: absolute;
    left: 16px;
    top: 16px;
    font-size: 12px;
    font-weight: 600;
}

.demo-title {
    font-size: 18px;
    font-weight: 700;
}

.demo-map {
    flex: 1;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 100%);
    position: relative;
}

.demo-card {
    background: white;
    padding: 24px;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.demo-route {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.demo-point {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.demo-point.start {
    background: var(--primary-color);
}

.demo-point.end {
    background: var(--accent-color);
}

.demo-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.demo-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-price {
    font-size: 28px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-time-badge {
    padding: 6px 12px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-medium);
}

/* ==========================================
   How It Works Section
   ========================================== */

.how-section {
    background: var(--how-section-bg);
}

.how-section .section-title {
    color: #ffffff;
}

.how-section .section-label {
    background: rgba(102, 126, 234, 0.3);
    color: #ffffff;
}

.how-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 64px;
    align-items: start;
}

.role-badge {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 32px;
    color: white;
}

.role-badge.passenger {
    background: var(--primary-gradient);
}

.role-badge.driver {
    background: var(--secondary-gradient);
}

.how-steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.how-step {
    display: flex;
    gap: 20px;
    align-items: start;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.step-content h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.step-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.how-divider {
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
    min-height: 400px;
}

/* ==========================================
   Benefits Section
   ========================================== */

.benefits-section {
    background: var(--bg-white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.benefit-card {
    background: var(--benefit-card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.benefit-icon {
    font-size: 48px;
    margin-bottom: 24px;
    display: block;
}

.benefit-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.benefit-card p {
    color: var(--text-medium);
    font-size: 16px;
}

/* ==========================================
   Partners (B2B) — footer-adjacent
   ========================================== */

.partners-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.partners-section .section-header {
    text-align: center;
    margin-bottom: 48px;
}

.partners-section .lead-text {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-medium);
    font-size: 18px;
    line-height: 1.6;
}

.partners-cta-wrap {
    margin-top: 48px;
    text-align: center;
}

/* ==========================================
   Stats Section
   ========================================== */

.stats-section {
    background: var(--bg-light);
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 48px;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.stat-description {
    font-size: 16px;
    color: var(--text-medium);
    font-weight: 500;
}

/* ==========================================
   CTA Section
   ========================================== */

.cta-section {
    background: var(--primary-gradient);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 64px 0 32px;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 28px;
    font-weight: 700;
}

.footer-text {
    max-width: 600px;
    margin: 0 auto 32px;
    opacity: 0.8;
}

.footer-security-note {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.92;
}

.footer-links {
    margin-bottom: 16px;
    font-size: 14px;
}

.footer-links a {
    color: var(--footer-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--footer-text);
}

.footer-legal {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.6;
}

/* ==========================================
   Animations
   ========================================== */

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

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

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 968px) {
    .solution-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .phone-mockup {
        order: -1;
    }

    .how-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .how-divider {
        display: none;
    }
}

/* Switch to drawer nav before inline links wrap (floating pill + i18n strings) */
@media (max-width: 1180px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--mobile-nav-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: var(--transition);
        gap: 12px;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .theme-control {
        width: 100%;
        justify-content: stretch;
    }

    .theme-btn {
        flex: 1;
        text-align: center;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .nav-links > .btn-login,
    .nav-links > .btn-nav {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .section {
        padding: 60px 0;
    }

    .problem-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 32px;
    }

    .phone-frame {
        width: 250px;
        height: 500px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ==========================================
   App Overlay & Auth Integration
   ========================================== */

.btn-login {
    padding: 10px 24px;
    background: transparent;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-login:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.app-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease;
    overflow-y: auto;
    /* Scoped tokens for auth + shell (inherit into #app-container); follow landing html[data-theme]. */
    --auth-scrim: rgba(0, 0, 0, 0.55);
    --auth-fullscreen-bg: #000000;
    --auth-surface: rgba(30, 30, 32, 0.96);
    --auth-card-border: rgba(255, 255, 255, 0.12);
    --auth-card-shadow: 0 20px 56px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    --auth-input-bg: rgba(45, 45, 45, 0.72);
    --auth-input-border: rgba(255, 255, 255, 0.1);
    --auth-input-color: #ffffff;
    --auth-placeholder: rgba(255, 255, 255, 0.42);
    --auth-close-bg: rgba(255, 255, 255, 0.12);
    --auth-close-color: #ffffff;
    --auth-close-border: rgba(255, 255, 255, 0.22);
    --auth-divider-line: rgba(255, 255, 255, 0.18);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.74);
    --text-muted: rgba(255, 255, 255, 0.45);
    --card-background: #2d2d2d;
}

html[data-theme='light'] .app-overlay {
    --auth-scrim: rgba(17, 24, 39, 0.38);
    --auth-fullscreen-bg: #f2f2f7;
    --auth-surface: #ffffff;
    --auth-card-border: rgba(0, 0, 0, 0.08);
    --auth-card-shadow: 0 20px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
    --auth-input-bg: #f5f5f7;
    --auth-input-border: rgba(0, 0, 0, 0.12);
    --auth-input-color: #1a1a1a;
    --auth-placeholder: rgba(0, 0, 0, 0.45);
    --auth-close-bg: rgba(0, 0, 0, 0.06);
    --auth-close-color: #1a1a1a;
    --auth-close-border: rgba(0, 0, 0, 0.12);
    --auth-divider-line: rgba(0, 0, 0, 0.12);
    --text-primary: #1a1a1a;
    --text-secondary: rgba(0, 0, 0, 0.62);
    --text-muted: rgba(0, 0, 0, 0.42);
    --card-background: #ebebed;
}

@media (prefers-color-scheme: light) {
    html[data-theme='auto'] .app-overlay {
        --auth-scrim: rgba(17, 24, 39, 0.38);
        --auth-fullscreen-bg: #f2f2f7;
        --auth-surface: #ffffff;
        --auth-card-border: rgba(0, 0, 0, 0.08);
        --auth-card-shadow: 0 20px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
        --auth-input-bg: #f5f5f7;
        --auth-input-border: rgba(0, 0, 0, 0.12);
        --auth-input-color: #1a1a1a;
        --auth-placeholder: rgba(0, 0, 0, 0.45);
        --auth-close-bg: rgba(0, 0, 0, 0.06);
        --auth-close-color: #1a1a1a;
        --auth-close-border: rgba(0, 0, 0, 0.12);
        --auth-divider-line: rgba(0, 0, 0, 0.12);
        --text-primary: #1a1a1a;
        --text-secondary: rgba(0, 0, 0, 0.62);
        --text-muted: rgba(0, 0, 0, 0.42);
        --card-background: #ebebed;
    }
}

@media (prefers-color-scheme: dark) {
    html[data-theme='auto'] .app-overlay {
        --auth-scrim: rgba(0, 0, 0, 0.55);
        --auth-fullscreen-bg: #000000;
        --auth-surface: rgba(30, 30, 32, 0.96);
        --auth-card-border: rgba(255, 255, 255, 0.12);
        --auth-card-shadow: 0 20px 56px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
        --auth-input-bg: rgba(45, 45, 45, 0.72);
        --auth-input-border: rgba(255, 255, 255, 0.1);
        --auth-input-color: #ffffff;
        --auth-placeholder: rgba(255, 255, 255, 0.42);
        --auth-close-bg: rgba(255, 255, 255, 0.12);
        --auth-close-color: #ffffff;
        --auth-close-border: rgba(255, 255, 255, 0.22);
        --auth-divider-line: rgba(255, 255, 255, 0.18);
        --text-primary: #ffffff;
        --text-secondary: rgba(255, 255, 255, 0.74);
        --text-muted: rgba(255, 255, 255, 0.45);
        --card-background: #2d2d2d;
    }
}

html[data-theme='dark'] .app-overlay {
    --auth-scrim: rgba(0, 0, 0, 0.58);
    --auth-fullscreen-bg: #000000;
    --auth-surface: rgba(24, 24, 26, 0.98);
    --auth-card-border: rgba(255, 255, 255, 0.1);
    --auth-card-shadow: 0 20px 56px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    --auth-input-bg: rgba(45, 45, 45, 0.75);
    --auth-input-border: rgba(255, 255, 255, 0.09);
    --auth-input-color: #ffffff;
    --auth-placeholder: rgba(255, 255, 255, 0.4);
    --auth-close-bg: rgba(255, 255, 255, 0.1);
    --auth-close-color: #ffffff;
    --auth-close-border: rgba(255, 255, 255, 0.2);
    --auth-divider-line: rgba(255, 255, 255, 0.16);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.74);
    --text-muted: rgba(255, 255, 255, 0.45);
    --card-background: #2d2d2d;
}

/* Default: auth screens with blurred background */
.app-overlay.show {
    /* Above marketing .navbar (z-index 10060 in landing-redesign.css) so shell is not hidden under header */
    z-index: 10080;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    align-items: center;
    justify-content: center;
    /* Safari: opacity animation + transition on same property can leave the overlay visually blank */
    animation: none;
    transition: none;
    background: var(--auth-scrim) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Fullscreen shell (dashboard): background follows theme */
.app-overlay.show.fullscreen {
    align-items: stretch !important;
    justify-content: stretch !important;
    flex-direction: column !important;
    background: var(--auth-fullscreen-bg) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* Safari: fixed flex children sometimes compute 0 height without an explicit axis size */
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    /* Avoid scrollable overlay + compositor glitches leaving a blank frame on WebKit */
    overflow: hidden !important;
}

/* Map / dashboard still visible behind sheet flows (e.g. Broadcast ride) */
.app-overlay.show.fullscreen.app-overlay--glass-scrim {
    background: rgba(248, 250, 252, 0.38) !important;
    backdrop-filter: saturate(165%) blur(18px) !important;
    -webkit-backdrop-filter: saturate(165%) blur(18px) !important;
}

html[data-theme='dark'] .app-overlay.show.fullscreen.app-overlay--glass-scrim {
    background: rgba(15, 23, 42, 0.48) !important;
}

@media (prefers-color-scheme: dark) {
    html[data-theme='auto'] .app-overlay.show.fullscreen.app-overlay--glass-scrim {
        background: rgba(15, 23, 42, 0.48) !important;
    }
}

.app-overlay--glass-scrim .page-container.page-container--broadcast {
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 52%),
        radial-gradient(80% 50% at 100% 20%, rgba(45, 212, 191, 0.06) 0%, transparent 45%),
        transparent;
}

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

.app-container-full {
    width: 100%;
    position: relative;
    animation: slideInUp 0.4s ease;
}

.app-overlay.show:not(.fullscreen) .app-container-full {
    max-width: 100%;
    width: auto;
}

.app-overlay.show.fullscreen .app-container-full {
    max-width: 100%;
    width: 100%;
    /* Do not use height: 100% alone — if parent flex height is wrong in WebKit, shell collapses to blank */
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* Avoid slideInUp (opacity 0 → 1) leaving WebKit in a bad compositing state over fixed + flex */
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

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

/* Close button for app overlay */
.app-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: var(--auth-close-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--auth-close-border);
    border-radius: 50%;
    color: var(--auth-close-color);
    font-size: 22px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.app-close-btn:hover {
    background: var(--auth-close-bg);
    filter: brightness(1.12);
    transform: scale(1.06) rotate(90deg);
    border-color: var(--auth-close-border);
}

/* Hide landing page when app is active */
body.app-active {
    overflow: hidden;
}

body.app-active .navbar,
body.app-active .hero,
body.app-active .section,
body.app-active .footer {
    pointer-events: none;
}

/* Marketing layout must not trap the fixed shell (inset + compositor hint; z-index from .app-overlay.show). */
body.app-active #app-overlay.app-overlay.show.fullscreen {
    position: fixed !important;
    inset: 0 !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Desktop marketing constrains .dashboard-container — full-bleed inside app shell */
body.app-active .app-overlay.show.fullscreen .dashboard-container {
    max-width: none !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Responsive adjustments for overlay */
@media (max-width: 640px) {
    .app-close-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .auth-card {
        padding: 22px 18px 20px;
        border-radius: 18px;
        max-height: min(92vh, 720px);
    }

    .app-overlay {
        align-items: flex-start;
        padding-top: 12px;
    }

    .auth-container {
        padding: 8px 10px 16px;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #DD548A;
    --background-dark: #000000;
    --card-background: #262626;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --success-color: #4CAF50;
    --warning-color: #FFA500;
    --error-color: #f44336;
    --border-radius: 28px;
    --border-radius-small: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
}

/* ============ AUTH PAGES ============ */
.auth-container {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px 20px;
    box-sizing: border-box;
}

.app-overlay:not(.fullscreen) .auth-container {
    min-height: auto;
    flex: 0 0 auto;
}

.app-overlay.show.fullscreen .auth-container {
    min-height: 100vh;
    flex: 1;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: min(88vh, 680px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 28px 22px 26px;
    -webkit-overflow-scrolling: touch;
    background: var(--auth-surface);
    border-radius: 20px;
    box-shadow: var(--auth-card-shadow);
    border: 1px solid var(--auth-card-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: slideInUp 0.5s ease-out;
}

.auth-card-wide {
    max-width: 440px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: transparent;
    text-align: center;
    margin: 0 0 14px 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.logo {
    width: 60px;
    height: 60px;
}

.logo-container h1 {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
    padding-left: 4px;
}

.auth-label-optional {
    font-weight: 400;
    opacity: 0.75;
}

.password-field-wrap {
    position: relative;
    width: 100%;
}

.form-group .password-field-wrap input {
    padding-right: 48px;
}

.password-toggle-icon {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle-icon:hover {
    color: var(--text-primary);
    background: rgba(102, 126, 234, 0.12);
}

.password-toggle-icon:focus-visible {
    outline: 2px solid rgba(102, 126, 234, 0.7);
    outline-offset: 2px;
}

.password-toggle-svg-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.password-toggle-svg-wrap[hidden] {
    display: none !important;
}

.forgot-password-wrap {
    margin: -4px 0 0 0;
    padding-left: 4px;
}

.forgot-password-btn {
    border: none;
    background: none;
    padding: 4px 4px 4px 0;
    margin: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-btn:hover {
    color: var(--text-primary);
}

.forgot-password-btn:focus-visible {
    outline: 2px solid rgba(102, 126, 234, 0.7);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Forgot password modal (parity with mobile ForgotPasswordDialog) */
.forgot-password-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--auth-scrim);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.forgot-password-modal-backdrop[hidden] {
    display: none !important;
}

.forgot-password-modal-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: min(90vh, 620px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 28px 24px 22px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-card-border);
    border-radius: 18px;
    box-shadow: var(--auth-card-shadow);
    color: var(--text-primary);
}

.forgot-password-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--auth-close-border);
    background: var(--auth-close-bg);
    color: var(--auth-close-color);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.forgot-password-modal-close:hover {
    opacity: 0.9;
}

.forgot-password-modal-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.forgot-password-success-icon {
    color: var(--success-color);
}

.forgot-password-modal-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.forgot-password-modal-desc {
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.forgot-password-modal-card .auth-label {
    margin-bottom: 6px;
}

.forgot-password-modal-card input[type='email'] {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    background: var(--auth-input-bg);
    color: var(--auth-input-color);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    border: 1px solid var(--auth-input-border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 4px;
}

.forgot-password-modal-card input[type='email']::placeholder {
    color: var(--auth-placeholder);
}

.forgot-password-modal-card input[type='email']:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.22);
    border-color: rgba(102, 126, 234, 0.45);
}

.forgot-password-modal-error {
    font-size: 13px;
    color: var(--error-color);
    margin: 8px 0 4px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.forgot-password-modal-error[hidden] {
    display: none !important;
}

.forgot-password-send-btn {
    width: 100%;
    margin-top: 14px;
}

.forgot-password-cancel-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
}

.auth-bootstrap-error {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    max-width: min(520px, calc(100vw - 32px));
    padding: 14px 18px;
    background: rgba(20, 20, 22, 0.95);
    color: #f5f5f7;
    border: 1px solid rgba(244, 67, 54, 0.45);
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 100002;
}

html[data-theme='light'] .auth-bootstrap-error {
    background: rgba(255, 255, 255, 0.98);
    color: #1a1a1a;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: light) {
    html[data-theme='auto'] .auth-bootstrap-error {
        background: rgba(255, 255, 255, 0.98);
        color: #1a1a1a;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    }
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: 12px;
    background: var(--auth-input-bg);
    color: var(--auth-input-color);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--auth-input-border);
}

.form-group input::placeholder {
    color: var(--auth-placeholder);
}

.form-group input:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.22);
    border-color: rgba(102, 126, 234, 0.45);
}

.forgot-password {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 16px;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--text-primary);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

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

.divider span {
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider {
    margin: 8px 0 12px;
}

.auth-oauth {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 2px;
}

.btn-oauth {
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--auth-oauth-border, rgba(255, 255, 255, 0.14));
    background: var(--auth-oauth-google-bg, #ffffff);
    color: var(--auth-oauth-google-text, #1f1f1f);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn-oauth:hover:not(:disabled) {
    filter: brightness(0.97);
    transform: translateY(-1px);
}

.btn-oauth:disabled {
    opacity: 0.55;
    cursor: wait;
}

.btn-oauth-icon {
    flex-shrink: 0;
}

.btn-google-oauth {
    justify-content: center;
}

.btn-apple-oauth {
    background: #000000;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-apple-oauth:hover:not(:disabled) {
    filter: brightness(1.08);
}

html[data-theme='light'] .app-overlay .btn-google-oauth {
    --auth-oauth-google-bg: #ffffff;
    --auth-oauth-google-text: #1f1f1f;
    --auth-oauth-border: rgba(0, 0, 0, 0.12);
}

html[data-theme='dark'] .app-overlay .btn-google-oauth,
html[data-theme='auto'] .app-overlay .btn-google-oauth {
    --auth-oauth-google-bg: #ffffff;
    --auth-oauth-google-text: #1f1f1f;
    --auth-oauth-border: rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    html[data-theme='auto'] .app-overlay .btn-google-oauth {
        --auth-oauth-google-bg: #f8f8f8;
        --auth-oauth-google-text: #1a1a1a;
        --auth-oauth-border: rgba(255, 255, 255, 0.12);
    }
}

.btn {
    padding: 14px 22px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    letter-spacing: 0.45px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--card-background);
    color: var(--text-primary);
}

.btn-secondary:hover {
    filter: brightness(0.92);
}

html[data-theme='light'] .app-overlay .btn-secondary:hover {
    filter: brightness(0.96);
}

@media (prefers-color-scheme: light) {
    html[data-theme='auto'] .app-overlay .btn-secondary:hover {
        filter: brightness(0.96);
    }
}

.btn-google {
    width: 100%;
    background: var(--card-background);
    color: var(--text-primary);
    height: 56px;
}

.btn-google:hover {
    filter: brightness(0.9);
}

.btn-block {
    width: 100%;
}

.btn-large {
    height: 56px;
    font-size: 16px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 8px;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.terms-checkbox label {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.terms-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.auth-switch a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.error-message {
    padding: 12px 16px;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error-color);
    border-radius: var(--border-radius-small);
    color: var(--error-color);
    font-size: 13px;
    margin-top: 0;
}

.error-message[hidden] {
    display: none !important;
}

.error-message:not([hidden]) {
    display: block;
}

/* Role Selection */
.role-selection {
    margin: 8px 0;
}

.role-selection p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 8px;
}

.role-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.role-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--card-background);
    border: 2px solid transparent;
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-btn:hover {
    background: #2d2d2d;
    border-color: rgba(102, 126, 234, 0.3);
}

.role-btn.active {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.role-btn svg {
    width: 32px;
    height: 32px;
    stroke-width: 2;
}

/* ============ DASHBOARD ============ */
.dashboard-container {
    min-height: 100vh;
    position: relative;
    background: var(--page-bg);
}

.app-overlay .dashboard-container {
    height: 100vh;
    overflow: hidden;
    /* Let .app-overlay.show.fullscreen themed --auth-fullscreen-bg show through */
    background: transparent;
}

.app-overlay.show.fullscreen .dashboard-container {
    flex: 1 1 auto;
    /* Viewport-sized shell even when parent % height chain breaks (Safari + nested flex) */
    min-height: 100vh;
    min-height: 100dvh;
    min-height: 100svh;
    height: auto;
    max-height: none;
}

/* Navbar — passenger map: floating pill; frosted glass (same treatment as .map-layer-dock) */
.app-navbar.app-navbar--passenger {
    position: absolute;
    top: max(12px, env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    z-index: 100;
    display: block;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.app-navbar--passenger .app-navbar__shell {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: min(720px, 100%);
    margin: 0 auto;
    padding: 6px 8px 6px 10px;
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(99, 102, 241, 0.12);
}

.menu-btn,
.notifications-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, transform 0.15s ease, box-shadow 0.2s;
}

.app-navbar--passenger .menu-btn--float {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #1e293b;
    background: transparent;
}

.app-navbar--passenger .menu-btn--float:hover {
    background: rgba(15, 23, 42, 0.06);
}

.app-navbar--passenger .menu-btn--float svg {
    stroke: currentColor;
}

.menu-btn:hover:not(.menu-btn--float),
.notifications-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.menu-btn svg,
.notifications-btn svg {
    stroke: #000;
}

.app-navbar__brandmark {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 0 4px 0 0;
    text-decoration: none;
    color: #0f172a;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.app-navbar__title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

@media (max-width: 379px) {
    .app-navbar__title {
        display: none;
    }
}

.app-navbar__brandmark:hover {
    background: rgba(15, 23, 42, 0.04);
}

.app-navbar__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 22%;
    flex-shrink: 0;
}

.app-navbar--passenger .navbar-dest-pill {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    text-align: left;
    color: #475569;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.app-navbar--passenger .navbar-dest-pill:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(99, 102, 241, 0.28);
    color: #312e81;
}

.app-navbar--passenger .navbar-dest-pill:active {
    transform: scale(0.99);
}

.app-navbar--passenger .navbar-dest-pill__icon {
    flex-shrink: 0;
    color: var(--primary-color);
    opacity: 0.9;
}

.app-navbar--passenger .navbar-dest-pill__text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Passenger map shell + sidebar — dark / Auto (dark OS); pairs with .app-overlay theme tokens */
html[data-theme='dark'] .app-navbar--passenger .app-navbar__shell {
    background: rgba(28, 28, 30, 0.52);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 28px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(99, 102, 241, 0.22);
}

html[data-theme='dark'] .app-navbar--passenger .menu-btn--float {
    color: #e2e8f0;
}

html[data-theme='dark'] .app-navbar--passenger .menu-btn--float:hover {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .app-navbar--passenger .app-navbar__brandmark {
    color: #f1f5f9;
}

html[data-theme='dark'] .app-navbar--passenger .app-navbar__brandmark:hover {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme='dark'] .app-navbar--passenger .navbar-dest-pill {
    color: #cbd5e1;
    background: rgba(45, 45, 48, 0.48);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme='dark'] .app-navbar--passenger .navbar-dest-pill:hover {
    background: rgba(55, 55, 58, 0.62);
    color: #f1f5f9;
    border-color: rgba(129, 140, 248, 0.45);
}

html[data-theme='dark'] .app-navbar__tool-cluster {
    background: rgba(45, 45, 48, 0.48);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme='dark'] .app-navbar__tool-cluster .navbar-icon-btn,
html[data-theme='dark'] .app-navbar__tool-cluster .notifications-btn {
    color: #e2e8f0;
}

html[data-theme='dark'] .app-navbar__tool-cluster .navbar-icon-btn:hover,
html[data-theme='dark'] .app-navbar__tool-cluster .notifications-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

html[data-theme='dark'] .sidebar {
    background: #1c1c1e;
    box-shadow: 2px 0 28px rgba(0, 0, 0, 0.55);
}

html[data-theme='dark'] .sidebar-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html[data-theme='dark'] .user-name {
    color: #f1f5f9;
}

html[data-theme='dark'] .user-role {
    color: #94a3b8;
}

html[data-theme='dark'] .close-sidebar {
    color: #94a3b8;
}

html[data-theme='dark'] .menu-item {
    color: #e2e8f0;
}

html[data-theme='dark'] .menu-item:hover {
    background: rgba(99, 102, 241, 0.14);
    color: #c7d2fe;
}

html[data-theme='dark'] .menu-item.active {
    background: rgba(99, 102, 241, 0.22);
    color: #e0e7ff;
}

html[data-theme='dark'] .location-btn {
    background: rgba(45, 45, 48, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
    html[data-theme='auto'] .app-navbar--passenger .app-navbar__shell {
        background: rgba(28, 28, 30, 0.52);
        backdrop-filter: blur(22px) saturate(180%);
        -webkit-backdrop-filter: blur(22px) saturate(180%);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow:
            0 4px 28px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(99, 102, 241, 0.22);
    }

    html[data-theme='auto'] .app-navbar--passenger .menu-btn--float {
        color: #e2e8f0;
    }

    html[data-theme='auto'] .app-navbar--passenger .menu-btn--float:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    html[data-theme='auto'] .app-navbar--passenger .app-navbar__brandmark {
        color: #f1f5f9;
    }

    html[data-theme='auto'] .app-navbar--passenger .app-navbar__brandmark:hover {
        background: rgba(255, 255, 255, 0.06);
    }

    html[data-theme='auto'] .app-navbar--passenger .navbar-dest-pill {
        color: #cbd5e1;
        background: rgba(45, 45, 48, 0.48);
        backdrop-filter: blur(14px) saturate(160%);
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        border-color: rgba(255, 255, 255, 0.1);
    }

    html[data-theme='auto'] .app-navbar--passenger .navbar-dest-pill:hover {
        background: rgba(55, 55, 58, 0.62);
        color: #f1f5f9;
        border-color: rgba(129, 140, 248, 0.45);
    }

    html[data-theme='auto'] .app-navbar__tool-cluster {
        background: rgba(45, 45, 48, 0.48);
        backdrop-filter: blur(14px) saturate(160%);
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        border-color: rgba(255, 255, 255, 0.1);
    }

    html[data-theme='auto'] .app-navbar__tool-cluster .navbar-icon-btn,
    html[data-theme='auto'] .app-navbar__tool-cluster .notifications-btn {
        color: #e2e8f0;
    }

    html[data-theme='auto'] .app-navbar__tool-cluster .navbar-icon-btn:hover,
    html[data-theme='auto'] .app-navbar__tool-cluster .notifications-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    html[data-theme='auto'] .sidebar {
        background: #1c1c1e;
        box-shadow: 2px 0 28px rgba(0, 0, 0, 0.55);
    }

    html[data-theme='auto'] .sidebar-header {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    html[data-theme='auto'] .user-name {
        color: #f1f5f9;
    }

    html[data-theme='auto'] .user-role {
        color: #94a3b8;
    }

    html[data-theme='auto'] .close-sidebar {
        color: #94a3b8;
    }

    html[data-theme='auto'] .menu-item {
        color: #e2e8f0;
    }

    html[data-theme='auto'] .menu-item:hover {
        background: rgba(99, 102, 241, 0.14);
        color: #c7d2fe;
    }

    html[data-theme='auto'] .menu-item.active {
        background: rgba(99, 102, 241, 0.22);
        color: #e0e7ff;
    }

    html[data-theme='auto'] .location-btn {
        background: rgba(45, 45, 48, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
    }
}

/* Where next? — route panel: `dialog.show()` when map exists (page not inert); else `showModal()`. */
dialog.wn-popover.wn-popover--dialog {
    position: fixed;
    inset: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100dvh;
    overflow: visible;
    box-sizing: border-box;
    pointer-events: none;
}

/* Above `#app-overlay` inline z-index (100000) when non-modal. */
dialog.wn-popover.wn-popover--dialog.wn-popover--map-interact {
    z-index: 200000;
}

dialog.wn-popover.wn-popover--dialog::backdrop {
    background: transparent;
}

.wn-popover__backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(15, 23, 42, 0.06);
    pointer-events: auto;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-popover__backdrop {
    background: rgba(0, 0, 0, 0.12);
}

.wn-popover__panel.wn-gmaps-panel {
    position: fixed;
    z-index: 1;
    max-height: min(560px, calc(100dvh - 88px));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 14px;
    box-sizing: border-box;
    pointer-events: auto;
    font-family: var(--font-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(99, 102, 241, 0.12);
    animation: wn-gmaps-panel-in 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes wn-gmaps-panel-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-popover__panel.wn-gmaps-panel {
    background: rgba(28, 28, 30, 0.52);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 28px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(99, 102, 241, 0.22);
}

/* Top bar */
.wn-gmaps-top {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 8px 12px;
    border-bottom: 1px solid #e8eaed;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-top {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.wn-gmaps-dir-chip {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(26, 115, 232, 0.35);
}

.wn-gmaps-dir-chip svg {
    display: block;
}

.wn-gmaps-top__title {
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
    font-size: 18px;
    font-weight: 400;
    color: #202124;
    letter-spacing: -0.02em;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-top__title {
    color: #e8eaed;
}

.wn-gmaps-top__close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #5f6368;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

.wn-gmaps-top__close:hover {
    background: rgba(60, 64, 67, 0.08);
    color: #202124;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-top__close {
    color: #9aa0a6;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-top__close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e8eaed;
}

/* Route block */
.wn-gmaps-route {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 12px 12px 4px 10px;
}

.wn-gmaps-rail {
    flex: 0 0 auto;
    width: 22px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    padding-top: 14px;
    padding-bottom: 14px;
}

.wn-gmaps-rail__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid #5f6368;
    box-sizing: border-box;
    background: transparent;
}

.wn-gmaps-rail__vine {
    flex: 1 1 auto;
    width: 0;
    margin: 5px 0;
    min-height: 28px;
    border-left: 2px dotted #dadce0;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-rail__dot {
    border-color: #9aa0a6;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-rail__vine {
    border-left-color: #5f6368;
}

.wn-gmaps-rail__pin {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.wn-gmaps-fields {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 44px;
}

.wn-gmaps-field {
    position: relative;
}

.wn-gmaps-input {
    width: 100%;
    box-sizing: border-box;
    height: 48px;
    padding: 0 40px 0 14px;
    border-radius: 8px;
    border: 1px solid #dadce0;
    font-size: 15px;
    font-weight: 400;
    color: #202124;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wn-gmaps-input::placeholder {
    color: #70757a;
}

.wn-gmaps-input:hover {
    border-color: #bdc1c6;
}

.wn-gmaps-input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 1px #1a73e8;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-input {
    color: #e8eaed;
    background: #303134;
    border-color: #5f6368;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-input::placeholder {
    color: #9aa0a6;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-input:hover {
    border-color: #80868b;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-input:focus {
    border-color: #8ab4f8;
    box-shadow: 0 0 0 1px #8ab4f8;
}

.wn-gmaps-field__suffix {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    pointer-events: none;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-field__suffix {
    color: #9aa0a6;
}

.wn-gmaps-swap {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #dadce0;
    background: #fff;
    color: #5f6368;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wn-gmaps-swap:hover {
    background: #f8f9fa;
    border-color: #bdc1c6;
    color: #202124;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-swap {
    background: #303134;
    border-color: #5f6368;
    color: #e8eaed;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-swap:hover {
    background: #3c4043;
    border-color: #80868b;
}

.wn-gmaps-tip {
    margin: 0;
    padding: 6px 16px 12px 42px;
    font-size: 13px;
    line-height: 1.45;
    color: #5f6368;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-tip {
    color: #9aa0a6;
}

.wn-gmaps-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 12px 12px;
    border-top: 1px solid #e8eaed;
    margin-top: auto;
    background: transparent;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-actions {
    border-top-color: rgba(255, 255, 255, 0.1);
    background: transparent;
}

.wn-gmaps-btn-secondary {
    min-width: 88px;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid #dadce0;
    background: #fff;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.wn-gmaps-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #bdc1c6;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-btn-secondary {
    background: #303134;
    border-color: #5f6368;
    color: #8ab4f8;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-btn-secondary:hover {
    background: #3c4043;
}

.wn-gmaps-btn-primary {
    min-width: 128px;
    padding: 9px 18px;
    border-radius: 8px;
    border: none;
    background: #1a73e8;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(26, 115, 232, 0.35);
    transition: background 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.wn-gmaps-btn-primary:hover {
    background: #1967d2;
    filter: brightness(1.02);
}

.wn-gmaps-linkbtn {
    margin: 0;
    padding: 6px 0 2px;
    border: none;
    background: transparent;
    color: #1a73e8;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
}

.wn-gmaps-linkbtn:hover {
    text-decoration: underline;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-linkbtn {
    color: #8ab4f8;
}

.wn-gmaps-suggest {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    border-top: 1px solid #e8eaed;
    -webkit-overflow-scrolling: touch;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-suggest {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.wn-gmaps-suggest__head {
    padding: 8px 14px 4px 42px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #70757a;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-suggest__head {
    color: #9aa0a6;
}

.wn-gmaps-suggest__list {
    list-style: none;
    margin: 0;
    padding: 0 0 6px;
}

.wn-gmaps-suggest__item {
    margin: 0;
    padding: 0;
}

.wn-gmaps-suggest__btn {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px 10px 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: inherit;
    transition: background 0.12s ease;
}

.wn-gmaps-suggest__btn:hover {
    background: #f1f3f4;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-suggest__btn:hover {
    background: #303134;
}

.wn-gmaps-suggest__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f4;
    color: #5f6368;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-suggest__icon {
    background: #3c4043;
    color: #9aa0a6;
}

.wn-gmaps-suggest__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wn-gmaps-suggest__title {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
    line-height: 1.25;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-suggest__title {
    color: #e8eaed;
}

.wn-gmaps-suggest__sub {
    font-size: 13px;
    color: #70757a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--resolved-dark .wn-gmaps-suggest__sub {
    color: #9aa0a6;
}

dialog.wn-popover.wn-popover--dialog.wn-popover--map-interact::backdrop {
    pointer-events: none !important;
    background: transparent !important;
}

.wn-popover--map-interact .wn-popover__backdrop {
    pointer-events: none;
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.wn-gmaps-btn-primary:active {
    transform: scale(0.99);
}

@media (prefers-reduced-motion: reduce) {
    .wn-popover__panel.wn-gmaps-panel {
        animation: none;
    }

    .wn-gmaps-btn-primary:active {
        transform: none;
    }
}


.app-navbar__tool-cluster {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    flex: 0 0 auto;
    gap: 0;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.app-navbar__tool-cluster .navbar-icon-btn,
.app-navbar__tool-cluster .notifications-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: transparent;
    border: none;
    color: #334155;
    box-shadow: none;
}

.app-navbar__tool-cluster .navbar-icon-btn:hover,
.app-navbar__tool-cluster .notifications-btn:hover {
    background: rgba(15, 23, 42, 0.07);
    box-shadow: none;
    transform: none;
}

.app-navbar__tool-cluster .navbar-icon-btn svg,
.app-navbar__tool-cluster .notifications-btn svg {
    stroke: currentColor;
}

.app-navbar__tool-cluster .navbar-avatar {
    width: 38px;
    height: 38px;
    margin-left: 1px;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.35);
}

.app-navbar__tool-cluster .navbar-avatar:hover {
    transform: scale(1.04);
}

.navbar-icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(15, 23, 42, 0.06);
    color: #334155;
    transition: background 0.2s, transform 0.15s ease, box-shadow 0.2s;
}

.navbar-icon-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.navbar-icon-btn svg {
    stroke: currentColor;
}

.navbar-avatar {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.45);
    transition: transform 0.15s ease, box-shadow 0.2s;
}

.navbar-avatar__txt {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Map */
.map-container {
    width: 100%;
    height: 100vh;
}

.location-btn {
    position: absolute;
    right: 20px;
    bottom: 28px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 50;
}

.location-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.location-btn svg {
    stroke: var(--primary-color);
}

/* Google Maps–style map layer dock: fused “Map” tile + strip (passengerMapLayerDock.js).
   Theme tokens + frosted glass (backdrop blur); matches passenger navbar. */
.map-layer-dock {
    position: absolute;
    left: max(12px, env(safe-area-inset-left, 0px));
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    z-index: 55;
    font-family: var(--font-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    /* Light shell — frosted glass (default + explicit light + auto+light OS) */
    --mld-surface: rgba(255, 255, 255, 0.52);
    --mld-border: rgba(15, 23, 42, 0.08);
    --mld-chrome-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(99, 102, 241, 0.12);
    --mld-divider: rgba(15, 23, 42, 0.12);
    --mld-opt-color: #1e293b;
    --mld-opt-hover: rgba(15, 23, 42, 0.06);
    --mld-thumb-border: rgba(15, 23, 42, 0.12);
    --mld-thumb-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(241, 245, 249, 0.34) 100%);
    --mld-icon-color: #0f172a;
    --mld-selected-bg: rgba(99, 102, 241, 0.12);
    --mld-selected-thumb-border: rgba(102, 126, 234, 0.95);
    --mld-selected-thumb-ring: rgba(102, 126, 234, 0.35);
    --mld-selected-thumb-bg: linear-gradient(180deg, rgba(102, 126, 234, 0.12), rgba(102, 126, 234, 0.2));
    --mld-trigger-label-color: #ffffff;
    --mld-trigger-label-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.78));
}

@media (prefers-color-scheme: dark) {
    html[data-theme='auto'] .map-layer-dock {
        --mld-surface: rgba(28, 28, 30, 0.52);
        --mld-border: rgba(255, 255, 255, 0.1);
        --mld-chrome-shadow: 0 4px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(99, 102, 241, 0.22);
        --mld-divider: rgba(255, 255, 255, 0.1);
        --mld-opt-color: #e2e8f0;
        --mld-opt-hover: rgba(255, 255, 255, 0.08);
        --mld-thumb-border: rgba(255, 255, 255, 0.12);
        --mld-thumb-bg: linear-gradient(180deg, rgba(72, 72, 76, 0.48) 0%, rgba(40, 40, 42, 0.42) 100%);
        --mld-icon-color: #e2e8f0;
        --mld-selected-bg: rgba(99, 102, 241, 0.16);
        --mld-selected-thumb-border: rgba(165, 180, 252, 0.9);
        --mld-selected-thumb-ring: rgba(129, 140, 248, 0.45);
        --mld-selected-thumb-bg: linear-gradient(180deg, rgba(99, 102, 241, 0.22), rgba(79, 70, 229, 0.32));
        --mld-trigger-label-color: #f8fafc;
        --mld-trigger-label-bg: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.42));
    }
}

html[data-theme='dark'] .map-layer-dock {
    --mld-surface: rgba(28, 28, 30, 0.52);
    --mld-border: rgba(255, 255, 255, 0.1);
    --mld-chrome-shadow: 0 4px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(99, 102, 241, 0.22);
    --mld-divider: rgba(255, 255, 255, 0.1);
    --mld-opt-color: #e2e8f0;
    --mld-opt-hover: rgba(255, 255, 255, 0.08);
    --mld-thumb-border: rgba(255, 255, 255, 0.12);
    --mld-thumb-bg: linear-gradient(180deg, rgba(72, 72, 76, 0.48) 0%, rgba(40, 40, 42, 0.42) 100%);
    --mld-icon-color: #e2e8f0;
    --mld-selected-bg: rgba(99, 102, 241, 0.16);
    --mld-selected-thumb-border: rgba(165, 180, 252, 0.9);
    --mld-selected-thumb-ring: rgba(129, 140, 248, 0.45);
    --mld-selected-thumb-bg: linear-gradient(180deg, rgba(99, 102, 241, 0.22), rgba(79, 70, 229, 0.32));
    --mld-trigger-label-color: #f8fafc;
    --mld-trigger-label-bg: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.42));
}

.map-layer-dock__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.map-layer-dock__row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0;
}

.map-layer-dock__chrome {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--mld-surface);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-radius: 14px;
    border: 1px solid var(--mld-border);
    box-shadow: var(--mld-chrome-shadow);
    overflow: hidden;
}

.map-layer-dock__trigger {
    position: relative;
    width: 56px;
    min-height: 72px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    margin: 0;
    border: none;
    border-right: 1px solid var(--mld-divider);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    box-shadow: none;
}

.map-layer-dock__trigger-thumb {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 8px 4px 4px;
}

.map-layer-dock__trigger-label {
    display: block;
    width: 100%;
    padding: 4px 2px 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--mld-trigger-label-color);
    text-align: center;
    line-height: 1.1;
    background: var(--mld-trigger-label-bg);
}

.map-layer-dock__strip {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 2px;
    padding: 6px 8px 6px 6px;
    background: transparent;
}

.map-layer-dock__row--more {
    margin-left: 0;
    padding: 8px 10px;
    background: var(--mld-surface);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-radius: 14px;
    border: 1px solid var(--mld-border);
    box-shadow: var(--mld-chrome-shadow);
    max-width: min(100vw - 24px, 420px);
    flex-wrap: wrap;
    gap: 4px;
}

.map-layer-dock__row--more[hidden] {
    display: none !important;
}

.map-layer-dock--more-open .map-layer-dock__row--more {
    display: flex !important;
}

.map-layer-dock__opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 58px;
    min-height: 72px;
    padding: 4px 2px 2px;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    color: var(--mld-opt-color);
    transition: background 0.14s ease;
}

.map-layer-dock__opt:hover {
    background: var(--mld-opt-hover);
}

.map-layer-dock__opt--selected {
    background: var(--mld-selected-bg);
}

.map-layer-dock__opt--selected .map-layer-dock__opt-thumb {
    border-color: var(--mld-selected-thumb-border);
    box-shadow: 0 0 0 2px var(--mld-selected-thumb-ring);
    background: var(--mld-selected-thumb-bg);
}

.map-layer-dock__opt--active {
    background: var(--mld-selected-bg);
}

.map-layer-dock__opt--active .map-layer-dock__opt-thumb {
    border-color: var(--mld-selected-thumb-border);
    box-shadow: 0 0 0 2px var(--mld-selected-thumb-ring);
    background: var(--mld-selected-thumb-bg);
}

.map-layer-dock__opt-thumb {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 1px solid var(--mld-thumb-border);
    background: var(--mld-thumb-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.map-layer-dock__svg {
    width: 24px;
    height: 24px;
    color: var(--mld-icon-color);
}

.map-layer-dock__svg--traffic {
    width: 26px;
    height: 26px;
    color: transparent;
}

.map-layer-dock__opt-label {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.15;
    max-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

/* Bottom Sheet */
.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.where-to-btn {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius-small);
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.where-to-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.where-to-btn span {
    flex: 1;
    text-align: left;
}

.where-to-btn svg:first-child {
    width: 24px;
    height: 24px;
}

.where-to-btn svg:last-child {
    width: 20px;
    height: 20px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.user-role {
    font-size: 14px;
    color: #666;
}

.close-sidebar {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    line-height: 1;
}

.sidebar-menu {
    padding: 16px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.menu-item:hover {
    background: rgba(102, 126, 234, 0.05);
    color: var(--primary-color);
}

.menu-item.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.menu-item svg {
    stroke: currentColor;
    stroke-width: 2;
}

/* ============ DRIVER DASHBOARD ============ */
.driver-dashboard {
    background: #F2F2F7;
    min-height: 100vh;
    padding-bottom: 80px;
}

.app-overlay.show.fullscreen .driver-dashboard {
    flex: 1;
    height: 100%;
    overflow-y: auto;
}

.driver-header {
    background: white;
    padding: 40px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.driver-greeting p {
    color: #666;
    font-size: 16px;
    margin-bottom: 4px;
}

.driver-greeting h2 {
    color: #000;
    font-size: 28px;
    font-weight: 700;
}

.driver-header .notifications-btn {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.driver-header .notifications-btn svg {
    stroke: #000;
}

.driver-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.online-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.online-card.online {
    border: 2px solid var(--success-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #999;
}

.status-dot.online {
    background: var(--success-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
}

.status-indicator h3 {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

.online-card p {
    color: #666;
    font-size: 15px;
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius-small);
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.stat-label {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.3;
}

.quick-actions {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quick-actions h3 {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 16px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: background 0.2s;
}

.action-card:hover {
    background: rgba(0, 0, 0, 0.02);
}

.action-card:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-info {
    flex: 1;
}

.action-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 2px;
}

.action-subtitle {
    font-size: 14px;
    color: #666;
}

.action-card > svg {
    stroke: #999;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 4px 2px;
    padding: 12px 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    color: #999;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item svg {
    stroke: currentColor;
    stroke-width: 2;
}

.nav-item.active {
    color: var(--primary-color);
}

/* ============ PAGE CONTAINER ============ */
.page-container {
    min-height: 100vh;
    background: #F2F2F7;
    padding-bottom: 80px;
}

.app-overlay .page-container {
    height: 100vh;
    overflow-y: auto;
}

.app-overlay.show.fullscreen .page-container {
    flex: 1;
    height: 100%;
}

.page-header {
    background: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    flex: 1;
    text-align: center;
}

.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.back-btn svg {
    stroke: #000;
    stroke-width: 2;
}

/* Broadcast ride — ambient canvas + centered glass card */
.page-container.page-container--broadcast {
    background:
        radial-gradient(120% 85% at 50% -15%, rgba(139, 92, 246, 0.12) 0%, transparent 52%),
        radial-gradient(85% 55% at 100% 0%, rgba(45, 212, 191, 0.08) 0%, transparent 42%),
        radial-gradient(70% 50% at 0% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 45%),
        linear-gradient(180deg, rgba(244, 242, 251, 0.55) 0%, rgba(238, 240, 247, 0.42) 48%, rgba(232, 235, 244, 0.32) 100%);
    padding: 16px 16px 40px;
    box-sizing: border-box;
}

.page-container--broadcast .broadcast-ride-frame {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
    padding-top: max(4px, env(safe-area-inset-top, 0px));
}

.page-container--broadcast .broadcast-ride-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        0 24px 56px rgba(99, 102, 241, 0.14);
    overflow: hidden;
}

.page-container--broadcast .page-header {
    position: relative;
    background: transparent;
    box-shadow: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 12px 14px 10px;
}

.page-container--broadcast .page-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: #0f172a;
}

.page-container--broadcast .back-btn {
    border-radius: 14px;
}

.page-container--broadcast .account-page-mount.account-page-mount--broadcast {
    padding: 0;
}

.edit-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ============ RIDES LIST ============ */
.rides-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ride-card {
    background: white;
    border-radius: var(--border-radius-small);
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ride-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.ride-status.requested {
    background: rgba(255, 165, 0, 0.15);
    color: var(--warning-color);
}

.ride-status.accepted {
    background: rgba(33, 150, 243, 0.15);
    color: #2196F3;
}

.ride-status.in_progress {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
}

.ride-status.completed {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success-color);
}

.ride-status.cancelled {
    background: rgba(244, 67, 54, 0.15);
    color: var(--error-color);
}

.ride-route {
    margin-bottom: 12px;
}

.ride-location {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
}

.location-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.location-dot.pickup {
    background: var(--primary-color);
}

.location-dot.dropoff {
    background: var(--error-color);
}

.location-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.route-line {
    width: 2px;
    height: 20px;
    background: #ddd;
    margin-left: 17px;
}

.ride-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.ride-date {
    font-size: 13px;
    color: #666;
}

.ride-fare {
    font-size: 16px;
    font-weight: 700;
    color: var(--success-color);
}

.loading,
.empty-state,
.error-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 15px;
}

/* ============ PROFILE ============ */
.profile-content {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    color: white;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    color: #000;
}

.profile-role {
    font-size: 16px;
    color: #666;
    padding: 6px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
}

.profile-info {
    width: 100%;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 16px;
}

.info-item {
    padding: 16px 0;
}

.info-item:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.info-value {
    font-size: 16px;
    color: #000;
    font-weight: 500;
}

/* ============ MODAL ============ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: flex-end;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    width: 100%;
    max-height: 90vh;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    animation: slideUp 0.3s ease;
}

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

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

.modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #000;
}

.close-modal {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.location-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.location-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #F2F2F7;
    border-radius: var(--border-radius-small);
}

.location-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.location-icon.pickup {
    background: var(--primary-color);
}

.location-icon.dropoff {
    background: var(--error-color);
}

.location-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #000;
    outline: none;
    font-family: inherit;
}

.location-input::placeholder {
    color: #999;
}

.ride-options {
    margin-bottom: 24px;
}

.ride-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #F2F2F7;
    border: 2px solid transparent;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.2s;
}

.ride-option:hover {
    background: #E5E5EA;
}

.ride-option.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color);
}

.ride-option svg {
    stroke: var(--primary-color);
}

.option-info {
    flex: 1;
}

.option-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 2px;
}

.option-time {
    font-size: 13px;
    color: #666;
}

.option-price {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

/* ============ ACTIVE RIDE VIEWS ============ */
.active-ride-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.active-ride-map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Passenger Active Ride - Status Card */
.active-ride-status-card {
    position: absolute;
    top: 20px;
    left: 16px;
    right: 16px;
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-width: 600px;
    margin: 0 auto;
}

.ride-status-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.status-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 4px 0;
}

.eta-text {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    margin: 0;
}

.sos-btn {
    background: #FF0000;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
    transition: transform 0.2s;
}

.sos-btn:hover {
    transform: scale(1.05);
}

.driver-info-card {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 12px;
}

.driver-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.driver-details {
    flex: 1;
}

.driver-details h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.driver-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #4a5568;
}

.driver-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* Bottom Ride Details Sheet */
.ride-details-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-width: 600px;
    margin: 0 auto;
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #cbd5e0;
    border-radius: 2px;
    margin: 0 auto 16px;
}

.trip-details {
    padding: 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.detail-row h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.trip-fare {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin: 0;
}

.trip-address {
    font-size: 14px;
    color: #718096;
    margin: 0 0 16px 0;
}

.trip-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #edf2f7;
    border-radius: 8px;
    font-size: 14px;
    color: #4a5568;
}

.cancel-btn {
    width: 100%;
    padding: 14px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #718096;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn:hover {
    border-color: #ff0000;
    color: #ff0000;
}

/* Driver Navigation View */
.driver-navigation .driver-nav-card {
    position: absolute;
    top: 20px;
    left: 16px;
    right: 16px;
    background: #667eea;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    z-index: 100;
    max-width: 600px;
    margin: 0 auto;
}

.driver-navigation.in-trip .driver-nav-card {
    background: #4CAF50;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.nav-info {
    flex: 1;
}

.nav-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-eta {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.nav-eta h2 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1;
}

.nav-distance {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding-bottom: 4px;
}

.nav-instruction {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
}

.nav-instruction svg {
    flex-shrink: 0;
}

.nav-instruction span {
    font-size: 16px;
    font-weight: 500;
}

/* Driver Action Sheet */
.driver-action-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-width: 600px;
    margin: 0 auto;
}

.passenger-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.passenger-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.passenger-details {
    flex: 1;
}

.passenger-details h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.passenger-details p {
    font-size: 14px;
    color: #718096;
    margin: 0;
}

.passenger-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 100%;
    padding: 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.driver-navigation.in-trip .action-btn {
    background: #4CAF50;
}

.driver-navigation.in-trip .action-btn:hover {
    background: #43A047;
}

/* ============ ACCOUNT SHELL (Activity, payments, vehicles) ============ */
.activity-hub-mount,
.account-page-mount {
    padding: 16px;
}

.activity-hub {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.activity-tab {
    flex: 1;
    min-width: 88px;
    padding: 10px 14px;
    border-radius: var(--border-radius-small, 12px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: white;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    color: var(--text-secondary, #555);
}

.activity-tab.activity-tab-active {
    border-color: var(--primary-color, #667eea);
    color: var(--primary-color, #667eea);
    background: rgba(102, 126, 234, 0.08);
}

.activity-tab:focus-visible {
    outline: 2px solid rgba(102, 126, 234, 0.7);
    outline-offset: 2px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted, #888);
    font-size: 15px;
}

.activity-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.activity-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.activity-chip {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary, #555);
}

.activity-chip-intent {
    background: rgba(102, 126, 234, 0.15);
    color: #5568d3;
}

.activity-chip-prr {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
}

.activity-chip-offer {
    background: rgba(255, 152, 0, 0.15);
    color: #ef6c00;
}

.activity-chip-live {
    background: rgba(233, 30, 99, 0.12);
    color: #c2185b;
}

.activity-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #888);
}

.activity-card-title {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 700;
}

.activity-card-sub {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary, #555);
    line-height: 1.35;
}

.account-panel {
    padding: 8px 0 24px;
}

.account-panel-hint {
    font-size: 14px;
    color: var(--text-secondary, #555);
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.account-subtitle {
    font-size: 16px;
    font-weight: 700;
    margin: 16px 0 8px 0;
}

.profile-section-title {
    margin-top: 24px;
}

.account-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 16px;
    font-family: inherit;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.pm-list,
.veh-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.pm-row,
.veh-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.pm-row-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-text {
    border: none;
    background: none;
    color: var(--primary-color, #667eea);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
}

.pm-expiry-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.manual-pm-form.hidden,
.stripe-card-mount.hidden {
    display: none !important;
}

.stripe-card-mount {
    padding: 12px 0;
}

.account-msg {
    margin-top: 12px;
    font-size: 14px;
}

.account-msg-error {
    color: var(--error-color, #f44336);
}

.veh-plate {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    color: var(--text-muted, #888);
}

.veh-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color, #667eea);
}

.trusted-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.trusted-contact-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.trusted-contact-row span {
    font-size: 14px;
    color: var(--text-secondary, #555);
}

/* Broadcast ride + driver payout list (account modules) */
.broadcast-ride-panel {
    padding: 20px 22px 28px;
}

.broadcast-ride-intro {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.broadcast-ride-badge {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 52%, #2dd4bf 100%);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

.broadcast-ride-lead {
    margin: 0 !important;
    font-size: 14px;
    line-height: 1.55;
    color: #64748b;
}

.broadcast-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 6px;
}

@media (min-width: 640px) {
    .broadcast-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px 16px;
        align-items: start;
    }

    .broadcast-field--full {
        grid-column: 1 / -1;
    }
}

.broadcast-field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    margin-bottom: 8px;
}

.broadcast-ride-panel .broadcast-field .account-input {
    margin-bottom: 0;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.broadcast-ride-panel .broadcast-field .account-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
    background: #fff;
}

.broadcast-input--narrow {
    max-width: 120px;
}

.broadcast-lookup-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.broadcast-ride-panel .btn-small {
    margin-top: 0;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #475569;
}

.broadcast-ride-panel .btn-small:hover {
    border-color: rgba(99, 102, 241, 0.35);
    color: #4338ca;
    background: rgba(99, 102, 241, 0.06);
}

.broadcast-coord-hint {
    font-size: 13px;
    color: #64748b;
    margin-top: 10px;
    line-height: 1.45;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.broadcast-actions--preview {
    margin: 6px 0 14px;
}

.broadcast-actions--preview .btn-secondary#br-preview,
.broadcast-actions--preview .br-search-book-btn {
    width: 100%;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 15px;
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

.broadcast-actions--preview .btn-secondary#br-preview:hover,
.broadcast-actions--preview .br-search-book-btn:hover {
    background: #e2e8f0;
    border-color: rgba(15, 23, 42, 0.18);
}

.br-from-to {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.br-swap-row {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0;
}

.br-swap-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    font-size: 18px;
    line-height: 1;
    padding: 0;
}

.br-swap-btn:hover {
    border-color: rgba(99, 102, 241, 0.35);
    color: #4338ca;
}

.br-seats-inline {
    max-width: 140px;
    margin-top: 4px;
}

.broadcast-preview-box {
    border-radius: 16px;
    border: 1px dashed rgba(99, 102, 241, 0.35);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
    padding: 16px 16px 14px;
    margin-bottom: 8px;
}

.broadcast-preview-title {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
    font-size: 15px;
    color: #0f172a;
}

.broadcast-preview-hint {
    margin-bottom: 12px !important;
    font-size: 13px;
}

.broadcast-actions--submit {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin: 20px 0 0;
}

.broadcast-submit-btn#br-submit {
    width: 100%;
    border-radius: 999px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    box-shadow: 0 10px 36px rgba(99, 102, 241, 0.38);
}

.broadcast-submit-btn#br-submit:hover {
    filter: brightness(1.03);
    box-shadow: 0 14px 40px rgba(99, 102, 241, 0.45);
}

.broadcast-cancel-link#br-cancel {
    align-self: center;
    background: transparent;
    border: none;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
}

.broadcast-cancel-link#br-cancel:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.broadcast-msg {
    text-align: center;
}

.broadcast-match-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0;
    font-size: 14px;
    cursor: pointer;
}

.br-section {
    margin-bottom: 4px;
}

.br-section-title {
    margin: 0 0 10px;
}

.br-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin: 10px 0 14px;
}

.br-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}

.br-filter-input {
    min-width: 104px;
}

.br-filter-input--num {
    max-width: 92px;
}

.br-matches {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.br-driver-card {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}

.br-driver-card--none {
    border-style: dashed;
}

.br-driver-none-label {
    padding-top: 2px;
}

.br-readiness-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 10200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}

/* HTML `hidden` must win over `display:flex` above (otherwise overlay blocks discovery). */
.br-readiness-overlay[hidden] {
    display: none !important;
    pointer-events: none;
}

.br-readiness-dialog {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 18px 16px 22px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
}

@media (min-width: 520px) {
    .br-readiness-overlay {
        align-items: center;
    }

    .br-readiness-dialog {
        border-radius: 16px;
    }
}

.br-readiness-title {
    margin: 0 0 12px;
    font-size: 18px;
}

.br-readiness-list {
    margin: 0 0 14px 18px;
    padding: 0;
    color: #334155;
}

.br-readiness-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.broadcast-status {
    font-size: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(45, 212, 191, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--text-primary, #1e293b);
    line-height: 1.45;
    margin-top: 4px;
}

.payout-methods-title {
    margin-top: 20px;
}

.payout-methods-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payout-method-row {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: white;
    font-size: 14px;
}

.payout-meta {
    display: block;
    font-size: 13px;
    color: var(--text-secondary, #555);
    margin-top: 4px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .role-buttons {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .dashboard-container {
        max-width: 1200px;
        margin: 0 auto;
    }

    .sidebar {
        width: 320px;
    }

    .bottom-sheet {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 600px;
    }

    .modal-content {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* ==========================================
   Auth UI — professional Vion Drive workspace style
   ========================================== */

.app-overlay.show:not(.fullscreen) {
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-container {
    width: 100%;
    min-height: auto;
    padding: 24px 16px;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: min(100%, 480px);
    max-width: 480px;
    max-height: min(92dvh, 760px);
    padding: 32px 32px 28px;
    border-radius: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.auth-card-wide {
    width: min(100%, 560px);
    max-width: 560px;
}

.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: contain;
    display: block;
}

.logo-container {
    gap: 10px;
    margin-bottom: 8px;
}

.logo-container h1,
.auth-title {
    color: var(--text-primary);
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: currentColor;
    background-clip: initial;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.auth-title {
    margin-bottom: 8px;
}

.auth-subtitle {
    max-width: 360px;
    margin: 0 auto 20px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.auth-form {
    gap: 14px;
}

.auth-oauth {
    gap: 8px;
    margin-bottom: 4px;
}

.btn-oauth {
    min-height: 44px;
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.btn-apple-oauth {
    background: #111111;
}

.form-group input {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.auth-label {
    font-size: 12px;
    margin-bottom: 5px;
}

.btn-primary {
    min-height: 48px;
    border-radius: 12px;
    letter-spacing: 0;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.18);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.24);
}

.app-close-btn {
    width: 34px;
    height: 34px;
    top: 14px;
    right: 14px;
    font-size: 20px;
    border-radius: 999px;
}

.app-close-btn:hover {
    transform: none !important;
    filter: brightness(1.06);
}

.auth-legal-note {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
    text-align: center;
}

.auth-legal-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-legal-note a:hover {
    text-decoration: underline;
}

.auth-signup-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
    text-align: center;
}

@media (min-width: 720px) {
    .auth-card--signup {
        width: min(100%, 620px);
        max-width: 620px;
    }

    .auth-card--signup .auth-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px 16px;
    }

    .auth-card--signup .btn-primary,
    .auth-card--signup .auth-switch,
    .auth-card--signup .error-message,
    .auth-card--signup .auth-signup-hint,
    .auth-card--signup .terms-checkbox {
        grid-column: 1 / -1;
    }
}

@media (max-width: 719px) {
    .auth-card,
    .auth-card-wide {
        width: min(100%, 420px);
        max-width: 420px;
        padding: 26px 20px 22px;
        border-radius: 20px;
    }

    .auth-card--signup .auth-form {
        display: flex;
        flex-direction: column;
    }
}
