/* ============================================================
   Lista de Presença — MSF 2026
   Visual: azul royal + amarelo dourado (identidade do site)
   ============================================================ */
:root {
  --blue-dark:  #081660;
  --blue-mid:   #0d2488;
  --blue-light: #1a3fa0;
  --yellow:     #FFD000;
  --yellow-dk:  #e6a800;
  --cyan:       #7ecef4;
  --white:      #ffffff;
  --gray-lt:    #d0dff5;
  --gray-md:    #7a9abf;
  --success:    #27ae60;
  --error:      #c0392b;
  --radius:     12px;
  --shadow:     0 8px 32px rgba(0,0,0,.35);
  --font:       'Poppins', Arial, sans-serif;
}

*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  font-family: var(--font);
  background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue-mid) 45%, var(--blue-light) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--white);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Topbar ── */
.topbar {
  background: rgba(8,22,96,.95);
  color: rgba(255,255,255,.7);
  padding: 8px 24px;
  font-size: 12px;
  letter-spacing: .04em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid rgba(255,208,0,.15);
}
.topbar a { color: var(--yellow); text-decoration: none; font-weight: 600; }
.topbar a:hover { opacity: .8; }

/* ── Header ── */
.header {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  padding: 40px 24px 36px;
  text-align: center;
  border-bottom: 3px solid var(--yellow);
  position: relative;
  overflow: hidden;
}
.header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(255,208,0,.06) 0, transparent 50%),
    radial-gradient(circle at 85% 50%, rgba(126,206,244,.06) 0, transparent 50%);
  pointer-events: none;
}
.header-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.logo-mark {
  width: 86px; height: 86px;
  margin: 0 auto 16px;
  background: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.3), 0 0 0 4px rgba(255,208,0,.3);
}
.logo-mark img { width: 66px; height: auto; }
.header-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: .35rem;
  letter-spacing: -.01em;
}
.header-sub {
  font-size: .88rem;
  color: var(--gray-lt);
  opacity: .85;
}

/* ── Main ── */
.main { max-width: 740px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

/* ── Form card ── */
.form-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.form-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--cyan));
}

.intro {
  background: rgba(255,208,0,.1);
  border: 1px solid rgba(255,208,0,.3);
  border-radius: 10px;
  padding: .9rem 1.1rem;
  font-size: .88rem;
  color: var(--gray-lt);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.intro strong { color: var(--yellow); }

.required-note { font-size: .78rem; color: var(--gray-md); margin-bottom: 1.5rem; }
.req { color: var(--yellow); font-weight: 700; }

/* ── Seções ── */
.section { margin-bottom: 2rem; }
.section-head {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(255,208,0,.2);
}
.section-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dk));
  color: #0a1a6e;
  font-weight: 800; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.section-title { font-size: 1rem; font-weight: 700; color: var(--white); }

/* ── Campos ── */
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-lt);
  margin-bottom: .4rem;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select, textarea {
  width: 100%;
  padding: .72rem 1rem;
  background: rgba(255,255,255,.09);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 10px;
  color: var(--white);
  font-family: var(--font);
  font-size: .92rem;
  transition: border-color .25s, background .25s;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--yellow);
  background: rgba(255,208,0,.07);
}
input::placeholder, textarea::placeholder { color: var(--gray-md); }
select option { background: #0d2488; color: #fff; }
textarea { resize: vertical; min-height: 90px; }

.hint { font-size: .8rem; color: var(--gray-md); margin-bottom: .6rem; }

/* ── Opções (radio) ── */
.options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .3rem;
}
.options.stack { flex-direction: column; }
.option {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.14);
  border-radius: 50px;
  padding: .45rem 1rem;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
  font-size: .86rem;
}
.option:hover {
  border-color: var(--yellow);
  background: rgba(255,208,0,.08);
}
.option input[type="radio"] {
  width: auto; padding: 0;
  accent-color: var(--yellow);
  cursor: pointer;
}
.option:has(input:checked) {
  border-color: var(--yellow);
  background: rgba(255,208,0,.15);
  color: var(--yellow);
  font-weight: 600;
}

