/* =====================================================================
   escuro.css (v17.32) — MODO ESCURO: base manual
   O resto (as cores de cada tela) é gerado em escuro-auto.css por scripts/gerar-escuro.js.
   Liga com <html data-tema="escuro" data-bs-theme="dark"> (js/tema.js).
   ===================================================================== */
html[data-tema="escuro"] {
  color-scheme: dark;
  --bs-body-bg: #16181d; --bs-body-color: #d9dde4; --bs-emphasis-color: #f1f3f6;
  --bs-secondary-color: rgba(217,221,228,.7); --bs-tertiary-color: rgba(217,221,228,.5);
  --bs-secondary-bg: #20232a; --bs-tertiary-bg: #1c1f25; --bs-border-color: #2c313b; --bs-border-color-translucent: rgba(255,255,255,.1);
  --bs-heading-color: #f1f3f6; --bs-link-color: #ff7ab8; --bs-link-hover-color: #ffa3cd; --bs-link-color-rgb: 255,122,184;
  --bs-card-bg: #1e2127;
  --va-dark: #0b0c0f; --va-dark2: #121419; --va-dark3: #1b1e24;
}
html[data-tema="escuro"] body { background: #16181d !important; color: #d9dde4; }
html[data-tema="escuro"] .card, html[data-tema="escuro"] .modal-content, html[data-tema="escuro"] .dropdown-menu:not(.navbar-nav .dropdown-menu),
html[data-tema="escuro"] .offcanvas, html[data-tema="escuro"] .toast, html[data-tema="escuro"] .popover, html[data-tema="escuro"] .list-group-item { background-color: #1e2127; color: #d9dde4; border-color: #2c313b; }
html[data-tema="escuro"] .card-header, html[data-tema="escuro"] .card-footer, html[data-tema="escuro"] .modal-header, html[data-tema="escuro"] .modal-footer { background-color: #1a1d22; border-color: #2c313b; }
html[data-tema="escuro"] .bg-white, html[data-tema="escuro"] .bg-light, html[data-tema="escuro"] .bg-body { background-color: #1e2127 !important; }
html[data-tema="escuro"] .text-dark, html[data-tema="escuro"] .text-body, html[data-tema="escuro"] .text-black { color: #e6e9ee !important; }
html[data-tema="escuro"] .text-muted, html[data-tema="escuro"] .text-secondary { color: #9aa3b2 !important; }
html[data-tema="escuro"] .border, html[data-tema="escuro"] .border-top, html[data-tema="escuro"] .border-bottom, html[data-tema="escuro"] .border-start, html[data-tema="escuro"] .border-end { border-color: #2c313b !important; }
html[data-tema="escuro"] .btn-light { background: #262a32; border-color: #313744; color: #d9dde4; }
html[data-tema="escuro"] .btn-light:hover { background: #2e333d; color: #fff; }
html[data-tema="escuro"] .btn-outline-secondary { color: #b8c0cc; border-color: #3a404c; }
html[data-tema="escuro"] .btn-outline-secondary:hover { background: #2e333d; color: #fff; }
html[data-tema="escuro"] .btn-outline-dark { color: #d9dde4; border-color: #4a5160; }
html[data-tema="escuro"] .btn-dark { background: #2e333d; border-color: #3a404c; }
html[data-tema="escuro"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
/* campos */
html[data-tema="escuro"] .form-control, html[data-tema="escuro"] .form-select, html[data-tema="escuro"] input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),
html[data-tema="escuro"] textarea, html[data-tema="escuro"] select { background-color: #121419 !important; color: #e6e9ee !important; border-color: #343a46 !important; }
html[data-tema="escuro"] .form-control::placeholder, html[data-tema="escuro"] input::placeholder, html[data-tema="escuro"] textarea::placeholder { color: #6f7785 !important; }
html[data-tema="escuro"] .form-control:disabled, html[data-tema="escuro"] .form-control[readonly] { background-color: #1a1d22 !important; }
html[data-tema="escuro"] .input-group-text { background: #20232a; color: #b8c0cc; border-color: #343a46; }
/* tabelas */
html[data-tema="escuro"] .table { --bs-table-bg: #1e2127; --bs-table-color: #d9dde4; --bs-table-striped-bg: #22262d; --bs-table-hover-bg: #262a32; --bs-table-border-color: #2c313b; color: #d9dde4; }
html[data-tema="escuro"] .table-light, html[data-tema="escuro"] thead.table-light th { --bs-table-bg: #22262d; --bs-table-color: #c5ccd6; }
/* alertas e selos claros */
html[data-tema="escuro"] .alert-warning { background: #2c2611; color: #f3d98b; border-color: #4a3f17; }
html[data-tema="escuro"] .alert-info { background: #10252e; color: #9ad8ec; border-color: #1d4352; }
html[data-tema="escuro"] .alert-danger { background: #2e1416; color: #f3a6ab; border-color: #52232a; }
html[data-tema="escuro"] .alert-success { background: #112a1a; color: #9fe0b5; border-color: #1f4a2d; }
html[data-tema="escuro"] .alert-secondary, html[data-tema="escuro"] .alert-light { background: #20232a; color: #c5ccd6; border-color: #2c313b; }
html[data-tema="escuro"] .badge.bg-light, html[data-tema="escuro"] .badge.text-dark { background: #2a2e36 !important; color: #e6e9ee !important; }
html[data-tema="escuro"] .bg-success-subtle { background-color: #112a1a !important; } html[data-tema="escuro"] .bg-warning-subtle { background-color: #2c2611 !important; }
html[data-tema="escuro"] .bg-danger-subtle { background-color: #2e1416 !important; } html[data-tema="escuro"] .bg-primary-subtle, html[data-tema="escuro"] .bg-info-subtle { background-color: #142338 !important; }
/* barra de rolagem */
html[data-tema="escuro"] ::-webkit-scrollbar { width: 10px; height: 10px; } html[data-tema="escuro"] ::-webkit-scrollbar-track { background: #121419; }
html[data-tema="escuro"] ::-webkit-scrollbar-thumb { background: #343a46; border-radius: 8px; }
/* fotos e logos não mudam; sombras um pouco mais fortes */
html[data-tema="escuro"] .shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,.5) !important; }
html[data-tema="escuro"] hr { border-color: #2c313b; opacity: 1; }
/* e-mail: o HTML do e-mail continua claro (é como o cliente escreveu) */
html[data-tema="escuro"] #emlFrame, html[data-tema="escuro"] .eml-ass-prev { background: #fff; border-radius: 8px; }
/* botão de tema */
.va-tema-btn i { transition: transform .3s ease; } .va-tema-btn:hover i { transform: rotate(-20deg); }
html { transition: background-color .2s ease; }
/* cores que as telas montam na hora (não dá para gerar antes) */
html[data-tema="escuro"] .kanban-col-header { background: #1e2127 !important; box-shadow: inset 0 -2px 0 rgba(255,255,255,.06); }
html[data-tema="escuro"] #agRoot .ag-it .ic, html[data-tema="escuro"] #agRoot .ag-pill { background: color-mix(in srgb, var(--c) 20%, #1e2127) !important; }
html[data-tema="escuro"] .mc-pl, html[data-tema="escuro"] .ft-card .ptype { filter: brightness(.95); }
html[data-tema="escuro"] .nv-ic { background: color-mix(in srgb, var(--c) 22%, #1e2127) !important; }
