/* ===================================================
   RentaCar Pro - Design System v2.0
   Premium Dark Glassmorphism Theme
   =================================================== */

/* ── CSS Variables ── */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(203, 213, 225, 0.4);
    --glass-border-hover: rgba(148, 163, 184, 0.4);
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-light: rgba(79, 70, 229, 0.1);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.1);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --sidebar-width: 260px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --transition: all 0.2s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
}

/* ===================================================
   SIDEBAR
   =================================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    margin-bottom: 8px;
}

.brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    letter-spacing: -0.3px;
    padding: 4px 8px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.nav-section {
    flex: 1;
}

.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 16px 12px 8px;
    margin-top: 4px;
}

.nav-item {
    list-style: none;
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--accent-light);
    color: var(--accent);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-link i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

.sidebar-footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 16px;
    margin-top: auto;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
}

.user-card:hover {
    background: rgba(0, 0, 0, 0.04);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Sidebar Overlay (Mobile) ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 998;
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

/* ===================================================
   MAIN CONTENT
   =================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 28px 32px;
    min-height: 100vh;
    min-width: 0;
}

/* ── Page Header ── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .sep {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: var(--font);
    white-space: nowrap;
    line-height: 1;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn i {
    font-size: 13px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #059669;
    color: white;
}

.btn-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.btn-danger.btn-solid {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.2);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

.btn-xs {
    padding: 5px 10px;
    font-size: 11px;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 15px;
}

.btn-icon {
    padding: 8px;
    width: 34px;
    height: 34px;
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
    padding: 6px;
}

.btn-group {
    display: flex;
    gap: 4px;
}

/* ===================================================
   CARDS
   =================================================== */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--glass-border-hover);
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
}

/* ===================================================
   STATS GRID
   =================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    backdrop-filter: blur(12px);
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: var(--info-light);
    color: var(--info);
}

.stat-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.purple {
    background: var(--accent-light);
    color: var(--accent);
}

.stat-icon.orange {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.stat-change {
    font-size: 11px;
    margin-top: 6px;
}

.stat-change.up {
    color: var(--success);
}

.stat-change.down {
    color: var(--danger);
}

/* ===================================================
   FLEET CARDS
   =================================================== */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.fleet-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px;
    border-left: 3px solid var(--text-muted);
    transition: var(--transition);
}

.fleet-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.fleet-card.success {
    border-left-color: var(--success);
}

.fleet-card.primary {
    border-left-color: var(--accent);
}

.fleet-card.warning {
    border-left-color: var(--warning);
}

.fc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.fc-model {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-details {
    font-size: 12px;
    background: var(--bg-primary);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.fc-customer,
.fc-time,
.fc-ready,
.fc-maint {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-customer {
    font-weight: 500;
    color: var(--text-secondary);
}

.fc-time {
    color: var(--text-muted);
}

.fc-customer i,
.fc-time i {
    width: 14px;
    text-align: center;
    margin-right: 4px;
    color: var(--text-muted);
}

.fc-ready {
    color: var(--success);
    font-weight: 600;
    text-align: center;
}

.fc-maint {
    color: var(--warning);
    font-weight: 600;
    text-align: center;
}

/* ===================================================
   TABLES
   =================================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: rgba(0, 0, 0, 0.02);
}

th {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

tr.highlight-danger td {
    border-left: 3px solid var(--danger);
}

tr.highlight-success td {
    border-left: 3px solid var(--success);
}

/* ── Table Toolbar ── */
.table-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    flex: 1;
    max-width: 360px;
}

.search-box i {
    color: var(--text-muted);
    font-size: 14px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 10px 0;
    font-size: 13px;
    width: 100%;
    font-family: var(--font);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-select {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 32px;
}

.filter-select:focus {
    border-color: var(--accent);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    margin-bottom: 20px;
}

/* ===================================================
   BADGES
   =================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-neutral {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
}

.badge-accent {
    background: var(--accent-light);
    color: var(--accent);
}

/* ===================================================
   FORMS
   =================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    font-family: var(--font);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.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);
    cursor: pointer;
}

/* ── Toggle Switch ── */
.toggle-switch {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.toggle-switch label {
    padding: 10px 24px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    text-align: center;
    flex: 1;
}

.toggle-switch input {
    display: none;
}

.toggle-switch input:checked+label,
.toggle-switch label.active {
    background: var(--accent);
    color: white;
}

/* ===================================================
   ALERTS
   =================================================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 500;
}

.alert i {
    font-size: 16px;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* ===================================================
   MODALS
   =================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

.modal-body {
    padding: 28px 24px;
    text-align: center;
}

.modal-footer {
    padding: 16px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid var(--glass-border);
}

.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.confirm-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.confirm-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.confirm-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.confirm-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.confirm-message {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===================================================
   TOASTS
   =================================================== */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: auto;
    animation: toastIn 0.3s ease;
    box-shadow: var(--shadow-md);
    min-width: 280px;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
}

.toast-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.toast-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.toast-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.toast-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ===================================================
   QUICK ACTIONS
   =================================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.quick-action:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    color: white;
    box-shadow: var(--shadow-sm);
}

.quick-action i {
    font-size: 16px;
    color: var(--accent);
}

/* ===================================================
   DETAIL VIEW (Reservation/Customer/Car)
   =================================================== */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}



.detail-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 600;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
}

