/* Tema claro/escuro — CSS puro (não passa pelo Tailwind) */

.theme-toggle {
  position: relative;
  z-index: 50;
  display: inline-flex !important;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0.75rem;
  border: 1px solid #243247;
  background: #182234;
  color: #e2e8f0;
  padding: 0;
}

.theme-toggle:hover {
  background: #1e293b;
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
}

/* Escuro: mostra sol | Claro: mostra lua */
html:not(.light) [data-theme-icon="moon"] {
  display: none !important;
}
html.light [data-theme-icon="sun"] {
  display: none !important;
}

/* ===== Modo claro (admin/login) ===== */
html.light body {
  background: #f1f5f9 !important;
  background-image:
    radial-gradient(900px 420px at 0% -10%, rgba(20, 184, 166, 0.12), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(56, 189, 248, 0.10), transparent 50%) !important;
  color: #1e293b !important;
}

html.light .topbar {
  border-color: rgba(226, 232, 240, 0.9) !important;
  background: rgba(255, 255, 255, 0.85) !important;
}

html.light .topbar h1,
html.light .brand,
html.light .stat .value,
html.light .amount-hero {
  color: #0f172a !important;
}

html.light .panel,
html.light .card,
html.light .stat {
  border-color: rgba(226, 232, 240, 0.9) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

html.light .muted,
html.light .stat .label,
html.light .dl dt {
  color: #64748b !important;
}

html.light label {
  color: #334155 !important;
}

html.light input[type="text"],
html.light input[type="email"],
html.light input[type="password"],
html.light input[type="number"],
html.light input[type="date"],
html.light input[type="search"],
html.light select,
html.light textarea {
  border-color: #e2e8f0 !important;
  background: #fff !important;
  color: #0f172a !important;
}

html.light .btn {
  border-color: #e2e8f0 !important;
  background: #f8fafc !important;
  color: #334155 !important;
}

html.light .btn-primary {
  border-color: transparent !important;
  background: #0d9488 !important;
  color: #fff !important;
}

html.light .theme-toggle {
  border-color: #e2e8f0 !important;
  background: rgba(255, 255, 255, 0.8) !important;
  color: #475569 !important;
}

html.light th {
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

html.light td {
  border-color: #f1f5f9 !important;
  color: #334155 !important;
}

html.light .badge {
  border-color: #e2e8f0 !important;
  background: #f8fafc !important;
}

html.light .alert-error {
  border-color: #fecaca !important;
  background: #fff1f2 !important;
  color: #b91c1c !important;
}

html.light .alert-success {
  border-color: #a7f3d0 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
}

html.light .notice {
  border-color: #99f6e4 !important;
  background: #f0fdfa !important;
  color: #115e59 !important;
}

html.light .dl dd {
  color: #1e293b !important;
}

html.light a {
  color: #0d9488 !important;
}
