@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   HRMIS Data Cleaning System — Premium Enterprise Design System
   Version 3.0 | Government Professional Theme
   ========================================================================== */

/* ==========================================================================
   1. CSS Custom Properties — Light Theme
   ========================================================================== */
:root {
    /* ── Somaliland Government Green Palette ── */
    --gov-900: #004b1c;
    --gov-800: #006d28;
    --gov-700: #009639;
    --gov-600: #10b981;
    --gov-500: #34d399;
    --gov-100: #d1fae5;
    --gov-50:  #ecfdf5;

    /* ── Semantic Colors ── */
    --color-primary:       #009639;
    --color-primary-dark:  #006d28;
    --color-primary-light: #ecfdf5;
    --color-accent:        #D1121F;

    --color-success:       #009639;
    --color-success-light: #ecfdf5;
    --color-success-dark:  #006d28;

    --color-warning:       #D97706;
    --color-warning-light: #FFFBEB;
    --color-warning-dark:  #B45309;

    --color-danger:        #D1121F;
    --color-danger-light:  #fef2f2;
    --color-danger-dark:   #991b1b;

    --color-info:          #0891B2;
    --color-info-light:    #ECFEFF;

    --color-violet:        #7C3AED;
    --color-violet-light:  #EDE9FE;

    --color-teal:          #0D9488;
    --color-teal-light:    #F0FDFA;

    --color-amber:         #D97706;
    --color-amber-light:   #FFFBEB;

    /* ── Neutral Scale ── */
    --gray-50:  #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    /* ── Surfaces ── */
    --bg-app:    #F0F4F8;
    --bg-card:   #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-sidebar-hover: #F1F5F9;
    --bg-sidebar-active: linear-gradient(135deg, #009639, #006d28);

    /* ── Typography ── */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted:   #94A3B8;
    --text-on-dark: #F8FAFC;
    --text-sidebar: #475569;

    /* ── Borders ── */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    --border-focus: #3B82F6;

    /* ── Shadows ── */
    --shadow-xs:  0 1px 2px rgba(15,23,42,.04);
    --shadow-sm:  0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow-md:  0 4px 6px rgba(15,23,42,.07), 0 2px 4px rgba(15,23,42,.04);
    --shadow-lg:  0 10px 24px rgba(15,23,42,.08), 0 4px 6px rgba(15,23,42,.04);
    --shadow-xl:  0 20px 40px rgba(15,23,42,.10), 0 8px 16px rgba(15,23,42,.05);
    --shadow-card: 0 1px 3px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.05);
    --shadow-blue: 0 4px 14px rgba(29,78,216,.25);

    /* ── Radii ── */
    --radius-xs:  4px;
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;

    /* ── Transitions ── */
    --ease-fast:   150ms cubic-bezier(0.4,0,0.2,1);
    --ease-base:   250ms cubic-bezier(0.4,0,0.2,1);
    --ease-slow:   400ms cubic-bezier(0.4,0,0.2,1);
    --ease-bounce: 500ms cubic-bezier(0.68,-0.55,0.265,1.55);

    /* ── Layout ── */
    --sidebar-w:          270px;
    --sidebar-collapsed-w: 72px;
    --navbar-h:            64px;
    --content-padding:     28px;

    /* ── Font ── */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   2. Dark Theme
   ========================================================================== */
[data-theme="dark"] {
    --bg-app:    #0D1117;
    --bg-card:   #161B22;
    --bg-sidebar: #051c10;
    --bg-sidebar-hover: rgba(255,255,255,0.06);
    --bg-sidebar-active: rgba(59,130,246,0.18);

    --text-primary:   #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted:     #64748B;

    --border-color: #21262D;
    --border-light: #1C2128;

    --gray-50:  #161B22;
    --gray-100: #21262D;
    --gray-200: #30363D;
    --gray-300: #484F58;
    --gray-400: #6E7681;
    --gray-500: #8B949E;
    --gray-600: #B1BAC4;

    --shadow-card: 0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.2);
    --shadow-md: 0 4px 6px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.2);

    --color-primary-light: rgba(0, 150, 57, 0.18);
    --color-success-light: rgba(0, 150, 57, 0.18);
    --color-warning-light: rgba(217, 119, 6, 0.18);
    --color-danger-light:  rgba(209, 18, 31, 0.18);
    --color-info-light:    rgba(8, 145, 178, 0.18);
    --color-violet-light:  rgba(124, 58, 237, 0.18);
}

/* ==========================================================================
   3. Base Reset & Typography
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-app);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--ease-base), color var(--ease-base);
}

h1,h2,h3,h4,h5,h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

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

img { max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ==========================================================================
   4. App Layout
   ========================================================================== */
.app-body { overflow-x: hidden; }

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-wrapper {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--ease-base);
}

.app-wrapper.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed-w);
}

/* ==========================================================================
   5. Sidebar
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width var(--ease-base), transform var(--ease-base);
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}

/* Sidebar Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    min-height: var(--navbar-h);
}

.brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
    box-shadow: 0 4px 10px rgba(0, 150, 57, 0.15);
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.brand-logo.has-img {
    background: #ffffff !important;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .brand-logo.has-img {
    background: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.15);
}

.brand-info { flex: 1; min-width: 0; overflow: hidden; }
.brand-name {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.brand-tagline {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 1px;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section { padding: 0 16px; margin-bottom: 12px; }

.nav-section-title {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
    padding: 8px 12px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--ease-fast);
    position: relative;
    white-space: nowrap;
    margin-bottom: 4px;
}

.nav-link-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--color-primary);
    transform: translateX(4px);
}

.nav-link-item.active {
    background: var(--bg-sidebar-active) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 150, 57, 0.18) !important;
}

.nav-link-item.active .nav-chevron {
    color: white !important;
}

.nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm) !important;
    font-size: 0.9rem !important;
    flex-shrink: 0;
    transition: all var(--ease-fast);
    background: rgba(0,0,0,0.02);
    color: var(--gray-400);
}

.nav-link-item:hover .nav-icon {
    background: rgba(0, 150, 57, 0.08);
    color: var(--color-primary);
}

.nav-link-item.active .nav-icon {
    background: rgba(255, 255, 255, 0.18) !important;
    color: white !important;
}

.nav-chevron {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.nav-link-item:hover .nav-chevron {
    transform: translateX(2px);
    color: var(--text-primary);
}

/* Icon Box Color Palettes */
.bg-blue-light     { background: #eff6ff !important; color: #2563eb !important; }
.bg-green-light    { background: #f0fdf4 !important; color: #16a34a !important; }
.bg-violet-light   { background: #f3e8ff !important; color: #7c3aed !important; }
.bg-orange-light   { background: #fff7ed !important; color: #ea580c !important; }
.bg-emerald-light  { background: #ecfdf5 !important; color: #059669 !important; }
.bg-pink-light     { background: #fff1f2 !important; color: #e11d48 !important; }
.bg-teal-light     { background: #f0fdfa !important; color: #0d9488 !important; }
.bg-slate-light    { background: #f1f5f9 !important; color: #475569 !important; }

.nav-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }

.nav-badge {
    background: var(--color-danger);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    line-height: 1;
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--gray-50);
    border: 1px solid var(--border-light);
    transition: all var(--ease-base);
}

.sidebar-user:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), #006d28);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.03em;
}

.user-info { flex: 1; min-width: 0; overflow: hidden; }
.user-name { display: block; font-size: 0.8125rem; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.6875rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-logout-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--ease-fast);
    font-size: 0.875rem;
    flex-shrink: 0;
}
.sidebar-logout-btn:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Collapsed Sidebar */
.app-wrapper.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-w); }
.app-wrapper.sidebar-collapsed .brand-info,
.app-wrapper.sidebar-collapsed .nav-text,
.app-wrapper.sidebar-collapsed .nav-section-title,
.app-wrapper.sidebar-collapsed .nav-badge,
.app-wrapper.sidebar-collapsed .user-info { display: none; }
.app-wrapper.sidebar-collapsed .nav-link-item { justify-content: center; padding: 10px; }
.app-wrapper.sidebar-collapsed .nav-icon { width: 36px; height: 36px; }
.app-wrapper.sidebar-collapsed .nav-link-item.active::before { display: none; }
.app-wrapper.sidebar-collapsed .sidebar-footer { padding: 10px; }
.app-wrapper.sidebar-collapsed .sidebar-user { flex-direction: column; align-items: center; padding: 8px 4px; }
.app-wrapper.sidebar-collapsed .sidebar-logout-btn { margin-top: 4px; }
.app-wrapper.sidebar-collapsed .nav-section { padding: 4px 8px; }

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--ease-base);
}
.sidebar-overlay.active { opacity: 1; }

/* ==========================================================================
   6. Top Navbar
   ========================================================================== */
