/* =====================================================
   HRM SYSTEM - DESIGN SYSTEM
   Premium Dark Glassmorphic Theme
   ===================================================== */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors - Dark Theme */
    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: rgba(20, 20, 50, 0.65);
    --bg-card-hover: rgba(30, 30, 65, 0.8);
    --bg-sidebar: rgba(12, 12, 35, 0.95);
    --bg-input: rgba(25, 25, 55, 0.6);
    --bg-modal: rgba(15, 15, 40, 0.95);
    
    /* Glass Effect */
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.12);
    --glass-blur: 20px;
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Accent Colors */
    --accent-primary: #7c3aed;
    --accent-secondary: #6366f1;
    --accent-tertiary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #7c3aed, #6366f1, #06b6d4);
    --accent-gradient-hover: linear-gradient(135deg, #8b5cf6, #818cf8, #22d3ee);
    --accent-purple: #a78bfa;
    --accent-blue: #818cf8;
    --accent-cyan: #22d3ee;
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #a78bfa;
    
    /* Status Colors */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);
    
    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 70px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent-purple); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--accent-cyan); }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background: rgba(124, 58, 237, 0.3); 
    border-radius: 3px; 
}
::-webkit-scrollbar-thumb:hover { background: rgba(124, 58, 237, 0.5); }

/* ==================== LAYOUT ==================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
    transition: margin-left var(--transition-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-area {
    padding: 28px 32px;
    flex: 1;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-base);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--topbar-height);
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: white;
}

.sidebar-brand h2 {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 12px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(99, 102, 241, 0.15));
    color: var(--accent-purple);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-gradient);
    border-radius: 0 3px 3px 0;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

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

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.08);
}

.sidebar-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.sidebar-user .user-info {
    overflow: hidden;
}

.sidebar-user .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* ==================== TOPBAR ==================== */
.topbar {
    height: var(--topbar-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(var(--glass-blur));
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h1 {
    font-size: 1.35rem;
    font-weight: 700;
}

.topbar-left .breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text-primary);
}

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

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.topbar-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--text-primary);
    border-color: rgba(124, 58, 237, 0.3);
}

.topbar-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 12px;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition-fast);
}

.topbar-user:hover {
    border-color: var(--glass-border-hover);
}

.topbar-user img, .topbar-user .avatar-placeholder {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
}

.avatar-placeholder {
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
}

.topbar-user span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2px;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    transition: all var(--transition-base);
    box-shadow: var(--glass-shadow);
}

