/**
 * Bootstrap Theme - Centralized Light/Dark Mode System
 * =====================================================
 * Based on Bootstrap 5.3 Color Modes
 * Integrates with existing whitelabeling architecture
 *
 * This is the SINGLE SOURCE OF TRUTH for all theme styling.
 * Load this LAST to override all other CSS.
 *
 * Sources:
 * - https://getbootstrap.com/docs/5.3/customize/color-modes/
 * - https://blog.getbootstrap.com/2023/05/30/bootstrap-5-3-0/
 */

/* ==============================================
   SECTION 1: BASE THEME VARIABLES (Light Mode)
   ============================================== */

:root,
[data-bs-theme="light"] {
    /* ------------------------------------------
       Brand Colors (from whitelabeling)
       ------------------------------------------ */
    --theme-primary: #1ab394;
    --theme-primary-rgb: 26, 179, 148;
    --theme-primary-hover: #16987e;
    --theme-secondary: #1c84c6;
    --theme-secondary-rgb: 28, 132, 198;

    /* Semantic Colors */
    --theme-success: #1ab394;
    --theme-success-rgb: 26, 179, 148;
    --theme-danger: #ed5565;
    --theme-danger-rgb: 237, 85, 101;
    --theme-warning: #f8ac59;
    --theme-warning-rgb: 248, 172, 89;
    --theme-info: #23c6c8;
    --theme-info-rgb: 35, 198, 200;

    /* ------------------------------------------
       Bootstrap Core Variables - Light Mode
       ------------------------------------------ */
    --bs-body-color: #212529;
    --bs-body-color-rgb: 33, 37, 41;
    --bs-body-bg: #f8f9fa;
    --bs-body-bg-rgb: 248, 249, 250;

    --bs-emphasis-color: #000;
    --bs-emphasis-color-rgb: 0, 0, 0;

    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    --bs-secondary-color-rgb: 33, 37, 41;
    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-rgb: 233, 236, 239;

    --bs-tertiary-color: rgba(33, 37, 41, 0.5);
    --bs-tertiary-color-rgb: 33, 37, 41;
    --bs-tertiary-bg: #f8f9fa;
    --bs-tertiary-bg-rgb: 248, 249, 250;

    --bs-border-color: #dee2e6;
    --bs-border-color-translucent: rgba(0, 0, 0, 0.175);

    /* ------------------------------------------
       Card Variables - Light Mode
       ------------------------------------------ */
    --bs-card-bg: #ffffff;
    --bs-card-cap-bg: rgba(33, 37, 41, 0.03);
    --bs-card-border-color: var(--bs-border-color);
    --bg-card: #ffffff;

    /* ------------------------------------------
       Surface Colors - Light Mode
       ------------------------------------------ */
    --bg-body: #f8f9fa;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f8f9fa;
    --bg-surface-tertiary: #f3f4f6;
    --bg-darkest: #1e293b;
    --bg-tertiary: #e9ecef;
    --bg-hover: #e9ecef;
    --border-color: #dee2e6;

    /* ------------------------------------------
       Text Colors - Light Mode
       ------------------------------------------ */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --text-inverse: #ffffff;

    /* ------------------------------------------
       Sidebar Variables - Light Mode
       (Light sidebar for light mode)
       ------------------------------------------ */
    --sidebar-bg: #ffffff;
    --sidebar-text: #6c757d;
    --sidebar-text-hover: #212529;
    --sidebar-text-active: var(--theme-primary);
    --sidebar-icon: #6c757d;
    --sidebar-icon-hover: #212529;
    --sidebar-icon-active: var(--theme-primary);
    --sidebar-item-hover-bg: #f8f9fa;
    --sidebar-item-active-bg: rgba(26, 179, 148, 0.1);
    --sidebar-border: #e9ecef;
    --sidebar-header-bg: #ffffff;

    /* ------------------------------------------
       Topbar Variables - Light Mode
       ------------------------------------------ */
    --topbar-bg: #ffffff;
    --topbar-text: #6c757d;
    --topbar-text-hover: #212529;
    --topbar-border: #dee2e6;

    /* ------------------------------------------
       Form Variables - Light Mode
       ------------------------------------------ */
    --input-bg: #ffffff;
    --input-border: #ced4da;
    --input-text: #212529;
    --input-placeholder: #6c757d;
    --input-focus-border: var(--theme-primary);

    /* ------------------------------------------
       Shadows - Light Mode
       ------------------------------------------ */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);

    /* ------------------------------------------
       Recruiter Module Variables - Light Mode
       ------------------------------------------ */
    --recruiter-primary-teal: #1ab394;
    --recruiter-primary-purple: #8b5cf6;
    --recruiter-success: #10b981;
    --recruiter-danger: #ef4444;
    --recruiter-warning: #f59e0b;
    --recruiter-info: #3b82f6;
    --recruiter-gray-50: #f9fafb;
    --recruiter-gray-100: #f3f4f6;
    --recruiter-gray-200: #e5e7eb;
    --recruiter-gray-300: #d1d5db;
    --recruiter-gray-400: #9ca3af;
    --recruiter-gray-500: #6b7280;
    --recruiter-gray-600: #4b5563;
    --recruiter-text-primary: #111827;
    --recruiter-text-secondary: #6b7280;
    --recruiter-text-tertiary: #9ca3af;

    /* ------------------------------------------
       Additional Theme Variables - Light Mode
       ------------------------------------------ */
    --theme-surface: #ffffff;
    --theme-primary-subtle: rgba(26, 179, 148, 0.1);
    --theme-primary-border: rgba(26, 179, 148, 0.2);
    --theme-primary-dark: #16987e;
    --theme-success-subtle: rgba(16, 185, 129, 0.1);
    --theme-success-emphasis: #059669;
    --theme-warning-subtle: rgba(245, 158, 11, 0.1);
    --theme-warning-emphasis: #d97706;
    --theme-danger-subtle: rgba(239, 68, 68, 0.1);
    --theme-danger-emphasis: #dc2626;
    --theme-info-subtle: rgba(59, 130, 246, 0.1);
    --theme-info-emphasis: #2563eb;
    --theme-indigo: #6366f1;
    --theme-indigo-dark: #4f46e5;
    --theme-indigo-light: #818cf8;
    --portal-primary: var(--theme-primary);
    --portal-secondary: var(--theme-secondary);
    --avatar-bg-primary: var(--theme-indigo);
    --avatar-text: #ffffff;
    --highlight-bg: #fff3cd;
    --bg-secondary: #f8f9fa;
    --notification-bg: #ffffff;
    --notification-hover: #f8f9fa;
    --notification-unread: #eff6ff;
    --status-pending-bg: #fff3cd;
    --status-paid-bg: #d1e7dd;
    --status-overdue-bg: #f8d7da;
    --status-pending-text: #856404;
    --status-paid-text: #0f5132;
    --status-overdue-text: #842029;
}

/* ==============================================
   SECTION 2: DARK MODE VARIABLES
   ============================================== */

[data-bs-theme="dark"] {
    color-scheme: dark;

    /* ------------------------------------------
       Bootstrap Core Variables - Dark Mode
       ------------------------------------------ */
    --bs-body-color: #dee2e6;
    --bs-body-color-rgb: 222, 226, 230;
    --bs-body-bg: #212529;
    --bs-body-bg-rgb: 33, 37, 41;

    --bs-emphasis-color: #fff;
    --bs-emphasis-color-rgb: 255, 255, 255;

    --bs-secondary-color: rgba(222, 226, 230, 0.75);
    --bs-secondary-color-rgb: 222, 226, 230;
    --bs-secondary-bg: #343a40;
    --bs-secondary-bg-rgb: 52, 58, 64;

    --bs-tertiary-color: rgba(222, 226, 230, 0.5);
    --bs-tertiary-color-rgb: 222, 226, 230;
    --bs-tertiary-bg: #2b3035;
    --bs-tertiary-bg-rgb: 43, 48, 53;

    --bs-border-color: #495057;
    --bs-border-color-translucent: rgba(255, 255, 255, 0.15);

    /* ------------------------------------------
       Card Variables - Dark Mode
       ------------------------------------------ */
    --bs-card-bg: #2b3035;
    --bs-card-cap-bg: rgba(222, 226, 230, 0.03);
    --bs-card-border-color: #495057;
    --bg-card: #2b3035;

    /* ------------------------------------------
       Surface Colors - Dark Mode
       ------------------------------------------ */
    --bg-body: #212529;
    --bg-surface: #2b3035;
    --bg-surface-secondary: #343a40;
    --bg-surface-tertiary: #1a1d21;
    --bg-darkest: #0f172a;
    --bg-tertiary: #343a40;
    --bg-hover: #495057;
    --border-color: #495057;

    /* ------------------------------------------
       Text Colors - Dark Mode
       ------------------------------------------ */
    --text-primary: #dee2e6;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;

    /* ------------------------------------------
       Sidebar Variables - Dark Mode
       ------------------------------------------ */
    --sidebar-bg: #1a1d21;
    --sidebar-text: #adb5bd;
    --sidebar-text-hover: #ffffff;
    --sidebar-text-active: #ffffff;
    --sidebar-icon: #6c757d;
    --sidebar-icon-hover: #ffffff;
    --sidebar-icon-active: var(--theme-primary);
    --sidebar-item-hover-bg: rgba(255, 255, 255, 0.05);
    --sidebar-item-active-bg: rgba(26, 179, 148, 0.15);
    --sidebar-border: #343a40;
    --sidebar-header-bg: #1a1d21;

    /* ------------------------------------------
       Topbar Variables - Dark Mode
       ------------------------------------------ */
    --topbar-bg: #2b3035;
    --topbar-text: #adb5bd;
    --topbar-text-hover: #ffffff;
    --topbar-border: #495057;

    /* ------------------------------------------
       Form Variables - Dark Mode
       ------------------------------------------ */
    --input-bg: #343a40;
    --input-border: #495057;
    --input-text: #dee2e6;
    --input-placeholder: #6c757d;

    /* ------------------------------------------
       Shadows - Dark Mode
       ------------------------------------------ */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.4);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.6);
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.4);

    /* ------------------------------------------
       Link Colors - Dark Mode
       ------------------------------------------ */
    --bs-link-color: #6ea8fe;
    --bs-link-hover-color: #9ec5fe;
    --bs-link-color-rgb: 110, 168, 254;
    --bs-link-hover-color-rgb: 158, 197, 254;

    /* ------------------------------------------
       Code Color - Dark Mode
       ------------------------------------------ */
    --bs-code-color: #e685b5;

    /* ------------------------------------------
       Recruiter Module Variables - Dark Mode
       ------------------------------------------ */
    --recruiter-primary-teal: #22d3bb;
    --recruiter-primary-purple: #a78bfa;
    --recruiter-success: #34d399;
    --recruiter-danger: #f87171;
    --recruiter-warning: #fbbf24;
    --recruiter-info: #60a5fa;
    --recruiter-gray-50: #374151;
    --recruiter-gray-100: #4b5563;
    --recruiter-gray-200: #6b7280;
    --recruiter-gray-300: #9ca3af;
    --recruiter-gray-400: #d1d5db;
    --recruiter-gray-500: #e5e7eb;
    --recruiter-gray-600: #f3f4f6;
    --recruiter-text-primary: #f9fafb;
    --recruiter-text-secondary: #d1d5db;
    --recruiter-text-tertiary: #9ca3af;

    /* ------------------------------------------
       Additional Theme Variables - Dark Mode
       ------------------------------------------ */
    --theme-surface: #2b3035;
    --theme-primary-subtle: rgba(26, 179, 148, 0.2);
    --theme-primary-border: rgba(26, 179, 148, 0.3);
    --theme-primary-dark: #22d3bb;
    --theme-success-subtle: rgba(16, 185, 129, 0.15);
    --theme-success-emphasis: #34d399;
    --theme-warning-subtle: rgba(245, 158, 11, 0.15);
    --theme-warning-emphasis: #fbbf24;
    --theme-danger-subtle: rgba(239, 68, 68, 0.15);
    --theme-danger-emphasis: #f87171;
    --theme-info-subtle: rgba(59, 130, 246, 0.15);
    --theme-info-emphasis: #60a5fa;
    --theme-indigo: #818cf8;
    --theme-indigo-dark: #6366f1;
    --theme-indigo-light: #a5b4fc;
    --portal-primary: var(--theme-primary);
    --portal-secondary: var(--theme-secondary);
    --avatar-bg-primary: var(--theme-indigo);
    --avatar-text: #ffffff;
    --highlight-bg: rgba(251, 191, 36, 0.2);
    --bg-secondary: #343a40;
    --notification-bg: #2b3035;
    --notification-hover: #343a40;
    --notification-unread: rgba(59, 130, 246, 0.15);
    --status-pending-bg: rgba(251, 191, 36, 0.2);
    --status-paid-bg: rgba(16, 185, 129, 0.2);
    --status-overdue-bg: rgba(239, 68, 68, 0.2);
    --status-pending-text: #fbbf24;
    --status-paid-text: #34d399;
    --status-overdue-text: #f87171;
}

/* ==============================================
   SECTION 3: BODY & ROOT STYLES
   ============================================== */

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

/* ==============================================
   SECTION 4: SIDEBAR STYLES
   ============================================== */

.sidenav,
.app-menu,
#sidenav,
aside.sidenav {
    display: flex;
    flex-direction: column;
    background-color: var(--sidebar-bg) !important;
    border-right: 1px solid var(--sidebar-border) !important;
}

/* Nav content should expand to fill available space */
.sidenav-nav-content {
    flex: 1;
    overflow-y: auto;
}

.sidenav-header {
    background-color: var(--sidebar-header-bg) !important;
    border-bottom: 1px solid var(--sidebar-border) !important;
}

.sidenav-logo-text {
    color: var(--sidebar-text-hover) !important;
}

.sidenav-logo-placeholder {
    background-color: var(--theme-primary) !important;
    color: var(--text-inverse) !important;
}

/* Navigation Items */
.nav-item,
.sidenav .menu-item,
.sidenav a:not(.btn) {
    color: var(--sidebar-text) !important;
    transition: all 0.2s ease;
}

.nav-item:hover,
.sidenav .menu-item:hover,
.sidenav a:not(.btn):hover {
    color: var(--sidebar-text-hover) !important;
    background-color: var(--sidebar-item-hover-bg) !important;
}

.nav-item.active,
.nav-item.expanded,
.sidenav .menu-item.active,
.sidenav a.active:not(.btn) {
    color: var(--sidebar-text-active) !important;
    background-color: var(--sidebar-item-active-bg) !important;
}

/* Navigation Icons */
.nav-item-icon,
.nav-item i:first-child,
.sidenav .menu-item i:first-child {
    color: var(--sidebar-icon) !important;
}

.nav-item:hover .nav-item-icon,
.nav-item:hover i:first-child {
    color: var(--sidebar-icon-hover) !important;
}

.nav-item.active .nav-item-icon,
.nav-item.active i:first-child {
    color: var(--sidebar-icon-active) !important;
}

/* Navigation Text */
.nav-item-text,
.nav-item span {
    color: inherit !important;
}

/* Section Titles */
.nav-section-title,
.sidenav-section-title,
.menu-title {
    color: #4b5563 !important;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Section Titles - Dark Mode */
[data-bs-theme="dark"] .nav-section-title,
[data-bs-theme="dark"] .sidenav-section-title,
[data-bs-theme="dark"] .menu-title {
    color: #9ca3af !important;
}

/* Submenu */
.nav-submenu,
.collapse ul {
    background-color: rgba(0, 0, 0, 0.15) !important;
}

/* Sidebar Search */
.sidenav-search input,
.sidenav-search-input input {
    background-color: rgba(0, 0, 0, 0.2) !important;
    border-color: var(--sidebar-border) !important;
    color: var(--sidebar-text-hover) !important;
}

.sidenav-search input::placeholder,
.sidenav-search-input input::placeholder {
    color: var(--sidebar-text) !important;
}

/* Sidebar Toggles */
.sidenav-collapse-toggle,
.sidenav-mobile-close {
    color: var(--sidebar-text) !important;
}

.sidenav-collapse-toggle:hover,
.sidenav-mobile-close:hover {
    color: var(--sidebar-text-hover) !important;
    background-color: var(--sidebar-item-hover-bg) !important;
}

/* Sidebar Footer - Theme Toggle */
.sidenav-footer {
    margin-top: auto;
    padding: 0.75rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidenav-theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    color: var(--sidebar-text);
    transition: all 0.2s ease;
    text-align: left;
}

.sidenav-theme-toggle:hover {
    background-color: var(--sidebar-item-hover-bg);
    color: var(--sidebar-text-hover);
}

.sidenav-theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.sidenav-theme-icon i {
    font-size: 1.25rem;
}

.sidenav-theme-icon .ti-sun {
    color: #f59e0b;
}

.sidenav-theme-icon .ti-moon {
    color: #6366f1;
}

.sidenav-theme-text {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide text when collapsed */
.sidenav.collapsed .sidenav-theme-text {
    display: none;
}

.sidenav.collapsed .sidenav-theme-toggle {
    justify-content: center;
    padding: 0.625rem;
}

.sidenav.collapsed .sidenav-footer {
    padding: 0.5rem;
}

/* ==============================================
   SECTION 5: TOPBAR STYLES
   ============================================== */

.app-topbar,
.topbar,
header.app-topbar,
header.topbar {
    background: var(--topbar-bg) !important;
    border-bottom: 1px solid var(--topbar-border) !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Topbar menu - ensure no overflow clipping */
.topbar-menu,
.app-topbar .container-fluid,
.topbar .container-fluid {
    overflow: visible !important;
}

/* Fix topbar right section - prevent overlap */
.topbar-menu > .d-flex,
.app-topbar .d-flex {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* Ensure nav-user doesn't overlap other items */
.nav-user {
    position: relative !important;
    z-index: 1 !important;
    flex-shrink: 0 !important;
}

/* Separator before user profile - add proper spacing */
.nav-user::before {
    margin-left: 1.25rem !important;
    margin-right: 1rem !important;
}

/* User avatar - ensure it doesn't overlap preceding items */
.nav-user .avatar-initials,
.nav-user .rounded-circle,
.nav-user img {
    position: relative !important;
    z-index: 1 !important;
}

/* Ensure all header action items are visible and don't overlap */
.header-action-item {
    position: relative !important;
    z-index: 3 !important;
    flex-shrink: 0 !important;
}

/* All topbar action items - consistent spacing */
.topbar-item,
.header-action-item {
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}

/* Connection indicator wrapper */
.connection-indicator-wrapper {
    z-index: 10 !important;
    position: relative !important;
}

.connection-indicator-wrapper .connection-btn {
    z-index: 10 !important;
}


/* Override nav-user ::before separator - ensure it doesn't overlap */
.nav-user::before {
    position: relative !important;
    flex-shrink: 0 !important;
}

/* Ensure topbar icons are visible */
.topbar-link,
.header-action-btn,
.app-topbar .header-action-btn,
.topbar .header-action-btn {
    color: var(--topbar-text) !important;
}

.topbar-link i,
.header-action-btn i,
.app-topbar i,
.topbar i {
    color: inherit !important;
}

.topbar-link:hover,
.header-action-btn:hover {
    color: var(--topbar-text-hover) !important;
    background-color: var(--bg-hover) !important;
}

/* Header Action Items */
.header-action-item {
    position: relative;
    display: flex;
    align-items: center;
}

.header-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-action-btn i {
    font-size: 1.25rem;
}

/* Connection Status Button */
.connection-btn {
    color: var(--topbar-text) !important;
}

.connection-btn.connected {
    color: var(--theme-success) !important;
}

.connection-btn.connecting {
    color: var(--theme-warning) !important;
}

.connection-btn.disconnected {
    color: var(--theme-danger) !important;
}

.connection-btn .connection-icon {
    font-size: 1.25rem;
}

.connection-btn .spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==============================================
   SECTION 6: CARD STYLES
   ============================================== */

.card {
    background-color: var(--bs-card-bg) !important;
    border: 1px solid var(--bs-card-border-color) !important;
    box-shadow: var(--card-shadow);
}

.card-header {
    background-color: var(--bs-card-cap-bg) !important;
    border-bottom: 1px solid var(--bs-card-border-color) !important;
    color: var(--bs-body-color) !important;
}

.card-body {
    color: var(--bs-body-color) !important;
}

.card-footer {
    background-color: var(--bs-card-cap-bg) !important;
    border-top: 1px solid var(--bs-card-border-color) !important;
}

.card-title {
    color: var(--bs-emphasis-color) !important;
}

.card-text,
.card-subtitle {
    color: var(--bs-secondary-color) !important;
}

/* Dashboard Cards */
.dashboard-card,
.content-card,
.stats-card,
.kpi-card,
.kpi-metric,
.quick-actions-card,
.ibox {
    background-color: var(--bs-card-bg) !important;
    border: 1px solid var(--bs-card-border-color) !important;
    box-shadow: var(--card-shadow);
    color: var(--bs-body-color) !important;
}

.stats-value,
.kpi-value,
.stat-value {
    color: var(--bs-emphasis-color) !important;
}

.stats-label,
.kpi-title,
.stat-label {
    color: var(--bs-secondary-color) !important;
}

/* ==============================================
   SECTION 7: FORM CONTROLS
   ============================================== */

.form-control,
.form-select {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}

.form-control::placeholder {
    color: var(--input-placeholder) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--input-focus-border) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--theme-primary-rgb), 0.25) !important;
}

.form-label,
label,
.modal label,
.modal .form-label,
.rz-form-field label {
    color: var(--text-primary) !important;
    opacity: 1 !important;
    font-weight: 500;
}

/* Ensure all text in modals is visible */
.modal-body,
.modal-body p,
.modal-body span,
.modal-body div,
.modal-content label,
.modal-content .form-text,
.modal-content .text-muted {
    color: var(--bs-body-color) !important;
}

.modal-content .text-muted,
.form-text {
    color: var(--text-secondary) !important;
    opacity: 0.85;
}

.input-group-text {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--bs-secondary-color) !important;
}

