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

:root {
  /* Platinum & Royal Navy Theme Variables */
  --brand-primary: #1e3a8a;
  --brand-light: #2563eb;
  --brand-accent: #3b82f6;
  --brand-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  --brand-secondary: #f8fafc;
}

/* Forceful Theme Overrides */
.navbar-dark.bg-emerald-mist {
  background: var(--brand-gradient) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Map bg-teal and bg-indigo to Emerald Gradient for Layout consistency */
.bg-teal,
.bg-indigo {
  background: var(--brand-gradient) !important;
  color: #fff !important;
}

/* Sidebar Global Premium Styling */
.sidebar {
  font-family: 'Roboto', sans-serif !important;
  border-right: none !important;
}

/* Sidebar Navigation Items */
.nav-sidebar .nav-link {
  transition: all 0.25s ease;
  font-weight: 500;
  border-radius: 10px !important;
  margin: 4px 12px !important;
  padding: 10px 15px !important;
  color: inherit;
}

/* Parent/Outer OPEN State (Not fully active) */
.sidebar-light .nav-sidebar > .nav-item-submenu.nav-item-open > .nav-link {
  background: transparent !important;
  color: var(--brand-primary) !important;
  font-weight: 600;
  box-shadow: none !important;
}

/* Actual Active Link (Premium Highlight) */
.sidebar-light .nav-sidebar .nav-link.active,
.sidebar-light .nav-group-sub .nav-link.active {
  background-color: #dbeafe !important;
  color: var(--brand-primary) !important;
  font-weight: 600;
  box-shadow: none !important;
  position: relative;
}

/* Sleek Active Left Accent Bar */
.sidebar-light .nav-sidebar .nav-link.active::before,
.sidebar-light .nav-group-sub .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--brand-light);
  border-radius: 10px 0 0 10px;
}

/* Icons - Brand Theme */
.nav-sidebar .nav-link i {
  color: var(--brand-accent) !important;
  font-size: 1.1rem;
  margin-right: 12px;
  transition: all 0.25s ease;
}

/* Active/Hover Icon Color */
.sidebar-light .nav-sidebar .nav-link:hover i,
.sidebar-light .nav-sidebar .nav-link.active i,
.sidebar-light .nav-item-open > .nav-link i {
  color: var(--brand-light) !important;
}

