/* ═══════════════════════════════════════════════════════
   وصلني Passenger — CSS (matching Flutter app)
   Mobile-first, dark mode, glassmorphic, gradients
   ═══════════════════════════════════════════════════════ */
:root {
    --bg: #0F172A;
    --text: #F1F5F9;
    --text-sec: #94A3B8;
    --text-muted: #475569;
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --primary-deep: #1E40AF;
    --purple: #8B5CF6;
    --green: #10B981;
    --green-dark: #059669;
    --orange: #FF8A65;
    --orange-dark: #FF5722;
    --card: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --font: 'Tajawal', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ LIGHT MODE (matching Flutter app) ═══ */
[data-theme="light"] {
    --bg: #F8F9FD;
    --text: #1E293B;
    --text-sec: #64748B;
    --text-muted: #94A3B8;
    --card: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.3);
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .blob,
[data-theme="light"] .blob-1,
[data-theme="light"] .blob-2 {
    opacity: 0.3;
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .input-wrap {
    background: #fff;
    border-color: #E2E8F0;
}

[data-theme="light"] .input-wrap input,
[data-theme="light"] .input-wrap textarea,
[data-theme="light"] .textarea {
    color: #1E293B;
}

[data-theme="light"] .input-wrap input::placeholder,
[data-theme="light"] .textarea::placeholder {
    color: #94A3B8;
}

[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .screen-toolbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .menu-item {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-main {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .error-banner,
[data-theme="light"] .error-box {
    background: rgba(239, 68, 68, 0.08);
}

[data-theme="light"] .profile-header-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] select.textarea option {
    background: #fff;
    color: #1E293B;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

#app {
    height: 100vh;
    position: relative;
}

/* Auth screens (signup, login, OTP): full-width background, centered content */
#screen-signup,
#screen-login,
#screen-otp {
    max-width: none;
}

#screen-signup .screen-content,
#screen-login .screen-content,
#screen-otp .screen-content {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Non-auth screens: keep mobile layout */
#screen-home,
#screen-request,
#screen-rides,
#screen-profile,
#screen-support,
#screen-tracking {
    max-width: 430px;
    margin: 0 auto;
}

/* ═══ LANGUAGE SWITCHER ═══ */
.lang-switcher {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: scale(1.04);
}

.lang-switcher .material-icons-round {
    font-size: 18px;
    color: var(--primary);
}

/* ═══ BLOBS ═══ */
.blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    width: 350px;
    height: 350px;
    top: -150px;
    right: -100px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.2));
}

.blob-2 {
    width: 250px;
    height: 250px;
    bottom: -80px;
    left: -80px;
    background: rgba(255, 138, 101, 0.2);
}

.blob-3 {
    width: 200px;
    height: 200px;
    bottom: 100px;
    left: -50px;
    background: rgba(255, 138, 101, 0.2);
}

/* ═══ SCREENS ═══ */
.screen {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

.screen.active {
    display: flex;
    animation: screenIn 0.35s ease;
}

.screen.slide-left {
    display: flex;
    animation: slideLeft 0.35s ease;
}

.screen.slide-right {
    display: flex;
    animation: slideRight 0.35s ease;
}

@keyframes screenIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ═══ CARD TITLE ═══ */
.card-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

/* ═══ ERROR BANNER ═══ */
.error-banner {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #F87171;
    animation: shakeIn 0.4s ease;
}

.error-banner .material-icons-round {
    font-size: 20px;
    color: #EF4444;
    flex-shrink: 0;
}

@keyframes shakeIn {
    0% {
        opacity: 0;
        transform: translateX(10px);
    }

    40% {
        transform: translateX(-5px);
    }

    70% {
        transform: translateX(3px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ═══ SWITCH LINK ═══ */
.switch-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-sec);
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.screen-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

/* Auth glass cards stretch nicely on wider screens */
#screen-signup .glass-card,
#screen-login .glass-card,
#screen-otp .glass-card {
    max-width: 500px;
    width: 100%;
}

/* ═══ LOGO ═══ */
.logo-circle {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.logo-circle .material-icons-round {
    color: #fff;
    font-size: 44px;
}

.logo-circle.small {
    width: 64px;
    height: 64px;
    margin-top: 60px;
}

.logo-circle.small .material-icons-round {
    font-size: 32px;
}

.app-title {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-sec);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
}

/* ═══ GLASS CARD ═══ */
.glass-card {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 28px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* ═══ FORM ═══ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: var(--transition);
}

.input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input-wrap .material-icons-round {
    color: var(--text-sec);
    font-size: 22px;
}

.input-wrap .prefix {
    color: var(--text-sec);
    font-size: 15px;
}

.input-wrap input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    outline: none;
}

.input-wrap input::placeholder {
    color: var(--text-muted);
}

.textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    resize: none;
    transition: var(--transition);
}

.textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

select.textarea {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 32px;
    cursor: pointer;
}

select.textarea option {
    background: #1e293b;
    color: #e2e8f0;
    padding: 10px;
}

textarea.textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-sec);
    cursor: pointer;
}

.checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    border-radius: 4px;
}

.checkbox-wrap a {
    color: var(--primary);
    font-weight: 600;
}

/* ═══ BUTTONS ═══ */
.btn-main {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: 18px;
    font-family: var(--font);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.btn-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-main:active {
    transform: translateY(0);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-sec);
    font-family: var(--font);
    font-size: 14px;
    cursor: pointer;
    padding: 10px;
    margin-top: 8px;
}

.btn-danger {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.test-hint {
    margin-top: 16px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    color: #F59E0B;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    justify-content: center;
}

.test-hint .material-icons-round {
    font-size: 18px;
}

/* ═══ OTP INPUTS ═══ */
.otp-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
    direction: ltr;
}

.otp-inputs input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--glass-border);
    border-radius: 14px;
    outline: none;
    font-family: var(--font);
    transition: var(--transition);
}

.otp-inputs input:focus {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ═══ HOME ═══ */
.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    padding-top: max(20px, env(safe-area-inset-top));
    z-index: 1;
}

.greeting {
    color: var(--text-sec);
    font-size: 16px;
    font-weight: 500;
}

.user-name {
    font-size: 26px;
    font-weight: 800;
    margin-top: 2px;
}

.avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.home-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
    padding-bottom: 90px;
    z-index: 1;
}

/* Active ride banner */
.active-ride-banner {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.banner-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-icon .material-icons-round {
    color: #fff;
}

.banner-text {
    flex: 1;
}

.banner-text strong {
    color: #fff;
    display: block;
    font-size: 14px;
}

.banner-text span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.active-ride-banner>.material-icons-round {
    color: #fff;
    font-size: 16px;
}

/* Hero Card */
.hero-card {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-deep));
    border-radius: var(--radius-xl);
    height: 240px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.4);
}

.hero-bg-icon {
    position: absolute;
    left: -30px;
    top: -30px;
    opacity: 0.05;
}

.hero-bg-icon .material-icons-round {
    font-size: 200px;
    color: #fff;
}

.hero-content {
    position: absolute;
    right: 24px;
    top: 24px;
    bottom: 24px;
    width: 55%;
    display: flex;
    flex-direction: column;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
    align-self: flex-start;
}

.hero-content h2 {
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    margin-top: auto;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-top: 6px;
}

.hero-btn {
    background: #fff;
    color: var(--primary-deep);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    margin-top: 14px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-car {
    position: absolute;
    left: 16px;
    bottom: 20px;
    font-size: 80px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.service-card {
    border-radius: var(--radius-lg);
    padding: 20px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-2px);
}

.service-card span {
    font-size: 42px;
}

.service-card strong {
    color: #fff;
    font-size: 16px;
}

.service-card small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.service-card.food {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
}

.service-card.wallet-card {
    background: linear-gradient(135deg, var(--purple), #6D28D9);
}

/* Promo */
.promo-banner {
    border-radius: var(--radius-lg);
    height: 120px;
    background: url('https://images.unsplash.com/photo-1549317661-bd32c8ce0db2?auto=format&fit=crop&w=800&q=80') center/cover;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.promo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7), transparent);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-overlay h3 {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.promo-overlay p {
    color: #fff;
    font-size: 14px;
}

/* Bottom Nav */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--card-border);
    display: flex;
    padding: 10px 0;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 10;
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

.nav-tab .material-icons-round {
    font-size: 24px;
}

/* ═══ TOOLBAR ═══ */
.screen-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    padding-top: max(16px, env(safe-area-inset-top));
    z-index: 1;
}

