/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* CSS Variables for consistent theming - Dark Theme Default */
:root {
    /* Colors */
    --primary-color: #00d4ff;
    --primary-dark: #0099cc;
    --secondary-color: #6c5ce7;
    --accent-color: #ff3366;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --error-color: #e17055;
    
    /* Backgrounds */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-modal: rgba(26, 26, 46, 0.95);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a3bd;
    --text-muted: #6c7293;
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(0, 212, 255, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.2);
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Light Theme Variables */
:root[data-theme="light"] {
    /* Colors */
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6f42c1;
    --accent-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-modal: rgba(255, 255, 255, 0.95);
    
    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    
    /* Borders */
    --border-color: rgba(0, 0, 0, 0.125);
    --border-accent: rgba(0, 123, 255, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --shadow-glow: 0 0 20px rgba(0, 123, 255, 0.2);
}

/* Light theme body background override */
:root[data-theme="light"] body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
}

:root[data-theme="light"] body::before {
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 123, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(111, 66, 193, 0.03) 0%, transparent 50%);
}
/* Profile button — ensure visibility in light mode */
:root[data-theme="light"] .btn-info {
    background: linear-gradient(135deg, #0d6efd, #0a58ca) !important;
    color: white !important;
    border-color: #0a58ca !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3) !important;
}
:root[data-theme="light"] .btn-info:hover {
    background: linear-gradient(135deg, #0b5ed7, #0a58ca) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4) !important;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(108, 92, 231, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 51, 102, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Layout Container */
.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}


.sidebar-brand {
    padding: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.muwasco-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}
/* Navigation Styles */
.nav {
    padding: 1rem 0;
}

.nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav li {
    margin: 0;
}

.nav a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    border-left: 3px solid transparent;
}

.nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: var(--transition);
}

.nav a:hover::before,
.nav a.active::before {
    transform: scaleY(1);
}

.nav a:hover,
.nav a.active {
    color: var(--text-primary);
    background: var(--bg-glass);
    border-left-color: var(--primary-color);
}

.nav a.active {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.1) 0%, transparent 100%);
    box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.1);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
}
/* ==========================
   Dashboard Analytics Section
   ========================== */
.analytics-section {
    margin-top: 2rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.8rem;
    margin-top: 1.5rem;
}

.chart-card {
    background: var(--bg-glass);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-card canvas {
    max-width: 100% !important;
    height: 320px !important;
}

/* Stat Cards - Enhanced for visibility in both themes */
.stat-card h3 {
    font-size: 2.25rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
}
/* Dashboard Analytics Section */
.analytics-section {
    margin-top: 2rem;
}
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.8rem;
    margin-top: 1.5rem;
}
.chart-card {
    background: var(--bg-glass);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.chart-card canvas {
    max-width: 100% !important;
    height: 320px !important;
}

/* Ensure chart labels and tooltips are readable in dark mode */
:root[data-theme="dark"] .chartjs-tooltip-key,
:root[data-theme="dark"] .chartjs-render-monitor,
:root[data-theme="dark"] canvas {
    color: var(--text-primary) !important;
}

/* Force Chart.js tooltip text to be white in dark mode */
:root[data-theme="dark"] .chartjs-tooltip {
    color: white !important;
    background: rgba(10, 10, 20, 0.9) !important;
    border: 1px solid var(--border-color) !important;
}

/* Header Styles */
.main-header,
.header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title,
.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.user-info {
    flex-direction: column;      /* stack name + badge vertically */
    align-items: flex-start;     /* left‑align */
    gap: 2px;                    /* tiny space between lines */
    min-width: 0;                /* allow children to shrink */
    font-size: 0.9rem;           /* a bit smaller on mobile */
}

.user-info .user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block !important;   /* override the global hide rule */
}

.role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 1px solid var(--primary-color);
}

.logout-btn {
    background: linear-gradient(45deg, var(--error-color), #c82333);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logout-btn:hover {
    background: linear-gradient(45deg, #c82333, var(--error-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    text-decoration: none;
    color: white;
}

.sidebar-toggle {
    display: none;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}
.sidebar-toggle:active {
    transform: translateY(0);
}

/* Theme Toggle Styles */
.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.theme-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--bg-tertiary);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    overflow: hidden;
}

.theme-switch:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.theme-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: var(--shadow-sm);
}

:root[data-theme="dark"] .theme-slider {
    transform: translateX(28px);
}

.theme-icon {
    transition: var(--transition);
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.3));
}

/* Content Area */
.content {
    flex: 1;
    padding: 2rem;
    background: transparent;
    min-height: calc(100vh - var(--header-height));
}

/* Glass Cards and Containers */
.glass-card,
.table-container,
.search-filters,
.tab-content,
.document-container,
.employee-table-container,
.financial-year-status,
.documents-section,
.application-info,
.deduction-preview {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.glass-card:hover,
.table-container:hover,
.employee-table-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

/* Document Container Specific */
.document-container {
    max-width: 900px;
    margin: 0 auto 2rem auto;
    background: var(--bg-modal);
    padding: 2rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-accent);
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form Elements - Consolidated */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control,
select.form-control,
textarea.form-control {
    width: 100%;
    padding: 1rem;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    font-family: inherit;
    line-height: 1.6;
}

.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.form-control[readonly] {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

select.form-control option {
    background: var(--bg-card);
    color: var(--text-primary);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-row,
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Tables - Consolidated */
.table,
.employee-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
}

.table th,
.table td,
.employee-table th,
.employee-table td {
    padding: 1.25rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    vertical-align: middle;
}

.table th,
.employee-table th {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    font-size: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table th:first-child,
.employee-table th:first-child {
    border-top-left-radius: 12px;
}

.table th:last-child,
.employee-table th:last-child {
    border-top-right-radius: 12px;
}

.table td,
.employee-table td {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.table tbody tr,
.employee-table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover,
.employee-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table tbody tr:nth-child(even),
.employee-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.table tbody tr:nth-child(even):hover,
.employee-table tbody tr:nth-child(even):hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Buttons - Consolidated */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.5);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #00a085);
    color: white;
    border-color: var(--success-color);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 184, 148, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color), #d63031);
    color: white;
    border-color: var(--error-color);
    box-shadow: 0 6px 20px rgba(225, 112, 85, 0.4);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(225, 112, 85, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #e17055);
    color: white;
    border-color: var(--warning-color);
    box-shadow: 0 6px 20px rgba(253, 203, 110, 0.4);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(253, 203, 110, 0.5);
}

.btn-sm {
    padding: 0.625rem 1.5rem;
    font-size: 0.75rem;
    min-width: 100px;
}

/* Badges - Consolidated */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    line-height: 1;
    border: 2px solid;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-primary {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.badge-secondary {
    background: linear-gradient(135deg, rgba(160, 163, 189, 0.2), rgba(160, 163, 189, 0.1));
    color: var(--text-secondary);
    border-color: var(--text-secondary);
}

.badge-success {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.2), rgba(0, 184, 148, 0.1));
    color: var(--success-color);
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(0, 184, 148, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.2), rgba(253, 203, 110, 0.1));
    color: var(--warning-color);
    border-color: var(--warning-color);
    box-shadow: 0 0 15px rgba(253, 203, 110, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(225, 112, 85, 0.2), rgba(225, 112, 85, 0.1));
    color: var(--error-color);
    border-color: var(--error-color);
    box-shadow: 0 0 15px rgba(225, 112, 85, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(108, 92, 231, 0.1));
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.3);
}