.navbar-hrmis {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--navbar-h);
    background: rgba(var(--bg-card-rgb, 255,255,255), 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 var(--content-padding);
    gap: 12px;
    transition: background var(--ease-base);
}

[data-theme="dark"] .navbar-hrmis {
    background: rgba(22,27,34,0.92);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Hamburger */
.sidebar-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 4.5px;
    align-items: center;
    transition: background var(--ease-fast);
    flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--gray-100); }
.toggle-line {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--gray-500);
    border-radius: 2px;
    transition: all var(--ease-base);
}
[data-theme="dark"] .sidebar-toggle:hover { background: var(--gray-200); }

/* Page Title area */
.page-title-area { min-width: 0; }
.page-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-nav { margin-top: 1px; }
.breadcrumb-nav ol,
.breadcrumb-nav .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: transparent;
}
.breadcrumb-nav .breadcrumb-item { display: flex; align-items: center; }
.breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    padding: 0 6px;
    color: var(--gray-300);
}
.breadcrumb-nav .breadcrumb-item a {
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--ease-fast);
}
.breadcrumb-nav .breadcrumb-item a:hover { color: var(--color-primary); }
.breadcrumb-nav .breadcrumb-item.active { color: var(--text-secondary); font-weight: 500; }

/* Navbar icon buttons */
.navbar-icon-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 0.9375rem;
    transition: background var(--ease-fast), color var(--ease-fast);
    position: relative;
}
.navbar-icon-btn:hover { background: var(--gray-100); color: var(--text-primary); }
[data-theme="dark"] .navbar-icon-btn:hover { background: var(--gray-200); }

.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--color-danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

/* User dropdown trigger */
.navbar-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 5px 10px 5px 6px;
    cursor: pointer;
    transition: all var(--ease-fast);
    color: var(--text-primary);
}
.navbar-user-btn:hover { background: var(--gray-50); border-color: var(--gray-300); }
.navbar-user-btn::after { display: none; } /* Remove Bootstrap caret */

.navbar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-violet));
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

.navbar-username {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modern Dropdown */
.dropdown-modern {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 6px;
    min-width: 220px;
    background: var(--bg-card);
    margin-top: 6px !important;
}

.dropdown-header-user {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dropdown-header-user strong { font-size: 0.875rem; color: var(--text-primary); }
.dropdown-header-user small { font-size: 0.75rem; color: var(--text-muted); }

.role-chip {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    width: fit-content;
}

.dropdown-divider { border-color: var(--border-color) !important; margin: 4px 0 !important; }

.dropdown-item {
    border-radius: var(--radius-xs);
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 8px 10px;
    font-weight: 500;
    transition: background var(--ease-fast), color var(--ease-fast);
    display: flex;
    align-items: center;
}
.dropdown-item:hover { background: var(--gray-100); color: var(--text-primary); }
.dropdown-item.text-danger { color: var(--color-danger) !important; }
.dropdown-item.text-danger:hover { background: var(--color-danger-light); }
[data-theme="dark"] .dropdown-item:hover { background: var(--gray-200); }

/* Notification Dropdown */
.notif-dropdown {
    width: 340px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    background: var(--bg-card);
    margin-top: 6px !important;
    padding: 0;
    overflow: hidden;
}
.notif-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.notif-dropdown-header h6 { margin: 0; font-size: 0.875rem; font-weight: 700; }
.notif-dropdown-header a { font-size: 0.75rem; color: var(--color-primary); }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--ease-fast);
    cursor: pointer;
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: var(--color-primary-light); }
[data-theme="dark"] .notif-item.unread { background: rgba(29,78,216,0.08); }
.notif-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.4; }
.notif-text strong { color: var(--text-primary); }
.notif-time { font-size: 0.6875rem; color: var(--text-muted); margin-top: 3px; }
.notif-empty { text-align: center; padding: 32px; color: var(--text-muted); font-size: 0.875rem; }

/* ==========================================================================
   7. Main Content
   ========================================================================== */
.main-content {
    flex: 1;
    padding: var(--content-padding);
    min-width: 0;
}

/* Page enter animation */
.page-enter { animation: pageEnter 0.3s ease-out; }
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   8. Footer
   ========================================================================== */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--content-padding);
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-card);
    flex-shrink: 0;
}