/* Form Check */
.form-check-input {
    background-color: var(--input-bg);
    border-color: var(--input-border);
}

.form-check-input:checked {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
}

.form-check-label {
    color: var(--bs-body-color);
}

/* ==============================================
   SECTION 8: TABLE STYLES
   ============================================== */

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--bs-body-color);
    --bs-table-border-color: var(--bs-border-color);
    color: var(--bs-table-color);
}

.table > thead {
    background-color: var(--bs-tertiary-bg);
}

.table th {
    color: var(--bs-body-color);
    border-bottom-color: var(--bs-table-border-color);
}

.table td {
    border-bottom-color: var(--bs-table-border-color);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(var(--bs-emphasis-color-rgb), 0.02);
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(var(--bs-emphasis-color-rgb), 0.05);
}

/* ==============================================
   SECTION 9: DROPDOWN STYLES
   ============================================== */

.dropdown-menu {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: var(--bs-body-color) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--bg-hover) !important;
    color: var(--bs-body-color) !important;
}

.dropdown-divider {
    border-color: var(--bs-border-color) !important;
}

.dropdown-header {
    color: var(--bs-secondary-color) !important;
}

/* ==============================================
   SECTION 10: MODAL STYLES
   ============================================== */

.modal-content {
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-body-color);
}

.modal-header {
    border-bottom-color: var(--bs-border-color) !important;
}

.modal-footer {
    border-top-color: var(--bs-border-color) !important;
}

.modal-title {
    color: var(--bs-emphasis-color) !important;
}