/* Dark Sidebar - Deep Premium Gradient */
.sidebar-dark {
  background: linear-gradient(180deg, #0f172a 0%, #1e3a8a 100%) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.sidebar-dark .nav-sidebar .nav-item-open>.nav-link:not(.active),
.sidebar-dark .nav-sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

/* Custom Light Premium Backgrounds with subtle blue flavor */
.sidebar-light {
  background: linear-gradient(180deg, #ffffff 0%, #ebf3ff 100%) !important;
}

.navbar-light {
  background: linear-gradient(90deg, #ffffff 0%, #ebf3ff 100%) !important;
}

/* Light Sidebar Refinement */
.sidebar-light .nav-sidebar .nav-item-open>.nav-link:not(.active),
.sidebar-light .nav-sidebar .nav-link:hover {
  background-color: #eff6ff !important;
  color: var(--brand-primary) !important;
}

/* Sidebar Search Premium Styling */
#menuSearch {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 12px 18px;
  background-color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sidebar-dark #menuSearch {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.sidebar-dark #menuSearch::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

#menuSearch:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

.sidebar-dark #menuSearch:focus {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Badge Theme */
.badge-teal {
  background-color: var(--brand-accent) !important;
  color: #ffffff !important;
}

/* Pagination Styling - Unified Premium Look */
ul.pagination {
  display: flex !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}

ul.pagination .page-item {
  margin: 0 2px;
}

ul.pagination .page-link {
  color: var(--brand-primary);
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  transition: all 0.2s ease;
  font-weight: 500;
  padding: 8px 14px !important;
  min-width: 38px;
  height: 38px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

ul.pagination .page-item.active .page-link {
  background: var(--brand-gradient) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2) !important;
}

ul.pagination .page-item.disabled .page-link {
  color: #94a3b8 !important;
  background-color: #f8fafc !important;
  border-color: #f1f5f9 !important;
  opacity: 0.6;
}

ul.pagination .page-item .page-link:hover:not(.active) {
  background-color: #eff6ff !important;
  border-color: var(--brand-accent) !important;
  color: var(--brand-accent) !important;
  transform: translateY(-1px);
}

/* Page X of Y Styling - Clean Single Pill */
.btn-group.pagination {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  height: auto !important;
  overflow: visible !important;
}

.btn-group.pagination .btn-light {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: var(--brand-primary) !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  margin-left: 10px !important;
  padding: 0 20px !important;
  height: 42px !important;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
  display: flex !important;
  align-items: center !important;
}

/* Standard Button Utility */
.btn-success, .btn-primary {
  background: var(--brand-gradient) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
  transition: all 0.3s ease !important;
  border-radius: 10px !important;
}

.btn-success:hover, .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3) !important;
}

/* SweetAlert Overrides */
.swal2-popup {
  border-radius: 12px !important;
  padding: 1.5rem !important;
  font-family: 'Roboto', sans-serif !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.swal2-title {
  color: var(--brand-primary) !important;
  font-weight: 700 !important;
  font-size: 1.4rem !important;
  margin-bottom: 0.5rem !important;
}

.swal2-styled.swal2-confirm {
  background: var(--brand-gradient) !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  padding: 10px 24px !important;
}

/* SweetAlert Icons */
.swal2-loader {
  border-color: var(--brand-accent) transparent var(--brand-accent) transparent !important;
}

.swal2-icon.swal2-info {
  border-color: var(--brand-accent) !important;
  color: var(--brand-accent) !important;
}


/* User Dropdown Premium Glassmorphism */
.dropdown-user .dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 15px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
  padding: 10px 0 !important;
  overflow: hidden;
  margin-top: 10px !important;
  min-width: 220px !important;
}

.dropdown-user .dropdown-item {
  padding: 12px 20px !important;
  font-weight: 500;
  color: #334155 !important;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.dropdown-user .dropdown-item i {
  color: var(--brand-accent) !important;
  font-size: 1.1rem;
  width: 24px;
}

.dropdown-user .dropdown-item:hover {
  background-color: #f8fafc !important;
  color: var(--brand-primary) !important;
  padding-left: 25px !important;
}

.user-initials-circle {
  width: 36px;
  height: 36px;
  background: var(--brand-gradient);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

/* Table Utilities */
.table td, .table th {
  padding: 0.5rem 0.5rem;
  vertical-align: top;
  border-top: 1px solid #ddd;
}

/* FooTable v3 Icomoon Mapping */
.fooicon {
    font-family: 'icomoon' !important;
    display: inline-block;
    font-style: normal;
    font-weight: normal;
    font-size: 1.2rem;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fooicon-plus:before { content: "\e9e4"; } /* icon-plus-circle2 */
.fooicon-minus:before { content: "\e9e7"; } /* icon-minus-circle2 */
.fooicon-loader:before { content: "\ed31"; } /* icon-spinner2 */

.footable-toggle {
    margin-right: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--brand-primary);
    vertical-align: middle;
}

.AgedItem { background-color: #fbdcdd; }
.hide { display: none; }

.floating-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

/* --- STATS CARDS --- */
.stats-card-premium {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px !important;
  min-height: 105px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

.stats-card-premium:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1) !important;
}

.stats-card-indigo {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5ff 100%);
  border-left: 5px solid #3f51b5 !important;
}

/* GLOBAL HEADER STANDARDIZATION */
.card-header, .modal-header {
  background: #f0f7ff !important;
  color: var(--brand-primary) !important;
  border-bottom: 2px solid rgba(59, 130, 246, 0.1) !important;
  padding: 1rem 1.5rem !important;
}

.card-header .card-title, .modal-header .modal-title {
  color: var(--brand-primary) !important;
  font-weight: 700 !important;
}

.modal-header .close {
  color: var(--brand-primary) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  font-size: 1.5rem !important;
  font-weight: 400 !important;
  padding: 1.2rem !important;
  margin: -1.2rem -1.5rem -1.2rem auto !important;
}

.modal-header .close:hover {
  color: var(--brand-accent) !important;
  opacity: 0.8 !important;
}

/* Hide FooTable Swipe/Scroll Hint Icon (Hand Pointer) */
.footable-swipe-hint {
    display: none !important;
}

/* --- Premium Login UI Classes (Platinum & Royal Navy) --- */
.bg-premium-mesh {
    background-color: #f8fafc !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 58, 138, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.08) 0px, transparent 50%) !important;
    background-attachment: fixed !important;
}

.card-glass {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.12) !important;
}

.btn-premium {
    background: var(--brand-gradient) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2) !important;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.25) !important;
    color: #ffffff !important;
    opacity: 0.95;
}

.btn-premium:active {
    transform: translateY(0);
}

/* Floating Label Support for Premium Theme */
.form-floating-premium {
    position: relative;
    display: block;
}

.form-control-premium {
    height: 3.75rem !important;
    padding: 1.6rem 0.75rem 0.6rem 0.75rem !important;
    line-height: 1.25 !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
}

