﻿@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
    color-scheme: light;
    --primary: #1E3A8A;
    --primary-rgb: 30, 58, 138;
    /* Darker, more professional blue */
    --primary-dark: #1E3A8A;
    --primary-light: #3B82F6;
    --accent: #F59E0B;
    /* Gold/Amber for premium feel */
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --text: #0F172A;
    --text-muted: #64748B;
    --text-hint: #94A3B8;
    --green: #10B981;
    --red: #EF4444;
    --orange: #F97316;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;
    --radius-2xl: 60px;
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* ─── Profile/Premium Gradients ────────────── */
    --gradient-header: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-premium: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-gold: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    
    /* ─── Tier Gradients ────────────── */
    --gradient-bronze: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    --gradient-silver: linear-gradient(135deg, #c0c0c0 0%, #708090 100%);
    --gradient-gold-tier: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);

    /* ─── Layout Tokens ────────────── */
    --nav-height: 70px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom-inset: env(safe-area-inset-bottom, 0px);
    --safe-bottom: calc(var(--nav-height) + 24px + var(--safe-bottom-inset));
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
/* الوضع يُحدَّد من داخل التطبيق فقط (data-theme) — لا نتبع إعداد الهاتف */
html[data-theme="light"] {
    color-scheme: light;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --text: #0F172A;
    --text-muted: #64748B;
    --text-hint: #94A3B8;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0B1220;
    --surface: #111E33;
    --border: #1E2F4A;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --text-hint: #64748B;
    --glass: rgba(17,30,51,0.75);
    --glass-border: rgba(255,255,255,0.08);
    --shadow: 0 10px 30px -5px rgba(0,0,0,0.45);
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.35);
}
html { forced-color-adjust: none; -webkit-forced-color-adjust: none; filter: none !important; -webkit-filter: none !important; }

/* ─── Tier Badge Styling (Premium Card) ─────────────────── */
.tier-badge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.tier-card-premium {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Shine overlay */
.tier-card-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.tier-bronze .tier-card-premium {
    background: linear-gradient(145deg, #cd7f32 0%, #a0652a 30%, #8b4513 100%);
}

.tier-silver .tier-card-premium {
    background: linear-gradient(145deg, #e0e0e0 0%, #c0c0c0 30%, #8a9ba8 100%);
}

.tier-gold .tier-card-premium {
    background: linear-gradient(145deg, #ffd700 0%, #f0c000 30%, #b8860b 100%);
}

.tier-card-icon-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.tier-card-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.tier-card-name {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
    margin-bottom: 2px;
}

.tier-card-points {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.tier-card-progress-wrap {
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.tier-progress-bar-bg {
    width: 100%;
    height: 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.tier-progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.tier-next-text {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tier-benefits-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

/* Profile view: bigger more detailed */
#profile-tier-badge .tier-card-premium {
    padding: 20px 24px;
}

#profile-tier-badge .tier-card-icon-wrap {
    width: 68px;
    height: 68px;
    font-size: 38px;
    border-radius: 20px;
}

#profile-tier-badge .tier-card-name {
    font-size: 22px;
}

#profile-tier-badge .tier-card-points {
    font-size: 13px;
}

#profile-tier-badge .tier-progress-bar-bg {
    height: 8px;
}

/* ─── Admin Tier Cards ─────────────────────────── */
.tier-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.tier-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}


/* ─── Leaflet Maps Generic ─── */
.leaflet-container {
    font-family: 'Tajawal', sans-serif !important;
}

.cust-pin,
.staff-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.staff-pin {
    animation: bounce 2s infinite;
}

@keyframes bounce {

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

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

/* ─── Marquee (Scrolling Bar) ───────────────────────────── */
.marquee-container {
    width: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    white-space: nowrap;
    height: 40px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.marquee-content {
    display: inline-block;
    padding-right: 100%;
    animation: marquee-scroll 20s linear infinite;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--bg);
}
body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    direction: rtl;
    background: var(--bg);
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    height: 100%;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transition: background 0.3s, color 0.3s;
}

/* ─── Views (SPA Routing) ───────────────────────────────── */
.view {
    display: none;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
    padding-bottom: var(--safe-bottom);
}

.view.active {
    display: flex;
}

/* ─── Referral System Styling ──────────────────────────── */
.referral-friend-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.referral-friend-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.friend-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 22px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.1);
}

/* Premium Coupon Ticket Style */
.coupon-ticket-premium {
    display: flex;
    background: #fff;
    border-radius: 20px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.coupon-ticket-premium::before,
.coupon-ticket-premium::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #f8fafc; /* Matches view background */
    border-radius: 50%;
    z-index: 2;
}

.coupon-ticket-premium::before { left: -10px; border-right: 1px solid #e2e8f0; }
.coupon-ticket-premium::after { right: -10px; border-left: 1px solid #e2e8f0; }

.ticket-left {
    flex: 1;
    padding: 20px;
    border-left: 2px dashed #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticket-right {
    width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.ticket-status {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 5px;
}

.ticket-value {
    font-size: 18px;
    font-weight: 900;
    color: #1e293b;
}

.ticket-code {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 2px;
    font-family: 'Outfit', sans-serif;
}

.ticket-expiry {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-copy-ticket {
    background: var(--primary);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-copy-ticket:active { transform: scale(0.9); }


.friend-details .friend-name {
    font-weight: 900;
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 4px;
}

.friend-details .friend-date {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.friend-points {
    background: #f0fdf4;
    color: #16a34a;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 900;
    display: flex;
    align-items: center;
    border: 1px solid #dcfce7;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.05);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.friend-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.friend-details {
    flex: 1;
}

.friend-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 3px;
}

.friend-date {
    font-size: 12px;
    color: var(--text-hint);
    display: flex;
    align-items: center;
    gap: 5px;
}

.friend-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.friend-points {
    font-size: 13px;
    font-weight: 800;
    background: #ecfdf5;
    color: #059669;
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid #d1fae5;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

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

.btn-copy-mini {
    background: var(--primary-light);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-copy-mini:active {
    transform: scale(0.9);
}

.btn-copy-mini:hover {
    filter: brightness(1.1);
}

/* ─── Splash Screen ──────────────────────────────────────── */
#splash-view {
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: fixed;
    inset: 0;
    overflow: hidden;
    padding-bottom: 0;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    z-index: 10001;
}

/* Splash active — flex column pushing content to bottom */
/* position:fixed is re-stated here to override .view { position: relative } */
#splash-view.active {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px 52px;
    padding-bottom: max(52px, env(safe-area-inset-bottom, 52px));
    gap: 14px;
    min-height: unset;
    padding-top: 0;
}

/* ── Full-screen background image ── */
.splash-logo-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.splash-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* When a custom splash image is provided → cover entire screen */
#splash-view.has-splash-image .splash-logo-img {
    object-fit: cover;
    object-position: center center;
}

/* Strong gradient overlay so bottom elements are always readable */
#splash-view.has-splash-image .splash-logo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.15) 35%,
        rgba(0, 0, 0, 0.60) 62%,
        rgba(0, 0, 0, 0.88) 100%
    );
    pointer-events: none;
}

/* Default mode (no custom image) — animated glow circles */
#splash-view:not(.has-splash-image)::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
    z-index: 1;
}

#splash-view:not(.has-splash-image)::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    pointer-events: none;
    z-index: 1;
}

/* Default mode: centered floating logo in the middle */
#splash-view:not(.has-splash-image) .splash-logo-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 180px; /* leave room for loading UI at bottom */
    z-index: 1;
}

#splash-view:not(.has-splash-image) .splash-logo-img {
    width: 200px;
    height: auto;
    max-height: 28vh;
    object-fit: contain;
    animation: floatLogo 3s ease-in-out infinite, splashPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* ── All content elements below logo are positioned via flex-end ── */
/* They share z-index: 2 so they sit above the image and its overlay */

.splash-sub {
    position: relative;
    z-index: 2;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    max-width: 88%;
    line-height: 1.5;
    letter-spacing: 0.2px;
}

/* Large numeric percentage */
.loading-percentage {
    position: relative;
    z-index: 2;
    font-size: 48px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Sleek progress bar wrapper */
.splash-progress-wrapper {
    position: relative;
    z-index: 2;
    width: calc(100% - 8px);
    max-width: 300px;
    margin: 0 auto;
}

.splash-progress-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0.75) 100%);
    border-radius: 100px;
    transition: width 0.06s linear;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

/* Glow bubble at tip of bar */
.loading-bar::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -1px;
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.8);
}

/* Hidden stage text — kept for JS compatibility */
.loading-stage-text {
    display: none !important;
}