.btn-close {
    filter: var(--bs-btn-close-white-filter, none);
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ==============================================
   SECTION 11: NAV TABS & PILLS
   ============================================== */

.nav-tabs {
    border-bottom-color: var(--bs-border-color);
}

.nav-tabs .nav-link {
    color: var(--bs-secondary-color);
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.nav-tabs .nav-link.active {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg);
    color: var(--bs-body-color);
}

.nav-pills .nav-link {
    color: var(--bs-body-color);
}

.nav-pills .nav-link.active {
    background-color: var(--theme-primary);
    color: var(--text-inverse);
}

/* ==============================================
   SECTION 12: LIST GROUP
   ============================================== */

.list-group-item {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.list-group-item:hover {
    background-color: var(--bg-hover);
}

.list-group-item.active {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    color: var(--text-inverse);
}

/* ==============================================
   SECTION 13: PAGINATION
   ============================================== */

.page-link {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.page-link:hover {
    background-color: var(--bg-hover);
    border-color: var(--bs-border-color);
    color: var(--theme-primary);
}

.page-item.active .page-link {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    color: var(--text-inverse);
}

.page-item.disabled .page-link {
    background-color: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-secondary-color);
}

/* ==============================================
   SECTION 14: ALERTS
   ============================================== */

.alert {
    border-width: 1px;
}

/* ==============================================
   SECTION 15: BADGES
   ============================================== */

.badge.bg-light {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
}

/* ==============================================
   SECTION 16: BREADCRUMB
   ============================================== */

.breadcrumb {
    background-color: transparent;
}

.breadcrumb-item a {
    color: var(--bs-secondary-color);
}

.breadcrumb-item.active {
    color: var(--bs-tertiary-color);
}

/* ==============================================
   SECTION 17: PROGRESS
   ============================================== */

.progress {
    background-color: var(--bs-secondary-bg);
}

/* ==============================================
   SECTION 18: ACCORDION
   ============================================== */

.accordion-item {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

.accordion-button {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.accordion-button:not(.collapsed) {
    background-color: rgba(var(--theme-primary-rgb), 0.1);
    color: var(--theme-primary);
}

/* ==============================================
   SECTION 19: OFFCANVAS
   ============================================== */

.offcanvas {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

/* ==============================================
   SECTION 20: POPOVER & TOOLTIP
   ============================================== */

.popover {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

.popover-header {
    background-color: var(--bs-secondary-bg);
    border-bottom-color: var(--bs-border-color);
}

.popover-body {
    color: var(--bs-body-color);
}

.tooltip-inner {
    background-color: var(--bs-emphasis-color);
    color: var(--bs-body-bg);
}

/* ==============================================
   SECTION 21: TYPOGRAPHY
   ============================================== */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--bs-emphasis-color);
}

p {
    color: var(--bs-body-color);
}

.text-muted {
    color: var(--bs-secondary-color) !important;
}

.text-body {
    color: var(--bs-body-color) !important;
}

/* Small and Tiny Text */
.small-text {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.tiny-text {
    font-size: 0.75rem;
    color: var(--bs-tertiary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

a {
    color: var(--theme-primary);
}

a:hover {
    color: var(--theme-primary-hover);
}

/* ==============================================
   SECTION 22: CONTENT PAGES
   ============================================== */

.content-page,
.admin-content-page,
.page-content {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

/* Page Headers */
.page-title,
.welcome-header h1 {
    color: var(--bs-emphasis-color) !important;
}

.page-subtitle,
.welcome-header p {
    color: var(--bs-secondary-color) !important;
}

/* ==============================================
   SECTION 23: EMPTY STATES
   ============================================== */

.empty-state,
.empty-title {
    color: var(--bs-body-color);
}

.empty-message {
    color: var(--bs-secondary-color);
}

/* ==============================================
   SECTION 24: LOADING STATES
   ============================================== */

.spinner-border {
    color: var(--theme-primary);
}

.loading-spinner {
    border-color: var(--bs-border-color);
    border-top-color: var(--theme-primary);
}

/* ==============================================
   SECTION 25: THEME TOGGLE BUTTON
   ============================================== */

.theme-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    color: var(--topbar-text);
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-hover);
    color: var(--theme-primary);
}

.theme-toggle-btn i {
    font-size: 1.25rem;
}

/* Sun icon styling */
.theme-toggle-btn i.ti-sun {
    color: #f59e0b;
}

/* Moon icon styling */
.theme-toggle-btn i.ti-moon {
    color: #6366f1;
}

/* Theme Menu */
.theme-menu {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--shadow-lg);
}

.theme-menu-header {
    border-bottom-color: var(--bs-border-color);
    color: var(--bs-emphasis-color);
}

.theme-option {
    color: var(--bs-body-color);
}

.theme-option:hover {
    background-color: var(--bg-hover);
}

.option-label {
    color: var(--bs-emphasis-color);
}

.option-desc {
    color: var(--bs-secondary-color);
}

/* ==============================================
   SECTION 26: SCROLLBAR STYLING
   ============================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-tertiary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-secondary-color);
}

/* ==============================================
   SECTION 27: UTILITY CLASS OVERRIDES
   ============================================== */

.bg-white {
    background-color: var(--bs-body-bg) !important;
}

.bg-light {
    background-color: var(--bs-tertiary-bg) !important;
}

.border {
    border-color: var(--bs-border-color) !important;
}

.text-dark {
    color: var(--bs-emphasis-color) !important;
}

/* ==============================================
   SECTION 28: RADZEN COMPONENT OVERRIDES
   (Minimal - only essential fixes)
   ============================================== */

.rz-datatable,
.rz-grid {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.rz-datatable-thead,
.rz-grid-table thead {
    background-color: var(--bs-tertiary-bg);
}

.rz-datatable td,
.rz-grid-table td {
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.rz-dropdown {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--input-text);
}

.rz-dropdown .rz-dropdown-label {
    color: var(--input-text);
}

.rz-dropdown .rz-placeholder {
    color: var(--input-placeholder);
}

.rz-dropdown-panel {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    margin-top: 0.25rem;
}

.rz-dropdown-item {
    color: var(--bs-body-color);
    padding: 0.625rem 1rem;
    transition: all 0.15s ease;
}

.rz-dropdown-item:hover {
    background-color: var(--bg-hover);
}

.rz-dropdown-item.rz-state-active {
    background-color: var(--theme-primary-subtle);
    color: var(--theme-primary);
}

/* Dropdown search/filter input */
.rz-dropdown-filter-container {
    padding: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.rz-dropdown-filter-input,
.rz-dropdown-panel .rz-textbox {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--input-border);
    border-radius: 0.375rem;
    background-color: var(--input-bg);
    color: var(--input-text);
}

.rz-dropdown-filter-input:focus,
.rz-dropdown-panel .rz-textbox:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb, 26, 179, 148), 0.1);
}

/* Radzen Dialog/Modal */
.rz-dialog {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

.rz-dialog-titlebar {
    background-color: var(--bs-body-bg) !important;
    border-bottom: 1px solid var(--bs-border-color) !important;
    color: var(--bs-emphasis-color) !important;
}

.rz-dialog-content {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

.rz-dialog-content label,
.rz-dialog-content .form-label,
.rz-dialog-content .rz-form-field label {
    color: var(--text-primary) !important;
    opacity: 1 !important;
    font-weight: 500 !important;
}

.rz-dialog-content .form-text,
.rz-dialog-content .text-muted,
.rz-dialog-content small {
    color: var(--text-secondary) !important;
}

/* Radzen TextBox/Input/Textarea - Theme-aware styling */
.rz-textbox,
.rz-textarea,
textarea.rz-textarea,
.rz-datepicker .rz-inputtext,
.rz-datepicker-input,
.rz-numeric input,
.rz-autocomplete input {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}

.rz-textbox::placeholder,
.rz-textarea::placeholder,
.rz-datepicker .rz-inputtext::placeholder,
.rz-numeric input::placeholder {
    color: var(--input-placeholder) !important;
}

/* Radzen DatePicker wrapper */
.rz-datepicker {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
}

.rz-datepicker:hover,
.rz-datepicker:focus-within {
    border-color: var(--theme-primary) !important;
}

/* Radzen DatePicker trigger button */
.rz-datepicker-trigger {
    background-color: transparent !important;
    color: var(--text-secondary) !important;
}

.rz-datepicker-trigger:hover {
    color: var(--theme-primary) !important;
}

/* Radzen Button */
.rz-button {
    color: var(--bs-body-color);
}

.rz-button.rz-primary {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #fff !important;
}

/* Radzen Switch */
.rz-switch .rz-switch-track {
    background-color: var(--bs-border-color);
}

.rz-switch.rz-switch-checked .rz-switch-track {
    background-color: var(--theme-primary);
}

/* Radzen Stepper */
.rz-steps .rz-steps-item .rz-steps-title {
    color: var(--text-secondary) !important;
}

.rz-steps .rz-steps-item.rz-steps-item-complete .rz-steps-title,
.rz-steps .rz-steps-item.rz-steps-item-current .rz-steps-title {
    color: var(--text-primary) !important;
}

.rz-steps .rz-steps-item .rz-steps-marker {
    background-color: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
    color: var(--text-secondary);
}

.rz-steps .rz-steps-item.rz-steps-item-complete .rz-steps-marker {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    color: #fff;
}

.rz-steps .rz-steps-item.rz-steps-item-current .rz-steps-marker {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    color: #fff;
}

/* Radzen Card */
.rz-card {
    background-color: var(--bs-card-bg) !important;
    border-color: var(--bs-card-border-color) !important;
    color: var(--bs-body-color) !important;
}

/* Radzen Panel */
.rz-panel {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

.rz-panel-titlebar {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-emphasis-color);
}

/* ==============================================
   SECTION 29: DARK MODE EXPLICIT OVERRIDES
   (Maximum specificity - loaded last)
   ============================================== */

[data-bs-theme="dark"] {
    /* Body and main content */
    background-color: #212529 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .wrapper {
    background-color: #212529 !important;
}

/* Main content area */
[data-bs-theme="dark"] .content-page,
[data-bs-theme="dark"] .admin-content-page,
[data-bs-theme="dark"] .page-content,
[data-bs-theme="dark"] main {
    background-color: #212529 !important;
    color: #dee2e6 !important;
}

/* All cards in dark mode */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .content-card,
[data-bs-theme="dark"] .kpi-card,
[data-bs-theme="dark"] .ibox,
[data-bs-theme="dark"] .panel {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer,
[data-bs-theme="dark"] .ibox-title {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .card-body,
[data-bs-theme="dark"] .ibox-content {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .ibox-title h5 {
    color: #f8f9fa !important;
}

/* Page headers and titles */
[data-bs-theme="dark"] .page-title,
[data-bs-theme="dark"] .page-header h1,
[data-bs-theme="dark"] .page-header h2,
[data-bs-theme="dark"] .welcome-header h1,
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .page-subtitle,
[data-bs-theme="dark"] .welcome-header p,
[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

/* Stats and KPI cards */
[data-bs-theme="dark"] .stats-value,
[data-bs-theme="dark"] .kpi-value,
[data-bs-theme="dark"] .stat-value {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .stats-label,
[data-bs-theme="dark"] .kpi-title,
[data-bs-theme="dark"] .stat-label {
    color: #adb5bd !important;
}

/* KPI Metric cards in dark mode */
[data-bs-theme="dark"] .kpi-metric {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .kpi-metric .kpi-value {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .kpi-metric .kpi-title {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .kpi-metric .kpi-trend {
    color: #adb5bd;
}

[data-bs-theme="dark"] .kpi-metric .kpi-trend.positive {
    background: rgba(10, 207, 151, 0.15);
    color: #0acf97 !important;
}

[data-bs-theme="dark"] .kpi-metric .kpi-trend.negative {
    background: rgba(237, 85, 101, 0.15);
    color: #ed5565 !important;
}

/* KPI Icon variant backgrounds - Light mode */
.kpi-icon.primary {
    background: linear-gradient(135deg, #0061f2 0%, #6f42c1 100%);
}

.kpi-icon.success {
    background: linear-gradient(135deg, #0acf97 0%, #198754 100%);
}

.kpi-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.kpi-icon.info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0d6efd 100%);
}

.kpi-icon.danger {
    background: linear-gradient(135deg, #ed5565 0%, #dc3545 100%);
}

.kpi-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6f42c1 100%);
}

/* KPI Icon variant backgrounds - Dark mode */
[data-bs-theme="dark"] .kpi-icon.primary {
    background: linear-gradient(135deg, #4d8ffa 0%, #8b5cf6 100%);
    box-shadow: 0 4px 12px rgba(77, 143, 250, 0.3);
}

[data-bs-theme="dark"] .kpi-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

[data-bs-theme="dark"] .kpi-icon.warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

[data-bs-theme="dark"] .kpi-icon.info {
    background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

[data-bs-theme="dark"] .kpi-icon.danger {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
}

[data-bs-theme="dark"] .kpi-icon.purple {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

/* Dashboard task items in dark mode */
[data-bs-theme="dark"] .recruiter-card .rounded,
[data-bs-theme="dark"] .prediction-card,
[data-bs-theme="dark"] .funnel-container .rounded {
    background-color: #343a40 !important;
}

/* My Tasks empty state and task items - force dark background */
[data-bs-theme="dark"] .recruiter-card .text-center.p-4,
[data-bs-theme="dark"] .recruiter-card .d-flex.p-3.rounded,
[data-bs-theme="dark"] .recruiter-card [style*="background: var(--bg-body)"],
[data-bs-theme="dark"] .rz-card .text-center.p-4,
[data-bs-theme="dark"] .rz-card .d-flex.p-3.rounded {
    background-color: #343a40 !important;
}

/* Small/Tiny text in dark mode */
[data-bs-theme="dark"] .small-text {
    color: #d1d5db !important;
}

[data-bs-theme="dark"] .tiny-text {
    color: #9ca3af !important;
}

/* Funnel chart header stats in dark mode */
[data-bs-theme="dark"] .funnel-container .p-3.rounded {
    background-color: #343a40 !important;
}

/* Activity feed in dark mode */
[data-bs-theme="dark"] .activity-item {
    border-bottom-color: #495057 !important;
}

/* Conversion chart and insights backgrounds */
[data-bs-theme="dark"] .conversion-funnel-chart .rounded,
[data-bs-theme="dark"] .predictive-insights .rounded {
    background-color: #343a40 !important;
}

/* Subsection headings in dark mode */
[data-bs-theme="dark"] .subsection-heading {
    color: #f9fafb !important;
}

/* Empty state messages */
[data-bs-theme="dark"] .text-center p {
    color: var(--text-secondary) !important;
}
/* Note: .empty-state dark mode now handled in app.css and scoped CSS */

/* Topbar in dark mode */
[data-bs-theme="dark"] .app-topbar,
[data-bs-theme="dark"] .topbar,
[data-bs-theme="dark"] header.app-topbar {
    background: #2b3035 !important;
    border-bottom-color: #495057 !important;
}

[data-bs-theme="dark"] .topbar-link,
[data-bs-theme="dark"] .header-action-btn {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .topbar-link:hover,
[data-bs-theme="dark"] .header-action-btn:hover {
    color: #ffffff !important;
    background-color: #495057 !important;
}

/* Sidebar in dark mode */
[data-bs-theme="dark"] .sidenav,
[data-bs-theme="dark"] #sidenav,
[data-bs-theme="dark"] aside.sidenav {
    background-color: #1a1d21 !important;
    border-right-color: #343a40 !important;
}

[data-bs-theme="dark"] .sidenav-header {
    background-color: #1a1d21 !important;
    border-bottom-color: #343a40 !important;
}

[data-bs-theme="dark"] .sidenav-footer {
    border-top-color: #343a40 !important;
}

[data-bs-theme="dark"] .nav-item,
[data-bs-theme="dark"] .sidenav a:not(.btn) {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .nav-item:hover,
[data-bs-theme="dark"] .sidenav a:not(.btn):hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .nav-item.active,
[data-bs-theme="dark"] .sidenav a.active:not(.btn) {
    color: #ffffff !important;
    background-color: rgba(26, 179, 148, 0.15) !important;
}

/* Footer full-width styling and sticky bottom */
.admin-footer {
    margin-left: -1.5rem !important;
    margin-right: -1.5rem !important;
    margin-bottom: -1.5rem !important;
    width: calc(100% + 3rem) !important;
    padding: 1rem 1.5rem !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

.admin-footer .container-fluid {
    padding: 0 !important;
    max-width: 100% !important;
}

/* Ensure content-page uses flexbox for sticky footer */
.admin-content-page {
    display: flex !important;
    flex-direction: column !important;
}

/* Footer in dark mode */
[data-bs-theme="dark"] .admin-footer,
[data-bs-theme="dark"] .footer,
[data-bs-theme="dark"] footer {
    background-color: #2b3035 !important;
    border-top-color: #495057 !important;
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .admin-footer a,
[data-bs-theme="dark"] .footer a,
[data-bs-theme="dark"] footer a {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .admin-footer a:hover,
[data-bs-theme="dark"] .footer a:hover,
[data-bs-theme="dark"] footer a:hover {
    color: #22d3bb !important;
}

[data-bs-theme="dark"] .footer-copyright,
[data-bs-theme="dark"] .footer-text {
    color: #adb5bd !important;
}

/* Forms in dark mode */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] select {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] input::placeholder,
[data-bs-theme="dark"] textarea::placeholder {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label {
    color: #dee2e6 !important;
}

/* Tables in dark mode */
[data-bs-theme="dark"] .table {
    color: #dee2e6 !important;
    --bs-table-bg: transparent;
}

[data-bs-theme="dark"] .table > thead {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .table td {
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

/* Modals in dark mode */
[data-bs-theme="dark"] .modal-content {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* Modal body in dark mode */
[data-bs-theme="dark"] .modal-body {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .modal-title {
    color: #f8f9fa !important;
}

/* Dropdowns in dark mode */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #343a40 !important;
    color: #ffffff !important;
}

/* Alerts/Banners in dark mode */
[data-bs-theme="dark"] .alert {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

/* List groups in dark mode */
[data-bs-theme="dark"] .list-group-item {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

/* Pagination in dark mode */
[data-bs-theme="dark"] .page-link {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

/* Buttons in dark mode */
[data-bs-theme="dark"] .btn-outline-secondary,
[data-bs-theme="dark"] .btn-outline-light {
    background-color: transparent !important;
    border-color: #6c757d !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-light:hover {
    background-color: #495057 !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-secondary {
    background-color: #495057 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .btn-secondary:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-light {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .btn-light:hover {
    background-color: #495057 !important;
    color: #ffffff !important;
}

/* Options/toggle sections in dark mode */
[data-bs-theme="dark"] .options-section,
[data-bs-theme="dark"] .option-item,
[data-bs-theme="dark"] .toggle-section,
[data-bs-theme="dark"] .switch-wrapper,
[data-bs-theme="dark"] .form-switch-wrapper,
[data-bs-theme="dark"] .form-check-wrapper,
[data-bs-theme="dark"] .settings-option,
[data-bs-theme="dark"] .option-card,
[data-bs-theme="dark"] .rz-card,
[data-bs-theme="dark"] .recruiter-card,
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-white,
/* Page-level components - global dark mode catch-all */
[data-bs-theme="dark"] .page-header,
[data-bs-theme="dark"] .content-area,
[data-bs-theme="dark"] .vacancy-list-page,
[data-bs-theme="dark"] .stats-card,
[data-bs-theme="dark"] .empty-state,
[data-bs-theme="dark"] .tab-content-area,
[data-bs-theme="dark"] .navigation-bar,
[data-bs-theme="dark"] .search-filter-bar,
[data-bs-theme="dark"] .vacancy-card,
[data-bs-theme="dark"] .table-container,
[data-bs-theme="dark"] .card,
/* PageLayout component containers */
[data-bs-theme="dark"] .page-layout .content-wrapper,
[data-bs-theme="dark"] .page-layout .main-content,
[data-bs-theme="dark"] .page-layout .stats-grid,
[data-bs-theme="dark"] .page-layout .two-column-layout,
[data-bs-theme="dark"] .page-layout .main-column,
[data-bs-theme="dark"] .page-layout .sidebar-column,
/* Document management page */
[data-bs-theme="dark"] .document-management-page,
/* Service catalog page */
[data-bs-theme="dark"] .service-catalog-page,
/* All other common containers */
[data-bs-theme="dark"] .admissions-list-page,
[data-bs-theme="dark"] .reviews-page,
[data-bs-theme="dark"] .filter-section {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

/* Secondary surface components - slightly darker */
[data-bs-theme="dark"] .filter-pill,
[data-bs-theme="dark"] .view-toggle,
[data-bs-theme="dark"] .view-btn,
[data-bs-theme="dark"] .search-input,
[data-bs-theme="dark"] .search-input-wrapper {
    background-color: #1a1d21 !important;
    border-color: #495057 !important;
    color: #adb5bd !important;
}

/* Active/hover states for page components */
[data-bs-theme="dark"] .filter-pill.active,
[data-bs-theme="dark"] .view-btn.active {
    background-color: var(--theme-primary, #1ab394) !important;
    border-color: var(--theme-primary, #1ab394) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .filter-pill:hover:not(.active),
[data-bs-theme="dark"] .view-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .filter-pill.active.success {
    background-color: var(--theme-success, #10b981) !important;
    border-color: var(--theme-success, #10b981) !important;
}

[data-bs-theme="dark"] .filter-pill.active.warning {
    background-color: var(--theme-warning, #f59e0b) !important;
    border-color: var(--theme-warning, #f59e0b) !important;
}

[data-bs-theme="dark"] .filter-pill.active.secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

/* Page header text colors */
[data-bs-theme="dark"] .page-header h1,
[data-bs-theme="dark"] .page-header h2,
[data-bs-theme="dark"] .page-header h3,
[data-bs-theme="dark"] .page-header .page-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .page-header p,
[data-bs-theme="dark"] .page-header small,
[data-bs-theme="dark"] .page-header .text-muted {
    color: #94a3b8 !important;
}

/* Stats card text colors */
[data-bs-theme="dark"] .stats-value {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .stats-label {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .stats-sublabel {
    color: #64748b !important;
}

/* Vacancy card text colors */
[data-bs-theme="dark"] .vacancy-name {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .vacancy-description {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .meta-item {
    color: #64748b !important;
}

/* Empty state text colors */
[data-bs-theme="dark"] .empty-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .empty-message {
    color: #94a3b8 !important;
}

/* Search input placeholder */
[data-bs-theme="dark"] .search-input::placeholder {
    color: #64748b !important;
}

/* Form check/switch in dark mode */
[data-bs-theme="dark"] .form-check,
[data-bs-theme="dark"] .form-switch {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .form-check-label {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .form-check-input {
    background-color: #495057 !important;
    border-color: #6c757d !important;
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

/* Sections/panels with light backgrounds in dark mode */
[data-bs-theme="dark"] section,
[data-bs-theme="dark"] .section,
[data-bs-theme="dark"] .panel-body,
[data-bs-theme="dark"] .form-section,
[data-bs-theme="dark"] .field-group,
[data-bs-theme="dark"] .option-group {
    background-color: transparent !important;
    color: #dee2e6 !important;
}

/* Nested containers that might have bg-light */
[data-bs-theme="dark"] .card .bg-light,
[data-bs-theme="dark"] .modal .bg-light,
[data-bs-theme="dark"] .card .bg-white,
[data-bs-theme="dark"] .modal .bg-white {
    background-color: #343a40 !important;
}

/* Border utilities in dark mode */
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end {
    border-color: #495057 !important;
}

/* Rounded boxes that typically have light backgrounds */
[data-bs-theme="dark"] .rounded,
[data-bs-theme="dark"] .rounded-3 {
    /* Don't override background unless explicitly set */
}

[data-bs-theme="dark"] .rounded.bg-light,
[data-bs-theme="dark"] .rounded-3.bg-light,
[data-bs-theme="dark"] .rounded.p-3,
[data-bs-theme="dark"] .rounded-3.p-3 {
    background-color: #343a40 !important;
}

/* Small/helper text in dark mode */
[data-bs-theme="dark"] small,
[data-bs-theme="dark"] .small,
[data-bs-theme="dark"] .form-text,
[data-bs-theme="dark"] .help-text,
[data-bs-theme="dark"] .hint-text {
    color: #adb5bd !important;
}

/* Close buttons in dark mode */
[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* FshButton variants in dark mode */
[data-bs-theme="dark"] .fsh-btn-light {
    background-color: #495057 !important;
    color: #dee2e6 !important;
    border-color: #6c757d !important;
}

[data-bs-theme="dark"] .fsh-btn-light:hover:not(:disabled) {
    background-color: #5a6268 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .fsh-btn-secondary {
    background-color: #495057 !important;
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .fsh-btn-secondary:hover:not(:disabled) {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .fsh-btn-outline-secondary {
    background-color: transparent !important;
    color: #dee2e6 !important;
    border-color: #6c757d !important;
}

[data-bs-theme="dark"] .fsh-btn-outline-secondary:hover:not(:disabled) {
    background-color: #495057 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .fsh-btn-ghost {
    background-color: transparent !important;
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .fsh-btn-ghost:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Toggle option in dark mode (for Options section in dialogs) */
[data-bs-theme="dark"] .toggle-option {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .toggle-option .toggle-label span {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .toggle-option .toggle-label small {
    color: #adb5bd !important;
}

/* Radzen Tabs in dark mode - Global and Container-specific */
[data-bs-theme="dark"] .rz-tabview,
[data-bs-theme="dark"] .card .rz-tabview,
[data-bs-theme="dark"] .card-body .rz-tabview {
    background: transparent !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .rz-tabview-nav,
[data-bs-theme="dark"] .card .rz-tabview-nav,
[data-bs-theme="dark"] .card-body .rz-tabview-nav {
    background: #2b3035 !important;
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .rz-tabview-nav li,
[data-bs-theme="dark"] .card .rz-tabview-nav li,
[data-bs-theme="dark"] .card-body .rz-tabview-nav li {
    background: transparent !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .rz-tabview-nav li .rz-tabview-nav-link,
[data-bs-theme="dark"] .rz-tabview-nav li a.rz-tabview-nav-link,
[data-bs-theme="dark"] .card .rz-tabview-nav li .rz-tabview-nav-link,
[data-bs-theme="dark"] .card-body .rz-tabview-nav li .rz-tabview-nav-link {
    background: transparent !important;
    background-color: transparent !important;
    color: #adb5bd !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .rz-tabview-nav li .rz-tabview-nav-link:hover,
[data-bs-theme="dark"] .rz-tabview-nav li a.rz-tabview-nav-link:hover,
[data-bs-theme="dark"] .card .rz-tabview-nav li .rz-tabview-nav-link:hover,
[data-bs-theme="dark"] .card-body .rz-tabview-nav li .rz-tabview-nav-link:hover {
    color: #dee2e6 !important;
    background: #343a40 !important;
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .rz-tabview-nav li.rz-tabview-selected .rz-tabview-nav-link,
[data-bs-theme="dark"] .rz-tabview-nav li .rz-tabview-nav-link.rz-state-active,
[data-bs-theme="dark"] .rz-tabview-nav li.rz-state-active .rz-tabview-nav-link,
[data-bs-theme="dark"] .card .rz-tabview-nav li.rz-tabview-selected .rz-tabview-nav-link,
[data-bs-theme="dark"] .card-body .rz-tabview-nav li.rz-tabview-selected .rz-tabview-nav-link {
    background: #343a40 !important;
    background-color: #343a40 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
    border-bottom-color: #343a40 !important;
}

[data-bs-theme="dark"] .rz-tabview-panels,
[data-bs-theme="dark"] .card .rz-tabview-panels,
[data-bs-theme="dark"] .card-body .rz-tabview-panels {
    background: transparent !important;
    background-color: transparent !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .rz-tabview-panel,
[data-bs-theme="dark"] .card .rz-tabview-panel,
[data-bs-theme="dark"] .card-body .rz-tabview-panel {
    background: transparent !important;
    background-color: transparent !important;
    color: #dee2e6 !important;
}

/* RadzenTabs content wrapper */
[data-bs-theme="dark"] .rz-tabview-content,
[data-bs-theme="dark"] .card .rz-tabview-content,
[data-bs-theme="dark"] .card-body .rz-tabview-content {
    background: transparent !important;
    background-color: transparent !important;
}

/* RadzenTabs - ensure ul/li elements have no white background */
[data-bs-theme="dark"] .rz-tabview ul,
[data-bs-theme="dark"] .rz-tabview-nav ul {
    background: transparent !important;
    background-color: transparent !important;
}

/* Override any inline styles that Radzen may add */
[data-bs-theme="dark"] .rz-tabview *[style*="background"] {
    background-color: transparent !important;
}

/* RadzenChart Dark Mode */
[data-bs-theme="dark"] .rz-chart {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .rz-chart svg {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .rz-chart .rz-chart-tooltip {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .rz-chart text {
    fill: #adb5bd !important;
}

[data-bs-theme="dark"] .rz-chart .rz-axis-title,
[data-bs-theme="dark"] .rz-chart .rz-tick-text {
    fill: #adb5bd !important;
}

[data-bs-theme="dark"] .rz-chart .rz-grid-line {
    stroke: #495057 !important;
}

/* Cards in dark mode - comprehensive */
[data-bs-theme="dark"] .card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .card-header {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .card-body {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .card-footer {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .card-title {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .card-subtitle {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .card-text {
    color: #dee2e6 !important;
}

/* Text utilities in dark mode */
[data-bs-theme="dark"] .text-muted {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .text-secondary {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, [data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] p {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .text-center.text-muted {
    color: #6c757d !important;
}

/* Session cards in dark mode */
[data-bs-theme="dark"] .session-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .session-card.expired-session {
    background-color: #212529 !important;
}

[data-bs-theme="dark"] .session-title {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .session-meta {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .session-detail-row {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .session-detail-row i {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .session-actions {
    border-color: #495057 !important;
}

/* Loading overlay - theme aware */
.loading-overlay {
    background: rgba(255, 255, 255, 0.8);
}

[data-bs-theme="dark"] .loading-overlay {
    background: rgba(33, 37, 41, 0.9) !important;
}

/* Radzen dialog in dark mode */
[data-bs-theme="dark"] .rz-dialog {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .rz-dialog-wrapper {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .rz-dialog-content {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .rz-dialog-titlebar {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #f8f9fa !important;
}

/* Vacancy Form Dialog dark mode (global overrides for scoped component) */
[data-bs-theme="dark"] .vacancy-form-container {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .form-content {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .step-indicator {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%) !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .section-header h3 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .vacancy-form-container .section-header p {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .vacancy-form-container .form-label {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .form-hint {
    color: #6c757d !important;
}

/* Stage cards in vacancy form */
[data-bs-theme="dark"] .vacancy-form-container .stage-card {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .stage-card.enabled {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.15) 100%) !important;
}

[data-bs-theme="dark"] .vacancy-form-container .stage-name {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .vacancy-form-container .stage-description {
    color: #adb5bd !important;
}

/* Stage fee sections */
[data-bs-theme="dark"] .vacancy-form-container .stage-fee-section {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .stage-fee-header {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .stage-fee-title {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .vacancy-form-container .stage-fee-item {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* Settings cards */
[data-bs-theme="dark"] .vacancy-form-container .settings-card {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .settings-card-header {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: #495057 !important;
    color: #f8f9fa !important;
}

/* Review cards */
[data-bs-theme="dark"] .vacancy-form-container .review-card {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .review-card-header {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-color: #495057 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .vacancy-form-container .review-item {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .review-value {
    color: #dee2e6 !important;
}

/* Stages summary */
[data-bs-theme="dark"] .vacancy-form-container .stages-summary {
    background-color: #343a40 !important;
    color: #adb5bd !important;
}

/* Form footer */
[data-bs-theme="dark"] .vacancy-form-container .form-footer {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* Radzen dropdown in vacancy form - dark mode text */
[data-bs-theme="dark"] .vacancy-form-container .rz-dropdown .rz-dropdown-label,
[data-bs-theme="dark"] .vacancy-form-container .rz-dropdown span,
[data-bs-theme="dark"] .vacancy-form-container .rz-dropdown .rz-inputtext {
    color: #dee2e6 !important;
    -webkit-text-fill-color: #dee2e6 !important;
}

[data-bs-theme="dark"] .vacancy-form-container .rz-dropdown .rz-placeholder {
    color: #6c757d !important;
    -webkit-text-fill-color: #6c757d !important;
}

/* ==============================================
   SECTION 30: TENANT MANAGEMENT PAGE - DARK MODE
   ============================================== */

/* Nav tabs custom (Management/Analytics) */
[data-bs-theme="dark"] .nav-tabs-custom {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .nav-tabs-custom .nav-link {
    color: #adb5bd !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .nav-tabs-custom .nav-link:hover {
    color: #dee2e6 !important;
    border-color: #495057 #495057 transparent !important;
}

[data-bs-theme="dark"] .nav-tabs-custom .nav-link.active {
    color: #f8f9fa !important;
    background-color: #343a40 !important;
    border-color: #495057 #495057 #343a40 !important;
}

/* Filter tabs (All, Active, Trial, etc.) */
[data-bs-theme="dark"] .filter-tabs {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .filter-tab {
    color: #adb5bd !important;
    background-color: transparent !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .filter-tab:hover {
    color: #dee2e6 !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .filter-tab.active {
    color: #ffffff !important;
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

/* Tenant Management RadzenDataGrid */
[data-bs-theme="dark"] .tenants-grid,
[data-bs-theme="dark"] .tenants-grid .rz-data-grid {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .tenants-grid .rz-datatable-thead,
[data-bs-theme="dark"] .tenants-grid thead,
[data-bs-theme="dark"] .tenants-grid .rz-grid-table > thead {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .tenants-grid .rz-datatable-thead th,
[data-bs-theme="dark"] .tenants-grid thead th,
[data-bs-theme="dark"] .tenants-grid .rz-column-title {
    color: #f8f9fa !important;
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .tenants-grid .rz-datatable-data td,
[data-bs-theme="dark"] .tenants-grid tbody td,
[data-bs-theme="dark"] .tenants-grid .rz-cell {
    color: #dee2e6 !important;
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .tenants-grid .rz-datatable-data tr:hover td,
[data-bs-theme="dark"] .tenants-grid tbody tr:hover td {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .tenants-grid .rz-datatable-data tr.rz-state-highlight td,
[data-bs-theme="dark"] .tenants-grid tbody tr.selected td {
    background-color: rgba(26, 179, 148, 0.15) !important;
    color: #f8f9fa !important;
}

/* Summary cards in tenant management */
[data-bs-theme="dark"] .summary-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .summary-card h6,
[data-bs-theme="dark"] .summary-card .summary-title {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .summary-card h3,
[data-bs-theme="dark"] .summary-card .summary-value {
    color: #f8f9fa !important;
}

/* Details panel for selected tenant */
[data-bs-theme="dark"] .details-panel {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .details-header {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .details-panel .detail-item,
[data-bs-theme="dark"] .details-panel .info-item {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .details-panel .detail-label,
[data-bs-theme="dark"] .details-panel .info-label {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .details-panel .detail-value,
[data-bs-theme="dark"] .details-panel .info-value {
    color: #dee2e6 !important;
}

/* Tenant card in grid view */
[data-bs-theme="dark"] .tenant-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .tenant-card:hover {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .tenant-card .tenant-name {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .tenant-card .tenant-info {
    color: #adb5bd !important;
}

/* ================================================
   RADZEN DATAGRID LIGHT MODE - EXPLICIT OVERRIDES
   Must use hardcoded colors with !important to override Radzen's material-base.css
   ================================================ */
[data-bs-theme="light"] .rz-data-grid,
[data-bs-theme="light"] .rz-datatable {
    background-color: #ffffff !important;
    color: #212529 !important;
}

[data-bs-theme="light"] .rz-datatable-scrollable-view,
[data-bs-theme="light"] .rz-datatable-scrollable-body {
    background-color: #ffffff !important;
}

[data-bs-theme="light"] .rz-grid-table {
    background-color: #ffffff !important;
}

[data-bs-theme="light"] .rz-datatable-thead th,
[data-bs-theme="light"] .rz-grid-table thead th {
    background-color: #f3f4f6 !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
    font-weight: 600 !important;
}

[data-bs-theme="light"] .rz-datatable-data td,
[data-bs-theme="light"] .rz-grid-table tbody td {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

[data-bs-theme="light"] .rz-datatable-data tr:nth-child(even) td {
    background-color: #f9fafb !important;
}

[data-bs-theme="light"] .rz-datatable-data tr:hover td,
[data-bs-theme="light"] .rz-grid-table tbody tr:hover td {
    background-color: #f3f4f6 !important;
}

[data-bs-theme="light"] .rz-datatable-data tr.rz-state-highlight td {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* RadzenDataGrid pager in light mode */
[data-bs-theme="light"] .rz-pager {
    background-color: #ffffff !important;
    border-color: #dee2e6 !important;
    color: #212529 !important;
}

[data-bs-theme="light"] .rz-pager .rz-paginator-page,
[data-bs-theme="light"] .rz-pager .rz-paginator-element {
    color: #212529 !important;
    background-color: transparent !important;
}

[data-bs-theme="light"] .rz-pager .rz-paginator-page:hover,
[data-bs-theme="light"] .rz-pager .rz-paginator-element:hover {
    color: #212529 !important;
    background-color: #f3f4f6 !important;
}

[data-bs-theme="light"] .rz-pager .rz-state-active {
    background-color: var(--theme-primary, #3b82f6) !important;
    color: #ffffff !important;
}

[data-bs-theme="light"] .rz-pager-summary {
    color: #6c757d !important;
}

/* RadzenDataGrid empty message - light mode */
[data-bs-theme="light"] .rz-datatable-emptymessage,
[data-bs-theme="light"] .rz-grid-table .rz-datatable-emptymessage-row td {
    background-color: #ffffff !important;
    color: #6c757d !important;
}

/* RadzenDataGrid sort icons - light mode */
[data-bs-theme="light"] .rz-sortable-column .rz-sortable-column-icon {
    color: #6c757d !important;
}

[data-bs-theme="light"] .rz-sortable-column:hover .rz-sortable-column-icon {
    color: #212529 !important;
}

/* RadzenDataGrid column headers text - explicit override */
[data-bs-theme="light"] .rz-column-title,
[data-bs-theme="light"] .rz-cell-data {
    color: #212529 !important;
}

/* General RadzenDataGrid dark mode improvements */
[data-bs-theme="dark"] .rz-data-grid,
[data-bs-theme="dark"] .rz-datatable {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .rz-datatable-scrollable-view,
[data-bs-theme="dark"] .rz-datatable-scrollable-body {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .rz-grid-table {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .rz-datatable-thead th,
[data-bs-theme="dark"] .rz-grid-table thead th {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .rz-datatable-data td,
[data-bs-theme="dark"] .rz-grid-table tbody td {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .rz-datatable-data tr:nth-child(even) td {
    background-color: #2d3339 !important;
}

[data-bs-theme="dark"] .rz-datatable-data tr:hover td,
[data-bs-theme="dark"] .rz-grid-table tbody tr:hover td {
    background-color: #3a4147 !important;
}

[data-bs-theme="dark"] .rz-datatable-data tr.rz-state-highlight td {
    background-color: rgba(26, 179, 148, 0.15) !important;
}

/* RadzenDataGrid pager in dark mode */
[data-bs-theme="dark"] .rz-pager {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .rz-pager .rz-paginator-page,
[data-bs-theme="dark"] .rz-pager .rz-paginator-element {
    color: #adb5bd !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .rz-pager .rz-paginator-page:hover,
[data-bs-theme="dark"] .rz-pager .rz-paginator-element:hover {
    color: #dee2e6 !important;
    background-color: #495057 !important;
}

[data-bs-theme="dark"] .rz-pager .rz-state-active {
    background-color: var(--theme-primary) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .rz-pager-summary {
    color: #adb5bd !important;
}

/* RadzenDataGrid empty message */
[data-bs-theme="dark"] .rz-datatable-emptymessage,
[data-bs-theme="dark"] .rz-grid-table .rz-datatable-emptymessage-row td {
    background-color: #2b3035 !important;
    color: #adb5bd !important;
}

/* RadzenDataGrid sort icons */
[data-bs-theme="dark"] .rz-sortable-column .rz-sortable-column-icon {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .rz-sortable-column:hover .rz-sortable-column-icon {
    color: #dee2e6 !important;
}

/* Details Panel - override inline fallback values */
[data-bs-theme="dark"] .details-panel {
    background: #2b3035 !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .panel-header {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .panel-header h4 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .panel-body {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .tenant-header {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .tenant-main-info h3 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .tenant-main-info .tenant-key {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .details-section {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .section-header {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .section-header h6 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .info-label {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .info-value {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .info-value.muted {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .panel-actions {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .details-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Tenant name cell in grid */
[data-bs-theme="dark"] .tenant-info .tenant-name {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .tenant-info .tenant-id {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .tenant-name-cell.clickable:hover .tenant-name {
    color: var(--theme-primary) !important;
}

/* Package badge in dark mode */
[data-bs-theme="dark"] .package-badge.free {
    background: #495057 !important;
    color: #dee2e6 !important;
}

/* Status badge refinements for dark mode */
[data-bs-theme="dark"] .status-badge.active {
    background: rgba(16, 185, 129, 0.2) !important;
}

[data-bs-theme="dark"] .status-badge.inactive {
    background: rgba(107, 114, 128, 0.2) !important;
}

[data-bs-theme="dark"] .status-badge.trial {
    background: rgba(59, 130, 246, 0.2) !important;
}

[data-bs-theme="dark"] .status-badge.expiring {
    background: rgba(245, 158, 11, 0.2) !important;
}

[data-bs-theme="dark"] .status-badge.suspended {
    background: rgba(239, 68, 68, 0.2) !important;
}

/* Usage metrics in dark mode */
[data-bs-theme="dark"] .usage-metrics {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .usage-item i {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .usage-text {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .mini-progress {
    background: #495057 !important;
}

/* Subscription date text */
[data-bs-theme="dark"] .subscription-date .date {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .subscription-date .days-remaining {
    color: #adb5bd !important;
}

/* Last activity text */
[data-bs-theme="dark"] .last-activity.moderate {
    color: #adb5bd !important;
}

/* Search box in dark mode */
[data-bs-theme="dark"] .search-box i {
    color: #adb5bd !important;
}

/* Empty state in dark mode - using CSS variables */
[data-bs-theme="dark"] .empty-state-container {
    color: var(--text-primary) !important;
}
/* Note: .empty-state .empty-icon dark mode handled in scoped CSS */

/* ==============================================
   SECTION 31: BILLING PAGES - DARK MODE
   ============================================== */

/* Common billing page containers */
[data-bs-theme="dark"] .billing-portal,
[data-bs-theme="dark"] .invoice-center,
[data-bs-theme="dark"] .invoice-detail-page,
[data-bs-theme="dark"] .invoice-payment-page,
[data-bs-theme="dark"] .payment-history-page,
[data-bs-theme="dark"] .payment-methods-page,
[data-bs-theme="dark"] .usage-analytics-page,
[data-bs-theme="dark"] .pricing-page {
    background-color: var(--bs-body-bg) !important;
}

/* Billing cards with hardcoded white backgrounds */
[data-bs-theme="dark"] .billing-card,
[data-bs-theme="dark"] .invoice-card,
[data-bs-theme="dark"] .payment-card,
[data-bs-theme="dark"] .method-card,
[data-bs-theme="dark"] .plan-card,
[data-bs-theme="dark"] .usage-card,
[data-bs-theme="dark"] .summary-card,
[data-bs-theme="dark"] .feature-card,
[data-bs-theme="dark"] .action-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* Billing headers */
[data-bs-theme="dark"] .billing-header,
[data-bs-theme="dark"] .invoice-header,
[data-bs-theme="dark"] .section-header,
[data-bs-theme="dark"] .page-header-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* Billing sections with light backgrounds */
[data-bs-theme="dark"] .billing-section,
[data-bs-theme="dark"] .invoice-section,
[data-bs-theme="dark"] .payment-section,
[data-bs-theme="dark"] .details-section,
[data-bs-theme="dark"] .info-section {
    background-color: #2b3035 !important;
}

/* Billing info boxes */
[data-bs-theme="dark"] .info-box,
[data-bs-theme="dark"] .stat-box,
[data-bs-theme="dark"] .summary-box,
[data-bs-theme="dark"] .detail-box {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

/* Billing tables */
[data-bs-theme="dark"] .billing-table,
[data-bs-theme="dark"] .invoice-table,
[data-bs-theme="dark"] .payment-table,
[data-bs-theme="dark"] .history-table {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .billing-table thead,
[data-bs-theme="dark"] .invoice-table thead,
[data-bs-theme="dark"] .payment-table thead,
[data-bs-theme="dark"] .history-table thead {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .billing-table th,
[data-bs-theme="dark"] .invoice-table th,
[data-bs-theme="dark"] .payment-table th,
[data-bs-theme="dark"] .history-table th {
    color: #f8f9fa !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .billing-table td,
[data-bs-theme="dark"] .invoice-table td,
[data-bs-theme="dark"] .payment-table td,
[data-bs-theme="dark"] .history-table td {
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

/* Billing list items */
[data-bs-theme="dark"] .billing-item,
[data-bs-theme="dark"] .invoice-item,
[data-bs-theme="dark"] .payment-item,
[data-bs-theme="dark"] .method-item,
[data-bs-theme="dark"] .history-item,
[data-bs-theme="dark"] .transaction-item {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .billing-item:hover,
[data-bs-theme="dark"] .invoice-item:hover,
[data-bs-theme="dark"] .payment-item:hover,
[data-bs-theme="dark"] .history-item:hover {
    background-color: #343a40 !important;
}

/* Billing filters and tabs */
[data-bs-theme="dark"] .billing-filters,
[data-bs-theme="dark"] .billing-tabs,
[data-bs-theme="dark"] .filter-bar,
[data-bs-theme="dark"] .tab-bar {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .filter-btn,
[data-bs-theme="dark"] .tab-btn {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .filter-btn.active,
[data-bs-theme="dark"] .tab-btn.active {
    background-color: var(--theme-primary) !important;
    color: #ffffff !important;
}

/* Pricing cards */
[data-bs-theme="dark"] .pricing-card,
[data-bs-theme="dark"] .plan-option {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .pricing-card.popular,
[data-bs-theme="dark"] .pricing-card.recommended {
    border-color: var(--theme-primary) !important;
}

[data-bs-theme="dark"] .pricing-header {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .pricing-features li {
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

/* Usage analytics specific */
[data-bs-theme="dark"] .usage-chart-container,
[data-bs-theme="dark"] .chart-wrapper,
[data-bs-theme="dark"] .analytics-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .usage-stat,
[data-bs-theme="dark"] .metric-card {
    background-color: #343a40 !important;
}

/* Payment method cards */
[data-bs-theme="dark"] .payment-method-card,
[data-bs-theme="dark"] .card-display,
[data-bs-theme="dark"] .bank-account-display {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .payment-method-card.default {
    border-color: var(--theme-primary) !important;
}

/* Invoice details */
[data-bs-theme="dark"] .invoice-preview,
[data-bs-theme="dark"] .invoice-document,
[data-bs-theme="dark"] .invoice-content {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .invoice-line-item {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .invoice-totals {
    background-color: #343a40 !important;
}

/* Warning/info banners in billing */
[data-bs-theme="dark"] .billing-warning,
[data-bs-theme="dark"] .billing-info,
[data-bs-theme="dark"] .billing-alert {
    background-color: rgba(251, 191, 36, 0.15) !important;
    color: #fbbf24 !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
}

[data-bs-theme="dark"] .billing-success {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
}

[data-bs-theme="dark"] .billing-danger,
[data-bs-theme="dark"] .billing-error {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

/* Empty states in billing */
[data-bs-theme="dark"] .billing-empty,
[data-bs-theme="dark"] .no-invoices,
[data-bs-theme="dark"] .no-payments,
[data-bs-theme="dark"] .no-methods {
    background-color: #2b3035 !important;
    color: #adb5bd !important;
}

/* Action buttons and links */
[data-bs-theme="dark"] .billing-action,
[data-bs-theme="dark"] .invoice-action {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .billing-action:hover,
[data-bs-theme="dark"] .invoice-action:hover {
    color: var(--theme-primary) !important;
}

/* Modal/dialog backgrounds in billing */
[data-bs-theme="dark"] .billing-modal,
[data-bs-theme="dark"] .payment-modal,
[data-bs-theme="dark"] .invoice-modal {
    background-color: #2b3035 !important;
}

/* Forms in billing pages */
[data-bs-theme="dark"] .billing-form,
[data-bs-theme="dark"] .payment-form {
    background-color: #343a40 !important;
}

/* ==============================================
   SECTION 32: SHARED COMPONENTS - DARK MODE
   ============================================== */

/* Page Loader */
[data-bs-theme="dark"] .page-loader-overlay {
    background: linear-gradient(135deg, rgba(43, 48, 53, 0.98) 0%, rgba(33, 37, 41, 0.98) 100%);
}

[data-bs-theme="dark"] .page-loader-overlay.scoped {
    background: rgba(33, 37, 41, 0.95);
}

[data-bs-theme="dark"] .page-loader-message {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .page-loader-submessage {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .stat-value {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .stat-label {
    color: #adb5bd !important;
}

/* Content Card */
[data-bs-theme="dark"] .content-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .content-card .card-header {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

/* Sidebar Card */
[data-bs-theme="dark"] .sidebar-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .sidebar-card .card-header {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

/* Quick Actions */
[data-bs-theme="dark"] .quick-actions-card {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .quick-action-item {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .quick-action-item:hover {
    background-color: #3d444b !important;
}

/* Empty States - using CSS variables for consistency */
/* Note: Primary empty-state dark mode is handled in app.css and EmptyState.razor.css (scoped) */
[data-bs-theme="dark"] .empty-state-icon {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .empty-state-title {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .empty-state-message {
    color: var(--text-secondary) !important;
}

/* Server Unavailable */
[data-bs-theme="dark"] .server-unavailable-page {
    background-color: #212529 !important;
}

[data-bs-theme="dark"] .server-unavailable-card {
    background-color: #2b3035 !important;
}

/* Generic white backgrounds override */
[data-bs-theme="dark"] [style*="background: white"],
[data-bs-theme="dark"] [style*="background-color: white"],
[data-bs-theme="dark"] [style*="background:#fff"],
[data-bs-theme="dark"] [style*="background-color:#fff"],
[data-bs-theme="dark"] [style*="background: #fff"],
[data-bs-theme="dark"] [style*="background-color: #fff"] {
    background-color: #2b3035 !important;
}

/* Letter template preview frames */
[data-bs-theme="dark"] .letter-preview-frame,
[data-bs-theme="dark"] .template-preview {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* Document components */
[data-bs-theme="dark"] .document-card,
[data-bs-theme="dark"] .document-item,
[data-bs-theme="dark"] .document-preview {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .document-card:hover,
[data-bs-theme="dark"] .document-item:hover {
    background-color: #343a40 !important;
}

/* Report components */
[data-bs-theme="dark"] .report-card,
[data-bs-theme="dark"] .report-container,
[data-bs-theme="dark"] .report-header {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .report-table {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .report-table thead {
    background-color: #343a40 !important;
}

/* Filter components */
[data-bs-theme="dark"] .filter-panel,
[data-bs-theme="dark"] .filter-container,
[data-bs-theme="dark"] .filters-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .filter-group {
    border-color: #495057 !important;
}

/* Application Card */
[data-bs-theme="dark"] .application-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .application-card:hover {
    border-color: var(--theme-primary) !important;
}

[data-bs-theme="dark"] .application-card .card-header {
    background-color: #343a40 !important;
}

/* Analytics components */
[data-bs-theme="dark"] .analytics-card,
[data-bs-theme="dark"] .chart-container,
[data-bs-theme="dark"] .chart-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* Entity Table */
[data-bs-theme="dark"] .entity-table-container {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .entity-table thead {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .entity-table th {
    color: #f8f9fa !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .entity-table td {
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .entity-table tbody tr:hover {
    background-color: #343a40 !important;
}

/* Blog components */
[data-bs-theme="dark"] .blog-card,
[data-bs-theme="dark"] .author-card,
[data-bs-theme="dark"] .blog-sidebar,
[data-bs-theme="dark"] .comment-form,
[data-bs-theme="dark"] .comment-section,
[data-bs-theme="dark"] .tag-cloud {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* Identity components */
[data-bs-theme="dark"] .user-card,
[data-bs-theme="dark"] .role-card,
[data-bs-theme="dark"] .permission-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .user-toolbar,
[data-bs-theme="dark"] .bulk-actions-toolbar {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

/* ==============================================
   SECTION 33: FSH FORM COMPONENTS
   ============================================== */

/* FSH Form Group */
.fsh-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 100%;
}

/* FSH Form Label */
.fsh-form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
    margin-bottom: 0.25rem;
}

.fsh-form-label.fsh-required::after {
    content: "*";
    color: var(--theme-danger, #ef4444);
    margin-left: 0.25rem;
}

/* FSH Input Wrapper */
.fsh-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.fsh-input-wrapper.fsh-input-with-icon {
    position: relative;
}

.fsh-input-wrapper.fsh-input-with-icon .fsh-input {
    padding-left: 2.5rem;
}

.fsh-input-wrapper.fsh-input-with-suffix .fsh-input {
    padding-right: 2.5rem;
}

/* FSH Input Icon */
.fsh-input-icon {
    position: absolute;
    left: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #9ca3af);
    pointer-events: none;
    z-index: 1;
}

/* FSH Input Suffix */
.fsh-input-suffix {
    position: absolute;
    right: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted, #9ca3af);
    pointer-events: none;
}

/* FSH Input Clear Button */
.fsh-input-clear {
    position: absolute;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    transition: all 0.15s ease;
}

.fsh-input-clear:hover {
    background: var(--bs-tertiary-bg, #f3f4f6);
    color: var(--text-primary, #1f2937);
}

/* FSH Input Base */
.fsh-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--input-text, #1f2937);
    background-color: var(--input-bg, #ffffff);
    background-clip: padding-box;
    border: 1px solid var(--input-border, #d1d5db);
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
}

.fsh-input:focus {
    color: var(--input-text, #1f2937);
    background-color: var(--input-bg, #ffffff);
    border-color: var(--theme-primary, #1ab394);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 26, 179, 148), 0.15);
}

/* FSH Input Placeholder - Light/Faint */
.fsh-input::placeholder {
    color: var(--input-placeholder, #9ca3af);
    opacity: 0.7;
    font-weight: 400;
}

/* FSH Input Disabled & Readonly */
.fsh-input:disabled,
.fsh-input[readonly] {
    background-color: var(--bs-tertiary-bg, #f3f4f6);
    opacity: 0.7;
    cursor: not-allowed;
}

/* FSH Input Sizes */
.fsh-input-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.fsh-input-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    border-radius: 0.375rem;
}

.fsh-input-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
}

.fsh-input-xl {
    padding: 0.875rem 1.125rem;
    font-size: 1.125rem;
    border-radius: 0.625rem;
}

/* FSH Input Validation States */
.fsh-input-valid {
    border-color: var(--theme-success, #10b981) !important;
}

.fsh-input-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.fsh-input-invalid {
    border-color: var(--theme-danger, #ef4444) !important;
}

.fsh-input-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* FSH Validation Message */
.fsh-validation-message {
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.fsh-validation-error {
    color: var(--theme-danger, #ef4444);
}

/* FSH Helper Text */
.fsh-helper-text {
    font-size: 0.8125rem;
    color: var(--text-muted, #6b7280);
    margin-top: 0.25rem;
}

/* ==============================================
   FSH TEXTAREA COMPONENT
   ============================================== */

.fsh-textarea-wrapper {
    position: relative;
}

/* FSH Textarea Base */
.fsh-textarea {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--input-text, #1f2937);
    background-color: var(--input-bg, #ffffff);
    background-clip: padding-box;
    border: 1px solid var(--input-border, #d1d5db);
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
    resize: vertical;
    min-height: 80px;
}

.fsh-textarea:focus {
    color: var(--input-text, #1f2937);
    background-color: var(--input-bg, #ffffff);
    border-color: var(--theme-primary, #1ab394);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 26, 179, 148), 0.15);
}

.fsh-textarea::placeholder {
    color: var(--input-placeholder, #9ca3af);
    opacity: 0.7;
    font-weight: 400;
}

.fsh-textarea:disabled,
.fsh-textarea[readonly] {
    background-color: var(--bs-tertiary-bg, #f3f4f6);
    opacity: 0.7;
    cursor: not-allowed;
}

/* FSH Textarea Auto-resize */
.fsh-textarea-auto {
    resize: none;
    overflow: hidden;
}

/* FSH Textarea Sizes */
.fsh-textarea-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    min-height: 60px;
}

.fsh-textarea-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 100px;
}

/* FSH Textarea Character Count */
.fsh-char-count {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    pointer-events: none;
}

.fsh-char-exceeded {
    color: var(--theme-danger, #ef4444);
}

/* ==============================================
   FSH DATEPICKER COMPONENT
   ============================================== */

.fsh-datepicker-wrapper {
    position: relative;
    width: 100%;
}

.fsh-datepicker-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.fsh-datepicker-input {
    padding-right: 4rem !important;
    cursor: pointer;
}

.fsh-datepicker-trigger {
    cursor: pointer;
}

.fsh-datepicker-icon,
.fsh-datepicker-icon-btn {
    position: absolute;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.fsh-datepicker-icon:hover,
.fsh-datepicker-icon-btn:hover {
    color: var(--theme-primary, #4f46e5);
    background: var(--bg-hover, rgba(0, 0, 0, 0.04));
}

.fsh-datepicker-icon:disabled,
.fsh-datepicker-icon-btn:disabled {
    color: var(--text-muted, #9ca3af);
    cursor: not-allowed;
}

.fsh-datepicker-clear {
    position: absolute;
    right: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--bg-surface-tertiary, #f3f4f6);
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.fsh-datepicker-clear:hover {
    background: var(--border-color, #d1d5db);
    color: var(--text-primary, #1f2937);
}

/* Dropdown */
.fsh-datepicker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    margin-top: 4px;
    min-width: 280px;
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: fshDatepickerSlideIn 0.2s ease-out;
}

.fsh-datepicker-dropdown.dropdown-top {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}

@keyframes fshDatepickerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.fsh-datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-surface-secondary, #f9fafb);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.fsh-datepicker-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.fsh-datepicker-nav:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.06));
    color: var(--text-primary, #1f2937);
}

.fsh-datepicker-title {
    flex: 1;
    text-align: center;
}

.fsh-datepicker-month-btn {
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.fsh-datepicker-month-btn:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.06));
}

/* Calendar */
.fsh-datepicker-calendar {
    padding: 0.75rem;
}

.fsh-datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.5rem;
}

.fsh-datepicker-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #9ca3af);
    padding: 0.25rem;
    text-transform: uppercase;
}

.fsh-datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.fsh-datepicker-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border: none;
    background: transparent;
    color: var(--text-primary, #1f2937);
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.fsh-datepicker-day:hover:not(.disabled):not(.selected) {
    background: var(--bg-hover, rgba(0, 0, 0, 0.06));
}

.fsh-datepicker-day.today {
    font-weight: 600;
    color: var(--theme-primary, #4f46e5);
    background: var(--theme-primary-subtle, rgba(79, 70, 229, 0.1));
}

.fsh-datepicker-day.selected {
    background: var(--theme-primary, #4f46e5) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.fsh-datepicker-day.other-month {
    color: var(--text-muted, #9ca3af);
}

.fsh-datepicker-day.disabled {
    color: var(--text-muted, #d1d5db);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Month Picker */
.fsh-datepicker-month-picker {
    padding: 1rem;
}

.fsh-datepicker-year-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.fsh-datepicker-year-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-surface-tertiary, #f3f4f6);
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.fsh-datepicker-year-nav button:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.08));
    color: var(--text-primary, #1f2937);
}

.fsh-datepicker-year-nav span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    min-width: 60px;
    text-align: center;
}

.fsh-datepicker-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.fsh-datepicker-month {
    padding: 0.625rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-primary, #1f2937);
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.fsh-datepicker-month:hover:not(.selected) {
    background: var(--bg-hover, rgba(0, 0, 0, 0.06));
}

.fsh-datepicker-month.selected {
    background: var(--theme-primary, #4f46e5);
    color: #ffffff;
    font-weight: 500;
}

/* Time Picker */
.fsh-datepicker-time {
    padding: 0.75rem 1rem;
}

.fsh-datepicker-time.time-only {
    padding-top: 1rem;
}

.fsh-datepicker-time-divider {
    height: 1px;
    background: var(--border-color, #e5e7eb);
    margin-bottom: 0.75rem;
}

.fsh-datepicker-time-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.fsh-time-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fsh-time-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.fsh-time-btn:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.06));
    color: var(--text-primary, #1f2937);
}

.fsh-time-input {
    width: 44px;
    height: 40px;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 6px;
    background: var(--input-bg, #ffffff);
    color: var(--input-text, #1f2937);
}

.fsh-time-separator {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    padding: 0 0.125rem;
    margin-top: 24px;
}

.fsh-time-ampm {
    margin-left: 0.5rem;
    margin-top: 24px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 6px;
    background: var(--bg-surface-secondary, #f9fafb);
    color: var(--text-primary, #1f2937);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fsh-time-ampm:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.06));
    border-color: var(--theme-primary, #4f46e5);
}

/* Footer */
.fsh-datepicker-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface-secondary, #f9fafb);
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.fsh-datepicker-today,
.fsh-datepicker-now {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 6px;
    background: var(--bg-surface, #ffffff);
    color: var(--text-primary, #1f2937);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fsh-datepicker-today:hover,
.fsh-datepicker-now:hover {
    border-color: var(--theme-primary, #4f46e5);
    color: var(--theme-primary, #4f46e5);
}

.fsh-datepicker-footer-spacer {
    flex: 1;
}

.fsh-datepicker-ok {
    padding: 0.375rem 1rem;
    border: none;
    border-radius: 6px;
    background: var(--theme-primary, #4f46e5);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.fsh-datepicker-ok:hover {
    background: var(--theme-primary-emphasis, #4338ca);
}

/* ==============================================
   FSH SELECT COMPONENT
   ============================================== */

/* Select Wrapper */
.fsh-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Select Base */
.fsh-select {
    display: block;
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--input-text, #1f2937);
    background-color: var(--input-bg, #ffffff);
    background-clip: padding-box;
    border: 1px solid var(--input-border, #d1d5db);
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
    cursor: pointer;
}

.fsh-select:focus {
    color: var(--input-text, #1f2937);
    background-color: var(--input-bg, #ffffff);
    border-color: var(--theme-primary, #1ab394);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 26, 179, 148), 0.15);
}

.fsh-select:disabled {
    background-color: var(--bs-tertiary-bg, #f3f4f6);
    opacity: 0.7;
    cursor: not-allowed;
}

/* Select Options */
.fsh-select option {
    padding: 0.5rem;
    background-color: var(--input-bg, #ffffff);
    color: var(--input-text, #1f2937);
}

.fsh-select option:disabled {
    color: var(--text-muted, #9ca3af);
    font-style: italic;
}

/* Select Arrow */
.fsh-select-arrow {
    position: absolute;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #9ca3af);
    pointer-events: none;
    transition: transform 0.15s ease;
}

.fsh-select:hover .fsh-select-arrow,
.fsh-select-wrapper:hover .fsh-select-arrow {
    color: var(--text-secondary);
}

.fsh-select:focus ~ .fsh-select-arrow,
.fsh-select-wrapper:has(.fsh-select:focus) .fsh-select-arrow {
    color: var(--theme-primary);
    transform: rotate(180deg);
}

/* Select Clear Button */
.fsh-select-clear {
    position: absolute;
    right: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    transition: all 0.15s ease;
}

.fsh-select-clear:hover {
    background: var(--bs-tertiary-bg, #f3f4f6);
    color: var(--text-primary, #1f2937);
}

/* Select Sizes */
.fsh-select-xs {
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.fsh-select-sm {
    padding: 0.375rem 2.25rem 0.375rem 0.625rem;
    font-size: 0.8125rem;
}

.fsh-select-lg {
    padding: 0.75rem 2.75rem 0.75rem 1rem;
    font-size: 1rem;
}

.fsh-select-xl {
    padding: 0.875rem 3rem 0.875rem 1.125rem;
    font-size: 1.125rem;
}

/* ==============================================
   FSH SEARCHABLE SELECT (Custom Dropdown with Search)
   ============================================== */

.fsh-searchable-select {
    position: relative;
    width: 100%;
}

.fsh-searchable-select.fsh-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.fsh-searchable-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--input-text, #1f2937);
    background-color: var(--input-bg, #ffffff);
    border: 1px solid var(--input-border, #d1d5db);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fsh-searchable-trigger:hover {
    border-color: var(--text-muted);
}

.fsh-searchable-open .fsh-searchable-trigger {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 26, 179, 148), 0.15);
}

.fsh-searchable-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fsh-searchable-placeholder {
    color: var(--input-placeholder, #9ca3af);
}

.fsh-searchable-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.fsh-searchable-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.fsh-searchable-clear:hover {
    background: var(--bs-tertiary-bg, #f3f4f6);
    color: var(--text-primary);
}

.fsh-searchable-arrow {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.fsh-searchable-arrow.fsh-arrow-up {
    transform: rotate(180deg);
}

/* Dropdown Panel */
.fsh-searchable-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    display: flex;
    flex-direction: column;
    animation: dropdownSlideIn 0.15s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fsh-searchable-search {
    position: relative;
    padding: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.fsh-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    font-size: 0.875rem;
    border: 1px solid var(--input-border);
    border-radius: 0.375rem;
    background-color: var(--input-bg);
    color: var(--input-text);
    outline: none;
    transition: all 0.15s ease;
}

.fsh-search-input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb, 26, 179, 148), 0.1);
}

.fsh-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.fsh-searchable-options {
    overflow-y: auto;
    max-height: 240px;
}

.fsh-searchable-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: var(--bs-body-color);
}

.fsh-searchable-option:hover {
    background-color: var(--bg-hover);
}

.fsh-searchable-option.fsh-option-selected {
    background-color: var(--theme-primary-subtle);
    color: var(--theme-primary);
    font-weight: 500;
}

.fsh-option-check {
    font-size: 1rem;
    margin-left: 0.5rem;
}

.fsh-searchable-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==============================================
   FSH NUMERIC COMPONENT
   ============================================== */

/* Numeric Wrapper */
.fsh-numeric-wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.fsh-numeric-wrapper.fsh-numeric-with-buttons {
    border: 1px solid var(--input-border, #d1d5db);
    border-radius: 0.5rem;
    overflow: hidden;
}

.fsh-numeric-wrapper.fsh-numeric-with-buttons .fsh-numeric-input {
    border: none;
    border-radius: 0;
}

/* Numeric Input Wrapper */
.fsh-numeric-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
}

/* Numeric Input */
.fsh-numeric-input {
    text-align: center;
}

/* Numeric Prefix/Suffix */
.fsh-numeric-prefix,
.fsh-numeric-suffix {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted, #6b7280);
    background: var(--bs-tertiary-bg, #f3f4f6);
}

.fsh-numeric-prefix {
    border-right: 1px solid var(--input-border, #d1d5db);
}

.fsh-numeric-suffix {
    border-left: 1px solid var(--input-border, #d1d5db);
}

/* Numeric Buttons */
.fsh-numeric-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    background: var(--bs-tertiary-bg, #f3f4f6);
    border: none;
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    transition: all 0.15s ease;
}

.fsh-numeric-btn:hover:not(:disabled) {
    background: var(--theme-primary-subtle, rgba(26, 179, 148, 0.1));
    color: var(--theme-primary, #1ab394);
}

.fsh-numeric-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fsh-numeric-decrement {
    border-right: 1px solid var(--input-border, #d1d5db);
}

.fsh-numeric-increment {
    border-left: 1px solid var(--input-border, #d1d5db);
}

/* ==============================================
   RADZEN FORM FIELD INTEGRATION
   Fixes for FshTextBox/FshSelect inside RadzenFormField
   ============================================== */

/* Make FshTextBox fill RadzenFormField properly */
.rz-form-field .fsh-form-group,
.rz-form-field .fsh-input-wrapper,
.rz-form-field .fsh-input {
    width: 100% !important;
}

/* Remove extra padding from wrapper inside RadzenFormField */
.rz-form-field .fsh-form-group {
    margin: 0;
    padding: 0;
}

/* Hide FshTextBox label when inside RadzenFormField (RadzenFormField provides label) */
.rz-form-field .fsh-form-label {
    display: none;
}

/* Radzen Form Field with Outlined Variant */
.rz-form-field-variant-outlined .fsh-input {
    border: 1px solid var(--input-border, #d1d5db);
    background-color: var(--input-bg, #ffffff);
    border-radius: 0.375rem;
}

.rz-form-field-variant-outlined .fsh-input:focus {
    border-color: var(--theme-primary, #1ab394);
}

/* ==============================================
   GLOBAL PLACEHOLDER FIX - Light Mode
   Standardize all placeholder colors to be lighter/fainter
   ============================================== */

/* All input placeholders */
input::placeholder,
textarea::placeholder,
.form-control::placeholder,
.rz-textbox::placeholder,
.fsh-input::placeholder {
    color: #b0b7c3 !important;
    opacity: 1 !important;
    font-weight: 400;
}

/* Radzen component placeholders */
.rz-placeholder,
.rz-dropdown .rz-placeholder,
.rz-multiselect .rz-placeholder,
.rz-autocomplete .rz-placeholder {
    color: #b0b7c3 !important;
    opacity: 1 !important;
}

/* ==============================================
   RADZEN INPUT FIXES
   Fix text trimming and width issues
   ============================================== */

/* Ensure Radzen inputs fill their container */
.rz-textbox,
.rz-dropdown,
.rz-numeric,
.rz-datepicker-input,
.rz-autocomplete input {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Fix text overflow in textboxes */
.rz-textbox,
.rz-form-field input,
.rz-form-field .fsh-input {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* When focused, show full text */
.rz-textbox:focus,
.rz-form-field input:focus,
.rz-form-field .fsh-input:focus {
    text-overflow: unset;
    overflow: visible;
}

/* Fix Radzen form field content area */
.rz-form-field-content {
    width: 100% !important;
    display: flex !important;
    flex: 1 1 auto !important;
}

.rz-form-field-content > * {
    flex: 1 1 auto;
    width: 100%;
}

/* ==============================================
   SECTION 33.1: FSH FORM COMPONENTS - DARK MODE
   ============================================== */

[data-bs-theme="dark"] .fsh-form-label {
    color: #e5e7eb !important;
}

[data-bs-theme="dark"] .fsh-input {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .fsh-input:focus {
    background-color: #374151 !important;
    border-color: var(--theme-primary, #1ab394) !important;
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .fsh-input::placeholder {
    color: #6b7280 !important;
    opacity: 0.8 !important;
}

[data-bs-theme="dark"] .fsh-input:disabled,
[data-bs-theme="dark"] .fsh-input[readonly] {
    background-color: #1f2937 !important;
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-input-icon,
[data-bs-theme="dark"] .fsh-input-suffix {
    color: #6b7280 !important;
}

[data-bs-theme="dark"] .fsh-input-clear:hover {
    background: #4b5563 !important;
    color: #e5e7eb !important;
}

[data-bs-theme="dark"] .fsh-helper-text {
    color: #9ca3af !important;
}

/* Dark mode FshTextarea */
[data-bs-theme="dark"] .fsh-textarea {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .fsh-textarea:focus {
    background-color: #374151 !important;
    border-color: var(--theme-primary, #1ab394) !important;
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .fsh-textarea::placeholder {
    color: #6b7280 !important;
    opacity: 0.8 !important;
}

[data-bs-theme="dark"] .fsh-textarea:disabled,
[data-bs-theme="dark"] .fsh-textarea[readonly] {
    background-color: #1f2937 !important;
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-char-count {
    color: #6b7280 !important;
}

/* Dark mode FshSelect */
[data-bs-theme="dark"] .fsh-select {
    background-color: var(--input-bg, var(--bg-surface-tertiary)) !important;
    border-color: var(--input-border, var(--border-color)) !important;
    color: var(--input-text, var(--text-primary)) !important;
}

[data-bs-theme="dark"] .fsh-select:focus {
    background-color: var(--input-bg, var(--bg-surface-tertiary)) !important;
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 26, 179, 148), 0.15);
}

[data-bs-theme="dark"] .fsh-select:disabled {
    background-color: var(--bg-surface-secondary) !important;
    color: var(--text-muted) !important;
    opacity: 0.7;
}

[data-bs-theme="dark"] .fsh-select-arrow {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .fsh-select-clear:hover {
    background: var(--bg-surface-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .fsh-select option {
    background-color: var(--bg-surface-tertiary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .fsh-select option:disabled {
    color: var(--text-muted);
}

/* Dark mode FshSearchableSelect */
[data-bs-theme="dark"] .fsh-searchable-trigger {
    background-color: var(--input-bg, var(--bg-surface-tertiary));
    border-color: var(--input-border, var(--border-color));
    color: var(--input-text, var(--text-primary));
}

[data-bs-theme="dark"] .fsh-searchable-clear:hover {
    background: var(--bg-surface-tertiary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .fsh-searchable-dropdown {
    background: var(--bg-surface);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .fsh-searchable-search {
    border-bottom-color: var(--border-color);
}

[data-bs-theme="dark"] .fsh-search-input {
    background-color: var(--bg-surface-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .fsh-search-input::placeholder {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .fsh-searchable-option {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .fsh-searchable-option:hover {
    background-color: var(--bg-hover, var(--bg-surface-tertiary));
}

[data-bs-theme="dark"] .fsh-searchable-option.fsh-option-selected {
    background-color: var(--theme-primary-subtle);
}

/* Dark mode FshDatePicker */
[data-bs-theme="dark"] .fsh-datepicker-dropdown {
    background: var(--bg-surface, #2b3035);
    border-color: var(--border-color, #495057);
}

[data-bs-theme="dark"] .fsh-datepicker-header {
    background: var(--bg-surface-secondary, #343a40);
    border-bottom-color: var(--border-color, #495057);
}

[data-bs-theme="dark"] .fsh-datepicker-nav:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .fsh-datepicker-month-btn {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .fsh-datepicker-month-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .fsh-datepicker-weekday {
    color: var(--text-muted, #6b7280);
}

[data-bs-theme="dark"] .fsh-datepicker-day {
    color: var(--text-primary, #e5e7eb);
}

[data-bs-theme="dark"] .fsh-datepicker-day:hover:not(.disabled):not(.selected) {
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .fsh-datepicker-day.today {
    color: var(--theme-primary, #4f46e5);
    background: rgba(79, 70, 229, 0.2);
}

[data-bs-theme="dark"] .fsh-datepicker-day.other-month {
    color: var(--text-muted, #6b7280);
}

[data-bs-theme="dark"] .fsh-datepicker-year-nav button {
    background: var(--bg-surface-tertiary, #374151);
    color: var(--text-secondary, #9ca3af);
}

[data-bs-theme="dark"] .fsh-datepicker-year-nav button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .fsh-datepicker-year-nav span {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .fsh-datepicker-month {
    color: var(--text-primary, #e5e7eb);
}

[data-bs-theme="dark"] .fsh-datepicker-month:hover:not(.selected) {
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .fsh-datepicker-time-divider {
    background: var(--border-color, #495057);
}

[data-bs-theme="dark"] .fsh-time-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .fsh-time-input {
    background: var(--input-bg, #374151);
    border-color: var(--input-border, #4b5563);
    color: var(--input-text, #f3f4f6);
}

[data-bs-theme="dark"] .fsh-time-separator {
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .fsh-time-ampm {
    background: var(--bg-surface-secondary, #343a40);
    border-color: var(--border-color, #4b5563);
    color: var(--text-primary, #f1f5f9);
}

[data-bs-theme="dark"] .fsh-time-ampm:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .fsh-datepicker-footer {
    background: var(--bg-surface-secondary, #343a40);
    border-top-color: var(--border-color, #495057);
}

[data-bs-theme="dark"] .fsh-datepicker-today,
[data-bs-theme="dark"] .fsh-datepicker-now {
    background: var(--bg-surface, #2b3035);
    border-color: var(--border-color, #4b5563);
    color: var(--text-primary, #e5e7eb);
}

[data-bs-theme="dark"] .fsh-datepicker-today:hover,
[data-bs-theme="dark"] .fsh-datepicker-now:hover {
    border-color: var(--theme-primary, #4f46e5);
    color: var(--theme-primary, #4f46e5);
}

[data-bs-theme="dark"] .fsh-datepicker-icon,
[data-bs-theme="dark"] .fsh-datepicker-icon-btn {
    color: var(--text-secondary, #9ca3af);
}

[data-bs-theme="dark"] .fsh-datepicker-icon:hover,
[data-bs-theme="dark"] .fsh-datepicker-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--theme-primary, #4f46e5);
}

[data-bs-theme="dark"] .fsh-datepicker-clear {
    background: var(--bg-surface-tertiary, #374151);
    color: var(--text-secondary, #9ca3af);
}

[data-bs-theme="dark"] .fsh-datepicker-clear:hover {
    background: var(--border-color, #4b5563);
    color: var(--text-primary, #f1f5f9);
}

/* Dark mode FshDatePicker input wrapper and input */
[data-bs-theme="dark"] .fsh-datepicker-input-wrapper {
    background: var(--input-bg, #374151);
    border-color: var(--input-border, #4b5563);
}

[data-bs-theme="dark"] .fsh-datepicker-input,
[data-bs-theme="dark"] .fsh-input.fsh-datepicker-input {
    background-color: var(--input-bg, #374151) !important;
    border-color: var(--input-border, #4b5563) !important;
    color: var(--input-text, #f3f4f6) !important;
}

[data-bs-theme="dark"] .fsh-datepicker-input:focus,
[data-bs-theme="dark"] .fsh-input.fsh-datepicker-input:focus {
    background-color: var(--input-bg, #374151) !important;
    border-color: var(--theme-primary, #1ab394) !important;
}

/* Dark mode FshNumeric */
[data-bs-theme="dark"] .fsh-numeric-wrapper.fsh-numeric-with-buttons {
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-numeric-prefix,
[data-bs-theme="dark"] .fsh-numeric-suffix {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-numeric-btn {
    background: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-numeric-btn:hover:not(:disabled) {
    background: rgba(26, 179, 148, 0.2) !important;
    color: var(--theme-primary, #1ab394) !important;
}

/* Dark mode placeholder colors */
[data-bs-theme="dark"] input::placeholder,
[data-bs-theme="dark"] textarea::placeholder,
[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .rz-textbox::placeholder,
[data-bs-theme="dark"] .fsh-input::placeholder {
    color: #6b7280 !important;
    opacity: 0.9 !important;
}

[data-bs-theme="dark"] .rz-placeholder,
[data-bs-theme="dark"] .rz-dropdown .rz-placeholder {
    color: #6b7280 !important;
}

/* Dark mode Radzen form field inputs */
[data-bs-theme="dark"] .rz-form-field .fsh-input,
[data-bs-theme="dark"] .rz-form-field input:not([type="checkbox"]):not([type="radio"]),
[data-bs-theme="dark"] .rz-form-field textarea {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .rz-form-field .fsh-input:focus,
[data-bs-theme="dark"] .rz-form-field input:focus,
[data-bs-theme="dark"] .rz-form-field textarea:focus {
    background-color: #374151 !important;
    border-color: var(--theme-primary, #1ab394) !important;
}

/* Dark mode settings sections (Company Settings specific) */
[data-bs-theme="dark"] .settings-section {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .settings-section:hover {
    border-color: var(--theme-primary, #1ab394) !important;
}

[data-bs-theme="dark"] .section-header {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .section-header h6 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .section-body {
    background-color: #2b3035 !important;
}

/* Dark mode toggle items */
[data-bs-theme="dark"] .toggle-item {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .toggle-item:hover {
    background-color: #3d444b !important;
}

[data-bs-theme="dark"] .toggle-label {
    color: #e5e7eb !important;
}

/* Dark mode SMTP provider cards */
[data-bs-theme="dark"] .smtp-provider {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .smtp-provider:hover {
    background-color: #3d444b !important;
}

[data-bs-theme="dark"] .smtp-provider strong {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .smtp-provider small {
    color: #9ca3af !important;
}

/* Dark mode Radzen dropdown comprehensive styles */
[data-bs-theme="dark"] .rz-dropdown {
    background-color: var(--input-bg, var(--bg-surface-tertiary)) !important;
    border-color: var(--input-border, var(--border-color)) !important;
    color: var(--input-text, var(--text-primary)) !important;
}

[data-bs-theme="dark"] .rz-dropdown:hover {
    border-color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .rz-dropdown.rz-state-focused {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 26, 179, 148), 0.15) !important;
}

[data-bs-theme="dark"] .rz-dropdown .rz-dropdown-label,
[data-bs-theme="dark"] .rz-dropdown span:not(.rz-placeholder),
[data-bs-theme="dark"] .rz-dropdown .rz-inputtext {
    color: var(--input-text, var(--text-primary)) !important;
    -webkit-text-fill-color: var(--input-text, var(--text-primary)) !important;
}

[data-bs-theme="dark"] .rz-dropdown .rz-dropdown-trigger {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .rz-dropdown-panel {
    background-color: var(--bg-surface, var(--bs-body-bg)) !important;
    border-color: var(--border-color, var(--bs-border-color)) !important;
    box-shadow: var(--shadow-lg) !important;
}

[data-bs-theme="dark"] .rz-dropdown-item {
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .rz-dropdown-item:hover {
    background-color: var(--bg-hover, var(--bg-surface-tertiary)) !important;
}

/* Dropdown filter search input */
[data-bs-theme="dark"] .rz-dropdown-filter-input,
[data-bs-theme="dark"] .rz-dropdown-panel .rz-textbox {
    background-color: var(--bg-surface-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-bs-theme="dark"] .rz-dropdown-filter-input::placeholder,
[data-bs-theme="dark"] .rz-dropdown-panel .rz-textbox::placeholder {
    color: var(--text-muted) !important;
}

[data-bs-theme="dark"] .rz-dropdown-item.rz-state-highlight {
    background-color: var(--theme-primary, #1ab394) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .rz-dropdown-filter {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #f3f4f6 !important;
}

/* Dark mode Radzen multiselect */
[data-bs-theme="dark"] .rz-multiselect {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .rz-multiselect .rz-multiselect-label {
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .rz-multiselect-chip {
    background-color: #4b5563 !important;
    color: #e5e7eb !important;
}

/* Dark mode Radzen numeric */
[data-bs-theme="dark"] .rz-spinner {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .rz-spinner input {
    background-color: #374151 !important;
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .rz-spinner-button {
    background-color: #4b5563 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .rz-spinner-button:hover {
    background-color: #6b7280 !important;
}

/* ==============================================
   SECTION 34: FSH FLOATING LABEL FIELD
   Replaces RadzenFormField with native styling
   ============================================== */

/* Field Container */
.fsh-field {
    position: relative;
    width: 100%;
    margin-bottom: 0;
}

/* Field Wrapper - the bordered container */
.fsh-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    overflow: hidden;
}

.fsh-field-wrapper:hover {
    border-color: #9ca3af;
}

.fsh-field:focus-within .fsh-field-wrapper,
.fsh-field-active .fsh-field-wrapper {
    border-color: var(--theme-primary, #1ab394);
    box-shadow: 0 0 0 3px rgba(26, 179, 148, 0.1);
}

.fsh-field-disabled .fsh-field-wrapper {
    background-color: #f3f4f6;
    opacity: 0.7;
    cursor: not-allowed;
}

/* Field Icon */
.fsh-field-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    height: 100%;
    color: #6b7280;
    font-size: 1.125rem;
}

.fsh-field-active .fsh-field-icon,
.fsh-field:focus-within .fsh-field-icon {
    color: var(--theme-primary, #1ab394);
}

/* Field Content - contains input and label */
.fsh-field-content {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 56px;
    padding: 0 0.875rem;
}

.fsh-field-wrapper:has(.fsh-field-icon) .fsh-field-content {
    padding-left: 0;
}

/* Field Input */
.fsh-field-input {
    width: 100%;
    padding: 1.25rem 0 0.5rem 0;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: #1f2937;
    background: transparent;
    border: none;
    outline: none;
    appearance: none;
}

.fsh-field-input::placeholder {
    color: #9ca3af;
    opacity: 0.7;
}

.fsh-field-input:disabled {
    cursor: not-allowed;
}

/* Field Label (floating) */
.fsh-field-label {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 0.9375rem;
    font-weight: 400;
    color: #6b7280;
    pointer-events: none;
    transition: all 0.2s ease;
    transform-origin: left top;
}

/* Label floats up when active (has value) — subtle muted color */
.fsh-field-active .fsh-field-label {
    top: 0.625rem;
    transform: translateY(0);
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
}

/* Label floats up when focused — accent color for the active field only */
.fsh-field:focus-within .fsh-field-label {
    top: 0.625rem;
    transform: translateY(0);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--theme-primary, #1ab394);
}

/* Required indicator */
.fsh-field-label.fsh-required::after {
    content: " *";
    color: #ef4444;
}

/* Field Suffix/Prefix inline */
.fsh-field-prefix,
.fsh-field-suffix-inline {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
}

.fsh-field-prefix {
    margin-right: 0.25rem;
}

.fsh-field-suffix-inline {
    margin-left: 0.25rem;
}

/* Field Suffix (at end of wrapper) */
.fsh-field-suffix {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Field End Content (for buttons etc.) */
.fsh-field-end {
    display: flex;
    align-items: center;
    padding-right: 0.5rem;
}

/* Field Clear Button */
.fsh-field-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-right: 0.5rem;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fsh-field-clear:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Field Buttons (for numeric) */
.fsh-field-buttons {
    display: flex;
    border-left: 1px solid #d1d5db;
}

.fsh-field-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 100%;
    min-height: 54px;
    background: #f9fafb;
    border: none;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fsh-field-btn:first-child {
    border-right: 1px solid #d1d5db;
}

.fsh-field-btn:hover:not(:disabled) {
    background: #f3f4f6;
    color: var(--theme-primary, #1ab394);
}

.fsh-field-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Field Select Arrow */
.fsh-field-select-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    color: #6b7280;
    pointer-events: none;
}

/* Select input specific */
.fsh-field-select-input {
    cursor: pointer;
    padding-right: 2rem;
}

/* Field Error Message */
.fsh-field-error {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: #ef4444;
}

/* Field Helper Text */
.fsh-field-helper {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Validation States */
.fsh-field-valid .fsh-field-wrapper {
    border-color: #10b981;
}

.fsh-field-valid:focus-within .fsh-field-wrapper {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.fsh-field-invalid .fsh-field-wrapper {
    border-color: #ef4444;
}

.fsh-field-invalid:focus-within .fsh-field-wrapper {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ==============================================
   SECTION 34.1: FSH FLOATING LABEL - DARK MODE
   ============================================== */

[data-bs-theme="dark"] .fsh-field-wrapper {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-field-wrapper:hover {
    border-color: #6b7280 !important;
}

[data-bs-theme="dark"] .fsh-field:focus-within .fsh-field-wrapper,
[data-bs-theme="dark"] .fsh-field-active .fsh-field-wrapper {
    border-color: var(--theme-primary, #1ab394) !important;
    box-shadow: 0 0 0 3px rgba(26, 179, 148, 0.15) !important;
}

[data-bs-theme="dark"] .fsh-field-disabled .fsh-field-wrapper {
    background-color: #1f2937 !important;
}

[data-bs-theme="dark"] .fsh-field-icon {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-field-active .fsh-field-icon,
[data-bs-theme="dark"] .fsh-field:focus-within .fsh-field-icon {
    color: var(--theme-primary, #1ab394) !important;
}

[data-bs-theme="dark"] .fsh-field-input {
    color: #f3f4f6 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .fsh-field-input::placeholder {
    color: #6b7280 !important;
}

[data-bs-theme="dark"] .fsh-field-label {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-field-active .fsh-field-label {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-field:focus-within .fsh-field-label {
    color: var(--theme-primary, #1ab394) !important;
}

[data-bs-theme="dark"] .fsh-field-prefix,
[data-bs-theme="dark"] .fsh-field-suffix-inline,
[data-bs-theme="dark"] .fsh-field-suffix {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-field-clear {
    background: #4b5563 !important;
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-field-clear:hover {
    background: #6b7280 !important;
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .fsh-field-buttons {
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-field-btn {
    background: #4b5563 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-field-btn:hover:not(:disabled) {
    background: #6b7280 !important;
    color: var(--theme-primary, #1ab394) !important;
}

[data-bs-theme="dark"] .fsh-field-select-arrow {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-field-helper {
    color: #9ca3af !important;
}

/* Dark mode select options */
[data-bs-theme="dark"] .fsh-field-select-input option {
    background-color: #374151 !important;
    color: #f3f4f6 !important;
}

/* ==============================================
   SECTION 34.2: RADZEN DATE PICKER IN FSH FIELD
   ============================================== */

/* RadzenDatePicker inside fsh-field-wrapper */
.fsh-field-wrapper .rz-datepicker {
    width: 100%;
    background: transparent;
}

.fsh-field-wrapper .rz-datepicker-input {
    background: transparent !important;
    border: none !important;
    padding: 1.25rem 0 0.5rem 0 !important;
    font-size: 0.9375rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #1f2937 !important;
    box-shadow: none !important;
    outline: none !important;
    height: auto !important;
    min-height: auto !important;
}

.fsh-field-wrapper .rz-datepicker-trigger {
    background: transparent !important;
    border: none !important;
    color: #6b7280 !important;
    padding: 0 !important;
    margin-right: 0.5rem !important;
    min-width: auto !important;
    width: auto !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fsh-field-wrapper .rz-datepicker-trigger .rzi {
    font-size: 1rem !important;
}

.fsh-field-wrapper .rz-datepicker-trigger:hover {
    color: var(--theme-primary, #1ab394) !important;
    background: transparent !important;
}

/* Dark mode: RadzenDatePicker in fsh-field */
[data-bs-theme="dark"] .fsh-field-wrapper .rz-datepicker-input {
    color: #f3f4f6 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .fsh-field-wrapper .rz-datepicker-input::placeholder {
    color: #6b7280 !important;
}

[data-bs-theme="dark"] .fsh-field-wrapper .rz-datepicker-trigger {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-field-wrapper .rz-datepicker-trigger:hover {
    color: var(--theme-primary, #1ab394) !important;
}

/* Fix RadzenDatePicker internal container - remove nested box styling */
.fsh-field-wrapper .rz-datepicker {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
}

/* Ensure the datepicker input wrapper takes remaining space */
.fsh-field-wrapper .rz-datepicker > span:first-child {
    flex: 1 !important;
    min-width: 0 !important;
}

.fsh-field-wrapper .rz-datepicker .rz-inputtext {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1.25rem 0 0.5rem 0 !important;
    font-size: 0.9375rem !important;
    color: #1f2937 !important;
    height: auto !important;
    min-height: auto !important;
}

.fsh-field-wrapper .rz-datepicker .rz-calendar-inline {
    border: none !important;
    box-shadow: none !important;
}

/* Remove any internal wrapper styling from RadzenDatePicker */
.fsh-field-wrapper .rz-datepicker > .rz-helper-text,
.fsh-field-wrapper .rz-datepicker > .rz-message {
    display: none !important;
}

/* Dark mode: RadzenDatePicker internal elements */
[data-bs-theme="dark"] .fsh-field-wrapper .rz-datepicker .rz-inputtext {
    color: #f3f4f6 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .fsh-field-wrapper .rz-datepicker .rz-inputtext::placeholder {
    color: #6b7280 !important;
}

/* ==============================================
   SECTION 34.3: MODERN FILE UPLOAD - DARK MODE
   ============================================== */

/* File Upload Component - Dark Mode Text Visibility */
[data-bs-theme="dark"] .modern-file-upload .upload-area {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%) !important;
    border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .modern-file-upload .upload-area:hover {
    border-color: var(--theme-primary, #1ab394) !important;
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%) !important;
}

[data-bs-theme="dark"] .modern-file-upload .upload-title,
[data-bs-theme="dark"] .modern-file-upload h6 {
    color: #f3f4f6 !important;
}

[data-bs-theme="dark"] .modern-file-upload .upload-description,
[data-bs-theme="dark"] .modern-file-upload p {
    color: #d1d5db !important;
}

/* Critical: Make small text and hints visible in dark mode */
[data-bs-theme="dark"] .modern-file-upload small,
[data-bs-theme="dark"] .modern-file-upload .text-muted,
[data-bs-theme="dark"] .modern-file-upload small.text-muted,
[data-bs-theme="dark"] .modern-file-upload .upload-hint {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .modern-file-upload .upload-content small,
[data-bs-theme="dark"] .modern-file-upload .upload-content .upload-hint {
    color: #9ca3af !important;
}

/* Light mode hint text */
.modern-file-upload .upload-hint {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* File preview in dark mode */
[data-bs-theme="dark"] .modern-file-upload .file-preview {
    background: #1f2937 !important;
    border: 1px solid #374151 !important;
}

[data-bs-theme="dark"] .modern-file-upload .file-name {
    color: #f3f4f6 !important;
}

/* Upload icon in dark mode */
[data-bs-theme="dark"] .modern-file-upload .upload-icon i {
    color: var(--theme-primary, #1ab394) !important;
}

/* ==============================================
   SECTION 35: FSH SPLIT BUTTON - DARK MODE
   ============================================== */

/* FshSplitButton dropdown menu - dark mode */
[data-bs-theme="dark"] .fsh-split-btn-menu {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Menu items text color in dark mode */
[data-bs-theme="dark"] .fsh-split-btn-menu .fsh-menu-item {
    color: #e2e8f0 !important;
}

/* Menu item icon color in dark mode */
[data-bs-theme="dark"] .fsh-split-btn-menu .fsh-menu-item i {
    color: #94a3b8 !important;
}

/* Menu item hover state in dark mode */
[data-bs-theme="dark"] .fsh-split-btn-menu .fsh-menu-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Menu item hover icon color */
[data-bs-theme="dark"] .fsh-split-btn-menu .fsh-menu-item:hover i {
    color: var(--theme-primary, #1ab394) !important;
}

/* Separator line in dark mode */
[data-bs-theme="dark"] .fsh-split-btn-menu > div[style*="background: linear-gradient"] {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent) !important;
}

/* Empty state text in dark mode */
[data-bs-theme="dark"] .fsh-split-btn-menu > div[style*="color: #94a3b8"] {
    color: #64748b !important;
}

/* ==============================================
   SECTION 36: UPGRADE SUBSCRIPTION MODAL - DARK MODE
   ============================================== */

/* Main container in Radzen dialog */
[data-bs-theme="dark"] .upgrade-subscription-modal {
    background: #1e293b !important;
}

/* Tenant info card */
[data-bs-theme="dark"] .upgrade-subscription-modal .tenant-info-card {
    background: #2d3748 !important;
}

/* Info row borders */
[data-bs-theme="dark"] .upgrade-subscription-modal .info-row + .info-row {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* Info values */
[data-bs-theme="dark"] .upgrade-subscription-modal .info-value {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .upgrade-subscription-modal .info-label {
    color: #94a3b8 !important;
}

/* Section title */
[data-bs-theme="dark"] .upgrade-subscription-modal .section-title {
    color: #e2e8f0 !important;
}

/* Quick options */
[data-bs-theme="dark"] .upgrade-subscription-modal .quick-option {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .upgrade-subscription-modal .quick-option:hover {
    background: #374151 !important;
    border-color: #6b7280 !important;
}

[data-bs-theme="dark"] .upgrade-subscription-modal .quick-option.selected {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: #667eea !important;
}

[data-bs-theme="dark"] .upgrade-subscription-modal .option-duration {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .upgrade-subscription-modal .quick-option.selected .option-duration {
    color: #a5b4fc !important;
}

[data-bs-theme="dark"] .upgrade-subscription-modal .option-date {
    color: #9ca3af !important;
}

/* Custom date section */
[data-bs-theme="dark"] .upgrade-subscription-modal .custom-date-section {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .upgrade-subscription-modal .form-label {
    color: #d1d5db !important;
}

/* Modal footer section */
[data-bs-theme="dark"] .upgrade-subscription-modal .modal-footer-section {
    background: #1a202c !important;
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* Modal body section */
[data-bs-theme="dark"] .upgrade-subscription-modal .modal-body-section {
    background: #1e293b !important;
}

/* ==============================================
   SECTION 37: TENANT OVERVIEW PAGE - DARK MODE
   ============================================== */

/* Tenant Overview Page Container */
[data-bs-theme="dark"] .tenant-overview-page {
    background: var(--bg-body, #111827) !important;
}

/* Header Section */
[data-bs-theme="dark"] .overview-header {
    background: var(--bg-surface, #1e293b) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .tenant-name {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .tenant-id {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .tenant-status.active {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
}

[data-bs-theme="dark"] .tenant-status.inactive {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}

/* Back button in dark mode */
[data-bs-theme="dark"] .btn-back {
    color: #94a3b8 !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .btn-back:hover {
    color: #f1f5f9 !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Custom Navigation Tabs (TenantOverview specific) */
[data-bs-theme="dark"] .tenant-overview-page .nav-tabs {
    background: var(--bg-surface, #1e293b) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .tenant-overview-page .nav-tab {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .nav-tab:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .tenant-overview-page .nav-tab.active {
    background: var(--theme-primary, #1ab394) !important;
    color: white !important;
}

[data-bs-theme="dark"] .stat-value {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .stat-label {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .stat-icon.users {
    background: rgba(26, 179, 148, 0.15) !important;
    color: #2dd4a8 !important;
}

[data-bs-theme="dark"] .stat-icon.revenue {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
}

[data-bs-theme="dark"] .stat-icon.storage {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .stat-icon.api {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

/* Info Items */
[data-bs-theme="dark"] .info-item {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .info-label {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .info-value {
    color: #f1f5f9 !important;
}

/* Loading Container */
[data-bs-theme="dark"] .loading-container {
    background: var(--bg-surface, #1e293b) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .loading-text {
    color: #94a3b8 !important;
}

/* Content Container */
[data-bs-theme="dark"] .content-container {
    background: transparent !important;
}

/* ==============================================
   SECTION 37: PRINT STYLES
   ============================================== */

@media print {
    body {
        background-color: #fff !important;
        color: #000 !important;
    }

    .card {
        background-color: #fff !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* ==============================================
   SECTION 38: THEME-AWARE COMPONENT FIXES
   Uses CSS variables for automatic theme switching
   Removed conflicting :root overrides - 2026-01-25
   ============================================== */

/* -----------------------------------------
   PART A: HEADER ACTION ITEMS
   Prevent theme toggle collapsing into sidenav
   ----------------------------------------- */

.header-action-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-action-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
}

.header-action-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* Theme toggle specific */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

/* -----------------------------------------
   PART B: BUTTON TEXT VISIBILITY
   Ensure button text is always visible
   ----------------------------------------- */

/* FshButton primary variant - ensure visible text */
.fsh-btn.fsh-btn-primary,
.btn-primary,
button.rz-button.rz-primary {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #ffffff !important;
}

.fsh-btn.fsh-btn-primary:hover,
.btn-primary:hover,
button.rz-button.rz-primary:hover {
    background-color: var(--theme-primary-hover) !important;
    border-color: var(--theme-primary-hover) !important;
    color: #ffffff !important;
}

.fsh-btn.fsh-btn-primary:disabled,
.btn-primary:disabled,
button.rz-button.rz-primary:disabled {
    opacity: 0.65;
    color: #ffffff !important;
}

/* FshButton success variant */
.fsh-btn.fsh-btn-success {
    background-color: var(--theme-success) !important;
    border-color: var(--theme-success) !important;
    color: #ffffff !important;
}

.fsh-btn.fsh-btn-success:hover {
    filter: brightness(0.9);
    color: #ffffff !important;
}

/* ==============================================
   SECTION: COMPREHENSIVE DARK MODE OVERRIDES
   This section provides definitive dark mode styling
   for all page components. Loads LAST for highest priority.
   ============================================== */

/* --- Page Header (list pages) --- */
[data-bs-theme="dark"] .page-header {
    background: var(--bg-surface, #2b3035) !important;
    border-color: var(--border-color, #495057) !important;
}

[data-bs-theme="dark"] .page-header h1,
[data-bs-theme="dark"] .page-header h2,
[data-bs-theme="dark"] .page-header h3,
[data-bs-theme="dark"] .page-header .page-title {
    color: var(--text-primary, #dee2e6) !important;
}

[data-bs-theme="dark"] .page-header p,
[data-bs-theme="dark"] .page-header small {
    color: var(--text-secondary, #adb5bd) !important;
}

[data-bs-theme="dark"] .header-title-section,
[data-bs-theme="dark"] .title-icon {
    color: var(--text-primary, #dee2e6);
}

[data-bs-theme="dark"] .title-icon {
    background: color-mix(in srgb, var(--theme-primary, #1ab394) 15%, transparent) !important;
    color: var(--theme-primary, #1ab394) !important;
}

/* --- Content Area --- */
[data-bs-theme="dark"] .content-area {
    background: transparent !important;
}

/* --- Page Header --- */
[data-bs-theme="dark"] .page-header {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* --- Search Filter Bar --- */
[data-bs-theme="dark"] .search-filter-bar {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* --- Filter Pills --- */
[data-bs-theme="dark"] .filter-pill {
    background: var(--bg-surface-tertiary, #1a1d21) !important;
    border-color: var(--border-color, #495057) !important;
    color: var(--text-secondary, #adb5bd) !important;
}

[data-bs-theme="dark"] .filter-pill:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary, #dee2e6) !important;
}

[data-bs-theme="dark"] .filter-pill.active {
    background: var(--theme-primary, #1ab394) !important;
    color: #ffffff !important;
    border-color: var(--theme-primary, #1ab394) !important;
}

[data-bs-theme="dark"] .filter-pill.active.success {
    background: var(--theme-success, #10b981) !important;
    border-color: var(--theme-success, #10b981) !important;
}

[data-bs-theme="dark"] .filter-pill.active.warning {
    background: var(--theme-warning, #f59e0b) !important;
    border-color: var(--theme-warning, #f59e0b) !important;
}

[data-bs-theme="dark"] .filter-pill.active.secondary {
    background: var(--bs-secondary, #6c757d) !important;
    border-color: var(--bs-secondary, #6c757d) !important;
}

/* --- Search Input --- */
[data-bs-theme="dark"] .search-input-wrapper {
    background: var(--bg-surface-tertiary, #1a1d21) !important;
    border-color: var(--border-color, #495057) !important;
}

[data-bs-theme="dark"] .search-input {
    background: var(--bg-surface-tertiary, #1a1d21) !important;
    border-color: var(--border-color, #495057) !important;
    color: var(--text-primary, #dee2e6) !important;
}

[data-bs-theme="dark"] .search-input::placeholder {
    color: var(--text-muted, #6c757d) !important;
}

[data-bs-theme="dark"] .search-icon {
    color: var(--text-muted, #6c757d) !important;
}

/* --- View Toggle (Grid/Table) --- */
[data-bs-theme="dark"] .view-toggle {
    background: var(--bg-surface-tertiary, #1a1d21) !important;
    border-color: var(--border-color, #495057) !important;
}

[data-bs-theme="dark"] .view-btn {
    background: var(--bg-surface-tertiary, #1a1d21) !important;
    border-color: var(--border-color, #495057) !important;
    color: var(--text-muted, #6c757d) !important;
}

[data-bs-theme="dark"] .view-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary, #dee2e6) !important;
}

[data-bs-theme="dark"] .view-btn.active {
    background: var(--theme-primary, #1ab394) !important;
    color: #ffffff !important;
}

/* --- Vacancy Cards --- */
[data-bs-theme="dark"] .vacancy-card {
    background: var(--bg-surface, #2b3035) !important;
    border-color: var(--border-color, #495057) !important;
}

[data-bs-theme="dark"] .vacancy-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .vacancy-card.selected {
    border-color: var(--theme-primary, #1ab394) !important;
}

[data-bs-theme="dark"] .vacancy-name {
    color: var(--text-primary, #dee2e6) !important;
}

[data-bs-theme="dark"] .vacancy-description {
    color: var(--text-secondary, #adb5bd) !important;
}

/* --- Table Container --- */
[data-bs-theme="dark"] .table-container {
    background: var(--bg-surface, #2b3035) !important;
    border-color: var(--border-color, #495057) !important;
}

/* --- Results Summary --- */
[data-bs-theme="dark"] .results-summary {
    color: var(--text-secondary, #adb5bd) !important;
}

[data-bs-theme="dark"] .results-summary .search-term {
    color: var(--theme-primary, #1ab394) !important;
}

[data-bs-theme="dark"] .btn-clear-filters {
    color: var(--text-secondary, #adb5bd) !important;
}

[data-bs-theme="dark"] .btn-clear-filters:hover {
    color: var(--theme-primary, #1ab394) !important;
}

/* --- Page Containers --- */
[data-bs-theme="dark"] .vacancy-list-page,
[data-bs-theme="dark"] .applications-hub {
    background: transparent !important;
}

/* Container backgrounds - ensure they're transparent in dark mode */
[data-bs-theme="dark"] .container-fluid {
    background: transparent;
}

/* Card components used in page headers */
[data-bs-theme="dark"] .card-header {
    background: #1a1d21 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .card-body {
    background: #2b3035 !important;
}

[data-bs-theme="dark"] .card-footer {
    background: #1a1d21 !important;
    border-color: #495057 !important;
}

/* Card action buttons */
[data-bs-theme="dark"] .card-action-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-secondary, #adb5bd) !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .card-action-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary, #dee2e6) !important;
}

/* Selection count badge */
[data-bs-theme="dark"] .selection-count {
    color: var(--text-secondary, #adb5bd) !important;
}

/* Bulk actions */
[data-bs-theme="dark"] .bulk-actions {
    color: var(--text-secondary, #adb5bd) !important;
}

/* ==============================================
   UNIFIED PAGE LAYOUT DARK MODE OVERRIDES
   ==============================================
   High-specificity rules to ensure dark mode works
   across all standardized page layout patterns.
   These rules should be at the END of the file
   to ensure they override any earlier declarations.
   ============================================== */

/* --- Standard Page Containers --- */
[data-bs-theme="dark"] .page-header,
[data-bs-theme="dark"] .hub-header,
[data-bs-theme="dark"] .dashboard-header {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

/* --- Search & Filter Bars --- */
[data-bs-theme="dark"] .search-filter-bar,
[data-bs-theme="dark"] .filter-card,
[data-bs-theme="dark"] .navigation-bar {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

/* --- Content Areas --- */
[data-bs-theme="dark"] .content-area,
[data-bs-theme="dark"] .tab-content-area,
[data-bs-theme="dark"] .vacancy-list-page,
[data-bs-theme="dark"] .applications-hub {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

/* --- Stats Cards (StatsCard component) --- */
[data-bs-theme="dark"] .stats-card,
[data-bs-theme="dark"] .stats-grid .rz-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .stats-value,
[data-bs-theme="dark"] .stats-label,
[data-bs-theme="dark"] .stats-sublabel {
    color: #dee2e6 !important;
}

/* --- Empty States (EmptyState component) --- */
[data-bs-theme="dark"] .empty-state,
[data-bs-theme="dark"] .empty-state.rz-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .empty-title {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .empty-message {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .empty-icon {
    color: #adb5bd !important;
}

/* --- RadzenCard / RecruiterCard --- */
[data-bs-theme="dark"] .rz-card,
[data-bs-theme="dark"] .recruiter-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

/* --- Result Grids --- */
[data-bs-theme="dark"] .vacancy-grid,
[data-bs-theme="dark"] .admissions-grid,
[data-bs-theme="dark"] .applications-grid,
[data-bs-theme="dark"] .reports-grid,
[data-bs-theme="dark"] .offers-grid,
[data-bs-theme="dark"] .results-grid,
[data-bs-theme="dark"] .drafts-grid,
[data-bs-theme="dark"] .finished-grid {
    background-color: transparent !important;
}

/* --- Text Colors Inside Containers --- */
[data-bs-theme="dark"] .page-header h1,
[data-bs-theme="dark"] .page-header h2,
[data-bs-theme="dark"] .hub-header h1,
[data-bs-theme="dark"] .dashboard-header h1,
[data-bs-theme="dark"] .header-title-section h1 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .page-header p,
[data-bs-theme="dark"] .hub-header p,
[data-bs-theme="dark"] .dashboard-header p,
[data-bs-theme="dark"] .header-title-section p {
    color: #adb5bd !important;
}

/* --- Title Icons --- */
[data-bs-theme="dark"] .title-icon,
[data-bs-theme="dark"] .header-icon {
    background: color-mix(in srgb, var(--theme-primary, #1ab394) 15%, transparent) !important;
    color: var(--theme-primary, #1ab394) !important;
}

/* --- Filter Pills --- */
[data-bs-theme="dark"] .filter-pill {
    background-color: #1a1d21 !important;
    border-color: #495057 !important;
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .filter-pill:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .filter-pill.active {
    background-color: var(--theme-primary, #1ab394) !important;
    border-color: var(--theme-primary, #1ab394) !important;
    color: #ffffff !important;
}

/* --- Search Inputs --- */
[data-bs-theme="dark"] .search-input,
[data-bs-theme="dark"] .search-input-wrapper,
[data-bs-theme="dark"] .nav-search-box,
[data-bs-theme="dark"] .search-box {
    background-color: #1a1d21 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .search-input::placeholder,
[data-bs-theme="dark"] .nav-search-box input::placeholder {
    color: #6c757d !important;
}

/* --- View Toggle --- */
[data-bs-theme="dark"] .view-toggle {
    background-color: #1a1d21 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .view-toggle button,
[data-bs-theme="dark"] .view-toggle-btn {
    background-color: transparent !important;
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .view-toggle button.active,
[data-bs-theme="dark"] .view-toggle-btn.active {
    background-color: var(--theme-primary, #1ab394) !important;
    color: #ffffff !important;
}

/* ================================================
   INVITATIONS PAGE - EXPLICIT THEME OVERRIDES
   ================================================ */

/* Light mode */
[data-bs-theme="light"] .invitation-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #212529 !important;
}

[data-bs-theme="light"] .invitation-card * {
    color: inherit;
}

[data-bs-theme="light"] .invitation-header {
    border-bottom-color: #e5e7eb !important;
    padding: 1rem 1.25rem !important;
}

[data-bs-theme="light"] .invitation-body {
    color: #212529 !important;
}

[data-bs-theme="light"] .invitation-body span,
[data-bs-theme="light"] .invitation-body strong {
    color: #212529 !important;
}

[data-bs-theme="light"] .invitation-url {
    background: #f3f4f6 !important;
    color: #212529 !important;
}

[data-bs-theme="light"] .invitation-url span {
    color: #212529 !important;
}

[data-bs-theme="light"] .meta-label {
    color: #6c757d !important;
}

[data-bs-theme="light"] .meta-value {
    color: #212529 !important;
}

[data-bs-theme="light"] .invitation-name {
    color: #212529 !important;
}

/* Dark mode */
[data-bs-theme="dark"] .invitation-card {
    background: #2b3035 !important;
    border: 1px solid #495057 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .invitation-card * {
    color: inherit;
}

[data-bs-theme="dark"] .invitation-header {
    border-bottom-color: #495057 !important;
    padding: 1rem 1.25rem !important;
}

[data-bs-theme="dark"] .invitation-body {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .invitation-body span,
[data-bs-theme="dark"] .invitation-body strong {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .invitation-url {
    background: #343a40 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .invitation-url span {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .meta-label {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .meta-value {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .invitation-name {
    color: #f8f9fa !important;
}

/* Status badges for invitations */
[data-bs-theme="dark"] .status-badge.active {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
}

[data-bs-theme="dark"] .status-badge.inactive,
[data-bs-theme="dark"] .status-badge.expired {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

/* ================================================
   STATS CARDS - COMPACT HEIGHT
   ================================================ */

.stats-card,
.kpi-card {
    padding: 1rem !important;
    min-height: auto !important;
}

.stats-card .stats-value,
.kpi-card .kpi-value {
    font-size: 1.5rem !important;
    margin-bottom: 0.25rem !important;
}

.stats-card .stats-label,
.kpi-card .kpi-label {
    font-size: 0.75rem !important;
    margin-bottom: 0 !important;
}

/* ================================================
   AUDIT TRAIL PAGE - THEME OVERRIDES
   ================================================ */

/* Summary Cards - Compact Height */
.card.border-start.border-3 .card-body {
    padding: 0.75rem 1rem !important;
}

.card.border-start.border-3 h5 {
    font-size: 0.75rem !important;
    margin-bottom: 0.25rem !important;
}

.card.border-start.border-3 h3 {
    font-size: 1.5rem !important;
    margin-bottom: 0 !important;
}

.card.border-start.border-3 .avatar-sm {
    width: 36px !important;
    height: 36px !important;
}

.card.border-start.border-3 .avatar-title {
    width: 36px !important;
    height: 36px !important;
}

/* Light Mode - Audit page */
[data-bs-theme="light"] .card.border-start h5.text-muted {
    color: #6c757d !important;
}

[data-bs-theme="light"] .card.border-start h3 {
    color: #212529 !important;
}

[data-bs-theme="light"] .table th {
    color: #212529 !important;
    background-color: #f8f9fa !important;
}

[data-bs-theme="light"] .table td {
    color: #212529 !important;
}

[data-bs-theme="light"] .table td span,
[data-bs-theme="light"] .table td small {
    color: inherit !important;
}

[data-bs-theme="light"] .table .text-muted {
    color: #6c757d !important;
}

[data-bs-theme="light"] .table .fw-semibold {
    color: #212529 !important;
}

/* Dark Mode - Audit page */
[data-bs-theme="dark"] .card.border-start h5.text-muted {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .card.border-start h3 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .table {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .table th {
    color: #f8f9fa !important;
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .table td {
    color: #dee2e6 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .table td span:not(.badge),
[data-bs-theme="dark"] .table td small {
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .table .text-muted {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .table .fw-semibold {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .table-light {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .table-light th {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover td {
    color: #f8f9fa !important;
}

/* Filter panel dark mode */
[data-bs-theme="dark"] .bg-light {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .form-label {
    color: #dee2e6 !important;
}

/* ================================================
   NOTIFICATION BELL DROPDOWN - Dark Mode
   Hardcoded colors for maximum specificity
   ================================================ */
[data-bs-theme="dark"] .notification-dropdown {
    background: #1e293b !important;
    border: 1px solid #374151 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .notification-header {
    background: #111827 !important;
    border-bottom-color: #374151 !important;
}

[data-bs-theme="dark"] .notification-header h6,
[data-bs-theme="dark"] .notification-header-left h6 {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .unread-count {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .header-action-link {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .header-action-link:hover {
    background: #374151 !important;
    color: var(--theme-primary, #14b8a6) !important;
}

[data-bs-theme="dark"] .notification-tabs {
    background: #111827 !important;
    border-bottom-color: #374151 !important;
}

[data-bs-theme="dark"] .notification-tab {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .notification-tab:hover {
    color: #f1f5f9 !important;
    background: rgba(20, 184, 166, 0.1) !important;
}

[data-bs-theme="dark"] .notification-tab.active {
    color: var(--theme-primary, #14b8a6) !important;
}

[data-bs-theme="dark"] .notification-date-label {
    background: #111827 !important;
    color: #6b7280 !important;
}

[data-bs-theme="dark"] .notification-list {
    background: #1e293b !important;
}

[data-bs-theme="dark"] .notification-item {
    border-bottom-color: #374151 !important;
}

[data-bs-theme="dark"] .notification-item:hover {
    background: #374151 !important;
}

[data-bs-theme="dark"] .notification-item.unread {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.15) 0%, transparent 100%) !important;
}

[data-bs-theme="dark"] .notification-item.unread:hover {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.2) 0%, #374151 100%) !important;
}

[data-bs-theme="dark"] .notification-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .notification-message {
    color: #d1d5db !important;
}

[data-bs-theme="dark"] .notification-time {
    color: #6b7280 !important;
}

[data-bs-theme="dark"] .notification-icon.icon-gray {
    background: #374151 !important;
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .notification-loading {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .loading-spinner {
    border-color: #374151 !important;
    border-top-color: var(--theme-primary, #14b8a6) !important;
}

[data-bs-theme="dark"] .empty-icon {
    background: #374151 !important;
}

[data-bs-theme="dark"] .empty-icon i {
    color: #6b7280 !important;
}

[data-bs-theme="dark"] .notification-empty p {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .load-more-btn {
    background: #374151 !important;
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .load-more-btn:hover {
    background: #4b5563 !important;
    color: var(--theme-primary, #14b8a6) !important;
}

[data-bs-theme="dark"] .notification-footer {
    background: #111827 !important;
    border-top-color: #374151 !important;
}

/* ================================================
   SERVER CONNECTION POPUP - Dark Mode
   ================================================ */
[data-bs-theme="dark"] .connection-popup {
    background: #1e293b !important;
    border: 1px solid #374151 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .connection-popup-header {
    border-bottom-color: #374151 !important;
}

[data-bs-theme="dark"] .status-label {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .popup-close-btn {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .popup-close-btn:hover {
    background: #374151 !important;
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .connection-visual {
    background: #374151 !important;
}

[data-bs-theme="dark"] .device-icon,
[data-bs-theme="dark"] .server-icon {
    background: #1e293b !important;
    border: 1px solid #4b5563 !important;
}

[data-bs-theme="dark"] .device-icon i,
[data-bs-theme="dark"] .server-icon i {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .signal-dot {
    background: #4b5563 !important;
}

[data-bs-theme="dark"] .detail-item {
    color: #d1d5db !important;
}

[data-bs-theme="dark"] .detail-item span {
    color: #d1d5db !important;
}

[data-bs-theme="dark"] .connection-message {
    background: #374151 !important;
    color: #d1d5db !important;
}

[data-bs-theme="dark"] .connection-popup-footer {
    background: #374151 !important;
    border-top-color: #4b5563 !important;
}

[data-bs-theme="dark"] .connection-id .label {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .connection-id code {
    background: #1e293b !important;
    color: var(--theme-primary, #14b8a6) !important;
}

/* ================================================
   FSH DATEPICKER / CALENDAR - Dark Mode
   ================================================ */
[data-bs-theme="dark"] .fsh-datepicker-dropdown {
    background: #1e293b !important;
    border: 1px solid #374151 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .fsh-datepicker-header {
    background: #374151 !important;
    border-bottom: 1px solid #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-nav {
    color: #9ca3af !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .fsh-datepicker-nav:hover {
    color: #f1f5f9 !important;
    background: #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-title,
[data-bs-theme="dark"] .fsh-datepicker-month-btn {
    color: #f1f5f9 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .fsh-datepicker-month-btn:hover {
    background: #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-calendar {
    background: #1e293b !important;
}

[data-bs-theme="dark"] .fsh-datepicker-weekdays {
    background: #374151 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-weekday {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-datepicker-days {
    background: #1e293b !important;
}

[data-bs-theme="dark"] .fsh-datepicker-day {
    color: #f1f5f9 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .fsh-datepicker-day:hover:not(.disabled):not(.selected) {
    background: #374151 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-day.other-month {
    color: #6b7280 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-day.today:not(.selected) {
    border-color: var(--theme-primary, #14b8a6) !important;
    color: var(--theme-primary, #14b8a6) !important;
}

[data-bs-theme="dark"] .fsh-datepicker-day.disabled {
    color: #4b5563 !important;
    opacity: 0.5;
}

[data-bs-theme="dark"] .fsh-datepicker-month-picker {
    background: #1e293b !important;
}

[data-bs-theme="dark"] .fsh-datepicker-year-nav {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-year-nav span {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-year-nav button {
    color: #9ca3af !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .fsh-datepicker-year-nav button:hover {
    color: #f1f5f9 !important;
    background: #374151 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-months {
    background: #1e293b !important;
}

[data-bs-theme="dark"] .fsh-datepicker-month {
    color: #f1f5f9 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .fsh-datepicker-month:hover:not(.selected) {
    background: #374151 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-time {
    background: #1e293b !important;
    border-top: 1px solid #374151 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-time-divider {
    background: #374151 !important;
}

[data-bs-theme="dark"] .fsh-time-input-group {
    background: #374151 !important;
}

[data-bs-theme="dark"] .fsh-time-input {
    color: #f1f5f9 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .fsh-time-btn {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-time-btn:hover {
    color: #f1f5f9 !important;
    background: #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-time-separator {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fsh-time-ampm {
    color: #f1f5f9 !important;
    background: #374151 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-footer {
    background: #374151 !important;
    border-top: 1px solid #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-today,
[data-bs-theme="dark"] .fsh-datepicker-now {
    color: #9ca3af !important;
    background: #4b5563 !important;
}

[data-bs-theme="dark"] .fsh-datepicker-today:hover,
[data-bs-theme="dark"] .fsh-datepicker-now:hover {
    color: #f1f5f9 !important;
    background: #1e293b !important;
}

/* ================================================
   HUB HEADER - Fix Alignment (Title Left, Actions Right)
   ================================================ */
.hub-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
}

.hub-header .header-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-right: auto !important;
}

.hub-header .header-icon {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 14px !important;
    flex-shrink: 0 !important;
}

.hub-header .header-icon i {
    font-size: 1.75rem !important;
    color: #ffffff !important;
    display: block !important;
}

.hub-header .header-text {
    text-align: left !important;
}

.hub-header .header-text h1 {
    text-align: left !important;
    margin: 0 !important;
}

.hub-header .header-actions {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

/* ================================================
   STATS CARD - Reduce Vertical Height
   ================================================ */
.stats-card.rz-card,
.stats-grid .rz-card {
    padding: 0.5rem 0.75rem !important;
    min-height: auto !important;
    height: auto !important;
}

.stats-card .stats-icon,
.stats-grid .stats-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
}

.stats-card .stats-icon i,
.stats-grid .stats-icon i {
    font-size: 0.875rem !important;
}

.stats-card .stats-value,
.stats-grid .stats-value {
    font-size: 1rem !important;
    line-height: 1.2 !important;
}

.stats-card .stats-label,
.stats-grid .stats-label {
    font-size: 0.6875rem !important;
    line-height: 1.2 !important;
    margin-top: 0 !important;
}

.stats-grid {
    gap: 0.5rem !important;
}

/* ==============================================
   SECTION: FSH MODAL - DARK MODE
   ============================================== */

[data-bs-theme="dark"] .fsh-modal {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .fsh-modal-header {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .fsh-modal-title {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .fsh-modal-close {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .fsh-modal-close:hover {
    background-color: #495057 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .fsh-modal-body {
    background-color: #2b3035 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .fsh-modal-footer {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

/* ==============================================
   SECTION: OFFER DETAIL MODAL - DARK MODE
   ============================================== */

[data-bs-theme="dark"] .detail-section .section-title {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .section-content {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .dates-grid .date-item {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .date-label {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .date-value {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .school-info {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .school-name {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .school-detail {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .school-detail i {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .fees-info-text {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .fee-detail-item {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .fee-detail-label {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .closed-message {
    color: #adb5bd !important;
}

/* ==============================================
   SECTION: FILE UPLOAD / DROPZONE - DARK MODE
   ============================================== */

[data-bs-theme="dark"] .upload-dropzone {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .upload-dropzone:hover {
    border-color: var(--theme-primary) !important;
    background-color: rgba(26, 179, 148, 0.1) !important;
}

[data-bs-theme="dark"] .dropzone-text {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .dropzone-hint {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .upload-label {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .upload-hint {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .file-preview {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .file-name {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .file-size {
    color: #6c757d !important;
}

/* ==============================================
   SECTION: APPLY PAGE - DARK MODE
   ============================================== */

[data-bs-theme="dark"] .apply-page .content-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .apply-page .content-card .card-header-section {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .completion-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .completion-header h4 {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .completion-header span {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .completion-track {
    background-color: #343a40 !important;
}

[data-bs-theme="dark"] .submit-card {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .alert-box {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .alert-box.info {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

[data-bs-theme="dark"] .alert-box.warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}

[data-bs-theme="dark"] .tip-item {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .field-tooltip-content {
    background-color: #1e293b !important;
    color: #f8f9fa !important;
}

/* ==============================================
   SECTION: SEARCH FILTER BAR - DARK MODE
   ============================================== */

[data-bs-theme="dark"] .search-filter-bar {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .search-input {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .search-input::placeholder {
    color: #6c757d !important;
}

[data-bs-theme="dark"] .filter-pill {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .filter-pill:hover {
    border-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

[data-bs-theme="dark"] .filter-pill.active {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .view-toggle {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .view-toggle .view-btn {
    background-color: #343a40 !important;
    color: #6c757d !important;
}

[data-bs-theme="dark"] .view-toggle .view-btn:first-child {
    border-color: #495057 !important;
}

[data-bs-theme="dark"] .view-toggle .view-btn:hover {
    background-color: #495057 !important;
    color: #dee2e6 !important;
}

[data-bs-theme="dark"] .view-toggle .view-btn.active {
    background-color: var(--theme-primary) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .results-summary {
    background-color: rgba(26, 179, 148, 0.1) !important;
    color: #adb5bd !important;
}
