/* ============================================================
   MOEDARIO — 02 · BASE
   Reset, tipografia, utilitários e animações globais.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scrollbar-color: var(--scrollbar-thumb) transparent;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}
[data-theme="light"] { color-scheme: light; }

body {
  min-height: 100vh;
  background: var(--bg-gradiente), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

h1, h2, h3 { font-family: var(--font); font-weight: 800; letter-spacing: -0.005em; line-height: 1.2; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: var(--primary); color: var(--on-primary); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Brilho ambiente antigo: mantido só como elemento vazio (o fundo agora vem do body). */
.bg-glow { display: none; }

/* ---------------------------------------------- ícones SVG (macro _icones.html) */
.icone { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Ícone "de app": quadrado arredondado na cor da seção (--cor/--cor-2) com o desenho em branco. */
.nav-icone, .menu-tile-icone, .atalho-icone, .kpi-icone {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(145deg, var(--cor-2, var(--primary)), var(--cor, var(--primary)));
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--cor, var(--primary)) 70%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .22);
}
.nav-icone .icone, .menu-tile-icone .icone, .atalho-icone .icone, .kpi-icone .icone { stroke-width: 2.1; }

/* ---------------------------------------------- utilitários */
.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -0.01em; }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.right { text-align: right; }
.hint { color: var(--text-dim); font-size: var(--fs-sm); margin-top: -8px; margin-bottom: 16px; line-height: 1.5; }
.section { margin-bottom: 24px; }
.inline, form.inline { display: inline; }
.green { color: var(--success); }
.red { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------- animações */
@keyframes subir { from { opacity: 0; transform: translateY(8px); } }
@keyframes aparecer { from { opacity: 0; } }
@keyframes surgir { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes girar { to { transform: rotate(360deg); } }

/* Transição suave entre páginas (navegadores com View Transitions). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 120ms ease-out both aparecer reverse; }
::view-transition-new(root) { animation: 180ms ease-out both aparecer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  @view-transition { navigation: none; }
}
