/* Global Reset & Theme Configuration */
:root {
    --bg-primary: #090d16;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-card: rgba(17, 24, 39, 0.75);
    
    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-primary-glow: rgba(99, 102, 241, 0.35);
    
    --accent-secondary: #06b6d4;
    --accent-secondary-hover: #0891b2;
    
    --text-main: #f3f4f6;
    --text-secondary: #cbd5e1;
    --text-muted: #6b7280;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.5);
    
    /* Status Colors */
    --status-available-bg: rgba(16, 185, 129, 0.15);
    --status-available-text: #10b981;
    --status-available-glow: rgba(16, 185, 129, 0.3);
    
    --status-maintenance-bg: rgba(245, 158, 11, 0.15);
    --status-maintenance-text: #f59e0b;
    
    --status-out-bg: rgba(239, 68, 68, 0.15);
    --status-out-text: #ef4444;
    
    --status-pending-bg: rgba(245, 158, 11, 0.15);
    --status-pending-text: #f59e0b;
    --status-pending-glow: rgba(245, 158, 11, 0.3);
    
    --status-approved-bg: rgba(16, 185, 129, 0.15);
    --status-approved-text: #10b981;
    --status-approved-glow: rgba(16, 185, 129, 0.3);
    
    --status-rejected-bg: rgba(239, 68, 68, 0.15);
    --status-rejected-text: #ef4444;
    
    --status-completed-bg: rgba(59, 130, 246, 0.15);
    --status-completed-text: #3b82f6;

    --font-heading: 'Outfit', 'Sarabun', sans-serif;
    --font-body: 'Sarabun', 'Outfit', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.4);
    --transition-speed: 0.25s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: 0.2px;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* App Container Layout */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform var(--transition-speed) ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 0 12px var(--accent-primary-glow);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-menu {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: var(--text-muted);
    transition: color var(--transition-speed);
}

.menu-item:hover {
    background-color: var(--bg-tertiary);
    color: white;
}

.menu-item:hover i {
    color: var(--accent-secondary);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-left: 3px solid var(--accent-primary);
    color: white;
    padding-left: 13px; /* Offset the 3px border */
}

.menu-item.active i {
    color: var(--accent-primary);
}

.menu-divider {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 20px 16px 8px 16px;
    font-weight: 600;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent-secondary);
    border: 1px solid var(--border-color);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
}

.profile-status {
    font-size: 11px;
    color: var(--text-muted);
}

/* Main Content Area Styling */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    padding: 0 40px 40px 40px;
}

/* Header bar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    z-index: 90;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.topbar-left h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-stats {
    display: flex;
    gap: 16px;
}

.stat-bubble {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-lbl {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-val {
    font-size: 16px;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Role Switch styling */
.role-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.role-switch-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Switch UI */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: .3s;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary-glow);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Views display logic */
.content-view {
    display: none;
    animation: fadeIn var(--transition-speed) ease-in-out;
}

.content-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.banner-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.banner-content p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 600px;
    line-height: 1.5;
}

.banner-deco {
    font-size: 90px;
    color: rgba(255, 255, 255, 0.03);
    position: absolute;
    right: 30px;
    bottom: -15px;
    pointer-events: none;
}

