/* =====================================================
   HRM PRO — Premium CSS Design System
   Fonts: Syne (headings) + DM Sans (body)
   Palette: Deep Navy + Electric Indigo + Soft Gold
   ===================================================== */

:root {
    /* Color Palette */
    --navy-950: #020617;
    --navy-900: #0f172a;
    --navy-800: #1e293b;
    --navy-700: #334155;
    --navy-600: #475569;
    --navy-500: #64748b;
    --navy-400: #94a3b8;
    --navy-300: #cbd5e1;
    --navy-200: #e2e8f0;
    --navy-100: #f1f5f9;
    --navy-50:  #f8fafc;

    --indigo-600: #4f46e5;
    --indigo-500: #6366f1;
    --indigo-400: #818cf8;
    --indigo-300: #a5b4fc;
    --indigo-100: #e0e7ff;

    --gold-500: #f59e0b;
    --gold-400: #fbbf24;
    --gold-100: #fef3c7;

    --emerald-500: #10b981;
    --emerald-100: #d1fae5;
    --rose-500:    #f43f5e;
    --rose-100:    #ffe4e6;
    --sky-500:     #0ea5e9;
    --sky-100:     #e0f2fe;
    --violet-500:  #8b5cf6;
    --violet-100:  #ede9fe;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body:    'Plus Jakarta Sans', sans-serif;

    /* Sidebar */
    --sidebar-w: 270px;
    --sidebar-collapsed-w: 0px;

    /* Shadows & Glass */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.05);
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,.06);
    --shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.12);

    /* Radius */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-full: 9999px;

    /* Transitions */
    --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-mid:  300ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: transparent;
    color: var(--navy-800);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Mesh Background ──────────────────────────────── */
.mesh-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1;
    background: #f8faff; overflow: hidden;
}
.mesh-blob {
    position: absolute; filter: blur(90px); border-radius: 50%; opacity: 0.6;
    animation: blob-bounce 15s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: rgba(99, 102, 241, 0.35); }
.blob-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: rgba(139, 92, 246, 0.25); animation-delay: -5s; }
.blob-3 { bottom: 10%; left: 20%; width: 45vw; height: 45vw; background: rgba(236, 72, 153, 0.2); animation-delay: -10s; }
@keyframes blob-bounce {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(15%, 10%) scale(1.15); }
}

/* ─── Sidebar ───────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: rgba(15, 23, 42, 0.85); /* Deep translucent navy */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--t-mid);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--navy-700) transparent;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-icon svg { width: 42px; height: 42px; flex-shrink: 0; }
.brand-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.3px;
}
.brand-sub { font-size: .7rem; color: var(--navy-400); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: .65rem;
    font-weight: 700;
    color: var(--navy-500);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 12px 8px 4px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    color: var(--navy-400);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: all var(--t-fast);
    position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--t-fast); }
.nav-item:hover {
    background: rgba(255,255,255,.05);
    color: #fff;
    transform: translateX(2px);
}
.nav-item:hover svg { transform: scale(1.1); }
.nav-item.active {
    background: linear-gradient(135deg, var(--indigo-600), var(--violet-500));
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--indigo-400);
    border-radius: 0 var(--r-full) var(--r-full) 0;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px;
    border-top: 1px solid rgba(255,255,255,.06);
    background: rgba(0,0,0,.2);
}
.user-avatar-sm {
    width: 34px; height: 34px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .8rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-name-sm { font-size: .85rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.user-role-sm { font-size: .7rem; color: var(--navy-400); text-transform: capitalize; }
.btn-logout {
    background: none; border: none; cursor: pointer;
    color: var(--navy-500); transition: color var(--t-fast);
    padding: 6px; border-radius: var(--r-sm);
}
.btn-logout:hover { color: var(--rose-500); background: rgba(244,63,94,.1); }

/* ─── Main Wrapper ──────────────────────────────────── */
.main-wrapper {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--t-mid);
}

/* ─── Top Header ────────────────────────────────────── */
.top-header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 32px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle {
    background: none; border: none; cursor: pointer;
    color: var(--navy-600); padding: 8px; border-radius: var(--r-sm);
    transition: all var(--t-fast);
}
.sidebar-toggle:hover { background: var(--navy-100); color: var(--indigo-600); }

.page-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy-900);
    line-height: 1;
}
.breadcrumb { font-size: .78rem; color: var(--navy-500); margin-top: 2px; }

