/* Custom Stylesheet - Holiday & Sickness Management System */

:root {
    --font-primary: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Color Palette */
    --bg-primary: #0b0f19;
    --bg-gradient: linear-gradient(145deg, #0b1329 0%, #080b11 100%);
    --panel-glow: radial-gradient(circle at 50% -20%, rgba(237, 28, 36, 0.12), transparent 70%);
    
    /* Glassmorphism Tokens */
    --glass-bg: rgba(17, 24, 39, 0.6);
    --glass-bg-hover: rgba(31, 41, 55, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-border-focus: rgba(237, 28, 36, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    
    /* Accent Colors */
    --color-primary: #ed1c24; /* Lister Red */
    --color-primary-grad: linear-gradient(135deg, #ed1c24 0%, #b9151b 100%);
    --color-success: #10b981;
    --color-success-grad: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --color-danger: #ef4444;
    --color-danger-grad: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --color-warning: #f59e0b;
    --color-warning-grad: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --color-purple: #a855f7;
    --color-purple-grad: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
    --color-grey: #64748b;
    --color-dark-grey: #334155;
    
    /* Dedicated Calendar Event Colors (Blue for approved holiday to prevent clashing with sickness/red) */
    --color-cal-holiday: #3b82f6;
    --color-cal-holiday-grad: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    
    /* Text Colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    /* Dimensions */
    --sidebar-width: 280px;
    --header-height: 80px;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Layout */
#app {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Spinner Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(237, 28, 36, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    border-left: 4px solid var(--color-primary);
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    transform: translateX(120%);
    animation: slideIn 0.3s forwards ease-out;
}
.toast.success { border-left-color: var(--color-success); }
.toast.error { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-warning); }

@keyframes slideIn {
    to { transform: translateX(0); }
}

/* LOGIN SCREEN */
.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(237, 28, 36, 0.08) 0%, transparent 60%);
}
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    animation: fadeInScale 0.4s ease-out;
    background-image: var(--panel-glow);
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.logo-container-lg {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.login-logo-img {
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(237, 28, 36, 0.3));
    animation: bounceSlow 3s infinite ease-in-out;
}
@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}
.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-main);
    font-family: var(--font-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}
.form-group select option {
    background-color: #0f172a; /* Dark slate background for options */
    color: var(--text-main);    /* White text for contrast */
}
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--glass-border-focus);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.15); /* Lister Red focus glow */
}

/* Calendar Input Picker Icon Contrast */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:active {
    transform: scale(0.97);
}
.btn-primary {
    background: var(--color-primary-grad);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    filter: brightness(1.1);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}
.btn-danger {
    background: var(--color-danger-grad);
    color: white;
}
.btn-danger:hover {
    filter: brightness(1.1);
}
.btn-outline {
    background: transparent;
    border-color: var(--glass-border);
    color: var(--text-main);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}
.btn-block {
    width: 100%;
}
.btn-icon {
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
}
.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* APP MAIN LAYOUT */
.main-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
}
.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.sidebar-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}
.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.user-profile-panel {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--color-primary-grad);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}
.user-info h4 {
    font-size: 14px;
    font-weight: 600;
}
.user-info span {
    font-size: 11px;
    color: var(--text-muted);
}
.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}
.sidebar-nav ul {
    list-style: none;
}
.nav-item {
    margin-bottom: 5px;
}
.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.nav-item a i {
    width: 18px;
    font-size: 16px;
    text-align: center;
}
.nav-item a:hover, 
.nav-item.active a {
    color: white;
    background: rgba(255, 255, 255, 0.04);
}
.nav-item.active a {
    background: var(--color-primary-grad);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.badge {
    background: var(--color-warning-grad);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}
.sidebar-footer {
    padding: 20px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.btn-logout {
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    justify-content: flex-start;
    padding-left: 16px;
}
.btn-logout:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
}

/* Content Pane */
.content-pane {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 40px;
}
.content-view {
    animation: fadeIn 0.3s ease-in-out;
    max-width: 1400px;
    margin: 0 auto;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}
.view-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}
.view-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Panels */
.panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 25px;
}
.panel-header {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 12px;
}
.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* Grid Layouts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.stat-card.balance {
    background-image: var(--panel-glow);
    border-color: rgba(59, 130, 246, 0.2);
}
.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.stat-header h3 {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-header i {
    font-size: 16px;
}
.stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-card.balance .stat-value {
    color: var(--color-primary);
}
.stat-unit {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
@media (max-width: 1024px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

.form-row {
    display: flex;
    gap: 15px;
}
.col-6 { width: 50%; }
.col-12 { width: 100%; }

/* Date Request Preview */
.calc-preview {
    background: rgba(59, 130, 246, 0.08);
    border: 1px dashed rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    animation: slideDown 0.2s forwards;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.preview-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 8px;
}
.preview-metric strong {
    font-size: 20px;
    color: var(--color-primary);
}
.preview-warnings {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
    margin-top: 10px;
}
.preview-warnings h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-warning);
    margin-bottom: 5px;
    text-transform: uppercase;
}
.preview-warnings ul {
    list-style: none;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.preview-warnings li {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}
.preview-warnings li::before {
    content: "•";
    color: var(--color-warning);
}

/* Lists and Lists Views */
.upcoming-leave-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.leave-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}
.leave-item-card:hover {
    background: rgba(255, 255, 255, 0.04);
}
.leave-dates {
    font-size: 14px;
    font-weight: 500;
}
.leave-dates small {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 2px;
}
.leave-length {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Data Tables */
.table-container {
    overflow-x: auto;
    width: 100%;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}
.data-table th, 
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.data-table th {
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}
.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}
.status-pill.approved { background: rgba(16, 185, 129, 0.12); color: var(--color-success); }
.status-pill.pending { background: rgba(245, 158, 11, 0.12); color: var(--color-warning); }
.status-pill.rejected { background: rgba(239, 68, 68, 0.12); color: var(--color-danger); }
.status-pill.cancelled { background: rgba(100, 116, 139, 0.12); color: var(--color-grey); }

/* Collision Badges */
.collision-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 5px;
    display: inline-block;
    margin-bottom: 4px;
}
.collision-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
}