/* Tips capsule */
.splash-tips-container {
    position: relative;
    z-index: 2;
    display: none; /* shown by JS */
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    max-width: 92%;
    min-height: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.splash-tip-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #ffffff;
    font-size: 10px;
}

.splash-tip-text {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    text-align: center;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    max-width: 280px;
    word-wrap: break-word;
}

.splash-tip-text.tip-enter {
    opacity: 1;
    transform: translateY(0);
}

.splash-tip-text.tip-exit {
    opacity: 0;
    transform: translateY(-5px);
}

/* Thin loading spinner */
.splash-spinner {
    position: relative;
    z-index: 2;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

/* ── Keyframes ── */
@keyframes splashPop {
    from {
        opacity: 0;
        transform: scale(0.78) translateY(18px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.03); }
}

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





/* ─── Auth Header (Login / Register) ───────────────────── */
.auth-header {
    background: var(--gradient-header);
    padding: 50px 24px 60px;
    /* Reduced bottom padding slightly */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.auth-header::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(66, 165, 245, 0.12) 0%, transparent 70%);
    top: -120px;
    right: -80px;
    pointer-events: none;
}

/* ─── Logo image in Auth header ─────────────────────────── */
.auth-logo-img {
    width: 210px;
    max-width: 70vw;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.4));
    animation: splashPop 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    position: relative;
    z-index: 1;
}

/* ─── Logo image in Home Header nav bar ─────────────────── */
.header-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35)) brightness(1.08);
    transition: transform 0.2s ease;
}

.header-logo-img:active {
    transform: scale(0.93);
}

/* ─── Logo image in Footer ──────────────────────────────── */
.footer-logo-img {
    width: 170px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 18px rgba(21, 101, 192, 0.45));
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    margin-top: 6px;
    position: relative;
    z-index: 1;
}

.auth-header p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

/* ─── Form Card ─────────────────────────────────────────── */
.form-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    margin: -22px 16px 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 13px 15px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-hint);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-light);
    background: #fff;
}

.form-group textarea {
    resize: none;
    min-height: 90px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #1565C0, #0277BD);
    color: #fff;
    box-shadow: 0 4px 15px rgba(21, 101, 192, 0.35);
}

.btn-primary:active {
    transform: scale(0.98);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-danger {
    background: linear-gradient(135deg, #C62828, #D32F2F);
    color: #fff;
}

.btn-link {
    background: transparent;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    padding: 8px;
    width: auto;
}

/* ─── Error / Success Messages ──────────────────────────── */
.msg {
    padding: 12px 15px;
    border-radius: var(--radius);
    font-size: 14px;
    display: none;
}

.msg.error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.msg.success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.msg.info {
    background: #E3F2FD;
    color: #0D47A1;
    border: 1px solid #BBDEFB;
}

.msg.visible {
    display: block;
}

/* ─── Premium Coupon Box v2 ────────────────────────────────── */
.coupon-box-premium.v2 {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 2px solid #eef2ff;
    border-radius: 20px;
    padding: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(33, 150, 243, 0.08);
}

.coupon-inner {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
}

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

.coupon-badge {
    background: #FFD600;
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 50px;
    letter-spacing: 1px;
}

.coupon-title {
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
}

.coupon-input-group {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px 4px 4px 15px;
    transition: all 0.3s ease;
    border: 1.5px solid transparent;
}

.coupon-input-group:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

.coupon-input-icon {
    font-size: 18px;
    margin-left: 10px;
}

.coupon-input-group input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    outline: none !important;
    width: 100%;
}

.btn-apply-v2 {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.btn-apply-v2:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(33, 150, 243, 0.3);
}

.btn-apply-v2:active {
    transform: scale(0.95);
}

.coupon-msg-inline {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    padding: 8px;
    display: none;
}

/* ─── Loading Spinner (inline) ──────────────────────────── */
.spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

.spinner.visible {
    display: inline-block;
}

/* ─── Profile Menu Rows & Arrows ───────────────────────── */
.profile-menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    gap: 15px;
}

.profile-menu-row:hover {
    background: var(--bg);
    border-color: var(--primary-light);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.profile-menu-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.profile-menu-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.2s;
}

.profile-menu-row:hover .profile-menu-icon {
    transform: scale(1.1);
}

.profile-menu-text {
    font-weight: 800;
    font-size: 14px;
    color: var(--text);
}

.chevron-arrow {
    color: var(--primary);
    font-size: 14px;
    opacity: 0.3;
    transition: all 0.2s;
}

.profile-menu-row:hover .chevron-arrow {
    opacity: 1;
    transform: translateX(-4px);
}

/* ─── Unified Profile Menu (Refined Design) ─────────────── */
.profile-unified-card {
    background: #fff;
    border-radius: 28px;
    margin: 0 16px 20px;
    padding: 10px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.profile-section-title {
    padding: 10px 24px 15px;
    font-weight: 900;
    font-size: 13px;
    color: var(--primary);
    opacity: 0.8;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-unified-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #f8fafc;
    gap: 15px;
    flex-direction: row; /* Content first in DOM, then Chevron */
}

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

.profile-unified-row:active {
    background: #f8fafc;
    transform: scale(0.99);
}

.profile-unified-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Start from the left */
    gap: 16px;
}

.profile-unified-text {
    font-weight: 800;
    font-size: 15px;
    color: var(--text);
}

.profile-unified-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.profile-unified-row:hover .profile-unified-icon {
    transform: scale(1.05);
}

.profile-unified-chevron {
    color: #cbd5e1;
    font-size: 13px;
    transition: transform 0.2s, color 0.2s;
}

.profile-unified-row:hover .profile-unified-chevron {
    color: var(--primary);
    transform: translateX(-4px);
}

/* Specific Badge Order for Referrals */
#referral-count-badge {
    order: 3; /* After Text */
    margin-left: auto; /* Push badge towards the right if needed, but flex-start handles it */
}

/* Specific Row States */
.profile-unified-row.static-row {
    cursor: default;
}
.profile-unified-row.static-row:active {
    background: transparent;
    transform: none;
}

.profile-unified-row.logout-row .profile-unified-text {
    color: #ef4444;
}

.profile-unified-row.logout-row .profile-unified-icon {
    background: #fef2f2 !important;
    color: #ef4444 !important;
}

.profile-unified-row.logout-row .profile-unified-chevron {
    color: #fecaca;
}

/* ─── Home View: Unified Card Override ────────────────────── */
/* Remove double-margin since home view-content already has 16px padding */
#home-sections-container .profile-unified-card {
    margin: 0 0 16px;
    border-radius: 20px;
}

#home-sections-container .profile-section-title {
    padding: 8px 8px 12px;
}

/* ─── Standard View Header (ALL VIEWS) ──────────────────── */
.view-header {
    background: var(--gradient-header);
    padding: calc(12px + var(--safe-top)) 20px 36px;
    padding-top: calc(12px + var(--safe-top));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
    min-height: calc(56px + var(--safe-top));
}

/* Decorative Header Circles */
.view-header::before,
.view-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.view-header::before {
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.06);
}

.view-header::after {
    bottom: -20px;
    left: -30px;
    width: 110px;
    height: 110px;
    background: rgba(255, 255, 255, 0.04);
}

/* Header inner row — title + back button */
.view-header .header-row,
.view-header .profile-header-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
}