/* ── Escala de notas ── */
.scale {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: .5rem 0;
}
.scale label {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,.2);
  font-weight: 700; font-size: .92rem;
  transition: all .2s;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray-lt);
  background: rgba(255,255,255,.06);
}
.scale label:hover { border-color: var(--yellow); color: var(--yellow); }
.scale input { display: none; }
.scale label:has(input:checked) {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #0a1a6e;
}
.scale-tag {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--gray-md);
  margin-top: .3rem;
}

/* ── Grade de questões ── */
.qgrid {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .4rem;
}
.qgrid label {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.18);
  font-size: .85rem; font-weight: 600;
  transition: all .2s;
  color: var(--gray-lt);
  background: rgba(255,255,255,.06);
  text-transform: none;
  letter-spacing: 0;
}
.qgrid label:hover { border-color: var(--cyan); color: var(--cyan); }
.qgrid input { display: none; }
.qgrid label:has(input:checked) {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #0a1a6e;
  font-weight: 800;
}

/* ── Botões ── */
.actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
button[type="submit"] {
  flex: 1;
  min-width: 180px;
  padding: .85rem 2rem;
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dk));
  color: #0a1a6e;
  font-family: var(--font);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(255,208,0,.35);
}
button[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,208,0,.45); }
button[type="submit"]:active { transform: translateY(0); }

.clear-btn {
  padding: .85rem 1.75rem;
  background: transparent;
  color: var(--gray-lt);
  font-family: var(--font);
  font-weight: 600;
  font-size: .88rem;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 50px;
  cursor: pointer;
  transition: all .2s;
}
.clear-btn:hover { border-color: var(--white); color: var(--white); }

/* ── Status escola encontrada ── */
#escola-status {
  background: rgba(39,174,96,.15) !important;
  border: 1.5px solid rgba(39,174,96,.4) !important;
  border-radius: 10px !important;
  padding: 1rem !important;
  margin-bottom: 1rem !important;
}
#escola-status p:first-child { color: #4eca7f !important; }
#escola-nao-encontrada {
  background: rgba(255,208,0,.1) !important;
  border: 1.5px solid rgba(255,208,0,.3) !important;
  border-radius: 10px !important;
  padding: .85rem 1rem !important;
  margin-bottom: 1rem !important;
}

/* ── Count blocks (ata) ── */
.count-block {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.count-block-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 1rem;
}
.count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: .75rem;
}
.count-cell label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-md);
  margin-bottom: .3rem;
  text-transform: none;
}
.count-cell input[type="number"] {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  padding: .5rem;
}
.count-cell.total input {
  background: rgba(255,208,0,.15);
  border-color: rgba(255,208,0,.4);
  color: var(--yellow);
  font-weight: 800;
}

/* ── Sucesso ── */
.success-card {
  text-align: center;
  padding: 3rem 2rem;
}
.success-icon { font-size: 4rem; margin-bottom: 1rem; display: block; }
.success-title { font-size: 1.4rem; font-weight: 800; color: #4eca7f; margin-bottom: .6rem; }
.success-sub { color: var(--gray-lt); margin-bottom: 1.75rem; font-size: .92rem; }
.success-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dk));
  color: #0a1a6e;
  padding: .8rem 2.2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 800;
  font-size: .92rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .field-grid, .field-grid-3 { grid-template-columns: 1fr; }
  .form-card { padding: 1.5rem 1.1rem; }
  .actions { flex-direction: column; }
  button[type="submit"] { min-width: unset; }
  .count-grid { grid-template-columns: repeat(auto-fill, minmax(75px,1fr)); }
  .scale label { width: 40px; height: 40px; font-size: .85rem; }
}
@media (max-width: 480px) {
  .header { padding: 28px 16px 24px; }
  .main { padding: 1.25rem .85rem 3rem; }
  .topbar { font-size: 11px; padding: 6px 14px; }
}