.info-card {
    padding: 24px;
}

.info-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

/* ── Price Summary Panel ── */
.price-panel {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.price-row.total {
    border-top: 1px solid var(--glass-border);
    padding-top: 12px;
    margin-top: 4px;
    font-weight: 700;
    font-size: 18px;
}

.price-row .label {
    color: var(--text-secondary);
}

/* ===================================================
   PROFILE PAGE
   =================================================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 28px;
    flex-shrink: 0;
}

.profile-info h2 {
    font-size: 20px;
    margin-bottom: 2px;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ===================================================
   LOGIN PAGE
   =================================================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 30% 40%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.4s ease;
}

.login-card .brand {
    justify-content: center;
    margin-bottom: 32px;
    font-size: 24px;
}

.login-card h2 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 4px;
}

.login-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 28px;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
}

/* ===================================================
   CHART
   =================================================== */
.chart-container {
    position: relative;
    height: 280px;
    margin-top: 8px;
}

/* ===================================================
   PRINT STYLES
   =================================================== */
@media print {

    .sidebar,
    .mobile-menu-btn,
    .sidebar-overlay,
    .page-actions,
    .btn-group,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    body {
        background: white !important;
        color: #111 !important;
    }

    .card {
        border: 1px solid #ddd !important;
        background: white !important;
        box-shadow: none !important;
    }

    .badge {
        border: 1px solid currentColor;
    }

    table,
    th,
    td {
        border: 1px solid #ccc !important;
    }
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    .table-toolbar {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    #toast-container {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 14px 16px;
    }

    .stat-value {
        font-size: 20px;
    }
}

/* ===================================================
   UTILITY CLASSES
   =================================================== */
.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-info {
    color: var(--info);
}

.text-muted {
    color: var(--text-muted);
}

.text-accent {
    color: var(--accent);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fs-sm {
    font-size: 12px;
}

.mt-0 {
    margin-top: 0;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.gap-8 {
    gap: 8px;
}

.gap-16 {
    gap: 16px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-1 {
    flex: 1;
}

.w-100 {
    width: 100%;
}

.nowrap {
    white-space: nowrap;
}

/* Spacing helper */
.inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===================================================
   LOGIN PAGE
   =================================================== */
.login-page {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 30% 40%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-card .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 12px;
}

.login-card .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.login-card .form-group {
    text-align: left;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

/* ===================================================
   BREADCRUMB
   =================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .sep {
    margin: 0 8px;
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===================================================
   SEARCH & FILTER TOOLBAR
   =================================================== */
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.filter-select {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    min-width: 140px;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--accent);
}

/* ===================================================
   QUICK ACTIONS (Dashboard)
   =================================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.quick-action i {
    color: var(--accent);
    font-size: 16px;
}

.quick-action:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ===================================================
   STAT CARDS (Dashboard & Views)
   =================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: var(--info-light);
    color: var(--info);
}

.stat-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.purple {
    background: var(--accent-light);
    color: var(--accent);
}

.stat-icon.orange {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-change {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-change.up {
    color: var(--success);
}

.stat-change.down {
    color: var(--danger);
}

/* ===================================================
   PRICE PANEL (Reservations)
   =================================================== */
.price-panel {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row .label {
    color: var(--text-secondary);
}

.price-row.total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--glass-border);
    border-bottom: none;
    font-size: 18px;
    font-weight: 700;
}

/* ===================================================
   DETAIL GRID (View pages)
   =================================================== */
.info-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
}

/* ===================================================
   PROFILE AVATAR
   =================================================== */
.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.profile-avatar.lg {
    width: 72px;
    height: 72px;
    font-size: 28px;
}

/* ===================================================
   CHART CONTAINER
   =================================================== */
.chart-container {
    position: relative;
    height: 280px;
}

/* ===================================================
   CONFIRM MODAL
   =================================================== */
.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 16px;
}

.confirm-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.confirm-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.confirm-message {
    color: var(--text-secondary);
    text-align: center;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ===================================================
   TABLE EXTRAS
   =================================================== */
.highlight-danger {
    background: var(--danger-light) !important;
}

.btn-solid {
    background: var(--danger);
    color: #fff;
    border: none;
}

.btn-solid:hover {
    background: #dc2626;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
}

/* ===================================================
   PAGE HEADER
   =================================================== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.page-actions {
    display: flex;
    gap: 8px;
}

/* ===================================================
   DASHBOARD GRIDS
   =================================================== */
.dashboard-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* ===================================================
   FLEET GRID (Dashboard)
   =================================================== */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.fleet-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition);
}