/* Standardize header-row layout */
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.header-row h2 {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    text-align: center;
    flex: 1;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.view-header h2 {
    font-size: 19px;
    /* Slightly smaller for small screens */
    font-weight: 800;
    margin: 0;
    flex: 1;
    /* Allow title to take available space */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-row {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    /* Precise layout for Back | Title | Spacer */
    width: 100%;
    align-items: center;
    gap: 8px;
}

.btn-back {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
}

.btn-back:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

.view-content {
    padding: 16px;
    padding-bottom: calc(var(--safe-bottom) + 10px);
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

/* ─── Home View (Premium Redesign) ───────────────────────── */
.home-header {
    background: var(--gradient-header);
    padding: calc(12px + var(--safe-top)) 20px 36px;
    padding-top: calc(12px + var(--safe-top));
    color: #fff;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
    min-height: calc(56px + var(--safe-top));
}

/* Decorative Circles for Home Header */
.home-header::before,
.home-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.home-header::before {
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
}

.home-header::after {
    bottom: 20px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.03);
}

.home-header .home-header-top,
.home-header .profile-header-content {
    position: relative;
    z-index: 2;
}

.home-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.home-logo-premium {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    background: rgba(255, 255, 255, 0.15);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
    cursor: pointer;
}

.profile-avatar-btn {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.profile-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.home-hero p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.home-stats-row {
    display: flex;
    gap: 12px;
}

.stat-bubble {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-bubble:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

.stat-bubble i {
    color: var(--accent);
}

/* ─── Dashboard Grid ─────────────────────────────────────── */
.dashboard-grid {
    padding: 0 16px;
    padding-bottom: var(--safe-bottom);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dash-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.dash-card:active {
    transform: scale(0.96);
}

.card-glass {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1;
    position: relative;
}

.card-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-icon-box.gold {
    background: #FFF7ED;
    color: #F59E0B;
}

.card-icon-box.blue {
    background: #EFF6FF;
    color: #3B82F6;
}

.card-icon-box.green {
    background: #ECFDF5;
    color: #10B981;
}

.card-icon-box.orange {
    background: #FFF7ED;
    color: #F97316;
}

.card-icon-box.purple {
    background: #FAF5FF;
    color: #A855F7;
}

.dash-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

/* Large Main Card */
.card-large {
    grid-column: span 2;
}

.card-large .card-content {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.card-large .card-info h3 {
    font-size: 18px;
    margin-bottom: 2px;
}

.card-large .card-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #FEF3C7;
    color: #92400E;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ─── Bottom Navigation ──────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom-inset));
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 0 5px var(--safe-bottom-inset);
    padding-bottom: var(--safe-bottom-inset);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    transition: all 0.3s var(--transition-smooth);
}

/* Float the bar slightly above edge for premium look on larger screens */
@media (min-width: 375px) {
    .bottom-nav {
        bottom: 12px;
        left: 12px;
        right: 12px;
        border-radius: 24px;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-hint);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    min-width: 0;
    /* Important for flex/grid shrink */
    padding: 8px 0;
}

.nav-item i {
    font-size: 19px;
}

.nav-item span {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

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

/* Main Action Button in Nav */
.nav-main {
    position: relative;
    top: -20px;
}

.nav-main-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
    border: 5px solid var(--bg);
}

/* ─── Orders List ───────────────────────────────────────── */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.order-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-card);
    border: 1.5px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.order-wash-type {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.order-status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.status-pending {
    background: #FFF3E0;
    color: #E65100;
}

.status-accepted {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-completed {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-cancelled {
    background: #FFEBEE;
    color: #C62828;
}

.order-car-type {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ─── Profile Info ─────────────────────────────────────── */
/* Refined in View Header for Profile */

/* ─── Features Grid ────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 10px;
}

.feature-card {
    background: var(--surface);
    padding: 20px 16px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:active {
    transform: scale(0.97);
}

.f-icon {
    font-size: 28px;
}

.f-title {
    font-weight: 800;
    font-size: 14px;
    color: var(--primary);
}

.f-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ─── FAQ Section ────────────────────────────────────────── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.faq-item summary {
    padding: 15px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '‹';
    transform: rotate(-90deg);
    font-size: 20px;
    color: var(--primary);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(90deg);
}

.faq-item p {
    padding: 0 15px 15px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── Footer ─────────────────────────────────────────────── */
.app-footer {
    background: linear-gradient(160deg, #080F2A 0%, #0D1B4B 60%, #0A2060 100%);
    color: #fff;
    padding: 48px 24px 36px;
    text-align: center;
    margin-top: 30px;
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    position: relative;
    overflow: hidden;
}

.app-footer::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.08) 0%, transparent 70%);
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.footer-bio {
    font-size: 14px;
    color: #90A4C8;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* Thin separator line below logo */
.footer-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3B82F6, transparent);
    margin: 12px auto 20px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.social-btn {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #90CAF9;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}


.social-btn:active {
    transform: scale(0.9);
}

.footer-contact {
    font-size: 13px;
    color: #6B84B3;
    margin-bottom: 20px;
    direction: ltr;
    position: relative;
    z-index: 1;
}

.footer-copy {
    font-size: 11px;
    color: #4A5568;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 20px;
    position: relative;
    z-index: 1;
}

.footer-copy strong {
    color: #6B84B3;
}

@media (max-width: 360px) {
    .features-grid {
        grid-template-columns: 1fr;
        /* Stack on very small screens like S10e if needed */
    }
}

/* ─── Modals & Overlays ──────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 27, 75, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: var(--surface);
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease;
}

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

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

/* ─── Car Brand / Model Selection Modal ──────────────── */
.car-select-modal {
    max-width: 480px !important;
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
}

.car-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.car-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: var(--text-main);
}

.car-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.car-modal-close:hover {
    background: #e2e8f0;
    color: var(--text);
}

.car-modal-back {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--primary);
    transition: all 0.2s;
    margin-left: -8px;
}

.car-modal-back:hover {
    background: #e2e8f0;
}

.car-modal-search {
    padding: 12px 20px;
    flex-shrink: 0;
}

.car-modal-search input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-size: 14px;
    background: var(--bg);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.car-modal-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.car-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 0 20px 20px;
    overflow-y: auto;
    flex: 1;
}

.car-select-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 10px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 70px;
}

.car-select-item:hover {
    border-color: var(--primary);
    background: #EFF6FF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.car-select-item:active {
    transform: scale(0.96);
}

.car-select-item .car-icon {
    font-size: 28px;
}

.car-select-item .car-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.hidden {
    display: none !important;
}

/* ─── Rating Styles ──────────────────────────────────────── */
.stars-container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.stars-container input {
    display: none;
}

.stars-container label {
    font-size: 42px;
    color: #E0E8FF;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stars-container label:hover,
.stars-container label:hover~label,
.stars-container input:checked~label {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.stars-container label:hover {
    transform: scale(1.2);
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--primary);
    background: #fff;
}

/* ─── Payment Methods ───────────────────────────────────── */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 5px;
}

.payment-card {
    cursor: pointer;
    position: relative;
}

.payment-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-card .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    text-align: center;
    min-height: 85px;
}

.payment-card input:checked+.card-content {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.15);
}

.payment-card .card-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.payment-pm-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 4px;
}

.payment-card .card-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

/* ─── Bank Details Box ──────────────────────────────────── */
.bank-details-box {
    background: #FFFAF0;
    border: 1px solid #FFE0B2;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 5px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.bank-details-header {
    background: #FFF3E0;
    padding: 10px 15px;
    font-weight: 700;
    font-size: 14px;
    color: #E65100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bank-details-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bank-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.bank-label {
    color: var(--text-muted);
    font-weight: 600;
}

.bank-value {
    color: var(--text);
    font-weight: 700;
}

.bank-note {
    font-size: 12px;
    color: #F57C00;
    background: #FFF8E1;
    padding: 8px;
    border-radius: 8px;
    margin-top: 5px;
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

/* ─── Home Card 5 (Store) ───────────────────────────────── */
.home-card-5 {
    background: linear-gradient(135deg, #00897B, #00695C);
}

/* ─── Store View ─────────────────────────────────────────── */
.store-filter-bar {
    display: flex;
    gap: 12px;
    padding: 16px;
    overflow-x: auto;
    background: transparent;
    border-bottom: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.store-filter-bar::-webkit-scrollbar {
    display: none;
}

.store-filter-btn {
    flex-shrink: 0;
    padding: 8px 22px;
    border-radius: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    color: var(--text-muted);
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.store-filter-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(11, 48, 102, 0.2);
    transform: translateY(-2px);
}

.store-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.store-product-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

.store-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 0.9);
}

.store-product-card:active {
    transform: scale(0.98);
}

.store-product-emoji {
    font-size: 40px;
    line-height: 1;
}

.store-product-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-product-category {
    font-size: 11px;
    color: var(--text-hint);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 12px;
}

.store-product-price {
    font-size: 17px;
    font-weight: 900;
    color: var(--green);
}

.store-product-old-price {
    font-size: 14px;
    font-weight: 800;
    color: #444;
    /* لون غامق ليكون واضح جداً */
    text-decoration: line-through;
    text-decoration-color: #d32f2f;
    text-decoration-thickness: 2.5px;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.store-product-price-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
    border: 1px dashed rgba(239, 68, 68, 0.2);
    padding: 8px 12px;
    border-radius: 12px;
    margin-top: 8px;
    width: 100%;
}

.store-product-discount-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.35);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.store-product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #C62828;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}

.store-product-card.out-of-stock {
    opacity: 0.55;
}

/* ─── Store Product Modal ────────────────────────────────── */
.store-modal {
    max-width: 380px;
    width: 92%;
    padding: 28px 22px 22px;
}

/* ─── Toggle Switch ─── */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

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

input:checked+.slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ─── Premium Notification Cards ────────────────────────── */
.notif-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    text-align: right;
    direction: rtl;
}

.notif-unread {
    background: #fff;
    border-right: 5px solid var(--primary);
}