.screen-toolbar h3 {
    font-size: 20px;
    font-weight: 700;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--glass);
}

.screen-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
    z-index: 1;
    min-height: 0; /* flex child: allow scroll instead of clipping under overflow:hidden parent */
}

/* ═══ LOCATION INPUTS ═══ */
.location-inputs {
    position: relative;
}

.loc-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 0;
}

.loc-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.loc-dot.pickup {
    background: var(--green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.loc-dot.dropoff {
    background: var(--primary);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.loc-line {
    width: 2px;
    height: 24px;
    background: var(--card-border);
    margin-right: 6px;
}

.loc-input {
    flex: 1;
}

.loc-input label {
    font-size: 11px;
    color: var(--text-sec);
}

.loc-input input {
    width: 100%;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    padding: 6px 0;
    outline: none;
}

/* Fare Card */
.fare-card {
    margin-top: 16px;
    margin-bottom: 20px;
}

.fare-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--card-border);
}

.fare-row:last-child {
    border-bottom: none;
}

.fare-row span {
    color: var(--text-sec);
}

.fare-price {
    color: var(--green);
    font-size: 18px;
}

/* ═══ PROFILE ═══ */
.profile-avatar-lg {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 20px auto;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--card-border);
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-row .material-icons-round {
    color: var(--primary);
    font-size: 24px;
}

.profile-row label {
    font-size: 12px;
    color: var(--text-sec);
}

.profile-row p {
    font-weight: 600;
    margin-top: 2px;
}

/* ═══ RIDE CARD ═══ */
.ride-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.ride-card:hover {
    border-color: var(--glass-border);
}

.ride-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ride-card-header .ride-id {
    font-size: 13px;
    color: var(--text-sec);
}

.ride-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.ride-status.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.ride-status.cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.ride-status.pending {
    background: rgba(249, 115, 22, 0.15);
    color: var(--orange);
}

.ride-status.accepted,
.ride-status.started {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.ride-address {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-sec);
    margin-bottom: 6px;
}

.ride-address .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ride-address .dot.g {
    background: var(--green);
}

.ride-address .dot.b {
    background: var(--primary);
}

/* ═══ TRACKING ═══ */
.tracking-body {
    text-align: center;
}

.tracking-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto 20px;
    animation: pulse 2s infinite;
}

.tracking-icon .material-icons-round {
    color: #fff;
    font-size: 48px;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
    }
}

