/* AdminLTE 3 Custom Branding & SaaS Refinements */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #007bff;
    --primary-hover: #0069d9;
    --primary-light: #f8f9fc;
    
    --surface: #ffffff;
    --background: #f4f6f9;
    --border: #dee2e6;
    
    --text-main: #1e293b;
    --text-muted: #6c757d;
}

/* Base Overrides */
body {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem !important;
    color: #1e293b !important;
    background-color: #f8fafc !important; /* Slate 50 background */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    color: #0f172a !important; /* Slate 900 */
}

/* Premium Sidebar Theme 6.0 - SaaS Midnight */
.main-sidebar, 
.main-sidebar.sidebar-dark-primary,
.sidebar-dark-primary {
    background-color: #0f172a !important; /* Slate 900 */
    background: #0f172a !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15) !important;
}

.brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1.5rem !important;
    background: transparent !important;
}

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
    color: #ffffff !important;
    font-size: 1.25rem;
    white-space: nowrap;
}



/* Card/Box Refinements */
.card {
    border-radius: 1rem !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 1.5rem;
    border: 1px solid #f1f5f9 !important; /* Slate 100 */
    background: #ffffff !important;
    overflow: hidden;
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(0,0,0,.125) !important;
    padding: 0.75rem 1.25rem !important;
}

.card-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
}

/* Universal High-Density Modern Tables - Exact Reference Match */
table, 
.table, 
table.dataTable, 
.excel-table,
.dataTables_scrollBody table {
    width: 100% !important;
    font-size: 0.75rem !important;
    border-collapse: collapse !important;
    border: 1px solid #dee2e6;
    color: #333;
    background: #fff;
    margin-bottom: 1rem !important;
}

/* Force striping on ALL tables by default */
table tbody tr:nth-child(even),
.table-striped tbody tr:nth-of-type(even),
.excel-table tbody tr:nth-of-type(even),
table.dataTable.stripe tbody tr.even {
    background-color: #f2f2f2;
}

table tbody tr:nth-child(odd),
.table-striped tbody tr:nth-of-type(odd),
.excel-table tbody tr:nth-of-type(odd),
table.dataTable.stripe tbody tr.odd {
    background-color: #ffffff;
}

/* Global Header Styling */
thead th,
.table thead th, 
table.dataTable thead th,
.excel-table thead th {
    background-color: #ffffff;
    color: #495057;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.5px !important;
    padding: 12px 12px !important; /* Normalized header padding */
    border-bottom: 2px solid #dee2e6;
    border-top: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    white-space: nowrap;
    vertical-align: middle !important;
}

thead th:last-child {
    border-right: none !important;
}

/* Global Body Cell Styling */
tbody td,
.table tbody td, 
table.dataTable tbody td,
.excel-table tbody td {
    padding: 8px 12px !important; /* Normalized padding for better readability */
    vertical-align: middle !important;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    line-height: 1.5 !important;
}

tbody td:last-child {
    border-right: none !important;
}



/* Hover State */
.table-hover tbody tr:hover,
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background-color: #e9ecef !important;
    transition: background-color 0.1s ease;
}

/* Action Buttons Refinement - Matches the small colorful buttons in image */
.table .btn-sm {
    padding: 2px 6px !important;
    font-size: 0.7rem !important;
    margin: 0 1px !important;
    border-radius: 4px !important;
}