/* ==========================================================================
   9. KPI / Stat Cards
   ========================================================================== */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform var(--ease-base), box-shadow var(--ease-base);
    overflow: hidden;
    position: relative;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    transform: translate(25px, -25px);
    opacity: 0.08;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* =============================================
   KPI Cards – Refined Design System
   ============================================= */
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 22px 16px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Colored top accent bar */
.kpi-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.kpi-institutions .kpi-accent { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.kpi-queue       .kpi-accent { background: linear-gradient(90deg, #7C3AED, #A78BFA); }
.kpi-verified    .kpi-accent { background: linear-gradient(90deg, #059669, #34D399); }
.kpi-completion  .kpi-accent { background: linear-gradient(90deg, #D97706, #FCD34D); }

/* Top row: icon + numbers */
.kpi-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.kpi-icon-wrap {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.kpi-icon-blue   { background: #eff6ff; color: #2563EB; }
.kpi-icon-violet { background: #f5f3ff; color: #7C3AED; }
.kpi-icon-green  { background: #f0fdf4; color: #059669; }
.kpi-icon-gold   { background: #fffbeb; color: #D97706; }

.kpi-meta { flex: 1; min-width: 0; }
.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 3px;
}
.kpi-total-badge {
    display: inline-flex; align-items: center;
    background: var(--gray-50, #F8FAFC);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
    align-self: flex-end;
    margin-bottom: 2px;
}

/* Footer zone */
.kpi-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: auto;
}

/* Trend badge */
.kpi-trend {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.75rem; font-weight: 600;
    border-radius: 20px;
    padding: 3px 10px;
}
.kpi-trend-up { background: #f0fdf4; color: #059669; }
.kpi-trend-down { background: #fef2f2; color: #DC2626; }

/* Badge strip for Remaining Queue */
.kpi-badge-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.kpi-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.68rem; font-weight: 700;
    border-radius: 6px;
    padding: 3px 7px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.kpi-badge-blue   { background: #eff6ff; color: #1D4ED8; border-color: #BFDBFE; }
.kpi-badge-amber  { background: #fffbeb; color: #92400E; border-color: #FDE68A; }
.kpi-badge-green  { background: #f0fdf4; color: #166534; border-color: #BBF7D0; }
.kpi-badge-red    { background: #fef2f2; color: #991B1B; border-color: #FECACA; }
.kpi-badge-orange { background: #fff7ed; color: #9A3412; border-color: #FED7AA; }
.kpi-badge-rose   { background: #fff1f2; color: #9F1239; border-color: #FECDD3; }
.kpi-badge-gray   { background: #f8fafc; color: #64748B; border-color: #CBD5E1; font-style: italic; }

/* Math proof row */
.kpi-math-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.kpi-math-formula {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--gray-50, #F8FAFC);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
}

/* Progress bar for completion card */
.kpi-progress-wrap {
    display: flex; align-items: center; gap: 8px;
}
.kpi-progress-track {
    flex: 1;
    height: 7px;
    background: var(--gray-100, #F1F5F9);
    border-radius: 10px;
    overflow: hidden;
}
.kpi-progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #D97706, #10B981);
    transition: width 0.6s ease;
}
.kpi-progress-pct {
    font-size: 0.75rem; font-weight: 700;
    color: var(--text-secondary);
    min-width: 30px;
    text-align: right;
}

/* Dark mode adjustments */
[data-theme="dark"] .kpi-card { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .kpi-icon-blue   { background: rgba(59,130,246,0.15); }
[data-theme="dark"] .kpi-icon-violet { background: rgba(124,58,237,0.15); }
[data-theme="dark"] .kpi-icon-green  { background: rgba(5,150,105,0.15); }
[data-theme="dark"] .kpi-icon-gold   { background: rgba(217,119,6,0.15); }
[data-theme="dark"] .kpi-total-badge { background: var(--gray-200); }
[data-theme="dark"] .kpi-trend-up    { background: rgba(5,150,105,0.15); }
[data-theme="dark"] .kpi-badge-blue  { background: rgba(29,78,216,0.15); border-color: rgba(29,78,216,0.3); }
[data-theme="dark"] .kpi-badge-amber { background: rgba(146,64,14,0.15); border-color: rgba(146,64,14,0.3); }
[data-theme="dark"] .kpi-badge-green { background: rgba(22,101,52,0.15); border-color: rgba(22,101,52,0.3); }
[data-theme="dark"] .kpi-badge-red   { background: rgba(153,27,27,0.15); border-color: rgba(153,27,27,0.3); }
[data-theme="dark"] .kpi-badge-orange{ background: rgba(154,52,18,0.15); border-color: rgba(154,52,18,0.3); }
[data-theme="dark"] .kpi-progress-track { background: var(--gray-200); }


.stat-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.stat-body { flex: 1; min-width: 0; }
.stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}
.trend-up { background: var(--color-success-light); color: var(--color-success); }
.trend-down { background: var(--color-danger-light); color: var(--color-danger); }
.trend-neutral { background: var(--gray-100); color: var(--gray-500); }

/* Color Variants */
.stat-primary .stat-icon-wrap { background: var(--color-primary-light); color: var(--color-primary); }
.stat-primary::after { background: var(--color-primary); }

.stat-success .stat-icon-wrap { background: var(--color-success-light); color: var(--color-success); }
.stat-success::after { background: var(--color-success); }

.stat-warning .stat-icon-wrap { background: var(--color-warning-light); color: var(--color-warning); }
.stat-warning::after { background: var(--color-warning); }

.stat-danger .stat-icon-wrap { background: var(--color-danger-light); color: var(--color-danger); }
.stat-danger::after { background: var(--color-danger); }

.stat-violet .stat-icon-wrap { background: var(--color-violet-light); color: var(--color-violet); }
.stat-violet::after { background: var(--color-violet); }

.stat-teal .stat-icon-wrap { background: var(--color-teal-light); color: var(--color-teal); }
.stat-teal::after { background: var(--color-teal); }

.stat-info .stat-icon-wrap { background: var(--color-info-light); color: var(--color-info); }
.stat-info::after { background: var(--color-info); }

.stat-gold .stat-icon-wrap { background: var(--color-amber-light); color: var(--color-amber); }
.stat-gold::after { background: var(--color-amber); }

/* ==========================================================================
   10. Status Pill Strip
   ========================================================================== */
.status-pills-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 7px 14px;
    box-shadow: var(--shadow-xs);
    transition: all var(--ease-fast);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.status-pill:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* Clickable pill link wrapper */
.status-pill-link {
    text-decoration: none;
    color: inherit;
    display: contents;
}
.status-pill-link .status-pill {
    transition: all 0.18s ease;
}
.status-pill-link:hover .status-pill {
    border-color: var(--color-primary, #3B82F6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--shadow-md);
    transform: translateY(-2px);
}
.status-pill-link:focus-visible .status-pill {
    outline: 2px solid var(--color-primary, #3B82F6);
    outline-offset: 2px;
}

.pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pill-label { font-size: 0.75rem; font-weight: 500; color: var(--text-secondary); }
.pill-count { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); margin-left: 2px; }

/* Pill colors */
.pill-slate .pill-dot  { background: var(--gray-400); }
.pill-sky .pill-dot    { background: var(--color-accent); }
.pill-amber .pill-dot  { background: var(--color-warning); }
.pill-indigo .pill-dot { background: var(--color-violet); }
.pill-violet .pill-dot { background: #8B5CF6; }
.pill-emerald .pill-dot{ background: var(--color-success); }
.pill-rose .pill-dot   { background: var(--color-danger); }
.pill-teal .pill-dot   { background: var(--color-teal); }
.pill-dark .pill-dot   { background: var(--gray-700); }

/* ==========================================================================
   11. Card Modern
   ========================================================================== */
.card-modern {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow var(--ease-base);
}
.card-modern:hover { box-shadow: var(--shadow-md); }

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

.card-title-modern {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.card-body { padding: 20px; }
.card-body.p-0 { padding: 0; }

.btn-link-modern {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: color var(--ease-fast);
    flex-shrink: 0;
}
.btn-link-modern:hover { color: var(--color-primary-dark); }

/* Page Section Header */
.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}
.section-title { font-size: 1.0625rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.section-subtitle { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; }

/* ==========================================================================
   12. Modern Data Grid / Table
   ========================================================================== */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    flex-wrap: wrap;
}

.table-toolbar-left { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.table-toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

.table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table-modern thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--gray-50);
}
[data-theme="dark"] .table-modern thead { background: var(--gray-100); }

.table-modern thead th {
    padding: 11px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    background: transparent;
    cursor: pointer;
    user-select: none;
}
.table-modern thead th:first-child { padding-left: 20px; }
.table-modern thead th:last-child { padding-right: 20px; }

.table-modern tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background var(--ease-fast);
}
.table-modern tbody tr:last-child { border-bottom: none; }
.table-modern tbody tr:hover { background: var(--gray-50); }
[data-theme="dark"] .table-modern tbody tr:hover { background: var(--gray-100); }

.table-modern td {
    padding: 13px 16px;
    color: var(--text-secondary);
    vertical-align: middle;
}
.table-modern td:first-child { padding-left: 20px; }
.table-modern td:last-child { padding-right: 20px; }

/* Row checkbox */
.row-check { width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer; }

/* Empty state */
.table-empty {
    text-align: center;
    padding: 56px 24px;
    color: var(--text-muted);
}
.table-empty i { font-size: 2.5rem; opacity: 0.25; display: block; margin-bottom: 12px; }
.table-empty p { font-size: 0.9375rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }
.table-empty small { font-size: 0.8125rem; }

/* Pagination */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 10px;
}
.table-pagination .pagination { margin: 0; gap: 4px; display: flex; }
.table-pagination .page-link {
    border-radius: var(--radius-xs) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    font-size: 0.8125rem;
    padding: 5px 10px;
    background: var(--bg-card);
    transition: all var(--ease-fast);
}
.table-pagination .page-item.active .page-link { background: var(--color-primary) !important; border-color: var(--color-primary) !important; color: white !important; }
.table-pagination .page-link:hover { background: var(--gray-100) !important; }

/* Bulk action bar */
.bulk-action-bar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    font-size: 0.875rem;
}
.bulk-action-bar.visible { display: flex; }
.bulk-action-bar .btn-bulk {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-xs);
    padding: 5px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ease-fast);
}
.bulk-action-bar .btn-bulk:hover { background: rgba(255,255,255,0.25); }

/* ==========================================================================
   13. Status Badges
   ========================================================================== */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Status mappings */
.status-not-assigned, .status-not_assigned   { background: var(--gray-100); color: var(--gray-600); }
.status-not-assigned::before, .status-not_assigned::before { background: var(--gray-400); }

.status-assigned                              { background: var(--color-primary-light); color: var(--color-primary); }
.status-assigned::before                      { background: var(--color-primary); }

.status-updating                              { background: var(--color-warning-light); color: var(--color-warning); }
.status-updating::before                      { background: var(--color-warning); }

.status-updated                               { background: #EDE9FE; color: var(--color-violet); }
.status-updated::before                       { background: var(--color-violet); }

.status-pending-verification,
.status-pending_verification                  { background: #FEF3C7; color: #B45309; }
.status-pending-verification::before,
.status-pending_verification::before          { background: #D97706; }

.status-verified                              { background: var(--color-success-light); color: var(--color-success); }
.status-verified::before                      { background: var(--color-success); }

.status-approved                              { background: var(--color-teal-light); color: var(--color-teal); }
.status-approved::before                      { background: var(--color-teal); }

.status-completed                             { background: #F0FDF4; color: #15803D; }
.status-completed::before                     { background: #16A34A; }

.status-rejected                              { background: var(--color-danger-light); color: var(--color-danger); }
.status-rejected::before                      { background: var(--color-danger); }

.status-overdue                               { background: #FFF7ED; color: #C2410C; }
.status-overdue::before                       { background: #EA580C; }

.status-in-progress, .status-in_progress      { background: var(--color-info-light); color: var(--color-info); }
.status-in-progress::before, .status-in_progress::before { background: var(--color-info); }

.status-not-started, .status-not_started      { background: var(--gray-100); color: var(--gray-500); }
.status-not-started::before, .status-not_started::before { background: var(--gray-400); }

/* Grade badges */
.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    font-weight: 700;
}
.grade-A { background: var(--color-success-light); color: var(--color-success); }
.grade-B { background: var(--color-primary-light); color: var(--color-primary); }
.grade-C { background: var(--color-warning-light); color: var(--color-warning); }
.grade-D { background: var(--color-danger-light); color: var(--color-danger); }

/* ==========================================================================
   14. Progress Bar Modern
   ========================================================================== */
.progress-modern {
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill-success { background: linear-gradient(90deg, var(--color-success-dark), var(--color-success)); }
.progress-fill-warning { background: linear-gradient(90deg, var(--color-warning-dark), var(--color-warning)); }
.progress-fill-danger  { background: linear-gradient(90deg, var(--color-danger-dark),  var(--color-danger)); }

.progress-lg { height: 10px; }
.progress-xl { height: 14px; }

/* ==========================================================================
   15. Institution Avatar
   ========================================================================== */
.institution-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.employee-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-violet), #A855F7);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   16. Buttons
   ========================================================================== */
.btn-hrmis {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--ease-fast);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary-hrmis {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 1px 2px rgba(29,78,216,.3);
}
.btn-primary-hrmis:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: white; box-shadow: var(--shadow-blue); transform: translateY(-1px); }
.btn-primary-hrmis:active { transform: translateY(0); }

.btn-secondary-hrmis {
    background: var(--bg-card);
    color: var(--text-secondary);
    border-color: var(--border-color);
}
.btn-secondary-hrmis:hover { background: var(--gray-50); border-color: var(--gray-300); color: var(--text-primary); }

.btn-success-hrmis { background: var(--color-success); color: white; border-color: var(--color-success); }
.btn-success-hrmis:hover { background: var(--color-success-dark); color: white; transform: translateY(-1px); }

.btn-danger-hrmis { background: var(--color-danger); color: white; border-color: var(--color-danger); }
.btn-danger-hrmis:hover { background: var(--color-danger-dark); color: white; transform: translateY(-1px); }

.btn-warning-hrmis { background: var(--color-warning); color: white; border-color: var(--color-warning); }
.btn-warning-hrmis:hover { background: var(--color-warning-dark); color: white; }

.btn-outline-hrmis {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline-hrmis:hover { background: var(--color-primary); color: white; }

.btn-ghost-hrmis { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost-hrmis:hover { background: var(--gray-100); color: var(--text-primary); border-color: transparent; }

.btn-sm-hrmis { padding: 6px 12px; font-size: 0.8125rem; }
.btn-lg-hrmis { padding: 11px 22px; font-size: 0.9375rem; }
.btn-icon-hrmis { padding: 8px; gap: 0; }

/* ==========================================================================
   17. Form Controls
   ========================================================================== */
.form-group-modern { margin-bottom: 18px; }
.form-label-modern {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-label-modern .required { color: var(--color-danger); margin-left: 2px; }

.form-control-modern,
.form-input-modern {
    display: block;
    width: 100%;
    padding: 9px 13px;
    font-size: 0.875rem;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
    outline: none;
    appearance: none;
}
.form-control-modern:focus, .form-input-modern:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.form-control-modern::placeholder { color: var(--text-muted); }
[data-theme="dark"] .form-control-modern, [data-theme="dark"] .form-input-modern {
    background: var(--gray-100);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Search bar */
.search-input-wrap { position: relative; }
.search-input-wrap .search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
    pointer-events: none;
}
.search-input-wrap input { padding-left: 34px; }

/* Select */
.form-select-modern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Filter panel */
.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.filter-panel-title { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 7px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: end; }

/* ==========================================================================
   18. Alert / Flash Messages
   ========================================================================== */
.alert-modern {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    margin-bottom: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: alertSlideIn 0.3s ease-out;
    position: relative;
}
@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert-modern i { font-size: 0.9375rem; flex-shrink: 0; margin-top: 1px; }

.alert-success-modern { background: var(--color-success-light); border-color: #A7F3D0; color: var(--color-success-dark); }
.alert-danger-modern  { background: var(--color-danger-light);  border-color: #FECACA; color: var(--color-danger-dark); }
.alert-warning-modern { background: var(--color-warning-light); border-color: #FDE68A; color: var(--color-warning-dark); }
.alert-info-modern    { background: var(--color-info-light);    border-color: #A5F3FC; color: var(--color-info); }

.alert-close {
    position: absolute;
    top: 10px; right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    font-size: 0.875rem;
    transition: opacity var(--ease-fast);
    padding: 4px;
    border-radius: var(--radius-xs);
}
.alert-close:hover { opacity: 1; }

/* ==========================================================================
   19. Work Queue Cards
   ========================================================================== */
.queue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

.queue-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    transition: all var(--ease-base);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
}
.queue-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-xs) 0 0 var(--radius-xs);
}
.queue-card.status-rejected::before { background: var(--color-danger); }
.queue-card.status-updating::before { background: var(--color-warning); }
.queue-card.status-updated::before  { background: var(--color-violet); }
.queue-card.status-verified::before { background: var(--color-success); }
.queue-card.status-approved::before { background: var(--color-teal); }

.queue-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--gray-300); }

.queue-card-header { display: flex; align-items: flex-start; gap: 12px; }
.queue-card-body { flex: 1; }
.queue-card-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.info-chip {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.info-chip-label { font-size: 0.6875rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.info-chip-value { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }

.queue-card-actions { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-light); }

.queue-employee-name { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.queue-employee-nid { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

/* ==========================================================================
   20. Activity Feed & Timeline
   ========================================================================== */
.activity-feed { display: flex; flex-direction: column; gap: 0; }

.activity-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    position: relative;
}
.activity-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 36px;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
}

.activity-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary-light);
    border: 2px solid var(--color-primary);
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    z-index: 1;
}

.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; }
.activity-text strong { color: var(--text-primary); font-weight: 600; }
.activity-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }

/* Full Timeline component */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 10px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item { position: relative; margin-bottom: 20px; }

.timeline-dot {
    position: absolute;
    left: -23px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    z-index: 1;
    box-shadow: 0 0 0 2px var(--border-color);
}
.timeline-dot-assigned   { background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-primary-light); }
.timeline-dot-updated    { background: var(--color-violet); box-shadow: 0 0 0 2px var(--color-violet-light); }
.timeline-dot-verified   { background: var(--color-success); box-shadow: 0 0 0 2px var(--color-success-light); }
.timeline-dot-approved   { background: var(--color-teal); box-shadow: 0 0 0 2px var(--color-teal-light); }
.timeline-dot-rejected   { background: var(--color-danger); box-shadow: 0 0 0 2px var(--color-danger-light); }
.timeline-dot-completed  { background: #16A34A; box-shadow: 0 0 0 2px #F0FDF4; }
.timeline-dot-default    { background: var(--gray-400); box-shadow: 0 0 0 2px var(--gray-100); }

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-xs);
}
.timeline-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.timeline-card-action { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.timeline-card-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.timeline-card-meta { font-size: 0.8125rem; color: var(--text-secondary); }
.timeline-card-comment { font-size: 0.8125rem; color: var(--text-secondary); font-style: italic; margin-top: 8px; padding: 8px 12px; background: var(--gray-50); border-radius: var(--radius-sm); border-left: 3px solid var(--border-color); }

/* Diff display */
.diff-old { color: var(--color-danger); text-decoration: line-through; font-size: 0.8125rem; }
.diff-arrow { color: var(--text-muted); font-size: 0.75rem; margin: 0 5px; }
.diff-new { color: var(--color-success); font-weight: 600; font-size: 0.8125rem; }

/* ==========================================================================
   21. Validation Edit Page
   ========================================================================== */
.validation-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    align-items: start;
}

.validation-left-panel {
    position: sticky;
    top: calc(var(--navbar-h) + 20px);
    max-height: calc(100vh - var(--navbar-h) - 56px);
    overflow-y: auto;
}

.validation-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
}
.validation-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-color);
}
[data-theme="dark"] .validation-section-header { background: var(--gray-100); }
.validation-section-title { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.validation-section-body { padding: 16px 18px; }

/* Current data display */
.current-field-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.current-field-row:last-child { border-bottom: none; }
.current-field-label { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.current-field-value { font-size: 0.875rem; font-weight: 500; color: var(--text-primary); }
.current-field-value.empty { color: var(--text-muted); font-style: italic; }

/* Entry form rows */
.field-entry-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--ease-fast);
}
.field-entry-row:last-child { border-bottom: none; }
.field-entry-row:hover { background: var(--gray-50); margin: 0 -18px; padding: 14px 18px; border-radius: var(--radius-sm); }

.field-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ease-fast);
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    width: 100%;
}
.field-status-indicator:hover { border-color: var(--gray-300); }
.fsi-correct { border-color: #A7F3D0; background: var(--color-success-light); color: var(--color-success-dark); }
.fsi-updated { border-color: #C4B5FD; background: #F5F3FF; color: #6D28D9; }
.fsi-missing { border-color: #FECACA; background: var(--color-danger-light); color: var(--color-danger-dark); }
.fsi-clarify { border-color: #FDE68A; background: var(--color-warning-light); color: var(--color-warning-dark); }

/* Sticky action bar */
.validation-sticky-bar {
    position: sticky;
    bottom: 0;
    z-index: 50;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -4px 20px rgba(15,23,42,0.08);
    margin: 0 calc(-1 * var(--content-padding));
    flex-wrap: wrap;
}
.validation-completion {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.completion-ring-label { font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); }
.completion-pct { font-size: 1.125rem; font-weight: 800; color: var(--color-primary); }
.autosave-indicator { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.autosave-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.validation-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }

/* Employee hero card */
.employee-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.employee-hero-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-violet), #A855F7);
    color: white;
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.employee-hero-info { flex: 1; min-width: 0; }
.employee-hero-name { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); margin-bottom: 2px; }
.employee-hero-sub { font-size: 0.875rem; color: var(--text-muted); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.employee-hero-sub span { display: flex; align-items: center; gap: 5px; }
.employee-hero-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* Rejection banner */
.rejection-banner {
    background: var(--color-danger-light);
    border: 1px solid #FECACA;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.rejection-banner i { color: var(--color-danger); font-size: 1rem; margin-top: 1px; flex-shrink: 0; }
.rejection-banner-body { flex: 1; }
.rejection-banner-title { font-size: 0.875rem; font-weight: 700; color: var(--color-danger-dark); margin-bottom: 3px; }
.rejection-banner-text { font-size: 0.875rem; color: var(--color-danger-dark); }

/* ==========================================================================
   22. Institution Hero Card
   ========================================================================== */
.institution-hero {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--gov-700) 100%);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.institution-hero::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.institution-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.institution-hero-title { font-size: 1.5rem; font-weight: 800; color: white; margin-bottom: 4px; }
.institution-hero-meta { font-size: 0.875rem; color: rgba(255,255,255,0.65); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.institution-hero-meta span { display: flex; align-items: center; gap: 6px; }
.institution-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.hero-btn-white {
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ease-fast);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}
.hero-btn-white:hover { background: rgba(255,255,255,0.22); color: white; }

.institution-hero-progress { margin-top: 20px; }
.hero-progress-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 0.875rem; color: rgba(255,255,255,0.75); }
.hero-progress-bar { height: 8px; background: rgba(255,255,255,0.15); border-radius: var(--radius-full); overflow: hidden; }
.hero-progress-fill { height: 100%; background: linear-gradient(90deg, #34D399, #10B981); border-radius: var(--radius-full); transition: width 1s ease; }

/* ==========================================================================
   23. Skeleton Loaders
   ========================================================================== */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    display: block;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite;
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-circle { border-radius: 50%; }
.skeleton-rect { border-radius: var(--radius-sm); }
[data-theme="dark"] .skeleton { background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%); }

/* ==========================================================================
   24. Reports
   ========================================================================== */
.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-card);
    transition: all var(--ease-base);
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-decoration: none;
}
.report-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.report-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1875rem;
}
.report-title { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); }
.report-desc { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; }
.report-arrow { margin-top: auto; font-size: 0.8125rem; font-weight: 600; color: var(--color-primary); display: flex; align-items: center; gap: 6px; }

/* Report page header */
.report-page-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-card);
}
.report-page-title { font-size: 1.1875rem; font-weight: 800; color: var(--text-primary); }
.report-page-subtitle { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; }
.report-export-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   25. Settings & Profile
   ========================================================================== */
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.settings-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: calc(var(--navbar-h) + 20px);
}
.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--ease-fast);
    text-decoration: none;
}
.settings-nav-item:hover { background: var(--gray-100); color: var(--text-primary); }
.settings-nav-item.active { background: var(--color-primary-light); color: var(--color-primary); font-weight: 600; }

/* ==========================================================================
   26. Team Cards
   ========================================================================== */
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    transition: all var(--ease-base);
}
.team-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.team-member-avatars { display: flex; }
.team-member-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-xs);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
    margin-left: -6px;
    flex-shrink: 0;
}
.team-member-avatar:first-child { margin-left: 0; }
.team-member-more {
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 0.6875rem;
}

/* ==========================================================================
   27. Process Steps / Pipeline
   ========================================================================== */
.workflow-pipeline {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 4px;
}
.pipeline-step {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.pipeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
}
.pipeline-node-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    transition: all var(--ease-fast);
}
.pipeline-node-dot.done   { background: var(--color-success); border-color: var(--color-success); color: white; }
.pipeline-node-dot.active { background: var(--color-primary); border-color: var(--color-primary); color: white; box-shadow: 0 0 0 4px var(--color-primary-light); }
.pipeline-node-dot.failed { background: var(--color-danger); border-color: var(--color-danger); color: white; }
.pipeline-node-label { font-size: 0.6875rem; font-weight: 500; color: var(--text-muted); text-align: center; white-space: nowrap; max-width: 70px; line-height: 1.2; }
.pipeline-connector { flex: 1; min-width: 24px; height: 2px; background: var(--border-color); margin: 0 2px; margin-bottom: 18px; }
.pipeline-connector.done { background: var(--color-success); }

/* ==========================================================================
   28. Import Page
   ========================================================================== */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    transition: all var(--ease-base);
    cursor: pointer;
    background: var(--gray-50);
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}
.drop-zone-icon { font-size: 2.5rem; color: var(--text-muted); margin-bottom: 12px; display: block; }
.drop-zone-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.drop-zone-hint { font-size: 0.875rem; color: var(--text-muted); }

/* ==========================================================================
   29. DataTables Override (Compat)
   ========================================================================== */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 11px;
    font-size: 0.875rem;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-card);
    outline: none;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.dataTables_wrapper .dataTables_info { font-size: 0.8125rem; color: var(--text-muted); }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--radius-xs) !important;
    font-size: 0.8125rem !important;
    padding: 4px 10px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    margin: 0 2px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--color-primary) !important;
    color: white !important;
    border-color: var(--color-primary) !important;
}

/* Select2 Override */
.select2-container--classic .select2-selection--single,
.select2-container .select2-selection--single {
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    height: 38px !important;
    font-family: var(--font);
}
.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 12px !important;
    color: var(--text-primary) !important;
    font-size: 0.875rem;
}
.select2-dropdown { border: 1px solid var(--border-color) !important; border-radius: var(--radius-sm) !important; box-shadow: var(--shadow-lg) !important; }
.select2-results__option { font-size: 0.875rem; padding: 8px 12px; }
.select2-results__option--highlighted { background: var(--color-primary) !important; }

/* SweetAlert2 Override */
.swal-modern .swal2-popup {
    border-radius: var(--radius-xl) !important;
    font-family: var(--font) !important;
    padding: 2rem !important;
}
.swal2-confirm { border-radius: var(--radius-sm) !important; font-weight: 600 !important; }
.swal2-cancel { border-radius: var(--radius-sm) !important; font-weight: 600 !important; }

/* Bootstrap override for nav breadcrumb */
.breadcrumb { background: transparent; padding: 0; margin: 0; }

/* ==========================================================================
   30. Utility Classes
   ========================================================================== */
.text-primary-hrmis { color: var(--color-primary) !important; }
.text-success-hrmis { color: var(--color-success) !important; }
.text-warning-hrmis { color: var(--color-warning) !important; }
.text-danger-hrmis  { color: var(--color-danger) !important; }
.text-muted-hrmis   { color: var(--text-muted) !important; }
.text-main          { color: var(--text-primary) !important; }

.bg-primary-light { background: var(--color-primary-light) !important; }
.bg-success-light { background: var(--color-success-light) !important; }
.bg-warning-light { background: var(--color-warning-light) !important; }
.bg-danger-light  { background: var(--color-danger-light) !important; }

.fw-800 { font-weight: 800 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-500 { font-weight: 500 !important; }

.rounded-hrmis { border-radius: var(--radius-md) !important; }
.shadow-card { box-shadow: var(--shadow-card) !important; }

.gap-3-custom { gap: 12px !important; }

.divider { border: none; border-top: 1px solid var(--border-color); margin: 0; }

/* ==========================================================================
   31. Dashboard Specific
   ========================================================================== */
.dashboard-wrapper { animation: pageEnter 0.35s ease-out; }

.dashboard-greeting {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--gov-700) 50%, var(--gov-600) 100%);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    color: white;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.dashboard-greeting::before {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.dashboard-greeting::after {
    content: '';
    position: absolute;
    right: 40px; bottom: -80px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.greeting-text { position: relative; z-index: 1; }
.greeting-title { font-size: 1.375rem; font-weight: 800; color: white; margin-bottom: 4px; }
.greeting-sub { font-size: 0.875rem; color: rgba(255,255,255,0.7); }
.greeting-date { font-size: 0.875rem; color: rgba(255,255,255,0.6); text-align: right; position: relative; z-index: 1; }
.greeting-date strong { display: block; font-size: 1rem; color: white; font-weight: 700; }

.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--ease-fast);
    box-shadow: var(--shadow-xs);
}
.quick-action-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); transform: translateY(-1px); }
.quick-action-btn i { font-size: 0.875rem; }

/* ==========================================================================
   32. Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 1200px) {
    .validation-layout { grid-template-columns: 1fr; }
    .validation-left-panel { position: static; max-height: none; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
    .queue-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

@media (max-width: 992px) {
    /* Mobile sidebar */
    .sidebar {
        transform: translateX(-100%);
        z-index: 1001;
        width: var(--sidebar-w) !important;
    }
    .sidebar.sidebar-mobile-open { transform: translateX(0); }
    .sidebar-overlay { display: block; }

    .main-wrapper { margin-left: 0 !important; }
    .app-wrapper.sidebar-collapsed .main-wrapper { margin-left: 0 !important; }

    .brand-info, .nav-text, .nav-section-title, .nav-badge, .user-info { display: flex !important; }
    .sidebar.sidebar-mobile-open .brand-info { display: block !important; }
    .sidebar.sidebar-mobile-open .nav-text { display: inline !important; }

    .institution-hero { padding: 20px; }
    .institution-hero-title { font-size: 1.25rem; }
    .content-padding { --content-padding: 16px; }
    .main-content { padding: 16px; }
}

