/* Dark Mode — tokens globais e overrides AdminLTE 3.1 + módulos customizados */

:root {
    --app-bg: #f4f6f9;
    --app-surface: #ffffff;
    --app-surface-raised: #f8fafc;
    --app-text: #212529;
    --app-text-muted: #6c757d;
    --app-border: #dee2e6;
    --app-input-bg: #ffffff;
    --app-link: #007bff;
}

body.dark-mode {
    --app-bg: #1a1d21;
    --app-surface: #2d3238;
    --app-surface-raised: #343a40;
    --app-text: #e9ecef;
    --app-text-muted: #adb5bd;
    --app-border: #495057;
    --app-input-bg: #343a40;
    --app-link: #6ea8fe;
    color-scheme: dark;
}

/* ---- AdminLTE shell ---- */

body.dark-mode,
body.dark-mode .content-wrapper {
    background-color: var(--app-bg) !important;
    color: var(--app-text);
}

body.dark-mode .content-header {
    background: transparent;
    color: var(--app-text);
}

body.dark-mode .content-header h1,
body.dark-mode .content-header .m-0 {
    color: var(--app-text);
}

body.dark-mode .main-header.navbar,
body.dark-mode .main-header.navbar.navbar-white,
body.dark-mode .main-header.navbar.navbar-light {
    background-color: #212529 !important;
    border-bottom: 1px solid var(--app-border);
}

body.dark-mode .main-header .nav-link,
body.dark-mode .main-header .navbar-nav .nav-link {
    color: #e9ecef !important;
}

body.dark-mode .main-header .nav-link:hover {
    color: #fff !important;
}

