/* ========================================================
   EV SOLUTION - COMPLETE BASE & MOBILE CSS
   ======================================================== */

/* --- Root Variables --- */
:root {
    --primary-ev: #10b981;
    --primary-dark: #059669;
    --accent-blue: #0d6efd;
    --bg-light: #f8fafc; /* Professional Dashboard Background */
    --top-height: 60px;
    --bottom-nav-height: 75px;
    --sidebar-width: 260px;
    /* --- Modern Typography System --- */
    /* Devanagari (Hindi) fallback: Latin text Segoe/Inter se, aur Hindi text Noto Sans Devanagari /
       Nirmala UI se render hota hai. Koi web-font/CDN download nahi — offline (MAUI) me bhi safe. */
    --font-family-main: 'Segoe UI', 'Inter', 'Noto Sans Devanagari', 'Mukta', 'Nirmala UI', 'Mangal', system-ui, -apple-system, sans-serif;
    --font-main-heading: 0.95rem; /* Showroom Inventory */
    --font-sub-heading: 0.95rem; /* Register stock using... */
    --font-body: 0.9rem; /* Normal text */
    --font-small: 0.75rem;
    --font-weight-bold: 800;
    --font-weight-medium: 600;
    --font-weight-regular: 600;
    --color-text-main: #1e293b; /* Deep blue-grey */
    --color-text-muted: #64748b; /* Slate grey for subtext */
}

/* ========================================================
   GLOBAL TYPOGRAPHY & RESET
   ======================================================== */
*, *::before, *::after {
    font-family: var(--font-family-main) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: var(--bg-light);
    font-size: var(--font-body);
    font-weight: var(--font-weight-regular);
    color: var(--color-text-main);
    line-height: 1.4;
}

/* Headings Consistency */
h1, h2, h3, .ev-title {
    font-size: var(--font-main-heading);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-main);
    letter-spacing: -0.5px;
    margin: 0;
}

h4, h5, h6, .section-label {
    font-size: var(--font-sub-heading);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.5px;
    
}

p, span, div, .ev-body-text {
    font-size: var(--font-body);
    font-weight: var(--font-weight-regular);
}

.text-muted, .extra-small, .nav-subtitle {
    font-size: var(--font-small);
    color: var(--color-text-muted);
    border-radius: 1.5rem !important;
}

/* Form Controls, Alerts & Modals */
button, input, select, textarea, .form-control, .form-select {
    font-family: var(--font-family-main) !important;
    font-size: var(--font-body) !important;
}

.alert {
    font-size: var(--font-body);
    font-weight: var(--font-weight-medium);
    border-radius: 12px;
}

.modal-title {
    font-weight: var(--font-weight-bold);
    font-size: var(--font-sub-heading);
}

.modal-body {
    font-size: var(--font-body);
    color: var(--color-text-main);
}

.ev-toast {
    font-family: var(--font-family-main) !important;
    font-weight: var(--font-weight-medium);
}


/* ========================================================
   CORE LAYOUT (Top Bar, Sidebar, Bottom Nav)
   ======================================================== */

.app-shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* EvPageHeader inside MainLayout: avoid a fixed full-viewport shell with an empty <main> (huge blank gap). */
.content-area > .app-shell {
    height: auto;
    min-height: 0;
}

/* --- Top Bar (Header) --- */
.top-bar {
    height: var(--top-height);
    background: #93c0ad30 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #edf2f7;
    z-index: 1100;
}

.brand-name {
    font-weight: 900;
    color: var(--accent-blue);
    font-size: 1.2rem;
}

.env-badge {
   
    color: #64748b;
    padding: 2px 10px;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 800;
    border: 1px solid #e2e8f0;
}

/* --- Layout Wrapper --- */
.main-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    -webkit-overflow-scrolling: touch;
}

/* --- Desktop Sidebar (Laptop Only) --- */
.desktop-sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    padding-top: 15px;
    padding-bottom: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

    .desktop-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .desktop-sidebar::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15);
        border-radius: 3px;
    }

