/* ===================================================
   Enterprise HRMS Pro - Modern UI Stylesheet
   =================================================== */

:root {
    /* Brand colors */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-rgb: 79, 70, 229;

    --success: #10b981;
    --success-light: #d1fae5;
    --info: #06b6d4;
    --info-light: #cffafe;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --secondary: #64748b;
    --purple: #8b5cf6;
    --pink: #ec4899;

    /* Light theme */
    --bg-body: #f5f7fb;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-topbar: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-input: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 40px -10px rgba(15, 23, 42, 0.15);

    --sidebar-width: 260px;
    --topbar-height: 64px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-body: #0b1120;
    --bg-card: #131c2e;
    --bg-sidebar: #0f172a;
    --bg-topbar: #131c2e;
    --bg-hover: #1e293b;
    --bg-input: #0f172a;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --border-color: #1e293b;
    --primary-light: rgba(79, 70, 229, 0.15);
    --success-light: rgba(16, 185, 129, 0.15);
    --info-light: rgba(6, 182, 212, 0.15);
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger-light: rgba(239, 68, 68, 0.15);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============== LAYOUT ============== */
.app-wrapper { min-height: 100vh; display: flex; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1030;
    transition: var(--transition);
}

.sidebar-header {
    height: var(--topbar-height);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    display: flex; align-items: center; gap: 0.75rem;
    font-weight: 800; font-size: 1.25rem; color: var(--text-primary);
}
.sidebar-brand:hover { color: var(--text-primary); }
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 1.25rem 0.75rem; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

.nav-section { margin-bottom: 1.5rem; }
.nav-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    margin-bottom: 2px;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active, .nav-item[aria-current="page"] {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.nav-item i { font-size: 1.05rem; width: 20px; text-align: center; }
.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    min-width: 20px;
    text-align: center;
}
.nav-item.active .nav-badge { background: rgba(255,255,255,0.25); }

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}
.user-mini { display: flex; align-items: center; gap: 0.75rem; }
.user-mini .user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-mini strong { font-size: 0.85rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini small { font-size: 0.72rem; color: var(--text-muted); }

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

.topbar {
    height: var(--topbar-height);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.topbar-search {
    flex: 1; max-width: 480px;
    background: var(--bg-hover);
    border-radius: var(--border-radius);
    display: flex; align-items: center;
    padding: 0 1rem;
    height: 40px;
}
.topbar-search i { color: var(--text-muted); margin-right: 0.5rem; }
.topbar-search input {
    flex: 1; background: transparent; border: 0; outline: none;
    color: var(--text-primary); font-size: 0.9rem;
}

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }

.btn-icon {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; border-radius: var(--border-radius-sm);
    color: var(--text-secondary); position: relative;
    transition: var(--transition);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

.notification-dot {
    position: absolute; top: 6px; right: 6px;
    background: var(--danger); color: white;
    min-width: 18px; height: 18px;
    border-radius: 99px;
    font-size: 0.65rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

.user-avatar-btn { background: transparent; border: 0; padding: 0; }
.avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
    flex-shrink: 0;
}
.avatar.sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.avatar.xl { width: 96px; height: 96px; font-size: 2rem; }

.page-content { padding: 1.75rem; flex: 1; }

/* ============== CARDS ============== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}
.card-body { padding: 1.25rem; color: var(--text-primary); }

/* KPI cards */
.kpi-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.kpi-card .kpi-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 0.75rem;
}
.kpi-card .kpi-label {
    color: var(--text-muted); font-size: 0.82rem;
    font-weight: 500; text-transform: uppercase;
    letter-spacing: 0.04em;
}
.kpi-card .kpi-value {
    font-size: 1.85rem; font-weight: 800;
    color: var(--text-primary);
    margin: 0.25rem 0;
    line-height: 1.1;
}
.kpi-card .kpi-trend { font-size: 0.78rem; color: var(--text-muted); }
.kpi-card .kpi-trend.up { color: var(--success); }
.kpi-card .kpi-trend.down { color: var(--danger); }

/* ============== FORMS ============== */
.form-label { font-weight: 500; color: var(--text-primary); font-size: 0.875rem; margin-bottom: 0.4rem; }
.form-control, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.form-control::placeholder { color: var(--text-muted); }

/* ============== BUTTONS ============== */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    padding: 0.55rem 1.15rem;
    transition: var(--transition);
    font-size: 0.9rem;
    border: 0;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79,70,229,0.35); color: white; }
