/* =====================================================================
   Base: reset, tipografia padrão, foco, ícones e animações
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--fonte);
  font-size: var(--tamanho-base);
  line-height: var(--altura-linha);
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4 { margin: 0; line-height: var(--altura-linha-titulo); font-weight: var(--peso-semibold); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--primaria-texto); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--borda); margin: var(--espaco-4) 0; }

/* Rails: componentes (modal, ícones alternados) usam o atributo hidden;
   garante que ele vença regras de display dos componentes. */
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--foco);
  outline-offset: 2px;
  border-radius: 6px;
}

.icone { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icone-sm { width: 16px; height: 16px; }
.icone-lg { width: 24px; height: 24px; }

@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes subir { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes subir-folha { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }
