/* =============================================
   PORTAL MAIN STYLESHEET
   Extracted from index.html for performance
   ============================================= */

        /* --- DATATABLES MODS --- */
        .dataTables_wrapper .dataTables_filter {
            display: none;
        }

        /* Hide global search */
        .payroll-filter-row input {
            width: 100%;
            padding: 4px 8px;
            font-size: 0.75rem;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background: var(--light-bg);
            color: var(--text-main);
            transition: all 0.2s;
        }

        .payroll-filter-row input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
        }

        table.dataTable thead th {
            border-bottom: none !important;
        }

        .dataTables_info,
        .dataTables_paginate {
            font-size: 0.85rem;
            margin-top: 15px;
        }

        /* --- ANIMATIONS --- */
        @keyframes pulsate-save {
            0% {
                box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
            }

            70% {
                box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
            }
        }

        .pulsate-save {
            animation: pulsate-save 1.5s infinite;
            border: 2px solid white !important;
        }

        :root {
            /* Premium SaaS Theme - Light Mode Only */
            --primary-color: #2563eb;       /* Royal Blue */
            --primary-hover: #1d4ed8;
            --secondary-color: #64748b;     /* Slate 500 */
            --success-color: #059669;       /* Emerald 600 */
            --info-color: #0ea5e9;          /* Sky 500 */
            --warning-color: #d97706;       /* Amber 600 */
            --danger-color: #dc2626;        /* Red 600 */

            --light-bg: #f8fafc;            /* Slate 50 */
            --card-bg: rgba(255, 255, 255, 0.85); /* For Glassmorphism */
            --text-main: #0f172a;           /* Slate 900 */
            --text-muted: #64748b;          /* Slate 500 */
            --border-color: #e2e8f0;        /* Slate 200 */

            --sidebar-bg: #1e3a8a;          /* Deep Royal Blue */
            --sidebar-text: #bfdbfe;
            --sidebar-hover: rgba(255, 255, 255, 0.12);
            --sidebar-active-bg: #ffffff;
            --sidebar-active-text: #1e3a8a;
            --header-bg: #ffffff;
            
            --glass-blur: blur(12px);
            --transition-speed: 0.3s;
            --shadow-premium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

            --ease-premium: cubic-bezier(0.16, 1, 0.3, 1); /* Quinto: Fast out, slow in */
            --duration-pro: 400ms;
            --duration-snappy: 200ms;
            --stagger-delay: 50ms;
            
            --overlay-bg: rgba(15, 23, 42, 0.95);
        }

        #suspended-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: var(--overlay-bg);
            backdrop-filter: blur(8px);
            z-index: 99999;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            color: white;
            text-align: center;
        }

        #suspended-overlay .lock-icon {
            font-size: 6rem;
            color: #ef4444;
            margin-bottom: 2rem;
            animation: pulse-danger 2s infinite;
        }

        @keyframes pulse-danger {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.1); opacity: 0.8; }
            100% { transform: scale(1); opacity: 1; }
        }

        /* --- GLOBAL ENTRANCE ANIMATIONS --- */
        @keyframes fadeSlideUp {
            from {
                opacity: 0;
                transform: translateY(15px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeScaleIn {
            from {
                opacity: 0;
                transform: scale(0.96);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes saas-banner-slide {
            from { transform: translateY(-100%); opacity: 0; }
            to   { transform: translateY(0); opacity: 1; }
        }

        .animate-up {
            animation: fadeSlideUp var(--duration-pro) var(--ease-premium) forwards;
            opacity: 0;
        }

        .animate-pop {
            animation: fadeScaleIn var(--duration-pro) var(--ease-premium) forwards;
            opacity: 0;
        }

        /* Staggered Delay Utilities */
        .stagger-1 { animation-delay: calc(var(--stagger-delay) * 1); }
        .stagger-2 { animation-delay: calc(var(--stagger-delay) * 2); }
        .stagger-3 { animation-delay: calc(var(--stagger-delay) * 3); }
        .stagger-4 { animation-delay: calc(var(--stagger-delay) * 4); }
        .stagger-5 { animation-delay: calc(var(--stagger-delay) * 5); }
        .stagger-6 { animation-delay: calc(var(--stagger-delay) * 6); }


        body {
            font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--light-bg);
            color: var(--text-main);
            overflow-x: hidden;
            letter-spacing: -0.01em;
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
            transition: background-color var(--transition-speed), color var(--transition-speed);
        }

        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
            font-weight: 600;
            color: var(--text-main);
            letter-spacing: -0.02em;
        }

        /* Ensure headings inside colored/dark containers respect text color utilities */
        .text-white h1,
        .text-white h2,
        .text-white h3,
        .text-white h4,
        .text-white h5,
        .text-white h6,
        .bg-dark h1,
        .bg-dark h2,
        .bg-dark h3,
        .bg-dark h4,
        .bg-dark h5,
        .bg-dark h6,
        .bg-primary h1,
        .bg-primary h2,
        .bg-primary h3,
        .bg-primary h4,
        .bg-primary h5,
        .bg-primary h6,
        .bg-danger h1,
        .bg-danger h2,
        .bg-danger h3,
        .bg-danger h4,
        .bg-danger h5,
        .bg-danger h6 {
            color: inherit !important;
        }

        .text-gray-800 {
            color: var(--text-main) !important;
        }

        .text-primary {
            color: var(--primary-color) !important;
        }

        .text-info {
            color: var(--info-color) !important;
        }

        .text-success {
            color: var(--success-color) !important;
        }

        .text-warning {
            color: var(--warning-color) !important;
        }

        .text-danger {
            color: var(--danger-color) !important;
        }

        .text-muted {
            color: var(--text-muted) !important;
        }

        /* --- CARDS & PANELS --- */
        .card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
            margin-bottom: 1.5rem;
            transition: all var(--duration-snappy) var(--ease-premium);
        }

        .card:hover {
            box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
        }

        /* Modern Metric glow removed */
        .border-left-primary {
            border-left: none !important;
            border-top: none !important;
        }

        .border-left-success {
            border-left: none !important;
            border-top: none !important;
        }

        .border-left-info {
            border-left: none !important;
            border-top: none !important;
        }

        .border-left-warning {
            border-left: none !important;
            border-top: none !important;
        }

        .border-left-danger {
            border-left: none !important;
            border-top: none !important;
        }

        .card-header {
            background-color: transparent;
            border-bottom: 1px solid var(--border-color);
            font-weight: 600;
            padding: 1.25rem 1.5rem;
            border-radius: 12px 12px 0 0 !important;
            color: var(--text-main);
        }

        /* --- BUTTONS --- */
        .btn {
            border-radius: 8px;
            font-weight: 500;
            padding: 0.5rem 1.25rem;
            transition: all var(--duration-snappy) var(--ease-premium);
            border: none;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            font-size: 0.875rem;
        }

        .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary-color), #2563eb);
            color: white;
        }

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

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

        .btn-warning {
            background: linear-gradient(135deg, var(--warning-color), #d97706);
            color: white;
            font-weight: 600;
        }

        .btn-info {
            background: linear-gradient(135deg, var(--info-color), #0284c7);
            color: white;
        }

        .btn-secondary {
            background: var(--secondary-color);
            color: white;
            border: 1px solid var(--border-color);
        }

        .btn-outline-info {
            border: 1px solid var(--info-color);
            color: var(--info-color);
            background: transparent;
        }

        .btn-outline-info:hover {
            background: var(--info-color);
            color: white;
        }

        .btn-outline-danger {
            border: 1px solid var(--danger-color);
            color: var(--danger-color);
            background: transparent;
        }

        .btn-outline-danger:hover {
            background: var(--danger-color);
            color: white;
        }

        .btn-rounded {
            border-radius: 9999px;
            padding: 0.5rem 1.5rem;
        }

        .btn-xs {
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
            line-height: 1.5;
            border-radius: 4px;
            box-shadow: none;
        }

        /* --- INPUTS & FORMS --- */
        .form-control {
            border-radius: 8px;
            border: 1px solid var(--border-color);
            padding: 0.6rem 0.85rem;
            font-size: 0.875rem;
            background-color: var(--card-bg);
            color: var(--text-main);
            transition: border-color var(--duration-snappy) var(--ease-premium), 
                        box-shadow var(--duration-snappy) var(--ease-premium),
                        transform var(--duration-snappy) var(--ease-premium);
            box-shadow: none;
        }

        .form-control:focus {
            border-color: var(--primary-color);
            background-color: #fff;
            color: var(--text-main);
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
            outline: 0;
            transform: translateY(-1px);
        }

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

        select.form-control {
            height: 38px !important;
            padding-top: 0.375rem !important;
            padding-bottom: 0.375rem !important;
            line-height: 1.5 !important;
        }

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

        /* Specific fix for the companies dropdown in staff section */
        #filter-staff-company {
            min-width: 180px;
            height: 38px !important;
            padding: 0.375rem 0.75rem;
            line-height: normal;
        }

        /* Dashboard Header Button Area */
        .dashboard-actions {
            background: var(--header-bg);
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            border-radius: 0 0 12px 12px;
        }

        /* --- PREMIUM GLASSMORPHISM --- */
        .glass-card {
            background: var(--card-bg);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-shadow: var(--shadow-premium);
        }

        .glass-sidebar {
            background: linear-gradient(180deg, var(--sidebar-bg) 0%, #172554 100%);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border-right: 1px solid rgba(255, 255, 255, 0.1);
        }

        /* --- MODERN SCROLLBARS --- */
        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        ::-webkit-scrollbar-track {
            background: transparent;
        }
        ::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 10px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

        /* --- SKELETON ANIMATIONS --- */
        @keyframes skeleton-loading {
            0% { background-position: 100% 50%; }
            100% { background-position: 0 50%; }
        }

        .skeleton {
            background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
            background-size: 200% 100%;
            animation: skeleton-loading 1.5s infinite;
            border-radius: 4px;
        }

        /* --- MICRO-INTERACTIONS --- */
        .btn, .clickable-card, .nav-link {
            transition: all var(--duration-snappy) var(--ease-premium) !important;
        }

        .btn:active, .clickable-card:active {
            transform: scale(0.96) !important;
        }

        .lift-hover:hover {
            transform: translateY(-4px) scale(1.01);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }

        /* --- SIDEBAR ACCORDION --- */
        .nav-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1.25rem;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--sidebar-text);
            border-radius: 8px;
            margin: 4px 8px;
            font-size: 0.75rem;
            text-transform: uppercase;
            font-weight: 700;
            letter-spacing: 0.05em;
        }

        .nav-section-header:hover {
            background: var(--sidebar-hover);
            color: #fff;
        }

        .nav-section-header i.toggle-icon {
            transition: transform 0.3s ease;
            font-size: 0.7rem;
        }

        .nav-section-header.expanded {
            color: #fff;
        }

        .nav-section-header.expanded i.toggle-icon {
            transform: rotate(180deg);
        }

        .nav-submenu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
            opacity: 0;
            padding-left: 10px;
        }

        .nav-submenu.expanded {
            max-height: 500px; /* Adjust as needed */
            opacity: 1;
            margin-bottom: 15px;
        }

        .nav-link {
            padding: 0.7rem 1.25rem !important;
            margin: 2px 8px !important;
            border-radius: 8px !important;
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 0.875rem;
            color: var(--sidebar-text) !important;
            transition: all var(--duration-snappy) var(--ease-premium) !important;
        }

        .nav-submenu.expanded .nav-link {
            animation: fadeSlideUp var(--duration-pro) var(--ease-premium) forwards;
            opacity: 0;
        }

        .nav-submenu.expanded .nav-link:nth-child(1) { animation-delay: 0.05s; }
        .nav-submenu.expanded .nav-link:nth-child(2) { animation-delay: 0.10s; }
        .nav-submenu.expanded .nav-link:nth-child(3) { animation-delay: 0.15s; }
        .nav-submenu.expanded .nav-link:nth-child(4) { animation-delay: 0.20s; }
        .nav-submenu.expanded .nav-link:nth-child(5) { animation-delay: 0.25s; }

        .nav-link i {
            width: 20px;
            text-align: center;
            font-size: 1rem;
            transition: transform var(--duration-pro) var(--ease-premium) !important;
        }

        .nav-link:hover {
            background: var(--sidebar-hover);
            color: #fff !important;
            transform: translateX(4px);
        }

        .nav-link:hover i {
            transform: scale(1.2) rotate(8deg);
            color: #fff !important;
        }

        .nav-link.active {
            background: var(--sidebar-active-bg) !important;
            color: var(--sidebar-active-text) !important;
            font-weight: 600;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .nav-link.active i {
            color: var(--sidebar-active-text) !important;
            transform: scale(1.1);
        }

        .clickable-card,
        .kpi-pill,
        .dash-kpi-strip .kpi-pill {
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .clickable-card:hover,
        .kpi-pill:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            filter: brightness(1.02);
        }

        .clickable-card:active,
        .kpi-pill:active {
            transform: translateY(0);
        }

        .dash-grid-4 {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1.25rem;
            margin-bottom: 1.5rem;
        }

        @media (max-width: 1200px) {
            .dash-grid-4 {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .dash-grid-4 {
                grid-template-columns: 1fr;
            }
        }

        /* --- MODERN MODAL ANIMATIONS --- */
        .modal.fade .modal-dialog {
            transform: scale(0.96) translateY(10px);
            transition: transform var(--duration-pro) var(--ease-premium), 
                        opacity var(--duration-pro) var(--ease-premium);
            opacity: 0;
        }

        .modal.show .modal-dialog {
            transform: scale(1) translateY(0);
            opacity: 1;
        }

        .modal-backdrop.fade {
            transition: opacity var(--duration-pro) var(--ease-premium);
        }

        /* --- SWEETALERT2 OVERRIDES --- */
        .swal2-backdrop-show {
            backdrop-filter: blur(4px);
            transition: backdrop-filter var(--duration-pro) var(--ease-premium);
        }

        /* --- COMMAND PALETTE (Ctrl+K) --- */
        .command-palette-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(15, 23, 42, 0.4);
            backdrop-filter: blur(8px);
            z-index: 10000;
            display: none;
            justify-content: center;
            padding-top: 15vh;
            transition: all 0.2s ease;
        }

        .command-palette {
            background: white;
            width: 100%;
            max-width: 600px;
            border-radius: 16px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            overflow: hidden;
            border: 1px solid #e2e8f0;
            display: flex;
            flex-direction: column;
            max-height: 400px;
        }

        .command-palette-search {
            padding: 18px 25px;
            border-bottom: 1px solid #f1f5f9;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .command-palette-input {
            border: none;
            outline: none;
            font-size: 1.1rem;
            width: 100%;
            font-weight: 500;
            color: #1e293b;
        }

        .command-palette-results {
            overflow-y: auto;
            padding: 10px;
        }

        .command-result {
            padding: 12px 15px;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.2s;
            color: #475569;
            font-weight: 500;
        }

        .command-result:hover, .command-result.selected {
            background: #f1f5f9;
            color: var(--primary-color);
        }

        .command-result i {
            width: 24px;
            text-align: center;
        }

        .command-shortcut {
            margin-left: auto;
            font-size: 0.7rem;
            padding: 2px 6px;
            background: #f1f5f9;
            border-radius: 4px;
            color: #94a3b8;
            font-weight: 700;
        }

        /* --- VIEW TRANSITIONS --- */
        #main-content {
            transition: opacity var(--duration-pro) var(--ease-premium), 
                        transform var(--duration-pro) var(--ease-premium);
        }

        .view-transition-out {
            opacity: 0;
            transform: translateY(10px);
        }

        .view-transition-in {
            opacity: 1;
            transform: translateY(0);
        }

        /* --- TABLES --- */
        .table {
            color: var(--text-main);
            margin-bottom: 0;
            font-size: 0.875rem;
        }

        .table th {
            border-top: none;
            border-bottom: 1px solid var(--border-color);
            font-weight: 600;
            color: var(--text-muted);
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 0.75rem 1rem;
            background: var(--light-bg);
        }

        .table td {
            vertical-align: middle;
            border-top: 1px solid var(--border-color);
            padding: 1rem;
            transition: background var(--duration-snappy) var(--ease-premium);
        }

        .table-hover tbody tr:hover td {
            background-color: rgba(37, 99, 235, 0.04) !important;
        }

        .table-bordered {
            border: none;
        }

        .table-bordered td,
        .table-bordered th {
            border: none;
            border-bottom: 1px solid var(--border-color);
        }

        /* --- SIDEBAR --- */
        .sidebar {
            min-height: 100vh;
            background-color: var(--sidebar-bg);
            color: var(--sidebar-text);
            padding-top: 1.5rem;
            border-right: none;
            box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
            position: relative;
        }

        .sidebar .text-white {
            color: #ffffff !important;
            font-weight: 600;
            letter-spacing: -0.01em;
        }

        .sidebar .text-warning {
            color: #facc15 !important;
        }

        .sidebar .nav-link {
            color: var(--sidebar-text);
            padding: 0.75rem 1.25rem;
            margin: 0.35rem 1rem;
            border-radius: 99px;
            transition: all 0.2s ease;
            font-weight: 500;
            display: flex;
            align-items: center;
            font-size: 0.875rem;
        }

        .sidebar .nav-link i {
            margin-right: 0.75rem;
            font-size: 1.1rem;
            width: 24px;
            text-align: center;
            color: var(--sidebar-text);
            transition: color 0.2s ease;
            opacity: 0.8;
        }

        .sidebar .nav-link:hover {
            background-color: var(--sidebar-hover);
            color: #ffffff;
        }

        .sidebar .nav-link.active {
            color: var(--sidebar-active-text);
            background-color: var(--sidebar-active-bg);
            font-weight: 600;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .sidebar .nav-link.active i {
            color: var(--sidebar-active-text);
            opacity: 1;
        }

        /* --- LOGIN & MODALS --- */
        .login-container {
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: var(--light-bg);
        }

        .login-card {
            width: 100%;
            max-width: 400px;
            padding: 2.5rem 2rem;
            background: var(--card-bg);
            border-radius: 24px;
            box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1), 0 10px 20px -5px rgba(0, 0, 0, 0.05);
            border: 1px solid var(--border-color);
            position: relative;
            overflow: hidden;
        }

        .login-card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
            pointer-events: none;
        }

        .modal-content {
            background-color: var(--card-bg);
            color: var(--text-main);
            border: none;
            border-radius: 16px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            overflow: hidden;
        }

        .modal-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            background: var(--card-bg);
            color: var(--text-main);
        }

        .modal-title {
            font-weight: 600;
            font-size: 1.125rem;
            color: var(--text-main) !important;
        }

        .modal-body {
            padding: 1.5rem;
        }

        /* Fix modal close buttons */
        .close {
            color: var(--text-main);
            text-shadow: none;
            opacity: 0.6;
        }

        .close:hover {
            color: var(--danger-color);
            opacity: 1;
        }

        /* --- BADGES --- */
        .badge {
            padding: 0.35em 0.65em;
            border-radius: 4px;
            font-weight: 600;
            letter-spacing: 0.025em;
            font-size: 0.75rem;
        }

        .badge-success {
            background-color: rgba(16, 185, 129, 0.1);
            color: var(--success-color);
            border: 1px solid rgba(16, 185, 129, 0.2);
        }

        .badge-danger {
            background-color: rgba(239, 68, 68, 0.1);
            color: var(--danger-color);
            border: 1px solid rgba(239, 68, 68, 0.2);
        }

        .badge-warning {
            background-color: rgba(245, 158, 11, 0.1);
            color: var(--warning-color);
            border: 1px solid rgba(245, 158, 11, 0.2);
        }

        .badge-primary {
            background-color: rgba(59, 130, 246, 0.1);
            color: var(--primary-color);
            border: 1px solid rgba(59, 130, 246, 0.2);
        }

        .badge-info {
            background-color: rgba(14, 165, 233, 0.1);
            color: var(--info-color);
            border: 1px solid rgba(14, 165, 233, 0.2);
        }

        .badge-secondary {
            background-color: rgba(161, 161, 170, 0.1);
            color: var(--text-muted);
            border: 1px solid rgba(161, 161, 170, 0.2);
        }

        /* --- MEGA DASHBOARD CSS --- */
        .glass-card {
            background: rgba(var(--card-bg-rgb, 255, 255, 255), 0.7);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
            position: relative;
        }
        .glass-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.12);
            border-color: rgba(var(--primary-color-rgb, 59, 130, 246), 0.4);
        }
        body.dark-mode .glass-card {
            background: rgba(30, 41, 59, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
        }
        .mega-grid {
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 1.5rem;
        }
        .ai-marquee-wrapper {
            background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            color: #ffffff !important;
            padding: 12px 20px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
            margin-bottom: 2rem;
            height: 50px;
        }

        .ai-marquee-wrapper i {
            color: #ffffff !important;
            opacity: 1 !important;
        }

        .ai-marquee-content {
            display: flex;
            gap: 80px;
            white-space: nowrap;
            width: max-content;
            animation: scrollMarquee 35s linear infinite !important;
        }

        .ai-marquee-content span {
            color: #ffffff !important;
            font-weight: 700;
        }

        .ai-marquee-content b, .ai-marquee-content strong {
            color: #ffffff !important;
            font-weight: 800;
        }

        @keyframes scrollMarquee { 
            0% { transform: translateX(100%); } 
            100% { transform: translateX(-100%); } 
        }
        .mega-kpi-card {
            position: relative;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        .apex-glow {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.1), transparent 70%);
            pointer-events: none;
        }
        .mega-kpi-card::after {
            content: '';
            position: absolute;
            top: -50px;
            right: -50px;
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: inherit;
            filter: blur(50px);
            opacity: 0.4;
            z-index: 0;
        }
        .mega-kpi-val {
            font-size: 2.2rem;
            font-weight: 800;
            letter-spacing: -1.5px;
            z-index: 1;
            line-height: 1;
        }
        .mega-kpi-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            opacity: 0.7;
            font-weight: 700;
            z-index: 1;
            margin-bottom: 0.5rem;
        }
        .timeline-container {
            position: relative;
            padding-left: 24px;
        }
        .timeline-container::before {
            content: '';
            position: absolute;
            left: 0;
            top: 10px;
            bottom: 10px;
            width: 2px;
            background: linear-gradient(to bottom, var(--primary-color), var(--border-color));
        }
        .timeline-item {
            position: relative;
            margin-bottom: 1.5rem;
            padding-left: 10px;
        }
        .timeline-item::before {
            content: '';
            position: absolute;
            left: -32px;
            top: 6px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: var(--primary-color);
            border: 3px solid var(--card-bg);
            box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
            z-index: 2;
        }
        .quick-action-dock {
            display: flex;
            gap: 12px;
        }
        .quick-action-btn {
            width: 44px;
            height: 44px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            color: var(--text-main);
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        }
        .quick-action-btn:hover {
            transform: translateY(-8px) rotate(8deg);
            background: var(--primary-color);
            color: #fff;
            box-shadow: 0 15px 25px -10px rgba(59, 130, 246, 0.6);
            border-color: var(--primary-color);
        }
        .blink {
            animation: blinker 1.5s linear infinite;
        }
        @keyframes blinker {
            50% { opacity: 0.3; }
        }

        /* --- MISC --- */
        .hidden {
            display: none !important;
        }

        #interview-timer-bar {
            position: sticky;
            top: 0;
            z-index: 1000;
            background: rgba(24, 24, 27, 0.85);
            backdrop-filter: blur(12px);
            color: #fff;
            padding: 10px 0;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
            border-bottom: 1px solid var(--border-color);
            display: none;
        }

        .timer-display {
            font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 1.25rem;
            font-weight: 700;
            color: #fff;
            letter-spacing: -0.02em;
        }

        .quiz-option {
            cursor: pointer;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 12px 16px;
            transition: all 0.2s;
            margin-bottom: 8px;
            background: var(--light-bg);
            font-weight: 500;
            font-size: 0.875rem;
        }

        .quiz-option:hover {
            border-color: var(--primary-color);
            background-color: rgba(59, 130, 246, 0.05);
        }

        .quiz-option input {
            margin-right: 12px;
            transform: scale(1.1);
        }

        .nav-tabs {
            border-bottom: 2px solid var(--border-color);
            background-color: #f1f5f9;
            border-radius: 12px 12px 0 0;
            padding: 8px 12px 0 12px;
        }

        .nav-tabs .nav-link {
            border: none;
            color: #334155 !important;
            font-weight: 700;
            padding: 0.8rem 1.5rem;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-size: 0.875rem;
            border-bottom: 3px solid transparent;
            margin-right: 8px;
            opacity: 1 !important;
        }

        .nav-tabs .nav-link:hover {
            color: var(--primary-color) !important;
            background: rgba(37, 99, 235, 0.05);
            border-radius: 8px 8px 0 0;
        }

        .nav-tabs .nav-link.active {
            background: #fff;
            color: var(--primary-color) !important;
            border-bottom: 3px solid var(--primary-color);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            border-radius: 8px 8px 0 0;
        }

        /* --- MMG SPECIFIC TAB PILLS --- */
        .mmg-pills .nav-link {
            border-radius: 10px !important;
            color: #1e293b !important;
            font-weight: 700 !important;
            transition: all 0.2s ease;
            border: 1px solid #e2e8f0;
            margin: 0 4px;
            background: #f8fafc;
        }

        .mmg-pills .nav-link:hover {
            background-color: #f1f5f9 !important;
            color: var(--primary-color) !important;
            border-color: var(--primary-color);
        }

        .mmg-pills .nav-link.active {
            background-color: var(--primary-color) !important;
            color: #fff !important;
            box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35) !important;
            border-color: var(--primary-color);
        }

        /* --- DASHBOARD TOP ACTIONS BAR --- */
        .dashboard-actions {
            background: #ffffff;
            border-bottom: 2px solid #e2e8f0;
            padding: 1.25rem 2rem;
            margin-bottom: 2rem;
            display: flex;
            align-items: center;
            gap: 1.25rem;
            flex-wrap: wrap;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }

        .dashboard-actions .btn {
            font-weight: 700;
            font-size: 0.85rem;
            padding: 0.6rem 1.25rem;
            border-radius: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Better contrast for icons in top bars */
        .dashboard-actions i, .topbar i {
            font-size: 1.15rem;
            opacity: 1 !important;
        }

        /* --- STATUS BADGES ENHANCEMENT --- */
        .badge-success-soft { background-color: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }
        .badge-danger-soft { background-color: rgba(239, 68, 68, 0.1); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.2); }
        .badge-warning-soft { background-color: rgba(245, 158, 11, 0.1); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.2); }
        .badge-info-soft { background-color: rgba(14, 165, 233, 0.1); color: #0284c7; border: 1px solid rgba(14, 165, 233, 0.2); }
        
        .badge {
            font-weight: 600;
            padding: 0.35em 0.65em;
            letter-spacing: 0.02em;
        }

        /* Specifically target "Draft" and "Unpaid" for visibility */
        .badge-warning { background-color: #f59e0b; color: #fff; box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2); }
        .badge-danger { background-color: #ef4444; color: #fff; box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2); }

        /* --- PAYSLIP STYLES --- */
        .payslip-container {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            padding: 40px;
            background: #fff;
            color: #333;
            max-width: 900px;
            margin: 20px auto;
            border: 1px solid #ddd;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        }

        .payslip-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
            border-bottom: 2px solid #003366;
            padding-bottom: 20px;
        }

        .payslip-logo {
            flex-shrink: 0;
            padding: 0;
            min-height: 80px;
            display: flex;
            align-items: center;
        }

        .payslip-title {
            font-size: 3.5rem;
            color: #003366;
            font-weight: 700;
        }

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

        .payslip-box {
            border: 1px solid #003366;
        }

        .payslip-box-label {
            background: #003366;
            color: #fff;
            text-transform: uppercase;
            font-size: 11px;
            font-weight: 700;
            padding: 4px 8px;
        }

        .payslip-box-value {
            padding: 4px 8px;
            font-size: 13px;
            font-weight: 500;
        }

        .payslip-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 0px;
        }

        .payslip-table th {
            background: #003366;
            color: #fff;
            text-transform: uppercase;
            font-size: 11px;
            font-weight: 700;
            padding: 4px 8px;
            text-align: left;
        }

        .payslip-table td {
            border: 1px solid #ddd;
            padding: 4px 8px;
            font-size: 12px;
            height: 18px;
        }

        .payslip-table .label-col {
            width: 40%;
            background: #e9ecef;
            font-weight: 600;
        }

        .payslip-table .value-col {
            width: 20%;
            text-align: center;
        }

        .payslip-table .rate-col {
            width: 20%;
            text-align: center;
        }

        .payslip-table .total-col {
            width: 20%;
            text-align: right;
            font-weight: 700;
        }

        .payslip-section-header {
            background: #003366;
            color: #fff;
            text-transform: uppercase;
            font-size: 13px;
            font-weight: 700;
            padding: 6px 10px;
            border: 1px solid #003366;
        }

        .payslip-footer-row {
            background: #003366;
            color: #fff;
            font-weight: 700;
        }

        .payslip-footer-row td {
            border: 1px solid #003366;
        }

        .payslip-net-pay {
            background: #003366;
            color: #fff;
            font-size: 1.25rem;
            font-weight: 700;
            padding: 10px;
            text-align: right;
            margin-top: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 4px;
        }

        /* Payslips always print/preview in light mode for realism, even when the portal is in Dark Mode */
        .payslip-container {
            color-scheme: light !important;
        }

        body.dark-mode .payslip-container,
        body.dark-mode .payslip-container * {
            background-color: #ffffff !important;
            color: #333333 !important;
            border-color: #dddddd !important;
            box-shadow: none !important;
            text-shadow: none !important;
        }

        /* Specific resets for nested Bootstrap elements that may have !important from global dark mode */
        body.dark-mode .payslip-container .card,
        body.dark-mode .payslip-container .card-body,
        body.dark-mode .payslip-container .card-header,
        body.dark-mode .payslip-container .bg-white,
        body.dark-mode .payslip-container .bg-light,
        body.dark-mode .payslip-container .table,
        body.dark-mode .payslip-container .table td,
        body.dark-mode .payslip-container .table th {
            background-color: #ffffff !important;
            color: #333333 !important;
            border-color: #dddddd !important;
        }

        /* Re-apply Navy Branding Colors */
        body.dark-mode .payslip-container .payslip-title,
        body.dark-mode .payslip-container .payslip-table th,
        body.dark-mode .payslip-container .payslip-box-label,
        body.dark-mode .payslip-container .payslip-section-header,
        body.dark-mode .payslip-container .payslip-footer-row,
        body.dark-mode .payslip-container .payslip-net-pay {
            background-color: #003366 !important;
            color: #ffffff !important;
            border-color: #003366 !important;
        }

        body.dark-mode .payslip-container .card-header {
            background-color: #003366 !important;
            color: #ffffff !important;
        }

        body.dark-mode .payslip-container .bg-light {
            background-color: #f8f9fa !important;
        }

        body.dark-mode .payslip-container .text-white {
            color: #ffffff !important;
        }

        body.dark-mode .payslip-container .text-muted {
            color: #6c757d !important;
        }

        body.dark-mode .payslip-container .text-success {
            color: #28a745 !important;
        }

        body.dark-mode .payslip-container .text-danger {
            color: #dc3545 !important;
        }

        body.dark-mode .payslip-container .progress {
            background-color: #e9ecef !important;
        }

        /* Intensive Reset for Form Elements to Lock Light Mode Aesthetics */
        body.dark-mode .payslip-container input,
        body.dark-mode .payslip-container select,
        body.dark-mode .payslip-container textarea,
        body.dark-mode .payslip-container .payslip-input {
            background-color: #ffffff !important;
            color: #333333 !important;
            border: 1px solid #dddddd !important;
            appearance: auto !important;
        }

        body.dark-mode .payslip-container .payslip-input {
            border: none !important;
        }

        /* Fix for date picker icon consistency */
        body.dark-mode .payslip-container input::-webkit-calendar-picker-indicator {
            filter: none !important;
        }

        body.dark-mode .payslip-container .payslip-box {
            border-color: #003366 !important;
        }

        body.dark-mode .payslip-container .payslip-table .label-col {
            background: #e9ecef !important;
        }

        .payslip-input {
            width: 100%;
            border: none;
            background: transparent;
            text-align: inherit;
            font-size: inherit;
            font-family: inherit;
            font-weight: inherit;
            outline: none;
        }

        .payslip-input:focus {
            background: rgba(0, 51, 102, 0.05);
        }

        .payslip-stamp {
            position: absolute;
            bottom: 100px;
            right: 50px;
            width: 150px;
            height: 150px;
            background: url('img/stamp.png');
            /* We'll generate a stamp if possible or leave placeholder */
            background-size: contain;
            opacity: 0.6;
            pointer-events: none;
        }

        @media print {
            .no-print {
                display: none !important;
            }

            .payslip-container {
                border: none;
                box-shadow: none;
                padding: 10px;
            }

            /* Report Printing Styles */
            .sidebar,
            .navbar,
            .modal-header,
            .modal-footer,
            #reportFilter,
            .btn {
                display: none !important;
            }

            .modal {
                position: absolute;
                left: 0;
                top: 0;
                margin: 0;
                padding: 0;
                overflow: visible !important;
            }

            .modal-content {
                border: none !important;
                box-shadow: none !important;
            }

            .modal-dialog {
                max-width: 100% !important;
                width: 100% !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            body {
                background: white !important;
            }
        }

        /* === MODERN DASHBOARD STYLES === */
        .dash-hero {
            background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #7c3aed 100%);
            border-radius: 18px;
            padding: 2rem 2.5rem;
            color: white;
            position: relative;
            overflow: hidden;
            margin-bottom: 1.5rem;
        }

        .dash-hero::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -20%;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
            border-radius: 50%;
        }

        .dash-hero::after {
            content: '';
            position: absolute;
            bottom: -30%;
            left: -10%;
            width: 300px;
            height: 300px;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
            border-radius: 50%;
        }

        .dash-hero h1 {
            font-size: 1.75rem;
            font-weight: 700;
            letter-spacing: -0.5px;
            margin-bottom: 0.25rem;
            position: relative;
            z-index: 1;
            color: #ffffff !important;
        }

        .dash-hero p {
            opacity: 0.85;
            font-size: 0.9rem;
            margin-bottom: 0;
            position: relative;
            z-index: 1;
            color: #ffffff !important;
        }

        .dash-hero .hero-date {
            font-size: 0.8rem;
            opacity: 0.7;
            position: relative;
            z-index: 1;
            color: #ffffff !important;
        }

        .dash-grid {
            display: grid;
            gap: 1.25rem;
            margin-bottom: 1.5rem;
        }

        .dash-grid-4 {
            grid-template-columns: repeat(4, 1fr);
        }

        .dash-grid-3 {
            grid-template-columns: repeat(3, 1fr);
        }

        .dash-grid-2 {
            grid-template-columns: repeat(2, 1fr);
        }

        @media (max-width: 1200px) {
            .dash-grid-4 {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {

            .dash-grid-4,
            .dash-grid-3,
            .dash-grid-2 {
                grid-template-columns: 1fr;
            }
        }

        .dash-stat-card {
            background: var(--card-bg);
            border-radius: 16px;
            padding: 1.5rem;
            border: 1px solid var(--border-color);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .dash-stat-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
        }

        .dash-stat-card .stat-icon {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            margin-bottom: 1rem;
        }

        .dash-stat-card .stat-value {
            font-size: 2rem;
            font-weight: 800;
            letter-spacing: -1px;
            line-height: 1.1;
            color: var(--text-main);
        }

        .dash-stat-card .stat-label {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted);
            font-weight: 600;
            margin-top: 0.35rem;
        }

        .dash-stat-card .stat-delta {
            font-size: 0.7rem;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 20px;
            display: inline-block;
        }

        .stat-delta-up {
            background: rgba(16, 185, 129, 0.12);
            color: #10b981;
        }

        .stat-delta-neutral {
            background: rgba(59, 130, 246, 0.12);
            color: #3b82f6;
        }

        .stat-delta-warn {
            background: rgba(245, 158, 11, 0.12);
            color: #f59e0b;
        }

        .stat-delta-danger {
            background: rgba(239, 68, 68, 0.12);
            color: #ef4444;
        }

        .dash-kpi-strip {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
        }

        .kpi-pill {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 0.5rem 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.8rem;
            font-weight: 600;
            transition: all 0.2s ease;
            flex: 1;
            min-width: 140px;
        }

        .kpi-pill:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
        }

        .kpi-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .kpi-pill .kpi-val {
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--text-main);
        }

        .dash-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .dash-card:hover {
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        }

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

        .dash-card-header h6 {
            margin: 0;
            font-weight: 700;
            font-size: 0.9rem;
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .dash-card-header h6 i {
            font-size: 0.85rem;
            opacity: 0.6;
        }

        .dash-card-body {
            padding: 1.25rem 1.5rem;
        }

        .dash-list-item {
            display: flex;
            align-items: center;
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--border-color);
            gap: 0.75rem;
        }

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

        .dash-list-avatar {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        .dash-list-info {
            flex: 1;
            min-width: 0;
        }

        .dash-list-info .name {
            font-weight: 600;
            font-size: 0.85rem;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .dash-list-info .sub {
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .dash-alert-card {
            background: rgba(239, 68, 68, 0.06);
            border: 1px solid rgba(239, 68, 68, 0.15);
            border-radius: 12px;
            padding: 0.75rem 1rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.5rem;
            transition: all 0.2s ease;
        }

        .dash-alert-card:hover {
            background: rgba(239, 68, 68, 0.1);
        }

        .dash-alert-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: rgba(239, 68, 68, 0.12);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ef4444;
            font-size: 0.9rem;
            flex-shrink: 0;
        }

        .pipeline-bar {
            display: flex;
            height: 32px;
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 1rem;
        }

        .pipeline-bar .seg {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            font-weight: 700;
            color: white;
            transition: flex 0.5s ease;
            min-width: 0;
        }

        .pipeline-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .pipeline-legend-item {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-muted);
        }

        .pipeline-legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 3px;
            flex-shrink: 0;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(16px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .dash-animate {
            animation: fadeInUp 0.5s ease forwards;
        }

        .dash-animate-d1 {
            animation-delay: 0.05s;
        }

        .dash-animate-d2 {
            animation-delay: 0.1s;
        }

        .dash-animate-d3 {
            animation-delay: 0.15s;
        }

        .dash-animate-d4 {
            animation-delay: 0.2s;
        }

        /* --- ATTENDANCE STATUS HIGHLIGHTS --- */
        .table-success-soft {
            background-color: rgba(16, 185, 129, 0.08) !important;
        }

        .table-warning-soft {
            background-color: rgba(245, 158, 11, 0.05) !important;
        }

        body.dark-mode .table-success-soft {
            background-color: rgba(16, 185, 129, 0.15) !important;
        }

        body.dark-mode .table-warning-soft {
            background-color: rgba(245, 158, 11, 0.1) !important;
        }

        /* --- MAPPING REFINEMENT CARDS --- */
        .refinement-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1rem;
        }

        .refinement-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 1.25rem;
            transition: all 0.2s ease;
            position: relative;
        }

        .refinement-card:hover {
            border-color: var(--primary-color);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .refinement-card .report-name {
            font-weight: 700;
            font-size: 0.95rem;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--text-main);
        }

        .refinement-card .report-name i {
            opacity: 0.5;
        }

        /* === RESPONSIVE & PREMIUM ENHANCEMENTS === */

        /* Glassmorphism Utilities */
        .glass-card {
            background: rgba(var(--card-bg-rgb, 255, 255, 255), 0.7) !important;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        body.dark-mode {
            --card-bg-rgb: 30, 41, 59;
        }

        /* Shared Sidebar Base */
        .sidebar {
            width: 280px;
            background: var(--sidebar-bg) !important;
            border-right: 1px solid var(--border-color);
            z-index: 1040;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s ease;
        }

        /* Mobile Viewports (off-canvas menu) */
        @media (max-width: 767.98px) {
            .sidebar {
                position: fixed;
                top: 0;
                left: -280px;
                height: 100vh;
                z-index: 1050;
            }

            .sidebar.show {
                left: 0 !important;
                box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
            }

            .sidebar-overlay {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.5);
                backdrop-filter: blur(4px);
                z-index: 1045;
                opacity: 0;
                transition: opacity 0.3s ease;
            }

            .sidebar-overlay.show {
                display: block;
                opacity: 1;
            }

            .mobile-topbar {
                display: flex !important;
                align-items: center;
                padding: 0.75rem 1rem;
                background: white;
                border-bottom: 1px solid #e2e8f0;
                position: sticky;
                top: 0;
                z-index: 1030;
                box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            }

            #main-content {
                padding: 1rem !important;
            }

            .payslip-container {
                padding: 15px !important;
                margin: 10px auto !important;
                border: none !important;
            }

            .payslip-info-grid {
                grid-template-columns: 1fr !important;
            }

            .dashboard-actions {
                flex-direction: column;
                display: flex;
            }

            .dashboard-actions .btn {
                margin-bottom: 8px;
            }
        }

        /* Desktop Viewports (permanent sidebar) */
        @media (min-width: 768px) {
            .sidebar {
                position: sticky !important;
                top: 0;
                height: 100vh;
                left: 0 !important;
                display: flex !important;
                flex-direction: column;
                flex-shrink: 0;
            }

            .sidebar-overlay,
            .mobile-topbar {
                display: none !important;
            }

            #content-wrapper {
                flex: 1;
                min-width: 0;
                display: flex;
                flex-direction: column;
            }
        }

        /* General Responsive Utilities */
        .table-responsive {
            border-radius: 12px;
            overflow-x: auto;
            border: 1px solid var(--border-color);
            margin-bottom: 1rem;
        }

        .form-control {
            font-size: 16px !important;
            /* Prevents iOS zoom */
        }

        /* Desktop Optimization (Large Screens) */
        @media (min-width: 1200px) {
            #main-content {
                padding-left: 2rem !important;
                padding-right: 2rem !important;
            }

            .dash-stat-card {
                padding: 2rem;
            }
        }

        /* Premium Scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.1);
            border-radius: 10px;
            transition: background 0.3s ease;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.2);
        }

        /* --- EMPTY STATE ANIMATIONS --- */
        .empty-state-card {
            padding: 4rem 2rem;
            text-align: center;
            animation: fadeScaleIn var(--duration-pro) var(--ease-premium);
        }

        .empty-state-card i {
            font-size: 4rem;
            opacity: 0.2;
            margin-bottom: 1.5rem;
            display: inline-block;
            animation: float-y 4s ease-in-out infinite;
        }

        @keyframes float-y {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0px); }
        }

        /* Smooth page transitions */
        #main-content {
            transition: opacity 0.3s ease;
        }

        .fade-in {
            animation: fadeIn 0.4s ease-in;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        /* Hover effects for interactive elements */
        .interactive-hover {
            transition: all 0.2s ease;
        }

        .interactive-hover:hover {
            transform: translateY(-2px);
            filter: brightness(1.05);
        }

        /* JARVIS PULSING MIC */
        @keyframes jarvis-mic-pulse {
            0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
            70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
            100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }
        .mic-active {
            animation: jarvis-mic-pulse 1.5s infinite;
            background: #ef4444 !important;
            color: white !important;
        }


/* =============================================
   MMG CUSTOM REPORTING SYSTEM STYLES
   ============================================= */

        /* MMG CUSTOM REPORTING SYSTEM (Bypasses Bootstrap Conflicts) */
        .mmg-report-modal {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            width: 100vw !important;
            height: 100vh !important;
            z-index: 99999999 !important;
            display: none;
            /* Controlled by JS */
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.8) !important;
            color: #333;
        }

        .mmg-report-modal.active {
            display: flex !important;
        }

        .mmg-report-content {
            background: #fff !important;
            width: 90%;
            max-width: 500px;
            border-radius: 12px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
            overflow: hidden;
            animation: mmgPopIn 0.3s ease-out;
        }

        @keyframes mmgPopIn {
            from {
                transform: scale(0.9);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        /* Multi-select dropdown */
        .multidd-item:hover {
            background: #f0f4ff;
        }

        .multidd-item input[type=checkbox] {
            width: 15px;
            height: 15px;
            cursor: pointer;
            accent-color: #4e73df;
            flex-shrink: 0;
        }

        .multidd-menu {
            font-size: 13px;
        }

        .multidd-btn {
            font-size: 13px;
        }