/* CALENDAR STYLING */
.calendar-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 20%;
    display: inline-block;
}
.legend-dot.holiday { background: var(--color-primary); }
.legend-dot.pending { background: var(--color-warning); }
.legend-dot.sickness { background: var(--color-danger); }
.legend-dot.bankhol { background: var(--color-grey); }
.legend-dot.closure { background: var(--color-purple); }
.legend-dot.blocked { background: var(--color-dark-grey); }

.calendar-wrapper {
    padding: 20px;
}
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.calendar-controls h2 {
    font-size: 20px;
    font-weight: 600;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
}
.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(110px, auto);
    width: 100%;
    grid-column: span 7;
}
.calendar-day-cell {
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.calendar-day-cell:nth-child(7n) {
    border-right: none;
}
.calendar-day-cell.other-month {
    opacity: 0.25;
    background: rgba(0, 0, 0, 0.05);
}
.calendar-day-cell:hover {
    background: rgba(255, 255, 255, 0.02);
}
.calendar-day-number {
    font-size: 12px;
    font-weight: 500;
    align-self: flex-start;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}
.calendar-day-cell.today .calendar-day-number {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}
.calendar-events-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 80px;
}
.calendar-event-pill {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.calendar-event-pill.approved_holiday { background: var(--color-cal-holiday-grad); }
.calendar-event-pill.pending_holiday { background: var(--color-warning-grad); }
.calendar-event-pill.sickness { background: var(--color-danger-grad); }
.calendar-event-pill.bank_holiday { background: var(--color-grey); }
.calendar-event-pill.mandatory_closure { background: var(--color-purple-grad); }
.calendar-event-pill.blocked_day { background: var(--color-dark-grey); }

/* SYSTEM ADMIN PANEL */
.admin-tabs {
    display: flex;
    gap: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 25px;
}
.admin-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 20px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}
.admin-tab:hover {
    color: white;
}
.admin-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.admin-tab-content {
    animation: fadeIn 0.2s ease;
}
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.tab-header h2 {
    font-size: 18px;
    font-weight: 600;
}
.inline-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}
.inline-form .form-group {
    margin-bottom: 0;
    flex: 1;
}
.inline-form label {
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 12px;
}
.admin-grid-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}
.setting-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.setting-list li {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 10px 14px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.setting-list li small {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
}
.weekday-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.weekday-grid label {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 6px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.mini-table {
    max-height: 250px;
    overflow-y: auto;
}
.reset-panel h2 {
    color: var(--color-danger);
    font-weight: 600;
    margin-bottom: 10px;
}
.warning-text {
    background: rgba(239, 68, 68, 0.06);
    border-left: 4px solid var(--color-danger);
    padding: 15px;
    border-radius: 6px;
    color: var(--text-main);
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.6;
}
.warning-text i {
    color: var(--color-danger);
    margin-right: 6px;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.25s forwards;
}
.modal-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 500px;
    padding: 30px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    background-image: var(--panel-glow);
}
.modal-card.large-modal {
    max-width: 760px;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}
.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}
.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}
.modal-close:hover {
    color: white;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}
