/* NextRise Cars - Vehicle Rental & Sales System
   Modern Light Theme with Teal Accents
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Syne:wght@700;800&display=swap');

:root {
    /* Color Palette - Fresh Light Theme */
    --primary: #FFFFFF;
    --primary-light: #F8FAFB;
    --secondary: #E8EEF2;
    
    /* Accent Colors - Indigo Blue (NextRise Cars Identity) */
    --accent: #4F46E5;
    --accent-light: #6366F1;
    --accent-hover: #4338CA;
    --accent-glow: rgba(79, 70, 229, 0.12);
    --accent-subtle: rgba(79, 70, 229, 0.06);
    
    --accent-warm: #F59E0B;
    --accent-warm-light: #FBBF24;
    --accent-warm-glow: rgba(245, 158, 11, 0.12);
    
    /* Status Colors */
    --success: #22C55E;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #EAB308;
    --warning-bg: rgba(234, 179, 8, 0.1);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3B82F6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --neutral: #64748B;
    --neutral-bg: rgba(100, 116, 139, 0.1);
    --purple: #8B5CF6;
    --purple-bg: rgba(139, 92, 246, 0.1);
    
    /* Text */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-light: #CBD5E1;
    
    /* Backgrounds */
    --bg-body: #F1F5F9;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8FAFC;
    --bg-input: #FFFFFF;
    --bg-sidebar: #FAFBFC;
    
    /* Borders */
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --border-focus: var(--accent);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(13, 148, 136, 0.15);
    
    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    color: var(--text-secondary);
}

/* ==================== Layout ==================== */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==================== Sidebar ==================== */

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-slow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    flex-wrap: nowrap;
    min-width: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    background: var(--accent-warm-glow);
    color: var(--accent-warm);
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
    border-color: rgba(13, 148, 136, 0.2);
    font-weight: 600;
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

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

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

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    transition: background var(--transition);
    cursor: pointer;
}

.user-info:hover {
    background: var(--bg-body);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-glow), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

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

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

/* ==================== Main Content ==================== */

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px 24px 24px;
    min-height: 100vh;
    transition: margin-left var(--transition-slow);
    overflow-x: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-left {
    flex: 1;
    min-width: 200px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--accent);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

/* ==================== Stats Cards ==================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    transition: all 0.25s ease;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--stat-color, var(--accent));
    border-radius: 4px 0 0 4px;
}

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

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--stat-bg, var(--accent-glow));
    color: var(--stat-color, var(--accent));
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
}

.stat-card.primary { --stat-color: var(--accent); --stat-bg: var(--accent-glow); }
.stat-card.success { --stat-color: var(--success); --stat-bg: var(--success-bg); }
.stat-card.warning { --stat-color: var(--warning); --stat-bg: var(--warning-bg); }
.stat-card.danger { --stat-color: var(--danger); --stat-bg: var(--danger-bg); }
.stat-card.info { --stat-color: var(--info); --stat-bg: var(--info-bg); }
.stat-card.warm { --stat-color: var(--accent-warm); --stat-bg: var(--accent-warm-glow); }
.stat-card.purple { --stat-color: var(--purple); --stat-bg: var(--purple-bg); }

/* ==================== Dashboard Layout ==================== */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--highlight-color, var(--accent));
}

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

.highlight-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--highlight-bg, var(--accent-glow));
    color: var(--highlight-color, var(--accent));
    flex-shrink: 0;
}

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

.highlight-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.highlight-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 2px;
}

.highlight-action {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
    flex-shrink: 0;
}

.highlight-action:hover {
    background: var(--highlight-bg, var(--accent-glow));
    color: var(--highlight-color, var(--accent));
}

.highlight-card.danger { 
    --highlight-color: var(--danger); 
    --highlight-bg: var(--danger-bg); 
}

.highlight-card.warm { 
    --highlight-color: var(--accent-warm); 
    --highlight-bg: var(--accent-warm-glow); 
}

