/* GERADO por scripts/gerar-tema-escuro.js a partir das cores do tema claro.
   Nao edite aqui: ajuste a regra no gerador (BASE) ou a cor na fonte e rode o script. */

[data-bs-theme="dark"] {
  --hd-fundo: #0f1620;
  --hd-superficie: #172231;
  --hd-superficie-2: #1d2a3b;
  --hd-borda: #2a3a4f;
  --hd-texto: #e3e9f2;
  --hd-texto-suave: #9fb0c6;
  --bs-body-bg: var(--hd-fundo);
  --bs-body-color: var(--hd-texto);
  --bs-secondary-color: var(--hd-texto-suave);
  --bs-border-color: var(--hd-borda);
  --bs-tertiary-bg: var(--hd-superficie-2);
  color-scheme: dark;
}
[data-bs-theme="dark"] body, [data-bs-theme="dark"] body.bg-light { background: var(--hd-fundo) !important; color: var(--hd-texto); }
[data-bs-theme="dark"] .bg-light, [data-bs-theme="dark"] .bg-white { background-color: var(--hd-superficie) !important; color: var(--hd-texto); }
[data-bs-theme="dark"] .card, [data-bs-theme="dark"] .modal-content, [data-bs-theme="dark"] .dropdown-menu, [data-bs-theme="dark"] .list-group-item {
  background-color: var(--hd-superficie); color: var(--hd-texto); border-color: var(--hd-borda);
}
[data-bs-theme="dark"] .table { --bs-table-bg: transparent; --bs-table-color: var(--hd-texto); --bs-table-border-color: var(--hd-borda);
  --bs-table-striped-bg: rgba(255,255,255,0.03); --bs-table-hover-bg: rgba(255,255,255,0.05); }