@media (max-width: 768px) {
    :root { --content-padding: 16px; }
    .main-content { padding: 16px; }
    .navbar-hrmis { padding: 0 16px; }
    .app-footer { padding: 12px 16px; flex-direction: column; gap: 4px; text-align: center; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 1.5rem; }
    .card-body { padding: 16px; }
    .table-toolbar { padding: 10px 14px; }
    .table-modern td, .table-modern thead th { padding: 10px 12px; }
    .section-header { flex-direction: column; gap: 10px; }
    .employee-hero-card { flex-direction: column; text-align: center; }
    .employee-hero-sub { justify-content: center; }
    .queue-grid { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .status-pills-row { gap: 6px; }
    .validation-sticky-bar { flex-direction: column; align-items: stretch; }
    .validation-actions { justify-content: flex-end; }
}

@media (max-width: 576px) {
    .page-title { font-size: 0.9375rem; }
    .navbar-username { display: none !important; }
    .filter-grid { grid-template-columns: 1fr; }
    .table-modern { font-size: 0.8125rem; }
    .queue-card { padding: 14px 16px; }
}

/* ==========================================================================
   33. Dark Theme Component Overrides
   ========================================================================== */
[data-theme="dark"] .table-modern tbody tr:hover { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .status-pill { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .queue-card { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .validation-section-card { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .filter-panel { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .table-container { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .card-modern { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .navbar-hrmis { border-bottom-color: var(--gray-200); }
[data-theme="dark"] .dropdown-modern { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .notif-dropdown { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .timeline-card { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .stat-card { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .report-card { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .team-card { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .drop-zone { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .employee-hero-card { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .navbar-user-btn { border-color: var(--gray-200); }
[data-theme="dark"] .navbar-user-btn:hover { background: var(--gray-200); }
[data-theme="dark"] .quick-action-btn { background: var(--gray-100); border-color: var(--gray-200); color: var(--text-secondary); }
[data-theme="dark"] .btn-secondary-hrmis { background: var(--gray-100); border-color: var(--gray-200); color: var(--text-secondary); }
[data-theme="dark"] .form-control-modern { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .sidebar-user { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .table-modern thead { background: var(--gray-100); }
[data-theme="dark"] .activity-dot { border-color: var(--color-primary); background: rgba(29,78,216,0.15); }
[data-theme="dark"] .validation-sticky-bar { background: var(--gray-100); border-color: var(--gray-200); box-shadow: 0 -4px 20px rgba(0,0,0,0.25); }
[data-theme="dark"] .field-entry-row:hover { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .current-field-row { border-bottom-color: var(--gray-200); }
[data-theme="dark"] .dashboard-greeting { background: linear-gradient(135deg, #0D1B2A 0%, var(--gov-900) 100%); }
[data-theme="dark"] .trend-neutral { background: var(--gray-200); color: var(--gray-500); }
[data-theme="dark"] .skeleton { background: linear-gradient(90deg, var(--gray-200) 25%, rgba(255,255,255,0.03) 50%, var(--gray-200) 75%); }
[data-theme="dark"] .notif-item:hover { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .timeline-card-comment { background: var(--gray-200); border-left-color: var(--gray-300); }
[data-theme="dark"] .hero-progress-bar { background: rgba(255,255,255,0.12); }
[data-theme="dark"] .pipeline-node-dot { background: var(--gray-100); border-color: var(--gray-200); }

/* ==========================================================================
   34. Print Styles — High-Contrast Black & White & Clean Layout
   ========================================================================== */
@media print {
    @page {
        margin: 10mm;
        size: auto;
    }
    
    *, *::before, *::after {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 9pt !important;
        line-height: 1.3 !important;
    }

    /* Hide non-printable elements */
    .sidebar, .navbar-hrmis, .app-footer, .sidebar-overlay,
    .btn, .btn-hrmis, button, .filter-card, .filter-panel,
    .dc-toolbar, .no-print, nav, .pagination, .page-header-actions,
    .notif-dropdown, .breadcrumb-hrmis, .alert-modern, form,
    .dc-density-group, .dc-column-toggle, #col-toggle-wrap, #col-menu {
        display: none !important;
    }

    .main-wrapper, .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .card-modern, .stat-card {
        border: 1px solid #333333 !important;
        box-shadow: none !important;
        margin-bottom: 15px !important;
        page-break-inside: avoid;
        background: #ffffff !important;
    }

    /* Tables & Grids in High Contrast B&W */
    table, .table, .dc-table, .data-table {
        width: 100% !important;
        border-collapse: collapse !important;
        color: #000000 !important;
        font-size: 8.5pt !important;
        background: #ffffff !important;
    }

    table th, .table th, .dc-table th {
        background-color: #f0f0f0 !important;
        color: #000000 !important;
        font-weight: bold !important;
        border: 1px solid #333333 !important;
        padding: 4px 6px !important;
    }

    table td, .table td, .dc-table td {
        border: 1px solid #666666 !important;
        padding: 4px 6px !important;
        color: #000000 !important;
        vertical-align: middle !important;
        background: #ffffff !important;
    }

    tr {
        page-break-inside: avoid !important;
    }

    /* Badges & Value Pills in B&W */
    .badge, .badge-status, .badge-modern, .grade-badge,
    .old-value-pill, .new-value-pill, .fsi-btn {
        border: 1px solid #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 1px 4px !important;
        font-size: 7.5pt !important;
        font-weight: bold !important;
        border-radius: 2px !important;
    }

    .old-value-pill, .old-val {
        text-decoration: line-through !important;
        color: #444444 !important;
    }

    .new-value-pill, .new-val {
        font-weight: bold !important;
        color: #000000 !important;
    }

    .dc-scroll-container {
        overflow: visible !important;
    }

    .dc-sticky-0, .dc-sticky-1 {
        position: static !important;
        box-shadow: none !important;
    }
}

/* ==========================================================================
   35. Compatibility Aliases — Bridge layer for alternate class names
   ========================================================================== */

/* Strip stray Bootstrap container-fluid wrapper */
.main-content > .container-fluid,
.main-content > [class*="container"] {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
}

/* Stat card — alternate inner element names used by subagents */
.stat-card .stat-icon,
.stat-card .stat-icon-bg {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}
.stat-primary .stat-icon  { background: var(--color-primary-light); color: var(--color-primary); }
.stat-success .stat-icon  { background: var(--color-success-light); color: var(--color-success); }
.stat-warning .stat-icon  { background: var(--color-warning-light); color: var(--color-warning); }
.stat-danger  .stat-icon  { background: var(--color-danger-light);  color: var(--color-danger);  }
.stat-violet  .stat-icon  { background: var(--color-violet-light);  color: var(--color-violet);  }
.stat-teal    .stat-icon  { background: var(--color-teal-light);    color: var(--color-teal);    }
.stat-info    .stat-icon  { background: var(--color-info-light);    color: var(--color-info);    }
.stat-gold    .stat-icon  { background: var(--color-amber-light);   color: var(--color-amber);   }

.stat-card .stat-info,
.stat-card .stat-content { flex: 1; min-width: 0; }
.stat-card .stat-info h3,
.stat-card .stat-content h3 {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.stat-card .stat-info p,
.stat-card .stat-content p {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}
.stat-card .stat-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

/* Button alias — some subagent files used .btn .btn-hrmis or .btn-outline */
.btn.btn-hrmis,
.btn-hrmis {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ease-fast);
    border: 1.5px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    font-family: var(--font-sans);
}
.btn.btn-primary-hrmis,
.btn-primary-hrmis {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn.btn-primary-hrmis:hover,
.btn-primary-hrmis:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color:#fff; }
.btn.btn-secondary-hrmis,
.btn-secondary-hrmis {
    background: var(--bg-card);
    color: var(--text-secondary);
    border-color: var(--border-color);
}
.btn.btn-secondary-hrmis:hover,
.btn-secondary-hrmis:hover { background: var(--gray-50); color: var(--text-primary); }
.btn.btn-success-hrmis,
.btn-success-hrmis { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.btn.btn-success-hrmis:hover,
.btn-success-hrmis:hover { background: var(--color-success-dark); color:#fff; }
.btn.btn-danger-hrmis,
.btn-danger-hrmis { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.btn.btn-danger-hrmis:hover,
.btn-danger-hrmis:hover { background: var(--color-danger-dark); color:#fff; }
.btn.btn-warning-hrmis,
.btn-warning-hrmis { background: var(--color-warning); color: #fff; border-color: var(--color-warning); }
.btn.btn-outline-primary,
.btn-outline-primary {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn.btn-outline-primary:hover,
.btn-outline-primary:hover { background: var(--color-primary-light); color: var(--color-primary); }
.btn.btn-outline-secondary,
.btn-outline-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}
.btn.btn-outline-secondary:hover,
.btn-outline-secondary:hover { background: var(--gray-100); }
.btn.btn-outline,
.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}
.btn.btn-sm.btn-hrmis,
.btn.btn-sm { padding: 6px 12px; font-size: 0.8125rem; }

/* Queue card info-chip alternate: plain span */
.queue-card-info .info-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--gray-50);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 3px 9px;
}

/* form-select-modern fallback */
.form-select-modern {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394A3B8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 34px;
}

/* Section missing .section-header standalone */
.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.section-title { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.section-subtitle { font-size: 0.875rem; color: var(--text-muted); margin: 0; }

/* Settings layout alias */
.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 768px) { .settings-layout { grid-template-columns: 1fr; } }
.settings-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: sticky;
    top: 88px;
}
.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--ease-fast);
}
.settings-nav-item:hover { background: var(--gray-50); color: var(--text-primary); }
.settings-nav-item.active { background: var(--color-primary-light); color: var(--color-primary); font-weight: 600; }

/* fw-600 / fw-700 Bootstrap-style helpers */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* Table empty row center */
.table-modern .text-center.py-4.text-muted {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Table pagination row */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

/* Alignment helpers */
.gap-0 { gap: 0 !important; }
.min-width-0 { min-width: 0 !important; }

/* Dark mode compat */
[data-theme="dark"] .settings-nav { background: var(--gray-100); border-color: var(--gray-200); }
[data-theme="dark"] .settings-nav-item.active { background: rgba(29,78,216,0.15); color: var(--color-accent); }
[data-theme="dark"] .btn-secondary-hrmis,
[data-theme="dark"] .btn.btn-secondary-hrmis { background: var(--gray-100); border-color: var(--gray-200); color: var(--text-secondary); }
[data-theme="dark"] .btn.btn-outline,
[data-theme="dark"] .btn-outline { border-color: var(--gray-300); color: var(--gray-400); }


/* ==========================================================================
   HRMIS UI Enhancement Suite — Premium Micro-interactions & Glassmorphism
   ========================================================================== */

/* ── Smooth Scrollbars ── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--gray-200);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--gray-300);
}

/* ── Glassmorphism Top Navbar ── */
.navbar-hrmis {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
    position: sticky;
    top: 0;
    z-index: 999;
}
[data-theme="dark"] .navbar-hrmis {
    background: rgba(22, 27, 34, 0.8) !important;
    border-bottom: 1px solid rgba(48, 54, 61, 0.6) !important;
}

/* ── Card Lift & Hover Glows ── */
.card-modern {
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s ease !important;
    border: 1px solid var(--border-color);
}
.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 16px -6px rgba(15, 23, 42, 0.04) !important;
    border-color: var(--gray-300);
}
[data-theme="dark"] .card-modern:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 16px -6px rgba(0, 0, 0, 0.3) !important;
    border-color: var(--gray-200);
}

/* ── Stat Card Dynamic Scaling ── */
.stat-card {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease !important;
}
.stat-card:hover {
    transform: scale(1.03) translateY(-1px);
    box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.15) !important;
}
[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5) !important;
}

/* ── Interactive Buttons ── */
.btn-hrmis, .btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-hrmis:hover, .btn:hover {
    transform: translateY(-1.5px);
}
.btn-hrmis:active, .btn:active {
    transform: translateY(0.5px) scale(0.98);
}
.btn-primary-hrmis:hover {
    box-shadow: 0 8px 20px -6px rgba(29, 78, 216, 0.45) !important;
}
.btn-success-hrmis:hover {
    box-shadow: 0 8px 20px -6px rgba(5, 150, 105, 0.45) !important;
}
.btn-danger-hrmis:hover {
    box-shadow: 0 8px 20px -6px rgba(220, 38, 38, 0.45) !important;
}

/* ── Pulsing Glow Animations for Statuses ── */
.badge-status.status-verified,
.badge-status.status-completed,
.badge-status.status-approved {
    position: relative;
    padding-left: 20px !important;
}
.badge-status.status-verified::before,
.badge-status.status-completed::before,
.badge-status.status-approved::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    animation: statusPulse 1.8s infinite ease-in-out;
}

@keyframes statusPulse {
    0% {
        transform: translateY(-50%) scale(0.85);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-50%) scale(1.3);
        opacity: 1;
        box-shadow: 0 0 8px currentColor;
    }
    100% {
        transform: translateY(-50%) scale(0.85);
        opacity: 0.5;
    }
}

/* ── Form Control Focus Ring ── */
.form-control-modern, .form-select-modern {
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.form-control-modern:focus, .form-select-modern:focus {
    border-color: var(--gov-700) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15) !important;
}
[data-theme="dark"] .form-control-modern:focus, [data-theme="dark"] .form-select-modern:focus {
    border-color: var(--gov-500) !important;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2) !important;
}

/* ── Modern Sidebar Links ── */
.sidebar-nav .nav-link-item {
    position: relative;
    border-radius: var(--radius-sm);
    margin: 2px 10px;
    padding: 10px 14px;
    transition: all 0.22s ease !important;
}
.sidebar-nav .nav-link-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 3px;
    background-color: var(--gov-500);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity 0.22s ease, height 0.22s ease;
}
.sidebar-nav .nav-link-item:hover::before {
    opacity: 0.5;
    height: 60%;
}
.sidebar-nav .nav-link-item.active::before {
    opacity: 1;
    height: 70%;
}
.sidebar-nav .nav-link-item.active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* ── Dark Mode Sidebar Compatibility Overrides ── */
[data-theme="dark"] .sidebar {
    background: #161b22 !important;
    border-color: #30363d !important;
}
[data-theme="dark"] .sidebar-brand {
    border-bottom: 1px solid #30363d !important;
}
[data-theme="dark"] .sidebar-user {
    background: #0d1117 !important;
    border-color: #30363d !important;
}
[data-theme="dark"] .sidebar-user .user-name {
    color: #e2e8f0 !important;
}
[data-theme="dark"] .sidebar-user .user-role {
    color: #8b949e !important;
}
[data-theme="dark"] .sidebar-user .sidebar-logout-btn {
    color: #8b949e !important;
}
[data-theme="dark"] .nav-link-item {
    color: #c9d1d9 !important;
}
[data-theme="dark"] .nav-link-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--color-primary) !important;
}
[data-theme="dark"] .nav-link-item.active {
    color: white !important;
}
[data-theme="dark"] .nav-chevron {
    color: #8b949e !important;
}
[data-theme="dark"] .bg-blue-light     { background: rgba(37, 99, 235, 0.15) !important; color: #60a5fa !important; }
[data-theme="dark"] .bg-green-light    { background: rgba(22, 163, 74, 0.15) !important; color: #34d399 !important; }
[data-theme="dark"] .bg-violet-light   { background: rgba(124, 58, 237, 0.15) !important; color: #c084fc !important; }
[data-theme="dark"] .bg-orange-light   { background: rgba(234, 88, 12, 0.15) !important; color: #fb923c !important; }
[data-theme="dark"] .bg-emerald-light  { background: rgba(5, 150, 105, 0.15) !important; color: #34d399 !important; }
[data-theme="dark"] .bg-pink-light     { background: rgba(225, 29, 72, 0.15) !important; color: #f472b6 !important; }
[data-theme="dark"] .bg-teal-light     { background: rgba(13, 148, 136, 0.15) !important; color: #2dd4bf !important; }
[data-theme="dark"] .bg-slate-light    { background: rgba(71, 85, 105, 0.15) !important; color: #94a3b8 !important; }



}

/* ==========================================================================
   Employee Data Changes Table UI Polish
   ========================================================================== */
.data-changes-table th {
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 700 !important;
    background: var(--gray-50) !important;
    color: var(--gray-500) !important;
    padding: 12px 10px !important;
    text-align: center !important;
    border-bottom: 2px solid var(--border-color) !important;
}

.data-changes-table td {
    padding: 12px 10px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Align Employee info column to left */
.data-changes-table th:nth-child(2),
.data-changes-table td:nth-child(2) {
    text-align: left !important;
}

.mini-change-table {
    width: 100%;
    margin: 0;
    padding: 0;
    border-collapse: collapse !important;
    border: none !important;
    background: transparent !important;
}

.mini-change-table td {
    padding: 2px !important;
    border: none !important;
    background: transparent !important;
    vertical-align: middle !important;
    text-align: center !important;
}

.mini-change-table td.old-val-cell {
    width: 45%;
}

.mini-change-table td.arrow-cell {
    width: 10%;
    color: var(--gray-400);
    font-size: 0.72rem;
    opacity: 0.8;
}

.mini-change-table td.new-val-cell {
    width: 45%;
}

.old-value-pill {
    font-size: 0.72rem;
    font-weight: 500;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
    padding: 3px 8px;
    border-radius: 6px;
    text-decoration: line-through;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.new-value-pill {
    font-size: 0.72rem;
    font-weight: 600;
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.06) !important;
    border: 1px solid rgba(16, 185, 129, 0.22) !important;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.02);
}

.pill-empty {
    background: transparent !important;
    border: 1px dashed var(--gray-300) !important;
    color: var(--gray-400) !important;
    text-decoration: none !important;
    font-style: italic;
    box-shadow: none !important;
}

/* Dark mode variations for table and pills */
[data-theme="dark"] .data-changes-table th {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--gray-400) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .old-value-pill {
    color: #fca5a5 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.22) !important;
}

[data-theme="dark"] .new-value-pill {
    color: #34d399 !important;
    background: rgba(52, 211, 153, 0.08) !important;
    border-color: rgba(52, 211, 153, 0.22) !important;
}

[data-theme="dark"] .pill-empty {
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--gray-500) !important;
}

/* ===========================================================================
   37. Sidebar refinement
   ========================================================================== */
.sidebar {
    background:
        linear-gradient(180deg, rgba(0, 150, 57, 0.035), transparent 170px),
        var(--bg-sidebar);
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.035);
}

.sidebar-brand {
    padding: 22px 22px 19px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    box-shadow: 0 8px 18px rgba(0, 150, 57, 0.22);
}

.brand-name {
    letter-spacing: -0.025em;
}

.brand-tagline {
    margin-top: 2px;
    letter-spacing: 0.075em;
}

.sidebar-nav {
    padding: 14px 12px 20px;
}

.nav-section {
    padding: 0;
    margin-bottom: 17px;
}

.nav-section:first-child {
    margin-bottom: 21px;
}

.nav-section-title {
    padding: 7px 13px 6px;
    margin: 0 0 3px;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    color: #8ca0bb;
}

.sidebar-nav .nav-link-item {
    gap: 11px;
    margin: 2px 0;
    padding: 8px 11px;
    min-height: 46px;
    border-radius: 10px;
    color: #405575;
}

.sidebar-nav .nav-link-item::before {
    left: -1px;
    top: 11px;
    height: 24px;
    width: 3px;
    background: #48d17b;
}

.sidebar-nav .nav-link-item:hover {
    background: rgba(0, 150, 57, 0.065);
    color: #007a2f;
    transform: translateX(2px);
}

.nav-icon {
    width: 30px;
    height: 30px;
    font-size: 0.82rem !important;
    background: #f5f7fb;
    color: #8ca0bb;
}

.nav-link-item:hover .nav-icon {
    background: rgba(0, 150, 57, 0.12);
    color: #008f36;
}

.sidebar-nav .nav-link-item.active {
    background: linear-gradient(115deg, #008f36, #007328) !important;
    box-shadow: 0 8px 17px rgba(0, 118, 43, 0.2) !important;
    transform: none;
}

.nav-link-item.active .nav-icon {
    background: rgba(255, 255, 255, 0.16) !important;
}

.sidebar-footer {
    padding: 14px;
    background: rgba(248, 250, 252, 0.65);
}

.sidebar-user {
    padding: 9px 10px;
    border-radius: 11px;
    background: #f8fafc;
}

.user-avatar {
    border-radius: 9px;
    box-shadow: 0 3px 7px rgba(0, 150, 57, 0.16);
}

.user-name { color: var(--text-primary); }

[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, rgba(0, 150, 57, 0.1), transparent 180px), #161b22 !important;
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .nav-section-title { color: #6f849d; }
[data-theme="dark"] .sidebar-nav .nav-link-item { color: #b8c4d1 !important; }
[data-theme="dark"] .nav-icon { background: rgba(255, 255, 255, 0.045); color: #7f94ad; }
[data-theme="dark"] .sidebar-footer { background: rgba(0, 0, 0, 0.11); }

@media (max-width: 992px) {
    .sidebar-nav { padding-left: 12px; padding-right: 12px; }
}

/* ==========================================================================
   HRMIS 4.0 — Ultra-Premium Modern Redesign Overrides
   ========================================================================== */

:root {
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-lg: 16px;
    --radius-md: 12px;
}

body {
    font-family: var(--font) !important;
    background: radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
                radial-gradient(at 50% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
                radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
                #f8fafc !important;
}

[data-theme="dark"] body {
    background: radial-gradient(at 0% 0%, rgba(6, 78, 59, 0.15) 0px, transparent 50%),
                radial-gradient(at 100% 100%, rgba(17, 24, 39, 0.4) 0px, transparent 50%),
                #0b0f17 !important;
}

/* ── Modern Sidebar ── */
.sidebar {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-right: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 4px 0 30px rgba(15, 23, 42, 0.02) !important;
    transition: all 0.3s ease !important;
}

[data-theme="dark"] .sidebar {
    background: rgba(22, 27, 34, 0.8) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.2) !important;
}

.sidebar-brand {
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    background: transparent !important;
}

[data-theme="dark"] .sidebar-brand {
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

.sidebar-nav .nav-link-item {
    margin: 4px 0 !important;
    border-radius: 12px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 500 !important;
}

.sidebar-nav .nav-link-item:hover {
    background: rgba(0, 150, 57, 0.08) !important;
    color: #007a2f !important;
    transform: translateY(-1px) translateX(2px) !important;
}

[data-theme="dark"] .sidebar-nav .nav-link-item:hover {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
}

.sidebar-nav .nav-link-item.active {
    background: linear-gradient(135deg, #009639, #006d28) !important;
    box-shadow: 0 10px 20px -8px rgba(0, 150, 57, 0.4) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* ── Modern Top Navbar ── */
.navbar-hrmis {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.015) !important;
}

[data-theme="dark"] .navbar-hrmis {
    background: rgba(22, 27, 34, 0.8) !important;
    border-bottom-color: rgba(255, 255, 255, 0.04) !important;
}

/* ── Modern Cards ── */
.card-modern, .timeline-card {
    border-radius: 16px !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    background: #ffffff !important;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.04) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card-modern:hover, .timeline-card:hover {
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.08) !important;
    transform: translateY(-3px) !important;
    border-color: rgba(0, 150, 57, 0.25) !important;
}

[data-theme="dark"] .card-modern, [data-theme="dark"] .timeline-card {
    background: rgba(22, 27, 34, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .card-modern:hover, [data-theme="dark"] .timeline-card:hover {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

/* ── Details View Custom styling ── */
.card-header-modern {
    background: rgba(248, 250, 252, 0.6) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    padding: 16px 20px !important;
}

[data-theme="dark"] .card-header-modern {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom-color: rgba(255, 255, 255, 0.04) !important;
}

.table-modern {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table-modern tbody tr {
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
    transition: background 0.2s ease !important;
}

[data-theme="dark"] .table-modern tbody tr {
    border-bottom-color: rgba(255, 255, 255, 0.03) !important;
}

/* ── Details Value Display ── */
.table-modern th {
    font-weight: 600 !important;
    color: var(--gray-500) !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

.table-modern td {
    font-size: 0.93rem !important;
    color: var(--text-primary) !important;
}

/* ── Modern Dynamic Buttons ── */
.btn-hrmis {
    border-radius: 10px !important;
    padding: 8px 18px !important;
    font-weight: 600 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-primary-hrmis, .btn-primary {
    background: linear-gradient(135deg, #009639, #006d28) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 150, 57, 0.25) !important;
}

.btn-primary-hrmis:hover, .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 150, 57, 0.35) !important;
    transform: translateY(-1.5px) !important;
}

.btn-secondary-hrmis, .btn-secondary {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    color: var(--text-secondary) !important;
}

.btn-secondary-hrmis:hover, .btn-secondary:hover {
    background: var(--gray-50) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

[data-theme="dark"] .btn-secondary-hrmis, [data-theme="dark"] .btn-secondary {
    background: var(--gray-100) !important;
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.05) !important;
}

[data-theme="dark"] .btn-secondary-hrmis:hover, [data-theme="dark"] .btn-secondary:hover {
    background: var(--gray-200) !important;
}

/* ── Code block styling (Extra Metadata) ── */
pre {
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    padding: 16px !important;
    background: #0d1117 !important;
}

/* ── Custom Glows for Sections ── */
.border-left-primary {
    border-left: 5px solid #009639 !important;
}

.border-left-danger {
    border-left: 5px solid #d1121f !important;
}

.border-left-success {
    border-left: 5px solid #009639 !important;
}

