/* ====== ESTILOS GERAIS E IDENTIDADE VISUAL: ESCOLA DE FUNDAMENTOS ====== */
:root {
  color-scheme: light;
  --pd: #AC3437; /* Vermelho Oficial Desperta-me Church */
  --blue: #305986; /* Azul Oficial */
  --gold: #f4be18; /* Amarelo / Dourado Oficial */
  --ok: #2fae72;
  --no: #d9383a;
  --ink: #1a1a1a;
  --mut: #6c757d;
  --white: #FFFFFF;
  --border-radius: 40px;
  --background-linear: linear-gradient(298.41deg, #305986 7.13%, #AC3437 73.81%, #FEEE17 99.23%);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 15px/1.4 "Montserrat", "Poppins", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: #f0f2f5;
}

body.pur {
  background: linear-gradient(175deg, #1f3b5c 0%, #305986 28%, #AC3437 72%, #7a1b1e 100%) fixed;
  color: #fff;
}

body.lt {
  background: #f8f9fa;
  color: var(--ink);
}

#app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px 18px 100px;
  position: relative;
  overflow: hidden;
}

#app.pur {
  background: linear-gradient(175deg, #1f3b5c 0%, #305986 28%, #AC3437 72%, #7a1b1e 100%);
  color: #fff;
}

#app.lt {
  background: #f8f9fa;
  color: var(--ink);
}

#app.pur::before,
#app.pur::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #ffffff1f;
  pointer-events: none;
}

#app.pur::before {
  width: 230px;
  height: 230px;
  top: -70px;
  right: -80px;
}

#app.pur::after {
  width: 320px;
  height: 320px;
  bottom: 60px;
  left: -170px;
  background: #ffffff14;
}

#app > *:not(.nav) {
  position: relative;
  z-index: 1;
}

@media (min-width: 600px) {
  #app {
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    border-radius: 36px;
    box-shadow: 0 30px 70px rgba(172, 52, 55, 0.35);
  }
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
}

/* Splash */
.spl {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.halo {
  width: 196px;
  height: 196px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 14px #ffffff26, 0 0 0 32px #ffffff14, 0 24px 50px #2a1a7a66;
  animation: zoom 1.3s ease-out both;
}

.tile {
  width: 88px;
  height: 88px;
  background: #fff;
  border-radius: 24px;
  border-bottom: 7px solid var(--gold);
  display: grid;
  place-items: center;
  animation: zoom 1.4s ease-out both;
}

.ttl {
  margin-top: 44px;
  animation: fade 1s 0.9s both;
}

.ttl span {
  display: block;
  font-size: 21px;
  font-weight: 400;
  opacity: 0.9;
}

.ttl strong {
  display: block;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.08;
}

.lvl {
  margin-top: 18px;
  background: #f2cf5b;
  color: #3a2a00;
  font-weight: 700;
  border-radius: 99px;
  padding: 6px 20px;
  animation: fade 1s 1.4s both;
}

.spl p {
  max-width: 260px;
  font-size: 14px;
  opacity: 0.75;
  margin: 12px 20px 0;
  animation: fade 1s 1.8s both;
}

/* Botões */
.wbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  color: var(--pd);
  font-weight: 700;
  border-radius: 99px;
  padding: 16px;
  box-shadow: 0 8px 24px #2a1a7a55;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.wbtn:active {
  transform: scale(0.98);
}

.pbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, #AC3437 0%, #305986 100%);
  color: #fff;
  font-weight: 700;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(172, 52, 55, 0.35);
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 0;
  cursor: pointer;
}

.pbtn:active {
  transform: scale(0.98);
}

.wb {
  display: block;
  width: 100%;
  background: #ffffff26;
  border: 1px solid #ffffff55;
  border-radius: 99px;
  padding: 14px;
  margin-top: 10px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  transition: background 0.2s;
}

.wb:active {
  background: #ffffff3d;
}

/* Cartão de autenticação / entrada */
.wc {
  background: #fff;
  color: var(--ink);
  border-radius: 26px;
  padding: 24px 20px;
  margin-top: 24px;
  box-shadow: 0 12px 30px #2a1a7a55;
}

.wc input {
  width: 100%;
  font: inherit;
  padding: 15px;
  border-radius: 16px;
  border: 2px solid #e3def5;
  margin: 10px 0 14px;
}