.highlight-card.success { 
    --highlight-color: var(--success); 
    --highlight-bg: var(--success-bg); 
}

.highlight-card.info { 
    --highlight-color: var(--info); 
    --highlight-bg: var(--info-bg); 
}

@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-highlights {
        grid-template-columns: 1fr;
    }
    
    .highlight-card {
        padding: 16px 20px;
    }
    
    .highlight-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .highlight-value {
        font-size: 1.5rem;
    }
}

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

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

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

/* ==================== Cards ==================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.card-title i {
    color: var(--accent);
}

/* ==================== Buttons ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    color: var(--text-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border);
}

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

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

.btn-success:hover {
    background: #16A34A;
}

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

.btn-danger:hover {
    background: #DC2626;
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-warm-light));
    color: white;
}

.btn-warning:hover {
    transform: translateY(-1px);
}

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

.btn-ghost:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius);
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled,
.btn.disabled {
    background: #9CA3AF !important;
    color: #F3F4F6 !important;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none !important;
    box-shadow: none !important;
}

/* ==================== Form Elements ==================== */

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

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-label.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 3px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-input-lg {
    padding: 16px 18px;
    font-size: 1.125rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Input with icon */
.input-group {
    position: relative;
}

.input-group .form-input {
    padding-left: 44px;
}

.input-group-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.form-check-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* ==================== Tables ==================== */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-body);
    white-space: nowrap;
}

.data-table tr:hover {
    background: var(--bg-card-hover);
}

.data-table tr {
    transition: background var(--transition-fast);
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

/* ==================== Badges ==================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge-primary { background: var(--accent-glow); color: var(--accent); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-warm { background: var(--accent-warm-glow); color: var(--accent-warm); }

/* ==================== Modal ==================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
    padding: 16px;
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-xl);
}

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

.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }
.modal-sm { max-width: 400px; }

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

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.modal-title i {
    color: var(--accent);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-body);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

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

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-body);
    flex-wrap: wrap;
}

/* ==================== Tabs ==================== */

.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-body);
    padding: 4px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

/* ==================== Loading & Empty States ==================== */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

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

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

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 16px;
    opacity: 0.4;
    display: block;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ==================== Toast Notifications ==================== */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    min-width: 260px;
    max-width: 360px;
    color: var(--text-primary);
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== Vehicle Cards ==================== */

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.vehicle-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.vehicle-card-image {
    height: 140px;
    background: linear-gradient(135deg, var(--bg-body), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
    position: relative;
}

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

.vehicle-card-status {
    position: absolute;
    top: 10px;
    right: 10px;
}

.vehicle-card-body {
    padding: 16px;
}

.vehicle-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.vehicle-card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.vehicle-card-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.vehicle-card-info span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.vehicle-card-info i {
    color: var(--accent);
    font-size: 12px;
}

.vehicle-card-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.vehicle-price-item {
    text-align: center;
}

.vehicle-price-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.vehicle-price-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--accent);
}

.vehicle-price-value.sale {
    color: var(--accent-warm);
}

/* ==================== Login Page ==================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-body) 0%, var(--secondary) 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
    padding: 36px;
    border: 1px solid var(--border);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.375rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 0.9rem;
}

/* ==================== Mobile Menu ==================== */

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.mobile-overlay.active {
    opacity: 1;
}

/* ==================== Responsive ==================== */

@media (max-width: 1024px) {
    .main-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row,
    .form-row-3,
    .form-row-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-overlay {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 70px 16px 20px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-actions {
        justify-content: stretch;
    }
    
    .page-actions .btn {
        flex: 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .card {
        padding: 16px;
    }
    
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    
    .modal {
        max-width: 100%;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-height: 85vh;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
    }
    
    .toast {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 14px 16px;
    }
    
    .stat-header {
        margin-bottom: 0;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .login-card {
        padding: 28px 20px;
    }
}

/* ==================== Scrollbar ==================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

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

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

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
