.light-theme #filters-container.card,
.light-theme .tab-content .card,
.light-theme .card.h-100 {
    background: #ffffff;
    border: 1px solid #dee2e6;
}

/* Match levels-matrix background switching without typography overrides */
.content-wrapper:has(.whatsapp-observations-page).light-theme {
    background-color: var(--main-background, #f5f7fa) !important;
    background: var(--main-background, #f5f7fa) !important;
}

.light-theme .card-title,
.light-theme .card-description,
.light-theme label,
.light-theme .nav-link,
.light-theme .form-check-label {
    color: #212529;
}

.light-theme .text-muted {
    color: #6c757d !important;
}

.light-theme .notion-filter-btn {
    color: #495057;
    border-color: #adb5bd;
    background: #ffffff;
}

.light-theme .notion-filter-btn:hover {
    background: #f8f9fa;
    color: #212529;
    border-color: #6c757d;
}

.light-theme .notion-filter-dropdown {
    background: #ffffff;
    border-color: #dee2e6;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.light-theme .notion-filter-search,
.light-theme .notion-filter-value-header,
.light-theme .notion-filter-apply-footer {
    background: #ffffff;
    border-color: #e9ecef;
    color: #212529;
}

.light-theme .notion-filter-search input {
    background: #ffffff;
    border: 1px solid #ced4da;
    color: #212529;
}

.light-theme .notion-filter-search input::placeholder {
    color: #6c757d;
}

.light-theme .notion-filter-item,
.light-theme .notion-filter-value-item {
    color: #212529;
}

.light-theme .notion-filter-item:hover,
.light-theme .notion-filter-value-item:hover {
    background: #f8f9fa;
}

.light-theme .notion-filter-item i,
.light-theme .notion-back-btn {
    color: #6c757d;
}

.light-theme .notion-back-btn:hover {
    background: #f8f9fa;
    color: #212529;
}

.light-theme .notion-filter-value-item.selected {
    background: #e7f1ff;
}

.light-theme .applied-filter-tag {
    background: #e9f2ff;
    color: #0c63e4;
}

.light-theme .applied-filter-tag .filter-name {
    color: #0b5ed7;
}

.light-theme .clear-all-filters-btn {
    color: #dc3545;
}

.light-theme .nav-tabs .nav-link {
    color: #495057;
}

.light-theme .nav-tabs .nav-link.active {
    color: #0d6efd;
    background: #ffffff;
    border-color: #dee2e6 #dee2e6 #ffffff;
}

.light-theme .whatsapp-observations-page .nav-tabs {
    border-bottom: 1px solid #dee2e6;
    background: #ffffff;
}

.light-theme .whatsapp-observations-page .nav-tabs .nav-link {
    background: #f1f3f5 !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
}

.light-theme .whatsapp-observations-page .nav-tabs .nav-link i {
    color: #6c757d !important;
}

.light-theme .whatsapp-observations-page .nav-tabs .nav-link:hover {
    background: #e9ecef !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

.light-theme .whatsapp-observations-page .nav-tabs .nav-link.active,
.light-theme .whatsapp-observations-page .nav-tabs .nav-link.active:hover {
    background: #ffffff !important;
    color: #0d6efd !important;
    border-color: #dee2e6 #dee2e6 #ffffff !important;
}

.light-theme .whatsapp-observations-page .nav-tabs .nav-link.active i {
    color: #0d6efd !important;
}

.light-theme .form-check.form-switch.bg-dark {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

.light-theme #chat-clone-modal .modal-content,
.light-theme #images-popup .modal-content {
    background: #ffffff !important;
    color: #212529;
    border: 1px solid #ced4da;
}

.light-theme #chat-clone-container,
.light-theme #images-carousel.bg-dark {
    background: #f8f9fa !important;
}

.light-theme #chat-clone-modal .modal-header,
.light-theme #chat-clone-modal .modal-footer {
    border-color: #e9ecef;
}

.light-theme #chat-clone-modal .close span,
.light-theme #images-popup .close span {
    color: #212529 !important;
}

/* Page-level light theme overrides for whatsapp observations */
.light-theme .whatsapp-observations-page {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    gap: 0.75rem;
}

.light-theme .whatsapp-observations-page .grid-margin > .card,
.light-theme .whatsapp-observations-page .grid-margin.stretch-card > .card {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
}

.light-theme .whatsapp-observations-page,
.light-theme .whatsapp-observations-page p,
.light-theme .whatsapp-observations-page small {
    color: #212529;
}

.light-theme .whatsapp-observations-page .text-muted {
    color: #6c757d !important;
}

.light-theme .whatsapp-observations-page a:hover,
.light-theme .whatsapp-observations-page .dropdown-item:hover {
    color: inherit;
}

.light-theme .whatsapp-observations-page #observations-search-input.form-control {
    background: #ffffff !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page #observations-search-input::placeholder {
    color: #6c757d !important;
}

.light-theme .whatsapp-observations-page #filter-values-view .form-control,
.light-theme .whatsapp-observations-page #filter-values-view input[type="date"] {
    background: #ffffff !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .dataframe {
    background: #ffffff;
    color: #212529;
}

.light-theme .whatsapp-observations-page .dataframe thead th,
.light-theme .whatsapp-observations-page table.table thead th {
    background: #f1f3f5 !important;
    color: #212529 !important;
    border-bottom: 1px solid #dee2e6 !important;
    box-shadow: none !important;
}

.light-theme .whatsapp-observations-page .dataframe tbody td,
.light-theme .whatsapp-observations-page table.table tbody td {
    background: #ffffff;
    color: #212529 !important;
    border-bottom: 1px solid #e9ecef;
}