.notif-icon-box {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.notif-card-content {
    flex: 1;
    min-width: 0;
}

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

.notif-card-title {
    font-size: 17px;
    font-weight: 900;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

.notif-timestamp {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.notif-card-body {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 4px 0 0 0;
}

.notif-card-image {
    margin-top: 15px;
    border-radius: 14px;
    overflow: hidden;
    max-height: 200px;
    border: 1px solid rgba(0,0,0,0.05);
}

.notif-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notif-card-footer {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

/* ─── Emergency Grid ───────────────────────────────────── */
.tow-reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 5px;
}

.tow-reason-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.tow-reason-card.selected {
    border-color: var(--primary);
    background: #f0f7ff;
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.1);
}

.tow-reason-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tow-card-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.tow-card-name {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    line-height: 1.2;
}

.tow-card-price {
    font-size: 12px;
    font-weight: 900;
    color: var(--primary);
    background: rgba(30, 64, 175, 0.05);
    padding: 4px 8px;
    border-radius: 8px;
}

.notif-card-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 5px;
}

/* ─── In-App Toast ─────────────────────────────────────── */
.in-app-toast {
    position: fixed;
    top: -100px;
    left: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 100000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255,255,255,0.3);
}

.in-app-toast.visible {
    top: 20px;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.toast-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 900;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}

.toast-body {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
}

.notif-time {
    font-size: 11px;
    color: var(--text-hint);
    display: block;
}

.notif-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: #FF5252;
    border-radius: 50%;
    border: 2px solid #fff;
    display: none;
}

.notif-badge.visible {
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 82, 82, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
    }
}

/* ─── Order Detail Elements ──────────────────────────────── */
.order-date {
    font-size: 12px;
    color: var(--text-hint);
}

.order-admin-note {
    font-size: 12px;
    padding: 8px;
    background: #F1F5F9;
    border-radius: 8px;
    border-right: 3px solid var(--primary);
    display: none;
}

.order-admin-note.visible {
    display: block;
}

.order-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn-sm {
    padding: 8px 14px !important;
    font-size: 13px !important;
    width: auto !important;
    border-radius: 10px !important;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 50px;
}

.loading-msg {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ─── Packages View ──────────────────────────────────────── */
.packages-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.package-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.package-card:active {
    transform: scale(0.98);
}

.package-card.featured {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.15);
}

.package-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
}

.package-name {
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 6px;
}

.package-price {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
}

.package-price span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.package-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.package-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.package-feature {
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.package-feature::before {
    content: "✓";
    color: var(--green);
    font-weight: 900;
}

.btn-package {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-package:active {
    transform: scale(0.98);
}

/* ─── My Cars List ───────────────────────────────────────── */
.my-cars-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.car-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border);
    transition: all 0.2s;
}

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

.car-icon-box {
    width: 44px;
    height: 44px;
    background: #EFF6FF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
}

.car-details .car-type {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.car-details .car-plate {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
    direction: ltr;
    display: block;
    margin-top: 2px;
}

.btn-delete-car {
    background: #FFEBEE;
    border: none;
    color: #C62828;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-delete-car:active {
    background: #FFCDD2;
    transform: scale(0.9);
}

.horizontal-scroll-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.horizontal-scroll-list::-webkit-scrollbar {
    display: none;
}

.saved-car-chip {
    flex-shrink: 0;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}

.saved-car-chip.selected {
    border-color: var(--primary);
    background: #EFF6FF;
    color: var(--primary);
}

.saved-car-chip .car-chip-icon {
    font-size: 20px;
}

.addr-chip {
    flex-shrink: 0;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 100px;
}

.addr-chip.selected {
    border-color: var(--primary);
    background: #EFF6FF;
    color: var(--primary);
}

/* ─── Chat & Contact View ────────────────────────────────── */
.chat-history {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: calc(var(--safe-bottom) + 20px);
}

.chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-bubble.sent {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    background: var(--surface);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.chat-bubble-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}

.chat-footer-app {
    position: fixed;
    bottom: 100px;
    /* above bottom nav */
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    z-index: 200;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-wrapper textarea {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 10px 14px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    resize: none;
    outline: none;
    background: var(--bg);
    max-height: 100px;
    min-height: 44px;
    transition: border-color 0.2s;
}

.chat-input-wrapper textarea:focus {
    border-color: var(--primary);
    background: #fff;
}

.btn-chat-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.btn-chat-send:active {
    transform: scale(0.9);
}

.chat-status-banner {
    background: #FFF3E0;
    border-bottom: 1px solid #FFE0B2;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #E65100;
    font-weight: 600;
}

/* ─── Notification Permission Banner ─────────────────────── */
.notif-banner {
    background: linear-gradient(135deg, #1565C0, #0277BD);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
    margin: 12px 16px;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(21, 101, 192, 0.3);
}

.notif-banner.hidden {
    display: none !important;
}

.notif-banner-icon {
    font-size: 24px;
}

.notif-banner-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

.notif-banner-text strong {
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

/* ─── Install Banner ─────────────────────────────────────── */
.install-banner {
    position: fixed;
    bottom: calc(var(--safe-bottom) + 20px);
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 16px 20px;
    border-radius: 20px;
    display: none;
    /* Hide by default */
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 2000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(180%);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.install-banner.show {
    display: flex;
    /* Show only when active */
    transform: translateY(0);
}

.btn-pwa-close {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 28px;
    height: 28px;
    background: #FF5252;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.install-banner-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

.install-banner-text strong {
    font-size: 15px;
    display: block;
    margin-bottom: 2px;
    font-weight: 800;
}

.btn-install {
    background: #fff;
    color: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-install:active {
    transform: scale(0.95);
}

/* ─── My Cars List (Profile) ───────────────────────────── */
.my-cars-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.car-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 14px 18px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.car-icon-box {
    width: 40px;
    height: 40px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-left: 12px;
}

.car-info {
    flex: 1;
}

.car-name {
    font-weight: 800;
    font-size: 15px;
    color: #1e293b;
}

.car-plate {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    margin-top: 2px;
}

.btn-dismiss {
    background: #fff5f5;
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-dismiss:active {
    transform: scale(0.9);
}

/* ─── Safe Area & Misc ───────────────────────────────────── */
.safe-bottom {
    margin-bottom: calc(var(--safe-bottom) + 10px);
}

.shadow-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ─── Profile Card & Row (Old) Keep for backward compat ─── */
.profile-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 10px;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.avatar-circle {
    font-size: 50px;
}

.profile-username {
    font-size: 20px;
    font-weight: 900;
    margin-top: 8px;
}

.profile-phone {
    font-size: 14px;
    opacity: 0.8;
    direction: ltr;
}

.profile-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.profile-data-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 700;
    flex-shrink: 0;
    text-align: right;
    /* Standard Arabic Alignment */
}

.profile-data-value {
    font-size: 15px;
    color: var(--text);
    font-weight: 800;
    text-align: left;
    /* Value on the Left */
    word-break: break-all;
}

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

.profile-menu-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

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

.profile-menu-row:active:not(.disabled-row) {
    background: #f8fafc;
}

.profile-menu-row.disabled-row {
    filter: grayscale(1);
    cursor: not-allowed;
}

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

.profile-menu-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.profile-menu-icon {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
    transition: all 0.2s;
}

.profile-menu-row:hover .profile-menu-icon {
    background: var(--primary);
    color: #fff;
}

.profile-menu-text {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
}

.profile-section-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    margin: 25px 8px 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, var(--border), transparent);
}

/* ─── Form Cards & Inputs ────────────────────────────────── */
.form-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.form-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 18px;
    padding: 0 5px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: #fdfdfe;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(66, 165, 245, 0.1);
    outline: none;
}

/* ─── Horizontal Scroll Lists & Saved Cars ───────────────── */
.horizontal-scroll-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px 0 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.horizontal-scroll-list::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.btn-add-new-car-item,
.saved-car-item {
    flex: 0 0 auto;
    width: 110px;
    /* Increased from 90px to fit Arabic names like "هونداي إلنترا" */
    height: 105px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.btn-add-new-car-item span,
.saved-car-item span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-add-new-car-item.selected,
.saved-car-item.selected {
    background: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(66, 165, 245, 0.2);
}

.btn-add-new-car-item.selected span,
.saved-car-item.selected span {
    color: #fff;
}

.profile-stats-container {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    /* Prevent S10e overflow */
}

.profile-stat-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    padding: 8px 10px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 75px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    min-height: 60px;
}

.profile-stat-value {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
}

.profile-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    margin-top: 2px;
}

.btn-logout-premium {
    background: #fff;
    color: #ef4444;
    border: 1.5px solid #fee2e2;
    padding: 16px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 15px;
    width: 100%;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-logout-premium:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    transform: translateY(-2px);
}

.btn-logout-premium:active {
    transform: scale(0.98);
}

/* ─── Profile Card & Actions (Old cleanup) ──────────────── */
.profile-actions {
    padding: 0 16px 30px;
}

/* ─── Car Item (Car list in Profile) ─────────────────────── */
.car-item {
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border);
    margin-bottom: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.car-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.car-item:active {
    transform: scale(0.98);
}

.car-info {
    flex: 1;
}

.car-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 3px;
}

.car-plate {
    font-size: 13px;
    color: var(--text-muted);
    font-family: monospace;
    direction: ltr;
    display: block;
}

/* ─── Package Card (from app.js) ─────────────────────────── */
.package-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.package-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
}

.package-old-price {
    font-size: 13px;
    color: #aaa;
    text-decoration: line-through;
    margin-left: 6px;
}

.package-options {
    font-size: 13px;
    color: var(--primary);
    background: #EFF6FF;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* ─── Package Bullets (وصف الباقة كنقاط) ──────────────────── */
.pkg-bullets {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.pkg-bullets li {
    position: relative;
    padding-right: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    word-break: break-word;
}

.pkg-bullets li::before {
    content: "•";
    position: absolute;
    right: 4px;
    top: 0;
    font-size: 17px;
    line-height: 1.35;
    color: var(--primary);
    font-weight: 900;
}

.pkg-bullets.pkg-bullets-inline {
    gap: 4px;
}

.pkg-bullets.pkg-bullets-inline li {
    padding-right: 16px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

.pkg-bullets.pkg-bullets-inline li::before {
    font-size: 14px;
    color: var(--primary);
}

.pkg-more-hint {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin: -6px 0 12px;
}

/* ─── ملخص الباقة المختارة (صفحة الطلب) ──────────────────── */
.order-summary-card {
    margin: 0 10px 12px;
    padding: 12px 13px;
    background: linear-gradient(135deg, #F5F9FF, #FFFFFF);
    border: 1.5px solid #D1E9FF;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.06);
}

.osm-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.osm-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #DBEAFE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.osm-info {
    flex: 1;
    min-width: 0;
}

.osm-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.osm-meta {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
}

.osm-price {
    font-size: 16px;
    font-weight: 900;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.osm-warnings {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed #BFDBFE;
}

.osw-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.6;
    color: #92400E;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    padding: 7px 9px;
}

.osw-item.is-error {
    color: #991B1B;
    background: #FEF2F2;
    border-color: #FECACA;
}

.osw-icon {
    flex-shrink: 0;
}

html[data-theme="dark"] .order-summary-card {
    background: #16233A;
    border-color: var(--border);
}

html[data-theme="dark"] .osm-icon {
    background: #1E3A5F;
}

html[data-theme="dark"] .osm-warnings {
    border-top-color: var(--border);
}

/* ─── Car Size Selector (اختيار حجم السيارة) ───────────────── */
.car-size-selector {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.car-size-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}

.car-size-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.car-size-chip {
    flex: 1 1 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 6px;
    border-radius: var(--radius-sm, 14px);
    border: 1.5px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.car-size-chip .csc-icon {
    font-size: 20px;
    line-height: 1;
}

.car-size-chip .csc-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    white-space: nowrap;
}

.car-size-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.25);
}

.car-size-chip.active .csc-label {
    color: #fff;
}

/* ─── Package Size Tags (على البطاقة) ──────────────────────── */
.pkg-size-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 10px;
}

.pkg-size-tag {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    padding: 3px 9px;
    border-radius: 12px;
    white-space: nowrap;
}

/* ─── Package Details Modal ────────────────────────────────── */
/* ارتفاع ثابت للمودال حتى يتمرر المحتوى الداخلي بدل الصفحة خلفه */
body.pkg-modal-open {
    overflow: hidden !important;
    touch-action: none;
}

.pkg-modal-card {
    width: min(460px, 95vw);
    height: 88vh;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.pkg-modal-media {
    position: relative;
    width: 100%;
    height: 210px;
    flex: 0 0 auto;
    background: linear-gradient(135deg, #eef2f7, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pkg-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pkg-modal-badge-wrap {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.pkg-modal-placeholder {
    position: absolute;
    font-size: 64px;
    opacity: 0.6;
    z-index: 1;
    display: none;
}

.pkg-modal-main-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 2;
}

.pkg-modal-media-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.18), transparent);
    z-index: 2;
    pointer-events: none;
}