.fleet-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.fleet-card.primary {
    border-top: 3px solid var(--accent);
}

.fleet-card.success {
    border-top: 3px solid var(--success);
}

.fleet-card.warning {
    border-top: 3px solid var(--warning);
}

.fleet-card.neutral {
    border-top: 3px solid var(--text-muted);
}

.fc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.fc-model {
    font-size: 13px;
    color: var(--text-secondary);
}

.fc-details {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
}

.fc-customer,
.fc-time,
.fc-ready,
.fc-maint {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fc-ready {
    color: var(--success);
    font-weight: 500;
}

.fc-maint {
    color: var(--warning);
    font-weight: 500;
}

.fc-customer i {
    color: var(--accent);
}

/* ===================================================
   RESPONSIVE - Extra
   =================================================== */
/* ===================================================
   RESPONSIVE - COMPREHENSIVE MOBILE SUPPORT
   =================================================== */

/* ── Tablet & Small Desktop (≤1024px) ── */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 24px;
        right: 24px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--accent);
        color: #fff;
        border: none;
        box-shadow: var(--shadow-lg);
        font-size: 24px;
        z-index: 999;
        cursor: pointer;
        transition: var(--transition);
    }

    .mobile-menu-btn:hover {
        transform: scale(1.05);
        background: #4338ca;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
        padding-top: 20px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1;
        justify-content: center;
    }

    /* Grid layouts → single column */
    .dashboard-charts-grid,
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:1fr 340px"],
    [style*="grid-template-columns: 1fr 340px"] {
        grid-template-columns: 1fr !important;
    }

    .price-panel {
        position: static !important;
    }

    .search-box {
        max-width: none;
    }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
    .mobile-menu-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .main-content {
        padding: 16px 12px;
        padding-top: 16px;
    }

    /* Forms → stack on mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Touch-friendly form fields */
    .form-control {
        padding: 12px 14px;
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    select.form-control {
        padding-right: 36px;
    }

    .form-label {
        font-size: 13px;
    }

    /* Stats grid → 2 columns */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
        gap: 10px;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
        border-radius: var(--radius-sm);
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-change {
        font-size: 10px;
    }

    /* Quick actions → 2 columns */
    .quick-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .quick-action {
        padding: 12px;
        font-size: 12px;
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .quick-action i {
        font-size: 20px;
    }

    /* Table responsive */
    .table-container {
        margin: 0 -12px;
        border-radius: 0;
        position: relative;
    }

    /* Scroll hint gradient */
    .table-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 24px;
        background: linear-gradient(90deg, transparent, rgba(10, 14, 26, 0.8));
        pointer-events: none;
        z-index: 1;
        opacity: 0.8;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 10px 12px;
    }

    /* Detail grids → single column */
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Toolbar → stack */
    .table-toolbar {
        flex-direction: column;
        gap: 8px;
    }

    .search-box {
        width: 100%;
        max-width: none;
    }

    .filter-select {
        width: 100%;
    }

    /* Cards reduce padding */
    .card-body {
        padding: 16px;
    }

    .card-header {
        padding: 14px 16px;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 11px;
        margin-bottom: 12px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Page title */
    .page-title {
        font-size: 20px;
    }

    /* Buttons → touch friendly */
    .btn {
        padding: 11px 18px;
        font-size: 13px;
        min-height: 42px;
    }

    .btn-sm {
        padding: 8px 14px;
        min-height: 36px;
    }

    .btn-icon {
        min-height: 38px;
        min-width: 38px;
    }

    .btn-icon.btn-sm {
        min-height: 34px;
        min-width: 34px;
    }

    .btn-group {
        gap: 6px;
    }

    /* Price panel */
    .price-row {
        font-size: 13px;
        padding: 8px 0;
    }

    .price-row.total {
        font-size: 16px;
    }

    /* Modals */
    .modal {
        margin: 16px;
        max-height: 90vh;
    }

    .modal-body {
        padding: 20px;
    }

    /* Alerts */
    .alert {
        font-size: 13px;
        flex-wrap: wrap;
    }

    /* D-flex items full-width on mobile */
    .d-flex.gap-8 {
        flex-wrap: wrap;
    }

    .d-flex.gap-8 .btn {
        flex: 1;
        min-width: 120px;
    }

    /* Status tabs → scrollable */
    .d-flex.gap-8.mb-16 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .d-flex.gap-8.mb-16 .btn {
        flex-shrink: 0;
    }

    /* Login */
    .login-card {
        margin: 16px;
        padding: 32px 20px;
    }

    /* Profile */
    .profile-avatar {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .profile-avatar.lg {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    /* Chart */
    .chart-container {
        height: 220px;
    }

    /* Toast */
    #toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .toast {
        width: 100%;
        max-width: none;
    }
}

/* ── Small Mobile (≤480px) ── */
@media (max-width: 480px) {
    .main-content {
        padding: 12px 10px;
        padding-top: 12px;
    }

    /* Stats → single column */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Quick actions → single column */
    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    .quick-action {
        padding: 10px;
        font-size: 11px;
    }

    /* Page title smaller */
    .page-title {
        font-size: 18px;
    }

    .page-subtitle {
        font-size: 12px;
    }

    /* Table cells tighter */
    th,
    td {
        padding: 8px 10px;
        font-size: 11px;
    }

    /* Hide less important columns on very small screens */
    .hide-mobile {
        display: none;
    }

    /* Buttons full-width */
    .page-actions {
        flex-direction: column;
    }

    .page-actions .btn {
        width: 100%;
    }

    /* Stat card values smaller */
    .stat-value {
        font-size: 16px;
    }

    /* Card body tight */
    .card-body {
        padding: 14px;
    }

    /* Form submit buttons full-width */
    .d-flex.gap-8 {
        flex-direction: column;
    }

    .d-flex.gap-8 .btn {
        width: 100%;
    }
}

/* ── Touch & Accessibility ── */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }

    .stat-card:hover {
        transform: none;
        box-shadow: none;
    }

    .quick-action:hover {
        transform: none;
    }

    .nav-link:hover {
        background: transparent;
    }

    /* Tap highlight */
    .btn,
    .nav-link,
    .quick-action,
    a {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.15);
    }

    /* Larger touch targets */
    .nav-link {
        padding: 12px 14px;
    }

    .form-check input[type="checkbox"],
    .form-check input[type="radio"] {
        width: 22px;
        height: 22px;
    }
}

/* ── Safe Area (Notch devices) ── */
@supports (padding: env(safe-area-inset-bottom)) {
    .sidebar {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .main-content {
        padding-bottom: calc(28px + env(safe-area-inset-bottom));
    }

    #toast-container {
        bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* ── Landscape on small devices ── */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        padding: 12px 16px;
    }

    .nav-section-label {
        padding: 8px 12px 4px;
    }

    .nav-link {
        padding: 8px 14px;
    }

    .login-card {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 16px;
    }
}

/* ===================================================
   PRINT
   =================================================== */
@media print {
    body {
        background: #fff;
        color: #000;
    }

    .sidebar,
    .mobile-menu-btn,
    .sidebar-overlay,
    .no-print,
    .page-actions,
    .breadcrumb,
    #toast-container,
    #confirm-modal {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .card {
        border: 1px solid #ddd;
        background: #fff;
        box-shadow: none;
    }

    .badge {
        border: 1px solid #999;
        color: #000;
    }

    .price-panel {
        border: 1px solid #ddd;
        background: #f9f9f9;
    }
}