:root {
    --primary: #1a1a2e;
    --accent: #e94560;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #fff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--gray-50); color: var(--gray-900); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-sm { gap: 0.5rem; } .gap-md { gap: 1rem; }
.mt-md { margin-top: 1rem; } .mb-md { margin-bottom: 1rem; } .mb-lg { margin-bottom: 1.5rem; }
.text-center { text-align: center; } .text-muted { color: var(--gray-500); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.25rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.875rem; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: #d63d56; transform: translateY(-1px); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #059669; }
.btn-outline { background: transparent; border: 2px solid var(--gray-200); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--gray-300); background: var(--gray-50); }
.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--gray-700); font-size: 0.875rem; }
.form-control { width: 100%; padding: 0.75rem 1rem; border: 2px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; background: var(--white); }
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233,69,96,0.1); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Cards */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--gray-100); font-weight: 600; color: var(--gray-800); }
.card-body { padding: 1.5rem; }

/* Alerts */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.75rem; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #ecfdf5; color: #059669; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-info { background: #eff6ff; color: #2563eb; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }
.badge-error { background: #fef2f2; color: #dc2626; }

/* Navbar */
.navbar { background: var(--white); padding: 1rem 0; box-shadow: 0 1px 3px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.navbar-brand { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.navbar-brand span { color: var(--accent); }
.navbar-nav { display: flex; gap: 2rem; list-style: none; }
.navbar-nav a { color: var(--gray-600); font-weight: 500; transition: color 0.2s; font-size: 0.9rem; }
.navbar-nav a:hover, .navbar-nav a.active { color: var(--gray-900); }
.user-menu { display: flex; align-items: center; gap: 0.75rem; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gray-800); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 0.5rem; }

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .navbar-nav { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        right: 0; 
        background: var(--white); 
        flex-direction: column; 
        gap: 0;
        padding: 1rem 0;
        box-shadow: var(--shadow);
    }
    .navbar-nav.open { display: flex; }
    .navbar-nav li { border-bottom: 1px solid var(--gray-100); }
    .navbar-nav a { display: block; padding: 0.75rem 1.5rem; }
    .user-menu .user-name { display: none; }
    .navbar .container { flex-wrap: wrap; }
}

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%); color: var(--white); padding: 2rem; }
.hero-content { max-width: 600px; }
.hero-title { font-size: 3rem; font-weight: 700; line-height: 1.2; margin-bottom: 1.5rem; }
.hero-title span { color: var(--accent); }
.hero-subtitle { font-size: 1.1rem; opacity: 0.7; margin-bottom: 2rem; }
@media (max-width: 768px) { .hero-title { font-size: 2rem; } }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gray-900); padding: 2rem; }
.login-card { background: var(--white); border-radius: var(--radius); padding: 2.5rem; width: 100%; max-width: 400px; }
.login-logo { text-align: center; margin-bottom: 2rem; font-size: 1.75rem; font-weight: 700; }
.login-logo span { color: var(--accent); }

/* Page Header */
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); }
.page-subtitle { color: var(--gray-500); font-size: 0.95rem; }

/* Filters */
.filters { background: var(--white); padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; box-shadow: var(--shadow); }
.filter-group { flex: 1; min-width: 120px; }
.filter-group label { display: block; font-size: 0.7rem; font-weight: 600; color: var(--gray-500); margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.5px; }
.filter-select { width: 100%; padding: 0.5rem 0.75rem; border: 2px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 0.8rem; background: var(--white); cursor: pointer; }
.filter-select:focus { outline: none; border-color: var(--accent); }
@media (max-width: 600px) { 
    .filters { gap: 0.5rem; padding: 0.75rem; }
    .filter-group { flex: 1 1 30%; min-width: 0; }
    .filter-group label { font-size: 0.6rem; margin-bottom: 0.25rem; }
    .filter-select { padding: 0.4rem 0.5rem; font-size: 0.75rem; }
}

/* Car Grid */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
@media (max-width: 400px) { .car-grid { grid-template-columns: 1fr; } }

