/* Office Car Booking System & Admin Portal - Premium Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Premium Futuristic Dark */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-card: rgba(17, 24, 39, 0.65);
    
    /* Accents - Sleek Indigo, Cyan, and Violet gradients */
    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-primary-glow: rgba(99, 102, 241, 0.35);
    
    --accent-secondary: #06b6d4;
    --accent-secondary-hover: #0891b2;
    --accent-secondary-glow: rgba(6, 182, 212, 0.3);
    
    --accent-tertiary: #a855f7;
    
    /* Text */
    --text-main: #f3f4f6;
    --text-secondary: #cbd5e1;
    --text-muted: #6b7280;
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.5);
    
    /* Status Colors (HSL optimized for soft glows) */
    --status-available-bg: rgba(16, 185, 129, 0.12);
    --status-available-text: #34d399;
    --status-available-glow: rgba(16, 185, 129, 0.25);
    
    --status-maintenance-bg: rgba(245, 158, 11, 0.12);
    --status-maintenance-text: #fbbf24;
    
    --status-out-bg: rgba(239, 68, 68, 0.12);
    --status-out-text: #f87171;
    
    --status-pending-bg: rgba(245, 158, 11, 0.12);
    --status-pending-text: #fbbf24;
    --status-pending-glow: rgba(245, 158, 11, 0.25);
    
    --status-approved-bg: rgba(16, 185, 129, 0.12);
    --status-approved-text: #34d399;
    --status-approved-glow: rgba(16, 185, 129, 0.25);
    
    --status-rejected-bg: rgba(239, 68, 68, 0.12);
    --status-rejected-text: #f87171;
    
    --status-completed-bg: rgba(59, 130, 246, 0.12);
    --status-completed-text: #60a5fa;

    /* Typography */
    --font-heading: 'Noto Sans Thai', 'Outfit', sans-serif;
    --font-body: 'Noto Sans Thai', 'Outfit', sans-serif;
    
    /* Radii & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    
    --transition-speed: 0.25s;
}

/* Global Reset */
* {
    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.15px;
    line-height: 1.6;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
    border: 2px solid var(--bg-primary);
}
::-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) cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.logo-img-file {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.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 4px 15px rgba(99, 102, 241, 0.3);
}

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

.logo-title {
    font-family: var(--font-heading);
    font-size: 18px;
    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: rgba(255, 255, 255, 0.03);
    color: white;
}

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

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

.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: 13.5px;
    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: 22px;
    font-weight: 700;
}

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

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

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

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

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

/* Language Switcher Capsule Widget */
.lang-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2px;
    gap: 2px;
    height: 32px;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.lang-btn:hover:not(.active) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.active-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
}

.active-user-badge i {
    color: var(--accent-secondary);
}

/* 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: 22px;
    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: 17px;
    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: 12.5px;
    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);
}

/* Glass Panels and Cards */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.glass-panel:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 12px rgba(99, 102, 241, 0.08);
}