/* Section Common Styles */
.section-container {
    margin-bottom: 35px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-wrapper i {
    color: var(--accent-secondary);
    font-size: 20px;
}

.section-title-wrapper h3 {
    font-size: 18px;
    font-weight: 700;
}

/* Filters UI */
.filters {
    display: flex;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.filter-btn:hover {
    color: white;
}

.filter-btn.active {
    background-color: var(--bg-tertiary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Car Fleet Grid & Cards */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.car-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(8px);
    transition: all var(--transition-speed) ease;
}

.car-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.car-img-container {
    height: 180px;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.car-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.car-card:hover .car-img-container img {
    transform: scale(1.05);
}

.car-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.car-badge.badge-sedan { color: #818cf8; }
.car-badge.badge-suv { color: #f472b6; }
.car-badge.badge-van { color: #fb7185; }
.car-badge.badge-pickup { color: #fb923c; }
.car-badge.badge-ev { color: #38bdf8; }

.car-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.car-name-plate {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.car-name-plate h4 {
    font-size: 17px;
    font-weight: 700;
    color: white;
}

.car-plate {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.car-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Status variants */
.status-available {
    color: var(--status-available-text);
}
.status-available .status-dot {
    background-color: var(--status-available-text);
    box-shadow: 0 0 8px var(--status-available-text);
}

.status-maintenance {
    color: var(--status-maintenance-text);
}
.status-maintenance .status-dot {
    background-color: var(--status-maintenance-text);
    box-shadow: 0 0 8px var(--status-maintenance-text);
}

.status-out {
    color: var(--status-out-text);
}
.status-out .status-dot {
    background-color: var(--status-out-text);
    box-shadow: 0 0 8px var(--status-out-text);
}

/* Common buttons styles */
.btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px var(--accent-primary-glow);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-primary-hover);
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.05);
    color: white;
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.3);
}

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

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}

/* Card components */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
}

.table-card {
    overflow: hidden;
}

/* Responsive Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.data-table th, .data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    background-color: rgba(0, 0, 0, 0.15);
}

.data-table tbody tr {
    transition: background-color var(--transition-speed);
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Custom badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-badge:before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.badge-pending {
    background-color: var(--status-pending-bg);
    color: var(--status-pending-text);
}
.badge-pending:before { background-color: var(--status-pending-text); }

.badge-approved {
    background-color: var(--status-approved-bg);
    color: var(--status-approved-text);
}
.badge-approved:before { background-color: var(--status-approved-text); }

.badge-rejected {
    background-color: var(--status-rejected-bg);
    color: var(--status-rejected-text);
}
.badge-rejected:before { background-color: var(--status-rejected-text); }

.badge-completed {
    background-color: var(--status-completed-bg);
    color: var(--status-completed-text);
}
.badge-completed:before { background-color: var(--status-completed-text); }

/* Booking actions */
.action-group {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Sidebar badge style */
.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-left: auto;
}

.badge-warning {
    background-color: var(--status-pending-text);
    color: #111827;
}

/* Text colors helper */
.text-success { color: var(--status-available-text) !important; }
.text-warning { color: var(--status-pending-text) !important; }
.text-danger { color: var(--status-rejected-text) !important; }
.text-center { text-align: center !important; }

/* Modals styling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-backdrop.open .modal-card {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.close-btn:hover {
    color: white;
}

.modal-form {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.selected-car-preview {
    display: flex;
    gap: 16px;
    align-items: center;
    background-color: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.selected-car-preview img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.preview-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: white;
}

.preview-badge {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

/* Forms components */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.icon-label {
    margin-right: 4px;
    color: var(--accent-secondary);
}

.required {
    color: var(--status-rejected-text);
}

.form-control {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: white;
    padding: 10px 14px;
    font-size: 13.5px;
    font-family: var(--font-body);
    transition: all var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
    font-size: 12.5px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.split-row {
    flex-direction: row;
}

.split-row .form-group {
    flex: 1;
}

/* Hide helper */
.hidden {
    display: none !important;
}

/* Error message form */
.form-error-msg {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

/* Calendar Timeline styles */
.calendar-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.calendar-grid-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.timeline-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.2);
    min-width: 900px;
}

.timeline-car-col {
    width: 200px;
    min-width: 200px;
    padding: 16px;
    font-weight: 700;
    font-size: 12px;
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
    text-transform: uppercase;
}

.timeline-hours-cols {
    display: flex;
    flex: 1;
}

.hour-header-cell {
    flex: 1;
    text-align: center;
    padding: 16px 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
    font-family: var(--font-heading);
}

.hour-header-cell:last-child {
    border-right: none;
}

.timeline-rows-container {
    min-width: 900px;
}

.timeline-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.timeline-row:last-child {
    border-bottom: none;
}

.timeline-car-cell {
    width: 200px;
    min-width: 200px;
    padding: 16px;
    border-right: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-car-title {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.timeline-car-plate {
    font-size: 11px;
    color: var(--text-muted);
}

.timeline-blocks-cell {
    flex: 1;
    position: relative;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 9.9%,
        rgba(255, 255, 255, 0.02) 10%
    );
    height: 80px;
}

/* Active booking block */
.booking-block {
    position: absolute;
    height: 70%;
    top: 15%;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 10.5px;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 10;
}

.booking-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.booking-block-title {
    font-weight: 700;
    margin-bottom: 2px;
}

.booking-block-time {
    opacity: 0.85;
    font-family: var(--font-heading);
    font-size: 9.5px;
}

/* Booking block variants */
.booking-block.status-pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.85), rgba(217, 119, 6, 0.85));
    border-left: 3px solid #fbbf24;
}
.booking-block.status-approved {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(5, 150, 105, 0.85));
    border-left: 3px solid #34d399;
}

/* Current timeline tracker */
.current-time-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--accent-secondary);
    box-shadow: 0 0 8px var(--accent-secondary);
    z-index: 5;
    pointer-events: none;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.legend-pending { background-color: var(--status-pending-text); }
.legend-approved { background-color: var(--status-approved-text); }
.legend-current-day { background-color: var(--accent-secondary); width: 4px; height: 16px; border-radius: 2px; }

/* Admin only sections control */
.admin-mode .admin-only {
    display: flex !important;
}

body:not(.admin-mode) .admin-only {
    display: none !important;
}

/* Toast styling */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 18px;
}