body.dark-mode .main-header .form-control {
    background-color: var(--app-input-bg);
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .main-sidebar {
    background: #1e2227 !important;
    border-right-color: #343a40 !important;
}

body.dark-mode .brand-link {
    border-bottom-color: #343a40 !important;
}

body.dark-mode .brand-text {
    color: #e9ecef !important;
}

body.dark-mode .nav-sidebar a {
    color: #adb5bd !important;
}

body.dark-mode .nav-sidebar a .nav-icon {
    color: #6c757d !important;
}

body.dark-mode .nav-sidebar .nav-item:hover a,
body.dark-mode .nav-sidebar .nav-item.menu-open > .nav-link {
    color: #fff !important;
}

body.dark-mode .nav-sidebar .nav-item:hover a .nav-icon {
    color: #adb5bd !important;
}

/* ---- Cards ---- */

body.dark-mode .card,
body.dark-mode .card-body,
body.dark-mode .card-header,
body.dark-mode .card-footer {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .card-header {
    border-bottom-color: var(--app-border);
}

body.dark-mode .card-footer {
    background-color: var(--app-surface-raised);
    border-top-color: var(--app-border);
}

body.dark-mode .container-fluid .card {
    border-color: var(--app-border);
    background-color: var(--app-surface);
}

body.dark-mode .container-fluid .card .card-body + .card-footer {
    background: var(--app-surface-raised);
    border-top-color: var(--app-border);
}

body.dark-mode .container-fluid .card .table thead {
    background: transparent;
    color: var(--app-text-muted);
}

body.dark-mode .container-fluid .card .table thead th {
    background-color: var(--app-surface-raised);
    color: var(--app-text);
    border-color: var(--app-border);
}

/* ---- Forms ---- */

body.dark-mode .form-control,
body.dark-mode .custom-select,
body.dark-mode select.form-control,
body.dark-mode textarea.form-control {
    background-color: var(--app-input-bg);
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .form-control:focus,
body.dark-mode .custom-select:focus {
    background-color: var(--app-input-bg);
    border-color: #6ea8fe;
    color: var(--app-text);
}

body.dark-mode .form-control::placeholder {
    color: #868e96;
}

body.dark-mode .input-group-text {
    background-color: var(--app-surface-raised);
    border-color: var(--app-border);
    color: var(--app-text-muted);
}

body.dark-mode label {
    color: var(--app-text-muted);
}

body.dark-mode .custom-file-label {
    background-color: var(--app-input-bg);
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .custom-file-label::after {
    background-color: var(--app-surface-raised);
    border-color: var(--app-border);
    color: var(--app-text);
}

/* ---- Tables ---- */

body.dark-mode .table {
    color: var(--app-text);
}

body.dark-mode .table td,
body.dark-mode .table th {
    border-color: var(--app-border);
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}

body.dark-mode .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--app-text);
}

/* Bootstrap contextual rows keep light backgrounds; force readable dark variants */
body.dark-mode .table-info,
body.dark-mode .table-info > th,
body.dark-mode .table-info > td {
    background-color: #1a3a52 !important;
    color: #b8daff !important;
    border-color: #1f4d6f !important;
}

body.dark-mode .table-hover .table-info:hover,
body.dark-mode .table-hover .table-info:hover > td,
body.dark-mode .table-hover .table-info:hover > th {
    background-color: #1f4d6f !important;
    color: #d6ebff !important;
}

body.dark-mode .table-success,
body.dark-mode .table-success > th,
body.dark-mode .table-success > td {
    background-color: #1e3d2f !important;
    color: #b8f0cc !important;
    border-color: #285c42 !important;
}

body.dark-mode .table-warning,
body.dark-mode .table-warning > th,
body.dark-mode .table-warning > td {
    background-color: #3d3419 !important;
    color: #ffeaa7 !important;
    border-color: #5c4d1f !important;
}

body.dark-mode .table-danger,
body.dark-mode .table-danger > th,
body.dark-mode .table-danger > td {
    background-color: #3d1f24 !important;
    color: #f5c6cb !important;
    border-color: #5c2a32 !important;
}

body.dark-mode .table-primary,
body.dark-mode .table-primary > th,
body.dark-mode .table-primary > td {
    background-color: #1a3a52 !important;
    color: #b8daff !important;
    border-color: #1f4d6f !important;
}

/* ---- Dropdowns ---- */

body.dark-mode .dropdown-menu {
    background-color: #343a40;
    border-color: var(--app-border);
}

body.dark-mode .dropdown-item {
    color: var(--app-text);
}

body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus {
    background-color: #495057;
    color: #fff;
}

body.dark-mode .dropdown-divider {
    border-top-color: var(--app-border);
}

body.dark-mode .dropdown-header {
    color: var(--app-text-muted);
}

body.dark-mode .dropdown-item.text-muted,
body.dark-mode #rt-items .dropdown-item small {
    color: var(--app-text-muted) !important;
}

/* ---- Modals (Bootstrap) ---- */

body.dark-mode .modal-content {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    background-color: var(--app-surface-raised) !important;
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .modal-title {
    color: var(--app-text) !important;
}

body.dark-mode .modal-header .close {
    color: var(--app-text);
    text-shadow: none;
    opacity: 0.85;
}

body.dark-mode .close {
    color: var(--app-text);
    text-shadow: none;
}

/* ---- Alerts ---- */

body.dark-mode .alert-info {
    background-color: #1a3a52;
    border-color: #1f4d6f;
    color: #b8daff;
}

body.dark-mode .alert-success {
    background-color: #1e3d2f;
    border-color: #285c42;
    color: #b8f0cc;
}

body.dark-mode .alert-warning {
    background-color: #3d3419;
    border-color: #5c4d1f;
    color: #ffeaa7;
}

body.dark-mode .alert-danger {
    background-color: #3d1f24;
    border-color: #5c2a32;
    color: #f5c6cb;
}

/* ---- Small boxes (dashboard / QA counters) ---- */

body.dark-mode .small-box h3,
body.dark-mode .small-box p,
body.dark-mode .small-box .inner,
body.dark-mode .small-box .inner p,
body.dark-mode .small-box .small-box-footer,
body.dark-mode .small-box .small-box-footer:hover {
    color: #fff !important;
}

body.dark-mode .small-box.bg-info,
body.dark-mode .small-box.bg-info:hover {
    background-color: #0b5ed7 !important;
}

body.dark-mode .small-box.bg-info .small-box-footer,
body.dark-mode .small-box.bg-info .small-box-footer:hover {
    background-color: #0a53be !important;
}

body.dark-mode .small-box.bg-success,
body.dark-mode .small-box.bg-success:hover,
body.dark-mode .small-box.success {
    background-color: #157347 !important;
}

body.dark-mode .small-box.bg-success .small-box-footer,
body.dark-mode .small-box.bg-success .small-box-footer:hover,
body.dark-mode .small-box.success .small-box-footer {
    background-color: #146c43 !important;
}

body.dark-mode .small-box.bg-warning,
body.dark-mode .small-box.bg-warning:hover,
body.dark-mode .small-box.warning {
    background-color: #c47b0a !important;
}

body.dark-mode .small-box.bg-warning .small-box-footer,
body.dark-mode .small-box.bg-warning .small-box-footer:hover,
body.dark-mode .small-box.warning .small-box-footer {
    background-color: #a56608 !important;
}

body.dark-mode .small-box.bg-danger,
body.dark-mode .small-box.bg-danger:hover,
body.dark-mode .small-box.danger {
    background-color: #b02a37 !important;
}

body.dark-mode .small-box.bg-danger .small-box-footer,
body.dark-mode .small-box.bg-danger .small-box-footer:hover,
body.dark-mode .small-box.danger .small-box-footer {
    background-color: #9d2631 !important;
}

/* ---- Outline buttons (AdminLTE keeps #6c757d in dark-mode) ---- */

body.dark-mode .btn-outline-secondary {
    color: #e2e8f0;
    border-color: #94a3b8;
    background-color: transparent;
}

body.dark-mode .btn-outline-secondary:hover,
body.dark-mode .btn-outline-secondary:focus {
    color: #fff;
    background-color: #475569;
    border-color: #cbd5e1;
}

body.dark-mode .btn-outline-dark {
    color: #e2e8f0;
    border-color: #94a3b8;
    background-color: transparent;
}

body.dark-mode .btn-outline-dark:hover,
body.dark-mode .btn-outline-dark:focus {
    color: #fff;
    background-color: #475569;
    border-color: #cbd5e1;
}

/* ---- Pagination ---- */

body.dark-mode .page-link {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-link);
}

body.dark-mode .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

body.dark-mode .page-item.disabled .page-link {
    background-color: var(--app-surface-raised);
    border-color: var(--app-border);
    color: var(--app-text-muted);
}

/* ---- Text utilities ---- */

body.dark-mode .text-muted {
    color: var(--app-text-muted) !important;
}

body.dark-mode .text-dark {
    color: var(--app-text) !important;
}

body.dark-mode .border,
body.dark-mode .border-top,
body.dark-mode .border-bottom {
    border-color: var(--app-border) !important;
}

body.dark-mode .bg-white {
    background-color: var(--app-surface) !important;
}

body.dark-mode .bg-light {
    background-color: var(--app-surface-raised) !important;
}

body.dark-mode .list-group-item {
    background-color: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .nav-tabs {
    border-bottom-color: var(--app-border);
}

body.dark-mode .nav-tabs .nav-link {
    color: var(--app-text-muted);
}

body.dark-mode .nav-tabs .nav-link.active {
    background-color: var(--app-surface);
    border-color: var(--app-border) var(--app-border) var(--app-surface);
    color: var(--app-text);
}

body.dark-mode .tab-content {
    color: var(--app-text);
}

body.dark-mode .breadcrumb {
    background-color: var(--app-surface-raised);
}

body.dark-mode .breadcrumb-item.active {
    color: var(--app-text-muted);
}

body.dark-mode .pre,
body.dark-mode pre,
body.dark-mode code {
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode .select2-container--default .select2-selection--multiple {
    background-color: var(--app-input-bg);
    border-color: var(--app-border);
}

/* ---- custom.css overrides ---- */

body.dark-mode .btn-checklist-access,
body.dark-mode .btn-timeline-access {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .table-actions .btn-timeline-access {
    background: transparent;
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .btn-checklist-access:hover,
body.dark-mode .btn-timeline-access:hover {
    background: var(--app-surface-raised);
}

body.dark-mode .btn-devolver-access {
    background: #3d1f24;
    border-color: #5c2a32;
    color: #f5c6cb;
}

body.dark-mode .btn-devolver-access:hover {
    background: #5c2a32;
}

body.dark-mode .timeline:before {
    background: var(--app-border);
}

body.dark-mode .timeline > div .timeline-item {
    background: var(--app-surface);
    border-color: var(--app-border);
}

body.dark-mode .timeline .timeline-body {
    color: var(--app-text-muted);
}

body.dark-mode .todo-container .status {
    background: var(--app-surface-raised) !important;
    border-color: var(--app-border) !important;
}

body.dark-mode .todo-container .status h1 {
    color: var(--app-text-muted);
}

body.dark-mode .todo-container .status .todo {
    background: var(--app-surface);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 5px 0px;
}

body.dark-mode .todo-container .status .todo .todo-text {
    color: var(--app-text) !important;
}

body.dark-mode .interaction-date {
    color: var(--app-text-muted);
}

body.dark-mode .sprint-filter .reset {
    background: var(--app-surface-raised);
    color: var(--app-text-muted);
}

/* ---- Chosen plugin ---- */

body.dark-mode .chosen-container-single .chosen-single {
    background-color: var(--app-input-bg);
    border-color: var(--app-border);
    color: var(--app-text);
    box-shadow: none;
}

body.dark-mode .chosen-container-active.chosen-with-drop .chosen-single {
    border-color: #6ea8fe;
}

body.dark-mode .chosen-container .chosen-drop {
    background: var(--app-surface);
    border-color: var(--app-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .chosen-container .chosen-results {
    color: var(--app-text);
}

body.dark-mode .chosen-container .chosen-results li {
    color: var(--app-text);
}

body.dark-mode .chosen-container .chosen-results li.highlighted {
    background-color: #495057;
    background-image: none;
    color: #fff;
}

body.dark-mode .chosen-container .chosen-results li.no-results {
    background: var(--app-surface);
    color: var(--app-text-muted);
}

body.dark-mode .chosen-container-multi .chosen-choices {
    background-color: var(--app-input-bg);
    border-color: var(--app-border);
}

body.dark-mode .chosen-container-multi .chosen-choices .search-field input[type="text"] {
    color: var(--app-text) !important;
}

body.dark-mode .chosen-container-multi .chosen-choices li.search-choice {
    background-color: #495057;
    border-color: #6c757d;
    color: #fff;
}

/* ---- support-call-ui.css (sc-* design system) ---- */

body.dark-mode .sc-page {
    --sc-border: #374151;
    --sc-bg-muted: #1f2937;
    --sc-text: #f1f5f9;
    --sc-text-muted: #94a3b8;
    --sc-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --sc-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-mode .sc-page-header {
    background: var(--app-surface);
    border-bottom-color: var(--sc-border);
}

body.dark-mode .sc-shell {
    background: var(--app-surface);
}

body.dark-mode .sc-filter-bar,
body.dark-mode .sc-filter-panel,
body.dark-mode .sc-dash-card,
body.dark-mode .sc-table-wrap,
body.dark-mode .sc-detail-card,
body.dark-mode .sc-interaction-card,
body.dark-mode .sc-sidebar-card,
body.dark-mode .sc-empty-state,
body.dark-mode .sc-toolbar-card {
    background: var(--app-surface);
    border-color: var(--sc-border);
    color: var(--sc-text);
}

body.dark-mode .sc-filter-toggle {
    background: var(--app-surface-raised);
    border-color: var(--sc-border);
    color: var(--sc-text);
}

body.dark-mode .sc-filter-toggle:hover {
    background: #374151;
}

body.dark-mode .sc-dash-card-value,
body.dark-mode .sc-dash-card-label,
body.dark-mode .sc-dash-section-title,
body.dark-mode .sc-title,
body.dark-mode .sc-detail-label,
body.dark-mode .sc-detail-value,
body.dark-mode .sc-interaction-author,
body.dark-mode .sc-table td,
body.dark-mode .sc-table th {
    color: var(--sc-text);
}

body.dark-mode .sc-dash-card-footer {
    color: #cbd5e1;
    border-top-color: var(--sc-border);
}

body.dark-mode .sc-dash-card:hover .sc-dash-card-footer {
    color: #93c5fd;
}

body.dark-mode .sc-subtitle,
body.dark-mode .sc-dash-card-meta,
body.dark-mode .sc-interaction-date,
body.dark-mode .sc-detail-muted {
    color: var(--sc-text-muted);
}

body.dark-mode .sc-table thead th {
    background: var(--app-surface-raised);
    color: var(--sc-text);
    border-color: var(--sc-border);
}

body.dark-mode .sc-table .sc-ticket-link {
    color: #93c5fd;
}

body.dark-mode .sc-table .sc-ticket-link:hover {
    color: #bfdbfe;
}

body.dark-mode .sc-table .sc-ticket-link--static,
body.dark-mode .sc-table.sc-table--trash .sc-ticket-link--static {
    color: var(--sc-text);
}

body.dark-mode .sc-table.sc-table--trash .sc-deleted-at {
    color: #cbd5e1;
}

body.dark-mode .sc-id-badge,
body.dark-mode .sc-table .sc-id-badge {
    background: #374151 !important;
    color: var(--sc-text) !important;
}

body.dark-mode .sc-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .sc-table tbody td {
    border-color: var(--sc-border);
}

body.dark-mode .sc-filter-chip {
    background: var(--app-surface-raised);
    border-color: var(--sc-border);
    color: var(--sc-text);
}

body.dark-mode .sc-filter-chip-value {
    color: var(--sc-text);
}

body.dark-mode .sc-action-btn {
    background: var(--app-surface);
    border-color: var(--sc-border);
    color: var(--sc-text);
}

body.dark-mode .sc-search-input,
body.dark-mode .sc-filter-input {
    background: var(--app-input-bg);
    border-color: var(--sc-border);
    color: var(--sc-text);
}

body.dark-mode .sc-badge--neutral {
    background: var(--app-surface-raised);
    color: var(--sc-text-muted);
}

body.dark-mode .sc-badge--warning {
    background: #3d3419;
    color: #ffeaa7;
}

body.dark-mode .sc-badge--success {
    background: #1e3d2f;
    color: #b8f0cc;
}

body.dark-mode .sc-badge--danger {
    background: #3d1f24;
    color: #f5c6cb;
}

body.dark-mode .sc-badge--info {
    background: #1a3a52;
    color: #b8daff;
}

/* ---- sprint-ui.css ---- */

body.dark-mode .sp-team-filter {
    background: var(--app-surface-raised);
    border-color: var(--app-border);
}

body.dark-mode .sp-team-filter-label {
    color: var(--app-text-muted);
}

body.dark-mode .sp-team-filter-reset {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text-muted);
}

body.dark-mode .sp-alert-hours {
    background: #3d1f24;
    color: #f5c6cb;
}

body.dark-mode .sp-upcoming-panel {
    background: var(--app-surface);
    border-color: var(--app-border);
}

body.dark-mode .sp-upcoming-toggle {
    background: var(--app-surface-raised);
    color: var(--app-text);
}

body.dark-mode .sp-upcoming-toggle:hover {
    background: #374151;
}

body.dark-mode .sp-upcoming-table thead th {
    background: var(--app-surface-raised);
    border-color: var(--app-border);
    color: var(--app-text-muted);
}

body.dark-mode .sp-upcoming-table tbody td {
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .sp-upcoming-footer {
    background: var(--app-surface-raised);
    border-color: var(--app-border);
}

body.dark-mode .sp-empty-sprint {
    background: var(--app-surface);
    border-color: var(--app-border);
}

body.dark-mode .sp-empty-sprint h2 {
    color: var(--app-text);
}

body.dark-mode .sp-empty-sprint p {
    color: var(--app-text-muted);
}

body.dark-mode .sp-page .sp-kanban .status {
    background: var(--app-surface-raised) !important;
    border-color: var(--app-border) !important;
}

body.dark-mode .sp-page .sp-kanban .status.dragEnter {
    border-color: #6ea8fe !important;
    background: #1a3a52 !important;
}

body.dark-mode .sp-page .sp-kanban .sp-kanban-col-title {
    color: var(--app-text-muted) !important;
    border-bottom-color: var(--app-border);
}

body.dark-mode .sp-page .sp-kanban .sp-kanban-count {
    background: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .sp-page .sp-kanban .todo {
    background: var(--app-surface) !important;
    border-color: var(--app-border);
}

body.dark-mode .sp-page .sp-kanban .todo .todo-text {
    color: var(--app-text) !important;
}

body.dark-mode .sp-page .sp-kanban .sp-task-meta,
body.dark-mode .sp-page .sp-kanban .todo-checklist-access {
    border-top-color: var(--app-border);
    color: var(--app-text-muted);
}

body.dark-mode .sp-page .sc-filter-chip {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

/* ---- active-sprint.css ---- */

body.dark-mode .status {
    background-color: var(--app-surface-raised);
}

body.dark-mode .status:nth-child(even) {
    background-color: var(--app-surface);
}

body.dark-mode .status h1 {
    background-color: #212529;
    color: var(--app-text);
}

body.dark-mode .todo {
    background-color: var(--app-surface);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 2px 4px;
    color: var(--app-text);
}

body.dark-mode .todo .close {
    color: var(--app-text-muted);
}

body.dark-mode .todo .close:hover {
    color: var(--app-text);
}

body.dark-mode #add_btn {
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

body.dark-mode #add_btn:hover {
    background-color: var(--app-border);
}

/* ---- checklist-modal.css ---- */

body.dark-mode .checklist-modal-content {
    background-color: var(--app-surface);
    color: var(--app-text);
}

body.dark-mode .checklist-modal-header,
body.dark-mode .checklist-modal-footer {
    border-color: var(--app-border);
}

body.dark-mode .checklist-modal-title,
body.dark-mode .section-title,
body.dark-mode .progress-label,
body.dark-mode .checklist-label,
body.dark-mode .comment-author,
body.dark-mode .comment-text {
    color: var(--app-text);
}

body.dark-mode .checklist-close {
    color: var(--app-text-muted);
}

body.dark-mode .checklist-close:hover {
    background-color: var(--app-surface-raised);
    color: var(--app-text);
}

body.dark-mode .progress-bar-container {
    background-color: var(--app-surface-raised);
}

body.dark-mode .checklist-item,
body.dark-mode .comment-item,
body.dark-mode .add-item-form {
    background-color: var(--app-surface-raised);
    border-color: var(--app-border);
}

body.dark-mode .checklist-item:hover {
    background-color: #374151;
}

body.dark-mode .checklist-item.checked {
    background-color: #1e3d2f;
    border-color: #285c42;
}

body.dark-mode .checklist-item.checked .checklist-label {
    color: #b8f0cc;
}

body.dark-mode .comment-textarea,
body.dark-mode .add-item-input {
    background-color: var(--app-input-bg);
    border-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .progress-stats,
body.dark-mode .checklist-meta,
body.dark-mode .comment-date,
body.dark-mode .comment-hint,
body.dark-mode .checklist-loading {
    color: var(--app-text-muted);
}

body.dark-mode .error-message {
    background-color: #3d1f24;
    border-color: #5c2a32;
    color: #f5c6cb;
}

body.dark-mode .success-message {
    background-color: #1e3d2f;
    border-color: #285c42;
    color: #b8f0cc;
}

/* ---- Dropzone ---- */

body.dark-mode .dropzone {
    background: var(--app-surface-raised);
    border-color: #6ea8fe !important;
}

/* ---- Login page (guest — light by default, but supports class if added) ---- */

body.dark-mode.login-page {
    background-color: var(--app-bg);
}

body.dark-mode.login-page .card {
    background-color: var(--app-surface);
}

body.dark-mode.login-page .login-logo a {
    color: var(--app-text);
}

/* ---- Chosen multi (Categoria no relatório) ---- */

body.dark-mode .chosen-container-multi .chosen-choices {
    background-color: var(--app-input-bg) !important;
    background-image: none !important;
    border-color: var(--app-border) !important;
}

body.dark-mode .chosen-container-multi .chosen-choices .search-field input[type="text"] {
    color: var(--app-text) !important;
}

body.dark-mode .chosen-container-single .chosen-single {
    background-image: none !important;
}

/* ---- Support call info sidebar ---- */

body.dark-mode .sc-info-card,
body.dark-mode .sc-info-card-body {
    background: var(--app-surface) !important;
    border-color: var(--sc-border, var(--app-border));
    color: var(--app-text);
}

body.dark-mode .sc-info-card-header {
    background: var(--app-surface-raised) !important;
    border-bottom-color: var(--app-border);
    color: var(--app-text);
}

body.dark-mode .sc-info-item {
    border-bottom-color: var(--app-border);
}

body.dark-mode .sc-info-item-label {
    color: var(--app-text-muted);
}

body.dark-mode .sc-info-item-value,
body.dark-mode .sc-info-item-value--message,
body.dark-mode .sc-formatted-text,
body.dark-mode .sc-interaction-body {
    color: var(--app-text) !important;
}

body.dark-mode .sc-attachment-link {
    background: #1a3a52;
    color: #b8daff;
}

body.dark-mode .sc-attachment-link:hover {
    background: #244e6d;
    color: #d0e8ff;
}

body.dark-mode .sc-budget-item-label {
    color: var(--app-text-muted);
}

body.dark-mode .sc-budget-item-value {
    color: var(--app-text);
}

/* ---- Tables that use td in thead ---- */

body.dark-mode .table thead td,
body.dark-mode .table thead th,
body.dark-mode .table > tr > th {
    background-color: var(--app-surface-raised) !important;
    color: var(--app-text) !important;
    border-color: var(--app-border) !important;
}

body.dark-mode .table td,
body.dark-mode .table th {
    border-color: var(--app-border);
    color: var(--app-text);
}

/* ---- Customer dashboard (hardcoded light tokens) ---- */

body.dark-mode .customer-dashboard .cd-filter-card {
    background: var(--app-surface-raised);
    border-color: var(--app-border);
}

body.dark-mode .customer-dashboard .cd-client-header {
    border-bottom-color: var(--app-border);
}

body.dark-mode .customer-dashboard .cd-client-title,
body.dark-mode .customer-dashboard .cd-section-heading {
    color: var(--app-text);
}

body.dark-mode .customer-dashboard .cd-client-subtitle,
body.dark-mode .customer-dashboard .cd-section-heading i,
body.dark-mode .customer-dashboard .cd-metric-label {
    color: var(--app-text-muted);
}

body.dark-mode .customer-dashboard .cd-year-badge {
    background: #312e81;
    color: #c7d2fe;
}

body.dark-mode .customer-dashboard .cd-metric-card {
    background: var(--app-surface);
    border-color: var(--app-border);
}

body.dark-mode .customer-dashboard .cd-metric-card:hover {
    border-color: #64748b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

body.dark-mode .customer-dashboard .cd-metric-value {
    color: var(--app-text);
}

body.dark-mode .customer-dashboard .cd-accent-slate .cd-metric-icon { background: #334155; color: #cbd5e1; }
body.dark-mode .customer-dashboard .cd-accent-amber .cd-metric-icon { background: #3d3419; color: #ffeaa7; }
body.dark-mode .customer-dashboard .cd-accent-green .cd-metric-icon { background: #1e3d2f; color: #b8f0cc; }
body.dark-mode .customer-dashboard .cd-accent-violet .cd-metric-icon { background: #2e1065; color: #ddd6fe; }
body.dark-mode .customer-dashboard .cd-accent-teal .cd-metric-icon { background: #134e4a; color: #99f6e4; }

body.dark-mode .customer-dashboard .cd-divider {
    border-color: var(--app-border);
}

body.dark-mode .customer-dashboard .cd-count-badge {
    background: var(--app-surface-raised);
    color: var(--app-text);
}

body.dark-mode .customer-dashboard .cd-pending-card {
    border-color: var(--app-border);
}

body.dark-mode .customer-dashboard .cd-table thead td {
    background: var(--app-surface-raised) !important;
    color: var(--app-text-muted);
    border-color: var(--app-border);
}
