/* ==========================================
   DriveSphere — Pastel Glassmorphism Theme
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Mono:wght@400;700&display=swap');

:root {
    /* Pastel Palette */
    --pastel-pink: #fcd5ce;
    --pastel-peach: #f8edeb;
    --pastel-lavender: #d8e2dc;
    --pastel-mint: #ece4db;
    --pastel-blue: #d5e5f5;
    --pastel-violet: #cdb4db;
    --pastel-sage: #b5d5c5;
    --pastel-cream: #fefae0;

    /* Functional Colors */
    --primary: #7c6caf;
    --primary-light: #a594d4;
    --primary-dark: #5a4d80;
    --accent: #e8927c;
    --accent-light: #f0b4a4;
    --success: #7ab97a;
    --warning: #e4b95a;
    --danger: #d4726a;
    --info: #6aa8d4;

    /* Neutrals */
    --bg: #f5f0eb;
    --bg-warm: #faf5f0;
    --surface: rgba(255, 255, 255, 0.6);
    --surface-hover: rgba(255, 255, 255, 0.8);
    --glass: rgba(255, 255, 255, 0.35);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text: #2d2a3e;
    --text-secondary: #6e6a80;
    --text-muted: #9e9ab0;
    --border: rgba(0, 0, 0, 0.06);

    /* Sizing */
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --sidebar-width: 260px;
    --header-height: 70px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(124, 108, 175, 0.06);
    --shadow: 0 4px 20px rgba(124, 108, 175, 0.08);
    --shadow-lg: 0 8px 40px rgba(124, 108, 175, 0.12);
    --shadow-glow: 0 0 30px rgba(124, 108, 175, 0.15);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg: #1a1625;
    --bg-warm: #211d2e;
    --surface: rgba(40, 35, 55, 0.7);
    --surface-hover: rgba(50, 45, 65, 0.8);
    --glass: rgba(40, 35, 55, 0.5);
    --glass-border: rgba(80, 75, 95, 0.4);
    --text: #e8e4f0;
    --text-secondary: #a8a4b8;
    --text-muted: #706c80;
    --border: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.35);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, var(--pastel-violet) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, var(--pastel-blue) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, var(--pastel-peach) 0%, transparent 50%);
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

/* ========== TYPOGRAPHY ========== */
h1, h2, h3 { font-weight: 600; line-height: 1.3; color: var(--text); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

/* ========== AUTH SCREENS ========== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--surface);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s var(--ease);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .logo h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card .logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Google Button */
.btn-google {
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: #444; border: 1px solid #ddd;
    font-weight: 600; font-size: 0.95rem; padding: 12px 20px;
    border-radius: var(--radius-md); cursor: pointer;
    transition: all 0.2s var(--ease);
}
.btn-google:hover { background: #f7f7f7; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
[data-theme="dark"] .btn-google { background: #2a2a3e; color: #e0e0e0; border-color: #444; }
[data-theme="dark"] .btn-google:hover { background: #333350; }

/* Auth Divider */
.auth-divider {
    display: flex; align-items: center; margin: 16px 0; gap: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-divider span { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

/* Onboarding Steps Indicator */
.onboarding-steps {
    display: flex; gap: 8px; justify-content: center; margin-bottom: 24px;
}
.onboarding-steps .step {
    font-size: 0.75rem; font-weight: 600; padding: 6px 14px;
    border-radius: 20px; background: var(--surface); color: var(--text-muted);
    border: 1px solid var(--border); transition: all 0.3s;
}
.onboarding-steps .step.active {
    background: var(--primary); color: #fff; border-color: var(--primary);
}
.onboarding-steps .step.done {
    background: var(--pastel-mint); color: #2d7a4f; border-color: var(--pastel-mint);
}

/* Terms Box */
.terms-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px;
}
.terms-box h3 { font-size: 0.95rem; margin-bottom: 10px; }
.terms-scroll {
    max-height: 220px; overflow-y: auto; font-size: 0.82rem;
    color: var(--text-secondary); line-height: 1.6;
    padding-right: 8px;
}
.terms-scroll::-webkit-scrollbar { width: 4px; }
.terms-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.terms-scroll p { margin-bottom: 10px; }

/* Consent Checkboxes */
.consent-checks { display: flex; flex-direction: column; gap: 10px; }
.consent-check {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 0.85rem; color: var(--text-primary); cursor: pointer;
}
.consent-check input[type="checkbox"] {
    margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary);
    flex-shrink: 0;
}
.consent-check em { font-size: 0.78rem; color: var(--text-muted); }

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    transition: all 0.25s var(--ease);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(124, 108, 175, 0.12);
    background: var(--surface-hover);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6a80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

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

/* Checkbox / Toggle */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    transition: 0.3s var(--ease);
    flex-shrink: 0;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.3s var(--ease-bounce);
    box-shadow: var(--shadow-sm);
}

.toggle.active {
    background: var(--primary);
}

.toggle.active::after {
    left: 23px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.92rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s var(--ease);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(124, 108, 175, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(124, 108, 175, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--primary-light);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #d4726a);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
}

.btn-ghost:hover { color: var(--primary); background: var(--surface); }

.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; border-radius: var(--radius-sm); }

.btn-danger {
    background: var(--danger);
    color: white;
}

/* ========== LAYOUT ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 24px 22px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand h1 {
    font-size: 1.35rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand span {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'Space Mono', monospace;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--surface);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 108, 175, 0.25);
}

.nav-item.active svg { stroke: white; }

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: 0.2s;
}

.user-pill:hover { background: var(--surface); }

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-info { overflow: hidden; }
.user-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text);
}

.header-title h2 { font-size: 1.2rem; }
.header-title p { font-size: 0.78rem; color: var(--text-muted); }

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

.vehicle-selector {
    padding: 8px 14px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6a80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    border: 1.5px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    color: var(--text-secondary);
}

.theme-toggle:hover { background: var(--surface-hover); color: var(--primary); }

/* Page wrapper */
.page-content {
    padding: 28px;
    max-width: 1400px;
    animation: fadeIn 0.35s var(--ease);
}

/* ========== CARDS ========== */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.25s var(--ease);
}

.glass-card:hover {
    box-shadow: var(--shadow-lg);
}

.glass-card.clickable:hover {
    transform: translateY(-2px);
    cursor: pointer;
}

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

.card-header h3 {
    font-size: 1rem;
}

/* ========== STAT CARDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--success), #9fd49f); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, var(--info), #8ec4e8); }
.stat-card:nth-child(5)::before { background: linear-gradient(90deg, var(--warning), #f0d48a); }
.stat-card:nth-child(6)::before { background: linear-gradient(90deg, var(--pastel-violet), var(--primary-light)); }

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    color: var(--text);
    line-height: 1.2;
}

.stat-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-grid.triple {
    grid-template-columns: 1fr 1fr 1fr;
}

/* ========== TABLES ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 12px 14px;
    border-bottom: 1.5px solid var(--border);
}

.data-table td {
    padding: 14px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--surface); }

.data-table .mono {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-primary { background: rgba(124, 108, 175, 0.12); color: var(--primary); }
.badge-success { background: rgba(122, 185, 122, 0.12); color: var(--success); }
.badge-warning { background: rgba(228, 185, 90, 0.12); color: var(--warning); }
.badge-danger { background: rgba(212, 114, 106, 0.12); color: var(--danger); }
.badge-info { background: rgba(106, 168, 212, 0.12); color: var(--info); }

/* ========== TABS ========== */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

.tab {
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    border: none;
    background: none;
}

.tab:hover { color: var(--text); background: var(--surface-hover); }

.tab.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

[data-theme="dark"] .tab.active {
    background: var(--primary);
    color: white;
}

/* ========== MODALS ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s var(--ease);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-warm);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.97);
    transition: all 0.3s var(--ease-bounce);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 1.1rem; }

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: 0.2s;
}

.modal-close:hover { background: var(--danger); color: white; }

.modal-body {
    padding: 24px 28px;
}

.modal-footer {
    padding: 16px 28px 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    background: var(--bg-warm);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    min-width: 280px;
    animation: slideRight 0.3s var(--ease-bounce);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.88rem;
    margin-bottom: 20px;
}

/* ========== CHART CONTAINER ========== */
.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
}

/* ========== REMINDER CARDS ========== */
.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.reminder-item:last-child { border: none; }

.reminder-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
}

