/* ═══════════════════════════════════════════════════════════════════
   AgendaPro — TELAS DE AUTENTICAÇÃO
   Primeira tela que qualquer pessoa vê: o padrão visual começa aqui.
   ═══════════════════════════════════════════════════════════════════ */

/* A escala de 75% do desktop existe para o painel — denso, muitos dados.
   Nas telas de acesso ela deixa o formulário miúdo e perdido no espaço.
   Como os tokens são em `rem` (relativos ao <html>), a correção precisa
   ser na raiz, e não num contêiner: `font-size` no pai não afeta `rem`. */
@media (min-width: 992px) {
  html.ap-html-auth { font-size: 100%; }
}

.ap-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  /* A página nunca rola horizontalmente. */
  overflow-x: hidden;
}

/* ── COLUNA DE MARCA (desktop) ─────────────────────────────────── */

.ap-auth__marca {
  display: none;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--esp-7);
  background: linear-gradient(155deg, var(--marca-800) 0%, var(--marca-950) 100%);
  color: #FFFFFF;
  overflow: hidden;
}

/* Textura geométrica sutil — dá profundidade sem virar "gradiente clichê" */
.ap-auth__marca::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 88% 12%, rgb(129 140 248 / 0.28) 0%, transparent 42%),
    radial-gradient(circle at 8% 88%, rgb(245 158 11 / 0.14) 0%, transparent 38%);
  pointer-events: none;
}

/* Grade fina, quase imperceptível: profundidade sem ruído */
.ap-auth__marca::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}

.ap-auth__marca > * { position: relative; z-index: 1; }

.ap-auth__logo {
  display: flex;
  align-items: center;
  gap: var(--esp-3);
  font-size: var(--txt-lg);
  font-weight: var(--peso-semi);
  letter-spacing: -0.02em;
}

.ap-auth__logo-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--raio-md);
  background: rgb(255 255 255 / 0.12);
  border: 1px solid rgb(255 255 255 / 0.16);
  backdrop-filter: blur(8px);
}

.ap-auth__logo-icone svg { width: 1.35rem; height: 1.35rem; }

.ap-auth__headline {
  max-width: 30rem;
}

.ap-auth__headline h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  font-weight: var(--peso-forte);
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-bottom: var(--esp-4);
}

.ap-auth__headline h2 em {
  font-style: normal;
  color: var(--destaque-400);
}

.ap-auth__headline p {
  font-size: var(--txt-md);
  line-height: var(--altura-solta);
  color: rgb(255 255 255 / 0.72);
  margin: 0;
}

/* Lista de benefícios concretos — nada de texto de preenchimento */
.ap-auth__lista {
  list-style: none;
  margin: var(--esp-6) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--esp-3);
}

.ap-auth__lista li {
  display: flex;
  align-items: flex-start;
  gap: var(--esp-3);
  font-size: var(--txt-base);
  color: rgb(255 255 255 / 0.85);
}

.ap-auth__lista i {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem; height: 1.75rem;
  border-radius: var(--raio-md);
  background: rgb(255 255 255 / 0.10);
  border: 1px solid rgb(255 255 255 / 0.14);
  color: var(--destaque-400);
  font-size: 0.9rem;
}

.ap-auth__rodape-marca {
  font-size: var(--txt-xs);
  color: rgb(255 255 255 / 0.5);
}

/* ── COLUNA DO FORMULÁRIO ──────────────────────────────────────── */

.ap-auth__painel {
  display: flex;
  flex-direction: column;
  padding: var(--esp-5);
  background: var(--bg-app);
  overflow-y: auto;
  /* min-width:0 impede que o conteúdo force a coluna do grid a crescer
     além da tela — sem isto o painel transborda no mobile. */
  min-width: 0;
}

.ap-auth__topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--esp-3);
  margin-bottom: var(--esp-6);
}

/* Logo compacto, visível só quando a coluna de marca está oculta */
.ap-auth__logo-mobile {
  display: flex;
  align-items: center;
  gap: var(--esp-2);
  font-size: var(--txt-md);
  font-weight: var(--peso-semi);
  color: var(--texto-forte);
  letter-spacing: -0.02em;
}

.ap-auth__caixa {
  width: 100%;
  max-width: 26rem;
  margin: auto;
  padding: var(--esp-2) 0 var(--esp-6);
}

.ap-auth__cabecalho { margin-bottom: var(--esp-6); }

.ap-auth__cabecalho h1 {
  font-size: var(--txt-2xl);
  font-weight: var(--peso-forte);
  letter-spacing: -0.03em;
  margin-bottom: var(--esp-2);
}

.ap-auth__cabecalho p {
  font-size: var(--txt-base);
  color: var(--texto-fraco);
  margin: 0;
}

.ap-auth__form { display: flex; flex-direction: column; }

.ap-auth__linha-rotulo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--esp-3);
  margin-bottom: var(--esp-2);
}

.ap-auth__linha-rotulo .ap-rotulo { margin-bottom: 0; }

.ap-auth__esqueci {
  font-size: var(--txt-xs);
  font-weight: var(--peso-medio);
}

.ap-auth__rodape {
  margin-top: var(--esp-5);
  padding-top: var(--esp-5);
  border-top: 1px solid var(--borda);
  text-align: center;
  font-size: var(--txt-sm);
  color: var(--texto-fraco);
}

.ap-auth__rodape a { font-weight: var(--peso-medio); }

.ap-auth__aviso-rodape {
  margin-top: var(--esp-5);
  text-align: center;
  font-size: var(--txt-xs);
  color: var(--texto-tenue);
}

/* Estado de sucesso (recuperação enviada, senha redefinida) */
.ap-auth__resultado {
  text-align: center;
  padding: var(--esp-2) 0;
}

.ap-auth__resultado-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem; height: 3.5rem;
  margin-bottom: var(--esp-4);
  border-radius: var(--raio-full);
  font-size: var(--txt-xl);
}

.ap-auth__resultado-icone--sucesso { background: var(--cor-sucesso-suave); color: var(--cor-sucesso); }
.ap-auth__resultado-icone--aviso   { background: var(--cor-aviso-suave);   color: var(--cor-aviso); }

/* O medidor de força de senha (`.ap-forca`) foi para o app.css em
   09/10/2026: "Meus dados", dentro do painel, também o usa. */

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP — duas colunas a partir de 992px
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 992px) {
  .ap-auth { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .ap-auth__marca { display: flex; }
  .ap-auth__logo-mobile { display: none; }
  .ap-auth__painel { padding: var(--esp-6) var(--esp-7); }
  .ap-auth__topo { justify-content: flex-end; }
}

@media (min-width: 1400px) {
  .ap-auth { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}

/* Tablet: coluna única, mas com respiro maior que o mobile */
@media (min-width: 768px) and (max-width: 991px) {
  .ap-auth__painel { padding: var(--esp-6); }
  .ap-auth__caixa { max-width: 28rem; }
}

@media (max-width: 767px) {
  .ap-auth__painel { padding: var(--esp-4) var(--esp-3); }
  .ap-auth__cabecalho h1 { font-size: var(--txt-xl); }
  .ap-auth__topo { margin-bottom: var(--esp-5); }
}
