/* ============================================================
   CSPAZ — INDEX / CENTRAL DE COMPRAS
   Estilos exclusivos da página inicial.
   Mantido separado do style.css para não afetar as outras telas.
============================================================ */

.index-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 10% 10%, rgba(0,86,166,.07), transparent 30%),
    radial-gradient(circle at 90% 25%, rgba(255,165,0,.08), transparent 28%),
    var(--cinza-bg);
}

.index-page .hero-divider {
  flex: 0 0 4px;
}

.index-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(2.25rem, 5vw, 4rem) 1.25rem clamp(2.75rem, 6vw, 4.5rem);
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 18% 35%, rgba(255,255,255,.09), transparent 22%),
    radial-gradient(circle at 82% 20%, rgba(255,255,255,.07), transparent 24%),
    linear-gradient(135deg, #003f7f 0%, #0056a6 52%, #002a9e 100%);
}

.index-hero::before,
.index-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.index-hero::before {
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: -290px;
  border: 70px solid rgba(255,255,255,.045);
}

.index-hero::after {
  width: 260px;
  height: 260px;
  left: -130px;
  top: -180px;
  border: 45px solid rgba(255,255,255,.04);
}

.index-hero-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.index-logo {
  width: min(300px, 68vw);
  height: auto;
  max-height: 90px;
  object-fit: contain;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  filter: brightness(0) invert(1);
}

.index-eyebrow {
  margin-bottom: .6rem;
  color: #ffd27a;
  font: 700 10px/1 'Pusia Bold', sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.index-hero h1 {
  margin: 0;
  font: 700 clamp(2rem, 4vw, 3rem)/1.05 'Pusia Bold', sans-serif;
  letter-spacing: -.025em;
}

.index-hero h1 span {
  color: #ffb52e;
}

.index-hero p {
  max-width: 650px;
  margin: .8rem auto 0;
  color: rgba(255,255,255,.78);
  font: 400 clamp(.9rem, 1.5vw, 1.05rem)/1.65 'Pusia Light', sans-serif;
}

.index-content {
  width: min(1080px, calc(100% - 2rem));
  margin: -1.75rem auto 0;
  position: relative;
  z-index: 2;
  padding-bottom: 3rem;
  flex: 1;
}

.index-userbar {
  width: min(700px, 100%);
  margin: 0 auto 2rem;
  padding: .8rem 1rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--cinza-borda);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,42,100,.12);
  color: var(--texto-suave);
  font: 400 13px/1.4 'Pusia Light', sans-serif;
}

.index-userbar strong {
  color: var(--texto);
  font-family: 'Pusia Bold', sans-serif;
}

.index-userbar .sair-btn {
  margin-left: auto;
  padding: .2rem .35rem;
  border: 0;
  background: transparent;
  color: var(--texto-faint);
  cursor: pointer;
  font: 700 12px 'Pusia Bold', sans-serif;
}

.index-userbar .sair-btn:hover {
  color: var(--vermelho);
}

.index-choose-label {
  margin: 0 0 1rem;
  color: var(--texto-suave);
  text-align: center;
  font: 700 12px 'Pusia Bold', sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.index-choose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.index-choose-card {
  position: relative;
  display: flex;
  min-height: 285px;
  flex-direction: column;
  padding: 1.7rem;
  overflow: hidden;
  color: var(--texto);
  text-decoration: none;
  background: #fff;
  border: 1.5px solid var(--cinza-borda);
  border-radius: 20px;
  box-shadow: var(--sombra-suave);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.index-choose-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -75px;
  bottom: -85px;
  border-radius: 50%;
  background: var(--azul-claro);
  transition: transform .3s ease;
}

.index-choose-card:hover {
  transform: translateY(-5px);
  border-color: var(--azul-mid);
  box-shadow: var(--sombra-media);
}

.index-choose-card:hover::after {
  transform: scale(1.35);
}

.index-choose-card.pedagogico::after {
  background: var(--amarelo-claro);
}

.index-choose-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
  border-radius: 14px;
  background: var(--azul-claro);
  color: var(--azul);
}

.index-choose-card.pedagogico .index-choose-icon {
  background: var(--amarelo-claro);
  color: var(--laranja-vivo);
}

.index-choose-icon svg {
  width: 25px;
  height: 25px;
}