.card:hover {
    border-color: var(--glass-border-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

/* ==================== STAT CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.stat-card:nth-child(1)::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon { background: rgba(124, 58, 237, 0.15); color: #a78bfa; }
.stat-card:nth-child(2) .stat-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-card:nth-child(3) .stat-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stat-card:nth-child(4) .stat-icon { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }

.stat-info h4 {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-info .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-info .stat-change {
    font-size: 0.75rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* ==================== GRID LAYOUTS ==================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

/* ==================== TABLE ==================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

table tbody td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

table tbody tr {
    transition: background var(--transition-fast);
}

table tbody tr:hover {
    background: rgba(124, 58, 237, 0.04);
}

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

.employee-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.employee-cell .emp-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
}

.employee-cell .emp-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.employee-cell .emp-email {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==================== BADGES & STATUS ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-purple { background: rgba(124, 58, 237, 0.15); color: var(--accent-purple); }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--glass-border-hover);
    background: rgba(124, 58, 237, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--text-primary);
    border-color: rgba(124, 58, 237, 0.3);
}

.btn-icon.edit:hover { color: var(--info); }
.btn-icon.delete:hover { color: var(--danger); }

.action-btns {
    display: flex;
    gap: 6px;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

select.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Search & Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    padding-left: 40px;
}

.filter-select {
    min-width: 160px;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-modal);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-base);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }

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

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: var(--danger);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
}

.modal-body {
    padding: 24px 28px;
}

.modal-footer {
    padding: 16px 28px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 450px;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 3.7s forwards;
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-success { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.3); color: #6ee7b7; }
.toast-error { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.3); color: #fca5a5; }
.toast-warning { background: rgba(245, 158, 11, 0.2); border-color: rgba(245, 158, 11, 0.3); color: #fde68a; }
.toast-info { background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.3); color: #93c5fd; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateX(50px); }
}

/* ==================== LOGIN PAGE ==================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: loginAppear 0.6s ease;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo .icon {
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 16px;
    color: white;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.login-logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-logo p {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 0.9rem;
}

.login-card .form-control {
    padding: 14px 16px;
}

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

.login-error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==================== DASHBOARD SPECIFIC ==================== */
.chart-container {
    position: relative;
    height: 300px;
    padding: 10px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-action-btn {
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.quick-action-btn:hover {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text-primary);
    border-color: rgba(124, 58, 237, 0.3);
}

.quick-action-btn i {
    font-size: 1.1rem;
    color: var(--accent-purple);
}

/* Activity Feed */
.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-dot.green { background: var(--success); }
.activity-dot.orange { background: var(--warning); }
.activity-dot.red { background: var(--danger); }
.activity-dot.blue { background: var(--info); }

.activity-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.activity-text strong { color: var(--text-primary); }

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Announcement cards */
.announcement-card {
    padding: 14px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    margin-bottom: 10px;
    transition: all var(--transition-fast);
}

.announcement-card:hover {
    border-color: var(--glass-border-hover);
}

.announcement-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.announcement-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.announcement-card .meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.priority-urgent { border-left: 3px solid var(--danger); }
.priority-important { border-left: 3px solid var(--warning); }
.priority-normal { border-left: 3px solid var(--info); }

/* Holiday List */
.holiday-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.holiday-date-box {
    width: 48px;
    height: 48px;
    background: rgba(124, 58, 237, 0.12);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.holiday-date-box .day {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-purple);
    line-height: 1;
}

.holiday-date-box .month {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.holiday-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
}

.holiday-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==================== ATTENDANCE CALENDAR ==================== */
.attendance-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-header-cell {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px;
    text-transform: uppercase;
}

.calendar-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: default;
    transition: all var(--transition-fast);
}

.calendar-cell.empty { opacity: 0; }
.calendar-cell.today { border: 2px solid var(--accent-primary); }

.calendar-cell.present { background: var(--success-bg); color: var(--success); }
.calendar-cell.absent { background: var(--danger-bg); color: var(--danger); }
.calendar-cell.half-day { background: var(--warning-bg); color: var(--warning); }
.calendar-cell.late { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.calendar-cell.on-leave { background: var(--info-bg); color: var(--info); }
.calendar-cell.holiday { background: rgba(124, 58, 237, 0.12); color: var(--accent-purple); }

/* ==================== PAYSLIP ==================== */
.payslip {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.payslip-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--glass-border);
    margin-bottom: 24px;
}

.payslip-header h2 {
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.payslip-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.payslip-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.payslip-row .label { color: var(--text-secondary); }
.payslip-row .value { font-weight: 600; }

.payslip-total {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 10px;
    margin-top: 16px;
}

.payslip-total .label { font-weight: 600; font-size: 1.05rem; }
.payslip-total .value { font-weight: 700; font-size: 1.2rem; color: var(--accent-purple); }

/* ==================== TABS ==================== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-purple);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
}

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

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.85rem;
}

/* ==================== PROFILE PAGE ==================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.3);
}

.profile-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-info .role-badge {
    margin-top: 6px;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.detail-item {
    padding: 14px;
    background: var(--bg-input);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.detail-item label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.detail-item span {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: 'Inter', sans-serif;
}

.page-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* ==================== LOADER ==================== */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(124, 58, 237, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.page-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .content-area {
        padding: 20px 16px;
    }
    
    .topbar {
        padding: 0 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row, .form-row-3 {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal {
        margin: 10px;
        border-radius: var(--border-radius-lg);
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .payslip-details {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .sidebar, .topbar, .btn, .filter-bar, .action-btns { display: none !important; }
    .main-content { margin: 0; }
    .content-area { padding: 0; }
    body { background: white; color: #000; }
    .card, .payslip { border: 1px solid #ddd; background: white; }
    .stat-card { break-inside: avoid; }
}