.table .btn-info { background-color: #3182ce !important; border: none !important; }
.table .btn-primary { background-color: #4299e1 !important; border: none !important; }
.table .btn-warning { background-color: #f6ad55 !important; border: none !important; }
.table .btn-danger { background-color: #f56565 !important; border: none !important; }

/* DataTables Specific UI Elements */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    font-size: 0.75rem !important;
    outline: none !important;
}

.dataTables_wrapper .dataTables_info {
    font-weight: 500 !important;
    color: #6c757d !important;
    font-size: 0.75rem !important;
    padding-top: 15px !important;
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 0.35rem;
}

.btn-xs {
    padding: 0.125rem 0.4rem;
    font-size: 0.7rem;
    border-radius: 0.25rem;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 6px -1px rgba(78, 115, 223, 0.1), 0 2px 4px -1px rgba(78, 115, 223, 0.06);
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(78, 115, 223, 0.2);
}

/* CRM Action Buttons - Beautiful & Small */
.btn-crm-view, .btn-crm-edit, .btn-crm-delete {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin: 0 2px;
}

.btn-crm-view {
    background-color: #e0f2fe;
    color: #0369a1;
}

.btn-crm-view:hover {
    background-color: #0369a1;
    color: #ffffff;
    transform: scale(1.1);
}

.btn-crm-edit {
    background-color: #f0f9ff;
    color: #0284c7;
    border-color: #e0f2fe;
}

.btn-crm-edit:hover {
    background-color: #0284c7;
    color: #ffffff;
    transform: scale(1.1);
}

.btn-crm-delete {
    background-color: #fff1f2;
    color: #be123c;
}

.btn-crm-delete:hover {
    background-color: #be123c;
    color: #ffffff;
    transform: scale(1.1);
}

.btn-crm-approve, .btn-crm-reject {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin: 0 2px;
}

.btn-crm-approve {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: #dcfce7;
}

.btn-crm-approve:hover {
    background-color: #15803d;
    color: #ffffff;
    transform: scale(1.1);
}

.btn-crm-reject {
    background-color: #fff1f2;
    color: #be123c;
    border-color: #ffe4e6;
}

.btn-crm-reject:hover {
    background-color: #be123c;
    color: #ffffff;
    transform: scale(1.1);
}

.btn-crm-action {
    background-color: #eef2ff;
    color: #4f46e5;
    border-color: #e0e7ff;
}

.btn-crm-action:hover {
    background-color: #4f46e5;
    color: #ffffff;
    transform: scale(1.1);
}

/* Form Controls & Select2 Integration */
.form-control, .form-select, .select2-container--bootstrap4 .select2-selection {
    height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: var(--text-main) !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid #d1d3e2 !important;
    border-radius: 0.5rem !important;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out !important;
    box-shadow: none !important;
}

.form-select {
    display: block;
    width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.form-control:focus, .form-select:focus, .select2-container--bootstrap4.select2-container--focus .select2-selection {
    color: #6e707e !important;
    background-color: #fff !important;
    border-color: #bac8f3 !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(78,115,223,.1) !important;
}

/* Force Select2 to be fully visible and 100% width */
.select2-container {
    display: block !important;
    width: 100% !important;
}

.select2-container--bootstrap4 .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + 0.75rem) !important;
    padding-left: 0.75rem !important;
    color: var(--text-main) !important;
}

.select2-dropdown {
    border: 1px solid #bac8f3 !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}

.select2-results__option {
    padding: 8px 12px !important;
    font-size: 0.875rem !important;
}

.select2-container--bootstrap4 .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary) !important;
}

/* DataTables Alignment Overrides for AdminLTE 3 */
.dataTables_wrapper .row {
    margin-bottom: 0.5rem;
}

.dataTables_length label, .dataTables_filter label {
    font-weight: 600 !important;
    color: var(--text-muted);
}

/* Razorpay Style Sidebar Nav */
.nav-sidebar {
    padding: 10px 0 !important;
}

.nav-sidebar .nav-item {
    margin-bottom: 1px !important;
    width: 100% !important;
}

.nav-sidebar .nav-link {
    border-radius: 0 !important; /* Razorpay uses flush items */
    padding: 10px 20px !important;
    color: #8e99a7 !important; /* Muted gray-blue text */
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    border-left: 3px solid transparent !important;
}

.nav-sidebar .nav-link i {
    font-size: 1rem !important;
    margin-right: 12px !important;
    width: 20px !important;
    text-align: center !important;
    color: #8e99a7 !important;
}

.nav-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.03) !important;
    color: #ffffff !important;
}

.nav-sidebar .nav-link:hover i {
    color: #ffffff !important;
}