.header-right { display: flex; align-items: center; gap: 12px; }
.live-clock {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--indigo-600);
    background: var(--indigo-100);
    padding: 6px 14px;
    border-radius: var(--r-full);
    letter-spacing: .5px;
}
.header-date { font-size: .8rem; color: var(--navy-500); font-weight: 500; }

/* ─── Flash Messages ────────────────────────────────── */
.flash-container { padding: 0 28px; margin-top: 16px; }
.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--r-md);
    font-size: .88rem;
    font-weight: 500;
    transition: opacity var(--t-mid);
    animation: slideIn .3s ease;
}
.flash-success { background: var(--emerald-100); color: #065f46; border: 1px solid #a7f3d0; }
.flash-error   { background: var(--rose-100);    color: #9f1239; border: 1px solid #fda4af; }
.flash-close { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 1.1rem; opacity: .6; }
.flash-close:hover { opacity: 1; }

@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Main Content ──────────────────────────────────── */
.main-content { padding: 24px 28px 40px; flex: 1; }

/* ─── Cards ─────────────────────────────────────────── */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--r-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: all var(--t-mid);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--navy-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy-900);
}
.card-body { padding: 22px; }

/* ─── Stat Cards ─────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--r-xl);
    padding: 26px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    transition: all var(--t-mid);
    cursor: default;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); border-color: rgba(99, 102, 241, 0.3); }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--stat-color, var(--indigo-500));
}
.stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    background: color-mix(in srgb, var(--stat-color, var(--indigo-500)) 12%, transparent);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.stat-icon svg { width: 22px; height: 22px; stroke: var(--stat-color, var(--indigo-500)); }
.stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy-900);
    line-height: 1;
}
.stat-label { font-size: .82rem; color: var(--navy-500); font-weight: 500; margin-top: 4px; }
.stat-change { font-size: .78rem; font-weight: 600; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-up   { color: var(--emerald-500); }
.stat-down { color: var(--rose-500); }

/* ─── Tables ─────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--r-lg); }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
thead th {
    background: var(--navy-900);
    color: rgba(255,255,255,0.55);
    font-family: var(--font-heading);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 18px;
    text-align: left;
    white-space: nowrap;
    border-bottom: none;
}
thead th:first-child { border-radius: var(--r-md) 0 0 0; padding-left: 22px; }
thead th:last-child  { border-radius: 0 var(--r-md) 0 0; padding-right: 22px; }
tbody td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--navy-100);
    color: var(--navy-700);
    vertical-align: middle;
    font-size: .875rem;
}
tbody td:first-child { padding-left: 22px; }
tbody td:last-child  { padding-right: 22px; }
tbody tr { transition: background var(--t-fast), box-shadow var(--t-fast); }
tbody tr:hover { background: linear-gradient(90deg, #f8f9ff, #faf5ff); }
tbody tr:last-child td { border-bottom: none; }

/* Table empty state */
.table-empty {
    text-align: center;
    padding: 60px 24px;
}
.table-empty-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--navy-100);
    display: inline-flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.table-empty-icon svg { width: 30px; height: 30px; stroke: var(--navy-400); }
.table-empty-title { font-weight: 700; font-size: 1rem; color: var(--navy-700); margin-bottom: 6px; }
.table-empty-sub   { font-size: .85rem; color: var(--navy-400); margin-bottom: 20px; }

