/* GSD Educação — temas escuro e claro
   Escuro é o padrão (variáveis em style.css). Aqui só o tema claro e o botão de troca.
   Regras: ver identidade/design-guide.md. Único acento: verde #4ADE80; texto verde no claro usa #15803D. */

html[data-theme="claro"] {
  --bg: #F3F0E7;
  --bg-alt: #E9E5D8;
  --text: #2A2A24;
  --text-dim: #6B6B63;
  --text-muted: #45453D;
  --white: #1A1A1A;
  --accent-text: #15803D;
  --on-accent: #1A1A1A;
  --tint-rgb: 42, 42, 36;
  color-scheme: light;
}
html[data-theme="escuro"] { color-scheme: dark; }

/* Botão de troca de tema (inserido por js/tema.js) */
.tema-botao {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
@media (max-width: 899px) {
  /* acima da barra inferior de navegação das telas internas */
  body.has-app-shell .tema-botao { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.tema-botao.tema-topo {
  position: static;
  width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
  flex: none;
  box-shadow: none;
}
.tema-botao.tema-topo svg { width: 18px; height: 18px; }
.tema-botao:hover { border-color: var(--accent); }
.tema-botao:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tema-botao svg { width: 16px; height: 16px; }

/* Menu lateral e cartões: seguem o tema (o escuro original usava preto translúcido fixo) */
.app-sidebar { background: color-mix(in srgb, var(--bg-alt) 70%, transparent); }
html[data-theme="claro"] .glass-panel {
  background: #FBFAF6;
  border-color: var(--border);
  box-shadow: none;
}
html[data-theme="claro"] body.has-app-shell::before,
html[data-theme="claro"] body.has-app-shell::after { opacity: 0.35; }
