@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --surface: rgba(30, 41, 59, 0.7);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.39);
}

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

.btn-secondary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Layouts */
.responsive-grid,
.responsive-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.responsive-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.9);
    border-right: 1px solid var(--surface-border);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    position: relative;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-link-text,
.sidebar.collapsed .submenu-icon {
    display: none;
}

.sidebar.collapsed .nav-item.has-submenu .submenu {
    display: none !important;
}

.sidebar-brand {
    padding: 0 2rem 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-brand {
    padding: 0 0 2rem 0;
    justify-content: center;
}

.nav-menu {
    list-style: none;
    padding: 0 1rem;
}

.sidebar.collapsed .nav-menu {
    padding: 0 0.5rem;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-link {
    padding: 0.75rem;
    justify-content: center;
}

.nav-link i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.sidebar-toggle {
    position: absolute;
    top: 2rem;
    right: -12px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    z-index: 100;
    border: 2px solid #0f172a;
    transition: transform 0.3s;
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    background: rgba(0,0,0,0.2);
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.badge-confirmed { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.badge-completed { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge-cancelled { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

/* ==========================================================================
   THEME STYLES (Sáng, Tối, Đỏ Vàng, Xanh Dương)
   ========================================================================== */

/* DARK THEME (Mặc định) */
body[data-theme="dark"] {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --surface: rgba(30, 41, 59, 0.7);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --warning: #f59e0b;
}

/* LIGHT THEME (Sáng) - Premium Light Glassmorphism */
body[data-theme="light"] {
    --primary: #3b82f6; /* Blue */
    --primary-hover: #2563eb;
    --secondary: #10b981; /* Emerald */
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --surface: rgba(255, 255, 255, 0.65);
    --surface-border: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --danger: #ef4444;
    --warning: #d97706;
}
body[data-theme="light"] .form-control,
body[data-theme="light_red_yellow"] .form-control,
body[data-theme="green_light"] .form-control {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: var(--text-main) !important;
}
body[data-theme="light"] .form-control option,
body[data-theme="light_red_yellow"] .form-control option,
body[data-theme="green_light"] .form-control option {
    background: #ffffff !important;
    color: var(--text-main) !important;
}
body[data-theme="light"] .form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}
body[data-theme="light"] table th {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #334155 !important;
}
body[data-theme="light"] table td {
    color: #0f172a !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}
body[data-theme="light"] tr:hover td {
    background: rgba(0, 0, 0, 0.02) !important;
}
body[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.8) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
}
body[data-theme="light"] .sidebar-brand {
    color: #0f172a !important;
}
body[data-theme="light"] .nav-link {
    color: #334155 !important;
}
body[data-theme="light"] .nav-link:hover, body[data-theme="light"] .nav-link.active {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--primary) !important;
}
body[data-theme="light"] .top-bar h2 {
    color: #0f172a !important;
}
body[data-theme="light"] .auth-header h1 {
    background: linear-gradient(to right, #0f172a, #334155) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
body[data-theme="light"] .badge {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #0f172a !important;
}
body[data-theme="light"] .badge-pending { background: rgba(245, 158, 11, 0.15) !important; color: #b45309 !important; }
body[data-theme="light"] .badge-confirmed { background: rgba(16, 185, 129, 0.15) !important; color: #047857 !important; }
body[data-theme="light"] .badge-completed { background: rgba(59, 130, 246, 0.15) !important; color: #1d4ed8 !important; }

/* GREEN LIGHT THEME (Xanh lá sáng) */
body[data-theme="green_light"] {
    --primary: #10b981; /* Green */
    --primary-hover: #059669;
    --secondary: #3b82f6; /* Blue for accents */
    --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --surface: rgba(255, 255, 255, 0.8);
    --surface-border: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a; /* Dark gray text */
    --text-muted: #475569;
}
body[data-theme="green_light"] .form-control {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
}
body[data-theme="green_light"] .form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}
body[data-theme="green_light"] table th {
    background: rgba(16, 185, 129, 0.05) !important;
    color: #0f172a !important;
}
body[data-theme="green_light"] table td {
    color: #334155 !important;
    border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}
body[data-theme="green_light"] tr:hover td {
    background: rgba(0, 0, 0, 0.02) !important;
}

body[data-theme="green_light"] .nav-item-divider {
    background: var(--surface-border) !important;
}
body[data-theme="green_light"] .sidebar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-right-color: rgba(0, 0, 0, 0.08) !important;
}
body[data-theme="green_light"] .sidebar-brand {
    color: #0f172a !important;
}
body[data-theme="green_light"] .nav-link {
    color: #475569 !important;
}
body[data-theme="green_light"] .nav-link:hover, body[data-theme="green_light"] .nav-link.active {
    background: rgba(16, 185, 129, 0.1) !important;
    color: var(--primary) !important;
}
body[data-theme="green_light"] .top-bar h2 {
    color: #0f172a !important;
}
body[data-theme="green_light"] .auth-header h1 {
    background: linear-gradient(to right, #0f172a, #334155) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
body[data-theme="green_light"] .badge {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #0f172a !important;
}
body[data-theme="green_light"] .badge-pending { background: rgba(245, 158, 11, 0.15) !important; color: #b45309 !important; }
body[data-theme="green_light"] .badge-confirmed { background: rgba(16, 185, 129, 0.15) !important; color: #047857 !important; }
body[data-theme="green_light"] .badge-completed { background: rgba(59, 130, 246, 0.15) !important; color: #1d4ed8 !important; }

/* Sáng Đỏ Vàng THEME (Giao diện Sáng Đỏ Vàng) */
body[data-theme="light_red_yellow"] {
    --primary: #d9534f; /* Soft Red */
    --primary-hover: #c9302c;
    --secondary: #f0ad4e; /* Yellow/Orange */
    --secondary-hover: #ec971f;
    --bg-gradient: linear-gradient(135deg, #f9f9f9 0%, #e5e7eb 100%);
    --surface: rgba(255, 255, 255, 0.9);
    --surface-border: rgba(0, 0, 0, 0.08);
    --text-main: #333333;
    --text-muted: #666666;
    --danger: #d9534f;
    --warning: #f0ad4e;
}
body[data-theme="light_red_yellow"] .form-control {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #333333 !important;
}
body[data-theme="light_red_yellow"] .form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.2) !important;
}
body[data-theme="light_red_yellow"] table th {
    background: #f2f2f2 !important;
    color: #333333 !important;
    border-bottom: 1px solid #e0e0e0 !important;
}
body[data-theme="light_red_yellow"] table td {
    color: #333333 !important;
    border-bottom: 1px solid #e0e0e0 !important;
}
body[data-theme="light_red_yellow"] tr:hover td {
    background: rgba(0, 0, 0, 0.02) !important;
}
body[data-theme="light_red_yellow"] .sidebar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
}
body[data-theme="light_red_yellow"] .sidebar-brand {
    color: #333333 !important;
}
body[data-theme="light_red_yellow"] .nav-link {
    color: #555555 !important;
}
body[data-theme="light_red_yellow"] .nav-link:hover, body[data-theme="light_red_yellow"] .nav-link.active {
    background: rgba(217, 83, 79, 0.1) !important;
    color: var(--primary) !important;
}
body[data-theme="light_red_yellow"] .top-bar h2 {
    color: #333333 !important;
}
body[data-theme="light_red_yellow"] .auth-header h1 {
    background: linear-gradient(to right, #d9534f, #f0ad4e) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
body[data-theme="light_red_yellow"] .badge {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #333333 !important;
}
body[data-theme="light_red_yellow"] .badge-pending { background: rgba(240, 173, 78, 0.15) !important; color: #ec971f !important; }
body[data-theme="light_red_yellow"] .badge-confirmed { background: rgba(16, 185, 129, 0.15) !important; color: #047857 !important; }
body[data-theme="light_red_yellow"] .badge-completed { background: rgba(59, 130, 246, 0.15) !important; color: #1d4ed8 !important; }
body[data-theme="light_red_yellow"] .badge-cancelled { background: rgba(217, 83, 79, 0.15) !important; color: #c9302c !important; }

/* RED/YELLOW THEME (Đỏ Vàng) */
body[data-theme="red_yellow"] {
    --primary: #e11d48; /* Crimson Red */
    --primary-hover: #be123c;
    --secondary: #eab308; /* Yellow */
    --bg-gradient: linear-gradient(135deg, #180305 0%, #2e1005 100%);
    --surface: rgba(45, 15, 18, 0.7);
    --surface-border: rgba(234, 179, 8, 0.2);
    --text-main: #fef08a; /* Soft Yellow text */
    --text-muted: #fca5a5; /* Soft Red text */
    --danger: #ef4444;
    --warning: #facc15;
}
body[data-theme="red_yellow"] .badge {
    background: rgba(234, 179, 8, 0.1) !important;
    color: #fef08a !important;
}
body[data-theme="red_yellow"] .badge-pending { background: rgba(245, 158, 11, 0.25) !important; color: #fcd34d !important; }
body[data-theme="red_yellow"] .badge-confirmed { background: rgba(16, 185, 129, 0.25) !important; color: #6ee7b7 !important; }
body[data-theme="red_yellow"] .badge-completed { background: rgba(59, 130, 246, 0.25) !important; color: #93c5fd !important; }

/* BLUE THEME (Xanh Dương) */
body[data-theme="blue"] {
    --primary: #0284c7; /* Ocean Blue */
    --primary-hover: #0369a1;
    --secondary: #0d9488; /* Teal */
    --bg-gradient: linear-gradient(135deg, #091d30 0%, #032b49 100%);
    --surface: rgba(10, 37, 64, 0.7);
    --surface-border: rgba(56, 189, 248, 0.2);
    --text-main: #f0f9ff;
    --text-muted: #7dd3fc;
    --danger: #f43f5e;
    --warning: #f59e0b;
}
body[data-theme="blue"] .badge {
    background: rgba(56, 189, 248, 0.1) !important;
    color: #7dd3fc !important;
}
body[data-theme="blue"] .badge-pending { background: rgba(245, 158, 11, 0.25) !important; color: #fcd34d !important; }
body[data-theme="blue"] .badge-confirmed { background: rgba(16, 185, 129, 0.25) !important; color: #6ee7b7 !important; }
body[data-theme="blue"] .badge-completed { background: rgba(59, 130, 246, 0.25) !important; color: #93c5fd !important; }

/* Car Switcher Component */
.car-switcher-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1.5rem;
}

.car-switcher-select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--surface-border);
    color: var(--text-main);
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394a3b8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.65rem auto;
}

.car-switcher-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.car-switcher-select option {
    background: #1e293b;
    color: #f8fafc;
}

/* Theme specifics for switcher */
body[data-theme="light"] .car-switcher-select,
body[data-theme="green_light"] .car-switcher-select,
body[data-theme="light_red_yellow"] .car-switcher-select {
    background: rgba(255, 255, 255, 0.8);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23475569%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

body[data-theme="light"] .car-switcher-select option,
body[data-theme="green_light"] .car-switcher-select option {
    background: #ffffff;
    color: #0f172a;
}

body[data-theme="light_red_yellow"] .car-switcher-select option {
    background: #ffffff;
    color: #333333;
}

body[data-theme="red_yellow"] .car-switcher-select option {
    background: #2d0f12;
    color: #fef08a;
}

body[data-theme="blue"] .car-switcher-select option {
    background: #0a2540;
    color: #f0f9ff;
}

/* ==========================================================================
   MOBILE RESPONSIVE DASHBOARD (Sidebar Toggle)
   ========================================================================== */
.d-none-desktop {
    display: none !important;
}

@media (max-width: 768px) {
    /* Mobile optimization for authentication containers and forms */
    .auth-container {
        align-items: flex-start !important;
        padding: 1rem 0.75rem !important;
    }
    
    .auth-card {
        padding: 1.5rem 1rem !important;
        margin: 0 !important;
        border-radius: 0.5rem !important;
    }
    
    .span-2-mobile {
        grid-column: span 1 !important;
    }

    .d-none-desktop {
        display: flex !important;
    }
    
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    .mobile-header {
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: var(--surface);
        border-bottom: 1px solid var(--surface-border);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    
    .mobile-brand {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--text-main);
        text-decoration: none;
    }
    
    .mobile-menu-btn {
        background: none;
        border: none;
        color: var(--text-main);
        font-size: 1.25rem;
        cursor: pointer;
    }
    
    .sidebar {
        width: 100%;
        display: none;
        border-right: none;
        border-bottom: 1px solid var(--surface-border);
        padding: 0.5rem 0;
    }
    
    .sidebar.active {
        display: flex;
    }
    
    .sidebar-brand {
        display: none;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-bottom: 1rem !important;
    }
    
    .top-bar h2 {
        font-size: 1.2rem;
        margin-bottom: 0;
    }
    
    .top-bar > div {
        flex-wrap: wrap;
        width: 100%;
        gap: 0.5rem !important;
    }
    
    .top-bar form {
        width: 100%;
        margin-right: 0 !important;
        gap: 0.5rem !important;
    }
    
    .top-bar input[type="text"] {
        flex: 1;
        width: auto !important;
        padding: 0.5rem !important;
        height: auto !important;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }
    
    /* Optimize spacing for mobile */
    .glass-panel {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .form-group {
        margin-bottom: 0.75rem !important;
    }
    
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .form-control {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
        height: auto !important;
    }
    
    th, td {
        padding: 0.5rem !important;
        font-size: 0.85rem;
    }
    
    h2, h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    p {
        margin-bottom: 0.25rem !important;
        font-size: 0.85rem;
    }
    
    .alert {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        font-size: 0.85rem;
    }
    
    .car-switcher-select {
        padding: 0.4rem 1.5rem 0.4rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
    
    /* Convert all inline multi-column grids to single column on mobile */
    div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .responsive-grid,
    .responsive-grid-2,
    .responsive-grid-3,
    .grid-container {
        grid-template-columns: 1fr !important;
        padding: 0.5rem !important;
        gap: 1rem !important;
    }
    
    /* Convert tables to cards on mobile */
    .mobile-cards table, 
    .mobile-cards thead, 
    .mobile-cards tbody, 
    .mobile-cards th, 
    .mobile-cards td, 
    .mobile-cards tr { 
        display: block; 
    }
    
    .mobile-cards thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .mobile-cards tr { 
        margin-bottom: 1rem;
        background: rgba(0,0,0,0.15);
        border: 1px solid var(--surface-border);
        border-radius: 0.5rem;
        overflow: hidden;
    }
    
    .mobile-cards td { 
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important; 
        position: relative;
        padding: 0.75rem 0.75rem 0.75rem 45% !important; 
        text-align: right !important;
        min-height: 2.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
    }
    
    .mobile-cards td:last-child {
        border-bottom: 0 !important;
        background: rgba(255,255,255,0.02);
        padding-left: 0.75rem !important;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-cards td:last-child:before {
        display: none !important;
    }
    
    .mobile-cards td:before { 
        content: attr(data-label);
        position: absolute;
        top: 0.75rem;
        left: 0.75rem;
        width: 40%; 
        text-align: left;
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.8rem;
        white-space: nowrap;
        text-transform: uppercase;
    }
    
    /* Ensure action buttons wrap properly */
    .mobile-cards td:last-child > div {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ==========================================================================
   ADDITIONAL THEME & CONTRAST UTILITIES
   ========================================================================== */

/* Status indicators and dynamic text */
.status-text-danger { color: #f87171; }
.status-text-warning { color: #fb923c; }
.status-text-success { color: #4ade80; }
.status-text-info { color: #60a5fa; }

body[data-theme="light"] .status-text-danger,
body[data-theme="light_red_yellow"] .status-text-danger,
body[data-theme="green_light"] .status-text-danger { color: #c53030 !important; }

body[data-theme="light"] .status-text-warning,
body[data-theme="light_red_yellow"] .status-text-warning,
body[data-theme="green_light"] .status-text-warning { color: #c2410c !important; }

body[data-theme="light"] .status-text-success,
body[data-theme="light_red_yellow"] .status-text-success,
body[data-theme="green_light"] .status-text-success { color: #047857 !important; }

body[data-theme="light"] .status-text-info,
body[data-theme="light_red_yellow"] .status-text-info,
body[data-theme="green_light"] .status-text-info { color: #1d4ed8 !important; }

/* Dashboard status headings */
.dashboard-section-title.status-purple { color: #c084fc; }
.dashboard-section-title.status-orange { color: #fb923c; }
.dashboard-section-title.status-green { color: #6ee7b7; }
.dashboard-section-title.status-blue { color: #93c5fd; }

body[data-theme="light"] .dashboard-section-title.status-purple,
body[data-theme="light_red_yellow"] .dashboard-section-title.status-purple,
body[data-theme="green_light"] .dashboard-section-title.status-purple { color: #6b21a8 !important; }

body[data-theme="light"] .dashboard-section-title.status-orange,
body[data-theme="light_red_yellow"] .dashboard-section-title.status-orange,
body[data-theme="green_light"] .dashboard-section-title.status-orange { color: #c2410c !important; }

body[data-theme="light"] .dashboard-section-title.status-green,
body[data-theme="light_red_yellow"] .dashboard-section-title.status-green,
body[data-theme="green_light"] .dashboard-section-title.status-green { color: #047857 !important; }

body[data-theme="light"] .dashboard-section-title.status-blue,
body[data-theme="light_red_yellow"] .dashboard-section-title.status-blue,
body[data-theme="green_light"] .dashboard-section-title.status-blue { color: #1d4ed8 !important; }

/* Stats Card Icons and contrast */
.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-card-primary { background: rgba(79, 70, 229, 0.2); color: #818cf8; border: 1px solid rgba(79, 70, 229, 0.3); }
.stat-card-warning { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.stat-card-success { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-card-info { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }

body[data-theme="light"] .stat-card-primary,
body[data-theme="light_red_yellow"] .stat-card-primary,
body[data-theme="green_light"] .stat-card-primary {
    background: rgba(79, 70, 229, 0.1) !important;
    color: #4f46e5 !important;
    border-color: rgba(79, 70, 229, 0.2) !important;
}
body[data-theme="light"] .stat-card-warning,
body[data-theme="light_red_yellow"] .stat-card-warning,
body[data-theme="green_light"] .stat-card-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #b45309 !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}
body[data-theme="light"] .stat-card-success,
body[data-theme="light_red_yellow"] .stat-card-success,
body[data-theme="green_light"] .stat-card-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #047857 !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}
body[data-theme="light"] .stat-card-info,
body[data-theme="light_red_yellow"] .stat-card-info,
body[data-theme="green_light"] .stat-card-info {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #1d4ed8 !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

/* Green Outline Success Button (Xuất CSV & Gộp khách) */
.btn-outline-success {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 2px solid #10b981 !important;
    color: #34d399 !important;
    font-weight: bold !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}
.btn-outline-success:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #047857 !important;
    border-color: #047857 !important;
}
.btn-outline-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Overrides for light themes */
body[data-theme="light"] .btn-outline-success,
body[data-theme="light_red_yellow"] .btn-outline-success,
body[data-theme="green_light"] .btn-outline-success {
    border-color: #047857 !important;
    color: #047857 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}
body[data-theme="light"] .btn-outline-success:hover,
body[data-theme="light_red_yellow"] .btn-outline-success:hover,
body[data-theme="green_light"] .btn-outline-success:hover {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #065f46 !important;
    border-color: #065f46 !important;
}

