﻿/* INSPINIA 2.9.4 + Bootstrap 4.3.1 — Dark Theme
   Ativa com: <html data-theme="dark"> ... OU body.dark-mode
   Dica: deixe este arquivo como o ÚLTIMO <link rel="stylesheet"> da página.
*/

/* Paleta base */
:root[data-theme="dark"] {
    --bg: #0f172a; /* fundo da página */
    --bg-2: #111827; /* superfícies 1 */
    --panel: #1f2937; /* superfícies 2 */
    --panel-2: #374151; /* headers */
    --text: #e5e7eb; /* texto */
    --muted: #cbd5e1; /* labels/muted */
    --link: #93c5fd;
    --link-hover: #b3d6ff;
    --border: #334155;
    --accent: #22d3ee;
    /* bootstrap-ish helpers */
    --primary: #2563eb;
    --primary-border: #1d4ed8;
}



/*minhas correcoes*/
html[data-theme="dark"] .input-group-addon {
    background-color: #111827 !important;
    border: 1px solid #334155 !important;
}
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .single-line {
    background-color: #111827 !important;
    border: 1px solid #334155 !important;
}





/* ===== Base ===== */
html[data-theme="dark"] body,
body.dark-mode {
    background: var(--bg) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] a,
body.dark-mode a {
    color: var(--link) !important;
}

html[data-theme="dark"] a:hover,
body.dark-mode a:hover {
    color: var(--link-hover) !important;
}