/* منطقة التمرير: هي وحدها التي يتمرر محتواها */
.pkg-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 20px 20px 6px;
}

.pkg-modal-footer {
    flex: 0 0 auto;
    padding: 12px 20px calc(14px + var(--safe-bottom, 0px));
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.pkg-modal-cta {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 800;
}

.pkg-modal-name {
    margin: 0 0 6px 0;
    font-size: 21px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.35;
}

.pkg-modal-rating {
    color: #FFD700;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
}

.pkg-modal-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.pkg-modal-thumbs {
    position: absolute;
    bottom: 8px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

.pkg-modal-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.9);
    cursor: pointer;
    background: #fff;
}

.pkg-modal-thumb:active {
    transform: scale(0.94);
}

.pkg-modal-section {
    margin-top: 16px;
}

.pkg-modal-section-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 9px;
}

.pkg-size-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pkg-size-btn {
    flex: 1 1 88px;
    padding: 10px 6px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.pkg-size-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pkg-size-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

.pkg-modal-price-box {
    margin-top: 16px;
    background: #f8fafc;
    border: 1.5px dashed var(--primary);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}

.pkg-modal-price-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.pkg-modal-price {
    font-size: 30px;
    font-weight: 900;
    color: var(--primary);
}

.pkg-modal-old-price {
    text-decoration: line-through;
    text-decoration-color: #d32f2f;
    text-decoration-thickness: 2px;
    color: #64748b;
    font-size: 15px;
    font-weight: 800;
}

.pkg-modal-discount {
    display: inline-block;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 5px;
}

.pkg-modal-tax-note {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 6px;
}

.pkg-modal-size-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.pkg-size-price {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 9px;
    border-radius: 12px;
    white-space: nowrap;
}

.pkg-size-price.active {
    border-color: var(--primary);
    color: var(--primary);
}

.pkg-modal-info {
    margin-top: 16px;
    margin-bottom: 14px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.pkg-modal-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 4px 0;
}

.pkg-modal-info-row b {
    color: var(--primary);
    font-weight: 900;
}

.pkg-details-btn {
    width: 100%;
}

.package-rating {
    margin-bottom: 8px;
}

/* ─── Dashboard Card Alignment (RTL Fix) ─────────────────── */
.dash-card .card-content {
    align-items: flex-start;
}

/* ─── Inline Sell & Price Summary fixes ──────────────────── */
.price-summary {
    background: var(--surface);
    padding: 15px;
    border-radius: var(--radius);
    border: 1.5px dashed var(--primary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

/* ─── Coupon Premium Box v2 ──────────────────────────────── */
.coupon-box-premium {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.coupon-inner {
    padding: 20px;
}

.coupon-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.coupon-badge {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

.coupon-title {
    font-weight: 800;
    font-size: 16px;
    color: var(--text);
}

.coupon-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 0 12px 0 0;
    overflow: hidden;
}

.coupon-input-icon {
    font-size: 18px;
    padding: 12px 10px;
}

.coupon-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    padding: 12px 0;
    outline: none;
    letter-spacing: 1px;
}

.btn-apply-v2 {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin: 6px;
    transition: all 0.2s;
}

.btn-apply-v2:active {
    transform: scale(0.97);
}

.coupon-msg-inline {
    font-size: 13px;
    margin-top: 8px;
    font-weight: 700;
    min-height: 20px;
}

/* ─── Message / Feedback styles ──────────────────────────── */
.msg {
    display: none;
    padding: 12px 15px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

.msg.visible {
    display: block;
}

.msg.error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.msg.success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

/* ─── Selectable Car Card (in New Order form) ────────────── */
.selectable-car-card {
    flex-shrink: 0;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
    text-align: center;
}

.selectable-car-card:active {
    transform: scale(0.96);
}

.selectable-car-card.selected {
    border-color: var(--primary);
    background: #EFF6FF;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.selectable-car-card.selected .car-name {
    color: var(--primary);
}

.selectable-car-card .car-plate {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
    direction: ltr;
    display: block;
    margin-top: 3px;
}



/* ─── Add "Other" / Manual Car Entry Button ──────────────── */
.btn-add-new-car-item {
    flex-shrink: 0;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'Tajawal', sans-serif;
}

.btn-add-new-car-item.selected {
    border-color: var(--primary);
    background: #EFF6FF;
    color: var(--primary);
}

.btn-add-new-car-item:active {
    transform: scale(0.96);
}

/* ─── Dismiss Button Fix (as button element) ─────────────── */
button.btn-dismiss {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: inherit;
    pointer-events: all;
    line-height: 1;
    padding: 0;
    z-index: 1;
}

button.btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.3);
}

button.btn-dismiss:active {
    transform: scale(0.9);
}

/* ─── Notifications View ─────────────────────────────────── */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: var(--safe-bottom);
}

.notif-item {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    animation: slideUp 0.3s ease;
}

.notif-icon-box {
    width: 44px;
    height: 44px;
    background: #EFF6FF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    color: var(--primary);
}

.notif-info {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-weight: 800;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 4px;
}

.notif-body {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 6px;
}

.notif-time {
    font-size: 11px;
    color: var(--text-hint);
    display: block;
}

/* ─── Notification Badge (Bell) ──────────────────────────── */
.notif-btn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: #FF5252;
    border-radius: 50%;
    border: 2px solid #1E3A8A;
    display: none;
}