.toast-success { border-left-color: var(--status-available-text); }
.toast-success .toast-icon { color: var(--status-available-text); }

.toast-error { border-left-color: var(--status-out-text); }
.toast-error .toast-icon { color: var(--status-out-text); }

.toast-info { border-left-color: var(--accent-secondary); }
.toast-info .toast-icon { color: var(--accent-secondary); }

.toast-content {
    flex: 1;
    font-size: 13px;
}

.toast-close {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
}

.toast-close:hover {
    color: white;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
    }
    
    .app-container.sidebar-open .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        padding: 0 20px 20px 20px;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .welcome-banner {
        padding: 20px;
    }
    
    .banner-deco {
        display: none;
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 16px 0;
    }
    
    .topbar-right {
        gap: 12px;
    }
    
    .header-stats {
        display: none;
    }
    
    .split-row {
        flex-direction: column;
    }
    
    .filters {
        width: 100%;
        overflow-x: auto;
    }
    
    .welcome-banner h2 {
        font-size: 20px;
    }
}

/* Authentication Page Display Logic */
body.not-logged-in .app-container {
    display: none !important;
}

body.not-logged-in .login-backdrop-screen {
    display: flex !important;
}

body.logged-in .app-container {
    display: grid !important;
}

body.logged-in .login-backdrop-screen {
    display: none !important;
}

/* Login Screen Styles */
.login-backdrop-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, #111827 0%, #090d16 100%);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    padding: 40px 30px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: loginFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.login-logo-icon {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 0 20px var(--accent-primary-glow);
}

.login-logo-text {
    display: flex;
    flex-direction: column;
}

.login-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-header-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: white;
}

.login-header-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
    margin-top: -12px;
    line-height: 1.4;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper .form-control {
    width: 100%;
    padding-right: 44px;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: color var(--transition-speed);
}

.password-toggle-btn:hover {
    color: white;
}

.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    justify-content: center;
    margin-top: 8px;
}

.login-helper-box {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 12px;
}

.helper-title {
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.helper-account {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.helper-account:last-child {
    margin-bottom: 0;
}

.account-role {
    font-weight: 500;
}

.account-creds {
    font-family: var(--font-heading);
    background-color: var(--bg-tertiary);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    color: white;
    font-weight: 600;
}

/* User Badge in Header */
.active-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-secondary);
}

.active-user-badge i {
    font-size: 16px;
    color: var(--text-muted);
}

.logout-btn {
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    background-color: rgba(239, 68, 68, 0.05);
    transition: all var(--transition-speed);
}

.logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: white;
    border-color: #ef4444;
}

/* Monthly Calendar Styling */
.month-calendar-wrapper {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    min-width: 800px;
}

.weekday-cell {
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-muted);
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(120px, auto);
    min-width: 800px;
}

.calendar-day-cell {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    transition: background-color 0.2s ease;
    min-height: 120px;
}

.calendar-day-cell:nth-child(7n) {
    border-right: none;
}

.calendar-day-cell:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

.calendar-day-number-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.calendar-day-number {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.calendar-day-cell.today {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.04) 0%, rgba(99, 102, 241, 0) 100%);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.calendar-day-cell.today .calendar-day-number {
    color: var(--accent-primary);
    font-weight: 800;
}

