/* =====================================================================
   IRALU TENNIS — auth.css  (camada de SESSÃO — aditiva)
   Login overlay, barra de conta, seletor de filho (responsável) e
   complementos visuais do painel admin (planos/turmas/professores).
   Usa as variáveis de tokens.css com fallback; não altera styles.css.
   ===================================================================== */

/* ---------- Overlay de login ---------- */
.auth-host {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; place-items: center; padding: 1.25rem;
  background:
    radial-gradient(900px 520px at 80% -10%, rgba(17, 198, 166, 0.18), transparent 60%),
    radial-gradient(820px 480px at 8% 0%, rgba(180, 240, 58, 0.14), transparent 55%),
    rgba(5, 8, 11, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  overflow-y: auto;
}
.auth-host[hidden] { display: none; }

.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface, #111a24);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 22px);
  box-shadow: var(--shadow-pop, 0 30px 60px -24px rgba(0, 0, 0, 0.9));
  padding: 1.6rem 1.4rem 1.3rem;
  animation: authIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes authIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }

/* ---------- Login: layout 2 colunas no desktop ---------- */
.auth-card--split { position: relative; }
.auth-card__x {
  position: absolute; top: 0.7rem; right: 0.75rem; z-index: 2;
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer; line-height: 1;
  background: var(--surface-2, #16222f);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  color: var(--text-2, #9aabb4); font-size: 0.95rem;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.auth-card__x:hover {
  color: var(--text, #eaf2f1);
  border-color: var(--line-strong, rgba(255, 255, 255, 0.2));
  background: var(--surface-3, #1e2d3d);
}
.auth-aside__note {
  display: none; color: var(--text-2, #9aabb4); font-size: 0.92rem;
  line-height: 1.5; margin: 1rem 0 0;
}
@media (min-width: 760px) {
  .auth-card--split {
    width: auto; max-width: 800px;
    display: grid; grid-template-columns: 0.85fr 1.05fr; gap: 1.7rem;
    align-items: start; padding: 2rem 2rem 1.7rem;
  }
  .auth-card__aside {
    align-self: stretch; padding-right: 1.7rem;
    border-right: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  }
  .auth-card__aside .auth-sub { margin-bottom: 0; }
  .auth-aside__note { display: block; }
  .auth-card__main { min-width: 0; }
  .auth-card__main .auth-field:first-child { margin-top: 0; }
}

.auth-brand { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 1.1rem; }
.auth-brand img { width: 34px; height: 34px; object-fit: contain; }
.auth-brand__name {
  font-family: var(--font-display, "Saira Condensed", sans-serif);
  font-weight: 800; font-size: 1.45rem; letter-spacing: 0.02em;
  color: var(--text, #eaf2f1);
}
.auth-brand__name span { color: var(--lime, #b4f03a); }

.auth-title {
  font-family: var(--font-display, "Saira Condensed", sans-serif);
  font-size: 1.7rem; line-height: 1.05; margin: 0 0 0.3rem;
  color: var(--text, #eaf2f1);
}
.auth-sub { color: var(--text-2, #9aabb4); font-size: 0.95rem; margin: 0 0 1.15rem; }

.auth-field { display: block; margin-bottom: 0.85rem; }
.auth-field > span {
  display: block; font-size: 0.8rem; color: var(--text-2, #9aabb4);
  margin-bottom: 0.35rem; font-family: var(--font-ui, "Saira", sans-serif);
}
.auth-field input,
.auth-field textarea,
.auth-field select {
  width: 100%; box-sizing: border-box;
  background: var(--ink-700, #0c1219);
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.16));
  border-radius: var(--radius-sm, 10px);
  color: var(--text, #eaf2f1); font-size: 1rem;
  padding: 0.8rem 0.9rem; outline: none;
  font-family: inherit;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.auth-field textarea { resize: vertical; min-height: 3.2rem; }
.auth-field input:focus,
.auth-field textarea:focus,
.auth-field select:focus {
  border-color: var(--lime, #b4f03a);
  box-shadow: 0 0 0 3px rgba(180, 240, 58, 0.18);
}

/* confirmação de solicitação enviada */
.auth-done { text-align: center; padding: 0.6rem 0 1rem; }
.auth-done__ic { font-size: 2.6rem; line-height: 1; margin-bottom: 0.6rem; }
.auth-done .auth-title { margin-bottom: 0.4rem; }
.auth-err { color: var(--danger, #ff5d5d); font-size: 0.85rem; margin: -0.3rem 0 0.7rem; }

.auth-sep {
  display: flex; align-items: center; gap: 0.7rem;
  color: var(--text-3, #6b7b85); font-size: 0.78rem;
  margin: 1.15rem 0 0.9rem; text-transform: none;
}
.auth-sep::before, .auth-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--line, rgba(255, 255, 255, 0.08));
}

.auth-demos { display: grid; gap: 0.5rem; }
.auth-demo {
  display: flex; align-items: center; gap: 0.7rem;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface-2, #16222f);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius, 16px);
  padding: 0.6rem 0.8rem; color: var(--text, #eaf2f1);
  transition: transform 0.16s, border-color 0.16s, background 0.16s;
}
.auth-demo:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong, rgba(255, 255, 255, 0.16));
  background: var(--surface-3, #1e2d3d);
}
.auth-demo__ic { font-size: 1.25rem; width: 1.6rem; text-align: center; }
.auth-demo__txt { display: flex; flex-direction: column; line-height: 1.15; }
.auth-demo__txt b { font-size: 0.95rem; }
.auth-demo__txt span { font-size: 0.76rem; color: var(--text-2, #9aabb4); }
.auth-demo__go { margin-left: auto; color: var(--lime, #b4f03a); font-weight: 700; }

.auth-close {
  display: block; margin: 1.1rem auto 0; padding: 0.4rem 0.6rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-2, #9aabb4); font-size: 0.88rem;
}
.auth-close:hover { color: var(--text, #eaf2f1); }

.auth-request {
  display: block; width: 100%; text-align: center; cursor: pointer;
  margin-top: 0.7rem; padding: 0.5rem; background: none; border: none;
  color: var(--text-2, #9aabb4); font-size: 0.9rem;
  font-family: var(--font-ui, "Saira", sans-serif);
}
.auth-request b { color: var(--lime, #b4f03a); font-weight: 700; }
.auth-request:hover b { text-decoration: underline; }

/* ---------- Barra de conta (telas internas) ---------- */
.acct-host {
  position: fixed; right: 0.8rem; bottom: 0.8rem; z-index: 1100;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.acct-host.is-on { opacity: 1; transform: none; pointer-events: auto; }
.acct {
  display: flex; align-items: center; gap: 0.55rem;
  background: var(--surface-2, #16222f);
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.16));
  border-radius: var(--radius-pill, 999px);
  padding: 0.35rem 0.45rem 0.35rem 0.7rem;
  box-shadow: var(--shadow-card, 0 24px 48px -28px rgba(0, 0, 0, 0.85));
}
.acct__ic { font-size: 1.1rem; }
.acct__txt { display: flex; flex-direction: column; line-height: 1.05; margin-right: 0.2rem; }
.acct__txt b { font-size: 0.82rem; color: var(--text, #eaf2f1); }
.acct__txt span { font-size: 0.68rem; color: var(--text-2, #9aabb4); }
.acct__btn {
  border: none; cursor: pointer; font-size: 0.76rem;
  padding: 0.35rem 0.65rem; border-radius: var(--radius-pill, 999px);
  background: var(--surface-3, #1e2d3d); color: var(--text, #eaf2f1);
  font-family: var(--font-ui, "Saira", sans-serif);
}
.acct__btn:hover { background: var(--surface, #111a24); }
.acct__btn--out { background: transparent; color: var(--text-2, #9aabb4); }
.acct__btn--out:hover { color: var(--danger, #ff5d5d); }

/* ---------- Seletor de filho (responsável) ---------- */
.child-picker {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin: 0 0 0.9rem;
}
.child-chip {
  display: flex; align-items: center; gap: 0.45rem; cursor: pointer;
  background: var(--surface-2, #16222f);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-pill, 999px);
  padding: 0.3rem 0.7rem 0.3rem 0.35rem; color: var(--text, #eaf2f1);
  font-size: 0.9rem; transition: border-color 0.16s, background 0.16s;
}
.child-chip.is-on { border-color: var(--lime, #b4f03a); box-shadow: var(--glow-lime, 0 0 0 1px rgba(180, 240, 58, 0.3)); }
.child-chip__av { width: 26px; height: 26px; font-size: 0.7rem; }

.pl-hero--minor .pl-hero__pts .n { font-family: var(--font-display, "Saira Condensed", sans-serif); }

/* ---------- Complementos do painel admin ---------- */
.admin-kpis--wide { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .admin-kpis--wide { grid-template-columns: repeat(2, 1fr); } }

.prof-av {
  width: 34px; height: 34px; display: grid; place-items: center;
  font-size: 1.1rem; border-radius: 50%;
  background: var(--surface-3, #1e2d3d); flex: none;
}

/* Turmas: layout COMPACTO e em grade (antes os cards ficavam muito espaçados) */
.turma-grid { display: grid; gap: 0.7rem; }
@media (min-width: 720px) { .turma-grid { grid-template-columns: 1fr 1fr; } }
.turma-card { padding: 0.85rem 1rem; }
.turma-card__top { display: flex; align-items: center; gap: 0.6rem; }
.turma-card__top h3 {
  flex: 1; min-width: 0; margin: 0; font-size: 1.05rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.turma-card__actions { flex: none; display: flex; align-items: center; gap: 0.35rem; }
.turma-card__actions .pill { white-space: nowrap; }
.turma-card .turma-meta { color: var(--text-2, #9aabb4); font-size: 0.82rem; margin: 0.45rem 0 0.25rem; }
.turma-card .turma-alunos { color: var(--text, #eaf2f1); font-size: 0.9rem; }

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 0.4rem; }
@media (max-width: 560px) { .plans-grid { grid-template-columns: 1fr; } }
.plan-card {
  background: var(--surface-2, #16222f);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius, 16px); padding: 0.9rem;
}
.plan-card__name {
  font-family: var(--font-display, "Saira Condensed", sans-serif);
  font-size: 1.2rem; color: var(--text, #eaf2f1);
}
.plan-card__freq { color: var(--lime, #b4f03a); font-size: 0.85rem; margin: 0.1rem 0 0.4rem; }
.plan-card__desc { color: var(--text-2, #9aabb4); font-size: 0.86rem; }
.plan-card__price {
  margin-top: 0.6rem; font-size: 0.74rem; color: var(--text-3, #6b7b85);
  border-top: 1px dashed var(--line, rgba(255, 255, 255, 0.08)); padding-top: 0.5rem;
}
.plan-card__price b { color: var(--lime, #b4f03a); }

/* rótulos de seção + chips de frequência/forma da tabela real de planos */
.plan-sec__lbl {
  font-family: var(--font-ui, "Saira", sans-serif);
  font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-2, #9aabb4); margin: 1rem 0 0.5rem;
}
.plan-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.plan-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--surface-2, #16222f);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-pill, 999px);
  padding: 0.3rem 0.7rem; font-size: 0.84rem; color: var(--text-2, #9aabb4);
}
.plan-chip b { color: var(--text, #eaf2f1); font-weight: 700; }

/* nav: quando logado, suaviza os CTAs públicos de entrada */
.is-authed .nav__login { opacity: 0.55; }

/* ---------- Login com contexto (aluno x professor) + demo secundário ---------- */
.auth-ctxrow { margin-top: 0.7rem; text-align: center; }
.auth-ctx {
  background: none; border: none; cursor: pointer;
  color: var(--lime, #b4f03a); font-size: 0.85rem; font-family: var(--font-ui, "Saira", sans-serif);
}
.auth-ctx:hover { text-decoration: underline; }
.auth-demobox {
  margin-top: 0.9rem; border-top: 1px solid var(--line, rgba(255, 255, 255, 0.08)); padding-top: 0.6rem;
}
.auth-demobox > summary {
  cursor: pointer; list-style: none; color: var(--text-2, #9aabb4);
  font-size: 0.82rem; font-family: var(--font-ui, "Saira", sans-serif); padding: 0.2rem 0;
}
.auth-demobox > summary::-webkit-details-marker { display: none; }
.auth-demobox > summary::before { content: "▸ "; color: var(--text-3, #6b7b85); }
.auth-demobox[open] > summary::before { content: "▾ "; }
.auth-demohint { font-size: 0.74rem; color: var(--text-3, #6b7b85); margin: 0.3rem 0 0.5rem; }

/* ---------- Header: hierarquia e espaçamento ---------- */
.nav__actions { gap: 0.55rem; }
.nav__actions .nav__login {
  margin-right: 0.2rem; padding-right: 0.7rem;
  border-right: 1px solid var(--line, rgba(255, 255, 255, 0.12));
}
@media (max-width: 560px) {
  .nav__actions .nav__login { display: none; } /* "Área do professor" sai do topo no mobile (fica no rodapé) */
}
.nav__actions .btn--primary { box-shadow: var(--glow-lime, 0 0 0 1px rgba(180, 240, 58, 0.3)); }

/* ---------- atalho "Continuar como…" no topo da tela de acesso ---------- */
.auth-continue {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.7rem 0.8rem; margin: 0.2rem 0 0; cursor: pointer; text-align: left;
  border-radius: 0.7rem;
  background: linear-gradient(180deg, rgba(180, 240, 58, 0.14), rgba(180, 240, 58, 0.06));
  border: 1px solid var(--lime, #b4f03a);
  color: var(--text, #eaf2f1);
}
.auth-continue:hover { box-shadow: var(--glow-lime, 0 0 0 1px rgba(180, 240, 58, 0.3)); }
.auth-continue__ic { font-size: 1.3rem; width: 1.7rem; text-align: center; }
.auth-continue__txt { display: flex; flex-direction: column; line-height: 1.2; }
.auth-continue__txt span { font-size: 0.76rem; color: var(--text-2, #9aabb4); }
.auth-continue__go { margin-left: auto; color: var(--lime, #b4f03a); font-weight: 800; font-size: 1.1rem; }
.auth-or {
  display: flex; align-items: center; gap: 0.6rem; margin: 0.7rem 0 0.2rem;
  color: var(--text-2, #9aabb4); font-size: 0.78rem;
}
.auth-or::before, .auth-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line, rgba(255, 255, 255, 0.08));
}