/* Car Card */
.car-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s, box-shadow 0.3s; }
.car-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Car Card Gallery */
.car-gallery { position: relative; background: var(--gray-100); }
.car-gallery-main { aspect-ratio: 16/10; overflow: hidden; cursor: pointer; }
.car-gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.car-card:hover .car-gallery-main img { transform: scale(1.03); }
.car-gallery-thumbs { display: flex; gap: 4px; padding: 4px; background: var(--gray-800); }
.car-gallery-thumb { flex: 1; max-width: 60px; aspect-ratio: 16/10; overflow: hidden; cursor: pointer; opacity: 0.5; transition: opacity 0.2s; border-radius: 4px; }
.car-gallery-thumb:hover, .car-gallery-thumb.active { opacity: 1; }
.car-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.car-gallery-badges { position: absolute; top: 1rem; left: 1rem; right: 1rem; display: flex; justify-content: space-between; pointer-events: none; }
.car-status { padding: 0.375rem 0.875rem; border-radius: 50px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.car-status.available { background: var(--success); color: var(--white); }
.car-status.reserved { background: var(--warning); color: var(--gray-900); }
.car-status.sold { background: var(--gray-600); color: var(--white); }
.car-timer { background: rgba(0,0,0,0.8); color: var(--white); padding: 0.375rem 0.75rem; border-radius: 50px; font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.car-photo-count { position: absolute; bottom: 52px; right: 8px; background: rgba(0,0,0,0.7); color: var(--white); padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.7rem; display: flex; align-items: center; gap: 0.25rem; }

/* Car Card Body */
.car-card-body { padding: 1.25rem; }
.car-card-title { font-size: 1.1rem; font-weight: 600; color: var(--gray-900); margin-bottom: 1rem; line-height: 1.3; }
.car-card-title a { color: inherit; }
.car-card-title a:hover { color: var(--accent); }

/* Specs - Clean monochrome style */
.specs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.spec { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 50px; font-size: 0.8rem; color: var(--gray-700); font-weight: 500; }
.spec svg { width: 14px; height: 14px; color: var(--gray-400); }

/* Price */
.car-price { font-size: 1.25rem; font-weight: 700; color: var(--gray-900); }

/* Car Card Footer */
.car-card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.car-meta { font-size: 0.8rem; color: var(--gray-400); }
.btn-reserve { background: var(--accent); color: var(--white); border: none; padding: 0.625rem 1.25rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.btn-reserve:hover { background: #d63d56; transform: translateY(-1px); }

/* Car Detail Page */
.car-detail { display: grid; grid-template-columns: 1fr 400px; gap: 2rem; padding: 2rem 0; }
@media (max-width: 900px) { .car-detail { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-main { aspect-ratio: 16/10; background: var(--gray-100); position: relative; overflow: hidden; cursor: pointer; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; background: var(--white); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); transition: transform 0.2s; }
.gallery-nav:hover { transform: translateY(-50%) scale(1.05); }
.gallery-nav.prev { left: 1rem; }
.gallery-nav.next { right: 1rem; }
.gallery-counter { position: absolute; bottom: 1rem; right: 1rem; background: rgba(0,0,0,0.7); color: white; padding: 0.375rem 0.75rem; border-radius: 50px; font-size: 0.8rem; font-weight: 500; }
.gallery-thumbs { display: flex; gap: 0.5rem; padding: 1rem; overflow-x: auto; background: var(--gray-50); }
.gallery-thumb { width: 80px; height: 60px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; opacity: 0.6; border: 3px solid transparent; transition: all 0.2s; flex-shrink: 0; }
.gallery-thumb:hover, .gallery-thumb.active { opacity: 1; border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Car Info Panel */
.car-info { background: var(--white); border-radius: var(--radius); padding: 1.5rem; height: fit-content; position: sticky; top: 80px; box-shadow: var(--shadow); }
.car-info .car-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--gray-900); }
.car-info .price { font-size: 2rem; font-weight: 700; color: var(--accent); margin-bottom: 1.5rem; }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); margin-bottom: 1.5rem; }
.spec-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--gray-50); border-radius: var(--radius-sm); }
.spec-icon-box { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--gray-800); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.spec-icon-box svg { width: 20px; height: 20px; color: var(--white); }
.spec-label { font-size: 0.7rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; }
.spec-value { font-weight: 600; color: var(--gray-900); }
.reservation-box { background: #fffbeb; border: 1px solid #fde68a; padding: 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; text-align: center; }
.reservation-timer { font-size: 1.5rem; font-weight: 700; color: var(--warning); font-variant-numeric: tabular-nums; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; backdrop-filter: blur(4px); }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; animation: modalIn 0.2s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 1.1rem; color: var(--gray-900); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--gray-400); line-height: 1; padding: 0.25rem; }
.modal-close:hover { color: var(--gray-600); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* Confirmation Modal Special */
.confirm-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(233,69,96,0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }
.confirm-icon svg { width: 32px; height: 32px; color: var(--accent); }
.confirm-title { font-size: 1.25rem; font-weight: 600; text-align: center; margin-bottom: 0.75rem; color: var(--gray-900); }
.confirm-text { text-align: center; color: var(--gray-600); margin-bottom: 1.5rem; line-height: 1.6; }
.confirm-note { background: var(--gray-50); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1.5rem; }
.confirm-note p { font-size: 0.875rem; color: var(--gray-600); margin: 0; }
.confirm-note strong { color: var(--gray-800); }

/* Admin Layout */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--gray-900); color: var(--white); padding: 1.5rem 0; flex-shrink: 0; }
.sidebar-logo { padding: 0 1.5rem 1.5rem; font-size: 1.5rem; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-logo span { color: var(--accent); }
.sidebar-nav { padding: 1rem 0; }
.sidebar-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1.5rem; color: rgba(255,255,255,0.6); transition: all 0.2s; font-size: 0.9rem; }
.sidebar-link:hover, .sidebar-link.active { background: rgba(255,255,255,0.1); color: var(--white); }
.main-content { flex: 1; padding: 2rem; background: var(--gray-50); overflow-x: auto; }