/* Wrapper/heading */
html[data-theme="dark"] .content-wrapper,
body.dark-mode .content-wrapper {
    background: var(--bg) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .content-heading,
body.dark-mode .content-heading {
    color: var(--text) !important;
}

html[data-theme="dark"] .content-heading i,
body.dark-mode .content-heading i {
    color: var(--link) !important;
}

html[data-theme="dark"] .hr-form,
body.dark-mode .hr-form {
    border-color: var(--border) !important;
}

/* ===== Navbar / Sidebar (ajuste os seletores conforme seu layout) ===== */
html[data-theme="dark"] .navbar,
body.dark-mode .navbar {
    background: var(--bg-2) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .navbar .navbar-brand,
html[data-theme="dark"] .navbar .nav-link,
body.dark-mode .navbar .navbar-brand,
body.dark-mode .navbar .nav-link {
    color: var(--text) !important;
}

html[data-theme="dark"] .navbar-static-side,
html[data-theme="dark"] .sidebar,
body.dark-mode .navbar-static-side,
body.dark-mode .sidebar {
    background: #0b1324 !important;
}

html[data-theme="dark"] .sidebar .nav > li > a,
body.dark-mode .sidebar .nav > li > a {
    color: #9ca3af !important;
}

html[data-theme="dark"] .sidebar .nav > li.active > a,
html[data-theme="dark"] .sidebar .nav > li > a:hover,
body.dark-mode .sidebar .nav > li.active > a,
body.dark-mode .sidebar .nav > li > a:hover {
    color: var(--text) !important;
    background: #1f2937 !important;
}

html[data-theme="dark"] .nav-header,
body.dark-mode .nav-header {
    background: #0a1020 !important;
    color: var(--text) !important;
}

/* ===== Cards / IBOX / Panels ===== */
html[data-theme="dark"] .card,
html[data-theme="dark"] .ibox,
html[data-theme="dark"] .panel,
body.dark-mode .card,
body.dark-mode .ibox,
body.dark-mode .panel {
    background: var(--panel) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .card-header,
html[data-theme="dark"] .ibox-title,
html[data-theme="dark"] .panel-heading,
body.dark-mode .card-header,
body.dark-mode .ibox-title,
body.dark-mode .panel-heading {
    background: var(--panel-2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .card-body,
html[data-theme="dark"] .ibox-content,
body.dark-mode .card-body,
body.dark-mode .ibox-content {
    background: var(--panel) !important;
}

/* ===== Form / inputs / input-groups ===== */
html[data-theme="dark"] .form-group label,
body.dark-mode .form-group label {
    color: var(--muted) !important;
}

html[data-theme="dark"] .form-control,
body.dark-mode .form-control {
    background: #111827 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .form-control:focus,
body.dark-mode .form-control:focus {
    background: #0b1220 !important;
    border-color: var(--accent) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .input-group-text,
body.dark-mode .input-group-text {
    background: var(--panel-2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* ===== Buttons ===== */
html[data-theme="dark"] .btn-light,
body.dark-mode .btn-light {
    background: #374151 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .btn-secondary,
body.dark-mode .btn-secondary {
    background: #374151 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .btn-primary,
body.dark-mode .btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary-border) !important;
}

html[data-theme="dark"] .btn-warning,
body.dark-mode .btn-warning {
    color: #111 !important;
}

/* ===== Tables ===== */
html[data-theme="dark"] .table,
body.dark-mode .table {
    background: var(--panel) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .table thead th,
body.dark-mode .table thead th {
    background: var(--bg-2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th,
body.dark-mode .table td,
body.dark-mode .table th {
    border-color: var(--border) !important;
}

html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd),
body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background: #141b2f !important;
}

/* ===== Nav Tabs ===== */
html[data-theme="dark"] .nav-tabs .nav-link,
body.dark-mode .nav-tabs .nav-link {
    background: var(--bg-2) !important;
    color: #cbd5e1 !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .nav-tabs .nav-link.active,
body.dark-mode .nav-tabs .nav-link.active {
    background: var(--panel) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .tab-content,
body.dark-mode .tab-content {
    background: var(--panel) !important;
}

/* ===== DataTables (se você usa) ===== */
html[data-theme="dark"] .dataTables_wrapper .dt-buttons .btn,
body.dark-mode .dataTables_wrapper .dt-buttons .btn {
    background: #374151 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .dataTables_wrapper .dataTables_filter label,
body.dark-mode .dataTables_wrapper .dataTables_filter label {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .dataTables_wrapper .dataTables_filter .form-control,
body.dark-mode .dataTables_wrapper .dataTables_filter .form-control {
    background: #111827 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .dataTables_wrapper .pagination .page-link,
body.dark-mode .dataTables_wrapper .pagination .page-link {
    background: #111827 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .dataTables_wrapper .pagination .page-item.active .page-link,
body.dark-mode .dataTables_wrapper .pagination .page-item.active .page-link {
    background: #1e3a8a !important;
    border-color: #1e3a8a !important;
}

/* ===== Bootstrap-select (selectpicker) ===== */
html[data-theme="dark"] .bootstrap-select > .dropdown-toggle,
body.dark-mode .bootstrap-select > .dropdown-toggle {
    background: #374151 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .bootstrap-select .dropdown-menu,
body.dark-mode .bootstrap-select .dropdown-menu {
    background: var(--panel) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .bootstrap-select .dropdown-menu .inner li a,
body.dark-mode .bootstrap-select .dropdown-menu .inner li a {
    color: var(--text) !important;
}

html[data-theme="dark"] .bs-searchbox .form-control,
body.dark-mode .bs-searchbox .form-control {
    background: #111827 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* ===== Bootstrap-datepicker ===== */
html[data-theme="dark"] .datepicker-dropdown,
body.dark-mode .datepicker-dropdown {
    background: var(--panel) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
}

html[data-theme="dark"] .datepicker table tr td,
html[data-theme="dark"] .datepicker table tr th,
body.dark-mode .datepicker table tr td,
body.dark-mode .datepicker table tr th {
    color: var(--text) !important;
}

html[data-theme="dark"] .datepicker table tr td.day:hover,
body.dark-mode .datepicker table tr td.day:hover {
    background: var(--panel-2) !important;
}

html[data-theme="dark"] .datepicker table tr td.active,
html[data-theme="dark"] .datepicker table tr td.active:hover,
body.dark-mode .datepicker table tr td.active,
body.dark-mode .datepicker table tr td.active:hover {
    background: var(--primary) !important;
    color: #fff !important;
}

/* ===== Tooltips ===== */
html[data-theme="dark"] .tooltip-inner,
body.dark-mode .tooltip-inner {
    background: #111827 !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .bs-tooltip-auto[x-placement^="top"] .arrow::before,
html[data-theme="dark"] .bs-tooltip-top .arrow::before,
body.dark-mode .bs-tooltip-auto[x-placement^="top"] .arrow::before,
body.dark-mode .bs-tooltip-top .arrow::before {
    border-top-color: #111827 !important;
}

/* ===== Modals ===== */
html[data-theme="dark"] .modal-content,
body.dark-mode .modal-content {
    background: var(--panel) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* ===== Auxiliares ===== */
html[data-theme="dark"] .text-primary, body.dark-mode .text-primary {
    color: #93c5fd !important;
}

html[data-theme="dark"] .text-success, body.dark-mode .text-success {
    color: #22c55e !important;
}

html[data-theme="dark"] .text-warning, body.dark-mode .text-warning {
    color: #f59e0b !important;
}

html[data-theme="dark"] .text-danger, body.dark-mode .text-danger {
    color: #ef4444 !important;
}

/* ====== INSPINIA 2.9.4 + BS 4.3.1 — PATCH NAVBAR/HEADER/FOOTER ====== */

/* Topbar/Row com borda */
html[data-theme="dark"] .row.border-bottom,
body.dark-mode .row.border-bottom {
    border-bottom: 1px solid var(--border) !important;
}

/* Navbar branca do INSPINIA */
html[data-theme="dark"] .navbar.navbar-static-top.white-bg,
body.dark-mode .navbar.navbar-static-top.white-bg {
    background: var(--bg-2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* Links e textos do topo */
html[data-theme="dark"] .navbar-top-links li a,
html[data-theme="dark"] .navbar .nav > li > a,
body.dark-mode .navbar-top-links li a,
body.dark-mode .navbar .nav > li > a {
    color: var(--text) !important;
}

html[data-theme="dark"] .navbar-top-links li a:hover,
html[data-theme="dark"] .navbar .nav > li > a:hover,
body.dark-mode .navbar-top-links li a:hover,
body.dark-mode .navbar .nav > li > a:hover {
    color: var(--link-hover) !important;
    background: #0b1220 !important;
}

/* Botão “hamburger/minimalize” */
html[data-theme="dark"] .navbar .navbar-minimalize.btn.btn-primary,
body.dark-mode .navbar .navbar-minimalize.btn.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary-border) !important;
}

/* Mensagens de boas-vindas e “Condomínio em Uso” */
html[data-theme="dark"] .welcome-message,
body.dark-mode .welcome-message {
    color: var(--muted) !important;
}

html[data-theme="dark"] .welcome-message b,
body.dark-mode .welcome-message b {
    color: var(--text) !important;
}

/* Badges/labels dos ícones de envelope/sino */
html[data-theme="dark"] .navbar-top-links .label,
body.dark-mode .navbar-top-links .label {
    filter: brightness(0.95) saturate(1.05);
}

/* Dropdowns do topo (messages/alerts) */
html[data-theme="dark"] .dropdown-menu,
body.dark-mode .dropdown-menu {
    background: var(--panel) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
}

html[data-theme="dark"] .dropdown-menu .dropdown-item,
body.dark-mode .dropdown-menu .dropdown-item {
    color: var(--text) !important;
}

html[data-theme="dark"] .dropdown-menu .dropdown-item:hover,
body.dark-mode .dropdown-menu .dropdown-item:hover {
    background: var(--panel-2) !important;
}

/* “White/Gray bg” utilitários do INSPINIA */
html[data-theme="dark"] .white-bg,
body.dark-mode .white-bg {
    background: var(--panel) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .gray-bg,
body.dark-mode .gray-bg {
    background: var(--bg) !important;
    color: var(--text) !important;
}

/* Conteúdo (wrapper) – já cobre, mas reforçamos */
html[data-theme="dark"] #page-wrapper,
body.dark-mode #page-wrapper {
    background: var(--bg) !important;
    color: var(--text) !important;
}

/* Títulos e tabela desta página */
html[data-theme="dark"] h1,
body.dark-mode h1 {
    color: var(--text) !important;
}

html[data-theme="dark"] .ibox-content,
body.dark-mode .ibox-content {
    background: var(--panel) !important;
    border-color: var(--border) !important;
}

/* Tabela (reforço) */
html[data-theme="dark"] .table,
body.dark-mode .table {
    background: var(--panel) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .table thead th,
body.dark-mode .table thead th {
    background: var(--bg-2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme="dark"] .table td, html[data-theme="dark"] .table th,
body.dark-mode .table td, body.dark-mode .table th {
    border-color: var(--border) !important;
}

/* Footer fixo custom (fixed_full) */
html[data-theme="dark"] .footer.fixed_full,
body.dark-mode .footer.fixed_full {
    background: var(--bg-2) !important;
    border-top: 1px solid var(--border) !important;
    color: var(--text) !important;
}

html[data-theme="dark"] .footer.fixed_full .text-black,
body.dark-mode .footer.fixed_full .text-black {
    color: var(--text) !important; /* neutraliza class .text-black no dark */
}

/* Botões padrões que aparecem aí */
html[data-theme="dark"] .btn-primary,
body.dark-mode .btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary-border) !important;
}

html[data-theme="dark"] .btn-warning,
body.dark-mode .btn-warning {
    color: #111 !important;
}

/* Ícones do topo */
html[data-theme="dark"] .navbar .fa,
body.dark-mode .navbar .fa {
    color: var(--text) !important;
}


/* ===== Select2 — Dark (default theme) ===== */
/* Ativo com: <html data-theme="dark"> ... ou body.dark-mode ... */

/* Caixa fechada (single) */
html[data-theme="dark"] .select2-container--default .select2-selection--single,
body.dark-mode .select2-container--default .select2-selection--single {
    background-color: #111827 !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered,
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e5e7eb !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder,
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #9ca3af !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b,
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #cbd5e1 transparent transparent transparent !important; /* triângulo */
}

/* Hover/focus da caixa */
html[data-theme="dark"] .select2-container--default .select2-selection--single:hover,
body.dark-mode .select2-container--default .select2-selection--single:hover {
    border-color: #4b5563 !important;
}

html[data-theme="dark"] .select2-container--default.select2-container--focus .select2-selection--single,
body.dark-mode .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #22d3ee !important;
    box-shadow: none !important;
}

/* Dropdown (lista aberta) */
html[data-theme="dark"] .select2-container--default .select2-dropdown,
body.dark-mode .select2-container--default .select2-dropdown {
    background-color: #1f2937 !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}

/* Campo de busca dentro do dropdown */
html[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field,
body.dark-mode .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #111827 !important;
    color: #e5e7eb !important;
    border: 1px solid #334155 !important;
}

/* Itens da lista */
html[data-theme="dark"] .select2-container--default .select2-results__option,
body.dark-mode .select2-container--default .select2-results__option {
    background-color: transparent !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted,
body.dark-mode .select2-container--default .select2-results__option--highlighted {
    background-color: #374151 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .select2-container--default .select2-results__message,
body.dark-mode .select2-container--default .select2-results__message {
    color: #9ca3af !important;
}

/* Estado disabled */
html[data-theme="dark"] .select2-container--default.select2-container--disabled .select2-selection--single,
body.dark-mode .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #0b1220 !important;
    color: #9ca3af !important;
    border-color: #334155 !important;
}

/* Variante multiple (se usar) */
html[data-theme="dark"] .select2-container--default .select2-selection--multiple,
body.dark-mode .select2-container--default .select2-selection--multiple {
    background-color: #111827 !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice,
body.dark-mode .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #374151 !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}


/* ===== INSPINIA ibox-footer — Dark ===== */
html[data-theme="dark"] .ibox-footer,
body.dark-mode .ibox-footer {
    background-color: var(--panel-2) !important; /* mesmo tom do ibox-title */
    border-top: 1px solid var(--border) !important;
    color: var(--text) !important;
}

/* Botões no footer */
html[data-theme="dark"] .ibox-footer .btn-primary,
body.dark-mode .ibox-footer .btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary-border) !important;
}

html[data-theme="dark"] .ibox-footer .btn-danger,
body.dark-mode .ibox-footer .btn-danger {
    background-color: #dc2626 !important; /* vermelho mais fechado */
    border-color: #b91c1c !important;
    color: #fff !important;
}


/* ===== DATATABLES + INPUTS NO THEAD — DARK ===== */

/* 1) Inputs "soltos" nas THs (filtros por coluna) */
html[data-theme="dark"] table.dataTable thead th input[type="text"],
html[data-theme="dark"] table.dataTable thead th input[type="search"],
body.dark-mode table.dataTable thead th input[type="text"],
body.dark-mode table.dataTable thead th input[type="search"] {
    background: #111827 !important;
    color: #e5e7eb !important;
    border: 1px solid #334155 !important;
    border-radius: .2rem;
}

/* 2) Select da paginação (custom-select do BS4) */
html[data-theme="dark"] .dataTables_length .custom-select,
body.dark-mode .dataTables_length .custom-select {
    background-color: #111827 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
    /* seta do select (BS4) */
    background-image: linear-gradient(45deg, transparent 50%, #cbd5e1 50%), linear-gradient(135deg, #cbd5e1 50%, transparent 50%), linear-gradient(to right, #334155, #334155);
    background-position: calc(100% - 18px) calc(0.7em), calc(100% - 13px) calc(0.7em), calc(100% - 2.5rem) 0.2em;
    background-size: 5px 5px,5px 5px,1px 1.8em;
    background-repeat: no-repeat;
}

/* 3) Campo "Pesquisar" (form-control-sm) */
html[data-theme="dark"] .dataTables_filter .form-control,
body.dark-mode .dataTables_filter .form-control {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .dataTables_filter label,
body.dark-mode .dataTables_filter label {
    color: #cbd5e1 !important;
}

/* 4) Tabela/thead/tbody (reforços) */
html[data-theme="dark"] .ibox-content,
body.dark-mode .ibox-content {
    background: #1f2937 !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] table.dataTable,
body.dark-mode table.dataTable {
    background: #1f2937 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] table.dataTable thead th,
body.dark-mode table.dataTable thead th {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .table-bordered td,
html[data-theme="dark"] .table-bordered th,
body.dark-mode .table-bordered td,
body.dark-mode .table-bordered th {
    border-color: #334155 !important;
}

/* 5) Paginação */
html[data-theme="dark"] .dataTables_wrapper .pagination .page-link,
body.dark-mode .dataTables_wrapper .pagination .page-link {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .dataTables_wrapper .pagination .page-item.active .page-link,
body.dark-mode .dataTables_wrapper .pagination .page-item.active .page-link {
    background: #1e3a8a !important;
    border-color: #1e3a8a !important;
}

/* 6) “Processing…” card */
html[data-theme="dark"] .dataTables_processing.card,
body.dark-mode .dataTables_processing.card {
    background: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

/* 7) Badges/labels (INSPINIA) dentro da tabela */
html[data-theme="dark"] .label,
body.dark-mode .label {
    filter: brightness(0.95) saturate(1.05);
}

html[data-theme="dark"] .label-warning-light,
body.dark-mode .label-warning-light {
    background: #4b5563 !important;
    color: #fde68a !important; /* amarelo legível no dark */
}

/* 8) Dropdown “Ações” */
html[data-theme="dark"] .dropdown-menu,
body.dark-mode .dropdown-menu {
    background: #1f2937 !important;
    color: #e5e7eb !important;
    border: 1px solid #334155 !important;
}

html[data-theme="dark"] .dropdown-menu .dropdown-item,
body.dark-mode .dropdown-menu .dropdown-item {
    color: #e5e7eb !important;
}

html[data-theme="dark"] .dropdown-menu .dropdown-item:hover,
body.dark-mode .dropdown-menu .dropdown-item:hover {
    background: #374151 !important;
}
/* ===== Corrige células vazias (sorting_disabled sem conteúdo) ===== */
html[data-theme="dark"] table.dataTable td.sorting_disabled:empty,
html[data-theme="dark"] table.dataTable th.sorting_disabled:empty,
body.dark-mode table.dataTable td.sorting_disabled:empty,
body.dark-mode table.dataTable th.sorting_disabled:empty {
    background-color: #1f2937 !important; /* fundo igual ao tbody */
    border-color: #334155 !important;
}

html[data-theme="dark"] table.dataTable td.sorting_disabled,
html[data-theme="dark"] table.dataTable th.sorting_disabled,
body.dark-mode table.dataTable td.sorting_disabled,
body.dark-mode table.dataTable th.sorting_disabled {
    background-color: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}




    /* ===== Hover & Selection – DataTables + BS4 (Dark) ===== */

    /* Linha hover (tabelas com .table-hover) */
    html[data-theme="dark"] .table-hover tbody tr:hover,
    body.dark-mode .table-hover tbody tr:hover {
        background: #0b1220 !important; /* um tom abaixo do thead */
        color: #e5e7eb !important; /* garante contraste do texto */
    }

    /* Quando a linha está "selected" pelo DataTables */
    html[data-theme="dark"] table.dataTable tbody tr.selected,
    body.dark-mode table.dataTable tbody tr.selected {
        background: #1e293b !important; /* azul-acizentado */
        color: #e5e7eb !important;
    }

    /* Células ao passar o mouse (alguns temas aplicam no td) */
    html[data-theme="dark"] table.dataTable tbody tr:hover,
    body.dark-mode table.dataTable tbody tr:hover {
        background: black !important;
        color: #e5e7eb !important;
    }

    /* Links e ícones dentro da linha hover não devem “sumir” */
    html[data-theme="dark"] .table-hover tbody tr:hover a,
    html[data-theme="dark"] .table-hover tbody tr:hover i,
    body.dark-mode .table-hover tbody tr:hover a,
    body.dark-mode .table-hover tbody tr:hover i {
        color: #e5e7eb !important;
    }

    /* Labels/badges continuam legíveis no hover */
    html[data-theme="dark"] .table-hover tbody tr:hover .label,
    body.dark-mode .table-hover tbody tr:hover .label {
        filter: brightness(1) saturate(1.05);
    }

    /* Paginação hover */
    html[data-theme="dark"] .dataTables_wrapper .pagination .page-link:hover,
    body.dark-mode .dataTables_wrapper .pagination .page-link:hover {
        background: #0f182b !important;
        color: #e5e7eb !important;
        border-color: #334155 !important;
    }

    /* Dropdown de ações: já escuro, mas reforça hover */
    html[data-theme="dark"] .dropdown-menu .dropdown-item:hover,
    body.dark-mode .dropdown-menu .dropdown-item:hover {
        background: #2b3446 !important;
        color: #e5e7eb !important;
    }

    /* Cabeçalho ao passar mouse (alguns temas mudam cor de sort) */
    html[data-theme="dark"] table.dataTable thead th:hover,
    body.dark-mode table.dataTable thead th:hover {
        background: #0f182b !important;
        color: #e5e7eb !important;
    }

    /* Interação zebra + hover (evita contraste baixo na linha ímpar) */
    html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd):hover,
    body.dark-mode .table-striped tbody tr:nth-of-type(odd):hover {
        background: black !important;
    }

    /* Corpo do painel (aquele que ficou branco) */
    html[data-theme="dark"] .tabs-container .panel-body,
    body.dark-mode .tabs-container .panel-body {
        background: var(--panel) !important;
        color: var(--text) !important;
        border-top: 1px solid var(--border) !important;
    }