.sidebar-link {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

    .sidebar-link.active {
        background: #f1f5f9;
        color: var(--accent-blue);
        border-right: 4px solid var(--accent-blue);
    }

/* --- Quick Tools (Coloured Icons) --- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    text-align: center;
}

.tool-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

    .tool-icon.heart {
        color: #ef4444;
        background: #fff1f2;
    }

    .tool-icon.verify {
        color: #10b981;
        background: #f0fdf4;
    }

    .tool-icon.shop {
        color: #3b82f6;
        background: #eff6ff;
    }

    .tool-icon.sos {
        color: #f97316;
        background: #fff7ed;
    }

.modern-tool-item span {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* --- Hero Card (Battery) --- */
.hero-card-modern {
    background: linear-gradient(135deg, var(--primary-ev) 0%, var(--primary-dark) 100%);
    padding: 22px;
    border-radius: 20px;
    color: white;
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.15);
}

.health-value {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
}

.health-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* --- Submenu Drawer (Mobile) --- */


.submenu-drawer {
    width: 100%;
    background: white;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 25px;
    animation: slideUp 0.3s ease-out;
}

/* --- Bottom Nav (Mobile) --- */
.bottom-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background: #ffffff;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    /* Too many tabs? Scroll horizontally instead of hiding/squeezing items off-screen. */
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* IE/Edge */
}

    .bottom-nav::-webkit-scrollbar {
        display: none;          /* Chrome / Safari / Android WebView */
    }

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #95a5a6;
    font-weight: 700; /* Extra Bold Font */
    font-size: 0.8rem;
    transition: all 0.3s ease;
    /* Grow evenly when few tabs; never shrink below 64px when many, so items scroll instead of collapsing. */
    flex: 1 0 64px;
    min-width: 64px;
    padding: 0 6px;
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
    overflow: hidden;
}

    .nav-tab i {
        font-size: 1.4rem;
        margin-bottom: 4px;
        flex-shrink: 0;
    }

    .nav-tab span {
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }

    .nav-tab.active {
        color: #0d6efd; /* Aapka Primary Color */
    }
        /* Active tab ke niche chota sa dot ya pill effect */
        .nav-tab.active::after {
            content: '';
            width: 20px;
            height: 3px;
            background: #0d6efd;
            border-radius: 10px;
            margin-top: 4px;
        }