.badge-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Alerts - Consolidated */
.alert {
    padding: 1.25rem 1.75rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 2px solid;
    backdrop-filter: blur(15px);
    animation: slideDown 0.4s ease-out;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
}

.alert-success,
.success-text {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.15), rgba(0, 184, 148, 0.05));
    color: var(--success-color);
    border-color: var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(225, 112, 85, 0.15), rgba(225, 112, 85, 0.05));
    color: var(--error-color);
    border-color: var(--error-color);
}

.alert-warning,
.warning-text {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.15), rgba(253, 203, 110, 0.05));
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.alert-info,
.info-text {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 212, 255, 0.05));
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Special Alert Classes */
.unpaid-warning {
    background: linear-gradient(135deg, rgba(225, 112, 85, 0.2), rgba(225, 112, 85, 0.1));
    color: var(--error-color);
    border-color: var(--error-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.modal form {
    padding: 1.5rem;
    max-height: calc(85vh - 160px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ==========================
   Login Page Logo Styles - LARGER LOGO, SAME CONTAINER
   ========================== */

.login-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.login-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem; /* Reduced gap to accommodate larger logo */
    text-align: center;
    flex-wrap: wrap;
}

.login-logo {
    width: 120px; /* Increased from 80px */
    height: 120px; /* Increased from 80px */
    object-fit: contain;
    border-radius: 10px;
    padding: 6px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    flex-shrink: 0;
}

.login-logo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.login-brand-text {
    flex: 1;
    min-width: 300px; /* Slightly reduced to accommodate larger logo */
}

.login-brand-text h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem; /* Slightly reduced to fit better */
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem; /* Reduced margin */
    line-height: 1.2;
}

.login-brand-text p {
    font-size: 0.75rem; /* Slightly reduced */
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

/* Keep login box the same size */
.login-box {
    max-width: 420px;
    padding: 2rem;
    margin: 1rem;
}

/* Adjust form spacing to compensate for larger logo */
.login-container .form-group {
    margin-bottom: 1rem;
}

.login-container .form-control {
    padding: 0.875rem;
    font-size: 0.9rem;
}

.login-container .btn {
    padding: 0.875rem 1.5rem;
    margin-top: 0.5rem;
}

/* Vertical layout with larger logo */
.login-logo-container.vertical {
    flex-direction: column;
    gap: 0.5rem; /* Reduced gap */
}

.login-logo-container.vertical .login-logo {
    width: 140px; /* Even larger in vertical layout */
    height: 140px;
}

.login-logo-container.vertical .login-brand-text h2 {
    font-size: 1.3rem;
    margin-bottom: 0.1rem;
}

.login-logo-container.vertical .login-brand-text p {
    font-size: 0.75rem;
}

/* Logo-only version with larger logo */
.login-logo-only {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo-only .login-logo {
    width: 140px;
    height: 140px;
    margin: 0 auto 0.5rem auto;
}

/* Enhanced login container - unchanged */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    background-attachment: fixed;
    position: relative;
}

/* Compact alerts */
.login-container .alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

/* Responsive adjustments for larger logo */
@media (max-width: 768px) {
    .login-logo-container {
        gap: 0.5rem; /* Further reduced gap on mobile */
        flex-direction: column;
        text-align: center;
    }
    
    .login-logo {
        width: 100px; /* Still larger than original 60px */
        height: 100px;
    }
    
    .login-brand-text h2 {
        font-size: 1.1rem;
    }
    
    .login-brand-text p {
        font-size: 0.7rem;
    }
    
    .login-box {
        padding: 1.5rem;
        margin: 0.5rem;
        max-width: 380px;
    }
    
    .login-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .login-logo-container.vertical .login-logo {
        width: 110px;
        height: 110px;
    }
    
    .login-logo-container.vertical .login-brand-text h2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .login-logo {
        width: 90px;
        height: 90px;
    }
    
    .login-brand-text h2 {
        font-size: 1rem;
    }
    
    .login-brand-text p {
        font-size: 0.65rem;
    }
    
    .login-box {
        padding: 1.25rem;
        margin: 0.25rem;
    }
    
    .login-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* Ultra-compact for very small screens */
@media (max-height: 600px) {
    .login-logo {
        width: 80px;
        height: 80px;
    }
    
    .login-brand-text h2 {
        font-size: 0.9rem;
    }
    
    .login-brand-text p {
        font-size: 0.6rem;
    }
}

/* Leave Management Specific Styles */
.leave-tabs {
    display: flex;
    background: var(--bg-glass);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    overflow-x: auto;
    gap: 0.5rem;
}

.leave-tab {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 8px;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    position: relative;
    background: transparent;
    border: 1px solid transparent;
}

.leave-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.leave-tab.active {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    border-color: var(--primary-color);
}

.leave-tab.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(4px);
}

/* Tab Content Headers */
.tab-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tab-content h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

/* Employee Page Specific Styles */
.tabs ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid var(--primary-color);
    background: var(--bg-tertiary);
    border-radius: 8px 8px 0 0;
}

.tabs ul li a {
    display: block;
    padding: 12px 25px;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-card);
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    transition: var(--transition);
}

.tabs ul li a:hover {
    background: var(--bg-glass);
    color: var(--primary-color);
}

.tabs ul li a.active {
    background: var(--primary-color);
    color: var(--bg-secondary);
    font-weight: 600;
}

.tab-content.active {
    display: block;
}

/* Document Header */
.document-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

/* Avatar Styles */
.avatar-container {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.avatar-initials {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    margin: 0 auto;
}

/* Document Content */
.document-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.document-content .label {
    font-weight: 600;
    color: var(--text-primary);
}

.document-content .value {
    color: var(--text-secondary);
}

/* Document Items */
.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.document-item:last-child {
    border-bottom: none;
}

.document-item:hover {
    background: var(--bg-glass);
}

.document-name {
    font-weight: 500;
    color: var(--text-primary);
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

/* Password Form */
.password-form {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.password-form h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Balance Cards */
.leave-balance-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.leave-balance-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.balance-header {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.balance-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.balance-item {
    padding: 1rem;
    border-radius: 8px;
    background: var(--bg-card);
    transition: var(--transition-fast);
}

.balance-item:hover {
    transform: translateY(-1px);
}

.balance-allocated { 
    border-left: 4px solid var(--primary-color); 
}

.balance-used { 
    border-left: 4px solid var(--warning-color); 
}

.balance-remaining { 
    border-left: 4px solid var(--success-color); 
}

.balance-negative { 
    border-left: 4px solid var(--error-color); 
    background: rgba(225, 112, 85, 0.1);
}

/* Financial Year Status */
.status-info {
    display: grid;
    gap: 1rem;
}

.status-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.status-item:last-child {
    border-bottom: none;
}

.date-range {
    font-size: 0.9em;
    color: var(--text-muted);
    font-style: italic;
}

/* Deduction Preview */
.deduction-preview h5 {
    margin-top: 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.deduction-preview h5 .toggle-details {
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
}

.deduction-summary {
    margin-bottom: 1rem;
}

.deduction-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.deduction-item:hover {
    background: var(--bg-glass);
}

.deduction-item span:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.deduction-item span:last-child {
    color: var(--text-secondary);
}

.deduction-details {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.deduction-item.negative-days {
    color: var(--error-color);
    font-weight: bold;
    background: rgba(225, 112, 85, 0.1);
    border-left: 3px solid var(--error-color);
}

.negative-warning {
    color: var(--error-color);
    font-weight: bold;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(225, 112, 85, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--error-color);
}

.deduction-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.summary-highlight {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-negative {
    color: var(--error-color);
    font-weight: 600;
}

/* Dropdown Menu Fixes */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--bg-glass);
    color: var(--text-primary);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.ml-1 { margin-left: 0.5rem; }
.ml-2 { margin-left: 1rem; }
.mr-1 { margin-right: 0.5rem; }
.mr-2 { margin-right: 1rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-inline-block { display: inline-block; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--secondary-color), var(--primary-color));
}

/* Selection Styling */
::selection {
    background: rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
}

/* Focus Styling */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
    }
    
    .document-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .main-header,
    .header {
        padding: 1rem;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .user-name {
        display: none;
    }
    
    .theme-toggle {
        margin-right: 0.5rem;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .page-title,
    .header h1 {
        font-size: 1.25rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row,
    .form-row,
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .balance-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .leave-tabs {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem;
    }
    
    .leave-tab {
        min-width: unset;
        width: 100%;
        flex: none;
    }
    
    .table-container,
    .employee-table-container {
        overflow-x: auto;
        border-radius: 12px;
        padding: 1rem;
    }
    
    .table,
    .employee-table {
        min-width: 700px;
    }
    
    .table th,
    .table td,
    .employee-table th,
    .employee-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal form {
        padding: 1rem;
    }
    
    .login-box {
        padding: 2rem;
        margin: 1rem;
    }
    
    .form-actions,
    .action-buttons {
        flex-direction: column;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    .application-info,
    .deduction-preview {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 2.5rem;
    }
    
    .document-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .tabs ul {
        flex-direction: column;
    }
    
    .tabs ul li a {
        border-radius: 8px;
        margin-bottom: 5px;
        margin-right: 0;
    }
    
    .status-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .page-title,
    .header h1 {
        font-size: 1.1rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .form-control {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .table th,
    .table td,
    .employee-table th,
    .employee-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .sidebar-brand h1 {
        font-size: 1.1rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}
/* ==========================
   My Leave Profile - Responsive Styles
   ========================== */

/* General responsive utilities */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.ml-2 { margin-left: 0.5rem; }

/* Leave Tabs */
.leave-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.leave-tab {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.leave-tab:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.leave-tab.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Employee Info */
.employee-info {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.employee-info h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.employee-info p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.employee-info p strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Leave Balance Section */
.leave-balance-section h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.leave-balance-section .badge-info {
    background: var(--info-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

.alert.alert-info {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--info-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Grid & Cards */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding: 0 15px;
    margin-bottom: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border-bottom: none;
}

.card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.card-body {
    padding: 1rem;
    flex-grow: 1;
}

.progress {
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    transition: width 0.6s ease;
}

.progress-bar.bg-success { background: var(--success-color); }
.progress-bar.bg-warning { background: var(--warning-color); }
.progress-bar.bg-danger  { background: var(--error-color); }

.balance-details .d-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.balance-details span {
    color: var(--text-secondary);
}

.balance-details strong {
    color: var(--text-primary);
}

.text-danger { color: var(--error-color) !important; }
.text-success { color: var(--success-color) !important; }

.card-footer {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.card-footer small {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Table Styles */
.table-container {
    margin-top: 2rem;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-width: 600px; /* Prevent collapse on very small content */
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--bg-glass);
}

/* Action Buttons */
.action-buttons {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    background: var(--primary-color);
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ==========================
   MOBILE RESPONSIVENESS (max-width: 768px)
   ========================== */

@media (max-width: 768px) {
    /* Stack tabs */
    .leave-tabs {
        flex-direction: column;
        align-items: flex-start;
    }

    .leave-tab {
        width: 100%;
        text-align: center;
    }

    /* Full-width cards */
    .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 15px;
    }

    /* Mobile-friendly table */
    .table-container {
        overflow-x: hidden;
    }

    .table,
    .table thead,
    .table tbody,
    .table th,
    .table td,
    .table tr {
        display: block;
        width: 100%;
    }

    /* Hide table headers */
    .table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* Add space between rows */
    .table tbody tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 1rem;
        background: var(--bg-card);
        box-shadow: var(--shadow-sm);
    }

    /* Display labels on mobile */
    .table tbody td {
        padding: 0.5rem 0;
        position: relative;
        text-align: right;
        border: none;
    }

    .table tbody td::before {
        content: attr(data-label) ":";
        position: absolute;
        left: 0;
        width: 45%;
        font-weight: 600;
        color: var(--text-primary);
        text-align: left;
    }

    .table tbody td[data-label="Status"]::before,
    .table tbody td[data-label="Deduction"]::before {
        align-self: flex-start;
        top: 0.5rem;
    }

    /* Adjust badge in mobile */
    .table tbody td .badge {
        margin-top: 0.25rem;
        display: inline-block;
    }

    /* Balance section spacing */
    .leave-balance-section .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .leave-balance-section .d-flex span,
    .leave-balance-section .d-flex strong {
        width: 100%;
        text-align: left;
    }

    .balance-details .d-flex {
        flex-direction: row;
        justify-content: space-between;
    }

    /* Action buttons full width */
    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    /* Reduce padding */
    .main-content {
        padding: 1rem !important;
    }

    .tab-content {
        padding: 1.25rem;
    }
}
/* ==========================
   Leave Management Page
   ========================== */

/* Deduction Preview */
.deduction-preview {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.deduction-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--border-color);
}

.deduction-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-text {
    color: var(--success-color);
    margin-top: 0.5rem;
    font-style: italic;
    display: block;
}

.warning-text {
    color: var(--warning-color);
    margin-top: 0.5rem;
    font-style: italic;
    display: block;
}

.unpaid-warning {
    color: var(--error-color);
    margin-top: 0.5rem;
    font-weight: 600;
    display: block;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Leave Balance Card */
.leave-balance-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.balance-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.balance-details {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.balance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.balance-item div {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.balance-item strong {
    font-size: 1.25rem;
    font-weight: 600;
}

.balance-negative strong {
    color: var(--error-color);
}

.balance-remaining strong {
    color: var(--success-color);
}

/* Table */
.table-container {
    margin-top: 2rem;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-width: 600px;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--bg-glass);
}

/* ==========================
   MOBILE RESPONSIVENESS
   ========================== */

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .balance-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .balance-item {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        min-width: auto;
    }

    .balance-item div {
        margin-bottom: 0;
    }

    /* Mobile-friendly table */
    .table-container {
        overflow-x: hidden;
    }

    .table,
    .table thead,
    .table tbody,
    .table th,
    .table td,
    .table tr {
        display: block;
        width: 100%;
    }

    .table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table tbody tr {
        margin-bottom: 1.5rem;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 1rem;
        background: var(--bg-card);
    }

    .table tbody td {
        padding: 0.5rem 0;
        position: relative;
        text-align: right;
        border: none;
    }

    .table tbody td::before {
        content: attr(data-label) ":";
        position: absolute;
        left: 0;
        width: 45%;
        font-weight: 600;
        color: var(--text-primary);
        text-align: left;
    }

    /* Deduction preview on mobile */
    .deduction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .deduction-item span:last-child {
        font-weight: 600;
        margin-left: 0;
    }
}
.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary-color);
}
.form-check-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}
/* ==========================
   Notification Bell Styles
   ========================== */

.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-glass);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    margin-right: 1rem;
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.notification-bell i {
    font-size: 1.25rem;
}

/* Notification Badge (Count) */
.notification-bell .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-top: 8px;
}

.notification-dropdown.active {
    display: flex;
}

/* Notification Items */
.notification-item {
    padding: 0.875rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
    background: transparent;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

/* Light Theme Adjustments (if needed) */
:root[data-theme="light"] .notification-bell {
    background: rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .notification-bell:hover {
    background: rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .notification-dropdown {
    border-color: var(--border-color);
}
/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--primary-color);
}
.pagination .page-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}
.pagination .page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================
   Performance Appraisal Styles
   ========================== */

.appraisal-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.appraisal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.employee-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.employee-details {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.employee-details strong {
    color: var(--text-primary);
}

.appraisal-status {
    text-align: right;
    min-width: 200px;
}

.indicators-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.indicators-table th,
.indicators-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.indicators-table th {
    background: var(--bg-glass);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.indicators-table td {
    color: var(--text-secondary);
    font-size: 0.875rem;
    vertical-align: top;
}

.score-input {
    width: 80px;
    padding: 0.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    text-align: center;
    font-family: inherit;
}

.comment-textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
}

.readonly-field {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
}

.status-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.status-draft {
    background: rgba(108, 117, 125, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.status-awaiting {
    background: rgba(253, 203, 110, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(253, 203, 110, 0.3);
}

.status-submitted {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.status-awaiting-submission {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.cycle-selector,
.employee-selector {
    margin-bottom: 2rem;
}

.weight-badge {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.indicator-scope {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.scope-department { 
    color: var(--primary-color); 
    background: rgba(0, 212, 255, 0.1);
}
.scope-section { 
    color: var(--warning-color); 
    background: rgba(253, 203, 110, 0.1);
}
.scope-subsection { 
    color: var(--info-color); 
    background: rgba(23, 162, 184, 0.1);
}
.scope-role { 
    color: var(--success-color); 
    background: rgba(0, 184, 148, 0.1);
}

.no-appraisals {
    padding: 2rem;
    text-align: center;
    background: var(--bg-glass);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.no-appraisals h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-appraisals p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.readonly-comment {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.employee-comment-form,
.supervisor-comment-form {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-glass);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Ensure form actions align with global style */
.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Reuse existing .glass-card if preferred — or keep .appraisal-card as is */
/* Note: .glass-card already exists globally, so you could replace .appraisal-card with .glass-card if desired */

/* Responsive adjustments */
@media (max-width: 768px) {
    .appraisal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .appraisal-status {
        text-align: left;
        min-width: auto;
    }
    .indicators-table {
        display: block;
        overflow-x: auto;
    }
    .score-input {
        width: 70px;
        font-size: 0.875rem;
    }
}
/* ==========================
   Tab Styles
   ========================== */
.tabs-container {
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    background: var(--bg-glass);
    border-radius: 12px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    overflow-x: auto;
    gap: 0.5rem;
}

.tab {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    position: relative;
    background: transparent;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    transform: translateY(-1px);
}

.tab.active {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    border-color: var(--primary-color);
}

.tab.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(4px);
}

.tab-content-container {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem;
    }
    
    .tab {
        min-width: unset;
        width: 100%;
        flex: none;
        padding: 0.875rem 1rem;
    }
}
.location-radar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.radar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
}

.radar-background {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.radar-sweep {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        transparent 0deg,
        rgba(0, 212, 255, 0.3) 60deg,
        transparent 120deg
    );
    animation: radarSweep 2s linear infinite;
    transform-origin: center;
}

.radar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 10px var(--primary-color);
    z-index: 10;
    transition: all 0.3s ease;
}

.radar-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    animation: ringPulse 3s ease-in-out infinite;
}

.ring-1 { 
    width: 60px; 
    height: 60px; 
    animation-delay: 0s;
}
.ring-2 { 
    width: 120px; 
    height: 120px; 
    animation-delay: 1s;
}
.ring-3 { 
    width: 180px; 
    height: 180px; 
    animation-delay: 2s;
}

.radar-status {
    text-align: center;
    margin-top: 1rem;
}

.radar-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.radar-distance {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.location-details {
    background: var(--bg-glass);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

@keyframes radarSweep {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes ringPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.radar-scanning .radar-sweep {
    background: conic-gradient(
        transparent 0deg,
        rgba(0, 212, 255, 0.6) 60deg,
        transparent 120deg
    );
    animation-duration: 1s;
}

.radar-success .radar-center {
    background: var(--success-color);
    box-shadow: 0 0 15px var(--success-color);
    animation: pulseSuccess 2s infinite;
}

.radar-warning .radar-center {
    background: var(--warning-color);
    box-shadow: 0 0 15px var(--warning-color);
    animation: pulseWarning 2s infinite;
}

.radar-error .radar-center {
    background: var(--error-color);
    box-shadow: 0 0 15px var(--error-color);
    animation: pulseError 2s infinite;
}

@keyframes pulseSuccess {
    0%, 100% {
        box-shadow: 0 0 10px var(--success-color);
    }
    50% {
        box-shadow: 0 0 20px var(--success-color);
    }
}

@keyframes pulseWarning {
    0%, 100% {
        box-shadow: 0 0 10px var(--warning-color);
    }
    50% {
        box-shadow: 0 0 20px var(--warning-color);
    }
}

@keyframes pulseError {
    0%, 100% {
        box-shadow: 0 0 10px var(--error-color);
    }
    50% {
        box-shadow: 0 0 20px var(--error-color);
    }
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
/* Sidebar header for mobile close button */
.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    min-height: 70px;
}

/* Close button for mobile sidebar */
.sidebar-close {
    display: none;
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}


.sidebar-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    /* Hide sidebar by default on mobile */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: var(--bg-secondary);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    /* Show sidebar when mobile-open class is added */
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Show close button on mobile */
    .sidebar-close {
        display: flex !important;
    }
    
    /* Show overlay when sidebar is open */
    .sidebar.mobile-open ~ .sidebar-overlay,
    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }
    
    /* Show toggle button on mobile */
    .sidebar-toggle {
        display: flex !important;
    }
    
    /* Adjust main content for mobile */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Adjust header for mobile */
    .main-header,
    .header {
        padding: 0.75rem 1rem;
    }
    
    /* Hide user name on mobile */
    .user-name {
        display: none;
    }
    
    /* Adjust sidebar header for mobile */
    .sidebar-header {
        padding: 1rem;
        padding-top: 1rem;
        display: flex;
        flex-direction: column;
    }
    
    /* Ensure logo is visible */
    .logo-container {
        display: flex;
        justify-content: center;
        margin-top: 3rem;
    }
    
    .muwasco-logo {
        width: 120px;
        height: 120px;
    }
    
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
    }
}

/* ========================================
   TABLET RESPONSIVE (768px - 1024px)
   ======================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        width: calc(100% - 240px);
    }
    
    /* Hide close button on tablet and desktop */
    .sidebar-close {
        display: none !important;
    }
    
    /* Hide toggle button on tablet and desktop */
    .sidebar-toggle {
        display: none !important;
    }
}

/* ========================================
   DESKTOP STYLES (1025px and above)
   ======================================== */

@media (min-width: 1025px) {
    /* Ensure sidebar is always visible */
    .sidebar {
        transform: translateX(0) !important;
    }
    
    /* Hide mobile-specific elements */
    .sidebar-close,
    .sidebar-toggle,
    .sidebar-overlay {
        display: none !important;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Apply animations when sidebar opens */
.sidebar.mobile-open {
    animation: slideInFromLeft 0.3s ease-out;
}

.sidebar-overlay.active {
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus visible for keyboard navigation */
.sidebar-toggle:focus-visible,
.sidebar-close:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sidebar {
        border-right: 2px solid var(--border-color);
    }
    
    .sidebar-toggle,
    .sidebar-close {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar-overlay,
    .sidebar-toggle,
    .sidebar-close {
        transition: none !important;
        animation: none !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .sidebar,
    .sidebar-toggle,
    .sidebar-close,
    .sidebar-overlay {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}
/* ==========================
   MOBILE-FIRST NOTIFICATION STYLES
   ========================== */

/* Notification Wrapper */
.notification-wrapper {
    position: relative;
    margin-right: 1rem;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-glass);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.notification-bell i {
    font-size: 1.2rem;
}

/* Notification Badge */
.notification-bell .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, var(--error-color), #c62828);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 95vw;
    max-width: 400px;
    max-height: 80vh;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-top: 8px;
}

.notification-dropdown.active {
    display: flex;
    animation: slideDown 0.3s ease-out;
}

/* Notification Header */
.notification-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
}

.notification-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

/* Notification Filters */
.notification-filters {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Notification List */
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 50vh;
}

/* Notification Item */
.notification-item {
    display: flex;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    gap: 0.75rem;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-glass);
}

.notification-item.unread {
    background: var(--unread-bg, rgba(0, 123, 255, 0.05));
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.notification-item.priority-urgent {
    border-left: 3px solid var(--error-color);
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.1) 0%, transparent 100%);
}

.notification-item.priority-high {
    border-left: 3px solid var(--warning-color);
}

/* Notification Icon */
.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.icon-leave { background: rgba(40, 167, 69, 0.2); color: var(--success-color); }
.icon-approval { background: rgba(0, 123, 255, 0.2); color: var(--primary-color); }
.icon-rejection { background: rgba(220, 53, 69, 0.2); color: var(--error-color); }
.icon-appraisal { background: rgba(255, 193, 7, 0.2); color: var(--warning-color); }
.icon-system { background: rgba(108, 117, 125, 0.2); color: var(--text-muted); }
.icon-task { background: rgba(111, 66, 193, 0.2); color: var(--secondary-color); }

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-glass);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
}

.priority-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.urgent {
    background: var(--error-color);
    color: white;
}

.priority-badge.high {
    background: var(--warning-color);
    color: white;
}

/* Notification Actions */
.notification-actions-inline {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.action-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    background: var(--bg-glass);
    transition: var(--transition);
}

.action-link:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.mark-read-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.mark-read-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

/* Notification Footer */
.notification-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-glass);
}

.notification-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Loading and Empty States */
.notification-loading,
.notification-empty,
.notification-error {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

.notification-loading i {
    margin-right: 0.5rem;
}

.notification-error {
    color: var(--error-color);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .notification-wrapper {
        margin-right: 0.5rem;
    }
    
    .notification-bell {
        width: 40px;
        height: 40px;
    }
    
    .notification-bell i {
        font-size: 1.1rem;
    }
    
    .notification-bell .badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
        top: -4px;
        right: -4px;
    }
    
    .notification-dropdown {
        position: fixed;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
        width: 95vw;
        max-width: 380px;
        max-height: 70vh;
        margin-top: 0;
    }
    
    .notification-item {
        padding: 0.875rem 1rem;
    }
    
    .notification-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .notification-title {
        font-size: 0.85rem;
    }
    
    .notification-message {
        font-size: 0.75rem;
    }
    
    .notification-header {
        padding: 0.875rem 1rem;
    }
    
    .notification-filters {
        padding: 0.625rem 1rem;
    }
}

/* Ultra-mobile optimizations */
@media (max-width: 480px) {
    .notification-dropdown {
        width: 98vw;
        max-width: none;
        border-radius: 12px;
    }
    
    .notification-item {
        padding: 0.75rem;
        gap: 0.625rem;
    }
    
    .notification-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .notification-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .notification-actions-inline {
        flex-direction: column;
    }
    
    .action-link,
    .mark-read-btn {
        width: 100%;
        text-align: center;
    }
}

/* Dark theme adjustments */
[data-theme="dark"] .notification-item.unread {
    background: rgba(0, 123, 255, 0.08);
}

[data-theme="dark"] .notification-item.priority-urgent {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.15) 0%, transparent 100%);
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

/* Pulse animation for new notifications */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 123, 255, 0.8);
    }
}

.notification-bell.has-unread {
    animation: pulseGlow 2s infinite;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .notification-item {
        border-bottom: 2px solid var(--border-color);
    }
    
    .notification-item.unread::before {
        width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .notification-bell,
    .notification-item,
    .btn-icon {
        transition: none;
    }
    
    .notification-dropdown.active {
        animation: none;
    }
    
    .notification-bell.has-unread {
        animation: none;
    }
}
/* Financial Year Notification Styles */
.notification-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Alert enhancements for financial year */
.alert-danger .notification-badge {
    background: var(--error-color);
}

.alert-warning .notification-badge {
    background: var(--warning-color);
    color: var(--text-primary);
}}
/* ==========================
   Performance Appraisal Styles - MOVED TO GLOBAL CSS
   ========================== */

/* Unsatisfied Appraisal Section */
.unsatisfied-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-glass);
    border-radius: 16px;
    border-left: 4px solid var(--error-color);
    backdrop-filter: blur(20px);
}

.unsatisfied-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.unsatisfied-alert {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.15), rgba(253, 203, 110, 0.05));
    border-left: 4px solid var(--warning-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    color: var(--text-primary);
}

/* Decision Panel */
.decision-panel {
    background: var(--bg-glass);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 12px;
    backdrop-filter: blur(20px);
}

.status-under_review {
    background: linear-gradient(135deg, var(--warning-color), #e17055);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    border: 2px solid var(--warning-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Decision Options */
.decision-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.decision-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-glass);
}

.decision-option:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.decision-option.selected {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1), rgba(0, 184, 148, 0.05));
}

.decision-option input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Tab System */
.tab-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-section.active {
    display: block;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    background: var(--bg-glass);
    border-radius: 12px;
    padding: 0.5rem;
    backdrop-filter: blur(20px);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-weight: 500;
    flex: 1;
    text-align: center;
    min-width: 120px;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-accent);
    transform: translateY(-1px);
}

.tab-button.active {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.tab-button.active .badge {
    background: white;
    color: var(--primary-color);
}

/* Employee Type Badge */
.employee-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    border: 1px solid var(--border-color);
}

/* Scores Table */
.scores-table {
    margin: 1.5rem 0;
    background: var(--bg-glass);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
}

.scores-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.scores-table th {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    border-bottom: 2px solid var(--border-color);
}

.scores-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.scores-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.scores-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.scores-table tr:nth-child(even):hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Score Display Classes */
.score-display {
    font-weight: 600;
    color: var(--text-primary);
}

.low-score {
    color: var(--error-color);
    font-weight: 600;
}

.high-score {
    color: var(--success-color);
    font-weight: 600;
}

.medium-score {
    color: var(--warning-color);
    font-weight: 600;
}

/* Scope Badges */
.scope-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    border: 1px solid var(--border-color);
}

