:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary: #7209b7;
    --success: #2ec4b6;
    --warning: #ffb703;
    --danger: #ef233c;
    --dark: #1b263b;
    --text-main: #1b263b;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --bg-body: #f3f6f9; 
    --bg-card: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

/* Dark mode - support both html and body for instant loading */
html.dark-mode, body.dark-mode {
    --bg-body: #1a1b26;
    --bg-card: #242536;
    --dark: #e0e0e0;
    --text-main: #e0e0e0;
    --white: #242536; /* Defines card backgrounds mostly */
    --light: #2a2b3d;
    --gray: #a0a0a0;
    --gray-light: #3a3b4c;
    --primary-light: #3a3b4c;
}

html.dark-mode body, body.dark-mode {
    background-color: var(--bg-body);
    color: var(--text-main);
}

html.dark-mode .sidebar, body.dark-mode .sidebar {
    background: linear-gradient(135deg, #101014 0%, #1a1b26 100%);
    border-right: 1px solid #2a2b3d;
    color: #e0e0e0; /* Force light text */
}

body.dark-mode .nav-link {
    color: rgba(255,255,255,0.7);
}

body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active {
    background: rgba(67, 97, 238, 0.2); /* Primary color with opacity */
    color: #ffffff;
    border-left: 3px solid var(--primary);
}

body.dark-mode .user-info {
    border-top: 1px solid rgba(255,255,255,0.05);
}

body.dark-mode .header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--gray-light);
}