/* Premium Top Navbar - Slate-Gray */
.main-header.navbar {
    background: #f1f5f9 !important;
    border-top: 4px solid #0d94fb !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0 1.5rem !important;
    height: 75px !important;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.main-header.navbar .nav-link {
    color: #1e293b !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.main-header.navbar .nav-link:hover {
    color: #0d94fb !important;
}

.main-header.navbar .nav-link i {
    font-size: 1rem !important;
    color: #475569 !important;
    margin-right: 5px;
}

/* Sidebar Toggle - Premium Circular Button */
.main-header .nav-link[data-widget="pushmenu"] {
    width: 46px !important;
    height: 46px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 50% !important;
    color: #475569 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    margin-right: 8px;
}

.main-header .nav-link[data-widget="pushmenu"]:hover {
    background: #0d94fb !important;
    color: #ffffff !important;
    border-color: #0d94fb !important;
    box-shadow: 0 10px 20px -5px rgba(13, 148, 251, 0.45) !important;
    transform: translateY(-2px) scale(1.08) !important;
}

.main-header .nav-link[data-widget="pushmenu"] i {
    font-size: 1.1rem !important;
    color: inherit !important;
    margin-right: 0 !important;
}

/* Vibrant Amber Thumbtack / Pin Icon */
.main-header .fa-thumbtack,
.main-header .nav-link .fa-thumbtack {
    color: #f59e0b !important;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4));
    transition: all 0.3s ease !important;
}

.main-header .nav-link:hover .fa-thumbtack {
    color: #d97706 !important;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
    transform: rotate(20deg) scale(1.2);
}

/* Punch Button Styling - Premium Gradient */
#globalPunchBtn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid #1e40af !important;
    border-radius: 10px !important;
    padding: 6px 18px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
    transition: all 0.25s ease !important;
    display: inline-flex;
    align-items: center;
    margin-top: 0 !important;
}

#globalPunchBtn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35) !important;
}

/* User Menu Polish */
.user-menu .user-image {
    background: #f1f5f9 !important;
    color: #0d94fb !important;
    font-weight: 700 !important;
    border: 1px solid #e2e8f0 !important;
}

/* Navbar Action Buttons (search, theme, etc.) */
.navbar-action-group {
    background: #e8edf2;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-icon-btn {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    color: #475569 !important;
    transition: all 0.25s ease !important;
}

.action-icon-btn:hover {
    background: #ffffff !important;
    border-color: #0d94fb !important;
    color: #0d94fb !important;
    box-shadow: 0 4px 6px -1px rgba(13, 148, 251, 0.1) !important;
}

/* Theme Toggle Pill */
.theme-pill-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: #cbd5e1;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 6px;
    transition: all 0.3s ease;
    border: 1px solid #94a3b8;
    overflow: hidden;
}

.pill-icons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    z-index: 2;
    pointer-events: none;
}