/* Table card header row */
.table-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--navy-100);
    background: #fff;
}
.table-card-meta { font-size: .82rem; color: var(--navy-500); }

/* Action icon buttons */
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--navy-200);
    background: #fff;
    color: var(--navy-600);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--t-fast);
    flex-shrink: 0;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { border-color: var(--indigo-400); color: var(--indigo-600); background: var(--indigo-100); transform: translateY(-1px); }
.icon-btn.danger:hover { border-color: var(--rose-500); color: var(--rose-500); background: var(--rose-100); }
.icon-btn.success:hover { border-color: var(--emerald-500); color: var(--emerald-500); background: var(--emerald-100); }

/* ─── Badges ─────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--r-full);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    white-space: nowrap;
}
.badge-success  { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-danger   { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.badge-warning  { background: #fef9c3; color: #a16207; border: 1px solid #fde68a; }
.badge-info     { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-primary  { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-purple   { background: var(--violet-100);  color: #4c1d95; border: 1px solid #c4b5fd; }
.badge-gray     { background: var(--navy-100);    color: var(--navy-600); border: 1px solid var(--navy-200); }

/* ─── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all var(--t-fast);
    white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--indigo-600), var(--violet-500));
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,.3);
}
.btn-primary:hover { box-shadow: 0 6px 16px rgba(99,102,241,.4); }

.btn-success {
    background: linear-gradient(135deg, var(--emerald-500), #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16,185,129,.25);
}

.btn-danger {
    background: linear-gradient(135deg, var(--rose-500), #e11d48);
    color: #fff;
    box-shadow: 0 4px 12px rgba(244,63,94,.25);
}

.btn-warning {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: #fff;
    box-shadow: 0 4px 12px rgba(245,158,11,.25);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--navy-300);
    color: var(--navy-700);
}
.btn-outline:hover { border-color: var(--indigo-500); color: var(--indigo-600); background: var(--indigo-100); }

.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 13px 26px; font-size: 1rem; }

/* ─── Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--navy-700);
    margin-bottom: 6px;
    letter-spacing: .2px;
}
.form-label .required { color: var(--rose-500); margin-left: 2px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--navy-300);
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--navy-800);
    background: #fff;
    transition: all var(--t-fast);
    outline: none;
}
.form-control:focus { border-color: var(--indigo-500); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.form-control::placeholder { color: var(--navy-400); }
.form-error { font-size: .78rem; color: var(--rose-500); margin-top: 4px; font-weight: 500; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 20px; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* ─── Page Header ────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.page-header-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy-900);
}
.page-header-sub { font-size: .85rem; color: var(--navy-500); margin-top: 2px; }

/* ─── Avatar ─────────────────────────────────────────── */
.avatar {
    width: 38px; height: 38px;
    border-radius: var(--r-full);
    object-fit: cover;
    border: 2px solid var(--indigo-100);
}
.avatar-lg { width: 80px; height: 80px; border-width: 3px; }

/* ─── Clock Widget ───────────────────────────────────── */
.clock-widget {
    background: linear-gradient(135deg, var(--navy-900), #1a1040);
    border-radius: var(--r-xl);
    padding: 28px 32px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}
.clock-widget::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,.25), transparent 70%);
}
.clock-widget::after {
    content: '';
    position: absolute;
    bottom: -60px; left: 40%;
    width: 250px; height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,92,246,.15), transparent 70%);
}
.clock-time-big {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}
.clock-date-big { font-size: .95rem; color: var(--navy-400); margin-top: 4px; font-weight: 500; }
.clock-actions { display: flex; gap: 12px; z-index: 1; }
.btn-clock-in {
    background: linear-gradient(135deg, var(--emerald-500), #059669);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: var(--r-lg);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    box-shadow: 0 4px 16px rgba(16,185,129,.4);
    display: flex; align-items: center; gap: 8px;
}
.btn-clock-in:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,185,129,.4); }
.btn-clock-out {
    background: linear-gradient(135deg, var(--rose-500), #e11d48);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: var(--r-lg);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    box-shadow: 0 4px 16px rgba(244,63,94,.4);
    display: flex; align-items: center; gap: 8px;
}
.btn-clock-out:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(244,63,94,.4); }

