/**
 * Dark Mode Component Overrides
 * Centralized dark mode styling for components not fully using CSS variables
 * This file complements colors.css to ensure consistent dark mode across all components
 */

/* ========================================
   EXPLICIT LIGHT MODE OVERRIDES
   When data-theme="light" is set, force proper dark text for contrast
   This overrides any system dark mode preference
   ======================================== */

[data-theme="light"],
html[data-theme="light"],
:root[data-theme="light"] {
    color-scheme: light !important;
}

/* Force dark text on light theme - body and general text */
[data-theme="light"] body,
html[data-theme="light"] body {
    color: #212529 !important;
    background-color: #f8f9fa !important;
}

/* Force dark text on light theme - all text elements */
[data-theme="light"] .page-content,
[data-theme="light"] .page-content-wrapper,
[data-theme="light"] .dashboard-container,
[data-theme="light"] .profile-form-body,
[data-theme="light"] .profile-form-card,
[data-theme="light"] .portlet,
[data-theme="light"] .portlet-body,
[data-theme="light"] .card,
[data-theme="light"] .card-body,
[data-theme="light"] .panel,
[data-theme="light"] .panel-body,
html[data-theme="light"] .page-content,
html[data-theme="light"] .page-content-wrapper,
html[data-theme="light"] .dashboard-container,
html[data-theme="light"] .profile-form-body,
html[data-theme="light"] .profile-form-card,
html[data-theme="light"] .portlet,
html[data-theme="light"] .portlet-body,
html[data-theme="light"] .card,
html[data-theme="light"] .card-body,
html[data-theme="light"] .panel,
html[data-theme="light"] .panel-body {
    color: #212529 !important;
}

/* Force dark text on light theme - links */
[data-theme="light"] .page-content a:not(.btn):not(.nav-link):not([class*="btn-"]):not(.create-fab):not(.table-action-btn),
[data-theme="light"] .dashboard-container a:not(.btn):not([class*="btn-"]):not(.create-fab):not(.table-action-btn),
[data-theme="light"] .profile-form-body a:not(.btn):not([class*="btn-"]):not(.create-fab):not(.table-action-btn),
html[data-theme="light"] .page-content a:not(.btn):not(.nav-link):not([class*="btn-"]):not(.create-fab):not(.table-action-btn),
html[data-theme="light"] .dashboard-container a:not(.btn):not([class*="btn-"]):not(.create-fab):not(.table-action-btn),
html[data-theme="light"] .profile-form-body a:not(.btn):not([class*="btn-"]):not(.create-fab):not(.table-action-btn) {
    color: #2c3e50 !important;
}

/* Ensure links with icons have proper contrast */
html[data-theme="light"] .page-content a:not(.btn):not(.nav-link):not([class*="btn-"]):not(.create-fab):not(.table-action-btn) i,
html[data-theme="light"] .page-content a:not(.btn):not(.nav-link):not([class*="btn-"]):not(.create-fab):not(.table-action-btn) .fa,
html[data-theme="light"] .dashboard-container a:not(.btn):not([class*="btn-"]):not(.create-fab):not(.table-action-btn) i,
html[data-theme="light"] .dashboard-container a:not(.btn):not([class*="btn-"]):not(.create-fab):not(.table-action-btn) .fa {
    color: inherit !important;
}

[data-theme="light"] .page-content a:not(.btn):not(.nav-link):not([class*="btn-"]):not(.create-fab):not(.table-action-btn):hover,
[data-theme="light"] .dashboard-container a:not(.btn):not([class*="btn-"]):not(.create-fab):not(.table-action-btn):hover,
html[data-theme="light"] .page-content a:not(.btn):not(.nav-link):not([class*="btn-"]):not(.create-fab):not(.table-action-btn):hover,
html[data-theme="light"] .dashboard-container a:not(.btn):not([class*="btn-"]):not(.create-fab):not(.table-action-btn):hover {
    color: #1a252f !important;
}

/* Force dark text on light theme - navigation tabs */
[data-theme="light"] .nav-tabs a,
[data-theme="light"] .nav-tabs .nav-link,
[data-theme="light"] .nav-tabs > li > a,
[data-theme="light"] .nav.nav-tabs a,
[data-theme="light"] .tabs a,
[data-theme="light"] [role="tablist"] a,
html[data-theme="light"] .nav-tabs a,
html[data-theme="light"] .nav-tabs .nav-link,
html[data-theme="light"] .nav-tabs > li > a,
html[data-theme="light"] .nav.nav-tabs a,
html[data-theme="light"] .tabs a,
html[data-theme="light"] [role="tablist"] a {
    color: #495057 !important;
}