.light-theme .whatsapp-observations-page .dataframe tbody tr:hover,
.light-theme .whatsapp-observations-page table.table tbody tr:hover {
    background: #f6f9ff !important;
}

.light-theme .whatsapp-observations-page .dataframe tbody tr:hover td,
.light-theme .whatsapp-observations-page table.table tbody tr:hover td {
    background: #f6f9ff !important;
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .estado-toggle.bg-dark {
    background: #f8f9fa !important;
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .estado-toggle .inner-text {
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .observation-type-row-select,
.light-theme .whatsapp-observations-page .extra-field-row-select {
    background: #ffffff !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .x-axis-colummn-select {
    background: #ffffff !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .select2-container .select2-selection--single {
    background: #ffffff !important;
    border: 1px solid #ced4da !important;
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .select2-container .select2-selection__rendered {
    color: #212529 !important;
}

.light-theme .select2-dropdown {
    background: #ffffff !important;
    border: 1px solid #ced4da !important;
}

.light-theme .select2-results__option {
    color: #212529 !important;
    background: #ffffff !important;
}

.light-theme .select2-results__option--highlighted[aria-selected] {
    background: #e7f1ff !important;
    color: #0b5ed7 !important;
}

.light-theme .whatsapp-observations-page .form-check.form-switch,
.light-theme .whatsapp-observations-page .form-check.form-switch * {
    color: #212529 !important;
}

/* DataTables pagination hover fix for light theme */
.light-theme .whatsapp-observations-page .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #495057 !important;
}

.light-theme .whatsapp-observations-page .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.light-theme .whatsapp-observations-page .dataTables_wrapper .dataTables_paginate .paginate_button:focus {
    background: #e9ecef !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.light-theme .whatsapp-observations-page .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

/* Actions dropdown (three dots) in light theme */
.light-theme .whatsapp-observations-page .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #ced4da !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.light-theme .whatsapp-observations-page .dropdown-item {
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .dropdown-item i {
    color: #495057 !important;
}

.light-theme .whatsapp-observations-page .dropdown-item:hover,
.light-theme .whatsapp-observations-page .dropdown-item:focus {
    background: #f1f3f5 !important;
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .dropdown-divider {
    border-top-color: #e9ecef !important;
}

/* Image hover tooltip in light theme */
.light-theme .whatsapp-observations-page .image-preview-container .tooltip-image {
    background-color: #ffffff !important;
    border: 1px solid #ced4da !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    color: #212529 !important;
}

.light-theme .whatsapp-observations-page .image-preview-container .tooltip-image * {
    color: #212529 !important;
}

/* Progress bar in light theme with contrast border */
.light-theme .whatsapp-observations-page .wa-progress {
    background: #f8f9fa;
    border: 1px solid #adb5bd;
}

.light-theme .whatsapp-observations-page .wa-progress .wa-progress-bar {
    border-right: 1px solid #0f5132;
    color: #ffffff;
    font-weight: 500;
}

/* Keep blue loading glow visible while filters reload */
.light-theme #filters-container.loading-glow {
    border-width: 4px !important;
    border-style: solid !important;
    border-color: rgba(66, 153, 225, 0.8) !important;
    animation: glowingBorder 1.5s ease-in-out infinite !important;
}

/* Skeleton loader visibility in light theme */
.light-theme .whatsapp-observations-page .img-loading {
    min-height: 300px;
    background-color: #dee2e6;
    background-image: linear-gradient(
        to right,
        rgba(222, 226, 230, 0.9),
        rgba(248, 249, 250, 0.95),
        rgba(222, 226, 230, 0.9)
    );
    background-size: 200% 100%;
    border: 1px solid #ced4da;
    border-radius: 6px;
}

.light-theme .whatsapp-observations-page .whatsapp-observation-users-select + .select2-container .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #cfd7e3;
    background: #ffffff;
}
.light-theme .whatsapp-observations-page .whatsapp-observation-users-select + .select2-container .select2-selection__choice {
    background: #e8f1ff;
    border: 1px solid #b7cef5;
    color: #1d4d8f;
    border-radius: 4px;
    padding: 2px 6px;
}
.light-theme .whatsapp-observations-page .whatsapp-observation-users-select + .select2-container .select2-search__field {
    color: #26323f;
}

.light-theme .whatsapp-observations-page .whatsapp-observation-users-select-readonly + .select2-container .select2-selection--multiple {
    background-color: #ffffff;
    cursor: default;
}

.light-theme .whatsapp-observations-page .whatsapp-observation-users-select-readonly + .select2-container .select2-selection__choice {
    opacity: 1;
    color: #344054;
    background-color: #eef4ff;
    border-color: #b2ccff;
}

.light-theme .whatsapp-observations-page .whatsapp-observation-users-select-readonly + .select2-container .select2-selection__choice__remove {
    display: none;
}

.light-theme .whatsapp-observations-page .whatsapp-observation-users-select-readonly + .select2-container--disabled {
    opacity: 1;
    pointer-events: none;
}

.light-theme .whatsapp-observations-page .whatsapp-observation-users-select-readonly + .select2-container--disabled .select2-selection--multiple {
    background-color: #ffffff;
    opacity: 1;
}

.light-theme .whatsapp-observations-page .whatsapp-observation-users-select-readonly + .select2-container--disabled .select2-selection__choice {
    opacity: 1;
    color: #344054;
    background-color: #eef4ff;
    border-color: #b2ccff;
}

.light-theme .whatsapp-observations-page .whatsapp-observation-users-select-readonly + .select2-container--disabled .select2-selection__choice__remove {
    display: none;
}

.light-theme .whatsapp-observations-page .whatsapp-observation-users-select-readonly + .select2-container--disabled .select2-search {
    display: none;
}