.btn-outline-primary { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline-primary:hover { background: var(--primary); color: white; }
.btn-light { background: var(--bg-hover); color: var(--text-primary); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }

/* ============== TABLES ============== */
.table {
    color: var(--text-primary);
    --bs-table-bg: transparent;
    margin-bottom: 0;
}
.table thead th {
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-color);
    padding: 0.875rem 1rem;
}
.table tbody td {
    padding: 0.875rem 1rem;
    border-color: var(--border-color);
    vertical-align: middle;
    font-size: 0.9rem;
}
.table tbody tr:hover { background: var(--bg-hover); }
.table-responsive { border-radius: var(--border-radius); }

/* ============== BADGES ============== */
.badge {
    font-weight: 600; font-size: 0.72rem;
    padding: 0.32rem 0.7rem; border-radius: 99px;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info    { background: var(--info-light);    color: var(--info); }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: var(--bg-hover); color: var(--text-secondary); }

.status-pill { display: inline-flex; align-items: center; gap: 0.4rem; }
.status-pill::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; display: inline-block;
}

/* ============== DROPDOWNS ============== */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 220px;
}
.dropdown-item {
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    transition: var(--transition);
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-header { color: var(--text-secondary); }
.dropdown-divider { border-color: var(--border-color); }

.notification-dropdown { width: 360px; padding: 0; }
.notification-dropdown .dropdown-header { padding: 1rem; border-bottom: 1px solid var(--border-color); }
.notification-list { max-height: 380px; overflow-y: auto; }
.notification-item {
    display: flex; gap: 0.85rem; padding: 0.85rem 1rem;
    color: var(--text-primary); border-bottom: 1px solid var(--border-color);
}
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.notification-item.unread { background: rgba(79, 70, 229, 0.04); }
.ni-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ni-content { flex: 1; min-width: 0; }
.ni-content strong { font-size: 0.85rem; color: var(--text-primary); display: block; margin-bottom: 0.15rem; }
.ni-content p { margin: 0; font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ni-content small { font-size: 0.72rem; color: var(--text-muted); }

/* ============== ALERTS ============== */
.alert {
    border-radius: var(--border-radius);
    border: 0;
    padding: 0.875rem 1.15rem;
}
.alert-success { background: var(--success-light); color: var(--success); }
.alert-danger  { background: var(--danger-light);  color: var(--danger); }
.alert-info    { background: var(--info-light);    color: var(--info); }
.alert-warning { background: var(--warning-light); color: var(--warning); }

/* ============== AUTH PAGES ============== */
.auth-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
}
/* .auth-card / .auth-header — see consolidated auth layout further below */

.input-group-modern {
    position: relative; margin-bottom: 1rem;
}
.input-group-modern i {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
    pointer-events: none; z-index: 2;
}
.input-group-modern .form-control {
    padding-left: 42px; height: 48px;
}

/* ============== ANIMATIONS ============== */
@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.animated-fadein { animation: fade-in 0.4s ease; }

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border-color) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
}
@keyframes shimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1029; display: none;
}
.sidebar-overlay.show { display: block; }

/* ============== MODAL ============== */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
}
.modal-header, .modal-footer { border-color: var(--border-color); }
.modal-title { font-weight: 700; color: var(--text-primary); }

/* ============== UTILITIES ============== */
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.page-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.divider { height: 1px; background: var(--border-color); margin: 1.25rem 0; }
.text-muted { color: var(--text-muted) !important; }