/* ─── Search/Filter Bar ──────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--navy-400); width: 16px; height: 16px; }
.search-input-wrap .form-control { padding-left: 38px; }
.filter-select { min-width: 160px; }

/* ─── Pagination ─────────────────────────────────────── */
.pagination-wrap { display: flex; justify-content: center; margin-top: 24px; }
.pagination-wrap .pagination { display: flex; gap: 4px; list-style: none; }
.pagination-wrap .page-item .page-link {
    padding: 8px 14px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--navy-300);
    color: var(--navy-700);
    font-weight: 500;
    font-size: .85rem;
    text-decoration: none;
    transition: all var(--t-fast);
    display: flex; align-items: center;
}
.pagination-wrap .page-item.active .page-link { background: var(--indigo-600); border-color: var(--indigo-600); color: #fff; }
.pagination-wrap .page-item .page-link:hover { border-color: var(--indigo-500); color: var(--indigo-600); }

/* ─── Modal ──────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity var(--t-mid);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
    background: #fff;
    border-radius: var(--r-xl);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-xl);
    transform: scale(.95) translateY(16px);
    transition: transform var(--t-mid);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--navy-200);
}
.modal-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--navy-900); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--navy-500); padding: 4px; border-radius: var(--r-sm); font-size: 1.3rem; }
.modal-close:hover { color: var(--rose-500); background: var(--rose-100); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--navy-200); display: flex; gap: 12px; justify-content: flex-end; }

/* ─── Section Divider ────────────────────────────────── */
.section-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 24px 0 16px;
}
.section-divider-label {
    font-family: var(--font-heading);
    font-size: .85rem;
    font-weight: 700;
    color: var(--navy-600);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}
.section-divider::before, .section-divider::after { content: ''; flex: 1; height: 1px; background: var(--navy-200); }