/* ====== TELA DE LOGIN REDESIGNADA ====== */
.login-wrapper {
  font-family: 'Poppins', 'Montserrat', system-ui, -apple-system, sans-serif;
  min-height: calc(100vh - 40px);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: max(20px, env(safe-area-inset-top, 20px)) 12px max(16px, env(safe-area-inset-bottom, 16px));
  max-width: 410px;
  margin: 0 auto;
  box-sizing: border-box;
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-halo {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  margin-bottom: 12px;
  animation: smoothScaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-brand span {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: 0.5px;
}

.login-brand strong {
  display: block;
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.login-tagline {
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #fde8e8;
  letter-spacing: 0.8px;
  opacity: 0.95;
}

/* Card Branco Moderno */
.login-card {
  width: 100%;
  background: #ffffff;
  border-radius: 28px;
  padding: 26px 20px 22px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  text-align: center;
  margin: 0 0 20px;
  animation: cardSlideUp 0.75s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
  box-sizing: border-box;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.25;
}

.login-desc {
  font-size: 13.5px;
  color: var(--mut);
  margin: 0 0 20px;
  line-height: 1.45;
  font-weight: 400;
}

.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--mut);
  font-size: 12.5px;
}

.login-security small {
  font-size: 12px;
  font-weight: 500;
}

/* Rodapé com 3 Pilares */
.login-pillars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: auto;
  animation: fadeInUp 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  flex-wrap: wrap;
}

.pillar-pill {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.2px;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: #ffffff;
  color: #3c4043;
  border: 1.5px solid #e2e8f0;
  border-radius: 99px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.12);
  margin-top: 12px;
  transition: transform 0.15s ease, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.18);
}

.google-btn:active {
  transform: scale(0.98);
}

.google-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.google-btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}

/* Animações elegantes da tela de login */
@keyframes smoothScaleIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-header,
  .login-halo,
  .login-card,
  .login-pillars,
  .google-btn {
    animation: none !important;
    transition: none !important;
  }
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--mut);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e8e4f6;
}

.divider:not(:empty)::before {
  margin-right: 0.8em;
}

.divider:not(:empty)::after {
  margin-left: 0.8em;
}

.chips {
  margin-top: 14px;
}

.chips button {
  background: #fbebee;
  color: var(--pd);
  border-radius: 99px;
  padding: 7px 14px;
  margin: 4px 4px 0 0;
  font-size: 14px;
  border: 1px solid #f5c6cb;
}

/* Cabeçalho do usuário e estatísticas */
.hi {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hi h1 {
  font-size: 24px;
  word-break: break-word;
}

.hi small {
  color: var(--mut);
  display: block;
}

.av {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #AC3437, #305986);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(172, 52, 55, 0.25);
}

.av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #305986 0%, #AC3437 100%);
  color: #fff;
  border-radius: 22px;
  padding: 18px;
  margin: 18px 0;
  box-shadow: 0 14px 28px rgba(48, 89, 134, 0.3);
}

.stats > div {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
}

.stats i {
  width: 1px;
  height: 44px;
  background: #ffffff40;
}

.stats span {
  grid-row: span 2;
  font-size: 26px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 14px;
  color: var(--pd);
}

.stats b {
  font-size: 20px;
  line-height: 1;
}

.stats small {
  font-size: 12px;
  opacity: 0.85;
}

.mh {
  font-size: 17px;
  margin: 16px 0 10px;
}

/* Barra de Navegação Inferior */
.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: space-around;
  background: #fff;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 24px #5a3fd114;
  z-index: 10;
}

.nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 19px;
  color: #9a96b3;
  padding: 2px 2px;
  flex: 1;
  min-width: 0;
  gap: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav small {
  font-size: 10.5px;
  white-space: nowrap;
}

.nav .on {
  color: var(--pd);
}

.nav .on svg {
  stroke-width: 2.6;
}

/* Ranking */
.rk {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: 0 6px 16px rgba(90, 63, 209, 0.08);
  border: 1px solid #e8e4f6;
}

.rk.me {
  outline: 2px solid #7d62e6;
  background: #fbf9ff;
}

.rk .n {
  width: 28px;
  font-weight: 700;
  color: var(--pd);
  text-align: center;
  font-size: 16px;
  flex: none;
}

.rk-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #ede9fe, #d6ccfa);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 2px 6px rgba(90, 63, 209, 0.12);
  border: 1.5px solid #fff;
}

.rk-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.rk-av-letter {
  font-size: 15px;
  font-weight: 700;
  color: var(--pd);
}

.rk .t {
  flex: 1;
  word-break: break-word;
}

.rk small {
  color: var(--mut);
  display: block;
}

.rk:nth-child(3) {
  background: linear-gradient(90deg, #fff6d6, #fff);
}

/* Banner de Estado de Conexão */
.net-status {
  background: #ffecb3;
  color: #795548;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.net-status.online {
  background: #e8f5e9;
  color: #2e7d32;
}


/* ====== OCULTAR SELO / BADGE "POWERED BY NETLIFY" ====== */
[data-netlify-badge],
.netlify-badge,
#netlify-badge,
.netlify-badge-container,
[class*="netlify-badge"],
[id*="netlify-badge"],
div[style*="z-index: 10000"]:has(a[href*="netlify.com"]),
div[style*="z-index: 9999"]:has(a[href*="netlify.com"]),
a[href*="netlify.com"]:has(svg),
a[href*="netlify.com"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