.scope-subsection {
    background: rgba(220, 53, 69, 0.2);
    color: var(--error-color);
    border-color: var(--error-color);
}

.scope-section {
    background: rgba(253, 126, 20, 0.2);
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.scope-department {
    background: rgba(32, 201, 151, 0.2);
    color: var(--success-color);
    border-color: var(--success-color);
}

.scope-generic {
    background: rgba(111, 66, 193, 0.2);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.scope-role {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Appraisal Specific Components */
.appraisal-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.indicator-scope {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.max-score-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.max-score-display {
    font-weight: 600;
    color: var(--text-primary);
}

/* Status Messages */
.status-message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.status-draft {
    background: rgba(108, 117, 125, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.status-awaiting {
    background: rgba(253, 203, 110, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(253, 203, 110, 0.3);
}

.status-submitted {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.status-awaiting-submission {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.status-under_review {
    background: rgba(253, 203, 110, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(253, 203, 110, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .unsatisfied-section {
        padding: 1rem;
    }
    
    .unsatisfied-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .decision-options {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-button {
        min-width: unset;
        width: 100%;
    }
    
    .scores-table {
        overflow-x: auto;
    }
    
    .scores-table table {
        min-width: 700px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tab-button {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }
    
    .decision-option {
        padding: 0.75rem;
    }
    
    .scores-table th,
    .scores-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Animation for tab switching */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ==========================
   TABLE HORIZONTAL FIX - FOR ALL TABLES
   ========================== */

/* ==========================
   MOBILE TABLES - HORIZONTAL SCROLLING INSTEAD OF VERTICAL
   ========================== */

@media (max-width: 768px) {
    /* Table containers with horizontal scrolling */
    .table-container,
    .employee-table-container,
    .attendance-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        padding: 1rem;
        background: var(--bg-card);
        margin: 1rem 0;
        box-shadow: var(--shadow-sm);
    }
    
    /* Keep tables horizontal with minimum width */
    .table,
    .employee-table,
    .attendance-table {
        min-width: 700px;
        width: 100%;
        display: table;
        border-collapse: separate;
        border-spacing: 0;
        background: transparent;
    }
    
    /* Keep table structure intact */
    .table thead,
    .table tbody,
    .table tr,
    .employee-table thead,
    .employee-table tbody,
    .employee-table tr,
    .attendance-table thead,
    .attendance-table tbody,
    .attendance-table tr {
        display: table-row !important;
        width: 100% !important;
        position: static !important;
    }
    
    /* Keep cells as table cells */
    .table th,
    .table td,
    .employee-table th,
    .employee-table td,
    .attendance-table th,
    .attendance-table td {
        display: table-cell !important;
        padding: 0.75rem 0.5rem !important;
        text-align: left !important;
        position: static !important;
        border-bottom: 1px solid var(--border-color) !important;
        vertical-align: middle;
        white-space: nowrap;
        min-width: 120px;
    }
    
    /* Remove any ::before pseudo-elements */
    .table td::before,
    .employee-table td::before,
    .attendance-table td::before {
        content: none !important;
    }
    
    /* Table headers remain visible */
    .table thead,
    .employee-table thead,
    .attendance-table thead {
        position: sticky;
        left: 0;
        top: 0;
        background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    }
    
    /* Scroll hint for users */
    .table-container::after,
    .employee-table-container::after {
        content: '← Scroll horizontally →';
        display: block;
        text-align: center;
        padding: 0.75rem;
        font-size: 0.8rem;
        color: var(--text-muted);
        background: linear-gradient(90deg, transparent, var(--bg-glass), transparent);
        margin-top: 0.5rem;
        border-radius: 8px;
        font-weight: 500;
    }
}

/* For even smaller screens */
@media (max-width: 480px) {
    .table,
    .employee-table,
    .attendance-table {
        min-width: 600px;
    }
    
    .table th,
    .table td,
    .employee-table th,
    .employee-table td,
    .attendance-table th,
    .attendance-table td {
        padding: 0.625rem 0.375rem !important;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    /* Make certain columns more compact */
    .table td:nth-child(1),  /* Date column */
    .table th:nth-child(1) {
        min-width: 90px;
        position: sticky;
        left: 0;
        background: var(--bg-card);
        z-index: 5;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    .table-container::after,
    .employee-table-container::after {
        content: '← Scroll →';
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}
/* ==========================
   ENHANCED SCROLLING FOR TABLES
   ========================== */

/* Custom scrollbar for table containers */
.table-container::-webkit-scrollbar,
.employee-table-container::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.table-container::-webkit-scrollbar-track,
.employee-table-container::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb,
.employee-table-container::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary-color), var(--secondary-color));
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.employee-table-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--secondary-color), var(--primary-color));
}

/* Scroll hint for mobile users */
@media (max-width: 768px) {
  .table-container::after,
  .employee-table-container::after {
    content: '← Scroll →';
    display: block;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: linear-gradient(90deg, transparent, var(--bg-glass), transparent);
    margin-top: 0.5rem;
    border-radius: 4px;
  }
}

/* ==========================
   SPECIFIC FIX FOR LEAVE MANAGEMENT TABLES
   ========================== */

/* Fix for leave management specific tables */
@media (max-width: 768px) {
  .leave-management-table,
  .leave-requests-table,
  .balance-table {
    min-width: 800px !important;
  }
  
  /* Ensure action buttons are always visible */
  .action-cell {
    position: sticky;
    right: 0;
    background: var(--bg-card);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  }
}

/* ==========================
   IMPROVED ACTION BUTTON VISIBILITY
   ========================== */

/* Make action buttons more prominent */
.btn-sm.action-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  min-width: 80px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.btn-sm.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

/* Action button group styling */
.action-buttons-cell {
  display: flex;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

/* ==========================
   RESPONSIVE IMPROVEMENTS FOR DIFFERENT SCREENS
   ========================== */

/* For very small screens */
@media (max-width: 480px) {
  .table,
  .employee-table,
  .indicators-table,
  .scores-table table {
    min-width: 600px !important;
  }
  
  .table th,
  .table td,
  .employee-table th,
  .employee-table td {
    padding: 0.5rem 0.375rem !important;
    font-size: 0.75rem;
  }
  
  .btn-sm.action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    min-width: 70px;
  }
}

/* For medium screens */
@media (min-width: 769px) and (max-width: 1024px) {
  .table-container,
  .employee-table-container {
    overflow-x: auto;
  }
  
  .table,
  .employee-table {
    min-width: 100%;
  }
}

/* ==========================
   ACCESSIBILITY IMPROVEMENTS
   ========================== */

/* Focus states for table scrolling */
.table-container:focus,
.employee-table-container:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Keyboard navigation for table cells */
.table td:focus,
.employee-table td:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: -1px;
  position: relative;
  z-index: 1;
}
/* ==========================
   MOBILE RESPONSIVENESS - STREAMLINED & PROFESSIONAL
   ========================== */

/* Mobile Overlay for Sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
    animation: fadeIn 0.3s ease-out;
}

.sidebar-overlay.active {
    display: block;
}

/* Mobile Sidebar */
@media (max-width: 768px) {
    /* Layout Adjustments */
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
        background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Header Mobile Optimizations */
    .main-header,
    .header {
        padding: 0.75rem 1rem;
        min-height: 60px;
        position: sticky;
        top: 0;
        z-index: 900;
        background: var(--bg-card);
        backdrop-filter: blur(20px);
    }
    
    .header-left,
    .header-right {
        gap: 0.75rem;
    }
    
    .page-title,
    .header h1 {
        font-size: 1.2rem;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-name {
        display: none;
    }
    
    /* Sidebar Toggle Button */
    .sidebar-toggle {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        background: var(--bg-glass);
        border: 2px solid var(--border-color);
        color: var(--text-primary);
        border-radius: 10px;
        cursor: pointer;
        transition: var(--transition);
    }
    
    .sidebar-toggle:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: translateY(-2px);
    }
    
    .sidebar-close {
        display: flex;
        position: absolute;
        right: 1rem;
        top: 1rem;
        background: var(--bg-glass);
        border: 2px solid var(--border-color);
        color: var(--text-primary);
        width: 40px;
        height: 40px;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1001;
        transition: var(--transition);
    }
    
    .sidebar-close:hover {
        background: var(--primary-color);
        color: white;
        transform: rotate(90deg);
        border-color: var(--primary-color);
    }
    
    /* Content Area Mobile Optimizations */
    .content {
        padding: 1rem;
        min-height: calc(100vh - 60px);
    }
    
    /* Dashboard Charts Mobile */
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .chart-card {
        padding: 1.25rem;
    }
    
    .chart-card canvas {
        height: 260px !important;
    }
    
    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 2.5rem;
    }
    
    /* Forms Mobile Optimization */
    .form-grid,
    .form-row,
    .filter-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .form-group label {
        font-size: 0.8rem;
    }
    
    .form-control,
    select.form-control,
    textarea.form-control {
        padding: 0.875rem;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    /* Buttons Mobile */
    .form-actions,
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px; /* Touch-friendly size */
    }
    
    /* Tabs Mobile */
    .tabs,
    .leave-tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .tab,
    .leave-tab {
        width: 100%;
        padding: 1rem;
        text-align: left;
        justify-content: flex-start;
        border-radius: 10px;
    }
    
    /* Cards Mobile */
    .glass-card,
    .table-container,
    .document-container,
    .appraisal-card,
    .leave-balance-card {
        margin: 0.75rem 0;
        padding: 1.25rem;
        border-radius: 14px;
    }
    
    /* Navigation Mobile */
    .nav a {
        padding: 1rem;
    }
    
    .nav a i {
        min-width: 24px;
    }
    
    /* Logo Mobile */
    .muwasco-logo {
        width: 120px;
        height: 120px;
    }
}

/* ==========================
   TABLES - HORIZONTAL SCROLLING FOR MOBILE
   ========================== */

@media (max-width: 768px) {
    /* Table Container */
    .table-container,
    .employee-table-container,
    .indicators-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 14px;
        padding: 1rem;
        background: var(--bg-card);
        margin: 1rem 0;
        position: relative;
    }
    
    /* Scroll hint */
    .table-container::after,
    .employee-table-container::after {
        content: '← Scroll →';
        display: block;
        text-align: center;
        padding: 0.75rem;
        font-size: 0.8rem;
        color: var(--text-muted);
        background: linear-gradient(90deg, transparent, var(--bg-glass), transparent);
        margin-top: 0.75rem;
        border-radius: 8px;
        font-weight: 500;
    }
    
    /* Keep tables horizontal */
    .table,
    .employee-table,
    .indicators-table,
    .scores-table table,
    .leave-management-table,
    .attendance-table {
        min-width: 700px;
        width: 100%;
        display: table;
        border-collapse: separate;
        border-spacing: 0;
    }
    
    /* Table structure */
    .table thead,
    .table tbody,
    .table tr,
    .employee-table thead,
    .employee-table tbody,
    .employee-table tr {
        display: table-row;
        width: 100%;
    }
    
    /* Table cells */
    .table th,
    .table td,
    .employee-table th,
    .employee-table td {
        display: table-cell;
        padding: 0.875rem 0.75rem;
        border-bottom: 1px solid var(--border-color);
        vertical-align: middle;
        white-space: nowrap;
        min-width: 130px;
    }
    
    /* Sticky first column for better navigation */
    .table th:first-child,
    .table td:first-child {
        position: sticky;
        left: 0;
        background: var(--bg-card);
        z-index: 5;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
        min-width: 140px;
    }
    
    /* Table headers */
    .table th,
    .employee-table th {
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
        z-index: 10;
        font-size: 0.75rem;
        padding: 1rem 0.75rem;
    }
    
    /* Action buttons in tables */
    .table .btn-sm,
    .employee-table .btn-sm {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
        min-width: 85px;
        margin: 0.125rem;
    }
    
    .action-buttons-cell {
        display: flex;
        gap: 0.375rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
}

/* ==========================
   SMALL MOBILE OPTIMIZATIONS (max-width: 480px)
   ========================== */

@media (max-width: 480px) {
    /* Typography */
    body {
        font-size: 15px;
    }
    
    .page-title,
    .header h1 {
        font-size: 1.1rem;
        max-width: 150px;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    /* Layout */
    .content {
        padding: 0.875rem;
    }
    
    /* Tables */
    .table,
    .employee-table,
    .indicators-table {
        min-width: 650px;
    }
    
    .table th,
    .table td,
    .employee-table th,
    .employee-table td {
        padding: 0.75rem 0.625rem;
        font-size: 0.8rem;
        min-width: 120px;
    }
    
    .table th:first-child,
    .table td:first-child {
        min-width: 130px;
    }
    
    /* Stats */
    .stat-card h3 {
        font-size: 2.25rem;
    }
    
    /* Charts */
    .chart-card canvas {
        height: 240px !important;
    }
    
    /* Cards */
    .glass-card,
    .table-container,
    .appraisal-card {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    /* Forms */
    .form-control,
    select.form-control,
    textarea.form-control {
        padding: 0.75rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
    }
    
    /* Sidebar */
    .sidebar {
        width: 90%;
        max-width: 300px;
    }
    
    .nav a {
        padding: 0.875rem;
        font-size: 0.85rem;
    }
    
    /* Notification */
    .notification-dropdown {
        width: 95vw;
        max-width: none;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0.5rem;
    }
    
    .notification-item {
        padding: 0.875rem;
    }
}

/* ==========================
   TABLET OPTIMIZATIONS (769px - 1024px)
   ========================== */

@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
    
    .sidebar-toggle,
    .sidebar-close,
    .sidebar-overlay {
        display: none;
    }
    
    .charts-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .table-container,
    .employee-table-container {
        overflow-x: auto;
    }
    
    .table,
    .employee-table {
        min-width: 100%;
    }
}

/* ==========================
   TOUCH-FRIENDLY ENHANCEMENTS
   ========================== */

@media (max-width: 768px) {
    /* Minimum touch target size */
    .btn,
    .nav a,
    .tab,
    .leave-tab,
    .form-check-label,
    .dropdown-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent text selection on interactive elements */
    .btn,
    .nav a,
    .tab,
    .leave-tab {
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Improve button feedback */
    .btn:active,
    .nav a:active,
    .tab:active,
    .leave-tab:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Better scrolling */
    .table-container,
    .employee-table-container,
    .notification-list {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Improve form input on iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
    }
}

/* ==========================
   MOBILE UTILITY CLASSES
   ========================== */

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-center {
        text-align: center;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-mt-1 { margin-top: 0.5rem; }
    .mobile-mt-2 { margin-top: 1rem; }
    .mobile-mb-1 { margin-bottom: 0.5rem; }
    .mobile-mb-2 { margin-bottom: 1rem; }
    .mobile-p-1 { padding: 0.5rem; }
    .mobile-p-2 { padding: 1rem; }
}

/* ==========================
   NOTIFICATION MOBILE OPTIMIZATIONS
   ========================== */

@media (max-width: 768px) {
    .notification-wrapper {
        margin-right: 0.5rem;
    }
    
    .notification-bell {
        width: 40px;
        height: 40px;
    }
    
    .notification-bell i {
        font-size: 1.1rem;
    }
    
    .notification-dropdown {
        position: fixed;
        top: 70px;
        left: 50%;
        transform: translateX(-50%);
        width: 95vw;
        max-width: 380px;
        max-height: 70vh;
        margin: 0;
    }
    
    .notification-item {
        padding: 0.875rem;
    }
    
    .notification-content {
        min-width: 0;
    }
    
    .notification-title {
        font-size: 0.85rem;
    }
    
    .notification-message {
        font-size: 0.75rem;
    }
}

/* ==========================
   PERFORMANCE APPRAISAL MOBILE
   ========================== */

@media (max-width: 768px) {
    .appraisal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .appraisal-status {
        text-align: left;
        min-width: auto;
    }
    
    .decision-options {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
        text-align: center;
    }
    
    .scores-table table {
        min-width: 700px;
    }
}

/* ==========================
   LEAVE MANAGEMENT MOBILE
   ========================== */

@media (max-width: 768px) {
    .leave-balance-card {
        padding: 1.25rem;
    }
    
    .balance-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .balance-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background: var(--bg-glass);
        border-radius: 10px;
    }
    
    .deduction-preview {
        padding: 1.25rem;
    }
    
    .deduction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
        padding: 0.875rem;
    }
}

/* ==========================
   SAFE AREA INSETS FOR NOTCHED PHONES
   ========================== */

@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .main-header,
        .header {
            padding-top: max(0.75rem, env(safe-area-inset-top));
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
        }
        
        .sidebar {
            padding-top: max(1rem, env(safe-area-inset-top));
        }
        
        .content {
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
        }
    }
}

/* ==========================
   REDUCED MOTION SUPPORT
   ========================== */

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar-overlay,
    .sidebar-toggle,
    .sidebar-close,
    .btn,
    .nav a,
    .tab,
    .leave-tab {
        transition: none !important;
        animation: none !important;
    }
    
    .notification-dropdown.active {
        animation: none;
    }
    
    .radar-sweep,
    .ring,
    .notification-bell.has-unread {
        animation: none;
    }
}
/* ==========================
   MOBILE HEADER OPTIMIZATION - FIXED & STREAMLINED
   ========================== */

@media (max-width: 768px) {
    /* Main Header Optimization */
    .main-header,
    .header {
        padding: 0.5rem 0.75rem !important;
        min-height: 55px !important;
        height: auto !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0.5rem !important;
    }
    
    /* Hide page title on mobile to save space */
    .page-title,
    .header h1 {
        display: none !important;
    }
    
    /* Header Left - Only sidebar toggle */
    .header-left {
        flex: 0 0 auto !important;
        min-width: 44px !important;
    }
    
    /* Header Right - Compact all items */
    .header-right {
        display: flex !important;
        flex: 1 !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 0.5rem !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    
    /* Notification Bell - Compact */
    .notification-wrapper {
        margin-right: 0.25rem !important;
        flex: 0 0 auto !important;
    }
    
    .notification-bell {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }
    
    .notification-bell i {
        font-size: 1.1rem !important;
    }
    
    .notification-bell .badge {
        min-width: 16px !important;
        height: 16px !important;
        font-size: 0.6rem !important;
        top: -4px !important;
        right: -4px !important;
    }
    
    /* Theme Toggle - Compact */
    .theme-toggle {
        margin-right: 0.25rem !important;
        flex: 0 0 auto !important;
    }
    
    .theme-switch {
        width: 46px !important;
        height: 26px !important;
        min-width: 46px !important;
    }
    
    .theme-slider {
        width: 18px !important;
        height: 18px !important;
    }
    
    :root[data-theme="dark"] .theme-slider {
        transform: translateX(18px) !important;
    }
    
    /* User Info - Compact with ellipsis */
    .user-info {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: 120px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 0 !important;
        padding: 0.25rem 0 !important;
    }
    
    .user-name {
        display: block !important;
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        line-height: 1.2 !important;
        margin-bottom: 0.125rem !important;
    }
    
    /* Shorten long names using initials */
    .user-name.long-name {
        display: flex !important;
        align-items: center !important;
    }
    
    .user-name.long-name::before {
        content: attr(data-initials) !important;
        display: inline-block !important;
        margin-right: 0.25rem !important;
        font-weight: 700 !important;
    }
    
    .role-badge {
        font-size: 0.6rem !important;
        padding: 0.15rem 0.35rem !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        line-height: 1 !important;
    }
    
    /* Logout Button - Icon only on mobile */
    .logout-btn {
        flex: 0 0 auto !important;
        padding: 0.4rem !important;
        min-width: 40px !important;
        min-height: 40px !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .logout-btn span {
        display: none !important;
    }
    
    .logout-btn i {
        margin: 0 !important;
        font-size: 1rem !important;
    }
    
    /* Sidebar Toggle - Compact */
    .sidebar-toggle {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 1.2rem !important;
        padding: 0.5rem !important;
    }
    
    /* Ensure no wrapping */
    .main-header > *,
    .header > * {
        flex-shrink: 0 !important;
    }
}

/* ==========================
   EXTRA SMALL MOBILE OPTIMIZATION
   ========================== */

@media (max-width: 480px) {
    .main-header,
    .header {
        padding: 0.4rem 0.5rem !important;
        min-height: 50px !important;
        gap: 0.375rem !important;
    }
    
    /* Reduce icon sizes further */
    .notification-bell,
    .logout-btn,
    .sidebar-toggle {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
    
    .notification-bell i,
    .logout-btn i,
    .sidebar-toggle i {
        font-size: 1rem !important;
    }
    
    /* Theme toggle smaller */
    .theme-switch {
        width: 42px !important;
        height: 24px !important;
        min-width: 42px !important;
    }
    
    .theme-slider {
        width: 16px !important;
        height: 16px !important;
    }
    
    :root[data-theme="dark"] .theme-slider {
        transform: translateX(16px) !important;
    }
    
    /* User info even more compact */
    .user-info {
        max-width: 100px !important;
    }
    
    .user-name {
        font-size: 0.7rem !important;
    }
    
    .role-badge {
        font-size: 0.55rem !important;
        padding: 0.125rem 0.3rem !important;
    }
    
    /* Notification badge */
    .notification-bell .badge {
        min-width: 14px !important;
        height: 14px !important;
        font-size: 0.55rem !important;
    }
}

/* ==========================
   NAME SHORTENING FALLBACK
   ========================== */

/* JavaScript fallback for extremely long names */
@media (max-width: 768px) {
    .user-name.too-long {
        position: relative !important;
    }
    
    .user-name.too-long::after {
        content: '' !important;
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 20px !important;
        background: linear-gradient(90deg, transparent, var(--bg-card) 80%) !important;
        pointer-events: none !important;
    }
}

/* ==========================
   TABLET OPTIMIZATION
   ========================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .user-info {
        max-width: 160px !important;
    }
    
    .user-name {
        font-size: 0.8rem !important;
    }
    
    .role-badge {
        font-size: 0.65rem !important;
    }
}