/* ─── Employee Profile Card ──────────────────────────── */
.employee-card {
    display: flex;
    align-items: center;
    gap: 14px;
}
.employee-card img, .employee-card .emp-avatar {
    width: 40px; height: 40px;
    border-radius: var(--r-full);
    object-fit: cover;
}
.emp-avatar {
    background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.employee-name { font-weight: 600; color: var(--navy-900); font-size: .9rem; }
.employee-id   { font-size: .75rem; color: var(--navy-500); }

/* ─── Dashboard Grid ─────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}
.dashboard-left  { display: flex; flex-direction: column; gap: 20px; }
.dashboard-right { display: flex; flex-direction: column; gap: 20px; }

/* ─── Mini Calendar ──────────────────────────────────── */
.mini-calendar { background: #fff; border-radius: var(--r-lg); border: 1px solid var(--navy-200); overflow: hidden; }
.cal-header { background: var(--navy-900); color: #fff; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; }
.cal-title { font-family: var(--font-heading); font-weight: 700; font-size: .95rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; padding: 14px; }
.cal-day-name { text-align: center; font-size: .7rem; font-weight: 700; color: var(--navy-500); text-transform: uppercase; padding-bottom: 8px; }
.cal-day {
    text-align: center; padding: 6px 4px;
    border-radius: var(--r-sm);
    font-size: .82rem;
    cursor: default;
}
.cal-day.today { background: var(--indigo-600); color: #fff; font-weight: 700; border-radius: var(--r-full); }
.cal-day.holiday { background: var(--rose-100); color: var(--rose-500); font-weight: 600; }
.cal-day.weekend { color: var(--navy-400); }
.cal-day.other-month { color: var(--navy-300); }

/* ─── Alert ──────────────────────────────────────────── */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); font-size: .88rem; margin-bottom: 16px; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: var(--sky-100);    color: #0c4a6e;  border-left: 3px solid var(--sky-500); }
.alert-warning { background: var(--gold-100);   color: #78350f;  border-left: 3px solid var(--gold-500); }
.alert-danger  { background: var(--rose-100);   color: #9f1239;  border-left: 3px solid var(--rose-500); }
.alert-success { background: var(--emerald-100);color: #065f46;  border-left: 3px solid var(--emerald-500); }

/* ─── Tabs ───────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--navy-200); margin-bottom: 24px; }
.tab-item {
    padding: 12px 20px;
    font-weight: 600;
    font-size: .88rem;
    color: var(--navy-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--t-fast);
    text-decoration: none;
}
.tab-item:hover { color: var(--indigo-600); }
.tab-item.active { color: var(--indigo-600); border-bottom-color: var(--indigo-600); }

/* ─── Progress Bar ───────────────────────────────────── */
.progress-bar-wrap { background: var(--navy-100); border-radius: var(--r-full); height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--indigo-500), var(--violet-500)); transition: width .6s ease; }

/* ─── Dropdown actions ───────────────────────────────── */
.action-menu { position: relative; display: inline-block; }
.action-btn { background: none; border: 1.5px solid var(--navy-200); border-radius: var(--r-sm); padding: 6px 10px; cursor: pointer; color: var(--navy-600); transition: all var(--t-fast); }
.action-btn:hover { border-color: var(--indigo-400); color: var(--indigo-600); }
.action-dropdown {
    position: absolute; right: 0; top: calc(100% + 6px);
    background: #fff; border: 1px solid var(--navy-200);
    border-radius: var(--r-md); box-shadow: var(--shadow-lg);
    min-width: 160px; z-index: 200;
    display: none;
}
.action-menu:hover .action-dropdown { display: block; }
.action-dropdown a, .action-dropdown button {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px; color: var(--navy-700);
    font-size: .85rem; font-weight: 500;
    text-decoration: none; width: 100%;
    background: none; border: none; cursor: pointer;
    transition: background var(--t-fast);
}
.action-dropdown a:hover, .action-dropdown button:hover { background: var(--navy-50); }
.action-dropdown .danger { color: var(--rose-500); }
.action-dropdown .danger:hover { background: var(--rose-100); }
.action-dropdown hr { border: none; border-top: 1px solid var(--navy-100); margin: 4px 0; }

/* ─── Attendance Status Dot ──────────────────────────── */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-present  { background: var(--emerald-500); box-shadow: 0 0 0 2px rgba(16,185,129,.2); }
.dot-absent   { background: var(--rose-500); }
.dot-late     { background: var(--gold-500); }
.dot-holiday  { background: var(--sky-500); }
.dot-leave    { background: var(--violet-500); }

/* ─── Premium Split-Screen Login ─────────────────────── */
.login-split-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: var(--navy-950);
}

/* Left Panel */
.login-left {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, var(--navy-950) 0%, #1a1040 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px;
    overflow: hidden;
    color: #fff;
}
.login-left-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.branding {
    display: flex;
    align-items: center;
    gap: 16px;
}
.branding svg { width: 56px; height: 56px; }
.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}
.brand-text p {
    font-size: 0.85rem;
    color: var(--indigo-300);
    margin-top: 4px;
    font-weight: 500;
}
.hero-text {
    max-width: 480px;
    margin-bottom: 40px;
}
.hero-text h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, var(--indigo-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
}

/* Animated Mesh Orbs */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: 1;
    animation: orbFloat 10s infinite alternate ease-in-out;
}
.orb-1 {
    top: -10%; left: -10%;
    width: 600px; height: 600px;
    background: var(--indigo-600);
    animation-delay: 0s;
}
.orb-2 {
    bottom: -20%; right: -10%;
    width: 500px; height: 500px;
    background: var(--violet-600);
    animation-delay: -3s;
}
.orb-3 {
    top: 30%; left: 40%;
    width: 400px; height: 400px;
    background: var(--sky-500);
    opacity: 0.4;
    animation-delay: -6s;
}
@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -40px) scale(1.1); }
}

