/* Base compartilhada pelo site público (site.css) e pelo painel ADM (admin.css). */
:root {
  --fundo: #faf7f2;
  --superficie: #ffffff;
  --texto: #1d2033;
  --texto-suave: #5d6178;
  --borda: #e7e2d8;
  --primaria: #1e2a5a;
  --primaria-clara: #2f3f80;
  --destaque: #e8a33d;
  --verde: #16a34a;
  --verde-fundo: #e8f7ee;
  --verde-borda: #9ad8b0;
  --vermelho: #dc2626;
  --vermelho-fundo: #fde8e8;
  --laranja: #d97706;
  --laranja-fundo: #fff3dc;
  --whats: #1fa855;
  --raio: 16px;
  --sombra: 0 10px 30px rgba(30, 42, 90, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
.carregando, .vazio { color: var(--texto-suave); text-align: center; padding: 1rem; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 46px; padding: 0 1.2rem; border-radius: 999px; border: 0;
  background: var(--primaria); color: #fff; font: inherit; font-weight: 650;
  text-decoration: none; cursor: pointer; transition: transform .15s, background .15s;
}
.btn:hover { background: var(--primaria-clara); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-sec { background: transparent; color: var(--primaria); box-shadow: inset 0 0 0 2px var(--primaria); }
.btn-sec:hover { background: rgba(30, 42, 90, .06); }
.btn-grande { min-height: 54px; padding: 0 1.8rem; font-size: 1.05rem; }
.btn-peq { min-height: 36px; padding: 0 .9rem; font-size: .9rem; }
.btn-whats { background: var(--whats); }
.btn-whats:hover { background: #17924a; }
.btn-perigo { background: var(--vermelho); }
.btn-perigo:hover { background: #b91c1c; }
.btn-verde { background: var(--verde); }
.btn-verde:hover { background: #15803d; }
:focus-visible { outline: 3px solid var(--destaque); outline-offset: 2px; }

/* ---------- Diálogos ---------- */
.dialogo {
  border: 0; border-radius: 20px; padding: 24px; width: min(440px, calc(100vw - 32px));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3); color: var(--texto); background: var(--superficie);
}
.dialogo::backdrop { background: rgba(20, 24, 45, .55); }
.dialogo label { display: block; font-weight: 600; margin: .8rem 0 0; }
.dialogo input, .dialogo textarea, .dialogo select {
  display: block; width: 100%; margin-top: .3rem; min-height: 46px; padding: .6rem .8rem;
  border: 1px solid var(--borda); border-radius: 12px; font: inherit; background: #fff;
}
.dlg-resumo { background: var(--fundo); border-radius: 12px; padding: .8rem; margin: .4rem 0 0; }
.dlg-acoes { display: flex; gap: 10px; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap; }
.erro { color: var(--vermelho); font-weight: 600; min-height: 1.2em; margin: .6rem 0 0; }

/* ---------- Aviso flutuante ---------- */
.toast {
  position: fixed; left: 50%; top: 16px; transform: translate(-50%, -150%); z-index: 50;
  max-width: calc(100vw - 32px); padding: .8rem 1.1rem; border-radius: 12px; color: #fff;
  background: var(--primaria); box-shadow: var(--sombra); transition: transform .25s; font-weight: 600;
}
.toast.visivel { transform: translate(-50%, 0); }
.toast-aviso { background: var(--laranja); }
.toast-erro { background: var(--vermelho); }
.toast-ok { background: var(--verde); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