.notif-badge.visible {
    display: block;
    animation: pulse 2s infinite;
}

/* ─── Loading State ──────────────────────────────────────── */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-notif {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.empty-notif .empty-icon {
    font-size: 48px;
    opacity: 0.5;
}

.empty-notif p {
    font-size: 14px;
    color: var(--text-hint);
}

/* ─── Spinner ────────────────────────────────────────────── */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.spinner.visible {
    display: inline-block;
}

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

/* ─── Icon Button (Bell, Profile) ────────────────────────── */
.icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
    position: relative;
}

.icon-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

.profile-avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.profile-avatar-btn img {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    object-fit: cover;
}

/* ─── Points History ────────────────────────────────────── */
.points-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}

.history-item {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border);
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.history-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.history-icon.earn {
    background: #E8F5E9;
    color: #2E7D32;
}

.history-icon.spend {
    background: #FFF3E0;
    color: #E65100;
}

.history-icon.admin {
    background: #E3F2FD;
    color: #1565C0;
}

.history-info {
    flex: 1;
}

.history-reason {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 3px;
}

.history-date {
    font-size: 11px;
    color: var(--text-muted);
}

.history-amount {
    font-weight: 900;
    font-size: 16px;
    white-space: nowrap;
}

.history-amount.plus {
    color: #2E7D32;
}

.history-amount.minus {
    color: #C62828;
}

/* ─── Package Card Image ─────────────────────────────────── */
.pkg-card-img-wrap {
    width: calc(100% + 40px);
    margin: -20px -20px 14px -20px;
    height: 170px;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
}

.pkg-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.package-card:hover .pkg-card-img {
    transform: scale(1.04);
}

/* ─── Home Banner Slider ─────────────────────────────────── */
#home-banner-slider-wrap {
    padding: 0 16px 12px;
}

#home-banner-slider {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    height: 170px;
    background: #e8f0fe;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.13);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#home-banner-slides {
    display: flex;
    height: 100%;
    will-change: transform;
    transition: transform 0.45s cubic-bezier(.4, 0, .2, 1);
}

#home-banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

/* ─── Package Multi-Image Slider ─────────────────────────── */
.pkg-multi-slider-wrap {
    position: relative;
    /* inherits .pkg-card-img-wrap size and margins */
}

.pkg-multi-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    height: 100%;
}

.pkg-multi-slider::-webkit-scrollbar {
    display: none;
}

.pkg-multi-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
    position: relative;
}

.pkg-multi-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pkg-multi-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 5;
}

.pkg-multi-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.2s;
}

.pkg-multi-dot.active {
    background: #fff;
    width: 12px;
    border-radius: 4px;
}

/* --- Desktop Compatibility -------------------------------- */
@media (min-width: 768px) {
    body {
        background-color: #f8fafc;
        display: flex;
        justify-content: center;
        overflow-x: hidden;
        min-height: 100vh;
    }

    #app-container {
        width: 100%;
        max-width: 480px;
        min-height: 100vh;
        background-color: var(--bg);
        position: relative;
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
        overflow-x: hidden;
    }

    /* Adjust Fixed Navigation & Floating Banners */
    .bottom-nav,
    .install-banner,
    .chat-footer-app,
    .modal-overlay {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 100% !important;
        max-width: 480px !important;
    }

    /* Centering specific fixed elements that might have right/left values */
    .bottom-nav {
        bottom: 12px !important;
        border-radius: 24px !important;
    }

    .install-banner {
        bottom: 125px !important;
    }

    .chat-footer-app {
        bottom: 100px !important;
    }
}

/* --- Suggested Products Styling ------------------------- */
.horizontal-scroll-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horizontal-scroll-list::-webkit-scrollbar {
    display: none;
}

.suggestion-card {
    flex: 0 0 130px;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    border: 1.5px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.suggestion-card.selected {
    border-color: var(--primary);
    background: #f0f7ff;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.15);
}

.suggestion-card.out-of-stock {
    opacity: 0.6;
    filter: grayscale(0.5);
    cursor: not-allowed;
    border-style: dashed;
}

.suggestion-card.selected::after {
    content: '?';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 16px;
    background: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.suggestion-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.suggestion-discount-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(229, 57, 53, 0.3);
    text-transform: uppercase;
    z-index: 2;
}

.suggestion-prices {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.suggestion-old-price {
    font-size: 9px;
    color: #94a3b8;
    text-decoration: line-through;
}

.suggestion-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.suggestion-price {
    font-size: 13px;
    font-weight: 900;
    color: var(--primary);
}

.extra-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    animation: fadeIn 0.3s ease;
}

.extra-item-name {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.extra-item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

/* ── App Section Visibility States ── */
.profile-menu-row.coming-soon,
.profile-unified-row.coming-soon {
    position: relative;
    opacity: 0.65;
    pointer-events: none;
    filter: grayscale(0.5);
    cursor: not-allowed;
}

.profile-menu-row.coming-soon::after,
.profile-unified-row.coming-soon::after {
    content: 'قريباً';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
    letter-spacing: 0.3px;
    z-index: 2;
}

.profile-unified-row.coming-soon i.fa-chevron-right,
.profile-unified-row.coming-soon i.fa-chevron-left {
    display: none !important;
}

/* ─── Profile Modern Card Groups ────────────────────────────── */
.profile-card-group {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    width: 100%;
}

.profile-card-group:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.profile-group-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-group-title i {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

.profile-card-group .profile-data-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.profile-card-group .profile-data-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.profile-card-group .profile-data-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 800;
}

.profile-card-group .profile-menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.profile-card-group .profile-menu-row:hover {
    background: rgba(248, 250, 252, 0.5);
    padding-right: 5px;
}

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

.profile-menu-arrow {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #94a3b8;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.profile-menu-row:hover .profile-menu-arrow {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 10px 15px -3px rgba(var(--primary-rgb), 0.3);
}

/* For logout row specifically */
.profile-menu-row[onclick="logout()"]:hover {
    background: #fff1f2 !important;
    border-color: #fecaca !important;
}

.profile-menu-row[onclick="logout()"]:hover .profile-menu-arrow {
    background: #be123c;
    border-color: #be123c;
}

/* ─── End of Redundant Sections ─── */

.profile-menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.profile-menu-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.profile-menu-arrow {
    color: var(--text-hint);
    font-size: 12px;
}

/* ─── Profile Stats ────────────────────────────── */
.profile-stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    margin-top: 25px;
    padding: 0 10px;
}

.profile-stat-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 65px;
}

.profile-stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
}

.profile-stat-value {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 2px;
}

.profile-stat-label {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── My Invoices List Item ──────────────────────────────────── */
.invoice-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
}

.invoice-card:active {
    transform: scale(0.98);
}

.invoice-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.invoice-title {
    font-weight: 800;
    color: var(--text);
    font-size: 14px;
}

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

.invoice-price {
    font-weight: 900;
    color: var(--primary);
    font-size: 15px;
}

.btn-download-invoice {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-download-invoice:active {
    background: #dcfce7;
}

/* ─── Premium Auth Views (Glassmorphism) ──────────────── */
.auth-bg-premium {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-bg-premium::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.4) 0%, transparent 70%);
    top: -50px;
    right: -50px;
    pointer-events: none;
    border-radius: 50%;
}

.auth-bg-premium::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
    border-radius: 50%;
}

.auth-glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 35px 25px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-glass-header {
    text-align: center;
    margin-bottom: 10px;
}