body.dark-mode .page-title h2 { color: var(--text-main); }
body.dark-mode .form-label { color: var(--text-main); }
body.dark-mode .vehicle-card { background-color: var(--bg-card); border: 1px solid var(--gray-light); }
body.dark-mode .stat-card { background-color: var(--bg-card); }
body.dark-mode .form-container { background-color: var(--bg-card); }
body.dark-mode .card-header-premium { color: var(--text-main); }
body.dark-mode .vehicle-identity h3 { color: var(--text-main); }
body.dark-mode .stat-value { color: var(--text-main); }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ============================== */
/* Sidebar - Modern Design       */
/* ============================== */
.sidebar {
    width: 280px;
    background: #1a1a2e;
    color: var(--white);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Brand Section */
.brand {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.brand i {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.nav-links {
    list-style: none;
    flex: 1;
    position: relative;
    z-index: 1;
}

.nav-section-label {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.nav-item {
    margin-bottom: 0.35rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.25s ease;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link i {
    width: 22px;
    text-align: center;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(4px);
}

.nav-link:hover i {
    color: #a5b4fc;
}

/* Logout Button Styling */
.nav-link.logout {
    color: rgba(255, 255, 255, 0.65);
    margin-top: 0.5rem;
}

.nav-link.logout i {
    color: #f87171;
}

.nav-link.logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.nav-link.logout:hover i {
    color: #ef4444;
}

.nav-link:hover i {
    color: #a5b4fc;
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0.05) 100%);
    color: #ffffff;
    border-left: 3px solid #6366f1;
    margin-left: -3px;
    padding-left: 19px;
}

.nav-link.active i {
    color: #818cf8;
}

/* User Profile Section */
.user-info {
    padding: 1.25rem;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    z-index: 10;
}

.page-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.page-title p {
    color: var(--gray);
    font-size: 0.875rem;
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--gray-light);
    border-radius: 50px;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* Content Area */
.content-scroll {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Dashboard Overview */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card:active {
    transform: scale(0.98);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.bg-primary-light { background: #e0e7ff; color: var(--primary); }
.bg-success-light { background: #d3f9d8; color: var(--success); }
.bg-warning-light { background: #fff3cd; color: var(--warning); }
.bg-danger-light { background: #ffe3e3; color: var(--danger); }

/* Vehicle List */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.vehicle-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.vehicle-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card-header {
    padding: 1.5rem;
    background: var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vehicle-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.plate-badge {
    background: var(--white);
    border: 2px solid var(--dark);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 1px;
}

.card-body {
    padding: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.label { color: var(--gray); }
.value { font-weight: 600; }

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 4px;
}

.card-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; margin-top: 1rem; }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline { background: transparent; border: 1px solid var(--gray); color: var(--gray); }
.btn-outline:hover { border-color: var(--dark); color: var(--dark); }

.btn-danger-soft { background: #fee2e2; color: var(--danger); }
.btn-danger-soft:hover { background: #fecaca; }

/* Forms */
.form-container {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

/* Utils */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* History Table */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.95rem;
}

th {
    background: var(--light);
    font-weight: 600;
    color: var(--gray);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    margin-top: 10px;
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Premium Form Styles */
.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 2rem 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title:first-child { margin-top: 0; }

.form-section-title:first-child { margin-top: 0; }

.maintenance-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.maintenance-pill {
    cursor: pointer;
}

.maintenance-pill input {
    display: none;
}

.maintenance-pill span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--gray-light);
    border-radius: 50px;
    background: var(--white);
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.maintenance-pill span:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.maintenance-pill input:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(67, 97, 238, 0.2);
}

body.dark-mode .maintenance-pill span {
    background: #2a2b3d;
    border-color: #3a3b4c;
    color: #a0a0a0;
}

body.dark-mode .maintenance-pill span:hover {
    background: #32334a;
}

body.dark-mode .maintenance-pill input:checked + span {
    background: var(--primary);
    color: var(--white);
}

.maintenance-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.maintenance-pill {
    cursor: pointer;
}

.maintenance-pill input {
    display: none;
}

.maintenance-pill span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--gray-light);
    border-radius: 50px;
    background: var(--white);
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.maintenance-pill span:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.maintenance-pill input:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(67, 97, 238, 0.2);
}

body.dark-mode .maintenance-pill span {
    background: #2a2b3d;
    border-color: #3a3b4c;
    color: #a0a0a0;
}

body.dark-mode .maintenance-pill span:hover {
    background: #32334a;
}

body.dark-mode .maintenance-pill input:checked + span {
    background: var(--primary);
    color: var(--white);
}

@media (max-width: 768px) {
    body { flex-direction: column; height: auto; min-height: 100vh; }
    .sidebar { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; padding: 1rem; }
    .nav-links { display: none; }
    .main-content { height: auto; }
    .form-row { grid-template-columns: 1fr; }
    .content-scroll { padding: 1rem; }
}

/* Validation Error */
.validation-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: 500;
}

/* Login Styles */
body[data-page="login"] {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f6f9 0%, #e0e7ff 100%);
}

.login-container {
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

/* Grid Card Design (New Reference) */
.vehicle-card.grid-card {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 1rem;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.car-icon-box {
    width: 40px;
    height: 40px;
    background: #eef2ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4361ee;
    font-size: 1.2rem;
}

.header-info { display: flex; flex-direction: column; }
.plate-text { font-weight: 800; font-size: 1.1rem; color: #111827; }
.model-text { font-size: 0.9rem; color: #6b7280; font-weight: 500; }

.header-actions { display: flex; gap: 8px; }

.btn-icon-soft {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-icon-soft:hover { background: #e5e7eb; }
.btn-icon-soft.blue:hover { background: #e0e7ff; color: #4361ee; }
.btn-icon-soft.red:hover { background: #fee2e2; color: #ef233c; }

.grid-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.grid-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.grid-item.full-width { grid-column: span 2; }

.icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.icon-box.dark { background: #1f2937; color: white; }
.icon-box.gray { background: #e5e7eb; color: #374151; }

.item-content { display: flex; flex-direction: column; gap: 2px; }
.item-content .label { font-size: 0.75rem; color: #6b7280; font-weight: 500; }
.item-content .value { font-size: 0.95rem; font-weight: 600; color: #111827; }

.grid-parts-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.grid-pill {
    background: #e5e7eb;
    color: #374151;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Dark mode overrides for grid card */
body.dark-mode .vehicle-card.grid-card {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .grid-header { border-color: #374151; }
body.dark-mode .plate-text, 
body.dark-mode .item-content .value { color: #f3f4f6; }
body.dark-mode .model-text, 
body.dark-mode .item-content .label { color: #9ca3af; }

body.dark-mode .btn-icon-soft { background: #374151; color: #9ca3af; }
body.dark-mode .btn-icon-soft:hover { background: #4b5563; color: white; }

body.dark-mode .icon-box.gray { background: #374151; color: #d1d5db; }
body.dark-mode .grid-pill { background: #374151; color: #d1d5db; }
body.dark-mode .car-icon-box { background: #312e81; color: #818cf8; }

/* ============================== */
/* Modern Card Design (Enhanced) */
/* ============================== */
.vehicle-card.modern-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vehicle-card.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(67, 97, 238, 0.15);
    border-color: #c7d2fe;
}

/* Modern Header */
.modern-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 1.25rem;
    color: white;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.plate-badge-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plate-badge-modern i {
    font-size: 0.9rem;
    opacity: 0.9;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.action-btn.view {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}
.action-btn.view:hover {
    background: #6366f1;
    color: white;
}

.action-btn.edit {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}
.action-btn.edit:hover {
    background: #22c55e;
    color: white;
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
.action-btn.delete:hover {
    background: #ef4444;
    color: white;
}

.vehicle-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.vin-display {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vin-display i {
    font-size: 0.8rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.25rem;
}

.stat-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.stat-icon.km {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: white;
}

.stat-icon.cost {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    color: white;
}

.stat-icon.date {
    background: linear-gradient(135deg, #7c2d12 0%, #f97316 100%);
    color: white;
}

.stat-icon.parts {
    background: linear-gradient(135deg, #581c87 0%, #a855f7 100%);
    color: white;
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.stat-label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.parts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.part-pill {
    display: inline-block;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
}

.part-more {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
    margin-left: 4px;
}

.no-parts {
    color: #94a3b8;
    font-size: 0.8rem;
    font-style: italic;
}

/* Dark Mode for Modern Card */
body.dark-mode .vehicle-card.modern-card {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .vehicle-card.modern-card:hover {
    border-color: #6366f1;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
}

body.dark-mode .modern-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body.dark-mode .stat-value { color: #f1f5f9; }
body.dark-mode .stat-label { color: #94a3b8; }

body.dark-mode .part-pill {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    color: #e2e8f0;
    border-color: #4b5563;
}

body.dark-mode .no-parts { color: #64748b; }

/* ============================== */
/* Add Vehicle Page - Modern Form */
/* ============================== */
.add-vehicle-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.form-section {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.section-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
}

.section-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
}

.section-icon.orange {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
}

.section-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
}

.section-icon.teal {
    background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
    color: white;
}

.section-title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.section-title p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.section-body {
    padding: 1.5rem;
}

.form-row.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.form-label i {
    color: #6b7280;
    font-size: 0.85rem;
}

.modern-input {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.modern-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.modern-input::placeholder {
    color: #94a3b8;
}

/* Parts Grid */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.part-card {
    cursor: pointer;
}

.part-card input {
    display: none;
}

.part-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.2s ease;
    text-align: center;
}

.part-content i {
    font-size: 1.5rem;
    color: #64748b;
    transition: all 0.2s ease;
}

.part-content span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.part-card:hover .part-content {
    border-color: #c7d2fe;
    background: #f8fafc;
}

.part-card input:checked + .part-content {
    border-color: #6366f1;
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.part-card input:checked + .part-content i {
    color: #6366f1;
}

.part-card input:checked + .part-content span {
    color: #4338ca;
}

/* Submit Button */
.btn-submit-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    margin-top: 1rem;
}

.btn-submit-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.btn-submit-modern:active {
    transform: translateY(0);
}

.btn-submit-modern i {
    font-size: 1.2rem;
}

/* Dark Mode for Add Vehicle */
body.dark-mode .form-section {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

body.dark-mode .section-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

body.dark-mode .section-title h3 { color: #f1f5f9; }
body.dark-mode .section-title p { color: #94a3b8; }

body.dark-mode .form-label { color: #e2e8f0; }
body.dark-mode .form-label i { color: #94a3b8; }

body.dark-mode .modern-input {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .modern-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.15);
}

body.dark-mode .modern-input::placeholder { color: #64748b; }

body.dark-mode .part-content {
    background: #1e293b;
    border-color: #475569;
}

body.dark-mode .part-content i { color: #94a3b8; }
body.dark-mode .part-content span { color: #cbd5e1; }

body.dark-mode .part-card:hover .part-content {
    border-color: #6366f1;
    background: #334155;
}

body.dark-mode .part-card input:checked + .part-content {
    background: linear-gradient(145deg, #312e81 0%, #3730a3 100%);
    border-color: #818cf8;
}

body.dark-mode .part-card input:checked + .part-content i { color: #a5b4fc; }
body.dark-mode .part-card input:checked + .part-content span { color: #e0e7ff; }

body.dark-mode .btn-submit-modern {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

body.dark-mode .btn-submit-modern:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .parts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row.three-col {
        grid-template-columns: 1fr;
    }
}

/* ============================== */
/* Dashboard Page - Modern Design */
/* ============================== */

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.25);
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-content h1 {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin: 0;
}

.welcome-illustration {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-row.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.dashboard-stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.dashboard-stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.dashboard-stat-card.blue::before { background: linear-gradient(180deg, #3b82f6, #6366f1); }
.dashboard-stat-card.orange::before { background: linear-gradient(180deg, #f97316, #fb923c); }
.dashboard-stat-card.green::before { background: linear-gradient(180deg, #10b981, #34d399); }

.dashboard-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.dashboard-stat-card.blue .stat-card-icon {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #3b82f6;
}

.dashboard-stat-card.orange .stat-card-icon {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #f97316;
}

.dashboard-stat-card.green .stat-card-icon {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #10b981;
}

.stat-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.stat-title {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.stat-card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.2s;
}

.dashboard-stat-card:hover .stat-card-arrow {
    background: #6366f1;
    color: white;
}

/* Quick Actions */
.quick-actions-section {
    margin-top: 1rem;
}

.section-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-heading i {
    color: #f59e0b;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.quick-action-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quick-action-card:hover {
    background: #f8fafc;
    border-color: #c7d2fe;
    transform: translateX(4px);
}

.qa-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.qa-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
}

.qa-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
}

.qa-icon.teal {
    background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
    color: white;
}

.qa-info {
    display: flex;
    flex-direction: column;
}

.qa-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.qa-desc {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Dark Mode for Dashboard */
body.dark-mode .welcome-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 50%, #7c3aed 100%);
}

body.dark-mode .dashboard-stat-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .stat-number { color: #f1f5f9; }
body.dark-mode .stat-title { color: #94a3b8; }

body.dark-mode .dashboard-stat-card.blue .stat-card-icon {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    color: #60a5fa;
}

body.dark-mode .dashboard-stat-card.orange .stat-card-icon {
    background: linear-gradient(135deg, #431407 0%, #7c2d12 100%);
    color: #fb923c;
}

body.dark-mode .dashboard-stat-card.green .stat-card-icon {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    color: #34d399;
}

body.dark-mode .stat-card-arrow {
    background: #334155;
    color: #64748b;
}

body.dark-mode .dashboard-stat-card:hover .stat-card-arrow {
    background: #818cf8;
}

body.dark-mode .section-heading { color: #cbd5e1; }

body.dark-mode .quick-action-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .quick-action-card:hover {
    background: #334155;
    border-color: #6366f1;
}

body.dark-mode .qa-title { color: #f1f5f9; }
body.dark-mode .qa-desc { color: #64748b; }

/* Responsive */
@media (max-width: 768px) {
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .welcome-illustration {
        display: none;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================== */
/* Settings Page - Modern Design  */
/* ============================== */
.settings-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.settings-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.settings-card.danger {
    border-color: #fecaca;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.settings-card.danger .settings-card-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

.settings-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.settings-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
}

.settings-icon.orange {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
}

.settings-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
}

.settings-icon.red {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
}

.settings-header-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.settings-header-info p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.settings-card.danger .settings-header-info h3 {
    color: #dc2626;
}

.settings-card-body {
    padding: 1.5rem;
}

/* Settings Buttons */
.btn-settings-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-settings-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-settings-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: #6366f1;
    border: 2px solid #c7d2fe;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-settings-outline:hover {
    background: #eef2ff;
    border-color: #6366f1;
}

.btn-danger-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* Preference Items */
.preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.preference-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.preference-info > i {
    font-size: 1.25rem;
    color: #64748b;
    width: 24px;
    text-align: center;
}

.pref-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.pref-desc {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Toggle Switch */
.toggle-switch {
    width: 52px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 28px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-switch .toggle-circle {
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Dark mode active state */
body.dark-mode .toggle-switch {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
}

body.dark-mode .toggle-switch .toggle-circle {
    left: 27px;
}

/* Dark Mode for Settings */
body.dark-mode .settings-card {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

body.dark-mode .settings-card-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
}

body.dark-mode .settings-header-info h3 { color: #f1f5f9; }
body.dark-mode .settings-header-info p { color: #94a3b8; }

body.dark-mode .pref-title { color: #f1f5f9; }
body.dark-mode .pref-desc { color: #64748b; }
body.dark-mode .preference-info > i { color: #94a3b8; }

body.dark-mode .btn-settings-outline {
    color: #a5b4fc;
    border-color: #4338ca;
}

body.dark-mode .btn-settings-outline:hover {
    background: #312e81;
}

body.dark-mode .settings-card.danger {
    border-color: #7f1d1d;
}

body.dark-mode .settings-card.danger .settings-card-header {
    background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
}

body.dark-mode .settings-card.danger .settings-header-info h3 {
    color: #fca5a5;
}

/* Disabled input styling */
.modern-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

body.dark-mode .modern-input:disabled {
    background: #0f172a;
    color: #64748b;
    border-color: #334155;
}