.calendar-day-cell.other-month {
    opacity: 0.25;
    background-color: rgba(0, 0, 0, 0.1);
}

.calendar-day-bookings {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    max-height: 80px;
    padding-right: 2px;
}

.month-booking-pill {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    border-left: 3px solid;
    display: block;
    text-align: left;
    text-decoration: none;
    transition: transform var(--transition-speed);
    cursor: pointer;
}

.month-booking-pill:hover {
    transform: translateX(2px);
}

.month-booking-pill.status-pending {
    background-color: rgba(245, 158, 11, 0.15);
    border-left-color: var(--status-pending-text);
    color: var(--status-pending-text);
}

.month-booking-pill.status-approved {
    background-color: rgba(16, 185, 129, 0.15);
    border-left-color: var(--status-approved-text);
    color: var(--status-available-text);
}

/* Day cell action */
.btn-day-add-booking {
    opacity: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 11px;
    transition: opacity 0.2s, color 0.2s;
}

.calendar-day-cell:hover .btn-day-add-booking {
    opacity: 1;
}

.btn-day-add-booking:hover {
    color: var(--accent-secondary);
}

/* ============================================================
   USER MANAGEMENT VIEW
   ============================================================ */

/* Stats bar */
.users-stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.user-stat-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 13.5px;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
    flex: 1;
    min-width: 160px;
    transition: border-color 0.2s;
}

.user-stat-chip i {
    font-size: 18px;
    color: var(--accent-secondary);
}

.user-stat-chip strong {
    color: white;
    font-family: var(--font-heading);
    font-size: 17px;
}

.user-stat-chip:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

/* User role badge */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 0.3px;
}

.role-badge.role-admin {
    background: rgba(99, 102, 241, 0.18);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.role-badge.role-user {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

/* User account status badge */
.account-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.account-status-badge.status-active {
    background: var(--status-available-bg);
    color: var(--status-available-text);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.account-status-badge.status-inactive {
    background: var(--status-out-bg);
    color: var(--status-out-text);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* User avatar chip in table */
.user-avatar-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-heading);
    flex-shrink: 0;
    text-transform: uppercase;
}

.user-avatar-circle.avatar-admin {
    background: linear-gradient(135deg, var(--accent-primary), #a78bfa);
    color: white;
}

.user-avatar-circle.avatar-user {
    background: linear-gradient(135deg, var(--accent-secondary), #38bdf8);
    color: white;
}

.user-avatar-info {
    display: flex;
    flex-direction: column;
}

.user-avatar-info .u-name {
    font-weight: 600;
    color: white;
    font-size: 13.5px;
}

.user-avatar-info .u-uname {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

/* Self-badge (current logged-in user) */
.self-badge {
    display: inline-block;
    font-size: 10px;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 600;
}

/* Protected user indicator */
.protected-badge {
    display: inline-block;
    font-size: 10px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 600;
}

/* Edit hint box inside modal */
.edit-hint-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 13px;
    color: var(--accent-secondary);
    margin-bottom: 8px;
}

.edit-hint-box i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Created date style */
.created-date-cell {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

/* ============================================================
   ADMIN TRAVEL SUMMARY & REPORTS STYLING
   ============================================================ */

/* KPI statistics row layout */
.grid-4-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

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

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

/* KPI Card Glass Panel */
.kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
}

.kpi-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.kpi-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.kpi-secondary {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.kpi-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.kpi-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.kpi-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: white;
    font-family: var(--font-heading);
}

.kpi-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 2px;
}

/* Printable Report Area styling */
.report-print-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.report-header-print {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
}

.report-header-print h2 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.report-subtitle {
    color: var(--accent-secondary);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}

.report-date-generated {
    font-size: 12px;
    color: var(--text-muted);
}

/* Summary horizontal bar in reports */
.report-summary-bar {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.report-summary-bar .summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-summary-bar .summary-item .lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-summary-bar .summary-item .val {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.report-summary-bar .total-highlight {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    margin: -8px 0;
}

.report-summary-bar .total-highlight .val {
    color: var(--accent-secondary);
    font-size: 18px;
}

/* Signatures block for printed reports */
.report-signatures {
    display: none; /* hidden on screen */
    justify-content: space-between;
    margin-top: 60px;
    padding: 0 40px;
}

.sig-block {
    text-align: center;
    width: 250px;
    font-size: 14px;
}

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

.sig-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Right align specific table cells in reports */
.text-right {
    text-align: right !important;
}

.report-table th, .report-table td {
    padding: 12px 16px;
}

/* CSS Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }

    .app-container {
        display: block !important;
    }

    .sidebar, .topbar, .no-print, .btn, .report-actions, .admin-booking-filters {
        display: none !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    .report-print-container {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        color: black !important;
    }

    .report-header-print {
        border-bottom: 2px solid #333 !important;
    }

    .report-header-print h2 {
        color: black !important;
    }

    .report-subtitle {
        color: #333 !important;
    }

    .report-summary-bar {
        background: #f9f9f9 !important;
        border: 1px solid #ddd !important;
        color: black !important;
    }

    .report-summary-bar .val {
        color: black !important;
    }

    .report-summary-bar .total-highlight {
        background: #f0f0f0 !important;
        border: 1px solid #ccc !important;
    }

    .report-summary-bar .total-highlight .val {
        color: black !important;
    }

    .table-card {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .data-table {
        color: black !important;
        border-collapse: collapse;
        width: 100%;
    }

    .data-table th {
        background: #f0f0f0 !important;
        color: black !important;
        border: 1px solid #ddd !important;
        font-weight: bold;
    }

    .data-table td {
        border: 1px solid #ddd !important;
        color: black !important;
    }

    .sig-block p {
        color: black !important;
    }

    .sig-title {
        color: #666 !important;
    }

    .report-signatures {
        display: flex !important; /* show only on print */
    }
}

/* ============================================================
   ANTIGRAVITY 2.0 PORTAL & APP LAUNCHER STYLES
   ============================================================ */

/* Portal and App display visibility rules */
body.in-portal .portal-only {
    display: flex !important;
}
body.in-portal .car-booking-only {
    display: none !important;
}

body.in-car-booking .portal-only {
    display: none !important;
}
body.in-car-booking .car-booking-only {
    display: flex !important;
}
body.in-car-booking .car-booking-only.menu-item {
    display: flex !important;
}

/* Hide quick stats in topbar when in portal home or portal user management */
body.in-portal .header-stats {
    display: none !important;
}

/* App Launcher Grid & Cards styling */
.app-launcher-grid {
    margin-top: 20px;
}

.app-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 250px;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4) !important;
}

#launcher-user-mgmt:hover {
    box-shadow: 0 16px 32px rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.4) !important;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover::before {
    opacity: 1;
}