.form-control-premium:focus {
    border-color: var(--brand-accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.form-floating-premium label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1.1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out, transform .1s ease-in-out;
    color: #64748b;
    font-size: 0.95rem;
}

.form-control-premium:focus ~ label,
.form-control-premium:not(:placeholder-shown) ~ label {
    opacity: 1;
    transform: scale(0.75) translateY(-0.85rem) translateX(0.75rem);
    color: var(--brand-primary);
    font-weight: 700;
}

/* Hide placeholder initially to avoid overlap, show on focus */
.form-control-premium::placeholder {
    color: transparent;
}

.form-control-premium:focus::placeholder {
    color: #94a3b8;
}

.auth-check-label {
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: #64748b;
    padding-top: 2px;
}

/* Auth Icon Container */
.login-icon-container {
    background: rgba(239, 246, 255, 0.6);
    width: 64px;
    height: 64px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(191, 219, 254, 0.4);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.05);
}

.login-icon {
    color: var(--brand-primary);
    transition: transform 0.3s ease;
}

.card:hover .login-icon-container {
    transform: scale(1.05) rotate(5deg);
    background: rgba(239, 246, 255, 0.9);
}

/* 2FA Code Input */
.code-input-premium {
    font-size: 2.25rem !important;
    text-align: center !important;
    letter-spacing: 0.5rem !important;
    font-weight: 800 !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    height: 4.5rem !important;
    color: var(--brand-primary) !important;
    transition: all 0.25s ease !important;
    font-family: 'Outfit', sans-serif;
}

.code-input-premium:focus {
    background-color: #ffffff !important;
    border-color: var(--brand-accent) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
    letter-spacing: 0.75rem !important;
}

/* Helper for card spacing */
.rounded-xl {
    border-radius: 1.25rem !important;
}

/* Custom Checkbox Brand Override */
.custom-control-primary .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.custom-control-primary .custom-control-label::before {
    border-radius: 4px !important;
    border-color: #cbd5e1 !important;
}

/* --- Select2 Multi-Select Premium Overrides --- */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    min-height: 48px !important;
    background-color: #ffffff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--brand-accent) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
}

/* Premium Pill Selection Styling */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    color: var(--brand-primary) !important;
    border-radius: 50px !important; /* Pill shape */
    padding: 6px 36px 6px 16px !important; /* Space for remove button on right */
    margin: 4px 4px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.05) !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.1) !important;
}

/* Custom Remove Button on Pill */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #ef4444 !important;
    border: none !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

/* Placeholder & Search Input Styling */
.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    margin-top: 0 !important;
    height: 48px !important;
    line-height: 48px !important;
    padding-left: 10px !important;
    font-family: 'Roboto', sans-serif !important;
    color: #64748b !important;
    font-size: 0.95rem !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    padding: 0 4px !important;
    width: 100% !important;
}

/* Dropdown Results Styling */
.select2-dropdown {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    margin-top: 4px !important;
}

.select2-results__option {
    padding: 10px 15px !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
}

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

/* Styled 'No results' message */
.select2-results__message {
    padding: 20px !important;
    text-align: center !important;
    color: #ef4444 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    background: #fff5f5 !important;
    border-top: 1px dashed rgba(239, 68, 68, 0.2) !important;
}

/* --- Premium Corporate Card Styling --- */
.card-corporate {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    background-color: #fff !important;
    margin-bottom: 1.5rem !important;
    transition: all 0.3s ease;
}

.card-corporate:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08) !important;
}

.card-header-premium {
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1.25rem 1.5rem !important;
    position: relative;
    border-radius: 12px 12px 0 0 !important;
}

.card-header-premium::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    background-color: var(--brand-primary);
    border-radius: 0 4px 4px 0;
}

.corporate-label {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #64748b !important;
    display: block;
    margin-bottom: 0.6rem;
}