/* Right Panel */
.login-right {
    width: 500px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 20;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}
.login-form-wrapper {
    width: 100%;
    max-width: 380px;
}
.mobile-branding {
    display: none;
    text-align: center;
    margin-bottom: 32px;
}
.form-header {
    margin-bottom: 32px;
}
.form-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy-900);
}
.form-header p {
    font-size: 0.95rem;
    color: var(--navy-500);
    margin-top: 6px;
}

/* Floating Labels */
.floating-group {
    position: relative;
    margin-bottom: 24px;
}
.floating-input {
    width: 100%;
    padding: 16px 16px 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--navy-900);
    background: var(--navy-50);
    border: 1.5px solid var(--navy-200);
    border-radius: var(--r-md);
    outline: none;
    transition: all var(--t-fast);
}
.floating-input:focus {
    border-color: var(--indigo-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.floating-label {
    position: absolute;
    left: 16px;
    top: 14px;
    color: var(--navy-500);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.2s ease;
    font-weight: 500;
}
.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
    top: -10px;
    left: 12px;
    font-size: 0.75rem;
    background: #fff;
    padding: 0 4px;
    color: var(--indigo-600);
    font-weight: 700;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}
.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: var(--indigo-600);
    cursor: pointer;
}
.remember-me label {
    font-size: 0.88rem;
    color: var(--navy-700);
    font-weight: 500;
    cursor: pointer;
}
.forgot-link {
    font-size: 0.88rem;
    color: var(--indigo-600);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--t-fast);
}
.forgot-link:hover {
    color: var(--indigo-400);
}

/* Glow Button */
.btn-login-glow {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, var(--indigo-600), var(--violet-500));
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}
.btn-login-glow::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}
.btn-login-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.5);
}
.btn-login-glow:hover::after {
    left: 150%;
}
.btn-login-glow svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}
.btn-login-glow:hover svg {
    transform: translateX(4px);
}

.demo-credentials {
    margin-top: 32px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--navy-500);
    background: var(--navy-50);
    padding: 12px;
    border-radius: var(--r-md);
    border: 1px dashed var(--navy-300);
}

/* Responsive Overrides */
@media (max-width: 900px) {
    .login-left { display: none; }
    .login-right { width: 100%; max-width: 100%; }
    .mobile-branding { display: block; }
}

/* ─── Sidebar Overlay ────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 95;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-grid-3 { grid-template-columns: 1fr 1fr; }
    .col-span-3 { grid-column: span 2; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.collapsed { transform: translateX(0); }
    .sidebar-overlay.visible { display: block; }
    .main-wrapper { margin-left: 0; }
    .main-content { padding: 16px 16px 32px; }
    .top-header { padding: 0 16px; }
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .col-span-2, .col-span-3 { grid-column: span 1; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .clock-widget { flex-direction: column; align-items: flex-start; gap: 16px; }
    .header-date { display: none; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .login-card { padding: 28px 22px; }
}

/* ─── Utility ────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--navy-500); }
.text-sm     { font-size: .82rem; }
.fw-bold     { font-weight: 700; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mb-16       { margin-bottom: 16px; }
.mb-24       { margin-bottom: 24px; }
.w-full      { width: 100%; }

/* ─── Animations ─────────────────────────────────────── */
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.pulse { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

/* ─── PDF / Print ────────────────────────────────────── */
@media print {
    .sidebar, .top-header, .btn, .flash-container { display: none !important; }
    .main-wrapper { margin-left: 0 !important; }
    .main-content { padding: 0 !important; }
}