/* Locked App Specifics */
.locked-app {
    cursor: not-allowed !important;
}

.locked-app:hover {
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
    border-color: var(--border-color) !important;
}

/* Admin Only badge style */
.admin-only-badge {
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Hide admin app cards for non-admins */
body:not(.admin-mode) #launcher-user-mgmt {
    display: none !important;
}

/* ============================================================
   USER MODAL — SECTION LABELS & APP PERMISSIONS GRID
   ============================================================ */

/* Section divider label inside modal forms */
.modal-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-primary);
    padding: 10px 0 6px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}
.modal-section-label:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

/* App Permissions Checkbox Grid */
.app-permissions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
}

.perm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.perm-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Unchecked state */
.perm-checkbox-item::after {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid var(--text-muted);
    background: transparent;
    position: absolute;
    top: 10px;
    right: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Checked state */
.perm-checkbox-item:has(input:checked)::after {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3 4L11 1' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.perm-checkbox-item:has(input:checked) {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.08);
}

.perm-checkbox-item:hover:not(.locked-perm) {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-1px);
}

.perm-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.perm-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.perm-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.perm-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* Locked (coming soon) permission items */
.locked-perm {
    opacity: 0.45;
    cursor: not-allowed;
}
.locked-perm:hover {
    transform: none !important;
    border-color: var(--border-color) !important;
    background: rgba(255,255,255,0.03) !important;
}


/* ============================================================
   LEAVE MANAGEMENT SYSTEM — Styles
   ============================================================ */