.form-control-corporate {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.6rem 1rem !important;
    height: auto !important;
    font-size: 0.95rem !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.form-control-corporate:focus {
    background-color: #fff !important;
    border-color: var(--brand-accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.input-group-corporate .input-group-text {
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    font-weight: 600 !important;
}

/* --- Deal Profile Hub Utilities (High Contrast) --- */
.hero-premium {
    background: var(--brand-gradient) !important;
    background-size: cover !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.15) !important;
    color: #ffffff !important;
    padding: 2rem !important;
}

.hero-premium h2, .hero-premium .h5, .hero-premium .breadcrumb-item, .hero-premium .breadcrumb-item a {
    color: #ffffff !important;
}

.bg-light-alpha {
    background-color: #f8fafc !important; 
    border: 1px solid #e2e8f0 !important;
}

.text-indigo-600 {
    color: #2563eb !important;
}

.initials-avatar {
    background: var(--brand-gradient) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.border-dashed-premium {
    border: 2px dashed #cbd5e1 !important;
    background-color: #ffffff !important;
}

/* --- Global Portal Header (Matched to Dashboard) --- */
.header-portal-premium {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%) !important;
    border: none !important;
    border-left: 8px solid var(--brand-primary) !important;
    border-radius: 16px !important;
    padding: 1.5rem 2rem !important;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.05) !important;
    position: relative;
    overflow: hidden;
}

/* --- Mobile-First Matrix Utilities --- */
.table-responsive-premium {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    scroll-behavior: smooth;
    position: relative;
}

.table-responsive-premium::-webkit-scrollbar {
    height: 6px;
}

.table-responsive-premium::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.sticky-column-first {
    position: sticky !important;
    left: 0 !important;
    z-index: 52 !important;
    background-color: #ffffff;
    border-right: 2px solid #f8fafc !important;
    box-shadow: 10px 0 20px -10px rgba(30, 58, 138, 0.08) !important;
}

thead th.sticky-column-first {
    z-index: 55 !important;
    background-color: #ffffff;
}

.bg-platinum-light {
    background-color: #f8fafc !important;
}

.text-mini-label {
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    color: #94a3b8 !important;
}

/* --- High-Density Dashboard Matrix Themes --- */
.matrix-header-gold {
    background: #ffe082 !important; /* Light Gold */
    color: #442c00 !important;
    border-bottom: 2px solid #ffd54f !important;
}

.matrix-header-green {
    background: #c5e1a5 !important; /* Light Green */
    color: #1a3300 !important;
    border-bottom: 2px solid #aed581 !important;
}

.matrix-header-indigo {
    background: #c5cae9 !important; /* Light Indigo */
    color: #1e3a8a !important;
    border-bottom: 2px solid #9fa8da !important;
}

.matrix-cell-gold-light {
    background-color: #fff9e6 !important;
}

.matrix-cell-green-light {
    background-color: #f0f7e9 !important;
}

.matrix-cell-indigo-light {
    background-color: #eef2ff !important;
}

.matrix-table thead th.group-header {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    padding: 0.75rem !important;
    text-align: center !important;
}

/* --- Dashboard & Matrix Design System (Premium & Proper) --- */
.dashboard-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-left: 8px solid var(--brand-accent) !important;
    border-radius: 16px !important;
    position: relative;
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.2) !important;
    overflow: hidden;
}

.greeting-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.user-name {
    font-size: 2.8rem;
    font-weight: 500;
    color: #ffffff !important;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -1.5px;
}

.hub-stat-box {
    padding: 1.5rem 2rem;
    transition: all 0.3s ease;
}

.matrix-card {
    border: none !important;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.04) !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    overflow: hidden;
}

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

.matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 60;
    vertical-align: middle;
    padding: 1.25rem 0.75rem;
    color: var(--brand-primary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    border-radius: 0 !important;
}

.matrix-table tbody td {
    padding: 1.1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.matrix-table tbody tr:hover td {
    background-color: #fcfdfe;
}

.sticky-column-first {
    position: sticky !important;
    left: 0 !important;
    z-index: 55 !important;
    background-color: #ffffff !important;
    border-right: 1px solid #f1f5f9 !important;
    box-shadow: 5px 0 15px -10px rgba(0, 0, 0, 0.1) !important;
}

thead th.sticky-column-first {
    z-index: 65 !important;
    background-color: #f8fafc !important;
}

.banker-name {
    font-weight: 500;
    color: var(--brand-primary);
    font-size: 0.95rem;
    letter-spacing: -0.2px;
}

.data-point {
    font-weight: 500;
    color: #334155;
}

.data-point-highlight {
    color: var(--brand-accent);
    font-weight: 500;
}

.total-column-highlight {
    background-color: rgba(30, 58, 138, 0.02) !important;
    font-weight: 500 !important;
    color: var(--brand-primary) !important;
}

.matrix-table .grand-total-row td {
    border-top: 2px solid var(--brand-primary) !important;
    color: var(--brand-primary) !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    padding: 1.5rem 0.75rem !important;
}

@media (max-width: 768px) {
    .user-name {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }

    .dashboard-hero .card-body {
        padding: 2.5rem 1.5rem 0 1.5rem !important;
    }

    .matrix-table thead th {
        padding: 1rem 0.75rem;
        font-size: 0.65rem;
    }

    .matrix-table tbody td {
        padding: 1.25rem 0.75rem;
    }

    .matrix-table .grand-total-row td {
        font-size: 1.15rem !important;
        padding: 1.5rem 0.75rem !important;
    }
}