/* App Launcher Grid & Cards */
.app-card {
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* KPI Statistics Cards */
.stats-row {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

.grid-4-columns {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: var(--radius-md);
}

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

.kpi-primary { background: rgba(99, 102, 241, 0.15); color: var(--accent-primary); }
.kpi-secondary { background: rgba(6, 182, 212, 0.15); color: var(--accent-secondary); }
.kpi-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.kpi-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.kpi-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

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

.kpi-value {
    font-size: 19px;
    font-weight: 700;
    color: white;
    margin-top: 2px;
}

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

/* 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(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition-speed) ease;
}

.car-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.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.04);
}

.car-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    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: 16px;
    font-weight: 700;
    color: white;
}

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

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

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

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

.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); }

.status-out { color: var(--status-out-text); }
.status-out .status-dot { background-color: var(--status-out-text); }

/* Table and Cards Styling */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.table-card {
    margin-top: 16px;
}

.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 {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.badge-pending { background-color: var(--status-pending-bg); color: var(--status-pending-text); box-shadow: 0 0 10px rgba(245, 158, 11, 0.1); }
.badge-approved { background-color: var(--status-approved-bg); color: var(--status-approved-text); box-shadow: 0 0 10px rgba(16, 185, 129, 0.1); }
.badge-rejected { background-color: var(--status-rejected-bg); color: var(--status-rejected-text); }
.badge-completed { background-color: var(--status-completed-bg); color: var(--status-completed-text); }

.badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Form Controls & Buttons */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.form-control {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13.5px;
    color: white;
    font-family: var(--font-body);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

select.form-control option {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary-glow);
}

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

/* Fix for readonly inputs - browsers sometimes override color with system grey */
.form-control[readonly] {
    color: var(--text-main);
    -webkit-text-fill-color: var(--text-main);
    opacity: 1;
    cursor: default;
}
.form-control[readonly]:focus {
    border-color: var(--border-color);
    box-shadow: none;
}


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

.split-row > div {
    flex: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: var(--font-body);
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    justify-content: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-primary-hover), #6d28d9);
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

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

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

.btn-danger:hover {
    background-color: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11.5px;
    border-radius: 6px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-group {
    display: flex;
    gap: 8px;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(6, 9, 17, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

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

.modal-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.modal-header h3 {
    font-size: 17px;
    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;
}

.modal-section-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin: 8px 0 16px 0;
}

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

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

.selected-car-preview img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    background-color: var(--bg-tertiary);
}

.selected-car-preview .preview-info h4 {
    font-size: 14.5px;
    font-weight: 700;
}

.selected-car-preview .preview-info span {
    font-size: 11.5px;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

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

.password-input-wrapper input {
    width: 100%;
    padding-right: 42px;
}

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

.password-toggle-btn:hover {
    color: var(--text-secondary);
}

/* User Management Extras */
.users-stats-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.user-stat-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 500;
}

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

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13.5px;
    color: white;
}

.avatar-admin { background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary)); }
.avatar-user { background: linear-gradient(135deg, var(--accent-secondary), #0ea5e9); }

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

.user-avatar-info .u-name {
    font-weight: 600;
    color: white;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.self-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.protected-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.role-admin { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.role-user { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }

.account-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
}

.status-active { color: #34d399; }
.status-inactive { color: #f87171; }

.app-permissions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.perm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.perm-checkbox-item:hover:not(.locked-perm) {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
}

.perm-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
}

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

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

.perm-name {
    font-size: 12.5px;
    font-weight: 600;
    color: white;
}

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

.locked-perm {
    opacity: 0.4;
    cursor: not-allowed;
}

.edit-hint-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: #fbbf24;
    font-size: 12px;
    margin-bottom: 16px;
}

/* Month Calendar styling */
.month-calendar-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
}

.weekday-cell {
    padding: 8px 0;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-cell {
    min-height: 100px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.calendar-day-cell:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
}

.calendar-day-cell.other-month {
    opacity: 0.3;
}

.calendar-day-cell.today {
    background-color: rgba(99, 102, 241, 0.05);
    border-color: var(--accent-primary);
}

.calendar-day-cell.today .calendar-day-number {
    background-color: var(--accent-primary);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

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

.calendar-day-number {
    font-size: 12px;
    font-weight: 600;
}

.btn-day-add-booking {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity var(--transition-speed), color var(--transition-speed);
}

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

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

.calendar-day-bookings {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: hidden;
    flex: 1;
}

.month-booking-pill {
    font-size: 9px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.month-booking-pill.status-pending { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; border-left: 2px solid #fbbf24; }
.month-booking-pill.status-approved { background-color: rgba(16, 185, 129, 0.15); color: #34d399; border-left: 2px solid #34d399; }

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

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

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-pending { background-color: rgba(245, 158, 11, 0.2); border-left: 2px solid #fbbf24; }
.legend-approved { background-color: rgba(16, 185, 129, 0.2); border-left: 2px solid #34d399; }

/* Login Screen */
.login-backdrop-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
                      radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.4s ease;
}

.login-lang-switcher {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
}

.login-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 440px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: scaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.login-logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    margin-bottom: 30px;
}

.login-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.login-logo-icon {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

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

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

.login-header-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

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

.login-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    font-size: 14px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: 90%;
}

.toast {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

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

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

.toast-content {
    flex: 1;
}

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

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

.toast-success { border-left: 3px solid #34d399; }
.toast-success .toast-icon { color: #34d399; }
.toast-error { border-left: 3px solid #f87171; }
.toast-error .toast-icon { color: #f87171; }
.toast-info { border-left: 3px solid #60a5fa; }
.toast-info .toast-icon { color: #60a5fa; }

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

.form-error-msg {
    color: #f87171;
    font-size: 12px;
    font-weight: 500;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin: 12px 0;
}

/* Visibility Control Classes based on Auth State */
body.not-logged-in .app-container { display: none; }
body.not-logged-in #login-screen { display: flex; opacity: 1; }
body.logged-in #login-screen { display: none; }
body.logged-in .app-container { display: grid; }

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

/* Hide car stats bubble header outside the car booking app */
body:not(.in-car-booking) .header-stats { display: none !important; }

/* Admin visibility controls */
body:not(.admin-mode) .admin-only { display: none !important; }
body:not(.admin-mode) .admin-only-badge { display: none !important; }

/* Odometer Distance Calculation Box */
.distance-calculator-box {
    transition: all 0.25s ease;
}

/* Report Styles & Print Layout */
.report-print-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.report-header-print {
    text-align: center;
    margin-bottom: 30px;
}

.report-header-print h2 {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.report-subtitle {
    font-size: 13.5px;
    color: var(--accent-secondary);
    margin-top: 4px;
    font-weight: 600;
}

.report-date-generated {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    display: block;
}

.report-summary-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

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

.summary-item .lbl {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

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

.summary-item.total-highlight .val {
    color: #34d399;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-success { color: #34d399 !important; }
.text-warning { color: #fbbf24 !important; }

/* Responsive Layout */
@media (max-width: 991px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }
    .sidebar-open .sidebar {
        transform: translateX(0);
    }
    .mobile-toggle {
        display: block;
    }
    .main-content {
        padding: 0 20px 20px 20px;
    }
    .topbar {
        padding: 16px 0;
    }
}

@media (max-width: 768px) {
    .topbar-right {
        gap: 12px;
    }
    .header-stats {
        display: none;
    }
    .app-permissions-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Print CSS Styles */
@media print {
    body {
        background-color: white !important;
        color: black !important;
        font-size: 11pt;
    }
    .no-print {
        display: none !important;
    }
    .sidebar, .topbar {
        display: none !important;
    }
    .main-content {
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
    .report-print-container {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .report-header-print h2 {
        color: black !important;
    }
    .report-summary-bar {
        border: 1px solid #ccc !important;
        background: #f9f9f9 !important;
    }
    .summary-item .val {
        color: black !important;
    }
    .summary-item.total-highlight .val {
        color: black !important;
    }
    .data-table {
        color: black !important;
    }
    .data-table th {
        background-color: #eee !important;
        color: black !important;
        border-bottom: 2px solid black !important;
    }
    .data-table td {
        border-bottom: 1px solid #ccc !important;
        color: black !important;
    }
    .data-table th, .data-table td {
        padding: 8px 12px !important;
    }
    .car-badge {
        background: none !important;
        border: 1px solid #ccc !important;
        color: black !important;
    }
    /* Printable report adjustments */
    * {
        color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
}

/* Google Account Chooser UI */
.google-chooser-card {
    background: #ffffff !important;
    color: #202124 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    border-radius: 8px !important;
    border: 1px solid #dadce0 !important;
}

.google-accounts-list {
    display: flex;
    flex-direction: column;
}

.google-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f1f3f4;
}

.google-account-item:last-child {
    border-bottom: none;
}

.google-account-item:hover {
    background-color: #f7f8f9;
}

.google-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1a73e8;
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
}

.google-account-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.google-account-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #3c4043;
}

.google-account-email {
    font-size: 11px;
    color: #5f6368;
}

.google-account-role {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background-color: #e8f0fe;
    color: #1a73e8;
    margin-left: auto;
}

.google-account-role.admin-role {
    background-color: #fce8e6;
    color: #d93025;
}

/* Login Divider */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0;
    color: var(--text-muted);
}

.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.login-divider:not(:empty)::before {
    margin-right: .5em;
}

.login-divider:not(:empty)::after {
    margin-left: .5em;
}

.login-divider span {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.google-login-btn {
    width: 100%;
    background-color: #ffffff !important;
    color: #3c4043 !important;
    border: 1px solid #dadce0 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    margin-top: 8px;
}

.google-login-btn:hover {
    background-color: #f7f8f9 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.google-icon-svg {
    margin-right: 8px;
    flex-shrink: 0;
}

/* Car Expiry Warning Badges */
.car-expiry-warnings {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.expiry-warn-badge {
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.expiry-warn-badge.expiry-soon {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.expiry-warn-badge.expiry-expired {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

/* Leave System Layout & Sidebar Controls */
body.in-portal .leave-only { display: none !important; }
body.in-car-booking .leave-only { display: none !important; }
body.in-leave .portal-only { display: none !important; }
body.in-leave .car-booking-only { display: none !important; }
body.in-leave .leave-only { display: flex !important; }

/* Memo System app CSS visibility rules */
body.in-portal .memo-only { display: none !important; }
body.in-car-booking .memo-only { display: none !important; }
body.in-leave .memo-only { display: none !important; }
body.in-memo .portal-only { display: none !important; }
body.in-memo .car-booking-only { display: none !important; }
body.in-memo .leave-only { display: none !important; }
body.in-memo .memo-only { display: flex !important; }

/* Supervisor Approval Overlay */
.supervisor-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at top left, #1e293b, #0f172a);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.supervisor-backdrop.active {
    display: flex;
}

.supervisor-card {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 580px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    color: white;
}

.signature-pad-container {
    margin-top: 16px;
    margin-bottom: 20px;
}

.signature-canvas {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: #fafafa;
    cursor: crosshair;
    width: 100%;
    height: 200px;
    touch-action: none; /* Prevents scroll when signing */
}

.signature-display-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 40px;
    max-width: 120px;
    overflow: hidden;
}

.signature-thumbnail {
    height: 32px;
    object-fit: contain;
    filter: invert(1) hue-rotate(180deg); /* Invert black signature lines for dark theme display */
}

/* Redesigned Leave System Styles */
.leave-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.leave-type-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.leave-type-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.leave-type-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.leave-type-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Active states for each card type with their specific colors */
.leave-type-card.active[data-type="Compensatory"] {
    border-color: #6366f1 !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.08);
}
.leave-type-card.active[data-type="Compensatory"] .leave-type-icon {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.leave-type-card.active[data-type="Business"] {
    border-color: #f59e0b !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.08);
}
.leave-type-card.active[data-type="Business"] .leave-type-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.leave-type-card.active[data-type="Vacation"] {
    border-color: #06b6d4 !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.08);
}
.leave-type-card.active[data-type="Vacation"] .leave-type-icon {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

.leave-type-card.active[data-type="Sick"] {
    border-color: #ef4444 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.08);
}
.leave-type-card.active[data-type="Sick"] .leave-type-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.leave-type-card.active[data-type="Maternity"] {
    border-color: #ec4899 !important;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.3);
    background: rgba(236, 72, 153, 0.08);
}
.leave-type-card.active[data-type="Maternity"] .leave-type-icon {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

.leave-type-card.active[data-type="Ordination"] {
    border-color: #f97316 !important;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.08);
}
.leave-type-card.active[data-type="Ordination"] .leave-type-icon {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.leave-type-card.active[data-type="Study"] {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.08);
}
.leave-type-card.active[data-type="Study"] .leave-type-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.leave-type-card.active[data-type="Other"] {
    border-color: #94a3b8 !important;
    box-shadow: 0 0 15px rgba(148, 163, 184, 0.3);
    background: rgba(148, 163, 184, 0.08);
}
.leave-type-card.active[data-type="Other"] .leave-type-icon {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

/* Leave form input group with icon */
.leave-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    transition: border-color 0.2s ease;
}
.leave-input-group:focus-within {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.leave-input-group input {
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 15px;
    padding: 0;
    margin: 0;
    width: 100%;
    outline: none;
}

/* Leave form section labels */
.leave-form-label {
    color: white;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

/* Leave KPI mini cards */
.leave-kpi-mini {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    background: rgba(17,24,39,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.leave-kpi-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Improved leave record cards */
.leave-record-card {
    background: rgba(17, 24, 39, 0.45);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.leave-record-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}


/* Allowance progress meters */
.leave-allowance-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.leave-allowance-card {
    background: rgba(17, 24, 39, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leave-allowance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leave-allowance-title {
    font-size: 13.5px;
    font-weight: 700;
    color: white;
}

.leave-allowance-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

.leave-allowance-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.leave-allowance-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.leave-allowance-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    color: var(--text-muted);
}

.leave-allowance-days-used {
    font-size: 18px;
    font-weight: 800;
    color: white;
}

/* Timeline elements for history lists */
.leave-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.leave-record-card {
    background: rgba(17, 24, 39, 0.45);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    transition: all 0.3s ease;
}

.leave-record-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .leave-record-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.leave-record-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leave-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.leave-type-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: white;
    font-size: 15px;
}

.leave-record-details {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.leave-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 10px;
    padding-top: 20px;
}

.leave-timeline::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 2;
    flex: 1;
    text-align: center;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.timeline-step.active .timeline-dot {
    background: var(--accent-primary);
    border-color: white;
    box-shadow: 0 0 10px var(--accent-primary-glow);
}

.timeline-step.success .timeline-dot {
    background: #10b981;
    border-color: white;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.timeline-step.danger .timeline-dot {
    background: #ef4444;
    border-color: white;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.timeline-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.timeline-step.active .timeline-label,
.timeline-step.success .timeline-label {
    color: white;
}

/* Formal Document Design for Supervisor approval */
.leave-doc-preview {
    background: #ffffff;
    color: #1e293b;
    border-radius: var(--radius-sm);
    padding: 24px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.8;
    border: 1px solid #e2e8f0;
}

.leave-doc-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 14.5px;
    text-align: center;
}

.leave-doc-body {
    margin-bottom: 24px;
}

.leave-doc-footer {
    border-top: 1px dashed #cbd5e1;
    padding-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.leave-doc-sig-line {
    width: 160px;
    border-bottom: 1px solid #64748b;
    text-align: center;
    font-size: 11.5px;
    color: #64748b;
    padding-bottom: 4px;
}

/* Slide Panel Animations */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