.leave-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.leave-quota-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 12px; }
.leave-quota-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: all 0.25s ease; }
.leave-quota-card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-2px); }
.leave-quota-card .lqc-title { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.leave-quota-card .lqc-numbers { display: flex; justify-content: space-between; align-items: baseline; }
.leave-quota-card .lqc-remaining { font-size: 28px; font-weight: 800; color: white; line-height: 1; }
.leave-quota-card .lqc-total { font-size: 12px; color: var(--text-muted); }
.leave-quota-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.leave-quota-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.leave-status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.lsb-pending-supervisor { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.lsb-pending-hr { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.lsb-approved { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.lsb-rejected { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.lsb-cancelled { background: rgba(107,114,128,0.15); color: #9ca3af; border: 1px solid rgba(107,114,128,0.3); }
.leave-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.leave-table th { text-align: left; padding: 10px 14px; color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-color); }
.leave-table td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-secondary); vertical-align: middle; }
.leave-table tr:last-child td { border-bottom: none; }
.leave-table tr:hover td { background: rgba(255,255,255,0.02); }
.leave-days-preview { background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25); border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; color: #a5b4fc; font-size: 14px; }
.leave-days-preview i { color: #6366f1; font-size: 18px; }
.leave-days-preview strong { color: white; font-size: 20px; margin: 0 2px; }
.leave-approval-result-box { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.3); border-radius: var(--radius-lg); padding: 28px; text-align: center; margin-top: 16px; }
.leave-approval-result-box .lar-icon { font-size: 48px; color: #10b981; margin-bottom: 12px; }
.leave-approval-result-box h4 { font-size: 20px; font-weight: 700; color: white; margin-bottom: 8px; }
.leave-link-box { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 10px 14px; margin-top: 8px; overflow: hidden; }
.leave-link-box span { flex: 1; font-family: monospace; font-size: 12px; color: #a5b4fc; overflow-wrap: anywhere; word-break: break-all; }
.leave-approval-overlay { position: fixed; inset: 0; z-index: 9999; background: var(--bg-primary); overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.leave-approval-page { width: 100%; max-width: 640px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 20px; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,0.5); }
.lap-header { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); padding: 24px 28px; display: flex; align-items: center; gap: 16px; }
.lap-header h2 { font-size: 20px; font-weight: 700; color: white; margin: 0; }
.lap-header p { font-size: 13px; color: rgba(255,255,255,0.75); margin: 4px 0 0; }
.lap-loading { padding: 60px; text-align: center; color: var(--text-muted); font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.lap-error { padding: 40px; text-align: center; color: #ef4444; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; }
#lap-content { padding: 28px; }
.lap-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.lap-info-item { display: flex; flex-direction: column; gap: 4px; }
.lap-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.lap-info-item strong { font-size: 14px; color: white; font-weight: 600; }
.lap-timeline { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; position: relative; padding-left: 24px; }
.lap-timeline::before { content: ''; position: absolute; left: 8px; top: 12px; bottom: 12px; width: 2px; background: var(--border-color); }
.lap-timeline-step { position: relative; padding: 10px 0 10px 20px; display: flex; flex-direction: column; gap: 2px; }
.lap-timeline-step::before { content: ''; position: absolute; left: -16px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--border-color); border: 2px solid var(--bg-secondary); }
.lap-timeline-step.done::before { background: #10b981; }
.lap-timeline-step.active::before { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.lap-timeline-step.rejected::before { background: #ef4444; }
.lap-timeline-step-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.lap-timeline-step-meta { font-size: 12px; color: var(--text-muted); }
.lap-next-step { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.3); border-radius: var(--radius-lg); padding: 20px; margin-top: 20px; }
.lap-next-step h4 { font-size: 15px; color: #10b981; margin-bottom: 10px; }
.lap-final-result { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: var(--radius-lg); background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #10b981; font-size: 15px; font-weight: 600; margin-top: 20px; }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1f1100; }
.btn-warning:hover { background: linear-gradient(135deg, #fbbf24, #f59e0b); transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.btn-success:hover { background: linear-gradient(135deg, #34d399, #10b981); transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.btn-danger:hover { background: linear-gradient(135deg, #f87171, #ef4444); transform: translateY(-1px); }
.kpi-danger { background: rgba(239,68,68,0.15); color: #ef4444; }
.leave-form { display: flex; flex-direction: column; gap: 16px; }
@media (max-width:600px) { .lap-info-grid { grid-template-columns: 1fr; } .leave-quota-grid { grid-template-columns: 1fr 1fr; } }