[data-theme="light"] .nav-tabs .active a,
[data-theme="light"] .nav-tabs a.active,
[data-theme="light"] .nav-tabs .nav-link.active,
[data-theme="light"] .nav-tabs > li.active > a,
[data-theme="light"] .nav.nav-tabs .active a,
[data-theme="light"] [role="tablist"] .active a,
[data-theme="light"] [role="tablist"] a[aria-selected="true"],
html[data-theme="light"] .nav-tabs .active a,
html[data-theme="light"] .nav-tabs a.active,
html[data-theme="light"] .nav-tabs .nav-link.active,
html[data-theme="light"] .nav-tabs > li.active > a,
html[data-theme="light"] .nav.nav-tabs .active a,
html[data-theme="light"] [role="tablist"] .active a,
html[data-theme="light"] [role="tablist"] a[aria-selected="true"] {
    color: var(--primary-color, #0d6efd) !important;
}

[data-theme="light"] .nav-tabs .active a i,
html[data-theme="light"] .nav-tabs .active a i,
[data-theme="light"] .nav-tabs .nav-link.active i,
html[data-theme="light"] .nav-tabs .nav-link.active i {
    color: var(--primary-color, #0d6efd) !important;
}

/* Exception: Secondary tabs should use Conta's primary color for consistency */
[data-theme="light"] .overview-holerites-tabs .nav-tabs .nav-link.active,
html[data-theme="light"] .overview-holerites-tabs .nav-tabs .nav-link.active {
    color: var(--primary-color, #0d6efd) !important;
    border-bottom-color: var(--primary-color, #0d6efd) !important;
}

[data-theme="light"] .overview-holerites-tabs .nav-tabs .nav-link.active i,
html[data-theme="light"] .overview-holerites-tabs .nav-tabs .nav-link.active i {
    color: var(--primary-color, #0d6efd) !important;
}

/* Force dark text on light theme - profile tabs specific */
[data-theme="light"] .profile-form-body .nav-tabs > li > a,
html[data-theme="light"] .profile-form-body .nav-tabs > li > a {
    color: #495057 !important;
}

[data-theme="light"] .profile-form-body .nav-tabs > li.active > a,
[data-theme="light"] .profile-form-body .nav-tabs > li.active > a:hover,
[data-theme="light"] .profile-form-body .nav-tabs > li.active > a:focus,
html[data-theme="light"] .profile-form-body .nav-tabs > li.active > a,
html[data-theme="light"] .profile-form-body .nav-tabs > li.active > a:hover,
html[data-theme="light"] .profile-form-body .nav-tabs > li.active > a:focus {
    color: #2c3e50 !important;
}

/* Force dark text on light theme - labels and form elements */
[data-theme="light"] label,
[data-theme="light"] .control-label,
[data-theme="light"] .form-label,
[data-theme="light"] .form-group label,
html[data-theme="light"] label,
html[data-theme="light"] .control-label,
html[data-theme="light"] .form-label,
html[data-theme="light"] .form-group label {
    color: #212529 !important;
}

/* Force dark text on light theme - headings (only in main content area) */
[data-theme="light"] .page-content h1,
[data-theme="light"] .page-content h2,
[data-theme="light"] .page-content h3,
[data-theme="light"] .page-content h4,
[data-theme="light"] .page-content h5,
[data-theme="light"] .page-content h6,
[data-theme="light"] .page-content .h1,
[data-theme="light"] .page-content .h2,
[data-theme="light"] .page-content .h3:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
[data-theme="light"] .page-content .h4:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
[data-theme="light"] .page-content .h5:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
[data-theme="light"] .page-content .h6:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
[data-theme="light"] .page-content .page-title,
[data-theme="light"] .page-content .section-title,
[data-theme="light"] .modal-title:not(.modal__header .modal-title),
html[data-theme="light"] .page-content h1:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content h2:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content h3:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content h4:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content h5:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content h6:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content .h1:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content .h2:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content .h3:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content .h4:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content .h5:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content .h6:not(.mf-header__title):not(.hora-form-title):not(.profile-form-title):not(.mf-header__subtitle):not(.hora-form-subtitle):not(.fc-toolbar-title):not(.modal__title),
html[data-theme="light"] .page-content .page-title,
html[data-theme="light"] .page-content .section-title,
html[data-theme="light"] .modal-title:not(.modal__header .modal-title) {
    color: #1a1a1a !important;
}

/* EXCEPTION: Sidebar headings should remain light in both themes (dark sidebar background) */
[data-theme="light"] .page-sidebar-menu > li.heading h3,
[data-theme="light"] .page-sidebar-menu > li.heading h3.uppercase,
[data-theme="light"] .page-sidebar-menu .heading h3,
[data-theme="light"] .page-sidebar h3,
html[data-theme="light"] .page-sidebar-menu > li.heading h3,
html[data-theme="light"] .page-sidebar-menu > li.heading h3.uppercase,
html[data-theme="light"] .page-sidebar-menu .heading h3,
html[data-theme="light"] .page-sidebar h3 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ========================================
   ADMIN SELECTOR CARD (Hour Registration Page)
   ======================================== */

/* Light mode - default styling */
.admin-selector-card {
    border-color: var(--color-primary, #0d6efd) !important;
}

.admin-selector-body {
    background-color: #f8f9fa;
    border-left: 4px solid #0d6efd;
}

/* Light mode explicit */
[data-theme="light"] .admin-selector-body,
html[data-theme="light"] .admin-selector-body {
    background-color: #f8f9fa !important;
    border-left: 4px solid #0d6efd !important;
}

/* Dark mode */
[data-theme="dark"] .admin-selector-card,
html[data-theme="dark"] .admin-selector-card {
    background-color: var(--color-bg-secondary, #1e1e1e) !important;
    border-color: var(--color-primary, #60a5fa) !important;
}

[data-theme="dark"] .admin-selector-body,
html[data-theme="dark"] .admin-selector-body {
    background-color: var(--color-bg-tertiary, #2a2a2a) !important;
    border-left: 4px solid var(--color-primary, #60a5fa) !important;
}

[data-theme="dark"] .admin-selector-body .form-label,
[data-theme="dark"] .admin-selector-body label,
html[data-theme="dark"] .admin-selector-body .form-label,
html[data-theme="dark"] .admin-selector-body label {
    color: var(--color-text-primary, #e0e0e0) !important;
}

/* Force dark text on light theme - portlet and card titles */
[data-theme="light"] .portlet-title .caption,
[data-theme="light"] .profile-form-title:not(.profile-form-header .profile-form-title),
[data-theme="light"] .card-title,
[data-theme="light"] .panel-title,
[data-theme="light"] .mf-section__title,
[data-theme="light"] .hora-form-section-title,
[data-theme="light"] .modal__section-title,
html[data-theme="light"] .portlet-title .caption,
html[data-theme="light"] .profile-form-title:not(.profile-form-header .profile-form-title),
html[data-theme="light"] .card-title,
html[data-theme="light"] .panel-title,
html[data-theme="light"] .mf-section__title,
html[data-theme="light"] .hora-form-section-title,
html[data-theme="light"] .modal__section-title {
    color: #212529 !important;
}

/* Form header titles should always be white on dark background */
[data-theme="light"] .mf-header .mf-header__title,
[data-theme="light"] .mf-header h3.mf-header__title,
[data-theme="light"] .hora-form-header .hora-form-title,
[data-theme="light"] .hora-form-header h3.hora-form-title,
html[data-theme="light"] .mf-header .mf-header__title,
html[data-theme="light"] .mf-header h3.mf-header__title,
html[data-theme="light"] .hora-form-header .hora-form-title,
html[data-theme="light"] .hora-form-header h3.hora-form-title {
    color: #ffffff !important;
}

/* Profile header title/icon use dark text in light mode */
[data-theme="light"] .profile-form-header .profile-form-title,
[data-theme="light"] .profile-form-header h3.profile-form-title,
html[data-theme="light"] .profile-form-header .profile-form-title,
html[data-theme="light"] .profile-form-header h3.profile-form-title {
    color: #1f2937 !important;
}

[data-theme="light"] .profile-form-title i,
html[data-theme="light"] .profile-form-title i {
    color: #1e40af !important;
}

[data-theme="light"] .mf-header .mf-header__subtitle,
[data-theme="light"] .hora-form-header .hora-form-subtitle,
html[data-theme="light"] .mf-header .mf-header__subtitle,
html[data-theme="light"] .hora-form-header .hora-form-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Calendar and modal titles on primary color backgrounds - always white */
[data-theme="light"] .fc-header-toolbar .fc-toolbar-title,
[data-theme="light"] .fc-header-toolbar h2,
[data-theme="light"] .fc-toolbar .fc-toolbar-title,
[data-theme="light"] .fc-toolbar h2,
[data-theme="light"] .modal__header .modal__title,
[data-theme="light"] .modal__header .modal-title,
[data-theme="light"] .modal__header h2.modal__title,
[data-theme="light"] .modal__header h3.modal__title,
[data-theme="light"] .modal__header h4.modal__title,
[data-theme="light"] .modal__header h2.modal-title,
[data-theme="light"] .modal__header h3.modal-title,
[data-theme="light"] .modal__header h4.modal-title,
[data-theme="light"] .modal__header .modal__subtitle,
html[data-theme="light"] .fc-header-toolbar .fc-toolbar-title,
html[data-theme="light"] .fc-header-toolbar h2,
html[data-theme="light"] .fc-toolbar .fc-toolbar-title,
html[data-theme="light"] .fc-toolbar h2,
html[data-theme="light"] .modal__header .modal__title,
html[data-theme="light"] .modal__header .modal-title,
html[data-theme="light"] .modal__header h2.modal__title,
html[data-theme="light"] .modal__header h3.modal__title,
html[data-theme="light"] .modal__header h4.modal__title,
html[data-theme="light"] .modal__header h2.modal-title,
html[data-theme="light"] .modal__header h3.modal-title,
html[data-theme="light"] .modal__header h4.modal-title,
html[data-theme="light"] .modal__header .modal__subtitle {
    color: #ffffff !important;
}

/* Force dark text on light theme - form inputs */
[data-theme="light"] .form-control,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="tel"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="time"],
[data-theme="light"] input[type="datetime-local"],
[data-theme="light"] textarea,
[data-theme="light"] select,
html[data-theme="light"] .form-control,
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="tel"],
html[data-theme="light"] input[type="date"],
html[data-theme="light"] input[type="time"],
html[data-theme="light"] input[type="datetime-local"],
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    color: #212529 !important;
    background-color: #ffffff !important;
    border-color: #ced4da !important;
}

/* Force dark text on light theme - Select2 */
[data-theme="light"] .select2-container--default .select2-selection--single .select2-selection__rendered,
[data-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__rendered,
[data-theme="light"] .select2-results__option,
html[data-theme="light"] .select2-container--default .select2-selection--single .select2-selection__rendered,
html[data-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__rendered,
html[data-theme="light"] .select2-results__option {
    color: #212529 !important;
}

[data-theme="light"] .select2-container--default .select2-selection--single,
[data-theme="light"] .select2-container--default .select2-selection--multiple,
html[data-theme="light"] .select2-container--default .select2-selection--single,
html[data-theme="light"] .select2-container--default .select2-selection--multiple {
    background-color: #ffffff !important;
    border-color: #ced4da !important;
}

/* Select2 choice chips - light mode */
[data-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice,
html[data-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

[data-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
html[data-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #6c757d !important;
}

[data-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,
html[data-theme="light"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #dc3545 !important;
}

/* Filter section workers - light mode */
[data-theme="light"] .filter-section,
[data-theme="light"] .filter-section-workers,
html[data-theme="light"] .filter-section,
html[data-theme="light"] .filter-section-workers {
    background-color: #f8f9fa !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .filter-section-header,
html[data-theme="light"] .filter-section-header {
    color: #2d3748 !important;
    border-bottom-color: #cbd5e0 !important;
}

[data-theme="light"] .filter-section-header i,
html[data-theme="light"] .filter-section-header i {
    color: #4a5568 !important;
}

/* Bulk action buttons - light mode */
[data-theme="light"] .btn-secondary,
[data-theme="light"] button.btn-secondary,
html[data-theme="light"] .btn-secondary,
html[data-theme="light"] button.btn-secondary {
    background-color: #f8f9fa !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .btn-secondary:hover {
    background-color: #e9ecef !important;
    border-color: #adb5bd !important;
}

/* Select all/remove all buttons - light mode */
[data-theme="light"] .btn.select-all,
[data-theme="light"] span.btn.select-all,
html[data-theme="light"] .btn.select-all,
html[data-theme="light"] span.btn.select-all {
    background-color: #f8f9fa !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
}

[data-theme="light"] .btn.select-all:hover,
html[data-theme="light"] .btn.select-all:hover {
    background-color: #e9ecef !important;
    border-color: #adb5bd !important;
}

/* Relatorio filter card - light mode */
[data-theme="light"] .relatorio-filter-card,
html[data-theme="light"] .relatorio-filter-card {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .filter-header,
html[data-theme="light"] .filter-header {
    background-color: #f8f9fa !important;
    border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .filter-body,
html[data-theme="light"] .filter-body {
    background-color: #ffffff !important;
}

/* Force dark text on light theme - text utilities */
[data-theme="light"] .text-muted,
[data-theme="light"] .help-block,
[data-theme="light"] .form-text,
html[data-theme="light"] .text-muted,
html[data-theme="light"] .help-block,
html[data-theme="light"] .form-text {
    color: #6c757d !important;
}

/* Force proper backgrounds on light theme */
[data-theme="light"] .page-content,
[data-theme="light"] .page-content-wrapper,
html[data-theme="light"] .page-content,
html[data-theme="light"] .page-content-wrapper {
    background-color: #ffffff !important;
}

[data-theme="light"] .portlet,
[data-theme="light"] .portlet-body,
[data-theme="light"] .card,
[data-theme="light"] .card-body,
[data-theme="light"] .panel,
[data-theme="light"] .panel-body,
[data-theme="light"] .profile-form-card,
html[data-theme="light"] .portlet,
html[data-theme="light"] .portlet-body,
html[data-theme="light"] .card,
html[data-theme="light"] .card-body,
html[data-theme="light"] .panel,
html[data-theme="light"] .panel-body,
html[data-theme="light"] .profile-form-card {
    background-color: #ffffff !important;
    border-color: #e9ecef !important;
}

/* Force dark icons on light theme */
[data-theme="light"] .fa,
[data-theme="light"] .fas,
[data-theme="light"] .far,
[data-theme="light"] .fal,
[data-theme="light"] .fab,
[data-theme="light"] [class^="fa-"],
[data-theme="light"] [class*=" fa-"],
html[data-theme="light"] .fa,
html[data-theme="light"] .fas,
html[data-theme="light"] .far,
html[data-theme="light"] .fal,
html[data-theme="light"] .fab,
html[data-theme="light"] [class^="fa-"],
html[data-theme="light"] [class*=" fa-"] {
    color: inherit;
}

/* Force dark text on Quick Actions cards in light theme */
[data-theme="light"] .quick-action-item,
[data-theme="light"] .quick-action-title,
[data-theme="light"] .quick-actions-card .card-title,
html[data-theme="light"] .quick-action-item,
html[data-theme="light"] .quick-action-title,
html[data-theme="light"] .quick-actions-card .card-title {
    color: #212529 !important;
}

/* Force dark text on table elements in light theme */
[data-theme="light"] table,
[data-theme="light"] th,
[data-theme="light"] td,
[data-theme="light"] .table,
[data-theme="light"] .dataTable,
html[data-theme="light"] table,
html[data-theme="light"] th,
html[data-theme="light"] td,
html[data-theme="light"] .table,
html[data-theme="light"] .dataTable {
    color: #212529 !important;
}

[data-theme="light"] .table thead th,
[data-theme="light"] .dataTable thead th,
html[data-theme="light"] .table thead th,
html[data-theme="light"] .dataTable thead th {
    color: #212529 !important;
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

/* ========================================
   CALENDAR - Light Mode Overrides
   Force proper light styling on calendar when data-theme="light"
   ======================================== */

/* Calendar container */
[data-theme="light"] #calendar-horarios,
[data-theme="light"] .fc,
[data-theme="light"] .fc-theme-standard,
html[data-theme="light"] #calendar-horarios,
html[data-theme="light"] .fc,
html[data-theme="light"] .fc-theme-standard {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Calendar container - ensure proper background in light mode */
[data-theme="light"] .fc,
[data-theme="light"] #calendar-horarios,
html[data-theme="light"] .fc,
html[data-theme="light"] #calendar-horarios {
    background-color: #ffffff !important;
}

/* Calendar header/toolbar */
[data-theme="light"] .fc-toolbar,
[data-theme="light"] .fc-header-toolbar,
html[data-theme="light"] .fc-toolbar,
html[data-theme="light"] .fc-header-toolbar {
    background-color: #ffffff !important;
}

/* Calendar toolbar title - always white on primary color background */
[data-theme="light"] .fc-toolbar-title,
[data-theme="light"] .fc-toolbar h2,
[data-theme="light"] .fc-toolbar-title h2,
[data-theme="light"] .fc-header-toolbar .fc-toolbar-title,
[data-theme="light"] .fc-header-toolbar h2,
html[data-theme="light"] .fc-toolbar-title,
html[data-theme="light"] .fc-toolbar h2,
html[data-theme="light"] .fc-toolbar-title h2,
html[data-theme="light"] .fc-header-toolbar .fc-toolbar-title,
html[data-theme="light"] .fc-header-toolbar h2 {
    color: #ffffff !important;
}

/* Calendar toolbar chunk (navigation section) */
[data-theme="light"] .fc-toolbar-chunk,
html[data-theme="light"] .fc-toolbar-chunk {
    color: var(--primary-text-color) !important;
}

/* Calendar toolbar buttons */
[data-theme="light"] .fc-button,
[data-theme="light"] .fc-button-primary,
html[data-theme="light"] .fc-button,
html[data-theme="light"] .fc-button-primary {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--primary-text-color) !important;
}

[data-theme="light"] .fc-button:hover,
[data-theme="light"] .fc-button-primary:hover,
html[data-theme="light"] .fc-button:hover,
html[data-theme="light"] .fc-button-primary:hover {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

[data-theme="light"] .fc-button-active,
[data-theme="light"] .fc-button-primary:not(:disabled).fc-button-active,
html[data-theme="light"] .fc-button-active,
html[data-theme="light"] .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--color-primary, #3498db) !important;
    border-color: var(--color-primary, #3498db) !important;
    color: #ffffff !important;
}

/* Calendar grid/table structure */
[data-theme="light"] .fc-theme-standard td,
[data-theme="light"] .fc-theme-standard th,
[data-theme="light"] .fc-theme-standard .fc-scrollgrid,
html[data-theme="light"] .fc-theme-standard td,
html[data-theme="light"] .fc-theme-standard th,
html[data-theme="light"] .fc-theme-standard .fc-scrollgrid {
    border-color: #dee2e6 !important;
}

/* Calendar column headers (day names) */
[data-theme="light"] .fc-scrollgrid,
html[data-theme="light"] .fc-scrollgrid {
    width: 100% !important;
}

[data-theme="light"] .fc-scrollgrid-sync-table,
html[data-theme="light"] .fc-scrollgrid-sync-table {
    width: 100% !important;
    table-layout: fixed !important;
}

[data-theme="light"] .fc-col-header,
html[data-theme="light"] .fc-col-header,
[data-theme="light"] .fc-daygrid-body,
html[data-theme="light"] .fc-daygrid-body {
    width: 100%;
}

/* Header cells and day cells - exact percentage for perfect alignment */
[data-theme="light"] .fc-col-header-cell,
html[data-theme="light"] .fc-col-header-cell,
[data-theme="light"] .fc-daygrid-day,
html[data-theme="light"] .fc-daygrid-day {
    width: 14.285714% !important; /* Exactly 1/7th */
    box-sizing: border-box;
    min-width: 0;
}

[data-theme="light"] .fc-col-header-cell,
html[data-theme="light"] .fc-col-header-cell {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    display: table-cell !important;
    vertical-align: middle;
}

[data-theme="light"] .fc-col-header-cell-cushion,
html[data-theme="light"] .fc-col-header-cell-cushion {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Calendar day cells */
[data-theme="light"] .fc-daygrid-day,
[data-theme="light"] .fc .fc-daygrid-day,
html[data-theme="light"] .fc-daygrid-day,
html[data-theme="light"] .fc .fc-daygrid-day {
    background-color: #ffffff !important;
}

/* Calendar day numbers */
[data-theme="light"] .fc-daygrid-day-number,
[data-theme="light"] .fc .fc-daygrid-day-number,
html[data-theme="light"] .fc-daygrid-day-number,
html[data-theme="light"] .fc .fc-daygrid-day-number {
    color: #212529 !important;
}

/* Calendar "other month" days */
[data-theme="light"] .fc-day-other,
[data-theme="light"] .fc-day-other .fc-daygrid-day-number,
[data-theme="light"] .fc-daygrid-day.fc-day-other .fc-daygrid-day-number,
html[data-theme="light"] .fc-day-other,
html[data-theme="light"] .fc-day-other .fc-daygrid-day-number,
html[data-theme="light"] .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
    color: #adb5bd !important;
    background-color: #f8f9fa !important;
}

/* Calendar today cell */
[data-theme="light"] .fc-day-today,
[data-theme="light"] .fc-daygrid-day.fc-day-today,
html[data-theme="light"] .fc-day-today,
html[data-theme="light"] .fc-daygrid-day.fc-day-today {
    background-color: #e3f2fd !important;
}

/* Calendar day frame and events container */
[data-theme="light"] .fc-daygrid-day-frame,
[data-theme="light"] .fc-daygrid-day-events,
html[data-theme="light"] .fc-daygrid-day-frame,
html[data-theme="light"] .fc-daygrid-day-events {
    background-color: transparent !important;
}

/* Calendar "more" link */
[data-theme="light"] .fc-daygrid-more-link,
html[data-theme="light"] .fc-daygrid-more-link {
    color: var(--color-primary, #3498db) !important;
}

/* Calendar view container */
[data-theme="light"] .fc-view,
[data-theme="light"] .fc-view-harness,
[data-theme="light"] .fc-scroller,
[data-theme="light"] .fc-scrollgrid-section,
html[data-theme="light"] .fc-view,
html[data-theme="light"] .fc-view-harness,
html[data-theme="light"] .fc-scroller,
html[data-theme="light"] .fc-scrollgrid-section {
    background-color: #ffffff !important;
}

/* Legenda (calendar legend) */
[data-theme="light"] .legenda,
html[data-theme="light"] .legenda {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

[data-theme="light"] .legenda > div,
html[data-theme="light"] .legenda > div {
    color: #212529 !important;
}

/* ========================================
   SKELETON / GHOST LOADERS - Light Mode Overrides
   Force proper light styling on skeletons when data-theme="light"
   ======================================== */

/* Ghost loader container */
[data-theme="light"] .ghost-loader-container,
[data-theme="light"] #ghost-loader,
[data-theme="light"] #calendar-ghost-loader,
html[data-theme="light"] .ghost-loader-container,
html[data-theme="light"] #ghost-loader,
html[data-theme="light"] #calendar-ghost-loader {
    background-color: #ffffff !important;
}

/* Base skeleton styling */
[data-theme="light"] .skeleton,
[data-theme="light"] [class*="skeleton-"],
html[data-theme="light"] .skeleton,
html[data-theme="light"] [class*="skeleton-"] {
    background-color: #e9ecef !important;
    background-image: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 50%, #e9ecef 100%) !important;
}

/* Skeleton text elements */
[data-theme="light"] .skeleton-text,
[data-theme="light"] .skeleton-title,
[data-theme="light"] .skeleton-button,
[data-theme="light"] .skeleton-avatar,
[data-theme="light"] .skeleton-icon,
[data-theme="light"] .skeleton-label,
[data-theme="light"] .skeleton-input,
[data-theme="light"] .skeleton-chart,
html[data-theme="light"] .skeleton-text,
html[data-theme="light"] .skeleton-title,
html[data-theme="light"] .skeleton-button,
html[data-theme="light"] .skeleton-avatar,
html[data-theme="light"] .skeleton-icon,
html[data-theme="light"] .skeleton-label,
html[data-theme="light"] .skeleton-input,
html[data-theme="light"] .skeleton-chart {
    background-color: #dee2e6 !important;
}

/* Skeleton cards */
[data-theme="light"] .skeleton-card,
html[data-theme="light"] .skeleton-card {
    background-color: #ffffff !important;
    border-color: #e9ecef !important;
}

/* Skeleton table elements */
[data-theme="light"] .skeleton-table-row,
[data-theme="light"] .skeleton-table-cell,
html[data-theme="light"] .skeleton-table-row,
html[data-theme="light"] .skeleton-table-cell {
    background-color: #f8f9fa !important;
}

/* Skeleton breadcrumb */
[data-theme="light"] .skeleton-breadcrumb-item,
[data-theme="light"] .skeleton-breadcrumb-separator,
html[data-theme="light"] .skeleton-breadcrumb-item,
html[data-theme="light"] .skeleton-breadcrumb-separator {
    background-color: #dee2e6 !important;
}

/* Report/Filter skeleton styles */
[data-theme="light"] .skeleton-filter-body,
[data-theme="light"] .skeleton-filter-section,
html[data-theme="light"] .skeleton-filter-body,
html[data-theme="light"] .skeleton-filter-section {
    background-color: #ffffff !important;
}

[data-theme="light"] .skeleton-preset-btn,
[data-theme="light"] .skeleton-section-header,
html[data-theme="light"] .skeleton-preset-btn,
html[data-theme="light"] .skeleton-section-header {
    background-color: #e9ecef !important;
}

/* Calendar skeleton */
[data-theme="light"] .calendar-skeleton-header,
[data-theme="light"] .calendar-skeleton-title,
[data-theme="light"] .calendar-skeleton-button,
html[data-theme="light"] .calendar-skeleton-header,
html[data-theme="light"] .calendar-skeleton-title,
html[data-theme="light"] .calendar-skeleton-button {
    background-color: #e9ecef !important;
}

/* Ghost loader header and sidebar */
[data-theme="light"] .ghost-loader-header,
[data-theme="light"] .ghost-loader-sidebar,
html[data-theme="light"] .ghost-loader-header,
html[data-theme="light"] .ghost-loader-sidebar {
    background-color: #f8f9fa !important;
}

/* ========================================
   Dark Mode Detection
   Applies when data-theme="dark" OR when system prefers dark and no light override
   ======================================== */

/* Selector for dark mode */
:root[data-theme="dark"],
html[data-theme="dark"],
:root:not([data-theme="light"]):has(body) {
    color-scheme: dark;
}


/* ========================================
   Base Body & Page Styles
   ======================================== */
[data-theme="dark"] body,
[data-theme="dark"] .page-content-wrapper {
    background-color: var(--color-bg-primary) !important;
    color: var(--color-text-primary) !important;
}


/* ========================================
   Page Content Area
   ======================================== */
[data-theme="dark"] .page-content {
    background-color: var(--color-bg-primary) !important;
    border-left-color: var(--color-border-light) !important;
}


/* ========================================
   Cards & Portlets
   ======================================== */
[data-theme="dark"] .portlet,
[data-theme="dark"] .card,
[data-theme="dark"] .panel,
[data-theme="dark"] .profile-form-card,
[data-theme="dark"] .portlet-body {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .portlet-title,
[data-theme="dark"] .card-header,
[data-theme="dark"] .panel-heading,
[data-theme="dark"] .profile-form-header {
    background: var(--color-card-header-bg) !important;
    border-bottom-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .portlet-title .caption,
[data-theme="dark"] .profile-form-title,
[data-theme="dark"] .mf-section__title,
[data-theme="dark"] .hora-form-section-title,
[data-theme="dark"] .modal__section-title {
    color: var(--color-text-primary) !important;
}

html[data-theme="dark"] .portlet-title .caption,
html[data-theme="dark"] .profile-form-title,
html[data-theme="dark"] .mf-section__title,
html[data-theme="dark"] .hora-form-section-title,
html[data-theme="dark"] .modal__section-title {
    color: var(--color-text-primary) !important;
}


/* ========================================
   Form Controls
   ======================================== */
[data-theme="dark"] .form-control,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="time"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: var(--color-input-bg) !important;
    border-color: var(--color-input-border) !important;
    color: var(--color-input-text) !important;
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--color-input-placeholder) !important;
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 52, 152, 219), 0.2) !important;
}

[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-control[readonly] {
    background-color: var(--color-input-disabled-bg) !important;
    color: var(--color-input-disabled-text) !important;
}

[data-theme="dark"] label,
[data-theme="dark"] .form-group label {
    color: var(--color-text-primary) !important;
}


/* ========================================
   Toggle Switch (Checkbox) Dark Mode
   ======================================== */
[data-theme="dark"] .md-checkbox label {
    color: var(--color-text-primary) !important;
}

/* Toggle track - darker gray for off state */
[data-theme="dark"] .md-checkbox label::before {
    background-color: #4a5568 !important;
}

/* Toggle track - green when checked */
[data-theme="dark"] .md-checkbox input[type="checkbox"]:checked + label::before {
    background-color: #48bb78 !important;
}

/* Toggle knob - stays white */
[data-theme="dark"] .md-checkbox label::after {
    background-color: #fff !important;
}

/* Hover state */
[data-theme="dark"] .md-checkbox label:hover::before {
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.2) !important;
}

/* Focus state */
[data-theme="dark"] .md-checkbox input[type="checkbox"]:focus + label::before {
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.3) !important;
}

/* Disabled state */
[data-theme="dark"] .md-checkbox input[type="checkbox"]:disabled + label::before {
    background-color: #2d3748 !important;
}

/* Preference toggle dark mode */
[data-theme="dark"] .preference-toggle {
    background-color: #4a5568 !important;
}

[data-theme="dark"] .preference-toggle:checked {
    background-color: #48bb78 !important;
}


/* ========================================
   Select2 Dropdowns
   ======================================== */
[data-theme="dark"] .select2-container--default .select2-selection--single,
[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: var(--color-input-bg) !important;
    border-color: var(--color-input-border) !important;
    color: var(--color-input-text) !important;
}

[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--color-input-text) !important;
}

[data-theme="dark"] .select2-dropdown {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-input-border) !important;
}

[data-theme="dark"] .select2-container--default .select2-results__option {
    background-color: var(--color-card-bg) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--color-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: var(--color-input-bg) !important;
    border-color: var(--color-input-border) !important;
    color: var(--color-input-text) !important;
}

[data-theme="dark"] .select2-dropdown--multiselect .select2-search--dropdown {
    background-color: var(--color-card-bg) !important;
    border-bottom-color: var(--color-border-medium) !important;
}

[data-theme="dark"] .select2-dropdown--multiselect .select2-results__options {
    background-color: var(--color-card-bg) !important;
}


/* ========================================
   Tables
   ======================================== */
[data-theme="dark"] .table,
[data-theme="dark"] table,
html[data-theme="dark"] .table,
html[data-theme="dark"] table {
    background-color: var(--color-table-bg) !important;
    color: var(--color-text-primary) !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--ios-radius-lg, 14px) !important; /* Keep rounded corners */
}

/* Remove borders and box-shadows from table wrappers in dark mode */
[data-theme="dark"] .table-responsive,
[data-theme="dark"] .dataTables_wrapper,
[data-theme="dark"] .table-scrollable,
html[data-theme="dark"] .table-responsive,
html[data-theme="dark"] .dataTables_wrapper,
html[data-theme="dark"] .table-scrollable {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

[data-theme="dark"] .table thead th,
[data-theme="dark"] .table-header,
[data-theme="dark"] table thead th {
    background-color: var(--color-table-header-bg) !important;
    color: var(--color-text-primary) !important;
    border: none !important;
    border-color: transparent !important;
}

[data-theme="dark"] .table tbody tr,
[data-theme="dark"] table tbody tr {
    background-color: var(--color-table-bg) !important;
    color: var(--color-text-primary) !important;
}

/* ========================================
   ENHANCED TABLE HOVER EFFECT - DARK MODE
   ======================================== */

/* All table rows get hover background */
html[data-theme="dark"] table.dataTable.table-hover tbody tr:hover,
html[data-theme="dark"] .table-hover tbody tr:hover,
[data-theme="dark"] table.dataTable.table-hover tbody tr:hover,
[data-theme="dark"] .table-hover tbody tr:hover,
[data-theme="dark"] .table tbody tr:hover,
[data-theme="dark"] table tbody tr:hover {
    background-color: #303850 !important;
}

/* All cells get hover background - with maximum specificity */
html[data-theme="dark"] table.dataTable.table-hover tbody tr:hover > td,
html[data-theme="dark"] table.dataTable tbody tr.odd:hover > td,
html[data-theme="dark"] table.dataTable tbody tr.even:hover > td,
html[data-theme="dark"] .table-hover tbody tr:hover > td,
[data-theme="dark"] table.dataTable.table-hover tbody tr:hover > td,
[data-theme="dark"] table.dataTable tbody tr.odd:hover > td,
[data-theme="dark"] table.dataTable tbody tr.even:hover > td,
[data-theme="dark"] .table-hover tbody tr:hover > td,
[data-theme="dark"] .table tbody tr:hover td,
[data-theme="dark"] table tbody tr:hover td {
    background-color: #303850 !important;
    color: #ffffff !important;
}

/* Override DataTables sorting column highlight on hover */
html[data-theme="dark"] table.dataTable tbody tr:hover > td.sorting_1,
html[data-theme="dark"] table.dataTable tbody tr:hover > td.sorting_2,
html[data-theme="dark"] table.dataTable tbody tr:hover > td.sorting_3,
html[data-theme="dark"] table.dataTable tbody tr.odd:hover > td.sorting_1,
html[data-theme="dark"] table.dataTable tbody tr.even:hover > td.sorting_1,
[data-theme="dark"] table.dataTable tbody tr:hover > td.sorting_1,
[data-theme="dark"] table.dataTable tbody tr:hover > td.sorting_2,
[data-theme="dark"] table.dataTable tbody tr:hover > td.sorting_3,
[data-theme="dark"] table.dataTable tbody tr.odd:hover > td.sorting_1,
[data-theme="dark"] table.dataTable tbody tr.even:hover > td.sorting_1 {
    background-color: #303850 !important;
    color: #ffffff !important;
}

/* Blue accent border on first cell when row is hovered */
html[data-theme="dark"] table.dataTable tbody tr:hover > td:first-child,
html[data-theme="dark"] table.dataTable tbody tr.odd:hover > td:first-child,
html[data-theme="dark"] table.dataTable tbody tr.even:hover > td:first-child,
[data-theme="dark"] table.dataTable tbody tr:hover > td:first-child,
[data-theme="dark"] table.dataTable tbody tr.odd:hover > td:first-child,
[data-theme="dark"] table.dataTable tbody tr.even:hover > td:first-child,
[data-theme="dark"] .table tbody tr:hover > td:first-child,
[data-theme="dark"] table tbody tr:hover > td:first-child {
    border-left: 4px solid #3598dc !important;
}

/* Ensure smooth transitions on table rows and cells */
html[data-theme="dark"] table.dataTable tbody tr,
html[data-theme="dark"] table.dataTable tbody td,
[data-theme="dark"] table.dataTable tbody tr,
[data-theme="dark"] table.dataTable tbody td,
[data-theme="dark"] .table tbody tr,
[data-theme="dark"] .table tbody td,
[data-theme="dark"] table tbody tr,
[data-theme="dark"] table tbody td {
    transition: background-color 0.15s ease-out, border-left 0.15s ease-out, color 0.15s ease-out !important;
}

[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd),
[data-theme="dark"] table.table-striped tbody tr:nth-of-type(odd),
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd),
html[data-theme="dark"] table.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--color-table-row-stripe) !important;
}

/* Striped table rows hover - same effect as regular rows */
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd):hover,
html[data-theme="dark"] table.table-striped tbody tr:nth-of-type(odd):hover,
html[data-theme="dark"] table.dataTable.table-striped tbody tr:nth-of-type(odd):hover,
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(even):hover,
html[data-theme="dark"] table.table-striped tbody tr:nth-of-type(even):hover,
html[data-theme="dark"] table.dataTable.table-striped tbody tr:nth-of-type(even):hover,
[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd):hover,
[data-theme="dark"] table.table-striped tbody tr:nth-of-type(odd):hover,
[data-theme="dark"] table.dataTable.table-striped tbody tr:nth-of-type(odd):hover,
[data-theme="dark"] .table-striped tbody tr:nth-of-type(even):hover,
[data-theme="dark"] table.table-striped tbody tr:nth-of-type(even):hover,
[data-theme="dark"] table.dataTable.table-striped tbody tr:nth-of-type(even):hover {
    background-color: #303850 !important;
}

/* Blue accent border on first cell for striped tables */
html[data-theme="dark"] .table-striped tbody tr:hover > td:first-child,
html[data-theme="dark"] table.table-striped tbody tr:hover > td:first-child,
html[data-theme="dark"] table.dataTable.table-striped tbody tr:hover > td:first-child,
[data-theme="dark"] .table-striped tbody tr:hover > td:first-child,
[data-theme="dark"] table.table-striped tbody tr:hover > td:first-child,
[data-theme="dark"] table.dataTable.table-striped tbody tr:hover > td:first-child {
    border-left: 4px solid #3598dc !important;
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th,
[data-theme="dark"] table td,
[data-theme="dark"] table th {
    border: none !important;
    border-color: transparent !important;
}

/* Remove borders from DataTables tables in dark mode */
[data-theme="dark"] table.dataTable,
[data-theme="dark"] .dataTable,
html[data-theme="dark"] table.dataTable,
html[data-theme="dark"] .dataTable {
    border: none !important;
    box-shadow: none !important;
}

/* Remove all vertical borders between columns in dark mode */
[data-theme="dark"] .table td,
[data-theme="dark"] .table th,
[data-theme="dark"] table td,
[data-theme="dark"] table th,
[data-theme="dark"] table.dataTable td,
[data-theme="dark"] table.dataTable th,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th,
html[data-theme="dark"] table td,
html[data-theme="dark"] table th,
html[data-theme="dark"] table.dataTable td,
html[data-theme="dark"] table.dataTable th {
    border-left: none !important;
    border-right: none !important;
}

[data-theme="dark"] .table th + th,
[data-theme="dark"] .table td + td,
[data-theme="dark"] table th + th,
[data-theme="dark"] table td + td,
html[data-theme="dark"] .table th + th,
html[data-theme="dark"] .table td + td,
html[data-theme="dark"] table th + th,
html[data-theme="dark"] table td + td {
    border-left: none !important;
}

[data-theme="dark"] table.dataTable thead th,
[data-theme="dark"] table.dataTable thead td,
[data-theme="dark"] .dataTable thead th,
[data-theme="dark"] .dataTable thead td,
html[data-theme="dark"] table.dataTable thead th,
html[data-theme="dark"] table.dataTable thead td,
html[data-theme="dark"] .dataTable thead th,
html[data-theme="dark"] .dataTable thead td {
    border: none !important;
    border-bottom: none !important;
}

[data-theme="dark"] table.dataTable tbody tr,
[data-theme="dark"] table.dataTable tbody td,
[data-theme="dark"] table.dataTable tbody th,
[data-theme="dark"] .dataTable tbody tr,
[data-theme="dark"] .dataTable tbody td,
[data-theme="dark"] .dataTable tbody th,
html[data-theme="dark"] table.dataTable tbody tr,
html[data-theme="dark"] table.dataTable tbody td,
html[data-theme="dark"] table.dataTable tbody th,
html[data-theme="dark"] .dataTable tbody tr,
html[data-theme="dark"] .dataTable tbody td,
html[data-theme="dark"] .dataTable tbody th {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

[data-theme="dark"] table.dataTable td,
[data-theme="dark"] table.dataTable th,
[data-theme="dark"] .dataTable td,
[data-theme="dark"] .dataTable th,
html[data-theme="dark"] table.dataTable td,
html[data-theme="dark"] table.dataTable th,
html[data-theme="dark"] .dataTable td,
html[data-theme="dark"] .dataTable th {
    border: none !important;
    border-color: transparent !important;
}

/* DataTables sorting column highlight - must override !important from theme */
[data-theme="dark"] table.dataTable td.sorting_1,
[data-theme="dark"] table.dataTable td.sorting_2,
[data-theme="dark"] table.dataTable td.sorting_3,
[data-theme="dark"] table.dataTable th.sorting_1,
[data-theme="dark"] table.dataTable th.sorting_2,
[data-theme="dark"] table.dataTable th.sorting_3,
html[data-theme="dark"] table.dataTable td.sorting_1,
html[data-theme="dark"] table.dataTable td.sorting_2,
html[data-theme="dark"] table.dataTable td.sorting_3,
html[data-theme="dark"] table.dataTable th.sorting_1,
html[data-theme="dark"] table.dataTable th.sorting_2,
html[data-theme="dark"] table.dataTable th.sorting_3 {
    background-color: var(--color-table-row-stripe) !important;
}

/* DataTables heading rows */
[data-theme="dark"] table.dataTable tr.heading > th,
html[data-theme="dark"] table.dataTable tr.heading > th {
    background-color: var(--color-table-header-bg) !important;
}


/* ========================================
   Modals - COMPREHENSIVE DARK MODE OVERRIDES
   ======================================== */

/* Modal container and dialog */
[data-theme="dark"] .modal,
html[data-theme="dark"] .modal {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .modal-dialog,
html[data-theme="dark"] .modal-dialog {
    color: #e0e0e0 !important;
}

/* Modal scrollable wrapper */
[data-theme="dark"] .modal-scrollable,
html[data-theme="dark"] .modal-scrollable {
    background-color: transparent !important;
}

/* Modal content - the main white/dark container */
[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal .modal-content,
html[data-theme="dark"] .modal .modal-content {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #3a3a3a !important;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5) !important;
}

/* Modal body */
[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-body,
[data-theme="dark"] .modal .modal-body,
html[data-theme="dark"] .modal .modal-body {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

/* Specific modal IDs */
[data-theme="dark"] #modal > div:first-child,
[data-theme="dark"] #modal-erro > div:first-child,
html[data-theme="dark"] #modal > div:first-child,
html[data-theme="dark"] #modal-erro > div:first-child {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #3a3a3a !important;
}

/* Modal header */
[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal .modal-header,
html[data-theme="dark"] .modal .modal-header {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

/* Modal footer */
[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .modal-footer,
[data-theme="dark"] .modal .modal-footer,
html[data-theme="dark"] .modal .modal-footer {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

/* Modal title - ensure white text on primary color backgrounds */
[data-theme="dark"] .modal-title:not(.modal__header .modal-title),
html[data-theme="dark"] .modal-title:not(.modal__header .modal-title),
[data-theme="dark"] .modal .modal-title:not(.modal__header .modal-title),
html[data-theme="dark"] .modal .modal-title:not(.modal__header .modal-title) {
    color: #e0e0e0 !important;
}

/* Modal titles on primary color backgrounds - always white */
[data-theme="dark"] .modal__header .modal-title,
[data-theme="dark"] .modal__header .modal__title,
[data-theme="dark"] .modal__header h2.modal-title,
[data-theme="dark"] .modal__header h3.modal-title,
[data-theme="dark"] .modal__header h4.modal-title,
[data-theme="dark"] .modal__header h2.modal__title,
[data-theme="dark"] .modal__header h3.modal__title,
[data-theme="dark"] .modal__header h4.modal__title,
html[data-theme="dark"] .modal__header .modal-title,
html[data-theme="dark"] .modal__header .modal__title,
html[data-theme="dark"] .modal__header h2.modal-title,
html[data-theme="dark"] .modal__header h3.modal-title,
html[data-theme="dark"] .modal__header h4.modal-title,
html[data-theme="dark"] .modal__header h2.modal__title,
html[data-theme="dark"] .modal__header h3.modal__title,
html[data-theme="dark"] .modal__header h4.modal__title {
    color: #ffffff !important;
}

/* Modal backdrop - no backdrop-filter (Safari/iOS compatibility) */
[data-theme="dark"] .modal-backdrop,
html[data-theme="dark"] .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
}

[data-theme="dark"] .modal-backdrop.in,
html[data-theme="dark"] .modal-backdrop.in,
[data-theme="dark"] .modal-backdrop.fade.in,
html[data-theme="dark"] .modal-backdrop.fade.in {
    background-color: rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
}

/* Modal close button */
[data-theme="dark"] .modal-header .close,
[data-theme="dark"] .modal-header button[data-dismiss="modal"],
[data-theme="dark"] .modal-header [data-dismiss="modal"],
html[data-theme="dark"] .modal-header .close,
html[data-theme="dark"] .modal-header button[data-dismiss="modal"],
html[data-theme="dark"] .modal-header [data-dismiss="modal"] {
    color: #e0e0e0 !important;
    opacity: 0.8 !important;
}

[data-theme="dark"] .modal-header .close:hover,
[data-theme="dark"] .modal-header button[data-dismiss="modal"]:hover,
html[data-theme="dark"] .modal-header .close:hover,
html[data-theme="dark"] .modal-header button[data-dismiss="modal"]:hover {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Modal text and labels */
[data-theme="dark"] .modal label,
[data-theme="dark"] .modal p,
[data-theme="dark"] .modal span:not(.badge):not([class*="btn"]),
html[data-theme="dark"] .modal label,
html[data-theme="dark"] .modal p,
html[data-theme="dark"] .modal span:not(.badge):not([class*="btn"]) {
    color: #e0e0e0 !important;
}

/* Modal form controls */
[data-theme="dark"] .modal .form-control,
[data-theme="dark"] .modal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="dark"] .modal textarea,
[data-theme="dark"] .modal select,
html[data-theme="dark"] .modal .form-control,
html[data-theme="dark"] .modal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] .modal textarea,
html[data-theme="dark"] .modal select {
    background-color: #2a2a2a !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .modal .form-control:focus,
[data-theme="dark"] .modal input:focus,
[data-theme="dark"] .modal textarea:focus,
[data-theme="dark"] .modal select:focus,
html[data-theme="dark"] .modal .form-control:focus,
html[data-theme="dark"] .modal input:focus,
html[data-theme="dark"] .modal textarea:focus,
html[data-theme="dark"] .modal select:focus {
    background-color: #2a2a2a !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

/* Modal help text */
[data-theme="dark"] .modal .form-text,
[data-theme="dark"] .modal .help-block,
[data-theme="dark"] .modal .text-muted,
html[data-theme="dark"] .modal .form-text,
html[data-theme="dark"] .modal .help-block,
html[data-theme="dark"] .modal .text-muted {
    color: #888888 !important;
}


/* ========================================
   Tabs
   ======================================== */
[data-theme="dark"] .nav-tabs {
    border-bottom-color: var(--color-border-light) !important;
}

[data-theme="dark"] .nav-tabs > li > a {
    color: var(--color-text-secondary) !important;
    background-color: transparent !important;
}

[data-theme="dark"] .nav-tabs > li > a:hover {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .nav-tabs-container,
html[data-theme="dark"] .nav-tabs-container {
    background: var(--color-card-bg, #1e2227) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .nav-tabs-container .nav-tabs,
html[data-theme="dark"] .nav-tabs-container .nav-tabs {
    background: var(--color-bg-secondary, #212529) !important;
    border-bottom-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .nav-tabs-container .nav-tabs > li > a:hover,
html[data-theme="dark"] .nav-tabs-container .nav-tabs > li > a:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1) !important;
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .nav-tabs-container .nav-tabs > li > a:hover i,
html[data-theme="dark"] .nav-tabs-container .nav-tabs > li > a:hover i {
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .nav-tabs > li.active > a,
[data-theme="dark"] .nav-tabs > li.active > a:focus,
[data-theme="dark"] .nav-tabs > li.active > a:hover {
    background-color: var(--color-card-bg, #1e2227) !important;
    border-color: var(--color-border-light, #343a40) !important;
    border-bottom-color: var(--primary-color, #60a5fa) !important;
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .nav-tabs > li.active > a i,
html[data-theme="dark"] .nav-tabs > li.active > a i {
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .tab-content,
[data-theme="dark"] .tab-pane {
    background-color: var(--color-card-bg) !important;
    color: var(--color-text-primary) !important;
}


/* ========================================
   Dropdowns
   ======================================== */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .dropdown-menu > li > a {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .dropdown-menu > li > a:hover,
[data-theme="dark"] .dropdown-menu > li > a:focus {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .dropdown-menu .divider {
    background-color: var(--color-border-light) !important;
}


/* ========================================
   Alerts & Notifications
   ======================================== */
[data-theme="dark"] .alert {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .alert-info {
    background-color: rgba(52, 152, 219, 0.15) !important;
    color: #5dade2 !important;
    border-color: rgba(52, 152, 219, 0.3) !important;
}

[data-theme="dark"] .alert-success {
    background-color: rgba(39, 174, 96, 0.15) !important;
    color: #2ecc71 !important;
    border-color: rgba(39, 174, 96, 0.3) !important;
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(243, 156, 18, 0.15) !important;
    color: #f5b041 !important;
    border-color: rgba(243, 156, 18, 0.3) !important;
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(231, 76, 60, 0.15) !important;
    color: #ec7063 !important;
    border-color: rgba(231, 76, 60, 0.3) !important;
}


/* ========================================
   Breadcrumbs
   ======================================== */
[data-theme="dark"] .page-bar,
[data-theme="dark"] .page-breadcrumb {
    background-color: transparent !important;
}

[data-theme="dark"] .page-breadcrumb li a {
    /* Uses calculated secondary title color for dark backgrounds - ensures WCAG AA compliance */
    color: var(--title-color-secondary-dark, var(--color-text-secondary, #adb5bd)) !important;
}

[data-theme="dark"] .page-breadcrumb li span {
    /* Uses calculated title color for dark backgrounds - ensures WCAG AAA compliance */
    color: var(--title-color-dark-bg, var(--color-text-primary, #f8f9fa)) !important;
}

[data-theme="dark"] .page-breadcrumb li a:hover {
    color: var(--color-text-primary) !important;
}


/* ========================================
   Text & Typography
   ======================================== */
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] a:not(.btn):not([class*="badge"]):not(#scroll-to-top) {
    color: var(--color-primary) !important;
}

[data-theme="dark"] a:not(.btn):not([class*="badge"]):not(#scroll-to-top):hover {
    color: var(--color-primary-light) !important;
}

[data-theme="dark"] hr {
    border-color: var(--color-border-light) !important;
}


/* ========================================
   User Preferences Section
   ======================================== */
[data-theme="dark"] .user-preferences {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .preferences-section {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .preference-item {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .preference-item:hover {
    background-color: var(--color-bg-tertiary) !important;
}

[data-theme="dark"] .preference-item__label,
[data-theme="dark"] .preferences-section__title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .preference-item__help,
[data-theme="dark"] .preferences-section__description {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .preference-select {
    background-color: var(--color-input-bg) !important;
    color: var(--color-input-text) !important;
    border-color: var(--color-input-border) !important;
}

[data-theme="dark"] .preferences-footer {
    background-color: var(--color-bg-secondary) !important;
}

[data-theme="dark"] .preferences-intro {
    background-color: var(--color-secondary) !important;
}


/* ========================================
   Profile Quick Actions
   ======================================== */
[data-theme="dark"] .quick-action-btn {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .quick-action-btn:hover {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-primary) !important;
}


/* ========================================
   Calendar / FullCalendar
   ======================================== */
[data-theme="dark"] .fc,
[data-theme="dark"] .fc-theme-standard {
    --fc-page-bg-color: var(--color-card-bg);
    --fc-neutral-bg-color: var(--color-bg-secondary);
    --fc-border-color: var(--color-border-light);
    --fc-today-bg-color: rgba(52, 152, 219, 0.1);
}

[data-theme="dark"] .fc .fc-daygrid-day,
[data-theme="dark"] .fc .fc-col-header-cell {
    background-color: var(--color-card-bg) !important;
}

[data-theme="dark"] .fc .fc-col-header-cell-cushion,
[data-theme="dark"] .fc .fc-daygrid-day-number {
    color: var(--color-text-primary) !important;
}


/* ========================================
   Scrollbar Styling
   ======================================== */
[data-theme="dark"] {
    --page-scrollbar-track: rgba(0, 0, 0, 0.1);
    --page-scrollbar-thumb: rgba(255, 255, 255, 0.2);
    --page-scrollbar-thumb-hover: rgba(255, 255, 255, 0.3);
}


/* ========================================
   Theme Selector Specific Styles
   ======================================== */
.theme-selector-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    border: 2px solid var(--color-border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--color-bg-secondary);
    min-width: 100px;
}

.theme-option:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--color-primary);
    background-color: rgba(var(--primary-color-rgb, 52, 152, 219), 0.1);
}

.theme-option__icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.theme-option__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.theme-option input[type="radio"] {
    display: none;
}

/* Auto theme icon */
.theme-option[data-theme="auto"] .theme-option__icon::before {
    content: "\f108"; /* desktop icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Light theme icon */
.theme-option[data-theme="light"] .theme-option__icon::before {
    content: "\f185"; /* sun icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #f39c12;
}

/* Dark theme icon */
.theme-option[data-theme="dark"] .theme-option__icon::before {
    content: "\f186"; /* moon icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ffffff;
}

/* ========================================
   File Upload Components
   ======================================== */
[data-theme="dark"] .file-upload-area {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-medium) !important;
}

[data-theme="dark"] .file-upload-area:hover {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-dark) !important;
}

[data-theme="dark"] .file-upload-area.drag-over {
    border-color: var(--color-primary) !important;
    background-color: rgba(52, 152, 219, 0.15) !important;
}

[data-theme="dark"] .file-upload-area.has-file {
    border-color: var(--color-success) !important;
    background-color: rgba(39, 174, 96, 0.15) !important;
}

[data-theme="dark"] .file-upload-area.has-error {
    border-color: var(--color-error) !important;
    background-color: rgba(231, 76, 60, 0.15) !important;
}

[data-theme="dark"] .file-upload-icon {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .file-upload-area:hover .file-upload-icon {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .file-upload-text .main-text {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .file-upload-text .sub-text {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .file-upload-text .browse-link {
    color: var(--color-primary) !important;
}

[data-theme="dark"] .file-preview {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .file-preview-icon {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .file-preview-name {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .file-preview-details {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .file-upload-wrapper.multiple .file-preview-item {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

/* QR Upload Dropzone */
[data-theme="dark"] .qr-upload-dropzone {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-medium) !important;
}

[data-theme="dark"] .qr-upload-dropzone:hover {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-primary) !important;
}

[data-theme="dark"] .qr-upload-dropzone.drag-over {
    background-color: rgba(52, 152, 219, 0.15) !important;
    border-color: var(--color-primary) !important;
}


/* ========================================
   Enhanced Select2 Dark Mode
   ======================================== */
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--color-input-placeholder) !important;
}

[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--color-text-secondary) transparent transparent transparent !important;
}

[data-theme="dark"] .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--color-text-secondary) transparent !important;
}

[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--color-error) !important;
}

[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .select2-container--default .select2-results__group {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .select2-search--inline .select2-search__field {
    color: var(--color-input-text) !important;
}

[data-theme="dark"] .select2-search--inline .select2-search__field::placeholder {
    color: var(--color-input-placeholder) !important;
}

[data-theme="dark"] .select2-multiselect-action {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .select2-multiselect-action:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Select2 Bootstrap Theme Dark Mode */
[data-theme="dark"] .select2-container--bootstrap .select2-selection {
    background-color: var(--color-input-bg) !important;
    border-color: var(--color-input-border) !important;
    color: var(--color-input-text) !important;
}

[data-theme="dark"] .select2-container--bootstrap .select2-dropdown {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-input-border) !important;
}

[data-theme="dark"] .select2-container--bootstrap .select2-results__option {
    background-color: var(--color-card-bg) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .select2-container--bootstrap .select2-results__option--highlighted {
    background-color: var(--color-primary) !important;
    color: #fff !important;
}

/* Select all/remove all buttons */
[data-theme="dark"] .select-all {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .select-all:hover {
    background-color: var(--color-primary) !important;
    color: #fff !important;
}


/* ========================================
   Collection Items / Anexos
   ======================================== */
[data-theme="dark"] .anexo-item,
[data-theme="dark"] .collection-item {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .anexo__display-name {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .anexo__original-name {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .anexo__info {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .modal__anexos-list li {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .modal__anexos-list a {
    color: var(--color-text-primary) !important;
    background-color: var(--color-bg-secondary) !important;
}

[data-theme="dark"] .modal__anexos-list a:hover {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-primary) !important;
}

[data-theme="dark"] .modal__anexos-list a i {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .hora-anexos-list li {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .hora-anexos-list a {
    color: var(--color-text-primary) !important;
    background-color: var(--color-bg-secondary) !important;
}

[data-theme="dark"] .hora-anexos-list a:hover {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-primary) !important;
}

[data-theme="dark"] .anexos-container {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .anexos-container > label {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .modal__section--anexos {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .modal__section--anexos .modal__section-title {
    color: var(--color-text-primary) !important;
}

/* Add collection item button */
[data-theme="dark"] .add-collection-item,
[data-theme="dark"] .add_item_link {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .add-collection-item i,
[data-theme="dark"] .add-collection-item .fa,
[data-theme="dark"] .add_item_link i,
[data-theme="dark"] .add_item_link .fa,
[data-theme="dark"] .add-collection-item [class*="icon"],
[data-theme="dark"] .add_item_link [class*="icon"] {
    color: #ffffff !important;
}

[data-theme="dark"] .add-collection-item:hover,
[data-theme="dark"] .add_item_link:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .add-collection-item:hover i,
[data-theme="dark"] .add-collection-item:hover .fa,
[data-theme="dark"] .add_item_link:hover i,
[data-theme="dark"] .add_item_link:hover .fa,
[data-theme="dark"] .add-collection-item:hover [class*="icon"],
[data-theme="dark"] .add_item_link:hover [class*="icon"] {
    color: #ffffff !important;
}

/* Modal Attachments Container - High Specificity Overrides */
[data-theme="dark"] .modal__attachments-container,
[data-theme="dark"] .modal .modal__attachments-container,
[data-theme="dark"] .modal-form .modal__attachments-container,
[data-theme="dark"] .modal__section .modal__attachments-container {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
}

[data-theme="dark"] .modal__attachments-container .form-group,
[data-theme="dark"] .modal__attachments-container .compound-form {
    background-color: transparent !important;
}

/* Attachment item wrapper (list item with dashed border) - Higher specificity */
[data-theme="dark"] .modal__attachments-container ul li,
[data-theme="dark"] .modal__attachments-container li,
[data-theme="dark"] .modal__attachments-container > ul > li,
[data-theme="dark"] .modal .modal__attachments-container ul li,
[data-theme="dark"] #app_hora_anexos li,
[data-theme="dark"] #pedido_de_ajuste_anexos li,
[data-theme="dark"] form[name="app_hora"] #app_hora_anexos li,
[data-theme="dark"] form[name="pedido_de_ajuste"] #pedido_de_ajuste_anexos li {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    border-style: dashed !important;
}

/* File input wrapper and text input inside attachments - High specificity */
[data-theme="dark"] .modal__attachments-container input[type="text"],
[data-theme="dark"] .modal__attachments-container input[type="file"],
[data-theme="dark"] .modal__attachments-container .form-control,
[data-theme="dark"] .modal__attachments-container .form-control-file,
[data-theme="dark"] #app_hora_anexos input[type="text"],
[data-theme="dark"] #app_hora_anexos input[type="file"],
[data-theme="dark"] #app_hora_anexos .form-control,
[data-theme="dark"] #app_hora_anexos .form-control-file,
[data-theme="dark"] #pedido_de_ajuste_anexos input[type="text"],
[data-theme="dark"] #pedido_de_ajuste_anexos input[type="file"],
[data-theme="dark"] #pedido_de_ajuste_anexos .form-control,
[data-theme="dark"] #pedido_de_ajuste_anexos .form-control-file,
[data-theme="dark"] form[name="app_hora"] #app_hora_anexos input[type="text"],
[data-theme="dark"] form[name="app_hora"] #app_hora_anexos input[type="file"],
[data-theme="dark"] form[name="app_hora"] #app_hora_anexos .form-control,
[data-theme="dark"] form[name="pedido_de_ajuste"] #pedido_de_ajuste_anexos input[type="text"],
[data-theme="dark"] form[name="pedido_de_ajuste"] #pedido_de_ajuste_anexos input[type="file"],
[data-theme="dark"] form[name="pedido_de_ajuste"] #pedido_de_ajuste_anexos .form-control {
    background-color: var(--color-bg-primary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

/* File drop zone - the upload area with icon */
[data-theme="dark"] .modal__attachments-container .file-drop-zone,
[data-theme="dark"] #app_hora_anexos .file-drop-zone,
[data-theme="dark"] #pedido_de_ajuste_anexos .file-drop-zone,
[data-theme="dark"] .modal__attachments-container [data-file-input],
[data-theme="dark"] #app_hora_anexos [data-file-input],
[data-theme="dark"] #pedido_de_ajuste_anexos [data-file-input] {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .modal__attachments-container input::placeholder,
[data-theme="dark"] #app_hora_anexos input::placeholder,
[data-theme="dark"] #pedido_de_ajuste_anexos input::placeholder {
    color: var(--color-text-secondary) !important;
}

/* File upload area inside modal attachments */
[data-theme="dark"] .modal__attachments-container .file-upload-area,
[data-theme="dark"] .modal__attachments-container .dropzone {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
}

/* Labels inside attachments */
[data-theme="dark"] .modal__attachments-container label,
[data-theme="dark"] #app_hora_anexos label,
[data-theme="dark"] #pedido_de_ajuste_anexos label {
    color: var(--color-text-primary) !important;
}

/* Remove button inside attachments */
[data-theme="dark"] .modal__attachments-container .remove-collection-item,
[data-theme="dark"] .modal__attachments-container button[class*="remove"],
[data-theme="dark"] .modal__attachments-container button[class*="delete"],
[data-theme="dark"] #app_hora_anexos button,
[data-theme="dark"] #pedido_de_ajuste_anexos button {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .modal__attachments-container .remove-collection-item:hover,
[data-theme="dark"] .modal__attachments-container button[class*="remove"]:hover,
[data-theme="dark"] .modal__attachments-container button[class*="delete"]:hover,
[data-theme="dark"] #app_hora_anexos button:hover,
[data-theme="dark"] #pedido_de_ajuste_anexos button:hover {
    background-color: var(--color-error) !important;
    border-color: var(--color-error) !important;
    color: #fff !important;
}

/* File upload icon/text inside attachments */
[data-theme="dark"] .modal__attachments-container .file-upload-icon,
[data-theme="dark"] .modal__attachments-container .file-upload-text,
[data-theme="dark"] .modal__attachments-container i {
    color: var(--color-text-secondary) !important;
}


/* ========================================
   Endereco Component
   ======================================== */
[data-theme="dark"] .endereco__container {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .endereco__tabs {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .endereco__tab {
    background-color: transparent !important;
    color: var(--color-text-secondary) !important;
    border-color: transparent !important;
}

[data-theme="dark"] .endereco__tab:hover {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .endereco__tab--active,
[data-theme="dark"] .endereco__tab.active {
    background-color: var(--color-card-bg) !important;
    color: var(--color-text-primary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .endereco__tab-content,
[data-theme="dark"] .endereco__tab-panel {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .endereco__label {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .endereco__input {
    background-color: var(--color-input-bg) !important;
    border-color: var(--color-input-border) !important;
    color: var(--color-input-text) !important;
}

[data-theme="dark"] .endereco__input::placeholder {
    color: var(--color-input-placeholder) !important;
}

[data-theme="dark"] .endereco__input:focus {
    border-color: var(--color-primary) !important;
}

[data-theme="dark"] .endereco__cep-button {
    background-color: var(--color-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .endereco__help-text {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .endereco__field-group {
    color: var(--color-text-primary) !important;
}

/* Map container */
[data-theme="dark"] .endereco__map-container,
[data-theme="dark"] .mapa-container,
[data-theme="dark"] #map {
    border-color: var(--color-border-light) !important;
}


/* ========================================
   Text Contrast & Form Help Text
   ======================================== */
[data-theme="dark"] .text-muted {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .form-text,
[data-theme="dark"] .help-block,
[data-theme="dark"] small.text-muted {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .form-group small,
[data-theme="dark"] .form-group .help-text {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .input-group-addon {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-input-border) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .input-group-text {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-input-border) !important;
    color: var(--color-text-primary) !important;
}

/* Modal section titles and descriptions */
[data-theme="dark"] .modal__section-title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .modal__section-description {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .modal__label {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .modal__value {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .modal__info-text {
    color: var(--color-text-secondary) !important;
}

/* Progress Bars */
[data-theme="dark"] .progress {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .progress-bar {
    background-color: var(--color-primary) !important;
}

/* Stats Cards (Horas do mês/dia) */
[data-theme="dark"] .stats-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .horas-card {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .stats-card__title,
[data-theme="dark"] .stat-card__title,
[data-theme="dark"] .horas-card__title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .stats-card__value,
[data-theme="dark"] .stat-card__value,
[data-theme="dark"] .horas-card__value {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .stats-card__subtitle,
[data-theme="dark"] .stat-card__subtitle,
[data-theme="dark"] .horas-card__subtitle {
    color: var(--color-text-secondary) !important;
}

/* Well / Panel backgrounds */
[data-theme="dark"] .well {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

/* List groups */
[data-theme="dark"] .list-group-item {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .list-group-item:hover {
    background-color: var(--color-bg-secondary) !important;
}

[data-theme="dark"] .list-group-item.active {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

/* Info boxes */
[data-theme="dark"] .info-box,
[data-theme="dark"] .stat-box {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .info-box__content,
[data-theme="dark"] .stat-box__content {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .info-box__label,
[data-theme="dark"] .stat-box__label {
    color: var(--color-text-secondary) !important;
}

/* Badges */
[data-theme="dark"] .badge-default,
[data-theme="dark"] .badge-secondary {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .label-default {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
}

/* Fieldset & Legend */
[data-theme="dark"] fieldset {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] legend {
    color: var(--color-text-primary) !important;
}

/* Tooltips styled as inline help */
[data-theme="dark"] .tooltip-icon,
[data-theme="dark"] .help-icon {
    color: var(--color-text-secondary) !important;
}

/* Character counter */
[data-theme="dark"] .char-counter,
[data-theme="dark"] .character-count {
    color: var(--color-text-secondary) !important;
}

/* Empty state messages */
[data-theme="dark"] .empty-state,
[data-theme="dark"] .no-data,
[data-theme="dark"] .no-results {
    color: var(--color-text-secondary) !important;
}

/* Subheadings and captions */
[data-theme="dark"] .subheading,
[data-theme="dark"] .caption,
[data-theme="dark"] figcaption {
    color: var(--color-text-secondary) !important;
}

/* Page title and subtitle */
[data-theme="dark"] .page-title h1,
[data-theme="dark"] .page-title h2 {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .page-title .subtitle,
[data-theme="dark"] .page-subtitle {
    color: var(--color-text-secondary) !important;
}

/* DataTables info text */
[data-theme="dark"] .dataTables_info {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .dataTables_length label,
[data-theme="dark"] .dataTables_filter label {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .dataTables_length select,
[data-theme="dark"] .dataTables_filter input {
    background-color: var(--color-input-bg) !important;
    border-color: var(--color-input-border) !important;
    color: var(--color-input-text) !important;
}

/* ========================================
   PAGINATION CONTROLS - DARK MODE
   ======================================== */

/* DataTables pagination */
[data-theme="dark"] .dataTables_paginate .paginate_button {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .dataTables_paginate .paginate_button:hover {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .dataTables_paginate .paginate_button.current {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .dataTables_paginate .paginate_button.disabled {
    color: var(--color-text-muted) !important;
    background-color: var(--color-bg-secondary) !important;
}

/* Bootstrap Pagination - General (.page-link class) */
[data-theme="dark"] .pagination .page-link,
html[data-theme="dark"] .pagination .page-link {
    background-color: #2a2f38 !important;
    border-color: #3a4150 !important;
    color: #adb5bd !important;
}

[data-theme="dark"] .pagination .page-link:hover,
html[data-theme="dark"] .pagination .page-link:hover {
    background-color: #3a4150 !important;
    border-color: #4a5568 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .pagination .page-link:focus,
html[data-theme="dark"] .pagination .page-link:focus {
    background-color: #3a4150 !important;
    border-color: #3598dc !important;
    box-shadow: 0 0 0 0.2rem rgba(53, 152, 220, 0.25) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .pagination .page-item.active .page-link,
html[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #3598dc !important;
    border-color: #3598dc !important;
    color: #ffffff !important;
}

[data-theme="dark"] .pagination .page-item.disabled .page-link,
html[data-theme="dark"] .pagination .page-item.disabled .page-link {
    background-color: #1e2227 !important;
    border-color: #2a2f38 !important;
    color: #6c757d !important;
    cursor: not-allowed;
}

/* DataTables Bootstrap Number Pagination (li > a structure) */
[data-theme="dark"] .dataTables_paginate .pagination li a,
html[data-theme="dark"] .dataTables_paginate .pagination li a,
[data-theme="dark"] .paging_bootstrap_number .pagination li a,
html[data-theme="dark"] .paging_bootstrap_number .pagination li a {
    background-color: #2a2f38 !important;
    border-color: #3a4150 !important;
    color: #adb5bd !important;
    transition: all 0.15s ease !important;
}

[data-theme="dark"] .dataTables_paginate .pagination li a:hover,
html[data-theme="dark"] .dataTables_paginate .pagination li a:hover,
[data-theme="dark"] .paging_bootstrap_number .pagination li a:hover,
html[data-theme="dark"] .paging_bootstrap_number .pagination li a:hover {
    background-color: #3a4150 !important;
    border-color: #4a5568 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .dataTables_paginate .pagination li.active a,
html[data-theme="dark"] .dataTables_paginate .pagination li.active a,
[data-theme="dark"] .paging_bootstrap_number .pagination li.active a,
html[data-theme="dark"] .paging_bootstrap_number .pagination li.active a {
    background-color: #3598dc !important;
    border-color: #3598dc !important;
    color: #ffffff !important;
}

[data-theme="dark"] .dataTables_paginate .pagination li.disabled a,
html[data-theme="dark"] .dataTables_paginate .pagination li.disabled a,
[data-theme="dark"] .paging_bootstrap_number .pagination li.disabled a,
html[data-theme="dark"] .paging_bootstrap_number .pagination li.disabled a,
[data-theme="dark"] .dataTables_paginate .pagination li.prev.disabled a,
html[data-theme="dark"] .dataTables_paginate .pagination li.prev.disabled a,
[data-theme="dark"] .dataTables_paginate .pagination li.next.disabled a,
html[data-theme="dark"] .dataTables_paginate .pagination li.next.disabled a {
    background-color: #1e2227 !important;
    border-color: #2a2f38 !important;
    color: #6c757d !important;
    cursor: not-allowed;
}

/* DataTables wrapper pagination with .page-link */
[data-theme="dark"] .dataTables_wrapper .pagination .page-link,
html[data-theme="dark"] .dataTables_wrapper .pagination .page-link {
    background-color: #2a2f38 !important;
    border-color: #3a4150 !important;
    color: #adb5bd !important;
}

[data-theme="dark"] .dataTables_wrapper .pagination .page-link:hover,
html[data-theme="dark"] .dataTables_wrapper .pagination .page-link:hover {
    background-color: #3a4150 !important;
    border-color: #4a5568 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .dataTables_wrapper .pagination .page-item.active .page-link,
html[data-theme="dark"] .dataTables_wrapper .pagination .page-item.active .page-link {
    background-color: var(--primary-color, #3598dc) !important;
    border-color: var(--primary-color, #3598dc) !important;
    color: var(--primary-text-color, #ffffff) !important;
}

/* Pagination input field in dark mode */
[data-theme="dark"] .pagination .page-item.active input.page-input,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .pagination .page-item.active input.page-input,
html[data-theme="dark"] .pagination .page-item.active input.page-input,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .pagination .page-item.active input.page-input {
    background-color: var(--primary-color, #3598dc) !important;
    border-color: var(--primary-color, #3598dc) !important;
    color: var(--primary-text-color, #ffffff) !important;
    width: 45px !important;
    height: 28px !important;
    padding: 0.125rem 0.25rem !important;
    font-size: 0.8125rem !important;
    margin: 0 !important;
}

[data-theme="dark"] .pagination .page-item.active input.page-input:focus,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .pagination .page-item.active input.page-input:focus,
html[data-theme="dark"] .pagination .page-item.active input.page-input:focus,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .pagination .page-item.active input.page-input:focus {
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb, 53, 152, 220), 0.2) !important;
}

[data-theme="dark"] .dataTables_wrapper .pagination .page-item.disabled .page-link,
html[data-theme="dark"] .dataTables_wrapper .pagination .page-item.disabled .page-link {
    background-color: #1e2227 !important;
    border-color: #2a2f38 !important;
    color: #6c757d !important;
}

/* DataTables info text */
[data-theme="dark"] .dataTables_info,
html[data-theme="dark"] .dataTables_info {
    color: var(--color-text-secondary) !important;
}

/* DataTables length selector - Inline with info text */
[data-theme="dark"] .dataTables_length,
html[data-theme="dark"] .dataTables_length {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

[data-theme="dark"] .dataTables_length,
html[data-theme="dark"] .dataTables_length {
    font-size: 0.875rem !important; /* Match info text font size */
    color: var(--color-text-secondary) !important; /* Match info text color */
    line-height: 1.5 !important; /* Match info text line height */
}

[data-theme="dark"] .dataTables_length select,
html[data-theme="dark"] .dataTables_length select {
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px solid currentColor !important;
    color: var(--color-text-secondary) !important; /* Match info text color */
    margin: 0 0.125rem !important;
    padding: 0 0.125rem !important;
    font-size: 0.875rem !important; /* Match info text font size */
    border-radius: 0 !important;
    vertical-align: baseline !important;
    line-height: 1.5 !important; /* Match info text line height */
    font-weight: normal !important;
    text-decoration: none !important;
}

[data-theme="dark"] .dataTables_length .por-pagina-text,
html[data-theme="dark"] .dataTables_length .por-pagina-text {
    font-size: 0.875rem !important; /* Match info text font size */
    color: var(--color-text-secondary) !important; /* Match info text color */
    line-height: 1.5 !important; /* Match info text line height */
    font-weight: normal !important;
}

[data-theme="dark"] .dataTables_length select:focus,
html[data-theme="dark"] .dataTables_length select:focus {
    border-color: var(--primary-color, #3598dc) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 53, 152, 220), 0.1) !important;
}

[data-theme="dark"] .dataTables_length label,
html[data-theme="dark"] .dataTables_length label {
    display: none !important;
}

/* DataTables info - Inline with length selector */
[data-theme="dark"] .dataTables_info,
html[data-theme="dark"] .dataTables_info {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
}

/* DataTables search filter - Full width at top */
[data-theme="dark"] .dataTables_filter,
html[data-theme="dark"] .dataTables_filter {
    width: 100% !important;
    margin-bottom: 1rem !important;
}

[data-theme="dark"] .dataTables_filter input,
html[data-theme="dark"] .dataTables_filter input {
    width: 100% !important;
    background-color: #2a2f38 !important;
    border-color: #3a4150 !important;
    color: #e9ecef !important;
    margin: 0 !important;
}

[data-theme="dark"] .dataTables_filter input::placeholder,
html[data-theme="dark"] .dataTables_filter input::placeholder {
    color: #6c757d !important;
    opacity: 0.7 !important;
}

[data-theme="dark"] .dataTables_filter input:focus,
html[data-theme="dark"] .dataTables_filter input:focus {
    background-color: #2a2f38 !important;
    border-color: var(--primary-color, #3598dc) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 53, 152, 220), 0.1) !important;
    box-shadow: 0 0 0 0.2rem rgba(53, 152, 220, 0.25) !important;
    color: #e9ecef !important;
}

[data-theme="dark"] .dataTables_filter label,
html[data-theme="dark"] .dataTables_filter label {
    color: var(--color-text-secondary) !important;
}

/* DataTables wrapper background */
[data-theme="dark"] .dataTables_wrapper,
html[data-theme="dark"] .dataTables_wrapper {
    background-color: transparent !important;
    color: var(--color-text-primary) !important;
}

/* DataTables Bootstrap specific overrides */
[data-theme="dark"] .dataTables_wrapper .dataTables_scroll,
html[data-theme="dark"] .dataTables_wrapper .dataTables_scroll {
    background-color: transparent !important;
}

[data-theme="dark"] .dataTables_wrapper .dataTables_scrollHead,
html[data-theme="dark"] .dataTables_wrapper .dataTables_scrollHead {
    background-color: transparent !important;
}

[data-theme="dark"] .dataTables_wrapper .dataTables_scrollBody,
html[data-theme="dark"] .dataTables_wrapper .dataTables_scrollBody {
    background-color: transparent !important;
}

[data-theme="dark"] .dataTables_wrapper .dataTables_scrollFoot,
html[data-theme="dark"] .dataTables_wrapper .dataTables_scrollFoot {
    background-color: transparent !important;
}

/* DataTables Bootstrap table wrapper */
[data-theme="dark"] .dataTables_wrapper .table,
html[data-theme="dark"] .dataTables_wrapper .table,
[data-theme="dark"] .dataTables_wrapper table.dataTable,
html[data-theme="dark"] .dataTables_wrapper table.dataTable {
    background-color: var(--color-table-bg) !important;
    color: var(--color-text-primary) !important;
}

/* DataTables processing */
[data-theme="dark"] .dataTables_processing {
    background-color: var(--color-card-bg) !important;
    color: var(--color-text-primary) !important;
}

/* DataTables empty */
[data-theme="dark"] .dataTables_empty {
    color: var(--color-text-secondary) !important;
}


/* ========================================
   FullCalendar Enhanced Dark Mode
   ======================================== */
[data-theme="dark"] .fc {
    --fc-page-bg-color: var(--color-bg-primary);
    --fc-neutral-bg-color: var(--color-bg-secondary);
    --fc-border-color: var(--color-border-light);
    --fc-button-bg-color: var(--color-bg-tertiary);
    --fc-button-border-color: var(--color-border-medium);
    --fc-button-text-color: var(--color-text-primary);
    --fc-button-hover-bg-color: var(--color-primary);
    --fc-button-hover-border-color: var(--color-primary);
    --fc-button-active-bg-color: var(--color-primary);
    --fc-button-active-border-color: var(--color-primary);
    --fc-event-bg-color: var(--color-primary);
    --fc-event-border-color: var(--color-primary);
    --fc-event-text-color: #fff;
    --fc-today-bg-color: rgba(52, 152, 219, 0.15);
    --fc-now-indicator-color: var(--color-error);
    --fc-list-event-hover-bg-color: var(--color-bg-tertiary);
}

[data-theme="dark"] .fc-theme-standard td,
[data-theme="dark"] .fc-theme-standard th {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .fc-theme-standard .fc-scrollgrid {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .fc-scrollgrid {
    width: 100% !important;
}

[data-theme="dark"] .fc-scrollgrid-sync-table {
    width: 100% !important;
    table-layout: fixed !important;
}

[data-theme="dark"] .fc-col-header,
[data-theme="dark"] .fc-daygrid-body {
    width: 100%;
}

[data-theme="dark"] .fc-col-header {
    background-color: var(--color-bg-secondary) !important;
}

/* Header cells and day cells - exact percentage for perfect alignment */
[data-theme="dark"] .fc-col-header-cell,
[data-theme="dark"] .fc-daygrid-day {
    width: 14.285714% !important; /* Exactly 1/7th */
    box-sizing: border-box;
    min-width: 0;
}

[data-theme="dark"] .fc-col-header-cell {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    display: table-cell !important;
    vertical-align: middle;
}

[data-theme="dark"] .fc-col-header-cell-cushion {
    color: var(--color-text-primary) !important;
}

/* Responsive weekday header styling in dark mode */
@media (max-width: 768px) {
    [data-theme="dark"] .fc-scrollgrid-sync-table,
    html[data-theme="dark"] .fc-scrollgrid-sync-table {
        table-layout: fixed !important;
        width: 100% !important;
    }
    
    /* Maintain matching widths for header and day cells */
    [data-theme="dark"] .fc-col-header-cell,
    html[data-theme="dark"] .fc-col-header-cell,
    [data-theme="dark"] .fc-daygrid-day,
    html[data-theme="dark"] .fc-daygrid-day {
        width: 14.285714% !important; /* Exactly 1/7th */
        box-sizing: border-box;
    }
    
    [data-theme="dark"] .fc-col-header-cell,
    html[data-theme="dark"] .fc-col-header-cell {
        padding: 10px 6px !important;
        font-size: 0.9rem;
        min-height: 36px;
        display: table-cell !important;
        vertical-align: middle;
    }
    
    [data-theme="dark"] .fc-col-header-cell-cushion,
    html[data-theme="dark"] .fc-col-header-cell-cushion {
        font-size: 0.9rem;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        line-height: 1.2;
        display: block;
        width: 100%;
    }
}

@media (max-width: 576px) {
    [data-theme="dark"] .fc-scrollgrid-sync-table,
    html[data-theme="dark"] .fc-scrollgrid-sync-table {
        table-layout: fixed !important;
        width: 100% !important;
    }
    
    /* Maintain matching widths for header and day cells */
    [data-theme="dark"] .fc-col-header-cell,
    html[data-theme="dark"] .fc-col-header-cell,
    [data-theme="dark"] .fc-daygrid-day,
    html[data-theme="dark"] .fc-daygrid-day {
        width: 14.285714% !important; /* Exactly 1/7th */
        box-sizing: border-box;
        min-width: 0;
    }
    
    [data-theme="dark"] .fc-col-header-cell,
    html[data-theme="dark"] .fc-col-header-cell {
        padding: 8px 2px !important;
        font-size: 0.75rem !important;
        min-height: 36px;
        display: table-cell !important;
        vertical-align: middle;
        text-align: center;
    }
    
    [data-theme="dark"] .fc-col-header-cell-cushion,
    html[data-theme="dark"] .fc-col-header-cell-cushion {
        font-size: 0.75rem !important;
        font-weight: 600;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        line-height: 1.2;
        display: block;
        width: 100%;
    }
}

[data-theme="dark"] .fc-daygrid-day {
    background-color: var(--color-card-bg) !important;
}

[data-theme="dark"] .fc-daygrid-day-number {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
    color: var(--color-text-muted) !important;
}

[data-theme="dark"] .fc-daygrid-day.fc-day-today {
    background-color: rgba(52, 152, 219, 0.15) !important;
}

[data-theme="dark"] .fc-daygrid-day-frame {
    background-color: transparent !important;
}

[data-theme="dark"] .fc-daygrid-day-events {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .fc-daygrid-more-link {
    color: var(--color-primary) !important;
}

/* Calendar toolbar */
/* Calendar toolbar title - always white on primary color background */
[data-theme="dark"] .fc-toolbar-title,
[data-theme="dark"] .fc-toolbar h2,
[data-theme="dark"] .fc-toolbar-title h2,
[data-theme="dark"] .fc-header-toolbar .fc-toolbar-title,
[data-theme="dark"] .fc-header-toolbar h2,
html[data-theme="dark"] .fc-toolbar-title,
html[data-theme="dark"] .fc-toolbar h2,
html[data-theme="dark"] .fc-toolbar-title h2,
html[data-theme="dark"] .fc-header-toolbar .fc-toolbar-title,
html[data-theme="dark"] .fc-header-toolbar h2 {
    color: #ffffff !important;
}

[data-theme="dark"] .fc-button {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--primary-text-color) !important;
}

[data-theme="dark"] .fc-button:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .fc-button-primary:not(:disabled).fc-button-active,
[data-theme="dark"] .fc-button-primary:not(:disabled):active {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .fc-button:disabled {
    background-color: var(--color-bg-secondary) !important;
    color: var(--color-text-muted) !important;
}

/* Calendar list view */
[data-theme="dark"] .fc-list {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .fc-list-day-cushion {
    background-color: var(--color-bg-secondary) !important;
}

[data-theme="dark"] .fc-list-day-text,
[data-theme="dark"] .fc-list-day-side-text {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .fc-list-event {
    background-color: var(--color-card-bg) !important;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .fc-list-event td {
    transition: background-color 0.2s ease;
}

[data-theme="dark"] .fc-list-event:hover td {
    background-color: var(--color-bg-tertiary) !important;
}

[data-theme="dark"] .fc-list-event:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .fc-list-event:focus-within td {
    background-color: var(--color-bg-tertiary) !important;
}

html[data-theme="dark"] .fc-list-event {
    background-color: var(--color-card-bg) !important;
}

html[data-theme="dark"] .fc-list-event:hover td {
    background-color: var(--color-bg-tertiary) !important;
}

html[data-theme="dark"] .fc-list-event:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .fc-list-event:focus-within td {
    background-color: var(--color-bg-tertiary) !important;
}

[data-theme="dark"] .fc-list-event-time,
[data-theme="dark"] .fc-list-event-title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .fc-list-empty {
    background-color: var(--color-card-bg) !important;
}

[data-theme="dark"] .fc-list-empty-cushion {
    color: var(--color-text-secondary) !important;
}

/* Calendar popover */
[data-theme="dark"] .fc-popover {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .fc-popover-header {
    background-color: var(--color-bg-secondary) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .fc-popover-body {
    background-color: var(--color-card-bg) !important;
}

/* Week/Time grid view */
[data-theme="dark"] .fc-timegrid-slot {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .fc-timegrid-slot-label {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .fc-timegrid-axis {
    background-color: var(--color-bg-secondary) !important;
}

[data-theme="dark"] .fc-timegrid-col {
    background-color: var(--color-card-bg) !important;
}


/* ========================================
   Comprovante / Receipt Modal
   ======================================== */
[data-theme="dark"] .comprovante,
[data-theme="dark"] .recibo,
[data-theme="dark"] .receipt {
    background-color: var(--color-card-bg) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .comprovante__header,
[data-theme="dark"] .recibo__header,
[data-theme="dark"] .receipt__header {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .comprovante__body,
[data-theme="dark"] .recibo__body,
[data-theme="dark"] .receipt__body {
    background-color: var(--color-card-bg) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .comprovante__section,
[data-theme="dark"] .recibo__section,
[data-theme="dark"] .receipt__section {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .comprovante__label,
[data-theme="dark"] .recibo__label,
[data-theme="dark"] .receipt__label {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .comprovante__value,
[data-theme="dark"] .recibo__value,
[data-theme="dark"] .receipt__value {
    color: var(--color-text-primary) !important;
}

/* Assinatura / Signature section */
[data-theme="dark"] .assinatura,
[data-theme="dark"] .signature,
[data-theme="dark"] .assinatura-section,
[data-theme="dark"] .signature-section {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .assinatura__hash,
[data-theme="dark"] .signature__hash,
[data-theme="dark"] .hash-container,
[data-theme="dark"] .hash-value {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .assinatura__status,
[data-theme="dark"] .signature__status {
    color: var(--color-text-primary) !important;
}

/* Legend / Status indicators */
[data-theme="dark"] .legend,
[data-theme="dark"] .status-legend {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .legend__item,
[data-theme="dark"] .status-legend__item {
    color: var(--color-text-primary) !important;
}

/* Badge in dark mode */
[data-theme="dark"] .badge[class*="assinado"],
[data-theme="dark"] .badge[class*="signed"] {
    background-color: var(--color-success) !important;
    color: #fff !important;
}

[data-theme="dark"] .badge[class*="pendente"],
[data-theme="dark"] .badge[class*="pending"] {
    background-color: var(--color-warning) !important;
    color: #000 !important;
}

/* Info cards in modals */
[data-theme="dark"] .info-card,
[data-theme="dark"] .data-card {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .info-card__title,
[data-theme="dark"] .data-card__title {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .info-card__value,
[data-theme="dark"] .data-card__value {
    color: var(--color-text-primary) !important;
}

/* ========================================
   BIOMETRIC MODAL - Dark Mode
   ======================================== */

/* Biometric modal content and body */
[data-theme="dark"] .biometric-modal-content,
html[data-theme="dark"] .biometric-modal-content,
[data-theme="dark"] #sign-selfie-capture-modal .modal-content,
html[data-theme="dark"] #sign-selfie-capture-modal .modal-content,
[data-theme="dark"] #biometric-enrollment-modal .modal-content,
html[data-theme="dark"] #biometric-enrollment-modal .modal-content {
    background-color: #1e1e1e !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .biometric-modal-body,
html[data-theme="dark"] .biometric-modal-body,
[data-theme="dark"] #sign-selfie-capture-modal .modal-body,
html[data-theme="dark"] #sign-selfie-capture-modal .modal-body,
[data-theme="dark"] #biometric-enrollment-modal .modal-body,
html[data-theme="dark"] #biometric-enrollment-modal .modal-body {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

/* Info card - Global dark mode override for all contexts */
html[data-theme="dark"] .info-card,
body[data-theme="dark"] .info-card,
[data-theme="dark"] .modal .info-card,
html[data-theme="dark"] .modal .info-card,
[data-theme="dark"] .modal-body .info-card,
html[data-theme="dark"] .modal-body .info-card {
    background: #2a2a2a !important;
    background-color: #2a2a2a !important;
}

html[data-theme="dark"] .info-card-body,
body[data-theme="dark"] .info-card-body,
[data-theme="dark"] .modal .info-card-body,
html[data-theme="dark"] .modal .info-card-body,
[data-theme="dark"] .modal-body .info-card-body,
html[data-theme="dark"] .modal-body .info-card-body {
    background: #2a2a2a !important;
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}

html[data-theme="dark"] .info-card-body p,
body[data-theme="dark"] .info-card-body p,
[data-theme="dark"] .modal .info-card-body p,
html[data-theme="dark"] .modal .info-card-body p {
    color: #b0b0b0 !important;
}

html[data-theme="dark"] .instruction-list li {
    color: #e0e0e0 !important;
}

html[data-theme="dark"] .instruction-list li span {
    color: #e0e0e0 !important;
}

/* Info card in biometric modal - ultra specific */
[data-theme="dark"] #sign-selfie-capture-modal .info-card,
html[data-theme="dark"] #sign-selfie-capture-modal .info-card,
[data-theme="dark"] #biometric-enrollment-modal .info-card,
html[data-theme="dark"] #biometric-enrollment-modal .info-card,
[data-theme="dark"] .biometric-modal-body .info-card,
html[data-theme="dark"] .biometric-modal-body .info-card {
    background: #2a2a2a !important;
    background-color: #2a2a2a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] #sign-selfie-capture-modal .info-card-body,
html[data-theme="dark"] #sign-selfie-capture-modal .info-card-body,
[data-theme="dark"] #biometric-enrollment-modal .info-card-body,
html[data-theme="dark"] #biometric-enrollment-modal .info-card-body,
[data-theme="dark"] .biometric-modal-body .info-card-body,
html[data-theme="dark"] .biometric-modal-body .info-card-body {
    background: #2a2a2a !important;
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] #sign-selfie-capture-modal .info-card-body p,
html[data-theme="dark"] #sign-selfie-capture-modal .info-card-body p,
[data-theme="dark"] #biometric-enrollment-modal .info-card-body p,
html[data-theme="dark"] #biometric-enrollment-modal .info-card-body p,
[data-theme="dark"] .biometric-modal-body .info-card-body p,
html[data-theme="dark"] .biometric-modal-body .info-card-body p {
    color: #b0b0b0 !important;
}

/* Instruction list in biometric modal - ultra specific to override inline styles */
[data-theme="dark"] #sign-selfie-capture-modal .instruction-list li,
html[data-theme="dark"] #sign-selfie-capture-modal .instruction-list li,
[data-theme="dark"] #biometric-enrollment-modal .instruction-list li,
html[data-theme="dark"] #biometric-enrollment-modal .instruction-list li,
[data-theme="dark"] .biometric-modal-body .instruction-list li,
html[data-theme="dark"] .biometric-modal-body .instruction-list li,
[data-theme="dark"] .modal .instruction-list li,
html[data-theme="dark"] .modal .instruction-list li,
[data-theme="dark"] .modal-body .instruction-list li,
html[data-theme="dark"] .modal-body .instruction-list li {
    color: #e0e0e0 !important;
    border-bottom-color: #3a3a3a !important;
}

[data-theme="dark"] #sign-selfie-capture-modal .instruction-list li span,
html[data-theme="dark"] #sign-selfie-capture-modal .instruction-list li span,
[data-theme="dark"] #biometric-enrollment-modal .instruction-list li span,
html[data-theme="dark"] #biometric-enrollment-modal .instruction-list li span,
[data-theme="dark"] .biometric-modal-body .instruction-list li span,
html[data-theme="dark"] .biometric-modal-body .instruction-list li span {
    color: #e0e0e0 !important;
}

/* Instruction box in biometric modal */
[data-theme="dark"] #sign-selfie-capture-modal .instruction-box,
html[data-theme="dark"] #sign-selfie-capture-modal .instruction-box,
[data-theme="dark"] #biometric-enrollment-modal .instruction-box,
html[data-theme="dark"] #biometric-enrollment-modal .instruction-box,
[data-theme="dark"] .biometric-modal-body .instruction-box,
html[data-theme="dark"] .biometric-modal-body .instruction-box {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a2a3f 100%) !important;
    border-left-color: #3b82f6 !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] #sign-selfie-capture-modal .instruction-box i,
html[data-theme="dark"] #sign-selfie-capture-modal .instruction-box i,
[data-theme="dark"] #biometric-enrollment-modal .instruction-box i,
html[data-theme="dark"] #biometric-enrollment-modal .instruction-box i {
    color: #60a5fa !important;
}

/* Preview section in biometric modal */
[data-theme="dark"] #sign-selfie-capture-modal .preview-header h5,
html[data-theme="dark"] #sign-selfie-capture-modal .preview-header h5,
[data-theme="dark"] #biometric-enrollment-modal .preview-header h5,
html[data-theme="dark"] #biometric-enrollment-modal .preview-header h5 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] #sign-selfie-capture-modal .preview-text,
html[data-theme="dark"] #sign-selfie-capture-modal .preview-text,
[data-theme="dark"] #biometric-enrollment-modal .preview-text,
html[data-theme="dark"] #biometric-enrollment-modal .preview-text {
    color: #b0b0b0 !important;
}

[data-theme="dark"] #sign-selfie-capture-modal .preview-image-wrapper,
html[data-theme="dark"] #sign-selfie-capture-modal .preview-image-wrapper,
[data-theme="dark"] #biometric-enrollment-modal .preview-image-wrapper,
html[data-theme="dark"] #biometric-enrollment-modal .preview-image-wrapper {
    background-color: #2a2a2a !important;
}

/* Processing text in biometric modal */
[data-theme="dark"] #sign-selfie-capture-modal .processing-text,
html[data-theme="dark"] #sign-selfie-capture-modal .processing-text,
[data-theme="dark"] #biometric-enrollment-modal .processing-text,
html[data-theme="dark"] #biometric-enrollment-modal .processing-text {
    color: #b0b0b0 !important;
}

/* Button styles in biometric modal */
[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn,
html[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn,
[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn,
html[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn,
[data-theme="dark"] .biometric-modal-body .btn-default,
html[data-theme="dark"] .biometric-modal-body .btn-default {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn > i,
html[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn > i,
[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn > .fa,
html[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn > .fa,
[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn > i,
html[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn > i,
[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn > .fa,
html[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn > .fa,
[data-theme="dark"] .biometric-modal-body .btn-default > i,
html[data-theme="dark"] .biometric-modal-body .btn-default > i,
[data-theme="dark"] .biometric-modal-body .btn-default > .fa,
html[data-theme="dark"] .biometric-modal-body .btn-default > .fa {
    color: #e0e0e0 !important;
}

[data-theme="dark"] #face-punch-inline .biometric-secondary-btn > i,
html[data-theme="dark"] #face-punch-inline .biometric-secondary-btn > i,
[data-theme="dark"] #face-punch-inline .biometric-secondary-btn > .fa,
html[data-theme="dark"] #face-punch-inline .biometric-secondary-btn > .fa {
    color: #f5f5f5 !important;
}

[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn:hover,
html[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn:hover,
[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn:hover,
html[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn:hover,
[data-theme="dark"] .biometric-modal-body .btn-default:hover,
html[data-theme="dark"] .biometric-modal-body .btn-default:hover {
    background-color: #4a4a4a !important;
    border-color: #5a5a5a !important;
}

[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn:hover > i,
html[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn:hover > i,
[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn:hover > .fa,
html[data-theme="dark"] #sign-selfie-capture-modal .biometric-secondary-btn:hover > .fa,
[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn:hover > i,
html[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn:hover > i,
[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn:hover > .fa,
html[data-theme="dark"] #biometric-enrollment-modal .biometric-secondary-btn:hover > .fa,
[data-theme="dark"] .biometric-modal-body .btn-default:hover > i,
html[data-theme="dark"] .biometric-modal-body .btn-default:hover > i,
[data-theme="dark"] .biometric-modal-body .btn-default:hover > .fa,
html[data-theme="dark"] .biometric-modal-body .btn-default:hover > .fa {
    color: #e0e0e0 !important;
}

/* Consent container in biometric enrollment modal */
[data-theme="dark"] #biometric-enrollment-modal .consent-container,
html[data-theme="dark"] #biometric-enrollment-modal .consent-container {
    background-color: #2a2a2a !important;
}

[data-theme="dark"] #biometric-enrollment-modal .consent-header,
html[data-theme="dark"] #biometric-enrollment-modal .consent-header {
    color: #e0e0e0 !important;
}

[data-theme="dark"] #biometric-enrollment-modal .consent-content,
html[data-theme="dark"] #biometric-enrollment-modal .consent-content {
    background-color: #1e1e1e !important;
    color: #b0b0b0 !important;
}

[data-theme="dark"] #biometric-enrollment-modal .consent-checkbox-wrapper,
html[data-theme="dark"] #biometric-enrollment-modal .consent-checkbox-wrapper {
    color: #e0e0e0 !important;
}

/* Biometric form inputs */
[data-theme="dark"] #biometric-enrollment-modal .biometric-input,
html[data-theme="dark"] #biometric-enrollment-modal .biometric-input,
[data-theme="dark"] #sign-selfie-capture-modal .biometric-input,
html[data-theme="dark"] #sign-selfie-capture-modal .biometric-input {
    background-color: #1e1e1e !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] #biometric-enrollment-modal .biometric-label,
html[data-theme="dark"] #biometric-enrollment-modal .biometric-label {
    color: #e0e0e0 !important;
}

[data-theme="dark"] #biometric-enrollment-modal .form-text,
html[data-theme="dark"] #biometric-enrollment-modal .form-text,
[data-theme="dark"] #biometric-enrollment-modal .text-muted,
html[data-theme="dark"] #biometric-enrollment-modal .text-muted {
    color: #888888 !important;
}

/* Dividers */
[data-theme="dark"] .divider,
[data-theme="dark"] .separator {
    background-color: var(--color-border-light) !important;
    border-color: var(--color-border-light) !important;
}

/* Code blocks / hash display */
[data-theme="dark"] code,
[data-theme="dark"] pre,
[data-theme="dark"] .code-block {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-primary) !important;
}


/* ========================================
   Modal Info Card & Comprovante Specific
   ======================================== */
[data-theme="dark"] .modal__info-card {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .modal__info-grid {
    background-color: var(--color-card-bg) !important;
}

[data-theme="dark"] .modal__info-item {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .modal__info-label {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .modal__info-value {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .modal__info-value--empty {
    color: var(--color-text-muted) !important;
}

/* Modal sections */
[data-theme="dark"] .modal__section {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

/* Signature section */
[data-theme="dark"] .modal__signature-info {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .modal__signature-status {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .modal__signature-status--signed {
    color: var(--color-success) !important;
}

[data-theme="dark"] .modal__signature-status--pending {
    color: var(--color-warning) !important;
}

[data-theme="dark"] .modal__hash-container {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-medium) !important;
}

[data-theme="dark"] .modal__hash-label {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .modal__hash-value {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
    border-color: var(--color-border-medium) !important;
}

/* Biometric section */
[data-theme="dark"] .modal__section--biometric {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .modal__biometric-info {
    background-color: var(--color-bg-secondary) !important;
    color: var(--color-text-primary) !important;
}


/* ========================================
   Ghost Loaders / Skeleton Screens
   ======================================== */

/* Base ghost loader container */
[data-theme="dark"] .ghost-loader-container {
    background-color: var(--color-bg-primary) !important;
}

/* Ghost header */
[data-theme="dark"] .ghost-header {
    background: linear-gradient(to right, var(--color-bg-tertiary), var(--color-bg-secondary)) !important;
    border-bottom-color: var(--color-border-light) !important;
}

[data-theme="dark"] .ghost-logo,
[data-theme="dark"] .ghost-user-menu {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Ghost sidebar */
[data-theme="dark"] .ghost-sidebar {
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%) !important;
    border-right-color: var(--color-border-light) !important;
}

[data-theme="dark"] .ghost-menu-item {
    background: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .ghost-menu-heading {
    background: rgba(255, 255, 255, 0.12) !important;
}

/* Ghost content */
[data-theme="dark"] .ghost-content {
    background-color: var(--color-bg-primary) !important;
}

/* Skeleton base - dark shimmer effect */
[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .skeleton-text,
[data-theme="dark"] .skeleton-title,
[data-theme="dark"] .skeleton-button,
[data-theme="dark"] .skeleton-avatar,
[data-theme="dark"] .skeleton-icon,
[data-theme="dark"] .skeleton-label,
[data-theme="dark"] .skeleton-input,
[data-theme="dark"] .skeleton-chart {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

/* Skeleton card */
[data-theme="dark"] .skeleton-card {
    background: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Skeleton table */
[data-theme="dark"] .skeleton-table-row {
    background: var(--color-bg-secondary) !important;
}

[data-theme="dark"] .skeleton-table-cell {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

/* Skeleton breadcrumb */
[data-theme="dark"] .skeleton-breadcrumb-item,
[data-theme="dark"] .skeleton-breadcrumb-separator {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

/* Relatorio-specific skeleton styles */
[data-theme="dark"] .skeleton-filter-body {
    background: linear-gradient(to bottom, var(--color-bg-secondary) 0%, var(--color-bg-primary) 100%) !important;
}

[data-theme="dark"] .skeleton-preset-btn {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .skeleton-filter-section {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08) 0%, rgba(155, 89, 182, 0.08) 100%) !important;
    border-color: rgba(52, 152, 219, 0.25) !important;
}

[data-theme="dark"] .skeleton-section-header {
    border-bottom-color: rgba(52, 152, 219, 0.3) !important;
}

/* Calendar Ghost Loader */
[data-theme="dark"] #calendar-ghost-loader {
    background: var(--color-card-bg) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .calendar-skeleton-header {
    background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-secondary)) !important;
}

[data-theme="dark"] .calendar-skeleton-title,
[data-theme="dark"] .calendar-skeleton-google-btn,
[data-theme="dark"] .calendar-skeleton-nav-btn {
    background: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .calendar-skeleton-fab {
    background: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .calendar-skeleton-button {
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .calendar-skeleton-grid {
    background: var(--color-border-light) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .calendar-skeleton-weekday {
    background: var(--color-bg-secondary) !important;
}

[data-theme="dark"] .calendar-skeleton-weekday-text {
    background: linear-gradient(90deg, #2d3238 0%, #3a4049 50%, #2d3238 100%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .calendar-skeleton-day {
    background: var(--color-card-bg) !important;
}

[data-theme="dark"] .calendar-skeleton-day-number {
    background: linear-gradient(90deg, #2d3238 0%, #3a4049 50%, #2d3238 100%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .calendar-skeleton-event {
    background: linear-gradient(90deg, #3a4049 0%, #4a5059 50%, #3a4049 100%) !important;
    background-size: 200% 100% !important;
}

/* Modal ghost loader */
[data-theme="dark"] .modal-ghost-loader,
[data-theme="dark"] .ghost-loader-modal {
    background-color: var(--color-card-bg) !important;
}

[data-theme="dark"] .modal-skeleton,
[data-theme="dark"] .modal-skeleton-header,
[data-theme="dark"] .modal-skeleton-body {
    background-color: var(--color-card-bg) !important;
}

[data-theme="dark"] .modal-skeleton-title,
[data-theme="dark"] .modal-skeleton-content,
[data-theme="dark"] .modal-skeleton-footer {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

/* Tab skeleton loaders (Hora page) */
[data-theme="dark"] .tab-skeleton-loader {
    background-color: var(--color-bg-primary) !important;
}

[data-theme="dark"] .tab-skeleton-overlay {
    background: var(--color-card-bg) !important;
}

[data-theme="dark"] .tab-skeleton-alert {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .tab-skeleton-balance,
[data-theme="dark"] .tab-skeleton-form {
    background: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .tab-skeleton-balance__icon,
[data-theme="dark"] .tab-skeleton-balance__title,
[data-theme="dark"] .tab-skeleton-balance__value,
[data-theme="dark"] .tab-skeleton-balance__period,
[data-theme="dark"] .tab-skeleton-form__label,
[data-theme="dark"] .tab-skeleton-form__input,
[data-theme="dark"] .tab-skeleton-form__textarea,
[data-theme="dark"] .tab-skeleton-button {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .tab-skeleton-clock__face,
[data-theme="dark"] .tab-skeleton-clock__time,
[data-theme="dark"] .tab-skeleton-clock__btn {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .tab-skeleton-qr__scanner,
[data-theme="dark"] .tab-skeleton-qr__text,
[data-theme="dark"] .tab-skeleton-qr__btn {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

/* Camera/processing skeleton loaders (Biometric pages) */
[data-theme="dark"] .camera-skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .processing-skeleton {
    background: linear-gradient(90deg, #2d3238 25%, #3a4049 50%, #2d3238 75%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .modal-skeleton-loader {
    background: var(--color-card-bg) !important;
}

[data-theme="dark"] .skeleton-loader {
    background: var(--color-card-bg) !important;
}

[data-theme="dark"] .skeleton-circle {
    background: rgba(52, 152, 219, 0.2) !important;
}

[data-theme="dark"] .skeleton-circle i {
    color: #3498db !important;
}

/* Loading spinner/indicator overlays */
[data-theme="dark"] .loading-overlay,
[data-theme="dark"] .loader-overlay {
    background-color: rgba(26, 29, 33, 0.8) !important;
}

[data-theme="dark"] .loading-spinner-container {
    background-color: var(--color-card-bg) !important;
}


/* ========================================
   Dashboard Components
   ======================================== */

/* Dashboard color palette dark mode overrides */
[data-theme="dark"] {
    --dash-card-bg: var(--color-card-bg);
    --dash-card-border: var(--color-border-light);
    --dash-card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --dash-card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --dash-text-primary: var(--color-text-primary);
    --dash-text-secondary: var(--color-text-secondary);
    --dash-text-muted: var(--color-text-muted);
    --dash-bg-primary: var(--color-bg-primary);
    --dash-bg-secondary: var(--color-bg-secondary);
}

/* Dashboard container */
[data-theme="dark"] .dashboard-container {
    background-color: var(--color-bg-primary) !important;
}

/* Dashboard section title */
[data-theme="dark"] .dashboard-section-title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .dashboard-section-title i {
    color: var(--color-text-secondary) !important;
}

/* Stats cards */
[data-theme="dark"] .stat-card {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .stat-card-header {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .stat-card-title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .stat-card-icon {
    background-color: var(--color-bg-secondary) !important;
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .stat-card-value {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .stat-card-goal {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .stat-card-footer {
    color: var(--color-text-secondary) !important;
    border-top-color: var(--color-border-light) !important;
}

[data-theme="dark"] .stat-progress-text {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .stat-progress-bar {
    background-color: var(--color-bg-tertiary) !important;
}

/* Stat card variants */
[data-theme="dark"] .stat-card.today .stat-card-icon {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .stat-card.week .stat-card-icon {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .stat-card.month .stat-card-icon {
    background-color: rgba(139, 92, 246, 0.15) !important;
    color: #a78bfa !important;
}

[data-theme="dark"] .stat-card.bank .stat-card-icon {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .stat-card.negative .stat-card-value {
    color: #f87171 !important;
}

/* Quick actions widget */
[data-theme="dark"] .quick-actions-widget {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .quick-actions-title {
    color: var(--color-text-primary) !important;
    border-bottom-color: var(--color-border-light) !important;
}

[data-theme="dark"] .quick-action {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .quick-action:hover {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-primary) !important;
}

[data-theme="dark"] .quick-action-icon {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-primary) !important;
}

[data-theme="dark"] .quick-action:hover .quick-action-icon {
    background-color: var(--color-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .quick-action-label {
    color: var(--color-text-primary) !important;
}

/* Dashboard cards */
[data-theme="dark"] .dashboard-card {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .dashboard-card-header {
    background-color: var(--color-bg-secondary) !important;
    border-bottom-color: var(--color-border-light) !important;
}

[data-theme="dark"] .dashboard-card-title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .dashboard-card-body {
    background-color: var(--color-card-bg) !important;
    color: var(--color-text-primary) !important;
}

/* Dashboard empty state */
[data-theme="dark"] .dashboard-empty-state {
    background-color: var(--color-bg-secondary) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .empty-state-icon {
    color: var(--color-text-muted) !important;
}

[data-theme="dark"] .empty-state-title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .empty-state-message {
    color: var(--color-text-secondary) !important;
}

/* Dashboard stats section (relatorio) */
[data-theme="dark"] .dashboard-stats-section {
    background-color: var(--color-card-bg) !important;
}

[data-theme="dark"] .dashboard-stats-subtitle {
    color: var(--color-text-secondary) !important;
}

/* Stat card BEM variants */
[data-theme="dark"] .stat-card__icon {
    background-color: var(--color-bg-tertiary) !important;
}

[data-theme="dark"] .stat-card__value {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .stat-card__label {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .stat-card__sublabel {
    color: var(--color-text-secondary) !important;
}

/* Dashboard cards */
[data-theme="dark"] .weather-card,
[data-theme="dark"] .birthday-card {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .weather-card-header,
[data-theme="dark"] .birthday-card-header {
    border-bottom-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .birthday-item {
    border-bottom-color: var(--color-border-light) !important;
}

[data-theme="dark"] .birthday-item:hover {
    background-color: var(--color-bg-secondary) !important;
}

[data-theme="dark"] .birthday-name {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .birthday-date {
    color: var(--color-text-secondary) !important;
}

/* Date filter in dashboard */
[data-theme="dark"] .date-filter-container {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

/* Charts container background fix */
[data-theme="dark"] .dashboard-card-body[style*="background: #f9fafb"] {
    background-color: var(--color-bg-secondary) !important;
}


/* ========================================
   Dashboard Filter Section
   ======================================== */

/* Filter card */
[data-theme="dark"] .filter-card,
[data-theme="dark"] .date-filter,
[data-theme="dark"] .filtros-card,
[data-theme="dark"] [class*="filter-section"] {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .filter-card-header,
[data-theme="dark"] .filtros-header {
    background-color: var(--color-bg-secondary) !important;
    border-bottom-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .filter-card-title,
[data-theme="dark"] .filtros-title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .filter-card-subtitle {
    color: var(--color-text-secondary) !important;
}

/* Quick filter buttons */
[data-theme="dark"] .quick-filter-btn,
[data-theme="dark"] .btn-filter,
[data-theme="dark"] .date-filter-btn,
[data-theme="dark"] .filter-btn,
[data-theme="dark"] .btn-outline-secondary {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .quick-filter-btn:hover,
[data-theme="dark"] .btn-filter:hover,
[data-theme="dark"] .date-filter-btn:hover,
[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .quick-filter-btn.active,
[data-theme="dark"] .btn-filter.active,
[data-theme="dark"] .date-filter-btn.active,
[data-theme="dark"] .filter-btn.active {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

/* Date inputs in filters */
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="datetime-local"] {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1) !important;
}

/* Dashboard news states */
[data-theme="dark"] .dashboard-news__state {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .dashboard-news__state.is-empty {
    background-color: var(--color-bg-secondary) !important;
    color: var(--color-text-primary) !important;
}

/* Alert/Info messages in cards */
[data-theme="dark"] .alert-info,
[data-theme="dark"] .info-message,
[data-theme="dark"] .dashboard-card--empty .dashboard-card-body {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: var(--color-text-primary) !important;
}

/* News items */
[data-theme="dark"] .news-item {
    background-color: transparent !important;
    border-bottom-color: var(--color-border-light) !important;
}

[data-theme="dark"] .news-icon {
    background-color: var(--color-bg-tertiary) !important;
}

/* Filtros section specifically */
[data-theme="dark"] .holerite-filters,
[data-theme="dark"] .filtros-container,
[data-theme="dark"] [data-test-id*="filter"] {
    background-color: var(--color-card-bg) !important;
}

/* Inline backgrounds in style attributes */
[data-theme="dark"] [style*="background: #f9fafb"],
[data-theme="dark"] [style*="background:#f9fafb"],
[data-theme="dark"] [style*="background: rgb(249, 250, 251)"] {
    background-color: var(--color-bg-secondary) !important;
}

[data-theme="dark"] [style*="border-bottom: 1px solid #e5e7eb"],
[data-theme="dark"] [style*="border: 1px solid #e5e7eb"] {
    border-color: var(--color-border-light) !important;
}


/* ========================================
   Relatorio Filter Card (specific styles)
   ======================================== */

/* Filter card container */
[data-theme="dark"] .relatorio-filter-card {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

/* Filter header */
[data-theme="dark"] .filter-header {
    background-color: var(--color-bg-secondary) !important;
    border-bottom-color: var(--color-border-light) !important;
}

[data-theme="dark"] .filter-header-content {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .filter-title {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .filter-title i {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .filter-subtitle {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .filter-toggle {
    background-color: transparent !important;
    color: var(--color-text-secondary) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .filter-toggle:hover {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
}

/* Filter body */
[data-theme="dark"] .filter-body {
    background-color: var(--color-card-bg) !important;
}

/* Date preset buttons */
[data-theme="dark"] .date-presets {
    background-color: transparent !important;
}

[data-theme="dark"] .date-preset-btn {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .date-preset-btn:hover {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .date-preset-btn.active {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .date-preset-btn i {
    color: inherit !important;
}

/* Filter sections */
[data-theme="dark"] .filter-section {
    background-color: transparent !important;
}

[data-theme="dark"] .filter-section-header {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .filter-section-header i {
    color: var(--color-text-muted) !important;
}

[data-theme="dark"] .filter-divider {
    border-color: var(--color-border-light) !important;
    background-color: var(--color-border-light) !important;
}

/* Filter row and fields */
[data-theme="dark"] .filter-row,
[data-theme="dark"] .filter-main-row {
    background-color: transparent !important;
}

[data-theme="dark"] .filter-field label,
[data-theme="dark"] .filter-field .control-label {
    color: var(--color-text-secondary) !important;
}

/* Clear and submit buttons */
[data-theme="dark"] .btn-filter-clear,
[data-theme="dark"] .btn-secondary {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .btn-filter-clear:hover,
[data-theme="dark"] .btn-secondary:hover {
    background-color: var(--color-bg-tertiary) !important;
    border-color: var(--color-text-muted) !important;
}

/* LIMPAR button specific style */
[data-theme="dark"] #clearFilters {
    background-color: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] #clearFilters:hover {
    background-color: var(--color-bg-tertiary) !important;
}


/* ========================================
   Dashboard News Components
   ======================================== */

/* Dashboard news component */
[data-theme="dark"] .dashboard-news {
    background-color: transparent !important;
}

[data-theme="dark"] .dashboard-news__state {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .dashboard-news__state.is-empty {
    background-color: var(--color-bg-secondary) !important;
    border-radius: 8px;
    padding: 1rem;
}

/* Empty state in dashboard cards */
[data-theme="dark"] .dashboard-card--empty .dashboard-card-body,
[data-theme="dark"] .dashboard-card-body .is-empty {
    background-color: var(--color-bg-secondary) !important;
    color: var(--color-text-primary) !important;
}

/* Dashboard alert/info boxes */
[data-theme="dark"] .dashboard-info-box,
[data-theme="dark"] .dashboard-alert {
    background-color: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: var(--color-text-primary) !important;
}

/* Stats cards in relatorio dashboard */
[data-theme="dark"] .stat-card--neutral,
[data-theme="dark"] .stat-card--info,
[data-theme="dark"] .stat-card--success,
[data-theme="dark"] .stat-card--warning,
[data-theme="dark"] .stat-card--danger {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .stat-card--neutral .stat-card__icon {
    background-color: var(--color-bg-tertiary) !important;
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .stat-card--info .stat-card__icon {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .stat-card--success .stat-card__icon {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .stat-card--warning .stat-card__icon {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .stat-card--danger .stat-card__icon {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}


/* ========================================
   Blue Text (#3498db) Override to White
   In dark mode, use white instead of blue for text
   ======================================== */

/* Links and text with blue color */
[data-theme="dark"] a[style*="color: #3498db"],
[data-theme="dark"] a[style*="color:#3498db"],
[data-theme="dark"] [style*="color: #3498db"],
[data-theme="dark"] [style*="color:#3498db"] {
    color: #ffffff !important;
}

/* Sidebar blue text */
[data-theme="dark"] .sidebar-nav-link.active,
[data-theme="dark"] .sidebar-nav-item.active .sidebar-nav-link,
[data-theme="dark"] .sidebar-nav-link:hover {
    color: #ffffff !important;
}

/* Breadcrumbs blue text */
[data-theme="dark"] .breadcrumb-link,
[data-theme="dark"] .breadcrumb a,
[data-theme="dark"] .breadcrumb-item a {
    color: #ffffff !important;
}

/* Table action links */
[data-theme="dark"] .action-link,
[data-theme="dark"] .table-action,
[data-theme="dark"] .dataTables_wrapper a {
    color: #ffffff !important;
}

/* Table Action Buttons - Enhanced Dark Mode Styling */
[data-theme="dark"] .table-action-btn,
html[data-theme="dark"] .table-action-btn {
    background-color: transparent !important;
    border-color: #495057 !important;
    color: #adb5bd !important;
    transition: all 0.2s ease !important;
}

[data-theme="dark"] .table-action-btn:hover,
html[data-theme="dark"] .table-action-btn:hover {
    background-color: #3598dc !important;
    border-color: #3598dc !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(53, 152, 220, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Action buttons on hovered rows - more visible */
[data-theme="dark"] .table tbody tr:hover .table-action-btn,
html[data-theme="dark"] .table tbody tr:hover .table-action-btn {
    border-color: #6c757d !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .table tbody tr:hover .table-action-btn:hover,
html[data-theme="dark"] .table tbody tr:hover .table-action-btn:hover {
    background-color: #3598dc !important;
    border-color: #3598dc !important;
    color: #ffffff !important;
}

/* Action-view buttons in dark mode - ensure good contrast */
[data-theme="dark"] .table-action-btn.action-view,
html[data-theme="dark"] .table-action-btn.action-view {
    border-color: #6c757d !important;
    color: #adb5bd !important;
}

[data-theme="dark"] .table-action-btn.action-view:hover,
html[data-theme="dark"] .table-action-btn.action-view:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

[data-theme="dark"] .table-action-btn.action-view i,
[data-theme="dark"] .table-action-btn.action-view .fa,
html[data-theme="dark"] .table-action-btn.action-view i,
html[data-theme="dark"] .table-action-btn.action-view .fa {
    color: inherit !important;
}

/* Info colored text */
[data-theme="dark"] .text-info,
[data-theme="dark"] .text-primary {
    color: #ffffff !important;
}

/* Form links and help text links */
[data-theme="dark"] .form-text a,
[data-theme="dark"] .help-block a,
[data-theme="dark"] .help-text a {
    color: #ffffff !important;
}

/* Card and panel links */
[data-theme="dark"] .card a:not(.btn),
[data-theme="dark"] .panel a:not(.btn),
[data-theme="dark"] .dashboard-card a:not(.btn) {
    color: #ffffff !important;
}

/* Modal links */
[data-theme="dark"] .modal-body a:not(.btn),
[data-theme="dark"] .modal__content a:not(.btn) {
    color: #ffffff !important;
}

/* Navigation and menu links */
[data-theme="dark"] .nav-link.active,
[data-theme="dark"] .nav-tabs .nav-link.active {
    color: #ffffff !important;
}

/* Alert and info box links */
[data-theme="dark"] .alert a,
[data-theme="dark"] .info-box a {
    color: #ffffff !important;
}

/* QR code tab links */
[data-theme="dark"] .qr-code-tab a:not(.btn) {
    color: #ffffff !important;
}

/* Generic blue links override */
[data-theme="dark"] a.text-primary,
[data-theme="dark"] a.text-info {
    color: #ffffff !important;
}


/* ========================================
   Sidebar Menu Items - Force White Text
   ======================================== */

/* ALL sidebar links - force white */
[data-theme="dark"] .page-sidebar a,
[data-theme="dark"] .page-sidebar-menu a,
[data-theme="dark"] .page-sidebar-menu li a,
[data-theme="dark"] .page-sidebar-menu ul a,
[data-theme="dark"] .page-sidebar-menu .nav-link,
[data-theme="dark"] .page-sidebar-menu a.nav-link,
[data-theme="dark"] .page-sidebar .nav-link,
[data-theme="dark"] .sidebar .nav-link,
[data-theme="dark"] .page-sidebar-menu > li > a,
[data-theme="dark"] .page-sidebar-menu > li.nav-item > a,
[data-theme="dark"] .page-sidebar-menu li.nav-item a.nav-link {
    color: #ffffff !important;
}

/* Sidebar menu item title/text */
[data-theme="dark"] .page-sidebar-menu .title,
[data-theme="dark"] .page-sidebar-menu span.title,
[data-theme="dark"] .page-sidebar .title,
[data-theme="dark"] .sidebar .title,
[data-theme="dark"] .page-sidebar-menu > li > a > span.title,
[data-theme="dark"] .page-sidebar-menu > li.nav-item > a > span.title {
    color: #ffffff !important;
}

/* Sidebar menu icons */
[data-theme="dark"] .page-sidebar-menu > li > a > i,
[data-theme="dark"] .page-sidebar-menu > li.nav-item > a > i {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .page-sidebar-menu > li > a:hover > i,
[data-theme="dark"] .page-sidebar-menu > li.nav-item > a:hover > i {
    color: #ffffff !important;
}

/* Active menu item */
[data-theme="dark"] .page-sidebar-menu > li.nav-item.active > a,
[data-theme="dark"] .page-sidebar-menu > li.nav-item > a.active,
[data-theme="dark"] .page-sidebar-menu > li.active > a {
    color: #ffffff !important;
}

[data-theme="dark"] .page-sidebar-menu > li.nav-item.active > a > span.title,
[data-theme="dark"] .page-sidebar-menu > li.nav-item > a.active > span.title {
    color: #ffffff !important;
}

[data-theme="dark"] .page-sidebar-menu > li.nav-item.active > a > i {
    color: #ffffff !important;
}

/* Sidebar headings */
[data-theme="dark"] .page-sidebar-menu > li.heading h3,
[data-theme="dark"] .page-sidebar-menu > li.heading h3.uppercase,
[data-theme="dark"] .page-sidebar-menu .heading h3,
[data-theme="dark"] .page-sidebar-menu .heading h3.uppercase,
[data-theme="dark"] .page-sidebar h3,
[data-theme="dark"] .page-sidebar h3.uppercase,
html[data-theme="dark"] .page-sidebar-menu > li.heading h3,
html[data-theme="dark"] .page-sidebar-menu > li.heading h3.uppercase,
html[data-theme="dark"] .page-sidebar-menu .heading h3,
html[data-theme="dark"] .page-sidebar-menu .heading h3.uppercase {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* External links in sidebar */
[data-theme="dark"] .page-sidebar-menu a[href^="http"],
[data-theme="dark"] .page-sidebar-menu a[href^="https"] {
    color: #ffffff !important;
}

/* Hover states */
[data-theme="dark"] .page-sidebar-menu > li > a:hover,
[data-theme="dark"] .page-sidebar-menu > li.nav-item > a:hover {
    color: #ffffff !important;
}

[data-theme="dark"] .page-sidebar-menu > li > a:hover > span.title,
[data-theme="dark"] .page-sidebar-menu > li.nav-item > a:hover > span.title {
    color: #ffffff !important;
}


/* ========================================
   Welcome Widget and Content Links
   ======================================== */

/* Welcome widget links */
[data-theme="dark"] .welcome-widget a,
[data-theme="dark"] .welcome-stats a,
[data-theme="dark"] .welcome-message a {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* General content area links - override blue */
[data-theme="dark"] .page-content a:not(.btn):not(.nav-link):not([class*="btn-"]):not(.create-fab):not(.table-action-btn),
[data-theme="dark"] .dashboard-container a:not(.btn):not([class*="btn-"]):not(.create-fab):not(.table-action-btn) {
    color: #ffffff !important;
}

/* Ensure link underline for visibility */
[data-theme="dark"] .page-content a:not(.btn):not(.nav-link):not(.quick-action):not([class*="btn-"]):not(.create-fab):not(.table-action-btn):hover,
[data-theme="dark"] .dashboard-container a:not(.btn):not(.quick-action):not([class*="btn-"]):not(.create-fab):not(.table-action-btn):hover {
    text-decoration: underline !important;
}


/* ========================================
   Breadcrumb Links - Force White
   ======================================== */

[data-theme="dark"] .breadcrumb a,
[data-theme="dark"] .breadcrumb-item a,
[data-theme="dark"] .breadcrumb li a,
[data-theme="dark"] .page-breadcrumb a,
[data-theme="dark"] .page-bar .breadcrumb a,
[data-theme="dark"] .breadcrumbs a {
    color: #ffffff !important;
}

[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .page-breadcrumb {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .breadcrumb > .active,
[data-theme="dark"] .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Page-content-white breadcrumb specific overrides */
[data-theme="dark"] .page-content-white .page-bar .page-breadcrumb > li > span,
[data-theme="dark"] .page-content-white .page-bar .page-breadcrumb > li:last-child > a,
[data-theme="dark"] .page-content-white .page-breadcrumb > li > span,
[data-theme="dark"] .page-content-white .breadcrumb span {
    /* Uses calculated title color for dark backgrounds - ensures WCAG AAA compliance */
    color: var(--title-color-dark-bg, #ffffff) !important;
}

[data-theme="dark"] .page-content-white .page-bar .page-breadcrumb > li > a,
[data-theme="dark"] .page-content-white .page-breadcrumb > li > a,
[data-theme="dark"] .page-content-white .page-breadcrumb a,
[data-theme="dark"] .page-content-white .breadcrumb a {
    /* Uses calculated secondary title color for dark backgrounds - ensures WCAG AA compliance */
    color: var(--title-color-secondary-dark, #ffffff) !important;
}

[data-theme="dark"] .page-content-white .page-bar .page-breadcrumb,
[data-theme="dark"] .page-content-white .page-breadcrumb {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ========================================
   Profile/User Dropdown Menu - Force White
   ======================================== */

[data-theme="dark"] .user-menu a,
[data-theme="dark"] .profile-menu a,
[data-theme="dark"] .user-dropdown a,
[data-theme="dark"] .header-dropdown a,
[data-theme="dark"] .top-menu .dropdown-menu a,
[data-theme="dark"] .navbar .dropdown-menu a,
[data-theme="dark"] .dropdown-menu a,
[data-theme="dark"] .dropdown-menu li a {
    color: #ffffff !important;
}

[data-theme="dark"] .dropdown-menu a:hover,
[data-theme="dark"] .dropdown-menu li a:hover {
    color: #ffffff !important;
    background-color: var(--color-bg-tertiary) !important;
}

[data-theme="dark"] .dropdown-menu .dropdown-item,
[data-theme="dark"] .dropdown-item {
    color: #ffffff !important;
}

[data-theme="dark"] .dropdown-menu .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:hover {
    color: #ffffff !important;
    background-color: var(--color-bg-tertiary) !important;
}

/* ========================================
   Tabs - Force White Text on Active/Inactive
   ======================================== */

[data-theme="dark"] .nav-tabs a,
[data-theme="dark"] .nav-tabs .nav-link,
[data-theme="dark"] .nav-tabs > li > a,
[data-theme="dark"] .nav.nav-tabs a,
[data-theme="dark"] .tabs a,
[data-theme="dark"] [role="tablist"] a {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .nav-tabs a:hover,
[data-theme="dark"] .nav-tabs .nav-link:hover,
[data-theme="dark"] .nav-tabs > li > a:hover {
    color: #ffffff !important;
}

[data-theme="dark"] .nav-tabs .active a,
[data-theme="dark"] .nav-tabs a.active,
[data-theme="dark"] .nav-tabs .nav-link.active,
[data-theme="dark"] .nav-tabs > li.active > a,
[data-theme="dark"] .nav.nav-tabs .active a,
[data-theme="dark"] [role="tablist"] .active a,
[data-theme="dark"] [role="tablist"] a[aria-selected="true"] {
    color: #ffffff !important;
}

/* Tab icons should also be white */
[data-theme="dark"] .nav-tabs a i,
[data-theme="dark"] .nav-tabs .nav-link i {
    color: inherit !important;
}


/* ========================================
   Hours Cards (Registration Page Goals)
   ======================================== */

/* Hours card labels and values - force white text in dark mode */
[data-theme="dark"] .hours-label,
[data-theme="dark"] .hours-card .hours-label,
[data-theme="dark"] .card .hours-label,
[data-theme="dark"] .card-body .hours-label {
    color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .hours-value,
[data-theme="dark"] .hours-card .hours-value,
[data-theme="dark"] .card .hours-value,
[data-theme="dark"] .card-body .hours-value {
    color: #ffffff !important;
}

/* Hours card container */
[data-theme="dark"] .hours-card {
    color: var(--color-text-primary) !important;
}

/* Progress bar in hours cards */
[data-theme="dark"] .hours-progress,
[data-theme="dark"] .progress.hours-progress {
    background-color: var(--color-bg-tertiary) !important;
}

[data-theme="dark"] .progress-bar-horas-limite {
    background-color: var(--color-primary) !important;
}

[data-theme="dark"] .progress-bar-horas-excedidas {
    background-color: var(--color-success) !important;
}


/* ========================================
   ANEXOS / FILE UPLOAD - ULTRA HIGH SPECIFICITY OVERRIDES
   These overrides ensure dark mode applies in all modal contexts
   ======================================== */

/* Collection Widget Container - the main UL list */
html[data-theme="dark"] .collection-widget,
html[data-theme="dark"] #app_hora_anexos,
html[data-theme="dark"] #pedido_de_ajuste_anexos,
html[data-theme="dark"] .modal__attachments-container .collection-widget,
html[data-theme="dark"] .modal-form .collection-widget {
    background-color: transparent !important;
}

/* Collection Item - each LI in the list */
html[data-theme="dark"] .collection-widget > li,
html[data-theme="dark"] .collection-widget .collection-item,
html[data-theme="dark"] #app_hora_anexos > li,
html[data-theme="dark"] #app_hora_anexos .collection-item,
html[data-theme="dark"] #pedido_de_ajuste_anexos > li,
html[data-theme="dark"] #pedido_de_ajuste_anexos .collection-item,
html[data-theme="dark"] .modal__attachments-container li.collection-item,
html[data-theme="dark"] .modal-form .collection-item,
html[data-theme="dark"] li.collection-item {
    background-color: #2d2d2d !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
}

/* Form control / text input inside collection items */
html[data-theme="dark"] .collection-item input[type="text"],
html[data-theme="dark"] .collection-item .form-control,
html[data-theme="dark"] #app_hora_anexos input[type="text"],
html[data-theme="dark"] #app_hora_anexos .form-control,
html[data-theme="dark"] #pedido_de_ajuste_anexos input[type="text"],
html[data-theme="dark"] #pedido_de_ajuste_anexos .form-control,
html[data-theme="dark"] .modal__attachments-container input[type="text"],
html[data-theme="dark"] .modal__attachments-container .form-control,
html[data-theme="dark"] .modal-form .collection-item input[type="text"],
html[data-theme="dark"] .modal-form .collection-item .form-control {
    background-color: #1e1e1e !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

html[data-theme="dark"] .collection-item input::placeholder,
html[data-theme="dark"] #app_hora_anexos input::placeholder,
html[data-theme="dark"] #pedido_de_ajuste_anexos input::placeholder,
html[data-theme="dark"] .modal__attachments-container input::placeholder {
    color: #888888 !important;
}

/* File upload container and wrappers */
html[data-theme="dark"] .file-upload-container,
html[data-theme="dark"] .file-input-wrapper,
html[data-theme="dark"] .file-upload-wrapper,
html[data-theme="dark"] .collection-item .file-upload-container,
html[data-theme="dark"] .collection-item .file-input-wrapper,
html[data-theme="dark"] .collection-item .file-upload-wrapper,
html[data-theme="dark"] #app_hora_anexos .file-upload-container,
html[data-theme="dark"] #app_hora_anexos .file-input-wrapper,
html[data-theme="dark"] #app_hora_anexos .file-upload-wrapper {
    background-color: transparent !important;
}

/* File Upload Area - the dropzone */
html[data-theme="dark"] .file-upload-area,
html[data-theme="dark"] .collection-item .file-upload-area,
html[data-theme="dark"] #app_hora_anexos .file-upload-area,
html[data-theme="dark"] #pedido_de_ajuste_anexos .file-upload-area,
html[data-theme="dark"] .modal__attachments-container .file-upload-area,
html[data-theme="dark"] .modal-form .file-upload-area,
html[data-theme="dark"] .modal .file-upload-area {
    background-color: #252525 !important;
    border-color: #4a4a4a !important;
    border-style: dashed !important;
}

html[data-theme="dark"] .file-upload-area:hover,
html[data-theme="dark"] .collection-item .file-upload-area:hover,
html[data-theme="dark"] #app_hora_anexos .file-upload-area:hover {
    background-color: #2d2d2d !important;
    border-color: #5a5a5a !important;
}

/* File upload icon */
html[data-theme="dark"] .file-upload-icon,
html[data-theme="dark"] .file-upload-icon i,
html[data-theme="dark"] .collection-item .file-upload-icon,
html[data-theme="dark"] .collection-item .file-upload-icon i,
html[data-theme="dark"] #app_hora_anexos .file-upload-icon,
html[data-theme="dark"] #app_hora_anexos .file-upload-icon i {
    color: #888888 !important;
}

/* File upload text */
html[data-theme="dark"] .file-upload-text,
html[data-theme="dark"] .file-upload-text .main-text,
html[data-theme="dark"] .file-upload-text p,
html[data-theme="dark"] .collection-item .file-upload-text,
html[data-theme="dark"] .collection-item .file-upload-text .main-text,
html[data-theme="dark"] .collection-item .file-upload-text p,
html[data-theme="dark"] #app_hora_anexos .file-upload-text,
html[data-theme="dark"] #app_hora_anexos .file-upload-text p {
    color: #e0e0e0 !important;
}

html[data-theme="dark"] .file-upload-text .sub-text,
html[data-theme="dark"] .collection-item .file-upload-text .sub-text,
html[data-theme="dark"] #app_hora_anexos .file-upload-text .sub-text {
    color: #888888 !important;
}

html[data-theme="dark"] .file-upload-text .browse-link,
html[data-theme="dark"] .collection-item .file-upload-text .browse-link,
html[data-theme="dark"] #app_hora_anexos .file-upload-text .browse-link {
    color: #3498db !important;
}

/* Remove collection item button */
html[data-theme="dark"] .remove-collection-item,
html[data-theme="dark"] .collection-item .remove-collection-item,
html[data-theme="dark"] .collection-item button.remove-collection-item,
html[data-theme="dark"] #app_hora_anexos .remove-collection-item,
html[data-theme="dark"] #pedido_de_ajuste_anexos .remove-collection-item {
    background-color: transparent !important;
    border: none !important;
    color: #888888 !important;
}

html[data-theme="dark"] .remove-collection-item:hover,
html[data-theme="dark"] .collection-item .remove-collection-item:hover,
html[data-theme="dark"] #app_hora_anexos .remove-collection-item:hover {
    color: #e74c3c !important;
}

/* Add attachment/collection item link */
html[data-theme="dark"] .add-collection-item,
html[data-theme="dark"] .add_item_link,
html[data-theme="dark"] a.add-collection-item,
html[data-theme="dark"] a.add_item_link,
html[data-theme="dark"] .modal__attachments-container .add-collection-item,
html[data-theme="dark"] #app_hora_anexos ~ .add-collection-item,
html[data-theme="dark"] .collection-widget ~ .add-collection-item {
    background-color: #2d2d2d !important;
    border-color: #4a4a4a !important;
    color: #e0e0e0 !important;
}

html[data-theme="dark"] .add-collection-item:hover,
html[data-theme="dark"] .add_item_link:hover {
    background-color: #3498db !important;
    border-color: #3498db !important;
    color: #ffffff !important;
}

/* Modal attachments container wrapper */
html[data-theme="dark"] .modal__attachments-container,
html[data-theme="dark"] .modal .modal__attachments-container,
html[data-theme="dark"] .modal__section .modal__attachments-container,
html[data-theme="dark"] .modal-form .modal__attachments-container {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
}

/* ========================================
   AUDITORIA / AUDIT TIMELINE MODAL - Dark Mode
   ======================================== */

/* Audit Modal Content */
[data-theme="dark"] .audit-modal__content,
html[data-theme="dark"] .audit-modal__content {
    background-color: #1e1e1e !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

/* Audit Modal Body */
[data-theme="dark"] .audit-modal__body,
html[data-theme="dark"] .audit-modal__body {
    background: #1a1a1a !important;
}

/* Audit Modal Footer */
[data-theme="dark"] .audit-modal__footer,
html[data-theme="dark"] .audit-modal__footer {
    background: #252525 !important;
    border-top-color: #3a3a3a !important;
}

/* Timeline Modal Container */
[data-theme="dark"] .audit-timeline-modal,
html[data-theme="dark"] .audit-timeline-modal {
    background: #1a1a1a !important;
}

/* Timeline Header */
[data-theme="dark"] .audit-timeline-header,
html[data-theme="dark"] .audit-timeline-header {
    background: #1e1e1e !important;
    border-bottom-color: #3a3a3a !important;
}

[data-theme="dark"] .audit-timeline-header__title,
html[data-theme="dark"] .audit-timeline-header__title {
    /* Uses calculated title color for dark backgrounds - ensures WCAG AAA compliance with client primary color */
    color: var(--title-color-dark-bg, #e0e0e0) !important;
}

[data-theme="dark"] .audit-timeline-header__subtitle,
html[data-theme="dark"] .audit-timeline-header__subtitle {
    /* Uses calculated secondary title color for dark backgrounds - ensures WCAG AA compliance */
    color: var(--title-color-secondary-dark, #a8a8a8) !important;
}

/* Timeline Container */
[data-theme="dark"] .audit-timeline,
html[data-theme="dark"] .audit-timeline {
    background: #1a1a1a !important;
}

/* Vertical connecting line */
[data-theme="dark"] .audit-timeline::before,
html[data-theme="dark"] .audit-timeline::before {
    background: linear-gradient(180deg, #3a3a3a 0%, #555555 50%, #3a3a3a 100%) !important;
}

/* Timeline Item connector line */
[data-theme="dark"] .audit-timeline__item::before,
html[data-theme="dark"] .audit-timeline__item::before {
    background: #3a3a3a !important;
}

/* Timeline Node border */
[data-theme="dark"] .audit-timeline__node,
html[data-theme="dark"] .audit-timeline__node {
    border-color: #1e1e1e !important;
}

/* Timeline Card */
[data-theme="dark"] .audit-timeline__card,
html[data-theme="dark"] .audit-timeline__card {
    background: #252525 !important;
    border-color: #3a3a3a !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="dark"] .audit-timeline__card:hover,
html[data-theme="dark"] .audit-timeline__card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

/* Card Header */
[data-theme="dark"] .audit-timeline__card-header,
html[data-theme="dark"] .audit-timeline__card-header {
    border-bottom-color: #3a3a3a !important;
}

/* Status Badges - Dark Mode */
[data-theme="dark"] .audit-timeline__status--success,
html[data-theme="dark"] .audit-timeline__status--success {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .audit-timeline__status--failure,
html[data-theme="dark"] .audit-timeline__status--failure {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .audit-timeline__status--pending,
html[data-theme="dark"] .audit-timeline__status--pending {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
}

/* Date/Time */
[data-theme="dark"] .audit-timeline__date,
html[data-theme="dark"] .audit-timeline__date {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .audit-timeline__time,
html[data-theme="dark"] .audit-timeline__time {
    color: #888888 !important;
}

/* Context Badges - Dark Mode */
[data-theme="dark"] .audit-timeline__badge--punch,
html[data-theme="dark"] .audit-timeline__badge--punch {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .audit-timeline__badge--signature,
html[data-theme="dark"] .audit-timeline__badge--signature {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%) !important;
    color: #a78bfa !important;
}

[data-theme="dark"] .audit-timeline__badge--default,
html[data-theme="dark"] .audit-timeline__badge--default {
    background: #3a3a3a !important;
    color: #b0b0b0 !important;
}

/* Operation Type */
[data-theme="dark"] .audit-timeline__operation,
html[data-theme="dark"] .audit-timeline__operation {
    color: #b0b0b0 !important;
}

/* Similarity Score */
[data-theme="dark"] .audit-timeline__score,
html[data-theme="dark"] .audit-timeline__score {
    border-top-color: #3a3a3a !important;
}

[data-theme="dark"] .audit-timeline__score-label,
html[data-theme="dark"] .audit-timeline__score-label {
    color: #b0b0b0 !important;
}

[data-theme="dark"] .audit-timeline__score-value--good,
html[data-theme="dark"] .audit-timeline__score-value--good {
    background: rgba(22, 163, 74, 0.2) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .audit-timeline__score-value--warn,
html[data-theme="dark"] .audit-timeline__score-value--warn {
    background: rgba(180, 83, 9, 0.2) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .audit-timeline__score-value--bad,
html[data-theme="dark"] .audit-timeline__score-value--bad {
    background: rgba(185, 28, 28, 0.2) !important;
    color: #f87171 !important;
}

/* Error Message */
[data-theme="dark"] .audit-timeline__error,
html[data-theme="dark"] .audit-timeline__error {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

/* Info Message */
[data-theme="dark"] .audit-timeline__info,
html[data-theme="dark"] .audit-timeline__info {
    color: #60a5fa !important;
}

/* Timeline Footer */
[data-theme="dark"] .audit-timeline-footer,
html[data-theme="dark"] .audit-timeline-footer {
    background: #1e1e1e !important;
    border-top-color: #3a3a3a !important;
}

[data-theme="dark"] .audit-timeline-footer__link,
html[data-theme="dark"] .audit-timeline-footer__link {
    background: #2a2a2a !important;
    border-color: #3a3a3a !important;
    color: #b0b0b0 !important;
}

[data-theme="dark"] .audit-timeline-footer__link:hover,
html[data-theme="dark"] .audit-timeline-footer__link:hover {
    background: #3a3a3a !important;
    color: #e0e0e0 !important;
}

/* "Auditoria Truora" specific modal header */
[data-theme="dark"] .modal[id*="truora"] .modal-content,
[data-theme="dark"] .modal[id*="audit"] .modal-content,
html[data-theme="dark"] .modal[id*="truora"] .modal-content,
html[data-theme="dark"] .modal[id*="audit"] .modal-content {
    background-color: #1e1e1e !important;
}

/* ========================================
   RELATORIO FILTER CARD - Light Mode Overrides
   Ensures filter components use light styling when data-theme="light"
   ======================================== */

[data-theme="light"] .relatorio-filter-card,
html[data-theme="light"] .relatorio-filter-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .filter-header,
html[data-theme="light"] .filter-header {
    background: #f8f9fa !important;
    border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .filter-title,
html[data-theme="light"] .filter-title {
    color: #2d3748 !important;
}

[data-theme="light"] .filter-title i,
html[data-theme="light"] .filter-title i {
    color: #4a5568 !important;
}

[data-theme="light"] .filter-subtitle,
html[data-theme="light"] .filter-subtitle {
    color: #718096 !important;
}

[data-theme="light"] .filter-toggle,
html[data-theme="light"] .filter-toggle {
    background: #ffffff !important;
    border-color: #cbd5e0 !important;
    color: #4a5568 !important;
}

[data-theme="light"] .filter-body,
html[data-theme="light"] .filter-body {
    background: #ffffff !important;
}

/* Date preset buttons - light mode */
[data-theme="light"] .date-preset-btn,
html[data-theme="light"] .date-preset-btn {
    background: #f7fafc !important;
    border-color: #cbd5e0 !important;
    color: #4a5568 !important;
}

[data-theme="light"] .date-preset-btn:hover,
html[data-theme="light"] .date-preset-btn:hover {
    background: #edf2f7 !important;
    border-color: #a0aec0 !important;
}

[data-theme="light"] .date-preset-btn.active,
html[data-theme="light"] .date-preset-btn.active {
    background: #2d3748 !important;
    border-color: #2d3748 !important;
    color: #ffffff !important;
}

/* Filter divider - light mode */
[data-theme="light"] .filter-divider,
html[data-theme="light"] .filter-divider {
    background: #e2e8f0 !important;
}

/* Filter section - light mode */
[data-theme="light"] .filter-section,
html[data-theme="light"] .filter-section {
    background: #f8f9fa !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .filter-section-header,
html[data-theme="light"] .filter-section-header {
    color: #2d3748 !important;
    border-bottom-color: #cbd5e0 !important;
}

[data-theme="light"] .filter-section-header i,
html[data-theme="light"] .filter-section-header i {
    color: #4a5568 !important;
}

/* Filter form controls - light mode */
[data-theme="light"] .relatorio-filter-card .form-control,
[data-theme="light"] .relatorio-filter-card .form-select,
html[data-theme="light"] .relatorio-filter-card .form-control,
html[data-theme="light"] .relatorio-filter-card .form-select {
    background-color: #ffffff !important;
    border-color: #cbd5e0 !important;
    color: #2d3748 !important;
}

[data-theme="light"] .relatorio-filter-card .form-control:focus,
[data-theme="light"] .relatorio-filter-card .form-select:focus,
html[data-theme="light"] .relatorio-filter-card .form-control:focus,
html[data-theme="light"] .relatorio-filter-card .form-select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
}

/* Filter buttons - light mode */
[data-theme="light"] .btn-filter-clear,
html[data-theme="light"] .btn-filter-clear {
    background: #ffffff !important;
    color: #4a5568 !important;
    border-color: #cbd5e0 !important;
}

[data-theme="light"] .btn-filter-clear:hover,
html[data-theme="light"] .btn-filter-clear:hover {
    background: #f7fafc !important;
    border-color: #a0aec0 !important;
}

/* Holerite card - light mode */
[data-theme="light"] .holerite-card,
html[data-theme="light"] .holerite-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .holerite-card-header,
html[data-theme="light"] .holerite-card-header {
    background: linear-gradient(to right, #f7fafc 0%, #ffffff 100%) !important;
    border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .worker-name,
[data-theme="light"] .worker-name a,
html[data-theme="light"] .worker-name,
html[data-theme="light"] .worker-name a {
    color: #1a202c !important;
}

[data-theme="light"] .worker-meta,
html[data-theme="light"] .worker-meta {
    color: #718096 !important;
}

[data-theme="light"] .worker-salary-info,
[data-theme="light"] .worker-schedule-info,
html[data-theme="light"] .worker-salary-info,
html[data-theme="light"] .worker-schedule-info {
    background: #f7fafc !important;
}

[data-theme="light"] .worker-salary-info span,
[data-theme="light"] .schedule-list,
html[data-theme="light"] .worker-salary-info span,
html[data-theme="light"] .schedule-list {
    color: #4a5568 !important;
}

[data-theme="light"] .holerite-card-footer,
html[data-theme="light"] .holerite-card-footer {
    background: #f7fafc !important;
    border-top-color: #e2e8f0 !important;
}

/* Dashboard stats - light mode */
[data-theme="light"] .stat-card,
html[data-theme="light"] .stat-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

[data-theme="light"] .stat-card__value,
html[data-theme="light"] .stat-card__value {
    color: #1a202c !important;
}

[data-theme="light"] .stat-card__label,
html[data-theme="light"] .stat-card__label {
    color: #4a5568 !important;
}

[data-theme="light"] .stat-card__sublabel,
html[data-theme="light"] .stat-card__sublabel {
    color: #718096 !important;
}

/* Holerites section - light mode */
[data-theme="light"] .holerites-title,
html[data-theme="light"] .holerites-title {
    color: #1a202c !important;
}

[data-theme="light"] .holerites-subtitle,
html[data-theme="light"] .holerites-subtitle {
    color: #718096 !important;
}

/* Dashboard stats title - light mode */
[data-theme="light"] .dashboard-stats-title,
html[data-theme="light"] .dashboard-stats-title {
    color: #1a202c !important;
}

[data-theme="light"] .dashboard-stats-subtitle,
html[data-theme="light"] .dashboard-stats-subtitle {
    color: #718096 !important;
}

/* Empty state - light mode */
[data-theme="light"] .holerites-empty-state,
html[data-theme="light"] .holerites-empty-state {
    background: #f7fafc !important;
    border-color: #cbd5e0 !important;
}

[data-theme="light"] .holerites-empty-state h4,
html[data-theme="light"] .holerites-empty-state h4 {
    color: #4a5568 !important;
}

[data-theme="light"] .holerites-empty-state p,
html[data-theme="light"] .holerites-empty-state p {
    color: #718096 !important;
}

/* ========================================
   RELATORIO FILTER CARD - Dark Mode
   ======================================== */

[data-theme="dark"] .relatorio-filter-card,
html[data-theme="dark"] .relatorio-filter-card {
    background: #1e1e1e !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .filter-header,
html[data-theme="dark"] .filter-header {
    background: #252525 !important;
    border-bottom-color: #3a3a3a !important;
}

[data-theme="dark"] .filter-title,
html[data-theme="dark"] .filter-title {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .filter-title i,
html[data-theme="dark"] .filter-title i {
    color: #b0b0b0 !important;
}

[data-theme="dark"] .filter-subtitle,
html[data-theme="dark"] .filter-subtitle {
    color: #888888 !important;
}

[data-theme="dark"] .filter-toggle,
html[data-theme="dark"] .filter-toggle {
    background: #2a2a2a !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .filter-toggle:hover,
html[data-theme="dark"] .filter-toggle:hover {
    background: #3a3a3a !important;
    border-color: #555555 !important;
}

[data-theme="dark"] .filter-body,
html[data-theme="dark"] .filter-body {
    background: #1e1e1e !important;
}

/* Date preset buttons - dark mode */
[data-theme="dark"] .date-preset-btn,
html[data-theme="dark"] .date-preset-btn {
    background: #2a2a2a !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .date-preset-btn:hover,
html[data-theme="dark"] .date-preset-btn:hover {
    background: #3a3a3a !important;
    border-color: #555555 !important;
}

[data-theme="dark"] .date-preset-btn.active,
html[data-theme="dark"] .date-preset-btn.active {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* Filter divider - dark mode */
[data-theme="dark"] .filter-divider,
html[data-theme="dark"] .filter-divider {
    background: #3a3a3a !important;
}

/* Filter section - dark mode */
[data-theme="dark"] .filter-section,
html[data-theme="dark"] .filter-section {
    background: #252525 !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .filter-section-header,
html[data-theme="dark"] .filter-section-header {
    color: #e0e0e0 !important;
    border-bottom-color: #3a3a3a !important;
}

[data-theme="dark"] .filter-section-header i,
html[data-theme="dark"] .filter-section-header i {
    color: #b0b0b0 !important;
}

/* Filter form controls - dark mode */
[data-theme="dark"] .relatorio-filter-card .form-control,
[data-theme="dark"] .relatorio-filter-card .form-select,
[data-theme="dark"] .relatorio-filter-card input[type="date"],
[data-theme="dark"] .relatorio-filter-card input[type="text"],
html[data-theme="dark"] .relatorio-filter-card .form-control,
html[data-theme="dark"] .relatorio-filter-card .form-select,
html[data-theme="dark"] .relatorio-filter-card input[type="date"],
html[data-theme="dark"] .relatorio-filter-card input[type="text"] {
    background-color: #2a2a2a !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .relatorio-filter-card .form-control:focus,
[data-theme="dark"] .relatorio-filter-card .form-select:focus,
html[data-theme="dark"] .relatorio-filter-card .form-control:focus,
html[data-theme="dark"] .relatorio-filter-card .form-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

/* Date input calendar icon - dark mode */
[data-theme="dark"] .relatorio-filter-card input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] .relatorio-filter-card input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) !important;
}

/* Filter buttons - dark mode */
[data-theme="dark"] .btn-filter-clear,
html[data-theme="dark"] .btn-filter-clear {
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .btn-filter-clear:hover,
html[data-theme="dark"] .btn-filter-clear:hover {
    background: #3a3a3a !important;
    border-color: #555555 !important;
}

/* Holerite card - dark mode */
[data-theme="dark"] .holerite-card,
html[data-theme="dark"] .holerite-card {
    background: #1e1e1e !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .holerite-card-header,
html[data-theme="dark"] .holerite-card-header {
    background: linear-gradient(to right, #252525 0%, #1e1e1e 100%) !important;
    border-bottom-color: #3a3a3a !important;
}

[data-theme="dark"] .worker-name,
[data-theme="dark"] .worker-name a,
html[data-theme="dark"] .worker-name,
html[data-theme="dark"] .worker-name a {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .worker-meta,
html[data-theme="dark"] .worker-meta {
    color: #888888 !important;
}

[data-theme="dark"] .worker-salary-info,
[data-theme="dark"] .worker-schedule-info,
html[data-theme="dark"] .worker-salary-info,
html[data-theme="dark"] .worker-schedule-info {
    background: #252525 !important;
}

[data-theme="dark"] .worker-salary-info span,
[data-theme="dark"] .schedule-list,
html[data-theme="dark"] .worker-salary-info span,
html[data-theme="dark"] .schedule-list {
    color: #b0b0b0 !important;
}

[data-theme="dark"] .holerite-card-footer,
html[data-theme="dark"] .holerite-card-footer {
    background: #252525 !important;
    border-top-color: #3a3a3a !important;
}

/*
 * Holerite embedded payroll tables: global dark table rules remove borders; restore a clear grid
 * and ensure summary/detail text matches theme tokens (holerite.html.twig + modern-relatorio).
 */
[data-theme="dark"] .holerite-trabalhador-container,
html[data-theme="dark"] .holerite-trabalhador-container {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .holerite-trabalhador-container .table-holerite th,
[data-theme="dark"] .holerite-trabalhador-container .table-holerite td,
html[data-theme="dark"] .holerite-trabalhador-container .table-holerite th,
html[data-theme="dark"] .holerite-trabalhador-container .table-holerite td {
    background-color: var(--color-table-bg) !important;
    color: var(--color-text-primary) !important;
    border: 1px solid var(--color-table-border) !important;
    border-left: 1px solid var(--color-table-border) !important;
    border-right: 1px solid var(--color-table-border) !important;
}

[data-theme="dark"] .holerite-trabalhador-container .table-holerite tr:first-child th,
html[data-theme="dark"] .holerite-trabalhador-container .table-holerite tr:first-child th {
    background-color: var(--color-table-header-bg) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .holerite-collapse-toggle,
html[data-theme="dark"] .holerite-collapse-toggle {
    background: var(--color-card-footer-bg) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .holerite-collapse-toggle:hover,
html[data-theme="dark"] .holerite-collapse-toggle:hover {
    background-color: var(--color-table-row-hover) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-primary, #3498db) !important;
}

[data-theme="dark"] .holerite-collapse-toggle i,
html[data-theme="dark"] .holerite-collapse-toggle i {
    color: inherit !important;
}

[data-theme="dark"] .holerite-card-header--interactive:hover,
html[data-theme="dark"] .holerite-card-header--interactive:hover {
    background: var(--color-table-row-hover) !important;
}

[data-theme="dark"] .holerite-icon-button,
html[data-theme="dark"] .holerite-icon-button {
    background-color: var(--color-card-bg) !important;
    border-color: var(--color-border-medium) !important;
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .holerite-icon-button:hover,
html[data-theme="dark"] .holerite-icon-button:hover {
    border-color: var(--color-primary, #3498db) !important;
    color: var(--color-text-primary) !important;
}

/* Dashboard stats - dark mode */
[data-theme="dark"] .stat-card,
html[data-theme="dark"] .stat-card {
    background: #1e1e1e !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .stat-card__value,
html[data-theme="dark"] .stat-card__value {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .stat-card__label,
html[data-theme="dark"] .stat-card__label {
    color: #b0b0b0 !important;
}

[data-theme="dark"] .stat-card__sublabel,
html[data-theme="dark"] .stat-card__sublabel {
    color: #888888 !important;
}

/* Holerites section - dark mode */
[data-theme="dark"] .holerites-title,
html[data-theme="dark"] .holerites-title {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .holerites-subtitle,
html[data-theme="dark"] .holerites-subtitle {
    color: #888888 !important;
}

/* Dashboard stats title - dark mode */
[data-theme="dark"] .dashboard-stats-title,
html[data-theme="dark"] .dashboard-stats-title {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .dashboard-stats-subtitle,
html[data-theme="dark"] .dashboard-stats-subtitle {
    color: #888888 !important;
}

/* Empty state - dark mode */
[data-theme="dark"] .holerites-empty-state,
html[data-theme="dark"] .holerites-empty-state {
    background: #252525 !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .holerites-empty-state i,
html[data-theme="dark"] .holerites-empty-state i {
    color: #666666 !important;
}

[data-theme="dark"] .holerites-empty-state h4,
html[data-theme="dark"] .holerites-empty-state h4 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .holerites-empty-state p,
html[data-theme="dark"] .holerites-empty-state p {
    color: #888888 !important;
}

/* ========================================
   TRUORA AUDIT PAGE - Dark Mode
   ======================================== */

/* Main page container */
[data-theme="dark"] .truora-audit-page,
html[data-theme="dark"] .truora-audit-page {
    color: #e0e0e0 !important;
}

/* Card styling */
[data-theme="dark"] .truora-audit-page .card,
html[data-theme="dark"] .truora-audit-page .card {
    background-color: #1e1e1e !important;
    border-color: #3a3a3a !important;
}

/* Card header */
[data-theme="dark"] .truora-audit-page .card-header,
[data-theme="dark"] .truora-audit-page .truora-card-header,
html[data-theme="dark"] .truora-audit-page .card-header,
html[data-theme="dark"] .truora-audit-page .truora-card-header {
    background-color: #252525 !important;
    border-bottom-color: #3a3a3a !important;
}

[data-theme="dark"] .truora-audit-page .card-title,
html[data-theme="dark"] .truora-audit-page .card-title {
    /* Uses calculated title color for dark backgrounds - ensures WCAG AAA compliance with client primary color */
    color: var(--title-color-dark-bg, #e0e0e0) !important;
}

/* Filter section - override .bg-light */
[data-theme="dark"] .truora-audit-page .bg-light,
[data-theme="dark"] .truora-audit-page .card-body.bg-light,
html[data-theme="dark"] .truora-audit-page .bg-light,
html[data-theme="dark"] .truora-audit-page .card-body.bg-light {
    background-color: #252525 !important;
}

/* Filter form labels */
[data-theme="dark"] .truora-audit-page .form-label,
[data-theme="dark"] .truora-audit-page label,
[data-theme="dark"] .truora-filter-form .form-label,
html[data-theme="dark"] .truora-audit-page .form-label,
html[data-theme="dark"] .truora-audit-page label,
html[data-theme="dark"] .truora-filter-form .form-label {
    color: #b0b0b0 !important;
}

/* Filter form inputs and selects */
[data-theme="dark"] .truora-audit-page .form-control,
[data-theme="dark"] .truora-audit-page .form-select,
[data-theme="dark"] .truora-filter-form .form-control,
[data-theme="dark"] .truora-filter-form .form-select,
html[data-theme="dark"] .truora-audit-page .form-control,
html[data-theme="dark"] .truora-audit-page .form-select,
html[data-theme="dark"] .truora-filter-form .form-control,
html[data-theme="dark"] .truora-filter-form .form-select {
    background-color: #2a2a2a !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .truora-audit-page .form-control:focus,
[data-theme="dark"] .truora-audit-page .form-select:focus,
[data-theme="dark"] .truora-filter-form .form-control:focus,
[data-theme="dark"] .truora-filter-form .form-select:focus,
html[data-theme="dark"] .truora-audit-page .form-control:focus,
html[data-theme="dark"] .truora-audit-page .form-select:focus,
html[data-theme="dark"] .truora-filter-form .form-control:focus,
html[data-theme="dark"] .truora-filter-form .form-select:focus {
    background-color: #2a2a2a !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
    color: #e0e0e0 !important;
}

/* Select dropdown options */
[data-theme="dark"] .truora-audit-page .form-select option,
[data-theme="dark"] .truora-filter-form .form-select option,
html[data-theme="dark"] .truora-audit-page .form-select option,
html[data-theme="dark"] .truora-filter-form .form-select option {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
}

/* Date input calendar icon */
[data-theme="dark"] .truora-audit-page input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="dark"] .truora-audit-page input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) !important;
}

/* Table styling */
[data-theme="dark"] .truora-audit-page .table,
html[data-theme="dark"] .truora-audit-page .table {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .truora-audit-page .table-responsive,
html[data-theme="dark"] .truora-audit-page .table-responsive {
    background-color: #1e1e1e !important;
}

/* Table header - override .table-light */
[data-theme="dark"] .truora-audit-page .table-light,
[data-theme="dark"] .truora-audit-page thead.table-light,
[data-theme="dark"] .truora-audit-page .table thead,
html[data-theme="dark"] .truora-audit-page .table-light,
html[data-theme="dark"] .truora-audit-page thead.table-light,
html[data-theme="dark"] .truora-audit-page .table thead {
    background-color: #252525 !important;
}

[data-theme="dark"] .truora-audit-page .table-light th,
[data-theme="dark"] .truora-audit-page thead th,
html[data-theme="dark"] .truora-audit-page .table-light th,
html[data-theme="dark"] .truora-audit-page thead th {
    background-color: #252525 !important;
    color: #e0e0e0 !important;
    border-color: #3a3a3a !important;
}

/* Table body */
[data-theme="dark"] .truora-audit-page .table tbody tr,
html[data-theme="dark"] .truora-audit-page .table tbody tr {
    background-color: #1e1e1e !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .truora-audit-page .table tbody td,
html[data-theme="dark"] .truora-audit-page .table tbody td {
    color: #e0e0e0 !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .truora-audit-page .table-hover tbody tr:hover,
html[data-theme="dark"] .truora-audit-page .table-hover tbody tr:hover {
    background-color: #2a2a2a !important;
}

/* Table text styling */
[data-theme="dark"] .truora-audit-page .text-muted,
html[data-theme="dark"] .truora-audit-page .text-muted {
    color: #888888 !important;
}

[data-theme="dark"] .truora-audit-page a,
html[data-theme="dark"] .truora-audit-page a {
    color: #60a5fa !important;
}

[data-theme="dark"] .truora-audit-page a:hover,
html[data-theme="dark"] .truora-audit-page a:hover {
    color: #93c5fd !important;
}

/* Card footer */
[data-theme="dark"] .truora-audit-page .card-footer,
html[data-theme="dark"] .truora-audit-page .card-footer {
    background-color: #252525 !important;
    border-top-color: #3a3a3a !important;
}

/* Pagination */
[data-theme="dark"] .truora-audit-page .pagination .page-link,
html[data-theme="dark"] .truora-audit-page .pagination .page-link {
    background-color: #2a2a2a !important;
    border-color: #3a3a3a !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .truora-audit-page .pagination .page-link:hover,
html[data-theme="dark"] .truora-audit-page .pagination .page-link:hover {
    background-color: #3a3a3a !important;
    color: #ffffff !important;
}

[data-theme="dark"] .truora-audit-page .pagination .page-item.active .page-link,
html[data-theme="dark"] .truora-audit-page .pagination .page-item.active .page-link {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .truora-audit-page .pagination .page-item.disabled .page-link,
html[data-theme="dark"] .truora-audit-page .pagination .page-item.disabled .page-link {
    background-color: #1e1e1e !important;
    border-color: #3a3a3a !important;
    color: #666666 !important;
}

/* Buttons */
[data-theme="dark"] .truora-audit-page .btn-outline-secondary,
html[data-theme="dark"] .truora-audit-page .btn-outline-secondary {
    border-color: #555555 !important;
    color: #b0b0b0 !important;
}

[data-theme="dark"] .truora-audit-page .btn-outline-secondary:hover,
html[data-theme="dark"] .truora-audit-page .btn-outline-secondary:hover {
    background-color: #3a3a3a !important;
    border-color: #666666 !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .truora-audit-page .btn-outline-primary,
html[data-theme="dark"] .truora-audit-page .btn-outline-primary {
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .truora-audit-page .btn-outline-primary:hover,
html[data-theme="dark"] .truora-audit-page .btn-outline-primary:hover {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* Breadcrumb in dark mode */
[data-theme="dark"] .truora-audit-page .page-breadcrumb > li > a,
html[data-theme="dark"] .truora-audit-page .page-breadcrumb > li > a {
    color: #b0b0b0 !important;
}

[data-theme="dark"] .truora-audit-page .page-breadcrumb > li > a:hover,
html[data-theme="dark"] .truora-audit-page .page-breadcrumb > li > a:hover {
    color: #60a5fa !important;
}

[data-theme="dark"] .truora-audit-page .page-breadcrumb > li > span,
html[data-theme="dark"] .truora-audit-page .page-breadcrumb > li > span {
    /* Uses calculated title color for dark backgrounds - ensures WCAG AAA compliance */
    color: var(--title-color-dark-bg, #e0e0e0) !important;
}

/* Media query for prefers-color-scheme */

/* ========================================
   LEGENDA (Calendar Legend) - Dark Mode
   ======================================== */

[data-theme="dark"] .legenda,
html[data-theme="dark"] .legenda {
    background: #1e1e1e !important;
    background-color: #1e1e1e !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] .legenda > div,
html[data-theme="dark"] .legenda > div {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .legenda .assinado,
html[data-theme="dark"] .legenda .assinado {
    color: #28a745 !important;
}

[data-theme="dark"] .legenda .pendente-de-assinatura,
html[data-theme="dark"] .legenda .pendente-de-assinatura {
    color: #ffc107 !important;
}

[data-theme="dark"] .legenda .info-extra,
html[data-theme="dark"] .legenda .info-extra {
    color: #17a2b8 !important;
}

[data-theme="dark"] .legenda small,
html[data-theme="dark"] .legenda small {
    color: #e0e0e0 !important;
}

[data-theme="dark"] .legenda .fc-event-time,
html[data-theme="dark"] .legenda .fc-event-time {
    background: var(--color-primary, #3498db) !important;
    color: #ffffff !important;
}

/* ========================================
   CALENDAR HORARIOS - Dark Mode Background
   ======================================== */

[data-theme="dark"] #calendar-horarios,
html[data-theme="dark"] #calendar-horarios {
    background: #1e1e1e !important;
    background-color: #1e1e1e !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .calendar-container,
html[data-theme="dark"] .calendar-container {
    background: #1e1e1e !important;
    background-color: #1e1e1e !important;
}

/* Calendar Grid Cells */
[data-theme="dark"] #calendar-horarios .fc-daygrid-day,
html[data-theme="dark"] #calendar-horarios .fc-daygrid-day {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
}

[data-theme="dark"] #calendar-horarios .fc-day-today,
html[data-theme="dark"] #calendar-horarios .fc-day-today {
    background: rgba(66, 153, 225, 0.15) !important;
}

[data-theme="dark"] #calendar-horarios .fc-scrollgrid,
html[data-theme="dark"] #calendar-horarios .fc-scrollgrid {
    width: 100% !important;
}

[data-theme="dark"] #calendar-horarios .fc-scrollgrid-sync-table,
html[data-theme="dark"] #calendar-horarios .fc-scrollgrid-sync-table {
    width: 100% !important;
    table-layout: fixed !important;
}

/* Header cells and day cells - exact percentage for perfect alignment */
[data-theme="dark"] #calendar-horarios .fc-col-header-cell,
html[data-theme="dark"] #calendar-horarios .fc-col-header-cell,
[data-theme="dark"] #calendar-horarios .fc-daygrid-day,
html[data-theme="dark"] #calendar-horarios .fc-daygrid-day {
    width: 14.285714% !important; /* Exactly 1/7th */
    box-sizing: border-box;
    min-width: 0;
}

[data-theme="dark"] #calendar-horarios .fc-col-header-cell,
html[data-theme="dark"] #calendar-horarios .fc-col-header-cell {
    background: #2d2d2d !important;
    color: #e2e8f0 !important;
    border-color: #3a3a3a !important;
    display: table-cell !important;
    vertical-align: middle;
}

[data-theme="dark"] #calendar-horarios .fc-col-header-cell-cushion,
html[data-theme="dark"] #calendar-horarios .fc-col-header-cell-cushion {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] #calendar-horarios .fc-daygrid-day-number,
html[data-theme="dark"] #calendar-horarios .fc-daygrid-day-number {
    color: #e0e0e0 !important;
}

[data-theme="dark"] #calendar-horarios .fc-scrollgrid,
html[data-theme="dark"] #calendar-horarios .fc-scrollgrid {
    border-color: #3a3a3a !important;
}

[data-theme="dark"] #calendar-horarios .fc-scrollgrid td,
[data-theme="dark"] #calendar-horarios .fc-scrollgrid th,
html[data-theme="dark"] #calendar-horarios .fc-scrollgrid td,
html[data-theme="dark"] #calendar-horarios .fc-scrollgrid th {
    border-color: #3a3a3a !important;
}

/* Calendar day other month (dimmed) */
[data-theme="dark"] #calendar-horarios .fc-day-other,
html[data-theme="dark"] #calendar-horarios .fc-day-other {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] #calendar-horarios .fc-day-other .fc-daygrid-day-number,
html[data-theme="dark"] #calendar-horarios .fc-day-other .fc-daygrid-day-number {
    color: #666666 !important;
}

/* ========================================
   MODAL FOOTER - Dark Mode
   ======================================== */

[data-theme="dark"] .modal__footer,
html[data-theme="dark"] .modal__footer,
[data-theme="dark"] .modal__content-wrapper .modal__footer,
html[data-theme="dark"] .modal__content-wrapper .modal__footer {
    background: #1e1e1e !important;
    background-color: #1e1e1e !important;
    border-top-color: #3a3a3a !important;
}

/* ========================================
   MODAL INFO ITEM HIGHLIGHT - Dark Mode
   ======================================== */

[data-theme="dark"] .modal__info-item--highlight,
html[data-theme="dark"] .modal__info-item--highlight {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e3a5f 100%) !important;
    border-left-color: #3b82f6 !important;
}

[data-theme="dark"] .modal__info-item--highlight:hover,
html[data-theme="dark"] .modal__info-item--highlight:hover {
    background: linear-gradient(135deg, #234b73 0%, #234b73 100%) !important;
}

[data-theme="dark"] .modal__info-item--highlight .modal__info-label,
html[data-theme="dark"] .modal__info-item--highlight .modal__info-label {
    color: #93c5fd !important;
}

[data-theme="dark"] .modal__info-item--highlight .modal__info-value,
html[data-theme="dark"] .modal__info-item--highlight .modal__info-value {
    color: #bfdbfe !important;
    font-weight: 600;
}

/* Media query fallback */

/* ========================================
   THEME TOGGLE BUTTON - Dark Mode
   ======================================== */

[data-theme="dark"] .theme-toggle-btn,
html[data-theme="dark"] .theme-toggle-btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .theme-toggle-btn:hover,
html[data-theme="dark"] .theme-toggle-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Ensure icon visibility in dark mode */
[data-theme="dark"] .theme-toggle-icon,
html[data-theme="dark"] .theme-toggle-icon {
    color: inherit !important;
}

/* ========================================
   CHARTS LIST TABS - Dark Mode
   ======================================== */

[data-theme="dark"] .charts-list-tabs-container,
html[data-theme="dark"] .charts-list-tabs-container {
    background: var(--color-card-bg, #1e2227) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .charts-list-tabs,
html[data-theme="dark"] .charts-list-tabs {
    border-bottom-color: var(--color-border-light, #343a40) !important;
    background: var(--color-bg-secondary, #212529) !important;
}

[data-theme="dark"] .charts-list-tab-content,
html[data-theme="dark"] .charts-list-tab-content {
    background: var(--color-card-bg, #1e2227) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .charts-list-tabs .nav-link,
html[data-theme="dark"] .charts-list-tabs .nav-link {
    color: #a0a0a0 !important;
}

[data-theme="dark"] .charts-list-tabs .nav-link:hover,
html[data-theme="dark"] .charts-list-tabs .nav-link:hover {
    color: #e0e0e0 !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-bottom-color: #4a4a4a !important;
}

[data-theme="dark"] .charts-list-tabs .nav-link.active,
html[data-theme="dark"] .charts-list-tabs .nav-link.active {
    color: var(--primary-color, #60a5fa) !important;
    border-bottom-color: var(--primary-color, #60a5fa) !important;
    background-color: var(--color-card-bg, #1e2227) !important;
}

[data-theme="dark"] .charts-list-tabs .nav-link.active i,
html[data-theme="dark"] .charts-list-tabs .nav-link.active i {
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .charts-list-tabs .nav-link:hover,
html[data-theme="dark"] .charts-list-tabs .nav-link:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1) !important;
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .charts-list-tabs .nav-link:hover i,
html[data-theme="dark"] .charts-list-tabs .nav-link:hover i {
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .charts-list-tabs .nav-link i,
html[data-theme="dark"] .charts-list-tabs .nav-link i {
    color: inherit !important;
}

/* ========================================
   OVERVIEW HOLERITES TABS - Dark Mode
   ======================================== */

[data-theme="dark"] .overview-holerites-tabs .nav-tabs,
html[data-theme="dark"] .overview-holerites-tabs .nav-tabs {
    border-bottom-color: var(--color-border-light) !important;
    background: transparent !important;
}

[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link,
html[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link {
    color: var(--color-text-secondary) !important;
    background: transparent !important;
}

[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link:hover,
html[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link:hover {
    color: var(--color-text-primary) !important;
    border-bottom-color: var(--color-border-medium) !important;
}

[data-theme="dark"] .overview-holerites-tabs,
html[data-theme="dark"] .overview-holerites-tabs {
    background: var(--color-card-bg, #1e2227) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .overview-holerites-tabs .nav-tabs,
html[data-theme="dark"] .overview-holerites-tabs .nav-tabs {
    border-bottom-color: var(--color-border-light, #343a40) !important;
    background: var(--color-bg-secondary, #212529) !important;
}

[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link:hover,
html[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1) !important;
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link:hover i,
html[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link:hover i {
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link.active,
html[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link.active {
    color: var(--primary-color, #60a5fa) !important;
    border-bottom-color: var(--primary-color, #60a5fa) !important;
    background: var(--color-card-bg, #1e2227) !important;
}

[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link.active i,
html[data-theme="dark"] .overview-holerites-tabs .nav-tabs .nav-link.active i {
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .overview-holerites-tabs .tab-content,
html[data-theme="dark"] .overview-holerites-tabs .tab-content {
    background: var(--color-card-bg, #1e2227) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .overview-holerites-tabs .tab-content,
html[data-theme="dark"] .overview-holerites-tabs .tab-content {
    background: transparent !important;
}

/* ========================================
   CONTA EDIT FORM - Dark Mode
   ======================================== */

/* Main tabs container */
[data-theme="dark"] .conta-tabs,
html[data-theme="dark"] .conta-tabs {
    background: var(--color-card-bg, #1e2227) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Tab header */
[data-theme="dark"] .conta-tabs__header,
html[data-theme="dark"] .conta-tabs__header {
    background: var(--color-bg-secondary, #212529) !important;
    border-bottom-color: var(--color-border-light, #343a40) !important;
}

/* Tab header scrollbar */
[data-theme="dark"] .conta-tabs__header::-webkit-scrollbar-track,
html[data-theme="dark"] .conta-tabs__header::-webkit-scrollbar-track {
    background: var(--color-bg-tertiary) !important;
}

[data-theme="dark"] .conta-tabs__header::-webkit-scrollbar-thumb,
html[data-theme="dark"] .conta-tabs__header::-webkit-scrollbar-thumb {
    background: var(--primary-color, #60a5fa) !important;
}

/* Tab buttons */
[data-theme="dark"] .conta-tab,
html[data-theme="dark"] .conta-tab {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .conta-tab:hover,
html[data-theme="dark"] .conta-tab:hover {
    background: rgba(var(--primary-color-rgb), 0.1) !important;
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .conta-tab:hover i,
html[data-theme="dark"] .conta-tab:hover i {
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .conta-tab--active,
html[data-theme="dark"] .conta-tab--active {
    background: var(--color-card-bg, #1e2227) !important;
    color: var(--primary-color, #60a5fa) !important;
    border-bottom-color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .conta-tab--active i,
html[data-theme="dark"] .conta-tab--active i {
    color: var(--primary-color, #60a5fa) !important;
}

/* Tab content area */
[data-theme="dark"] .conta-tabs__content,
html[data-theme="dark"] .conta-tabs__content {
    background: var(--color-card-bg, #1e2227) !important;
    color: var(--color-text-primary) !important;
}

/* Tab intro box */
[data-theme="dark"] .conta-tab-intro,
html[data-theme="dark"] .conta-tab-intro {
    background: rgba(var(--primary-color-rgb), 0.1) !important;
    border-left-color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .conta-tab-intro p,
html[data-theme="dark"] .conta-tab-intro p {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .conta-tab-intro i,
html[data-theme="dark"] .conta-tab-intro i {
    color: var(--primary-color, #60a5fa) !important;
}

/* Card components */
[data-theme="dark"] .conta-card,
html[data-theme="dark"] .conta-card {
    background: var(--color-card-bg, #1e2227) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .conta-card__body,
html[data-theme="dark"] .conta-card__body {
    background: transparent !important;
}

/* Subsection titles */
[data-theme="dark"] .conta-subsection__title,
html[data-theme="dark"] .conta-subsection__title {
    color: var(--color-text-primary) !important;
    border-bottom-color: var(--color-border-light) !important;
}

[data-theme="dark"] .conta-subsection__title i,
html[data-theme="dark"] .conta-subsection__title i {
    color: var(--primary-color, #60a5fa) !important;
}

/* Field groups and labels */
[data-theme="dark"] .conta-field-group label,
html[data-theme="dark"] .conta-field-group label {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .conta-field-help,
html[data-theme="dark"] .conta-field-help {
    color: var(--color-text-muted) !important;
}

[data-theme="dark"] .conta-field-help i,
html[data-theme="dark"] .conta-field-help i {
    color: var(--primary-color, #60a5fa) !important;
}

/* Form inputs in conta fields */
[data-theme="dark"] .conta-field-group input[type="text"],
[data-theme="dark"] .conta-field-group input[type="email"],
[data-theme="dark"] .conta-field-group input[type="number"],
[data-theme="dark"] .conta-field-group textarea,
[data-theme="dark"] .conta-field-group select,
html[data-theme="dark"] .conta-field-group input[type="text"],
html[data-theme="dark"] .conta-field-group input[type="email"],
html[data-theme="dark"] .conta-field-group input[type="number"],
html[data-theme="dark"] .conta-field-group textarea,
html[data-theme="dark"] .conta-field-group select {
    background: var(--color-input-bg) !important;
    border-color: var(--color-border-light) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .conta-field-group input:focus,
[data-theme="dark"] .conta-field-group textarea:focus,
[data-theme="dark"] .conta-field-group select:focus,
html[data-theme="dark"] .conta-field-group input:focus,
html[data-theme="dark"] .conta-field-group textarea:focus,
html[data-theme="dark"] .conta-field-group select:focus {
    border-color: var(--primary-color, #60a5fa) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2) !important;
}

/* Color fields */
[data-theme="dark"] .conta-color-field label,
html[data-theme="dark"] .conta-color-field label {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .conta-color-field input[type="color"],
html[data-theme="dark"] .conta-color-field input[type="color"] {
    border-color: var(--color-border-light) !important;
    background: var(--color-bg-tertiary) !important;
}

[data-theme="dark"] .conta-color-field input[type="color"]:hover,
html[data-theme="dark"] .conta-color-field input[type="color"]:hover {
    border-color: var(--color-border-medium) !important;
}

[data-theme="dark"] .conta-color-field input[type="color"]:focus,
html[data-theme="dark"] .conta-color-field input[type="color"]:focus {
    border-color: var(--primary-color, #60a5fa) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.15) !important;
}

/* Image fields */
[data-theme="dark"] .conta-image-field label,
html[data-theme="dark"] .conta-image-field label {
    color: var(--color-text-secondary) !important;
}

/* Alert components */
[data-theme="dark"] .conta-alert,
html[data-theme="dark"] .conta-alert {
    border-color: var(--color-border-light) !important;
}

[data-theme="dark"] .conta-alert--warning,
html[data-theme="dark"] .conta-alert--warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .conta-alert--warning i,
html[data-theme="dark"] .conta-alert--warning i {
    color: #f59e0b !important;
}

[data-theme="dark"] .conta-alert--warning strong,
html[data-theme="dark"] .conta-alert--warning strong {
    color: #fbbf24 !important;
}

[data-theme="dark"] .conta-alert--warning p,
html[data-theme="dark"] .conta-alert--warning p {
    color: #fcd34d !important;
}

/* Actions bar */
[data-theme="dark"] .conta-actions,
html[data-theme="dark"] .conta-actions {
    background: var(--color-card-bg, #1e2227) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Danger button */
[data-theme="dark"] .btn-conta--danger,
html[data-theme="dark"] .btn-conta--danger {
    background: transparent !important;
    color: #f87171 !important;
    border-color: #f87171 !important;
}

[data-theme="dark"] .btn-conta--danger:hover,
html[data-theme="dark"] .btn-conta--danger:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

/* User preferences integration in conta-card */
[data-theme="dark"] .conta-card__body .user-preferences .preferences-intro,
html[data-theme="dark"] .conta-card__body .user-preferences .preferences-intro {
    background: rgba(var(--primary-color-rgb), 0.1) !important;
    border-left-color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .conta-card__body .user-preferences .preferences-intro i,
html[data-theme="dark"] .conta-card__body .user-preferences .preferences-intro i {
    color: var(--primary-color, #60a5fa) !important;
}

/* Form control styles inside conta-card */
[data-theme="dark"] .conta-card__body .form-control,
html[data-theme="dark"] .conta-card__body .form-control {
    border-color: var(--color-border-light) !important;
    background: var(--color-input-bg) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .conta-card__body .form-control:focus,
html[data-theme="dark"] .conta-card__body .form-control:focus {
    border-color: var(--primary-color, #60a5fa) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1) !important;
}

/* Compound form groups */
[data-theme="dark"] .form-group.compound-form,
html[data-theme="dark"] .form-group.compound-form {
    background: var(--color-bg-tertiary) !important;
}

/* ========================================
   PLANO FORM TABS - Dark Mode
   ======================================== */

/* Plano tabs container */
[data-theme="dark"] .plano-tabs,
html[data-theme="dark"] .plano-tabs {
    background: var(--color-card-bg, #1e2227) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Plano tabs header */
[data-theme="dark"] .plano-tabs__header,
html[data-theme="dark"] .plano-tabs__header {
    background: var(--color-bg-secondary, #212529) !important;
    border-bottom-color: var(--color-border-light, #343a40) !important;
}

/* Plano tabs scrollbar */
[data-theme="dark"] .plano-tabs__header::-webkit-scrollbar-track,
html[data-theme="dark"] .plano-tabs__header::-webkit-scrollbar-track {
    background: var(--color-bg-secondary, #212529) !important;
}

[data-theme="dark"] .plano-tabs__header::-webkit-scrollbar-thumb,
html[data-theme="dark"] .plano-tabs__header::-webkit-scrollbar-thumb {
    background: var(--primary-color, #60a5fa) !important;
}

/* Plano tab buttons */
[data-theme="dark"] .plano-tab,
html[data-theme="dark"] .plano-tab {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .plano-tab:hover,
html[data-theme="dark"] .plano-tab:hover {
    background: rgba(var(--primary-color-rgb), 0.1) !important;
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .plano-tab:hover i,
html[data-theme="dark"] .plano-tab:hover i {
    color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .plano-tab--active,
html[data-theme="dark"] .plano-tab--active {
    background: var(--color-card-bg, #1e2227) !important;
    color: var(--primary-color, #60a5fa) !important;
    border-bottom-color: var(--primary-color, #60a5fa) !important;
}

[data-theme="dark"] .plano-tab--active i,
html[data-theme="dark"] .plano-tab--active i {
    color: var(--primary-color, #60a5fa) !important;
}

/* Plano tabs content */
[data-theme="dark"] .plano-tabs__content,
html[data-theme="dark"] .plano-tabs__content {
    background: var(--color-card-bg, #1e2227) !important;
    color: var(--color-text-primary) !important;
}

/* Admin permissions warning */
[data-theme="dark"] .admin-permissions__warning,
html[data-theme="dark"] .admin-permissions__warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

/* Step preview card */
[data-theme="dark"] .step-preview-card,
html[data-theme="dark"] .step-preview-card {
    background: var(--color-bg-secondary) !important;
    border-color: var(--color-border-light) !important;
}

/* Progress bar container */
[data-theme="dark"] .progress-bar-container,
html[data-theme="dark"] .progress-bar-container {
    background: var(--color-bg-tertiary) !important;
}

/* Pending step items */
[data-theme="dark"] .pending-step-item,
html[data-theme="dark"] .pending-step-item {
    background: var(--color-bg-tertiary) !important;
}

/* Preference toggle */
[data-theme="dark"] .preference-toggle,
html[data-theme="dark"] .preference-toggle {
    background: var(--color-bg-tertiary) !important;
}

[data-theme="dark"] .preference-toggle:checked,
html[data-theme="dark"] .preference-toggle:checked {
    background: var(--primary-color, #60a5fa) !important;
}

/* File upload states */
[data-theme="dark"] .file-upload-error,
html[data-theme="dark"] .file-upload-error {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .file-upload-success,
html[data-theme="dark"] .file-upload-success {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: #22c55e !important;
    color: #86efac !important;
}

/* ========================================
   PASSWORD CHANGE MODAL - Dark Mode
   ======================================== */

[data-theme="dark"] .password-modal-overlay,
html[data-theme="dark"] .password-modal-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
}

[data-theme="dark"] .password-modal,
html[data-theme="dark"] .password-modal {
    background: var(--color-card-bg, #1e2227) !important;
    border: 1px solid var(--color-border-light, #343a40) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .password-modal-header,
html[data-theme="dark"] .password-modal-header {
    border-bottom-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .password-modal-title,
html[data-theme="dark"] .password-modal-title {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .password-modal-subtitle,
html[data-theme="dark"] .password-modal-subtitle {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .password-modal-close,
html[data-theme="dark"] .password-modal-close {
    background: var(--color-bg-tertiary, #343a40) !important;
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .password-modal-close:hover,
html[data-theme="dark"] .password-modal-close:hover {
    background: var(--color-bg-secondary, #212529) !important;
    color: var(--color-text-primary, #f8f9fa) !important;
}

/* Character message bubble */
[data-theme="dark"] .character-message,
html[data-theme="dark"] .character-message {
    background: var(--color-bg-tertiary, #343a40) !important;
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .character-message::before,
html[data-theme="dark"] .character-message::before {
    border-bottom-color: var(--color-bg-tertiary, #343a40) !important;
}

/* Password field labels */
[data-theme="dark"] .password-field-label,
html[data-theme="dark"] .password-field-label,
[data-theme="dark"] #modalPasswordInputsContainer label,
html[data-theme="dark"] #modalPasswordInputsContainer label {
    color: var(--color-text-primary, #f8f9fa) !important;
}

/* Password field inputs */
[data-theme="dark"] .password-field-input,
html[data-theme="dark"] .password-field-input,
[data-theme="dark"] #modalPasswordInputsContainer .form-control,
html[data-theme="dark"] #modalPasswordInputsContainer .form-control {
    background: var(--color-input-bg, #2d3238) !important;
    border-color: var(--color-input-border, #495057) !important;
    color: var(--color-input-text, #f8f9fa) !important;
}

[data-theme="dark"] .password-field-input:focus,
html[data-theme="dark"] .password-field-input:focus,
[data-theme="dark"] #modalPasswordInputsContainer .form-control:focus,
html[data-theme="dark"] #modalPasswordInputsContainer .form-control:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2) !important;
}

/* Password toggle button */
[data-theme="dark"] .password-toggle,
html[data-theme="dark"] .password-toggle {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .password-toggle:hover,
html[data-theme="dark"] .password-toggle:hover {
    color: var(--color-text-primary, #f8f9fa) !important;
}

/* Password strength bars */
[data-theme="dark"] .password-strength-bar,
html[data-theme="dark"] .password-strength-bar {
    background: var(--color-bg-tertiary, #343a40) !important;
}

/* Password requirements box */
[data-theme="dark"] .password-requirements,
html[data-theme="dark"] .password-requirements {
    background: var(--color-bg-secondary, #212529) !important;
    border: 1px solid var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .password-requirements-title,
html[data-theme="dark"] .password-requirements-title {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .password-requirement,
html[data-theme="dark"] .password-requirement {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .password-requirement-icon,
html[data-theme="dark"] .password-requirement-icon {
    border-color: var(--color-border-medium, #495057) !important;
}

/* Modal footer buttons */
[data-theme="dark"] .password-modal-button-cancel,
html[data-theme="dark"] .password-modal-button-cancel {
    background: var(--color-bg-tertiary, #343a40) !important;
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .password-modal-button-cancel:hover,
html[data-theme="dark"] .password-modal-button-cancel:hover {
    background: var(--color-bg-secondary, #212529) !important;
}

/* ========================================
   BIOMETRIC ENROLLMENT PAGE - Dark Mode
   ======================================== */

[data-theme="dark"] .biometric-enrollment-page,
html[data-theme="dark"] .biometric-enrollment-page {
    background: transparent !important;
}

[data-theme="dark"] .biometric-page-container,
html[data-theme="dark"] .biometric-page-container {
    background: var(--color-card-bg, #1e2227) !important;
    border: 1px solid var(--color-border-light, #343a40) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Step indicator */
[data-theme="dark"] .step-indicator::before,
html[data-theme="dark"] .step-indicator::before {
    background: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .step-number,
html[data-theme="dark"] .step-number {
    background: var(--color-bg-tertiary, #343a40) !important;
    color: var(--color-text-secondary, #adb5bd) !important;
    border-color: var(--color-card-bg, #1e2227) !important;
}

[data-theme="dark"] .step-label,
html[data-theme="dark"] .step-label {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .step-item.active .step-label,
html[data-theme="dark"] .step-item.active .step-label {
    color: #60a5fa !important;
}

[data-theme="dark"] .step-item.completed .step-label,
html[data-theme="dark"] .step-item.completed .step-label {
    color: #4ade80 !important;
}

/* Info card in biometric page */
[data-theme="dark"] .biometric-enrollment-page .info-card,
html[data-theme="dark"] .biometric-enrollment-page .info-card,
[data-theme="dark"] .biometric-page-container .info-card,
html[data-theme="dark"] .biometric-page-container .info-card {
    background: var(--color-bg-secondary, #212529) !important;
    border-color: var(--color-border-light, #343a40) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .biometric-enrollment-page .info-card-header,
html[data-theme="dark"] .biometric-enrollment-page .info-card-header,
[data-theme="dark"] .biometric-page-container .info-card-header,
html[data-theme="dark"] .biometric-page-container .info-card-header {
    background: var(--color-bg-tertiary, #343a40) !important;
    color: var(--color-text-primary, #f8f9fa) !important;
    border-bottom-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .biometric-enrollment-page .info-card-body,
html[data-theme="dark"] .biometric-enrollment-page .info-card-body,
[data-theme="dark"] .biometric-page-container .info-card-body,
html[data-theme="dark"] .biometric-page-container .info-card-body {
    background: var(--color-bg-secondary, #212529) !important;
}

[data-theme="dark"] .biometric-enrollment-page .info-card-body p,
html[data-theme="dark"] .biometric-enrollment-page .info-card-body p,
[data-theme="dark"] .biometric-page-container .info-card-body p,
html[data-theme="dark"] .biometric-page-container .info-card-body p {
    color: var(--color-text-secondary, #adb5bd) !important;
}

/* Instruction list in biometric page */
[data-theme="dark"] .biometric-enrollment-page .instruction-list li,
html[data-theme="dark"] .biometric-enrollment-page .instruction-list li,
[data-theme="dark"] .biometric-page-container .instruction-list li,
html[data-theme="dark"] .biometric-page-container .instruction-list li {
    color: var(--color-text-primary, #f8f9fa) !important;
    border-bottom-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .biometric-enrollment-page .instruction-list li span,
html[data-theme="dark"] .biometric-enrollment-page .instruction-list li span,
[data-theme="dark"] .biometric-page-container .instruction-list li span,
html[data-theme="dark"] .biometric-page-container .instruction-list li span {
    color: var(--color-text-primary, #f8f9fa) !important;
}

/* Form elements in biometric page */
[data-theme="dark"] .biometric-label,
html[data-theme="dark"] .biometric-label {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .biometric-input,
html[data-theme="dark"] .biometric-input {
    background: var(--color-input-bg, #2d3238) !important;
    border-color: var(--color-input-border, #495057) !important;
    color: var(--color-input-text, #f8f9fa) !important;
}

[data-theme="dark"] .biometric-input:focus,
html[data-theme="dark"] .biometric-input:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2) !important;
}

[data-theme="dark"] .input-icon,
html[data-theme="dark"] .input-icon {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .biometric-page-container .form-text,
html[data-theme="dark"] .biometric-page-container .form-text,
[data-theme="dark"] .biometric-page-container .text-muted,
html[data-theme="dark"] .biometric-page-container .text-muted {
    color: var(--color-text-secondary, #adb5bd) !important;
}

/* Consent container */
[data-theme="dark"] .consent-container,
html[data-theme="dark"] .consent-container {
    background: var(--color-bg-secondary, #212529) !important;
    border: 1px solid var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .consent-header,
html[data-theme="dark"] .consent-header {
    background: var(--color-bg-tertiary, #343a40) !important;
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .consent-content,
html[data-theme="dark"] .consent-content {
    background: var(--color-bg-secondary, #212529) !important;
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .consent-section,
html[data-theme="dark"] .consent-section {
    border-bottom-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .consent-section h6,
html[data-theme="dark"] .consent-section h6 {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .consent-section p,
html[data-theme="dark"] .consent-section p {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .consent-checkbox-wrapper,
html[data-theme="dark"] .consent-checkbox-wrapper {
    background: var(--color-bg-tertiary, #343a40) !important;
    border-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .consent-checkbox-wrapper span,
html[data-theme="dark"] .consent-checkbox-wrapper span {
    color: var(--color-text-primary, #f8f9fa) !important;
}

/* Camera container */
[data-theme="dark"] .camera-container,
html[data-theme="dark"] .camera-container {
    background: var(--color-bg-secondary, #212529) !important;
    border-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .camera-skeleton,
html[data-theme="dark"] .camera-skeleton {
    background: var(--color-bg-secondary, #212529) !important;
}

[data-theme="dark"] .camera-loader .loader-text,
html[data-theme="dark"] .camera-loader .loader-text {
    color: var(--color-text-secondary, #adb5bd) !important;
}

/* Preview container */
[data-theme="dark"] .preview-container,
html[data-theme="dark"] .preview-container {
    background: var(--color-bg-secondary, #212529) !important;
}

[data-theme="dark"] .preview-header h5,
html[data-theme="dark"] .preview-header h5 {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .preview-text,
html[data-theme="dark"] .preview-text {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .preview-image-wrapper,
html[data-theme="dark"] .preview-image-wrapper {
    background: var(--color-bg-tertiary, #343a40) !important;
    border-color: var(--color-border-light, #343a40) !important;
}

/* Processing container */
[data-theme="dark"] .processing-container,
html[data-theme="dark"] .processing-container {
    background: var(--color-bg-secondary, #212529) !important;
}

[data-theme="dark"] .processing-text,
html[data-theme="dark"] .processing-text {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .skeleton-card,
html[data-theme="dark"] .skeleton-card {
    background: var(--color-bg-tertiary, #343a40) !important;
}

/* Secondary button */
[data-theme="dark"] .biometric-secondary-btn,
html[data-theme="dark"] .biometric-secondary-btn {
    background: var(--color-bg-tertiary, #343a40) !important;
    border-color: var(--color-border-medium, #495057) !important;
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .biometric-secondary-btn > i,
html[data-theme="dark"] .biometric-secondary-btn > i,
[data-theme="dark"] .biometric-secondary-btn > .fa,
html[data-theme="dark"] .biometric-secondary-btn > .fa {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .biometric-secondary-btn:hover,
html[data-theme="dark"] .biometric-secondary-btn:hover {
    background: var(--color-bg-secondary, #212529) !important;
    border-color: var(--color-border-dark, #6c757d) !important;
}

[data-theme="dark"] .biometric-secondary-btn:hover > i,
html[data-theme="dark"] .biometric-secondary-btn:hover > i,
[data-theme="dark"] .biometric-secondary-btn:hover > .fa,
html[data-theme="dark"] .biometric-secondary-btn:hover > .fa {
    color: var(--color-text-primary, #f8f9fa) !important;
}

/* Error alert */
[data-theme="dark"] .biometric-error-alert,
html[data-theme="dark"] .biometric-error-alert {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .biometric-error-alert .error-text,
html[data-theme="dark"] .biometric-error-alert .error-text {
    color: #fca5a5 !important;
}

[data-theme="dark"] .biometric-error-alert .error-content i,
html[data-theme="dark"] .biometric-error-alert .error-content i {
    color: #f87171 !important;
}

[data-theme="dark"] .biometric-change-request,
html[data-theme="dark"] .biometric-change-request {
    background: var(--color-bg-secondary, #212529) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
}

[data-theme="dark"] .biometric-change-request-message,
html[data-theme="dark"] .biometric-change-request-message,
[data-theme="dark"] .biometric-change-request-status,
html[data-theme="dark"] .biometric-change-request-status {
    color: var(--color-text-secondary, #adb5bd) !important;
}

/* Instruction box */
[data-theme="dark"] .camera-instructions .instruction-box,
html[data-theme="dark"] .camera-instructions .instruction-box {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a2a3f 100%) !important;
    border-left-color: #3b82f6 !important;
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .camera-instructions .instruction-box i,
html[data-theme="dark"] .camera-instructions .instruction-box i {
    color: #60a5fa !important;
}

/* ========================================
   ONBOARDING TOOLTIP - Dark Mode
   ======================================== */

[data-theme="dark"] .onboarding-tooltip,
html[data-theme="dark"] .onboarding-tooltip {
    background: var(--color-card-bg, #1e2227) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .onboarding-tooltip-header,
html[data-theme="dark"] .onboarding-tooltip-header {
    background: linear-gradient(135deg, var(--color-bg-tertiary, #343a40), var(--color-bg-secondary, #212529)) !important;
    border-bottom-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .onboarding-tooltip-body,
html[data-theme="dark"] .onboarding-tooltip-body {
    background: var(--color-card-bg, #1e2227) !important;
}

[data-theme="dark"] .onboarding-tooltip-footer,
html[data-theme="dark"] .onboarding-tooltip-footer {
    background: linear-gradient(135deg, var(--color-bg-tertiary, #343a40), var(--color-bg-secondary, #212529)) !important;
    border-top-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .step-title,
html[data-theme="dark"] .step-title {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .step-description,
html[data-theme="dark"] .step-description {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .step-description strong,
html[data-theme="dark"] .step-description strong {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .step-action,
html[data-theme="dark"] .step-action {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%) !important;
    border-left-color: #3b82f6 !important;
}

[data-theme="dark"] .action-hint,
html[data-theme="dark"] .action-hint {
    color: #60a5fa !important;
}

[data-theme="dark"] .close-button,
html[data-theme="dark"] .close-button {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .close-button:hover,
html[data-theme="dark"] .close-button:hover {
    color: var(--color-text-primary, #f8f9fa) !important;
    background: var(--color-bg-tertiary, #343a40) !important;
}

/* Pending tasks widget */
[data-theme="dark"] .pending-tasks-widget,
html[data-theme="dark"] .pending-tasks-widget {
    background: var(--color-card-bg, #1e2227) !important;
    border: 1px solid var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .pending-step-item,
html[data-theme="dark"] .pending-step-item {
    background: var(--color-bg-secondary, #212529) !important;
    border-left-color: var(--color-border-medium, #495057) !important;
}

[data-theme="dark"] .pending-step-item:hover,
html[data-theme="dark"] .pending-step-item:hover {
    background: var(--color-bg-tertiary, #343a40) !important;
    border-left-color: #3b82f6 !important;
}

[data-theme="dark"] .step-text,
html[data-theme="dark"] .step-text {
    color: var(--color-text-primary, #f8f9fa) !important;
}

/* Step preview card */
[data-theme="dark"] .step-preview-card h6,
html[data-theme="dark"] .step-preview-card h6 {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .step-preview-card:hover,
html[data-theme="dark"] .step-preview-card:hover {
    background: var(--color-bg-tertiary, #343a40) !important;
    border-color: #3b82f6 !important;
}

/* Welcome modal */
[data-theme="dark"] .welcome-icon,
html[data-theme="dark"] .welcome-icon {
    background: linear-gradient(135deg, var(--color-bg-tertiary, #343a40) 0%, var(--color-bg-secondary, #212529) 100%) !important;
}

/* ========================================
   HORA MODAL - Dark Mode
   ======================================== */

[data-theme="dark"] .hora-modal-container,
html[data-theme="dark"] .hora-modal-container {
    background: var(--color-card-bg, #1e2227) !important;
}

[data-theme="dark"] .hora-modal-body,
html[data-theme="dark"] .hora-modal-body {
    background: var(--color-card-bg, #1e2227) !important;
}

[data-theme="dark"] .hora-info-card,
html[data-theme="dark"] .hora-info-card {
    background: var(--color-bg-secondary, #212529) !important;
    border-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .hora-info-item,
html[data-theme="dark"] .hora-info-item {
    border-bottom-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .hora-info-item:hover,
html[data-theme="dark"] .hora-info-item:hover {
    background-color: var(--color-bg-tertiary, #343a40) !important;
}

@media (min-width: 768px) {
    [data-theme="dark"] .hora-info-item:nth-child(even),
    html[data-theme="dark"] .hora-info-item:nth-child(even) {
        background-color: var(--color-bg-tertiary, #343a40) !important;
    }
    
    [data-theme="dark"] .hora-info-item:nth-child(even):hover,
    html[data-theme="dark"] .hora-info-item:nth-child(even):hover {
        background-color: #3a4050 !important;
    }
}

[data-theme="dark"] .hora-info-label,
html[data-theme="dark"] .hora-info-label {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .hora-info-value,
html[data-theme="dark"] .hora-info-value {
    color: var(--color-text-primary, #f8f9fa) !important;
}

[data-theme="dark"] .hora-info-value.empty,
html[data-theme="dark"] .hora-info-value.empty {
    color: var(--color-text-muted, #6c757d) !important;
}

/* Highlight item dark mode */
[data-theme="dark"] .hora-info-item.highlight,
html[data-theme="dark"] .hora-info-item.highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%) !important;
    border-left-color: #3b82f6 !important;
}

[data-theme="dark"] .hora-info-item.highlight:hover,
html[data-theme="dark"] .hora-info-item.highlight:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.2) 100%) !important;
}

[data-theme="dark"] .hora-info-item.highlight .hora-info-label,
html[data-theme="dark"] .hora-info-item.highlight .hora-info-label {
    color: #60a5fa !important;
}

[data-theme="dark"] .hora-info-item.highlight .hora-info-value,
html[data-theme="dark"] .hora-info-item.highlight .hora-info-value {
    color: #93c5fd !important;
}

/* Anexos list dark mode */
[data-theme="dark"] .hora-anexos-list a,
html[data-theme="dark"] .hora-anexos-list a {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

[data-theme="dark"] .hora-anexos-list a:hover,
html[data-theme="dark"] .hora-anexos-list a:hover {
    background: rgba(59, 130, 246, 0.25) !important;
    color: #93c5fd !important;
}

/* Hash container dark mode */
[data-theme="dark"] .hora-hash-container,
html[data-theme="dark"] .hora-hash-container {
    background: var(--color-bg-tertiary, #343a40) !important;
    border-color: var(--color-border-light, #343a40) !important;
}

[data-theme="dark"] .hora-hash-label,
html[data-theme="dark"] .hora-hash-label {
    color: var(--color-text-secondary, #adb5bd) !important;
}

[data-theme="dark"] .hora-hash-value,
html[data-theme="dark"] .hora-hash-value {
    color: var(--color-text-primary, #f8f9fa) !important;
}

/* Modal footer dark mode */
[data-theme="dark"] .hora-modal-footer,
html[data-theme="dark"] .hora-modal-footer {
    background: var(--color-bg-secondary, #212529) !important;
    border-top-color: var(--color-border-light, #343a40) !important;
}

/* Mobile responsive dark mode */
@media (max-width: 767px) {
    [data-theme="dark"] .hora-info-item:nth-child(even),
    html[data-theme="dark"] .hora-info-item:nth-child(even) {
        background-color: var(--color-bg-secondary, #212529) !important;
    }
}

/* ========================================
   iOS COMPONENTS DARK MODE
   Comprehensive dark mode support for iOS-style components
   ======================================== */

/* iOS Buttons Dark Mode */
[data-theme="dark"] .ios-btn--secondary,
html[data-theme="dark"] .ios-btn--secondary {
    background-color: var(--ios-fill, rgba(120, 120, 128, 0.36));
    color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .ios-btn--ghost,
html[data-theme="dark"] .ios-btn--ghost {
    color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .ios-btn--outline,
html[data-theme="dark"] .ios-btn--outline {
    border-color: var(--ios-blue, #0A84FF);
    color: var(--ios-blue, #0A84FF);
}

/* iOS Segmented Control Dark Mode */
[data-theme="dark"] .ios-segmented,
html[data-theme="dark"] .ios-segmented {
    background-color: var(--ios-fill-secondary, rgba(120, 120, 128, 0.32));
}

[data-theme="dark"] .ios-segmented__label,
html[data-theme="dark"] .ios-segmented__label {
    color: var(--ios-label, #FFFFFF);
}

[data-theme="dark"] .ios-segmented__input:checked + .ios-segmented__label,
html[data-theme="dark"] .ios-segmented__input:checked + .ios-segmented__label {
    background-color: var(--ios-gray-5, #2C2C2E);
    color: var(--ios-label, #FFFFFF);
}

/* iOS Badges Dark Mode */
[data-theme="dark"] .ios-badge--default,
[data-theme="dark"] .badge-default,
html[data-theme="dark"] .ios-badge--default,
html[data-theme="dark"] .badge-default {
    background-color: var(--ios-gray-5, #2C2C2E);
    color: var(--ios-label-secondary, rgba(235, 235, 245, 0.6));
}

[data-theme="dark"] .ios-badge--soft-primary,
[data-theme="dark"] .badge-soft-primary,
html[data-theme="dark"] .ios-badge--soft-primary,
html[data-theme="dark"] .badge-soft-primary {
    background-color: rgba(10, 132, 255, 0.2);
    color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .ios-badge--soft-success,
[data-theme="dark"] .badge-soft-success,
html[data-theme="dark"] .ios-badge--soft-success,
html[data-theme="dark"] .badge-soft-success {
    background-color: rgba(48, 209, 88, 0.2);
    color: var(--ios-green, #30D158);
}

[data-theme="dark"] .ios-badge--soft-danger,
[data-theme="dark"] .badge-soft-danger,
html[data-theme="dark"] .ios-badge--soft-danger,
html[data-theme="dark"] .badge-soft-danger {
    background-color: rgba(255, 69, 58, 0.2);
    color: var(--ios-red, #FF453A);
}

[data-theme="dark"] .ios-badge--soft-warning,
[data-theme="dark"] .badge-soft-warning,
html[data-theme="dark"] .ios-badge--soft-warning,
html[data-theme="dark"] .badge-soft-warning {
    background-color: rgba(255, 159, 10, 0.2);
    color: var(--ios-orange, #FF9F0A);
}

/* iOS Input Dark Mode */
[data-theme="dark"] .ios-input,
[data-theme="dark"] .form-control,
html[data-theme="dark"] .ios-input,
html[data-theme="dark"] .form-control {
    background-color: var(--ios-bg-tertiary, #2C2C2E);
    border-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
    color: var(--ios-label, #FFFFFF);
}

[data-theme="dark"] .ios-input::placeholder,
[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .ios-input::placeholder,
html[data-theme="dark"] .form-control::placeholder {
    color: var(--ios-label-tertiary, rgba(235, 235, 245, 0.3));
}

[data-theme="dark"] .ios-input:focus,
[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .ios-input:focus,
html[data-theme="dark"] .form-control:focus {
    border-color: var(--ios-blue, #0A84FF);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

/* iOS Select Dark Mode */
[data-theme="dark"] .ios-select,
[data-theme="dark"] select.form-control,
html[data-theme="dark"] .ios-select,
html[data-theme="dark"] select.form-control {
    background-color: var(--ios-bg-tertiary, #2C2C2E);
    border-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
    color: var(--ios-label, #FFFFFF);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238E8E93' d='M6 8L0 2h12L6 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px 8px;
    padding-right: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
}

/* iOS Toggle Dark Mode */
[data-theme="dark"] .ios-toggle__track,
html[data-theme="dark"] .ios-toggle__track {
    background-color: var(--ios-fill, rgba(120, 120, 128, 0.36));
}

[data-theme="dark"] .ios-toggle__input:checked + .ios-toggle__track,
html[data-theme="dark"] .ios-toggle__input:checked + .ios-toggle__track {
    background-color: var(--ios-green, #30D158);
}

/* iOS Radio Dark Mode */
[data-theme="dark"] .ios-radio__circle,
html[data-theme="dark"] .ios-radio__circle {
    border-color: var(--ios-gray-3, #48484A);
}

[data-theme="dark"] .ios-radio__input:checked + .ios-radio__circle,
html[data-theme="dark"] .ios-radio__input:checked + .ios-radio__circle {
    border-color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .ios-radio__circle::after,
html[data-theme="dark"] .ios-radio__circle::after {
    background-color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .ios-radio__label,
html[data-theme="dark"] .ios-radio__label {
    color: var(--ios-label, #FFFFFF);
}

/* iOS Checkbox Dark Mode */
[data-theme="dark"] .ios-checkbox__box,
html[data-theme="dark"] .ios-checkbox__box {
    border-color: var(--ios-gray-3, #48484A);
}

[data-theme="dark"] .ios-checkbox__input:checked + .ios-checkbox__box,
html[data-theme="dark"] .ios-checkbox__input:checked + .ios-checkbox__box {
    background-color: var(--ios-blue, #0A84FF);
    border-color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .ios-checkbox__label,
html[data-theme="dark"] .ios-checkbox__label {
    color: var(--ios-label, #FFFFFF);
}

/* iOS Card Dark Mode */
[data-theme="dark"] .ios-card,
[data-theme="dark"] .card,
[data-theme="dark"] .panel,
[data-theme="dark"] .portlet,
html[data-theme="dark"] .ios-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .portlet {
    background-color: var(--ios-bg-grouped-secondary, #1C1C1E);
    box-shadow: var(--ios-shadow-card, 0 1px 3px rgba(0,0,0,0.2));
}

[data-theme="dark"] .ios-card__title,
[data-theme="dark"] .card-header,
[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .ios-card__title,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .panel-heading {
    color: var(--ios-label, #FFFFFF);
    border-bottom-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
}

[data-theme="dark"] .ios-card__subtitle,
html[data-theme="dark"] .ios-card__subtitle {
    color: var(--ios-label-secondary, rgba(235, 235, 245, 0.6));
}

/* iOS List Dark Mode */
[data-theme="dark"] .ios-list,
html[data-theme="dark"] .ios-list {
    background-color: var(--ios-bg-grouped-secondary, #1C1C1E);
}

[data-theme="dark"] .ios-list__item,
html[data-theme="dark"] .ios-list__item {
    background-color: var(--ios-bg-grouped-secondary, #1C1C1E);
    border-bottom-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
}

[data-theme="dark"] .ios-list__item:hover,
html[data-theme="dark"] .ios-list__item:hover {
    background-color: var(--ios-fill-quaternary, rgba(116, 116, 128, 0.18));
}

[data-theme="dark"] .ios-list__title,
html[data-theme="dark"] .ios-list__title {
    color: var(--ios-label, #FFFFFF);
}

[data-theme="dark"] .ios-list__subtitle,
[data-theme="dark"] .ios-list__value,
html[data-theme="dark"] .ios-list__subtitle,
html[data-theme="dark"] .ios-list__value {
    color: var(--ios-label-secondary, rgba(235, 235, 245, 0.6));
}

[data-theme="dark"] .ios-list__header,
html[data-theme="dark"] .ios-list__header {
    color: var(--ios-label-secondary, rgba(235, 235, 245, 0.6));
}

/* iOS Modal/Sheet Dark Mode */
[data-theme="dark"] .ios-sheet,
[data-theme="dark"] .ios-modal,
html[data-theme="dark"] .ios-sheet,
html[data-theme="dark"] .ios-modal {
    background-color: var(--ios-bg-secondary, #1C1C1E);
}

[data-theme="dark"] .ios-sheet__handle,
html[data-theme="dark"] .ios-sheet__handle {
    background-color: var(--ios-gray-4, #3A3A3C);
}

[data-theme="dark"] .ios-sheet__header,
[data-theme="dark"] .ios-sheet__footer,
html[data-theme="dark"] .ios-sheet__header,
html[data-theme="dark"] .ios-sheet__footer {
    border-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
}

[data-theme="dark"] .ios-sheet__title,
html[data-theme="dark"] .ios-sheet__title {
    color: var(--ios-label, #FFFFFF);
}

[data-theme="dark"] .ios-sheet__close,
html[data-theme="dark"] .ios-sheet__close {
    background-color: var(--ios-fill-secondary, rgba(120, 120, 128, 0.32));
    color: var(--ios-label-secondary, rgba(235, 235, 245, 0.6));
}

/* iOS Alert Dark Mode */
[data-theme="dark"] .ios-alert,
html[data-theme="dark"] .ios-alert {
    background-color: rgba(28, 28, 30, 0.95);
}

[data-theme="dark"] .ios-alert__title,
[data-theme="dark"] .ios-alert__message,
html[data-theme="dark"] .ios-alert__title,
html[data-theme="dark"] .ios-alert__message {
    color: var(--ios-label, #FFFFFF);
}

[data-theme="dark"] .ios-alert__actions,
[data-theme="dark"] .ios-alert__action:not(:last-child),
html[data-theme="dark"] .ios-alert__actions,
html[data-theme="dark"] .ios-alert__action:not(:last-child) {
    border-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
}

[data-theme="dark"] .ios-alert__action,
html[data-theme="dark"] .ios-alert__action {
    color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .ios-alert__action--destructive,
html[data-theme="dark"] .ios-alert__action--destructive {
    color: var(--ios-red, #FF453A);
}

/* iOS Popover Dark Mode */
[data-theme="dark"] .ios-popover,
[data-theme="dark"] .popover,
html[data-theme="dark"] .ios-popover,
html[data-theme="dark"] .popover {
    background-color: var(--ios-bg-secondary, #1C1C1E);
}

[data-theme="dark"] .ios-popover__arrow::before,
html[data-theme="dark"] .ios-popover__arrow::before {
    background-color: var(--ios-bg-secondary, #1C1C1E);
}

[data-theme="dark"] .ios-popover__text,
[data-theme="dark"] .popover-content,
html[data-theme="dark"] .ios-popover__text,
html[data-theme="dark"] .popover-content {
    color: var(--ios-label, #FFFFFF);
}

[data-theme="dark"] .popover-title,
html[data-theme="dark"] .popover-title {
    color: var(--ios-label, #FFFFFF);
    border-bottom-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
}

/* iOS Tabs Dark Mode */
[data-theme="dark"] .ios-tabs,
[data-theme="dark"] .nav-tabs,
html[data-theme="dark"] .ios-tabs,
html[data-theme="dark"] .nav-tabs {
    background-color: var(--ios-bg-secondary, #1C1C1E);
    border-bottom-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
}

[data-theme="dark"] .ios-tabs__item,
[data-theme="dark"] .nav-tabs > li > a,
html[data-theme="dark"] .ios-tabs__item,
html[data-theme="dark"] .nav-tabs > li > a {
    color: var(--ios-gray, #8E8E93);
}

[data-theme="dark"] .ios-tabs__item--active,
[data-theme="dark"] .nav-tabs > li.active > a,
html[data-theme="dark"] .ios-tabs__item--active,
html[data-theme="dark"] .nav-tabs > li.active > a {
    color: var(--ios-blue, #0A84FF) !important;
    border-bottom-color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .nav-pills,
html[data-theme="dark"] .nav-pills {
    background-color: var(--ios-fill-secondary, rgba(120, 120, 128, 0.32));
}

[data-theme="dark"] .nav-pills > li > a,
html[data-theme="dark"] .nav-pills > li > a {
    color: var(--ios-label, #FFFFFF);
}

[data-theme="dark"] .nav-pills > li.active > a,
html[data-theme="dark"] .nav-pills > li.active > a {
    background-color: var(--ios-gray-5, #2C2C2E);
    color: var(--ios-label, #FFFFFF);
}

/* iOS Table Dark Mode */
[data-theme="dark"] .ios-table,
[data-theme="dark"] .table,
html[data-theme="dark"] .ios-table,
html[data-theme="dark"] .table {
    background-color: var(--ios-bg-grouped-secondary, #1C1C1E);
}

[data-theme="dark"] .ios-table th,
[data-theme="dark"] .table thead th,
html[data-theme="dark"] .ios-table th,
html[data-theme="dark"] .table thead th {
    background-color: var(--ios-bg-grouped, #000000);
    color: var(--ios-label-secondary, rgba(235, 235, 245, 0.6));
    border-bottom-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
}

[data-theme="dark"] .ios-table td,
[data-theme="dark"] .table tbody td,
html[data-theme="dark"] .ios-table td,
html[data-theme="dark"] .table tbody td {
    color: var(--ios-label, #FFFFFF);
    border-bottom-color: var(--ios-separator, rgba(84, 84, 88, 0.65));
}

[data-theme="dark"] .ios-table tbody tr:hover,
[data-theme="dark"] .table tbody tr:hover,
html[data-theme="dark"] .ios-table tbody tr:hover,
html[data-theme="dark"] .table tbody tr:hover {
    background-color: var(--ios-fill-quaternary, rgba(116, 116, 128, 0.18));
}

/* iOS Progress Dark Mode */
[data-theme="dark"] .ios-progress,
[data-theme="dark"] .progress,
html[data-theme="dark"] .ios-progress,
html[data-theme="dark"] .progress {
    background-color: var(--ios-fill-secondary, rgba(120, 120, 128, 0.32));
}

[data-theme="dark"] .ios-spinner,
html[data-theme="dark"] .ios-spinner {
    border-color: var(--ios-fill-secondary, rgba(120, 120, 128, 0.32));
    border-top-color: var(--ios-blue, #0A84FF);
}

/* iOS Alerts (inline) Dark Mode */
[data-theme="dark"] .alert-success,
html[data-theme="dark"] .alert-success {
    background-color: rgba(48, 209, 88, 0.15);
    color: var(--ios-green, #30D158);
}

[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-error,
html[data-theme="dark"] .alert-danger,
html[data-theme="dark"] .alert-error {
    background-color: rgba(255, 69, 58, 0.15);
    color: var(--ios-red, #FF453A);
}

[data-theme="dark"] .alert-warning,
html[data-theme="dark"] .alert-warning {
    background-color: rgba(255, 159, 10, 0.15);
    color: var(--ios-orange, #FF9F0A);
}

[data-theme="dark"] .alert-info,
html[data-theme="dark"] .alert-info {
    background-color: rgba(10, 132, 255, 0.15);
    color: var(--ios-blue, #0A84FF);
}

/* iOS Pagination Dark Mode */
[data-theme="dark"] .ios-pagination__dot,
html[data-theme="dark"] .ios-pagination__dot {
    background-color: var(--ios-gray-4, #3A3A3C);
}

[data-theme="dark"] .ios-pagination__dot--active,
html[data-theme="dark"] .ios-pagination__dot--active {
    background-color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .ios-pagination__btn,
html[data-theme="dark"] .ios-pagination__btn {
    color: var(--ios-blue, #0A84FF);
}

[data-theme="dark"] .ios-pagination__btn:hover,
html[data-theme="dark"] .ios-pagination__btn:hover {
    background-color: var(--ios-fill-quaternary, rgba(116, 116, 128, 0.18));
}

[data-theme="dark"] .ios-pagination__btn--active,
html[data-theme="dark"] .ios-pagination__btn--active {
    background-color: var(--ios-blue, #0A84FF);
    color: #FFFFFF;
}

[data-theme="dark"] .ios-pagination__btn:disabled,
html[data-theme="dark"] .ios-pagination__btn:disabled {
    color: var(--ios-gray-4, #3A3A3C);
}