/* Mobile Menu */
.mobile-menu-btn { display: none; position: fixed; top: 1rem; left: 1rem; z-index: 1001; width: 44px; height: 44px; background: var(--gray-900); color: white; border: none; border-radius: var(--radius-sm); font-size: 1.5rem; cursor: pointer; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }

@media (max-width: 900px) { 
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
    .sidebar { position: fixed; left: -260px; height: 100vh; z-index: 1000; transition: left 0.3s; } 
    .sidebar.open { left: 0; } 
    .sidebar-overlay.open { display: block; }
    .main-content { margin-left: 0; padding: 1rem; padding-top: 4rem; } 
}

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
@media (max-width: 1000px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--gray-900); }
.stat-label { color: var(--gray-500); font-size: 0.875rem; }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.info .stat-value { color: #2563eb; }

/* Status Tabs */
.status-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.status-tab { padding: 0.625rem 1.25rem; background: var(--white); border: 2px solid var(--gray-200); border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: var(--gray-600); cursor: pointer; transition: all 0.2s; text-decoration: none; }
.status-tab:hover { border-color: var(--gray-300); }
.status-tab.active { background: var(--gray-900); border-color: var(--gray-900); color: var(--white); }
.status-tab .count { opacity: 0.6; margin-left: 0.25rem; }

/* Table */
.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 600px; }
.table th, .table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--gray-100); }
.table th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); background: var(--gray-50); font-weight: 600; }
.table img { width: 60px; height: 45px; object-fit: cover; border-radius: 4px; }
.table tbody tr:hover { background: var(--gray-50); }

/* Photo Upload */
.photo-upload-zone { border: 2px dashed var(--gray-300); border-radius: var(--radius); padding: 2rem; text-align: center; cursor: pointer; transition: all 0.2s; color: var(--gray-500); }
.photo-upload-zone:hover { border-color: var(--accent); background: rgba(233,69,96,0.02); }
.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 1rem; margin-top: 1rem; }
.photo-preview { position: relative; aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview .remove { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; background: var(--error); color: var(--white); border: none; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }
.photo-preview.featured { border: 3px solid var(--accent); }
.photo-preview .featured-badge { position: absolute; bottom: 4px; left: 4px; background: var(--accent); color: var(--white); padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; font-weight: 600; }

/* Profile */
.profile-card { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--gray-800); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 600; }
.profile-name { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.profile-stats { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
@media (max-width: 500px) { .profile-card { flex-direction: column; text-align: center; } .profile-stats { justify-content: center; } }

/* Empty State */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state h3 { margin-bottom: 0.5rem; color: var(--gray-700); }
.empty-state p { color: var(--gray-500); }

/* Toast */
.toast { position: fixed; bottom: 2rem; right: 2rem; padding: 1rem 1.5rem; background: var(--gray-900); color: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 9999; animation: slideIn 0.3s ease-out; font-size: 0.9rem; }
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 2000; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 90vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: white; font-size: 2rem; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: white; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