.checkbox-options {
    display: flex;
    gap: 15px;
    margin-top: 6px;
}
.checkbox-options label {
    text-transform: capitalize;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* Tooltip/Day Details Styling */
.day-details-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.day-detail-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 10px 14px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.day-detail-label {
    font-size: 13px;
    font-weight: 500;
}
.day-detail-val {
    font-size: 14px;
}

/* --- MOBILE RESPONSIVE VIEWS (< 768px) --- */
@media (max-width: 768px) {
    /* 1. Layout Adjustments */
    #app {
        flex-direction: column;
        min-height: 100vh;
    }
    
    .main-layout {
        flex-direction: column;
        min-height: 100vh;
        width: 100%;
    }
    
    /* 2. Transform Sidebar into a Top Banner Header */
    .sidebar {
        width: 100% !important;
        height: 60px !important;
        position: sticky !important;
        top: 0;
        left: 0;
        right: 0;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 16px !important;
        border-right: none !important;
        border-bottom: 1px solid var(--glass-border) !important;
        z-index: 999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    }
    
    .sidebar-header {
        padding: 0 !important;
        border-bottom: none !important;
        gap: 8px !important;
    }
    
    .sidebar-header h2 {
        font-size: 16px !important;
    }
    
    .sidebar-logo-img {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Hide profile panel and sidebar navigation completely on mobile for Employees */
    .main-layout.role-employee .sidebar .user-profile-panel,
    .main-layout.role-employee .sidebar .sidebar-nav {
        display: none !important;
    }
    
    /* Optimize logout button layout on the mobile header */
    .sidebar .sidebar-footer {
        padding: 0 !important;
        border-top: none !important;
    }
    
    .sidebar .btn-logout {
        width: auto !important;
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid var(--glass-border) !important;
        padding: 6px 12px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
        gap: 6px !important;
    }
    
    /* 3. Content Pane Optimization */
    .content-pane {
        padding: 20px 16px !important;
        height: auto !important;
        overflow-y: visible !important;
    }
    
    .view-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        margin-bottom: 20px !important;
    }
    
    .view-header h1 {
        font-size: 22px !important;
    }
    
    .view-header p {
        font-size: 13px !important;
    }
    
    /* 4. Stats Grid - Hide non-essential cards for employees to save space */
    .main-layout.role-employee .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    
    /* Hide Base, Adjustments, Mandatory cards for employees on mobile */
    .main-layout.role-employee .stats-grid .stat-card:nth-child(2),
    .main-layout.role-employee .stats-grid .stat-card:nth-child(3),
    .main-layout.role-employee .stats-grid .stat-card:nth-child(4) {
        display: none !important;
    }
    
    /* Make Remaining Balance card span full width for prominence */
    .main-layout.role-employee .stats-grid .stat-card.balance {
        grid-column: span 2 !important;
        padding: 24px 20px !important;
        background: radial-gradient(circle at 50% -20%, rgba(237, 28, 36, 0.18), transparent 70%), var(--glass-bg) !important;
    }
    
    .main-layout.role-employee .stats-grid .stat-card.balance .stat-value {
        font-size: 40px !important;
        margin-bottom: 8px !important;
    }
    
    .stat-card {
        padding: 16px !important;
    }
    
    .stat-value {
        font-size: 24px !important;
    }
    
    /* 5. Form & Workspace Adjustments */
    .workspace-grid {
        gap: 20px !important;
    }
    
    .panel {
        padding: 16px !important;
        margin-bottom: 16px !important;
    }
    
    .panel-header {
        margin-bottom: 15px !important;
        padding-bottom: 10px !important;
    }
    
    .panel-header h2 {
        font-size: 16px !important;
    }
    
    /* Boost mobile form input tap size to prevent iOS automatic zoom */
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 16px !important;
        padding: 12px 14px !important;
    }
    
    .form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .form-row .col-6 {
        width: 100% !important;
    }
    
    .btn-block {
        padding: 12px 18px !important;
        font-size: 15px !important;
    }
    
    /* 6. Mobile Warning Overlay for Managers / Administrators */
    .mobile-manager-warning-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        min-height: calc(100vh - 100px); /* Fill screen space minus header */
        padding: 20px;
        background: radial-gradient(circle at center, rgba(237, 28, 36, 0.04) 0%, transparent 70%);
        z-index: 1000;
        animation: fadeIn 0.3s ease-out;
    }
    
    .warning-card {
        background: var(--glass-bg);
        backdrop-filter: blur(16px);
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        padding: 30px;
        max-width: 400px;
        width: 100%;
        text-align: center;
        box-shadow: var(--glass-shadow);
        background-image: var(--panel-glow);
    }
    
    .warning-icon-wrapper {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: rgba(237, 28, 36, 0.1);
        border: 1px solid rgba(237, 28, 36, 0.2);
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto 20px auto;
    }
    
    .warning-icon-wrapper i {
        font-size: 24px;
        color: var(--color-primary);
    }
    
    .warning-card h2 {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 12px;
        color: var(--text-main);
    }
    
    .warning-card p {
        font-size: 14px;
        color: var(--text-muted);
        line-height: 1.6;
        margin-bottom: 24px;
    }
    
    /* Trigger visibility based on roles for managers/admins on mobile viewport */
    .main-layout.role-manager .mobile-manager-warning-container,
    .main-layout.role-admin .mobile-manager-warning-container {
        display: flex !important;
    }
    
    /* Hide normal dashboards for managers/admins on mobile */
    .main-layout.role-manager .content-pane,
    .main-layout.role-admin .content-pane {
        display: none !important;
    }
    
    /* For Managers/Admins, adjust their mobile header sidebar specifically */
    .main-layout.role-manager .sidebar,
    .main-layout.role-admin .sidebar {
        /* Keep header, but hide navigation elements */
    }
    
    .main-layout.role-manager .sidebar .user-profile-panel,
    .main-layout.role-admin .sidebar .user-profile-panel,
    .main-layout.role-manager .sidebar .sidebar-nav,
    .main-layout.role-admin .sidebar .sidebar-nav {
        display: none !important;
    }
}

