/* ===================================================
   Dark mode — compartilhado entre todas as páginas
   Aplicado via [data-theme="dark"] no <html>
=================================================== */

/* ---- Transições suaves ---- */
body,
.card, .section, .container, .resultado, .filters, .info-list,
table, th, td, input, select, .das-item, .tributo-item,
.aliquota-item, .dre-row, .toggle-row, .logo-area,
.tech-tags, .name-cell, .aliquota-box, h1, h2, h3, p, label {
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ---- Body ---- */
[data-theme="dark"] body {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

/* ---- Títulos ---- */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .subtitle,
[data-theme="dark"] p {
  color: #94a3b8 !important;
}

/* ---- Containers / Cards ---- */
[data-theme="dark"] .card,
[data-theme="dark"] .section,
[data-theme="dark"] .container,
[data-theme="dark"] .resultado,
[data-theme="dark"] .filters {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

/* ---- Tabela ---- */
[data-theme="dark"] table {
  background: #1e293b !important;
}
[data-theme="dark"] th {
  background: #0f172a !important;
  color: #94a3b8 !important;
  border-bottom-color: #334155 !important;
}
[data-theme="dark"] td {
  color: #e2e8f0 !important;
  border-bottom-color: #1e293b !important;
}
[data-theme="dark"] tr:hover td {
  background: #334155 !important;
}

/* ---- Inputs / Selects ---- */
[data-theme="dark"] input,
[data-theme="dark"] select {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus {
  border-color: #2563eb !important;
}

/* ---- Labels / desc ---- */
[data-theme="dark"] label {
  color: #94a3b8 !important;
}
[data-theme="dark"] .desc,
[data-theme="dark"] .card .desc {
  color: #64748b !important;
}

/* ---- Widgets de dados ---- */
[data-theme="dark"] .das-item,
[data-theme="dark"] .tributo-item,
[data-theme="dark"] .aliquota-item {
  background: #0f172a !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .das-item .mes,
[data-theme="dark"] .tributo-item .nome,
[data-theme="dark"] .tributo-item .base,
[data-theme="dark"] .aliquota-item .faixa,
[data-theme="dark"] .aliquota-item .limite {
  color: #64748b !important;
}

/* ---- DRE ---- */
[data-theme="dark"] .dre-row {
  border-bottom-color: #334155 !important;
}
[data-theme="dark"] .dre-row .label {
  color: #94a3b8 !important;
}

/* ---- Configurações: toggles ---- */
[data-theme="dark"] .toggle-row {
  border-bottom-color: #334155 !important;
}
[data-theme="dark"] .toggle-row > div > span {
  color: #e2e8f0 !important;
}
[data-theme="dark"] .toggle-row small {
  color: #64748b !important;
}

/* ---- Sobre: info list / tech tags ---- */
[data-theme="dark"] .info-list li {
  border-bottom-color: #334155 !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] .info-list li strong {
  color: #94a3b8 !important;
}
[data-theme="dark"] .tag {
  background: #1e3a8a !important;
  color: #bfdbfe !important;
}
[data-theme="dark"] .logo-area p {
  color: #64748b !important;
}

/* ---- Barra de progresso ---- */
[data-theme="dark"] .progress-bar {
  background: #334155 !important;
}

/* ---- Barra de busca / toolbar ---- */
[data-theme="dark"] .search {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* ---- Simples Nacional (calculadora) ---- */
[data-theme="dark"] .container h1 {
  color: #f1f5f9 !important;
}
[data-theme="dark"] .resultado h2,
[data-theme="dark"] .resultado p {
  color: #e2e8f0 !important;
}
[data-theme="dark"] .resultado {
  background: #0f172a !important;
}