.reminder-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ========== ACTIVITY LIST ========== */
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border: none; }

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

.activity-dot.refueling { background: var(--accent); }
.activity-dot.expense { background: var(--primary); }
.activity-dot.service { background: var(--success); }

.activity-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.activity-amount {
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

/* ========== LOADING ========== */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 40px auto;
}

.page-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

/* ========== SKELETON ========== */
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ========== VEHICLE CARDS ========== */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.vehicle-card {
    position: relative;
}

.vehicle-card .default-badge {
    position: absolute;
    top: 14px;
    right: 14px;
}

.vehicle-card h3 { margin-bottom: 4px; }

.vehicle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.vehicle-meta span {
    font-size: 0.78rem;
    padding: 4px 10px;
    background: var(--surface-hover);
    border-radius: 6px;
    color: var(--text-secondary);
}

.vehicle-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== MOBILE ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .page-content {
        padding: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .dashboard-grid, .dashboard-grid.triple {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .data-table {
        font-size: 0.82rem;
    }

    .data-table th, .data-table td {
        padding: 10px 8px;
    }

    .vehicle-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== FOOTER ===== */
.app-footer {
    margin-top: auto;
    padding: 32px 24px 24px;
}
.footer-inner {
    text-align: center;
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(124,108,175,0.06) 0%, rgba(232,146,124,0.06) 50%, rgba(106,168,212,0.06) 100%);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}
.footer-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pastel-lavender), var(--primary), var(--pastel-peach), var(--pastel-mint), var(--pastel-blue));
    background-size: 200% 100%;
    animation: shimmer 6s ease infinite;
}
.footer-brand {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.footer-brand span {
    background: linear-gradient(135deg, var(--primary), var(--pastel-peach));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-copy {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
}
.footer-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 4px;
    font-style: italic;
    letter-spacing: 0.5px;
}
[data-theme="dark"] .footer-inner {
    background: linear-gradient(135deg, rgba(124,108,175,0.1) 0%, rgba(232,146,124,0.08) 50%, rgba(106,168,212,0.1) 100%);
}
/* ========== ADMIN PANEL ========== */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.admin-stat-card { background: var(--surface); padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.admin-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.admin-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }

.badge-role-admin { background: #fee2e2; color: #991b1b; }
.badge-role-user { background: #e0e7ff; color: #3730a3; }
[data-theme="dark"] .badge-role-admin { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .badge-role-user { background: #1e1b4b; color: #c7d2fe; }

.activity-log { max-height: 500px; overflow-y: auto; }
.log-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.log-item:last-child { border: none; }
.log-time { color: var(--text-muted); font-family: 'Space Mono', monospace; width: 140px; flex-shrink: 0; }
.log-body { flex: 1; }
.log-action { font-weight: 600; color: var(--primary); }
.admin-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
@media (max-width: 1024px) { .admin-grid { grid-template-columns: 1fr; } }