.pill-icons i { font-size: 13px; color: #64748b; }
.pill-sun.active  { color: #f59e0b; }
.pill-moon.active { color: #4f46e5; }

.pill-knob {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1;
}
.knob-light { left: 3px; }
.knob-dark  { left: 31px; }

/* Profile Trigger */
.profile-trigger {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 14px !important;
    padding: 6px 12px !important;
    height: 50px !important;
    transition: all 0.25s ease !important;
}

.profile-trigger:hover {
    background: #ffffff !important;
    border-color: #0d94fb !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06) !important;
}

.user-avatar-circle {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #fff;
}

.v-divider {
    width: 1px;
    height: 20px;
    background: #cbd5e1;
    margin: 0 4px;
}

/* Navbar Search */
.navbar-search-container {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.navbar-search-container:focus-within {
    border-color: #0d94fb;
    box-shadow: 0 0 0 3px rgba(13, 148, 251, 0.12);
}

.modern-user-dropdown {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
}


.nav-sidebar .nav-item.menu-open > .nav-link,
.nav-sidebar .nav-link.active {
    background: rgba(13, 148, 251, 0.08) !important; /* Subtle blue tint */
    color: #0d94fb !important; /* Razorpay Dodger Blue */
    border-left: 3px solid #0d94fb !important;
    box-shadow: none !important;
}

.nav-sidebar .nav-link.active i {
    color: #0d94fb !important;
}

.nav-header {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: #5d6d7e !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 20px 20px 8px !important;
}

/* Treeview Styling - Razorpay Style */
.nav-treeview {
    background: #0c1626 !important; /* Slightly darker than sidebar */
    margin: 0 !important;
    padding: 0 !important;
}

.nav-treeview .nav-item {
    margin: 0 !important;
    padding: 0 !important;
}

.nav-treeview .nav-link {
    padding: 6px 15px 6px 38px !important; /* Reduced left padding to bring items closer to left */
    font-size: 0.85rem !important;
    border-left: none !important;
}

.nav-treeview .nav-link i {
    width: 1rem !important;
    font-size: 0.6rem !important;
    margin-left: -20px !important; /* Positions the circle icon precisely */
    margin-right: 12px !important;
    color: inherit !important;
}

.nav-treeview .nav-link.active {
    background: transparent !important;
    color: #0d94fb !important;
}

/* Sidebar User Section - Razorpay Style */
.user-panel {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1.25rem 1.25rem !important;
    margin-bottom: 0.5rem !important;
}

.user-panel .image {
    padding: 0 !important;
}

.user-panel img {
    width: 40px !important;
    height: 40px !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important; /* Modern rounded corners instead of circle */
}

.user-panel .info {
    padding-left: 15px !important;
}

.user-panel .info a {
    font-weight: 700 !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
}

.user-panel .info .text-xs {
    color: #64748b !important;
    display: block;
    margin-top: 2px;
}

/* Elevation Fixes */
.elevation-4 {
    box-shadow: 0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)!important;
}

/* Premium Info Boxes (AdminLTE structure compatibility) */
.info-box.premium-info-box {
    border-radius: 1rem !important;
    border: none !important;
    color: white !important;
    transition: transform 0.3s ease;
}

.info-box.premium-info-box:hover {
    transform: translateY(-3px);
}

.info-box.premium-info-box .info-box-icon {
    border-radius: 1rem 0 0 1rem !important;
    background: rgba(0,0,0,0.1) !important;
    font-size: 1.8rem !important;
}

.info-box.premium-info-box .info-box-text {
    font-weight: 500 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.info-box.premium-info-box .info-box-number {
    font-weight: 800 !important;
    font-size: 1.5rem !important;
    letter-spacing: -0.5px;
}

/* Gradients */
.bg-premium-success { background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important; }
.bg-premium-danger { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important; }
.bg-premium-info { background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%) !important; }
.bg-premium-primary { background: linear-gradient(135deg, #007bff 0%, #0069d9 100%) !important; }
.bg-premium-purple { background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%) !important; }
.bg-premium-warning { background: linear-gradient(135deg, #ffc107 0%, #edb100 100%) !important; color: #333 !important; }

/* Organization Chart Styles (AdminLTE compatible) */
.org-chart-container {
    padding: 20px;
    background: #fff;
    border-radius: 0.75rem;
    overflow-x: auto;
}

/* Spacing Utilities (BS5 compatibility for BS4) */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.d-flex.gap-1, .d-flex.gap-2, .d-flex.gap-3 { display: flex !important; }
/* Sidebar Active Sub-menu Fix */
.sidebar-dark-primary .nav-treeview > .nav-item > .nav-link.active { background-color: rgba(255,255,255,0.15) !important; color: #ffffff !important; }
.sidebar-dark-primary .nav-treeview > .nav-item > .nav-link.active:hover { background-color: rgba(255,255,255,0.25) !important; }

/* Dashboard Specific Styles 2.0 - Premium SaaS Refinement */
.hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white !important;
    padding: 3rem;
    border-radius: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 60%);
    pointer-events: none;
}

.welcome-text h1 {
    font-size: 2.75rem !important;
    font-weight: 800 !important;
    margin-bottom: 0;
    letter-spacing: -2px;
    color: white !important;
    text-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.date-badge {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.5rem !important;
    border-radius: 100px !important;
}

.glass-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.75rem;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

.stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    display: block;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -1px;
    margin-bottom: 0.25rem;
}

.action-card {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    text-decoration: none !important;
    color: #475569 !important;
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.action-card:hover {
    background: #f8fafc;
    border-color: var(--primary);
    transform: translateY(-5px);
    color: var(--primary) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.action-card i {
    font-size: 2.5rem;
    display: block;
    opacity: 0.9;
}

.pulse {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

.card.company-pulse-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem !important;
}

/* Page Hero Components */
.page-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white !important;
    padding: 2rem;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.page-hero h2 {
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -1px;
}

.table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-top: none !important;
    padding: 1.25rem 1rem !important;
}

.table tbody td {
    padding: 1rem !important;
    vertical-align: middle !important;
    color: #1e293b;
    font-weight: 500;
    border-top: 1px solid #f1f5f9 !important;
}

.form-control-premium {
    border-radius: 0.75rem !important;
    padding: 0.75rem 1.25rem !important;
    border: 1px solid #e2e8f0 !important;
    height: auto !important;
    transition: all 0.2s;
}

.form-control-premium:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1) !important;
}

/* Classic Panel Support (Standardized Refinement) */
.panel {
    margin-bottom: 1.5rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    overflow: hidden;
}

.panel-heading {
    padding: 0.75rem 1.25rem;
    background-color: #f1f5f9; /* The new neutral light gray from reference */
    border-bottom: 1px solid #e2e8f0;
    color: #334155; /* Slate gray text for neutral look */
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05rem;
    display: flex;
    align-items: center;
}

.panel-heading i {
    margin-right: 0.75rem;
    color: #64748b; /* Muted icon color */
}

.panel-body {
    padding: 1.25rem;
}

.panel-primary {
    border-color: #e2e8f0;
}

.panel-primary > .panel-heading {
    color: #334155;
    background-color: #f1f5f9;
    border-color: #e2e8f0;
}

.panel-footer {
    padding: 0.75rem 1.25rem;
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
}

/* ============================================================
   TRUE DARK MODE - SYSTEM WIDE (Triggered by .dark-mode class)
   ============================================================ */
body.dark-mode {
    background-color: #0b111d !important;
    color: #cbd5e1 !important;
}

body.dark-mode .content-wrapper {
    background-color: #0b111d !important;
    color: #cbd5e1 !important;
}

/* Dark Cards & Panels */
body.dark-mode .card,
body.dark-mode .card-body,
body.dark-mode .card-footer,
body.dark-mode .panel,
body.dark-mode .panel-body,
body.dark-mode .panel-footer,
body.dark-mode .info-box {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
    color: #cbd5e1 !important;
}

body.dark-mode .card-header,
body.dark-mode .panel-heading {
    background-color: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
    color: #f1f5f9 !important;
}

/* Global Text Colors */
body.dark-mode .text-dark,
body.dark-mode label,
body.dark-mode .card-title {
    color: #cbd5e1 !important;
}

body.dark-mode .text-muted {
    color: #94a3b8 !important;
}

body.dark-mode .text-primary,
body.dark-mode .text-info {
    color: #0d94fb !important;
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #ffffff !important;
}

/* Dark Form Controls */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .custom-select,
body.dark-mode .input-group-text,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

/* Select2 Dark Mode */
body.dark-mode .select2-container--bootstrap4 .select2-selection,
body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode .select2-container--default .select2-selection--multiple {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
}

body.dark-mode .select2-dropdown {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

body.dark-mode .select2-results__option {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
}

body.dark-mode .select2-results__option--highlighted[aria-selected] {
    background-color: #0d94fb !important;
    color: #ffffff !important;
}

body.dark-mode .select2-search__field {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #ffffff !important;
}

/* Dark Tables */
body.dark-mode table,
body.dark-mode .table,
body.dark-mode table.dataTable,
body.dark-mode .excel-table {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
    color: #f1f5f9 !important;
}

/* Table Headers */
body.dark-mode thead th,
body.dark-mode .table thead th,
body.dark-mode table.dataTable thead th,
body.dark-mode .excel-table thead th {
    background-color: #1e293b !important;
    background: #1e293b !important;
    color: #ffffff !important; 
    border-bottom: 2px solid #0d94fb !important;
    border-top: 1px solid #1e293b !important;
    border-right: 1px solid #1e293b !important;
}

/* Body Cells */
body.dark-mode tbody td,
body.dark-mode .table tbody td,
body.dark-mode table.dataTable tbody td {
    color: #f1f5f9 !important;
    border-bottom: 1px solid #1e293b !important;
    border-right: 1px solid #1e293b !important;
}

/* Striping Override */
body.dark-mode tbody tr:nth-child(even),
body.dark-mode .table-striped tbody tr:nth-of-type(even),
body.dark-mode .excel-table tbody tr:nth-of-type(even),
body.dark-mode table.dataTable.stripe tbody tr.even {
    background-color: #151d2e !important;
}

body.dark-mode tbody tr:nth-child(odd),
body.dark-mode .table-striped tbody tr:nth-of-type(odd),
body.dark-mode .excel-table tbody tr:nth-of-type(odd),
body.dark-mode table.dataTable.stripe tbody tr.odd {
    background-color: #0f172a !important;
}

/* Sticky Columns */
body.dark-mode .sticky-col-1 {
    background-color: #0f172a !important;
    border-right: 2px solid #1e293b !important;
}

/* UI Components - Dark Navbar */
body.dark-mode .main-header.navbar {
    background: #0f172a !important;
    border-top: 4px solid #0d94fb !important;
    border-bottom: 1px solid #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .main-header.navbar .nav-link {
    color: #cbd5e1 !important;
}

body.dark-mode .main-header.navbar .nav-link:hover {
    color: #0d94fb !important;
}

body.dark-mode .main-header.navbar .nav-link i {
    color: #94a3b8 !important;
}

/* Dark Toggle Button */
body.dark-mode .main-header .nav-link[data-widget="pushmenu"] {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .main-header .nav-link[data-widget="pushmenu"]:hover {
    background: #0d94fb !important;
    color: #ffffff !important;
    border-color: #0d94fb !important;
}

body.dark-mode .main-header .nav-link[data-widget="pushmenu"] i {
    color: inherit !important;
}

/* Dark Search Bar */
body.dark-mode .navbar-search-container {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: none !important;
}

body.dark-mode .navbar-search-container input {
    color: #f1f5f9 !important;
    background: transparent !important;
    -webkit-text-fill-color: #f1f5f9 !important;
}

body.dark-mode .navbar-search-container input::placeholder {
    color: #475569 !important;
}

body.dark-mode .navbar-search-container i {
    color: #64748b !important;
}

body.dark-mode .navbar-search-container:focus-within {
    border-color: #0d94fb !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 251, 0.15) !important;
}

/* Dark Action Group */
body.dark-mode .navbar-action-group {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

body.dark-mode .v-divider {
    background: #334155 !important;
}

/* Dark Action Icon Buttons */
body.dark-mode .action-icon-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

body.dark-mode .action-icon-btn:hover {
    background: #334155 !important;
    border-color: #0d94fb !important;
    color: #0d94fb !important;
}

/* Keep pin amber in dark mode too */
body.dark-mode .main-header .fa-thumbtack,
body.dark-mode .main-header .nav-link .fa-thumbtack {
    color: #f59e0b !important;
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.5));
}

/* Dark Theme Pill */
body.dark-mode .theme-pill-toggle {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .pill-knob {
    background: #334155 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4) !important;
}

body.dark-mode .pill-icons i {
    color: #64748b !important;
}

/* Dark Profile Trigger */
body.dark-mode .profile-trigger {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .profile-trigger:hover {
    background: #334155 !important;
    border-color: #0d94fb !important;
}

body.dark-mode .profile-trigger .text-dark-slate,
body.dark-mode .profile-trigger span {
    color: #cbd5e1 !important;
}

body.dark-mode .profile-trigger .text-muted {
    color: #64748b !important;
}

/* Dark Home Link */
body.dark-mode .text-dark-slate {
    color: #cbd5e1 !important;
}

/* Dark Dropdown */
body.dark-mode .modern-user-dropdown {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

body.dark-mode .user-dropdown-item {
    color: #cbd5e1 !important;
}

body.dark-mode .user-dropdown-item:hover {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}

body.dark-mode .user-dropdown-item-danger:hover {
    background: #1c0a0a !important;
}

body.dark-mode .udi-icon-blue {
    background: rgba(59, 130, 246, 0.15);
}

body.dark-mode .udi-icon-red {
    background: rgba(239, 68, 68, 0.15);
}

body.dark-mode .udi-sub {
    color: #64748b !important;
}


body.dark-mode .main-footer {
    background-color: #0f172a !important;
    border-top: 1px solid #1e293b !important;
    color: #64748b !important;
}

body.dark-mode .modal-content {
    background-color: #0f172a !important;
    border: 1px solid #1e293b !important;
    color: #f1f5f9 !important;
}