.auth-glass-header img {
    width: 120px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.auth-glass-header h1 {
    font-size: 26px;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 5px;
}

.auth-glass-header p {
    font-size: 14px;
    color: #64748b;
}

.auth-glass-card .form-group label {
    color: #334155;
    font-weight: 800;
    margin-bottom: 2px;
}

.auth-glass-card .form-group input,
.auth-glass-card .form-group select {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #0f172a;
}

.auth-glass-card .form-group input:focus,
.auth-glass-card .form-group select:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.auth-glass-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    margin-top: 10px;
}

.auth-glass-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.4);
}

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

/* ─── Custom Checkbox ──────────────────────── */
.custom-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    background: #f1f5f9;
    padding: 14px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.custom-checkbox-wrapper:has(input:checked) {
    background: #eff6ff;
    border-color: #3b82f6;
}

.custom-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    background: #fff;
    flex-shrink: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.custom-checkbox::after {
    content: '';
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-checkbox-input {
    display: none !important;
}

.custom-checkbox-input:checked+.custom-checkbox {
    background: #3b82f6;
    border-color: #3b82f6;
}

.custom-checkbox-input:checked+.custom-checkbox::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.custom-checkbox-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    line-height: 1.6;
}

.custom-checkbox-label a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 900;
}

/* ─── Scroll Header Parallax/Shrink ──────────────── */
.home-header,
.view-header {
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: padding, box-shadow;
}

.home-header.shrunk,
.view-header.shrunk {
    padding-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.home-header .profile-stats-container,
.view-header .profile-stats-container {
    max-height: 85px;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
    overflow: hidden;
}

.home-header.shrunk .profile-stats-container,
.view-header.shrunk .profile-stats-container {
    opacity: 0 !important;
    transform: translateY(-12px) scale(0.92) !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.home-header .profile-header-content p {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 40px;
    overflow: hidden;
}

.home-header.shrunk .profile-header-content p {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.view-header #profile-main-img {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: width, height;
}

.view-header.shrunk #profile-main-img {
    width: 60px;
    height: 60px;
    border-width: 2px;
}

.view-header #profile-name {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-header.shrunk #profile-name {
    font-size: 20px;
    margin-bottom: 0;
}

.view-header #profile-phone {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 30px;
    overflow: hidden;
}

.view-header.shrunk #profile-phone {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* ─── Modern Toast Notification System ──────────────────── */
.toast-container {
    position: fixed;
    bottom: 95px; /* Above bottom nav */
    left: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 16px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 450px;
    margin: 0 auto;
    width: 100%;
    direction: rtl;
}

.toast.removing {
    animation: toastOut 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

/* Variants */
.toast.success .toast-icon { background: #DCFCE7; color: #16A34A; }
.toast.error .toast-icon { background: #FEE2E2; color: #EF4444; }
.toast.info .toast-icon { background: #DBEAFE; color: #2563EB; }
.toast.warning .toast-icon { background: #FEF3C7; color: #D97706; }

@keyframes toastIn {
    from { transform: translateY(100px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateY(0) scale(1); opacity: 1; }
    to { transform: translateY(50px) scale(0.9); opacity: 0; }
}

/* ─── Connectivity Popup ────────────────────────────────── */
.connectivity-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.connectivity-popup.show {
    display: flex;
}

.connectivity-card {
    background: var(--surface);
    width: 100%;
    max-width: 400px;
    border-radius: 28px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.connectivity-icon {
    width: 80px;
    height: 80px;
    background: #FEF2F2;
    color: #EF4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    animation: pulseRed 2s infinite;
}

.connectivity-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 10px;
}

.connectivity-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
}

.connectivity-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.connectivity-btn:active {
    transform: scale(0.97);
}

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

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ═══════════════════════════════════════════════════════════
   DESIGN ENHANCEMENTS - Premium & Professional
   ═══════════════════════════════════════════════════════════ */

/* ─── Enhanced Design Tokens ───────────────────────────── */
:root {
    --shadow-lg: 0 20px 60px -8px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 25px 80px -12px rgba(0, 0, 0, 0.18);
    --shadow-glow: 0 0 30px rgba(var(--primary-rgb), 0.08);
    --radius-sm: 10px;
    --transition-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-btn: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    --gradient-btn-hover: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(var(--primary-rgb), 0.03) 100%);
    --glass-dark: rgba(15, 23, 42, 0.6);
}

/* ─── Smooth Scrolling & Selection ─────────────────────── */
html {
    scroll-behavior: smooth;
}

::selection {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

/* ─── Scrollbar Styling (Webkit) ───────────────────────── */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ─── Nav Item Extras (indicator dot, active states) ──── */
.nav-item {
    position: relative;
    transition: all 0.3s var(--transition-smooth);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    border-radius: 4px;
    background: var(--primary);
    transition: transform 0.3s var(--transition-smooth);
}

.nav-item.active::after {
    transform: translateX(-50%) scaleX(1);
}

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

.nav-item.active span {
    font-weight: 900;
}

.nav-item:active {
    transform: scale(0.92);
}

.nav-main-circle {
    transition: all 0.3s var(--transition-spring);
    box-shadow: 0 8px 30px rgba(30, 58, 138, 0.45);
}

.nav-main-circle:active {
    transform: scale(0.9);
}

/* ─── Enhanced View Headers ────────────────────────────── */
.view-header {
    position: relative;
    overflow: hidden;
}

.view-header::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.view-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.home-header {
    position: relative;
    overflow: hidden;
}

.home-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.header-row {
    position: relative;
    z-index: 2;
}

/* ─── Enhanced Buttons ─────────────────────────────────── */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--transition-smooth) !important;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.btn-primary {
    background: var(--gradient-btn) !important;
    background-size: 200% 200% !important;
    background-position: 0% 0% !important;
    transition: all 0.4s var(--transition-smooth) !important;
}

.btn-primary:hover {
    background-position: 100% 100% !important;
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.35) !important;
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98) !important;
}

.btn-outline {
    transition: all 0.3s var(--transition-smooth) !important;
}

.btn-outline:hover {
    background: rgba(var(--primary-rgb), 0.05) !important;
    transform: translateY(-1px);
}

.btn-outline:active {
    transform: scale(0.98) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 50%, #F87171 100%) !important;
    background-size: 200% 200% !important;
    transition: all 0.4s var(--transition-smooth) !important;
}

.btn-danger:hover {
    background-position: 100% 100% !important;
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.35) !important;
}

.btn-back {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    transition: all 0.3s var(--transition-smooth) !important;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.05);
}

.btn-back:active {
    transform: scale(0.9) !important;
}

/* ─── Enhanced Cards ───────────────────────────────────── */
.form-card,
.order-card,
.dash-card,
.profile-card-group,
.profile-unified-card {
    transition: all 0.3s var(--transition-smooth);
    position: relative;
}

.form-card:hover,
.order-card:hover {
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

.form-card {
    border: 1px solid rgba(226, 232, 240, 0.6) !important;
}

.package-card {
    transition: all 0.4s var(--transition-smooth);
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.15);
}

.package-card.featured {
    border-color: var(--primary) !important;
    box-shadow: 0 8px 40px rgba(30, 58, 138, 0.12) !important;
}

.feature-card {
    transition: all 0.3s var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.08);
    border-color: rgba(59, 130, 246, 0.15);
}

/* ─── Enhanced Inputs & Forms ──────────────────────────── */
.form-group input,
.form-group textarea,
.form-group select,
.input-field {
    transition: all 0.3s var(--transition-smooth) !important;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.input-field:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.08) !important;
    transform: translateY(-1px);
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    opacity: 0.5;
    transform: translateX(4px);
    transition: all 0.3s ease;
}

.form-group label {
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: var(--primary);
}

/* ─── Enhanced Section Titles ──────────────────────────── */
.profile-section-title {
    position: relative;
    padding-right: 16px !important;
    margin-bottom: 12px !important;
}

.profile-section-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: var(--gradient-btn);
}

/* ─── Enhanced Modals ──────────────────────────────────── */
.modal-overlay {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.modal {
    box-shadow: 0 25px 80px -12px rgba(0, 0, 0, 0.25) !important;
}

.car-select-item {
    border: 1.5px solid var(--border) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.car-select-item:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.12) !important;
    transform: translateY(-3px) !important;
}

.car-select-item:active {
    transform: scale(0.95) !important;
}

/* ─── Enhanced Toast Notifications ─────────────────────── */
#toast-container {
    z-index: 99999 !important;
}

.toast {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(226, 232, 240, 0.6) !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12) !important;
    border-radius: 16px !important;
    padding: 14px 20px !important;
}