/* ═══ LOADING ═══ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--card-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ═══ TOAST ═══ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 90%;
    max-width: 380px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.toast-success {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
}

.toast-error {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══ PROFILE MENU ═══ */
.profile-header-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.profile-phone {
    font-size: 14px;
    color: var(--text-sec);
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.profile-menu {
    padding: 0 !important;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.menu-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.menu-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-item-icon .material-icons-round {
    font-size: 22px;
}

.menu-item-label {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.menu-arrow {
    color: var(--text-sec);
    font-size: 20px;
    opacity: 0.5;
}

[dir="ltr"] .menu-arrow {
    transform: rotate(180deg);
}

.lang-value {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    background: rgba(99, 102, 241, 0.12);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ═══ EDIT PROFILE ═══ */
.edit-avatar {
    position: relative;
    cursor: pointer;
}

.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg);
}

.avatar-edit-overlay .material-icons-round {
    font-size: 16px;
    color: white;
}

.edit-hint {
    color: var(--text-sec);
    font-size: 12px;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sec);
    margin-bottom: 8px;
}

.field-hint {
    display: block;
    font-size: 11px;
    color: var(--text-sec);
    margin-top: 6px;
    opacity: 0.7;
}

/* ═══ LANGUAGE DROPDOWN MODAL ═══ */
.lang-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.lang-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lang-dropdown {
    width: 100%;
    max-width: 430px;
    background: var(--card);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 32px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

.lang-overlay.active .lang-dropdown {
    transform: translateY(0);
}

.lang-dropdown h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px;
    text-align: center;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 4px;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.lang-option:active {
    background: rgba(255, 255, 255, 0.1);
}

.lang-option-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.lang-check {
    color: var(--accent);
    font-size: 22px;
    display: none;
}

/* ═══ AVATAR IMAGE ═══ */
.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.profile-avatar-lg,
.avatar {
    position: relative;
    overflow: hidden;
}

/* ═══ MAP RIDE REQUEST SCREEN ═══ */
#screen-request {
    position: relative;
    overflow: hidden;
    background: #e5e3df;
}

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

.map-back-btn {
    position: absolute;
    top: 74px;
    right: 16px;
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.map-back-btn:hover {
    transform: scale(1.1);
}

.map-back-btn .material-icons-round {
    font-size: 22px;
    color: #1e293b;
}

.map-gps-btn {
    position: absolute;
    bottom: 90px;
    right: 16px;
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.map-gps-btn:hover {
    transform: scale(1.1);
}

.map-gps-btn .material-icons-round {
    font-size: 22px;
    color: #3B82F6;
}

.map-info-panel {
    position: absolute;
    top: 130px;
    left: 16px;
    right: 16px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

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

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

.map-dot.orange {
    background: #FF8A65;
    box-shadow: 0 0 8px rgba(255, 138, 101, 0.5);
}

.map-dot.blue {
    background: #3B82F6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.map-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.map-info-text small {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.map-info-text span {
    font-size: 0.88rem;
    color: #1e293b;
    font-weight: 600;
}

.map-change-btn {
    border: none;
    background: none;
    color: #3B82F6;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
}

.map-info-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 10px 0;
}

.map-action-btn {
    position: absolute;
    bottom: 24px;
    left: 60px;
    right: 60px;
    z-index: 20;
    height: 52px;
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.map-action-btn.pickup-btn {
    background: linear-gradient(135deg, #FF8A65, #FF7043);
    box-shadow: 0 8px 25px rgba(255, 138, 101, 0.4);
}

.map-action-btn.dest-btn {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.map-action-btn:hover {
    transform: translateY(-2px);
}

.map-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Pickup Search Overlay (above map controls) */
.pickup-search-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 40;
}

.pickup-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 10px 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pickup-search-icon {
    font-size: 20px;
    color: #94a3b8;
}

.pickup-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-family: var(--font);
    font-size: 14px;
}

.pickup-search-input::placeholder {
    color: #94a3b8;
}

.pickup-search-results {
    display: none;
    margin-top: 6px;
    max-height: 230px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    z-index: 41;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

/* ═══ RIDE WAITING SCREEN ═══ */
.waiting-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
}

.waiting-animation {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.waiting-pulse {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.waiting-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.waiting-icon .material-icons-round {
    font-size: 36px;
    color: #fff;
    animation: taxi-bounce 1.5s ease-in-out infinite;
}

@keyframes taxi-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.waiting-title {
    color: var(--text);
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.waiting-subtitle {
    color: var(--muted);
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.waiting-info-card {
    width: 100%;
}

.waiting-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--text);
    font-size: 0.9rem;
}

.waiting-info-row .material-icons-round {
    font-size: 20px;
    flex-shrink: 0;
}

.waiting-info-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.btn-cancel-ride {
    width: 100%;
    padding: 14px;
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 16px;
}

.btn-cancel-ride:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
}

/* ═══ RIDE TRACKING SCREEN ═══ */
.tracking-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.driver-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.driver-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.driver-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.driver-avatar .material-icons-round {
    font-size: 28px;
    color: #fff;
}

.driver-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.driver-details strong {
    color: var(--text);
    font-size: 1.05rem;
}

.driver-car-info {
    color: var(--muted);
    font-size: 0.82rem;
}

.driver-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--muted);
    font-size: 0.82rem;
}

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

.driver-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.driver-action-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: scale(1.08);
}

.driver-action-btn .material-icons-round {
    font-size: 22px;
}

/* ─── Tracking: current ride status (single line) ─── */
.tracking-ride-status-card {
    margin-bottom: 12px;
    padding: 14px 18px;
    text-align: center;
}

.tracking-ride-status-text {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--accent, #6366f1);
}

/* ═══ THEME TOGGLE SWITCH ═══ */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin-right: auto;
    flex-shrink: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #CBD5E1;
    border-radius: 26px;
    transition: var(--transition);
}

.theme-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    right: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-switch input:checked+.theme-slider {
    background: var(--primary);
}

.theme-switch input:checked+.theme-slider::before {
    transform: translateX(-22px);
}