/* =========================================================
   MESTRE LÚDICO — estilo base
   Claro, colorido e legível (funciona bem no projetor da sala).
   ========================================================= */
:root {
  --fundo: #FFF8EF;
  --fundo-2: #FFFFFF;
  --tinta: #23253A;
  --suave: #5E6178;
  --linha: #EADFD0;
  --laranja: #FF7A3D;
  --laranja-2: #F25F1C;
  --verde: #17A398;
  --roxo: #6C5CE7;
  --amarelo: #FFC93C;
  --rosa: #FF5C8A;
  --azul: #2F80ED;
  --ok: #16A34A;
  --erro: #DC2626;
  --raio: 18px;
  --sombra: 0 10px 30px rgba(35, 37, 58, .08);
  --sombra-forte: 0 18px 50px rgba(35, 37, 58, .16);
  --titulo: "Baloo 2", "Nunito Sans", system-ui, sans-serif;
  --texto: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fundo);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--titulo); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--roxo); }
img, svg { max-width: 100%; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--roxo); outline-offset: 3px; border-radius: 6px; }

.conteiner { width: min(1160px, 100% - 32px); margin: 0 auto; }

/* ---------- marca ---------- */
.marca { display: inline-flex; align-items: center; gap: 10px; color: var(--tinta); text-decoration: none; font-family: var(--titulo); font-weight: 800; font-size: 1.35rem; }
.marca svg { width: 40px; height: 40px; flex-shrink: 0; }
.marca b { color: var(--laranja); }

/* ---------- botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border: 2px solid transparent; border-radius: 14px;
  background: var(--laranja); color: #fff; font: inherit; font-weight: 800; text-decoration: none;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; box-shadow: 0 6px 0 var(--laranja-2);
}
.botao:hover { transform: translateY(-1px); }
.botao:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--laranja-2); }
.botao.secundario { background: #fff; color: var(--tinta); border-color: var(--linha); box-shadow: 0 4px 0 var(--linha); }
.botao.verde { background: var(--verde); box-shadow: 0 6px 0 #0F7F76; }
.botao.roxo { background: var(--roxo); box-shadow: 0 6px 0 #4E3FC4; }
.botao.perigo { background: #fff; color: var(--erro); border-color: #F5C2C2; box-shadow: 0 4px 0 #F5C2C2; }
.botao.pequeno { padding: 8px 14px; font-size: .9rem; border-radius: 12px; }
.botao:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.link-botao { background: none; border: 0; padding: 0; font: inherit; color: var(--roxo); font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ---------- formulários ---------- */
.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo label, .rotulo { font-weight: 800; font-size: .92rem; }
.campo small { color: var(--suave); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], input[type=tel], input[type=url], select, textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--linha); border-radius: 12px; background: #fff;
  color: var(--tinta); font: inherit; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--roxo); outline: none; }
textarea { resize: vertical; min-height: 90px; }
.lado-a-lado { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

.aviso { padding: 12px 14px; border-radius: 12px; background: #FFF3D6; border: 1px solid #F7D98B; font-size: .95rem; }
.aviso.erro { background: #FDECEC; border-color: #F5C2C2; color: #8B1C1C; }
.aviso.ok { background: #E7F8EE; border-color: #A9E2BF; color: #145C33; }
.aviso:empty { display: none; }

/* ---------- cartões ---------- */
.cartao { background: var(--fundo-2); border: 1px solid var(--linha); border-radius: var(--raio); padding: 20px; box-shadow: var(--sombra); }
.grade { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.etiqueta { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #F2ECFF; color: var(--roxo); font-weight: 800; font-size: .78rem; }
.etiqueta.laranja { background: #FFE9DE; color: var(--laranja-2); }
.etiqueta.verde { background: #DDF6F3; color: #0F7F76; }
.etiqueta.amarelo { background: #FFF2CC; color: #8A6100; }

.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- janelas ---------- */
dialog.janela { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); border: 0; border-radius: 22px; padding: 0; box-shadow: var(--sombra-forte); color: var(--tinta); }
dialog.janela::backdrop { background: rgba(35, 37, 58, .45); }
.janela-cabeca { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--linha); }
.janela-cabeca h2 { margin: 0; font-size: 1.3rem; }
.janela-corpo { padding: 20px; overflow: auto; max-height: calc(100dvh - 140px); }
.fechar { width: 40px; height: 40px; border-radius: 12px; border: 0; background: #F4EEE6; font-size: 1.3rem; cursor: pointer; }

@media print {
  .nao-imprimir { display: none !important; }
  body { background: #fff; }
  .cartao { box-shadow: none; }
}

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

/* ---------- aviso rápido ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 1000; max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: 14px; background: var(--tinta); color: #fff; font-weight: 700; box-shadow: var(--sombra-forte); transition: transform .25s; }
.toast.aberto { transform: translate(-50%, 0); }
.toast[data-tipo="erro"] { background: var(--erro); }
.toast[data-tipo="ok"] { background: var(--ok); }