.toast-success {
    border-right: 4px solid var(--green) !important;
}

.toast-error {
    border-right: 4px solid var(--red) !important;
}

.toast-warning {
    border-right: 4px solid var(--orange) !important;
}

/* ─── Enhanced Loading States ──────────────────────────── */
.spinner {
    border-width: 3px !important;
    border-color: rgba(30, 58, 138, 0.1) !important;
    border-top-color: var(--primary) !important;
    animation: spin 0.7s linear infinite !important;
}

.loading-msg {
    position: relative;
    padding: 30px 20px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
}

/* ─── Enhanced Profile & Menu Rows ─────────────────────── */
.profile-row {
    transition: all 0.3s var(--transition-smooth) !important;
    border-radius: 16px !important;
}

.profile-row:hover {
    background: rgba(30, 58, 138, 0.03) !important;
    transform: translateX(-4px);
}

.profile-row:active {
    transform: scale(0.99);
}

.profile-row-icon {
    transition: all 0.3s var(--transition-smooth) !important;
}

.profile-row:hover .profile-row-icon {
    transform: scale(1.05);
}

/* ─── Enhanced Horizontal Scroll Lists ─────────────────── */
.horizontal-scroll-list {
    gap: 10px !important;
    padding-bottom: 10px !important;
}

.horizontal-scroll-list > * {
    transition: all 0.3s var(--transition-smooth);
}

.horizontal-scroll-list > *:hover {
    transform: translateY(-2px);
}

.selectable-car-card {
    transition: all 0.3s var(--transition-smooth) !important;
}

.selectable-car-card:hover {
    border-color: var(--primary-light) !important;
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.08);
}

/* ─── Enhanced Connect Card / Banner ───────────────────── */
.connectivity-card {
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ─── Enhanced Payment Cards ───────────────────────────── */
.payment-card .card-content {
    transition: all 0.3s var(--transition-smooth);
}

.payment-card input:checked + .card-content {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08), 0 8px 24px rgba(30, 58, 138, 0.1) !important;
}

/* ─── Enhanced Store Products ──────────────────────────── */
.store-product-card {
    transition: all 0.4s var(--transition-smooth) !important;
}

.store-product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.12) !important;
}

.store-product-card:active {
    transform: scale(0.97) !important;
}

/* ─── Enhanced Tab Buttons ─────────────────────────────── */
.tab-btn {
    transition: all 0.3s var(--transition-smooth) !important;
    font-weight: 700 !important;
}

.tab-btn.active {
    background: var(--gradient-btn) !important;
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.25) !important;
}

/* ─── Enhanced Notifications ───────────────────────────── */
.notif-item {
    transition: all 0.3s var(--transition-smooth) !important;
}

.notif-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
}

.notif-item:active {
    transform: scale(0.99);
}

/* ─── Enhanced Badge / Tag Styles ──────────────────────── */
.status-badge {
    transition: all 0.3s var(--transition-smooth);
    font-weight: 800 !important;
}

/* ─── Enhanced Coupon Ticket ───────────────────────────── */
.coupon-ticket {
    transition: all 0.3s var(--transition-smooth) !important;
}

.coupon-ticket:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.12) !important;
}

/* ─── Referral Card Enhancement ────────────────────────── */
.referral-card {
    transition: all 0.3s var(--transition-smooth) !important;
}

.referral-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.1) !important;
}

/* ─── Enhanced Stats / Counters ────────────────────────── */
.stat-item {
    transition: all 0.3s var(--transition-smooth);
}

.stat-item:active {
    transform: scale(0.95);
}

/* ─── Enhanced Price Display ───────────────────────────── */
.price-tag {
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* ─── Smooth Image Loading ─────────────────────────────── */
img {
    transition: opacity 0.4s ease;
}

img[loading] {
    opacity: 0;
}

img[loading].loaded,
img.loaded {
    opacity: 1;
}

/* ─── Ripple Effect for Interactive Elements ───────────── */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: 0s;
}

/* ─── Auth Card Enhancement ────────────────────────────── */
.auth-glass-card {
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25) !important;
}

/* ─── Desktop Container Refinement ─────────────────────── */
@media (min-width: 768px) {
    #app-container {
        box-shadow: 0 0 80px rgba(0, 0, 0, 0.08) !important;
        border-left: 1px solid var(--border) !important;
        border-right: 1px solid var(--border) !important;
    }
}

/* ─── Reduced Motion Preference ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── SEO Link Reset: Fix converted <a> nav elements ─────── */
/* Reset all default browser anchor styles for semantic nav links */
a.nav-item,
a.profile-unified-row {
    text-decoration: none !important;
    color: inherit !important;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* Bottom nav <a> items — restore button-like behavior */
a.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-hint) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    min-width: 0;
    padding: 8px 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    text-decoration: none !important;
}

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

a.nav-item i {
    font-size: 19px;
}

a.nav-item span {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    text-decoration: none !important;
}

/* Service list <a> items — restore div-like flex layout */
a.profile-unified-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 24px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-bottom: 1px solid #f8fafc !important;
    gap: 15px !important;
    flex-direction: row !important;
    text-decoration: none !important;
    color: inherit !important;
    width: 100%;
    box-sizing: border-box;
}

a.profile-unified-row:last-child {
    border-bottom: none !important;
}

a.profile-unified-row:active {
    background: #f8fafc;
    transform: scale(0.99);
}

a.profile-unified-row .profile-unified-text {
    color: var(--text) !important;
    text-decoration: none !important;
}

a.profile-unified-row .profile-unified-chevron {
    color: #cbd5e1;
    font-size: 13px;
    transition: transform 0.2s, color 0.2s;
    text-decoration: none !important;
}
html[data-theme="dark"] body { background-image: none; }
html[data-theme="dark"] .view { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .view-content { background: var(--bg); }
html[data-theme="dark"] .profile-unified-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .auth-glass-card,
html[data-theme="dark"] .tier-card-premium,
html[data-theme="dark"] .package-card,
html[data-theme="dark"] .store-product-card,
html[data-theme="dark"] .order-card,
html[data-theme="dark"] .car-card,
html[data-theme="dark"] .address-card { background: var(--surface) !important; border-color: var(--border) !important; color: var(--text) !important; }
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background: #f8fafc"] { background: var(--surface) !important; color: var(--text) !important; border-color: var(--border) !important; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background: var(--surface) !important; color: var(--text) !important; border-color: var(--border) !important; -webkit-text-fill-color: var(--text) !important; }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--text-hint) !important; }
html[data-theme="dark"] .app-footer { background: var(--surface) !important; border-color: var(--border) !important; color: var(--text-muted) !important; }
html[data-theme="dark"] .bottom-nav { background: var(--surface) !important; border-color: var(--border) !important; padding-bottom: calc(8px + var(--safe-bottom-inset)); }
html[data-theme="dark"] a.profile-unified-row { border-color: var(--border) !important; }
html[data-theme="dark"] a.profile-unified-row:active { background: #1E293B !important; }
html[data-theme="dark"] .profile-unified-text { color: var(--text) !important; }
html[data-theme="dark"] .profile-unified-chevron { color: var(--text-hint) !important; }
html[data-theme="dark"] label { color: var(--text) !important; }
html[data-theme="dark"] .feature-card .f-desc,
html[data-theme="dark"] .f-desc { color: var(--text-muted) !important; }
html[data-theme="dark"] .msg,
html[data-theme="dark"] .loading-msg { color: var(--text) !important; }
html[data-theme="dark"] .package-options { background: rgba(var(--primary-rgb), 0.12) !important; }
html[data-theme="dark"] .car-size-selector,
html[data-theme="dark"] .pkg-size-btn { background: var(--surface) !important; border-color: var(--border) !important; }
html[data-theme="dark"] .car-size-chip,
html[data-theme="dark"] .pkg-size-btn { background: #16233A !important; border-color: var(--border) !important; color: var(--text-muted) !important; }
html[data-theme="dark"] .car-size-chip.active,
html[data-theme="dark"] .pkg-size-btn.active { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
html[data-theme="dark"] .pkg-modal-price-box { background: #16233A !important; }
html[data-theme="dark"] .pkg-size-price { background: #16233A !important; border-color: var(--border) !important; }
html[data-theme="light"] body { background-image: radial-gradient(var(--border) 1px, transparent 1px); }
html[data-theme="light"] .view,
html[data-theme="light"] .view-content { background: transparent; }
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea { background: #fff !important; color: #0F172A !important; }
.theme-toggle-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer; backdrop-filter: blur(10px);
    transition: all 0.2s;
}
.theme-toggle-btn:active { transform: scale(0.92); }