/* --- YouTube Preview Boxes --- */
.media-preview {
    height: 110px;
    border-radius: 15px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-play-btn {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- RESPONSIVE FIXES (The Core Logic) --- */
@media (max-width: 767px) {
    .desktop-sidebar {
        display: none !important;
    }

    .bottom-nav {
        display: flex !important;
    }

    .content-area {
        padding-bottom: 95px;
    }
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none !important;
    }

    .desktop-sidebar {
        display: flex !important;
    }

    .content-area {
        max-width: 850px;
        margin: 0 auto;
        background: #ffffff;
        border-radius: 24px;
        min-height: 80vh;
        box-shadow: 0 10px 40px rgba(0,0,0,0.04);
        padding: 0 35px 35px !important;
    }
}

/* MAUI Blazor WebView: WebView sometimes reports width >= 768 on cold start/resume, which hides
   bottom nav and shows desktop sidebar. Force mobile chrome for the native app only (html class from MAUI index.html). */
html.ev-hybrid-shell .desktop-sidebar {
    display: none !important;
}

html.ev-hybrid-shell .bottom-nav {
    display: flex !important;
    /* Above .notification-overlay (9998) so taps always reach the bar on Android WebView */
    z-index: 10050;
}

html.ev-hybrid-shell .top-bar {
    z-index: 10040;
}

html.ev-hybrid-shell .content-area {
    padding-top: 0 !important;
    padding-bottom: 95px;
}

@media (min-width: 768px) {
    html.ev-hybrid-shell .bottom-nav {
        display: flex !important;
    }

    html.ev-hybrid-shell .desktop-sidebar {
        display: none !important;
    }

    html.ev-hybrid-shell .content-area {
        max-width: none;
        margin: 0;
        background: transparent;
        border-radius: 0;
        min-height: 0;
        box-shadow: none;
        padding: 0 16px 95px !important;
    }
}


/* ========================================================
   REUSABLE COMPONENTS CSS (Base/Mobile Focus)
   ======================================================== */

.ev-btn {
    width: 100%;
    height: 52px;
    border-radius: 16px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ev-btn.primary {
        background: linear-gradient(135deg, var(--primary-ev, #10b981) 0%, var(--primary-dark, #059669) 100%);
        color: white;
        box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
    }

    .ev-btn.danger {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
    }

    .ev-btn:active {
        transform: translateY(2px);
        box-shadow: none;
    }

.ev-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 5px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.04), 0 8px 10px -6px rgba(0,0,0,0.04);
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.ev-card.ev-card-overflow-visible {
    overflow: visible;
}

/* Marketplace card - image zoom to fill card without stretching (do not modify .ev-card directly) */
.marketplace-img-card .style-img-container img,
.marketplace-img-card .product-img-box img {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
}

.inventory-brand-dropdown {
    max-height: min(280px, 45vh);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.inventory-brand-dropdown::-webkit-scrollbar {
    width: 6px;
}

.inventory-brand-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 999px;
}

.inventory-wizard-step {
    scroll-margin-top: 88px;
    scroll-margin-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}

/* /dealer/parts — quick category card (Charger / Motor / Body Parts / Controller) chunne par JS isi
   container par focus karta hai, aur "Other Parts" par Category* dropdown par. scroll-margin-top se
   scroll sticky top-bar ke neeche sahi jagah rukta hai (jaise .inventory-wizard-step). */
#part-category-basics-section,
#part-category-dropdown-trigger {
    scroll-margin-top: 88px;
}

/* Step 2 nudge: template card select hone par "Kya aapka model list me hai?" container pulse karta hai,
   taaki user Yes/No choose kar sake (blank chhodne par Next par error aata hai). Class Inventory.razor
   ke highlightModelInListPrompt flag se lagti/hatti hai. */
.inventory-prompt-highlight {
    border: 2px solid var(--primary-ev, #10b981) !important;
    animation: inventoryPromptPulse 1.5s ease-in-out infinite;
}

@keyframes inventoryPromptPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .inventory-prompt-highlight {
        animation: none;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
    }
}

/* Error message dikhne ke ~2 sec baad Inventory.razor ka FocusModelInListPromptAfterDelayAsync()
   programmatically isi container par focus karta hai (is liye markup me tabindex="-1" hai).
   Wahan pulse highlight hi visual indicator hai, to default focus outline hata diya. */
#inventory-model-inlist-prompt:focus,
#inventory-model-inlist-prompt:focus-visible {
    outline: none;
}

/* Step 2 ka "Kya aapka model list me hai?" YES/NO chooser (Inventory.razor).
   Pehle hint text button ke andar inline tha — chhote screens par text wrap hone se dono
   button ki height alag ho jati thi. Ab button me sirf icon + YES/NO hai aur hint text
   button ke NEECHE (alag span me) muted small text ki tarah render hota hai. */
.inventory-yn-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.inventory-yn-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.inventory-yn-btn {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    /* Neeche wala global rule `button { font-size: var(--font-body) !important }` (line ~79) hai,
       is liye yahan bhi wahi token + !important — warna font-size silently ignore ho jata hai. */
    font-size: var(--font-body, 0.9rem) !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.inventory-yn-btn i {
    font-size: 1.05rem;
    line-height: 1;
}

/* Chuna hua button — brand gradient + lifted shadow */
.inventory-yn-btn.is-active {
    background: var(--ev-action-gradient);
    border: 2px solid transparent;
    color: #ffffff;
    box-shadow: var(--ev-action-shadow);
}

.inventory-yn-btn.is-active:hover {
    background: var(--ev-action-gradient);
    color: #ffffff;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

/* Bina chuna hua button — plain card look */
.inventory-yn-btn.is-inactive {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    color: #64748b;
}

.inventory-yn-btn.is-inactive:hover {
    background: var(--bg-light, #f8fafc);
    border-color: var(--primary-ev, #10b981);
    color: var(--primary-ev, #10b981);
}

.inventory-yn-btn:active {
    transform: translateY(0) scale(0.98);
}

.inventory-yn-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
}

/* Hint text — button ke neeche, chhota aur muted */
.inventory-yn-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.4rem;
    font-size: var(--font-small, 0.75rem);
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: var(--color-text-muted, #64748b);
}

.inventory-yn-hint.is-active {
    color: var(--primary-ev, #10b981);
}

@media (min-width: 576px) {
    .inventory-yn-group {
        gap: 0.75rem;
    }
}

@media (max-width: 400px) {
    .inventory-yn-btn {
        /* Base rule me !important tha, is liye yahan bhi !important chahiye */
        font-size: 0.85rem !important;
        padding: 0.45rem 0.6rem;
    }

    .inventory-yn-hint {
        font-size: 0.7rem;
    }
}

body.dark-mode .inventory-yn-btn.is-inactive {
    background: #1f2937;
    border-color: #374151;
    color: #cbd5e1;
}

body.dark-mode .inventory-yn-btn.is-inactive:hover {
    background: #111827;
    border-color: var(--primary-ev, #10b981);
    color: var(--primary-ev, #10b981);
}

body.dark-mode .inventory-yn-hint {
    color: #9ca3af;
}

/* Global dark mode theme */
body.dark-mode {
    background: #121212;
    color: #e5e7eb;
}

body.dark-mode .top-bar,
body.dark-mode .bottom-nav,
body.dark-mode .ev-card,
body.dark-mode .modal-content,
body.dark-mode .notification-dropdown {
    background: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .text-dark {
    color: #e5e7eb !important;
}

body.dark-mode .text-muted {
    color: #9ca3af !important;
}

    .ev-card:active {
        transform: scale(0.96);
        background: #f8fafc;
    }

.ink-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-ev, #10b981), var(--accent-blue, #3b82f6));
}

.mobile-container {
    width: 100%;
    padding: 12px;
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow-x: hidden;
}

    .mobile-container.compact {
        padding: 8px;
    }

    .mobile-container.comfortable {
        padding: 16px;
    }

    .mobile-container.full-height {
        min-height: 100vh;
    }

    .mobile-container.centered {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .mobile-container * {
        max-width: 100%;
        word-break: break-word;
    }

/* --- StickyAction (Button ko niche laya) --- */
.sticky-wrapper {
    position: fixed;
    /* Bottom Nav ke theek upar rest karega */
    bottom: var(--bottom-nav-height, 75px);
    left: 0;
    right: 0;
    z-index: 10040;
}

.sticky-blur-bg {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.sticky-content {
    position: relative;
    /* Extra safe-area padding hata di gayi hai jisne button ko upar dhakel diya tha */
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Form pages with fixed StickyAction — content scrolls, button stays visible */
.dealer-form-with-sticky-action {
    padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}

/* ========================================================
   BATCH 2: UI STATES, HEADERS, & FEEDBACK
   ======================================================== */

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.modern-header {
    
    top: 0;
    z-index: 1050;
    /*background: #ffffff;*/
    /* Padding kam kar di gayi hai taaki box compact rahe */
    padding: 17px 18px 12px;
    border-bottom: 1px solid #edf2f7;
    /* Text selection ko disable kiya taaki black box na aaye */
    user-select: none;
}

.page-header-row {
    line-height: 1.1;
}

.page-header-row h2,
.page-header-row h6,
.page-header-row span {
    line-height: 1.1;
}

.page-content-tight {
    margin-top: 0px;
    padding-top: 0 !important;
}

.header-inner {
    display: flex;
    align-items: center;
}

.nav-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    color: var(--color-text-main); /* White se dark color kiya */
    letter-spacing: -0.5px;
}

.nav-subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 1px;
    display: block;
}

.status-pill {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
}

.icon-circle-btn {
    background: #f1f5f9;
    border: none;
    color: #475569;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.pulse-ring {
    width: 60px;
    height: 60px;
    border: 4px solid var(--primary-ev, #10b981);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.ev-logo-text {
    position: absolute;
    font-weight: 800;
    color: var(--primary-ev, #10b981);
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

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

.ev-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideUpFade 0.3s ease-out;
}

    .ev-toast.success {
        background: #10b981;
    }

    .ev-toast.error {
        background: #ef4444;
    }

/* Reusable confirm dialog (ConfirmDialogHost) */
.ev-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10070;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.ev-confirm-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem 1.25rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.ev-confirm-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.ev-confirm-message {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    white-space: pre-wrap;
}

.ev-confirm-actions {
    display: flex;
    gap: 0.5rem;
}

body.dark-mode .ev-confirm-card {
    background: #1f2937 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .ev-confirm-title {
    color: #e5e7eb !important;
}

body.dark-mode .ev-confirm-message {
    color: #94a3b8 !important;
}

@keyframes slideUpFade {
    0% {
        transform: translate(-50%, 20px);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

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

    to {
        transform: translateY(0);
    }
}


/* ========================================================
   BATCH 3 & 4: COMPONENT STYLES
   ======================================================== */

.wizard-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #cbd5e1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    transition: 0.3s;
}

    .step.active {
        background: #2563eb;
        transform: scale(1.15);
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
    }

    .step.completed {
        background: var(--primary-ev, #10b981);
    }

.connector {
    height: 3px;
    width: 30px;
    background: #cbd5e1;
    border-radius: 2px;
}

.success-range::-webkit-slider-thumb {
    background: var(--primary-ev, #10b981) !important;
}

.cell-grid-display {
    display: grid;
    gap: 6px;
    justify-content: center;
}

.cell-dot-mini {
    width: 15px;
    height: 25px;
    border-radius: 4px;
}

    .cell-dot-mini.prism {
        width: 35px;
        height: 12px;
    }

.lfp {
    background: #3b82f6;
}

.nmc {
    background: var(--primary-ev, #10b981);
}

.diagnosis-wrapper {
    background-color: #f4f7f6;
    min-height: 90vh;
    padding: 2rem 1rem;
}

.glass-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 6px solid var(--primary-ev, #10b981);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
}

.btn-option {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 12px;
    background: #fff;
    border: 2px solid #f1f3f5;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
    text-align: left;
}

    .btn-option:active {
        background: #f0fff4;
        border-color: var(--primary-ev, #10b981);
    }

.issue-box {
    cursor: pointer;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 20px;
    padding: 1.5rem;
    transition: 0.3s;
    text-align: center;
}

    .issue-box:active {
        border-color: var(--primary-ev, #10b981);
        transform: translateY(-3px);
    }

.progress-stepper {
    height: 6px;
    background: #e9ecef;
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
}

.progress-active {
    height: 100%;
    background: var(--primary-ev, #10b981);
    transition: width 0.5s ease;
}

.feature-toolbar {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-chip {
    padding: 6px 10px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e6ece6;
    font-size: 0.85rem;
    color: var(--primary-ev, #10b981);
    cursor: pointer;
}

    .feature-chip.disabled {
        opacity: 0.45;
        cursor: not-allowed;
        color: #6c757d;
        border-color: #f1f1f1;
    }

.diag-img {
    max-height: 250px;
}

.login-container {
    /* 100vh ko hata kar calculation lagayi hai taaki bewajah scroll na ho */
    min-height: calc(100dvh - var(--top-height) - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.fixed-card {
    width: 100%;
    max-width: 380px;
    /* min-height: 580px hata diya taaki choti screen par scroll na kare */
    display: flex;
    flex-direction: column;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    border-radius: 1.5rem !important;
    background: white;
    overflow: hidden;
}

.card-body-fixed {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.custom-input-group {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: all 0.3s;
}

    .custom-input-group:focus-within {
        border-color: var(--primary-ev, #10b981);
        box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.1);
    }

    .custom-input-group .input-group-text {
        background: #f8f9fa;
        border: none;
        color: #6c757d;
        font-weight: 600;
        min-width: 55px;
        justify-content: center;
    }

.auth-input {
    border: none !important;
    box-shadow: none !important;
    padding: 12px;
    border-radius: 12px;
}

/* Role dropdown on login: keep bordered container from .custom-input-group; do not use .auth-input (it strips borders). */
.custom-input-group .auth-role-select.form-select {
    border: none !important;
    box-shadow: none !important;
    border-radius: 12px;
    font-weight: 600;
    color: var(--color-text-main, #212529);
    cursor: pointer;
}

.auth-tabs .nav-link {
    border-radius: 10px !important;
    padding: 10px !important;
    font-weight: bold;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #6c757d;
    margin: 0 4px;
    transition: all 0.2s;
    cursor: pointer;
}

    .auth-tabs .nav-link.active {
        background-color: var(--primary-ev, #10b981) !important;
        color: white !important;
        border-color: var(--primary-ev, #10b981) !important;
        box-shadow: 0 4px 12px rgba(25, 135, 84, 0.2);
    }

.auth-btn {
    border-radius: 12px;
    padding: 12px;
    font-weight: bold;
}

.otp-success-mini {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.change-number-btn {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0d6efd;
    text-decoration: none;
    border: 1px solid #cfe2ff;
    background: #f8faff;
    padding: 4px 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.icon-box {
    width: 30px;
    height: 30px;
}

.text-tiny {
    font-size: 0.7rem;
}

.otp-input {
    letter-spacing: 0.4rem;
    border-radius: 12px;
}

.style-img-container {
    height: 120px;
    overflow: hidden;
}

.product-img-box {
    width: 100px;
    height: 100px;
    position: relative;
    flex-shrink: 0;
}

    .product-img-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
    }

.variant-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.v-pill {
    font-size: 0.6rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    font-weight: 800;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.v-pill-active {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}

.filter-sticky-container {
    position: sticky;
    top: 70px;
    z-index: 900;
}

.ad-wrapper {
    background-color: var(--bg-light);
    min-height: 90vh;
    padding: 2rem 1rem;
}

.form-label-custom {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.5rem;
    display: block;
}

.custom-select, .custom-input {
    border-radius: 12px;
    border: 2px solid #f1f3f5;
    padding: 0.75rem;
    transition: 0.3s;
}

    .custom-select:focus, .custom-input:focus {
        border-color: var(--primary-ev, #10b981);
        box-shadow: none;
        background: #f0fff4;
    }

.upload-zone {
    border: 2px dashed #e9ecef;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    background: #fafafa;
    transition: 0.3s;
    cursor: pointer;
}

    .upload-zone:active {
        border-color: var(--primary-ev, #10b981);
        background: #f8fff9;
    }

.upload-preview-img {
    max-height: 200px;
}

.btn-submit {
    background: var(--primary-ev, #10b981);
    color: white;
    border-radius: 16px;
    padding: 1rem;
    font-weight: bold;
    border: none;
    width: 100%;
    transition: 0.3s;
}

    .btn-submit:disabled {
        opacity: 0.7;
    }

.mechanic-page {
    padding: 1rem;
}

.search-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.filter-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-top: 1rem;
    scrollbar-width: none;
}

    .filter-container::-webkit-scrollbar {
        display: none;
    }

.filter-chip {
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.85rem;
}

    .filter-chip.active {
        background: var(--primary-ev, #10b981);
        color: white;
        border-color: var(--primary-ev, #10b981);
    }

.mechanic-item-card {
    background: white;
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    border: 1px solid #eee;
}

.spec-badge {
    font-size: 0.7rem;
    background: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 50px;
    margin-right: 6px;
    display: inline-block;
    margin-top: 5px;
    font-weight: 600;
}

.btn-action-row {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
}

.btn-main {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    text-align: center;
    text-decoration: none;
}

.btn-call-light {
    background: #f0fdf4;
    color: var(--primary-dark, #059669);
}

.btn-book-solid {
    background: var(--primary-ev, #10b981);
    color: white;
}

.dashed-border {
    border-style: dashed !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.booking-panel {
    background: white;
    padding: 2rem;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
}

.lang-toggle-z {
    z-index: 2000;
}

.reg-card {
    max-width: 420px;
    width: 100%;
}

.reg-logo-box {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: white;
    padding: 15px;
}

.text-dark-blue {
    color: #2c3e50;
}

.reg-btn-primary {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
    border: none !important;
}

.reg-otp-input {
    letter-spacing: 0.3em;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
}

.settings-wrapper {
    padding: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.settings-card {
    border: 1px solid #f1f5f9;
}

/* Icon container styling */
.icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.2rem;
    margin-right: 15px;
}

/* Background opacity classes for a modern look */
.bg-soft-primary {
    background-color: rgba(13, 110, 253, 0.15);
    color: #0d6efd;
}

.bg-soft-success {
    background-color: rgba(25, 135, 84, 0.15);
    color: #198754;
}

.bg-soft-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.bg-soft-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.bg-soft-info {
    background-color: rgba(13, 202, 240, 0.15);
    color: #0dcaf0;
}

.bg-soft-purple {
    background-color: rgba(111, 66, 193, 0.15);
    color: #6f42c1;
}

/* ========== LCP skeleton ========== */
.skeleton {
    background: linear-gradient(90deg, #e8edf2 25%, #f4f7fa 50%, #e8edf2 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.home-skeleton {
    max-width: 720px;
    margin: 0 auto;
}
@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; }
}

/* ========================================================
   EV BRAND THEME - HERO & GRADIENT BUTTONS (single source of truth)
   Palette /dealer/referral se aati hai. Saare pages ke hero sections aur primary
   CTA buttons yahin se use karte hain. Color badalna ho to sirf yahan badlein.
   ======================================================== */
:root {
    --ev-hero-from: #1ec19e;
    --ev-hero-to: #4553c8;
    --ev-hero-gradient: linear-gradient(145deg, var(--ev-hero-from), var(--ev-hero-to));
    --ev-hero-shadow: 0 8px 20px rgba(69, 83, 200, 0.25);
    --ev-hero-radius: 18px;
    --ev-action-from: #20c997;
    --ev-action-to: #17a2b8;
    --ev-action-gradient: linear-gradient(90deg, var(--ev-action-from), var(--ev-action-to));
    --ev-action-shadow: 0 4px 14px rgba(32, 201, 151, 0.35);
    --ev-accent: #20c997;
    --ev-accent-dark: #17a2b8;
    --ev-tint: #f0fdf9;
}

/* Hero card - FaultFinder, Mechanic, Marketplace(+Batteries), AboutUs, Privacy,
   TermsConditions, BatteryPack, BatteryHealth, ProfileEdit, Admin/AuditLog.
   Pehle ye rule har page me copy-paste tha; ab sirf yahan se aata hai. */
.hero-profile-card {
    background: var(--ev-hero-gradient);
    border-radius: var(--ev-hero-radius);
    color: #ffffff;
    box-shadow: var(--ev-hero-shadow);
}

/* Hero ke andar ke translucent white chips (pehle 10 pages me duplicate the) */
.role-pill {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}

.tier-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    letter-spacing: 0.2px;
}

/* Gradient action button - referral CTA ka central version.
   Usage: class="btn ev-btn-action rounded-pill px-4 fw-bold" */
.ev-btn-action {
    background: var(--ev-action-gradient);
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    box-shadow: var(--ev-action-shadow);
    transition: all 0.2s ease;
}

.ev-btn-action:hover,
.ev-btn-action:focus,
.ev-btn-action:active {
    background: var(--ev-action-gradient);
    color: #ffffff;
    filter: brightness(1.06);
}

.ev-btn-action:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

/* Bootstrap primary/success buttons - brand gradient par (app-wide).
   Outline variants (.btn-outline-primary/-success) jaan-bujh kar chhode gaye hain. */
.btn-primary,
.btn-success {
    background: var(--ev-action-gradient);
    border-color: transparent;
    color: #ffffff;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active,
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active {
    background: var(--ev-action-gradient);
    border-color: transparent;
    color: #ffffff;
    filter: brightness(1.06);
}

.btn-primary:disabled, .btn-primary.disabled,
.btn-success:disabled, .btn-success.disabled {
    background: #94a3b8;
    border-color: #94a3b8;
}

/* Page-local primary button - pehle 15 pages ke <style> me duplicate tha, ab yahan */
.btn-primary-modern {
    background: var(--ev-action-gradient);
    border: none;
    color: #ffffff;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    transition: all 0.2s ease;
}

.btn-primary-modern:hover:not(:disabled) {
    background: var(--ev-action-gradient);
    filter: brightness(1.06);
    box-shadow: var(--ev-action-shadow) !important;
}