.index-choose-card h2 {
  margin: 0;
  color: var(--azul-escuro);
  font: 700 clamp(1.05rem, 2vw, 1.25rem)/1.25 'Pusia Bold', sans-serif;
}

.index-choose-card p {
  max-width: 560px;
  margin: .65rem 0 1.1rem;
  color: var(--texto-suave);
  font: 400 .9rem/1.65 'Pusia Light', sans-serif;
}

.index-choose-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: auto;
}

.index-choose-tag {
  padding: .32rem .65rem;
  border-radius: 999px;
  background: var(--cinza-bg);
  color: var(--texto-suave);
  font: 700 10px 'Pusia Bold', sans-serif;
}

.index-choose-arrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--azul);
  font: 700 12px 'Pusia Bold', sans-serif;
}

.index-choose-arrow span {
  font-size: 18px;
  line-height: 1;
  transition: transform .2s ease;
}

.index-choose-card:hover .index-choose-arrow span {
  transform: translateX(4px);
}

.index-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  margin-top: 1.6rem;
}

.index-admin-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--texto-suave);
  text-decoration: none;
  font: 700 12px 'Pusia Bold', sans-serif;
  transition: color .2s ease;
}

.index-admin-link:hover {
  color: var(--azul);
}

.index-divider {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: min(420px, 100%);
  color: var(--texto-faint);
  font: 700 9px 'Pusia Bold', sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.index-divider::before,
.index-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--cinza-borda);
}

.index-footer {
  padding: 1.2rem 1rem;
  border-top: 1px solid var(--cinza-borda);
  background: #fff;
  color: var(--texto-faint);
  text-align: center;
  font: 400 11px/1.5 'Pusia Light', sans-serif;
}

/* Overlay de login */
#overlay-login {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,.08), transparent 25%),
    linear-gradient(135deg, #003f7f, #002a9e);
}

#overlay-login.show {
  display: flex;
}

.google-card {
  width: min(410px, 100%);
  padding: 2rem;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}

.google-card .lock-icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: var(--azul-claro);
}

.google-card h2 {
  margin-bottom: .5rem;
  color: var(--azul-escuro);
  font: 700 19px 'Pusia Bold', sans-serif;
}

.google-card p {
  margin-bottom: 1.4rem;
  color: var(--texto-suave);
  font: 400 13px/1.6 'Pusia Light', sans-serif;
}

.g-divider {
  height: 3px;
  margin-bottom: 1.4rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--azul), var(--laranja), var(--azul));
}

.btn-google {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .75rem 1rem;
  border: 1.5px solid var(--cinza-borda);
  border-radius: 10px;
  background: #fff;
  color: var(--texto);
  cursor: pointer;
  font: 700 13px 'Pusia Bold', sans-serif;
  transition: .2s ease;
}

.btn-google:hover {
  border-color: var(--azul);
  box-shadow: var(--sombra-media);
  transform: translateY(-1px);
}

.erro-dominio {
  display: none;
  margin-top: .75rem;
  padding: .75rem .9rem;
  border: 1px solid #e8b4b0;
  border-radius: 9px;
  background: var(--vermelho-claro);
  color: var(--vermelho);
  font: 400 12px/1.5 'Pusia Light', sans-serif;
}

.erro-dominio.show {
  display: block;
}

#main-content {
  display: none;
}

#main-content.show {
  display: block;
}

@media (max-width: 760px) {
  .index-content {
    width: min(100% - 1.25rem, 600px);
  }

  .index-choose-grid {
    grid-template-columns: 1fr;
  }

  .index-choose-card {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .index-hero {
    padding: 2rem 1rem 3rem;
  }

  .index-logo {
    width: min(245px, 72vw);
    max-height: 70px;
    margin-bottom: 1.25rem;
  }

  .index-hero h1 {
    font-size: 1.8rem;
  }

  .index-hero p {
    font-size: .85rem;
  }

  .index-content {
    width: calc(100% - 1rem);
    margin-top: -1.35rem;
    padding-bottom: 2rem;
  }

  .index-userbar {
    margin-bottom: 1.35rem;
    padding: .7rem .8rem;
    font-size: 12px;
  }

  .index-choose-card {
    padding: 1.3rem;
    border-radius: 16px;
  }

  .index-choose-card p {
    font-size: .84rem;
  }

  .google-card {
    padding: 1.6rem 1.25rem;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-page *,
  .index-page *::before,
  .index-page *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