.empty-state {
    text-align: center; padding: 3rem 1rem; color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h5 { color: var(--text-primary); margin-bottom: 0.5rem; }

/* Profile cards */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden; border: 1px solid var(--border-color);
}
.profile-cover {
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
}
.profile-info { padding: 1.25rem; margin-top: -40px; }
.profile-info .avatar { border: 4px solid var(--bg-card); margin-bottom: 0.75rem; }

/* DataTables-like */
.table-wrapper { background: var(--bg-card); border-radius: var(--border-radius); overflow: hidden; }
.table-toolbar {
    padding: 1rem 1.25rem;
    display: flex; gap: 0.75rem; flex-wrap: wrap;
    align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

/* Pagination */
.pagination { gap: 0.25rem; margin-bottom: 0; }
.page-link {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: var(--bg-card);
    border-radius: var(--border-radius-sm) !important;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
}
.page-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.page-item.active .page-link {
    background: var(--primary); border-color: var(--primary); color: white;
}

/* Toast notifications */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 9999; }
.toast {
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border-color); border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    min-width: 320px;
}
.toast-header { background: transparent; color: var(--text-primary); border-color: var(--border-color); }

/* ============== RESPONSIVE ============== */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .topbar-search { display: none; }
}

@media (max-width: 576px) {
    .page-content { padding: 1rem; }
    .kpi-card .kpi-value { font-size: 1.5rem; }
}

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

/* Chart container */
.chart-container { position: relative; height: 280px; }

/* File upload */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.file-upload-zone:hover, .file-upload-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}
.file-upload-zone i { font-size: 2.5rem; color: var(--text-muted); }

/* ============ ADDITIONAL COMPONENTS ============ */

/* ============ AUTH LAYOUT (consolidated) ============ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.10) 0%, transparent 50%);
    pointer-events: none;
}
.auth-wrapper {
    width: 100%;
    max-width: 1000px;
    position: relative;
    z-index: 1;
}
.auth-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 620px;
    animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-brand {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    color: #fff;
    padding: 3rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.auth-brand::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: rgba(255,255,255,0.10);
    border-radius: 50%;
    top: -120px;
    right: -120px;
}
.auth-brand::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -70px;
    left: -70px;
}
.auth-brand-inner { position: relative; z-index: 1; width: 100%; }
.auth-brand .brand-logo {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.2);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    color: #fff;
}
.auth-brand h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.2;
}
.auth-brand p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.95);
}
.auth-features { list-style: none; padding: 0; margin: 0; }
.auth-features li {
    padding: 0.5rem 0;
    opacity: 0.95;
    color: rgba(255,255,255,0.95);
    font-size: 0.95rem;
}
.auth-features li i {
    color: #34d399;
    margin-right: 0.6rem;
    font-size: 1rem;
}
.auth-form {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-form-inner {
    width: 100%;
    max-width: 380px;
}
.auth-form-inner h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.auth-form-inner > p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}
.auth-demo-creds {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.demo-cred {
    background: var(--bg-tertiary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}
.demo-cred:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

/* Responsive: hide brand below 992px, single column for form */
@media (max-width: 991.98px) {
    .auth-card {
        grid-template-columns: 1fr;
        min-height: auto;
        max-width: 460px;
        margin: 0 auto;
    }
    .auth-brand { display: none; }
    .auth-form { padding: 2.5rem 2rem; }
}
@media (max-width: 575.98px) {
    .auth-page { padding: 1rem; }
    .auth-form { padding: 2rem 1.5rem; }
    .auth-form-inner h2 { font-size: 1.5rem; }
}

/* Avatar */
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.85rem; flex-shrink: 0; }
.profile-avatar-lg { width: 100px; height: 100px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 2rem; }

/* Empty state */
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--text-muted); }
.empty-state i { font-size: 3rem; opacity: 0.5; display: block; margin-bottom: 1rem; }
.empty-state p { margin: 0; font-size: 0.95rem; }

/* Mini-stat */
.mini-stat { background: var(--bg-tertiary); border-radius: var(--border-radius); padding: 1rem; text-align: center; }
.mini-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.mini-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }

/* Soft badges */
.bg-success-soft { background: rgba(16,185,129,0.1) !important; color: #10b981; }
.bg-danger-soft { background: rgba(239,68,68,0.1) !important; color: #ef4444; }
.bg-warning-soft { background: rgba(245,158,11,0.1) !important; color: #f59e0b; }
.bg-info-soft { background: rgba(6,182,212,0.1) !important; color: #06b6d4; }
.bg-primary-soft { background: rgba(79,70,229,0.1) !important; color: #4f46e5; }
.bg-secondary-soft { background: rgba(107,114,128,0.1) !important; color: #6b7280; }

/* KPI variants */
.kpi-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: var(--card-bg); border-radius: var(--border-radius); border: 1px solid var(--border-color); transition: var(--transition); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.kpi-primary .kpi-icon { background: rgba(79,70,229,0.1); color: #4f46e5; }
.kpi-success .kpi-icon { background: rgba(16,185,129,0.1); color: #10b981; }
.kpi-warning .kpi-icon { background: rgba(245,158,11,0.1); color: #f59e0b; }
.kpi-danger .kpi-icon { background: rgba(239,68,68,0.1); color: #ef4444; }
.kpi-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.kpi-meta { font-size: 0.75rem; margin-top: 0.25rem; }

/* Page title */
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.page-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }

/* Clock card */
.clock-card { text-align: center; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: white; border: none; }
.clock-card .card-body { color: white; }
.clock-card h6, .clock-card .text-muted { color: rgba(255,255,255,0.85) !important; }
.clock-display { font-size: 2.5rem; font-weight: 700; font-feature-settings: 'tnum'; margin: 0.5rem 0; font-family: 'SF Mono', Monaco, monospace; }
.clock-card .alert { background: rgba(255,255,255,0.15); color: white; border: none; }
.clock-card .alert strong { color: white; }
.clock-card .alert small { color: rgba(255,255,255,0.85); }

/* Attendance calendar */
.attendance-calendar { border: 1px solid var(--border-color); border-radius: var(--border-radius); overflow: hidden; }
.cal-header { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--bg-tertiary); border-bottom: 1px solid var(--border-color); }
.cal-header > div { padding: 0.5rem; text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border-color); }
.cal-cell { background: var(--card-bg); padding: 0.5rem; min-height: 80px; font-size: 0.85rem; position: relative; }
.cal-cell.empty { background: var(--bg-tertiary); }
.cal-cell.cal-weekend { background: var(--bg-tertiary); }
.cal-cell.cal-today { border: 2px solid var(--primary); }
.cal-cell.cal-present { background: rgba(16,185,129,0.1); }
.cal-cell.cal-late { background: rgba(245,158,11,0.15); }
.cal-cell.cal-absent { background: rgba(239,68,68,0.1); }
.cal-cell.cal-leave { background: rgba(6,182,212,0.1); }
.cal-cell.cal-half_day { background: rgba(139,92,246,0.1); }
.cal-cell.cal-holiday { background: rgba(236,72,153,0.1); }
.cal-date { font-weight: 600; }
.cal-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; }
.cal-time { font-size: 0.7rem; font-family: monospace; color: var(--text-muted); margin-top: 0.25rem; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.25rem; vertical-align: middle; }

/* Leave balance tiles */
.leave-balance-card { background: var(--bg-tertiary); padding: 0.75rem; border-radius: var(--border-radius); border-left: 4px solid var(--primary); }
.leave-balance-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.leave-balance-value { font-size: 1.25rem; font-weight: 700; }
.leave-balance-value small { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }
.leave-balance-pct { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.leave-balance-tile { transition: var(--transition); }
.leave-balance-tile:hover { transform: translateY(-2px); }
.leave-balance-pct-circle { font-size: 1.5rem; font-weight: 700; }

/* Kanban */
.kanban-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; overflow-x: auto; }
.kanban-col { background: var(--bg-tertiary); border-radius: var(--border-radius); padding: 0.75rem; min-height: 500px; }
.kanban-col-header { display: flex; justify-content: space-between; padding: 0.5rem; font-weight: 600; border-top: 3px solid var(--primary); margin-bottom: 0.75rem; }
.kanban-col-body { min-height: 400px; transition: background 0.2s; }
.kanban-col-body.drag-over { background: rgba(79,70,229,0.05); border: 2px dashed var(--primary); border-radius: var(--border-radius); }
.kanban-card { background: var(--card-bg); border-radius: 8px; padding: 0.75rem; margin-bottom: 0.5rem; cursor: move; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--border-color); }
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kanban-card.dragging { opacity: 0.5; }
.kanban-card-title { font-size: 0.9rem; }
@media (max-width: 992px) { .kanban-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .kanban-board { grid-template-columns: 1fr; } }

/* Timeline */
.timeline { padding: 0 1.5rem; position: relative; }
.timeline::before { content: ''; position: absolute; left: 24px; top: 1.5rem; bottom: 1.5rem; width: 2px; background: var(--border-color); }
.timeline-item { position: relative; padding: 0.75rem 0 0.75rem 2rem; }
.timeline-dot { position: absolute; left: -6px; top: 1rem; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--card-bg); z-index: 1; }
.timeline-content strong { font-size: 0.85rem; }
.timeline-content p { color: var(--text-muted); }

/* Announcement card */
.announcement-card { transition: var(--transition); }
.announcement-card:hover { box-shadow: var(--shadow-lg); }
.announcement-icon { width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Toast */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast-item { background: var(--card-bg); border: 1px solid var(--border-color); padding: 0.75rem 1rem; border-radius: var(--border-radius); box-shadow: var(--shadow-lg); min-width: 280px; opacity: 0; transform: translateX(100%); transition: all 0.3s; }
.toast-item.show { opacity: 1; transform: translateX(0); }
.toast-item.toast-success { border-left: 4px solid #10b981; }
.toast-item.toast-error { border-left: 4px solid #ef4444; }
.toast-item.toast-info { border-left: 4px solid #06b6d4; }
.toast-item i { margin-right: 0.5rem; }

/* Payslip */
.payslip-container { background: white; padding: 2.5rem; max-width: 900px; margin: 0 auto; border-radius: var(--border-radius); box-shadow: var(--shadow-md); }
.payslip-header { display: flex; justify-content: space-between; padding-bottom: 1rem; border-bottom: 2px solid var(--primary); }
.payslip-table thead th { background: var(--bg-tertiary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.payslip-total { background: var(--bg-tertiary); }
.payslip-net { margin-top: 2rem; padding: 1.25rem; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: white; border-radius: var(--border-radius); }
.payslip-net-amount { font-size: 2rem; font-weight: 800; font-family: 'SF Mono', Monaco, monospace; }
.payslip-footer p { color: var(--text-muted); font-size: 0.75rem; }

/* Offer letter preview */
.offer-letter-preview { padding: 2.5rem; font-family: 'Georgia', serif; font-size: 11pt; line-height: 1.7; color: #1a1a1a; min-height: 600px; }
.offer-letter-preview h1, .offer-letter-preview h2, .offer-letter-preview h3 { color: #1a1a1a; }

/* Profile card */
.profile-card-cover { height: 80px; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); }
.profile-card .card-body { padding-top: 0; margin-top: -50px; position: relative; }
.profile-card .profile-avatar-lg { border: 4px solid var(--card-bg); }

/* Notification */
.notification-unread { background: rgba(79,70,229,0.04); border-left: 3px solid var(--primary); }
.notification-icon { width: 40px; height: 40px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Print */
@media print {
  .sidebar, .topbar, #sidebarOverlay, .btn { display: none !important; }
  .main-content { margin-left: 0 !important; padding: 0 !important; }
  body { background: white !important; }
  .card { border: 1px solid #ddd !important; box-shadow: none !important; page-break-inside: avoid; }
}