[data-bs-theme="dark"] .table-light, [data-bs-theme="dark"] .table > thead { --bs-table-bg: var(--hd-superficie-2); --bs-table-color: var(--hd-texto); }
[data-bs-theme="dark"] .btn-light { background: var(--hd-superficie-2); border-color: var(--hd-borda); color: var(--hd-texto); }
[data-bs-theme="dark"] .btn-light:hover { background: var(--hd-borda); color: #fff; }
[data-bs-theme="dark"] .text-dark { color: var(--hd-texto) !important; }
[data-bs-theme="dark"] .text-muted, [data-bs-theme="dark"] .text-secondary { color: var(--hd-texto-suave) !important; }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select { background-color: var(--hd-superficie-2); color: var(--hd-texto); border-color: var(--hd-borda); }
[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { background-color: var(--hd-superficie-2); color: var(--hd-texto); }
[data-bs-theme="dark"] .form-control::placeholder { color: #6f8197; }
[data-bs-theme="dark"] .form-control:disabled, [data-bs-theme="dark"] .form-control[readonly] { background-color: #142030; }
[data-bs-theme="dark"] .alert-warning { background: #3a2f12; color: #f3d98b; border-color: #5a4a1d; }
[data-bs-theme="dark"] .alert-success { background: #12301f; color: #9fe0b7; border-color: #1f4a31; }
[data-bs-theme="dark"] .alert-danger { background: #3a1719; color: #f1a7ad; border-color: #5a2328; }
[data-bs-theme="dark"] .alert-info { background: #11293a; color: #9fd3f1; border-color: #1d4058; }
[data-bs-theme="dark"] pre, [data-bs-theme="dark"] code { color: #d6e2f0; }
[data-bs-theme="dark"] img.app-header-logo, [data-bs-theme="dark"] img.app-footer-logo { filter: none; }
/* Cores escritas direto em style="" nas telas (poucas): casadas pelo atributo. */
[data-bs-theme="dark"] [style*="background:#f0f5fc"], [data-bs-theme="dark"] [style*="background:#f0f4fa"] { background: var(--hd-superficie-2) !important; }
[data-bs-theme="dark"] [style*="border:1px solid #d1dae8"] { border-color: var(--hd-borda) !important; }
[data-bs-theme="dark"] [style*="color:#334155"], [data-bs-theme="dark"] [style*="color:#4a6080"] { color: var(--hd-texto) !important; }
[data-bs-theme="dark"] [style*="background:#fff3cd"] { background: #3a2f12 !important; border-color: #5a4a1d !important; }
[data-bs-theme="dark"] [style*="color:#856404"] { color: #f3d98b !important; }

/* ---- de public/css/styles.css ---- */
[data-bs-theme="dark"] body {
  background: hsl(216, 20%, 16.5%) !important;
}
[data-bs-theme="dark"] .sla-alert-banner {
  background: linear-gradient(135deg, hsl(50, 35%, 30%), #ffc933) !important;
  color: hsl(40, 48%, 84.7%) !important;
}
[data-bs-theme="dark"] .sla-alert-banner-icon {
  color: hsl(40, 48%, 82.2%) !important;
}
[data-bs-theme="dark"] .login-panel {
  background: hsl(214, 30%, 14%) !important;
  border: 1px solid hsl(214, 30%, 26%) !important;
}
[data-bs-theme="dark"] .login-form-title {
  color: hsl(213, 48%, 86.5%) !important;
}
[data-bs-theme="dark"] .login-form-subtitle {
  color: hsl(212, 14.6%, 75.4%) !important;
}
[data-bs-theme="dark"] .login-form .form-control {
  border-color: hsl(214, 30%, 26%) !important;
}
[data-bs-theme="dark"] .login-footer {
  border-top: 1px solid hsl(214, 30%, 26%) !important;
  color: hsl(214, 16%, 78.5%) !important;
}
[data-bs-theme="dark"] .login-footer-link {
  color: hsl(212, 48%, 77.5%) !important;
}
[data-bs-theme="dark"] .login-footer-link:hover {
  color: hsl(211, 48%, 82.4%) !important;
}
[data-bs-theme="dark"] .login-footer-wa-icon {
  fill: hsl(143, 48%, 77.9%) !important;
}
[data-bs-theme="dark"] .app-footer-link--wa svg {
  color: hsl(142, 48%, 73.5%) !important;
}
[data-bs-theme="dark"] .badge-status-em_andamento {
  color: hsl(210, 8.6%, 87.2%) !important;
}
[data-bs-theme="dark"] .badge-status-pausa {
  color: hsl(210, 8.6%, 87.2%) !important;
}
[data-bs-theme="dark"] .badge-status-aguardando_usuario {
  color: hsl(210, 8.6%, 87.2%) !important;
}
[data-bs-theme="dark"] .stat-card {
  background: hsl(214, 30%, 14%) !important;
  border: 1px solid hsl(216, 30%, 26%) !important;
}
[data-bs-theme="dark"] .stat-card-value {
  color: hsl(213, 48%, 86.5%) !important;
}
[data-bs-theme="dark"] .stat-card-label {
  color: hsl(212, 14.6%, 75.4%) !important;
}
[data-bs-theme="dark"] .tickets-table-card {
  border: 1px solid hsl(216, 30%, 26%) !important;
}
[data-bs-theme="dark"] .tickets-table thead tr {
  background: hsl(214, 35%, 15.3%) !important;
}
[data-bs-theme="dark"] .tickets-table thead th {
  color: hsl(214, 16%, 78.5%) !important;
  border-bottom: 2px solid hsl(211, 30%, 26%) !important;
}
[data-bs-theme="dark"] .tickets-table tbody tr {
  border-bottom: 1px solid hsl(213, 30%, 26%) !important;
}
[data-bs-theme="dark"] .tickets-table tbody tr:hover {
  background: hsl(216, 35%, 15.5%) !important;
}
[data-bs-theme="dark"] .tickets-title {
  color: hsl(213, 48%, 86.5%) !important;
}
[data-bs-theme="dark"] .admin-panel-header {
  background: hsl(214, 35%, 15.3%) !important;
  border-bottom: 1px solid hsl(211, 30%, 26%) !important;
}
[data-bs-theme="dark"] .admin-panel-header-title {
  color: hsl(212, 48%, 80.8%) !important;
}
[data-bs-theme="dark"] .admin-section-title {
  color: hsl(212, 48%, 80.8%) !important;
}
[data-bs-theme="dark"] .admin-refresh-badge {
  color: hsl(209, 21.4%, 71.2%) !important;
}
[data-bs-theme="dark"] .app-header-toggler:hover {
  border-color: hsla(214, 30%, 26%, 0.7) !important;
}
@media (max-width: 576px) {
[data-bs-theme="dark"] .tickets-table tbody tr:hover {
  background: hsl(216, 35%, 15.5%) !important;
}
[data-bs-theme="dark"] .tickets-table-row--link:active {
  background: hsl(214, 35%, 16.7%) !important;
}
}
[data-bs-theme="dark"] .notif-toast {
  background: hsl(214, 30%, 14%) !important;
  border: 1px solid hsl(216, 30%, 26%) !important;
}
[data-bs-theme="dark"] .notif-toast-icon {
  color: hsl(212, 48%, 75%) !important;
}
[data-bs-theme="dark"] .notif-toast--admin .notif-toast-icon {
  color: hsl(152, 48%, 80.5%) !important;
}
[data-bs-theme="dark"] .notif-toast-body {
  color: hsl(210, 34.8%, 85.8%) !important;
}
[data-bs-theme="dark"] .notif-toast-close {
  color: hsl(195, 11.3%, 71.3%) !important;
}
[data-bs-theme="dark"] .notif-toast-close:hover {
  color: hsl(210, 34.8%, 85.8%) !important;
}
[data-bs-theme="dark"] .notif-list-item {
  background: hsl(214, 30%, 14%) !important;
}
[data-bs-theme="dark"] .notif-list-item:hover {
  background: hsl(214, 35%, 15.3%) !important;
}
[data-bs-theme="dark"] .notif-list-item--unread {
  background: hsl(216, 35%, 15.5%) !important;
}
[data-bs-theme="dark"] .notif-list-item--unread:hover {
  background: hsl(214, 35%, 16.6%) !important;
}
[data-bs-theme="dark"] .notif-list-icon {
  background: hsl(217, 35%, 16.7%) !important;
  color: hsl(212, 48%, 75%) !important;
}
[data-bs-theme="dark"] .notif-list-icon--admin {
  background: hsl(154, 35%, 17.5%) !important;
  color: hsl(152, 48%, 80.5%) !important;
}
[data-bs-theme="dark"] .notif-list-icon--user {
  background: hsl(217, 35%, 16.7%) !important;
  color: hsl(212, 48%, 75%) !important;
}
[data-bs-theme="dark"] .notif-list-icon--comment {
  background: hsl(37, 35%, 17%) !important;
  color: hsl(33, 48%, 75.4%) !important;
}
[data-bs-theme="dark"] .notif-toast--comment .notif-toast-icon {
  color: hsl(33, 48%, 75.4%) !important;
}
[data-bs-theme="dark"] .notif-list-message {
  color: hsl(210, 34.8%, 85.8%) !important;
}
[data-bs-theme="dark"] .notif-list-time {
  color: hsl(195, 11.3%, 71.3%) !important;
}

/* ---- de views/admin-db-console.ejs ---- */
[data-bs-theme="dark"] .db-console-shell {
  background: linear-gradient(180deg, hsl(216, 35%, 15%), hsl(212, 35%, 16.1%)) !important;
  border: 1px solid hsl(215, 30%, 26%) !important;
}
[data-bs-theme="dark"] .db-console-title {
  color: hsl(214, 48%, 82.9%) !important;
}
[data-bs-theme="dark"] .db-console-subtitle {
  color: hsl(215, 18%, 73.8%) !important;
}
[data-bs-theme="dark"] .db-card {
  background: hsl(214, 30%, 14%) !important;
  border: 1px solid hsl(214, 30%, 26%) !important;
}
[data-bs-theme="dark"] .db-card-title {
  color: hsl(213, 42.7%, 82.6%) !important;
}
[data-bs-theme="dark"] .db-sql-textarea {
  border: 1px solid hsl(213, 30%, 26%) !important;
  background: hsl(210, 35%, 14.4%) !important;
  color: hsl(211, 48%, 86.3%) !important;
}
[data-bs-theme="dark"] .db-chip {
  background: hsl(212, 35%, 15.9%) !important;
  border: 1px solid hsl(212, 30%, 26%) !important;
  color: hsl(212, 34%, 78.3%) !important;
}
[data-bs-theme="dark"] .db-chip:hover {
  background: hsl(210, 35%, 16.9%) !important;
}
[data-bs-theme="dark"] .db-table-list {
  border: 1px solid hsl(213, 30%, 26%) !important;
}
[data-bs-theme="dark"] .db-table-list-item {
  border-bottom: 1px solid hsl(216, 30%, 26%) !important;
}
[data-bs-theme="dark"] .db-result-table-wrap {
  border: 1px solid hsl(212, 30%, 26%) !important;
}
[data-bs-theme="dark"] .db-result-table thead {
  background: hsl(216, 35%, 15%) !important;
}
[data-bs-theme="dark"] .db-note {
  color: hsl(214, 19.3%, 73.2%) !important;
}
[data-bs-theme="dark"] .db-inline-result {
  border: 1px solid hsl(212, 30%, 26%) !important;
  background: hsl(214, 30%, 14%) !important;
}
[data-bs-theme="dark"] .db-inline-result-title {
  color: hsl(213, 42.7%, 82.6%) !important;
}
[data-bs-theme="dark"] .db-danger-zone {
  border: 1px solid hsl(354, 30%, 26%) !important;
  background: hsl(354, 35%, 15%) !important;
}
[data-bs-theme="dark"] .db-danger-zone-title {
  color: hsl(352, 48%, 79.7%) !important;
}
[data-bs-theme="dark"] .db-scope-hint {
  color: hsl(214, 19.3%, 73.2%) !important;
}

/* ---- de views/admin-relatorios.ejs ---- */
[data-bs-theme="dark"] .rel-shell::before {
  background: radial-gradient(circle at 12% 18%, rgba(43,111,187,0.20), transparent 32%),
      radial-gradient(circle at 86% 12%, rgba(13,148,136,0.16), transparent 28%),
      linear-gradient(180deg, hsla(214, 30%, 14%, 0.95), rgba(255,255,255,0)) !important;
}
[data-bs-theme="dark"] .rel-header {
  background: linear-gradient(135deg, hsla(214, 30%, 14%, 0.96), hsla(210, 35%, 16.2%, 0.92)) !important;
  border: 1px solid hsla(212, 30%, 26%, 0.78) !important;
}
[data-bs-theme="dark"] .rel-header p {
  color: hsl(215, 13.1%, 74.3%) !important;
}
[data-bs-theme="dark"] .rel-header-badge {
  color: hsl(214, 48%, 82.9%) !important;
}
[data-bs-theme="dark"] .kpi-card {
  background: linear-gradient(180deg, hsl(214, 30%, 14%), hsl(210, 35%, 15%)) !important;
  border: 1px solid hsl(214, 30%, 26%) !important;
}
[data-bs-theme="dark"] .kpi-icon--blue {
  background: hsl(215, 35%, 16.6%) !important;
  color: hsl(212, 48%, 75%) !important;
}
[data-bs-theme="dark"] .kpi-icon--yellow {
  background: hsl(46, 35%, 16.9%) !important;
  color: hsl(38, 48%, 72.9%) !important;
}
[data-bs-theme="dark"] .kpi-icon--green {
  background: hsl(157, 35%, 16.7%) !important;
  color: hsl(160, 48%, 77.2%) !important;
}
[data-bs-theme="dark"] .kpi-icon--teal {
  background: hsl(172, 35%, 17.8%) !important;
  color: hsl(175, 48%, 80.4%) !important;
}
[data-bs-theme="dark"] .kpi-value {
  color: hsl(214, 48%, 82.9%) !important;
}
[data-bs-theme="dark"] .kpi-label {
  color: hsl(215, 13.1%, 74.3%) !important;
}
[data-bs-theme="dark"] .chart-card {
  background: linear-gradient(180deg, hsla(214, 30%, 14%, 0.96), hsla(210, 35%, 15%, 0.94)) !important;
  border: 1px solid hsl(214, 30%, 26%) !important;
}
[data-bs-theme="dark"] .chart-card-kicker {
  color: hsl(212, 48%, 75%) !important;
}
[data-bs-theme="dark"] .chart-card-title {
  color: hsl(214, 41.6%, 83.2%) !important;
}
[data-bs-theme="dark"] .unit-days-table th, [data-bs-theme="dark"] .unit-days-table td {
  border-bottom: 1px solid hsl(214, 30%, 26%) !important;
}
[data-bs-theme="dark"] .unit-days-table th {
  color: hsl(213, 42.7%, 82.6%) !important;
}
[data-bs-theme="dark"] .unit-days-empty {
  color: hsl(215, 13.1%, 74.3%) !important;
}

/* ---- de views/admin.ejs ---- */
[data-bs-theme="dark"] .admin-summary-card {
  background: hsl(214, 30%, 14%) !important;
  border: 1.5px solid hsl(215, 30%, 26%) !important;
}
[data-bs-theme="dark"] .admin-summary-card:hover {
  border-color: hsl(214, 30%, 26%) !important;
}
[data-bs-theme="dark"] .admin-summary-card .asc-value {
  color: hsl(214, 48%, 82.9%) !important;
}
[data-bs-theme="dark"] .admin-summary-card .asc-label {
  color: hsl(212, 18.5%, 70%) !important;
}
[data-bs-theme="dark"] .asc-icon--blue {
  background: hsl(215, 35%, 16.6%) !important;
  color: hsl(212, 48%, 75%) !important;
}
[data-bs-theme="dark"] .asc-icon--yellow {
  background: hsl(46, 35%, 16.9%) !important;
  color: hsl(38, 48%, 72.9%) !important;
}
[data-bs-theme="dark"] .asc-icon--teal {
  background: hsl(172, 35%, 17.8%) !important;
  color: hsl(175, 48%, 80.4%) !important;
}
[data-bs-theme="dark"] .asc-icon--green {
  background: hsl(157, 35%, 16.7%) !important;
  color: hsl(160, 48%, 77.2%) !important;
}
[data-bs-theme="dark"] .admin-drawer {
  background: hsl(216, 35%, 15%) !important;
  border-left: 1px solid hsl(210, 30%, 26%) !important;
}
[data-bs-theme="dark"] .admin-drawer-header {
  border-bottom: 1px solid hsl(214, 30%, 26%) !important;
  background: hsl(214, 30%, 14%) !important;
}
[data-bs-theme="dark"] .admin-drawer-title {
  color: hsl(214, 48%, 82.9%) !important;
}
[data-bs-theme="dark"] .admin-drawer-close {
  border: 1.5px solid hsl(217, 30%, 26%) !important;
  background: hsl(214, 35%, 15.5%) !important;
  color: hsl(216, 21.4%, 77.2%) !important;
}
[data-bs-theme="dark"] .admin-drawer-close:hover {
  background: hsl(217, 35%, 16.9%) !important;
  color: hsl(213, 42.7%, 82.6%) !important;
}
[data-bs-theme="dark"] .admin-drawer-filters {
  background: hsl(214, 35%, 14.7%) !important;
  border-bottom: 1px solid hsl(214, 30%, 26%) !important;
}
[data-bs-theme="dark"] .adf-chip {
  border: 1.5px solid hsl(217, 30%, 26%) !important;
  background: hsl(214, 35%, 15.5%) !important;
  color: hsl(216, 21.4%, 77.2%) !important;
}
[data-bs-theme="dark"] .adf-chip:hover {
  background: hsl(217, 35%, 16.9%) !important;
  border-color: hsl(214, 30%, 26%) !important;
  color: hsl(213, 42.7%, 82.6%) !important;
}
[data-bs-theme="dark"] .admin-drawer-table th {
  background: hsl(215, 35%, 15.8%) !important;
  color: hsl(213, 42.7%, 82.6%) !important;
  border-bottom: 1px solid hsl(214, 30%, 26%) !important;
}
[data-bs-theme="dark"] .admin-drawer-table td {
  border-bottom: 1px solid hsl(216, 30%, 26%) !important;
}
[data-bs-theme="dark"] .admin-drawer-table tr:hover td {
  background: hsl(214, 35%, 14.7%) !important;
}
[data-bs-theme="dark"] .admin-drawer-footer {
  border-top: 1px solid hsl(214, 30%, 26%) !important;
  background: hsl(214, 30%, 14%) !important;
}
[data-bs-theme="dark"] .adf-page-info {
  color: hsl(212, 18.5%, 70%) !important;
}
[data-bs-theme="dark"] .adf-page-btn {
  border: 1.5px solid hsl(217, 30%, 26%) !important;
  background: hsl(214, 35%, 15.5%) !important;
  color: hsl(216, 21.4%, 77.2%) !important;
}
[data-bs-theme="dark"] .adf-page-btn:hover:not(:disabled) {
  background: hsl(217, 35%, 16.9%) !important;
  border-color: hsl(214, 30%, 26%) !important;
}

/* ---- de views/tickets-list.ejs ---- */
[data-bs-theme="dark"] .ticket-filter-chip {
  border: 1.5px solid hsl(217, 30%, 26%) !important;
  background: hsl(214, 35%, 15.5%) !important;
  color: hsl(216, 21.4%, 77.2%) !important;
}
[data-bs-theme="dark"] .ticket-filter-chip:hover {
  background: hsl(217, 35%, 16.9%) !important;
  border-color: hsl(214, 30%, 26%) !important;
  color: hsl(213, 42.7%, 82.6%) !important;
}
