/* ═══════════════════════════════════════════════════════════════════════
   acceso.css — Iniciar sesión, registro, recuperar y restablecer contraseña
   y verificar email, con la identidad (v1.15.0, entrega R3).
   Todo bajo body.ac para ganar a trivialista.css sin tocar sus clases.
   Tokens de marca-base.css (tema claro y oscuro).
   ═══════════════════════════════════════════════════════════════════════ */

body.ac { background: var(--ground); color: var(--ink); }
.ac .tv-auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; position: relative; z-index: 1; background: transparent; }
.ac .tv-auth-card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); padding: 36px 32px 30px;
}
.ac .tv-auth-card.ac-ancha { max-width: 460px; }
.ac .ac-centro { text-align: center; }
.ac .tv-auth-logo { text-align: center; margin-bottom: 22px; }
.ac .tv-auth-logo a { display: inline-flex; }
.ac .tv-auth-logo img { height: 44px; }
.ac .tv-auth-title { font-family: var(--font-display); font-weight: 700; font-size: 1.65rem; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); text-align: center; margin: 0 0 6px; }
.ac .tv-auth-sub { font-size: .95rem; color: var(--ink-muted); text-align: center; margin: 0 0 26px; line-height: 1.5; }
.ac .tv-auth-sub b { color: var(--ink); }

/* Campos */
.ac .tv-field { margin-bottom: 18px; }
.ac .tv-field label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.ac .tv-input-wrap input {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: 500 1rem var(--font-sans); box-shadow: none;
}
.ac .tv-input-wrap input::placeholder { color: var(--ink-muted); opacity: .75; }
.ac .tv-input-wrap input:focus { outline: none; border-color: var(--focus); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.ac .tv-input-wrap input.is-error { border-color: var(--pink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 20%, transparent); }
/* Sin iconos de adorno dentro de los campos; solo el ojo de la contraseña */
.ac .tv-input-ico:not(.clickable) { display: none; }
.ac .tv-input-ico.clickable {
  right: 4px; width: 40px; height: 40px; border: 0; padding: 0; background: transparent; border-radius: 50%;
  justify-content: center; color: var(--ink-muted); cursor: pointer;
}
.ac .tv-input-ico.clickable:hover { background: var(--surface-sunken); color: var(--ink); }
.ac .tv-input-ico.clickable:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; }
.ac .tv-input-wrap:has(.clickable) input { padding-right: 48px; }
.ac .tv-field-err { font-size: .82rem; color: var(--pink-text); margin-top: 6px; font-weight: 500; }

/* Casilla «Mantener sesión iniciada» y enlace de recuperar */
.ac .ac-fila { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.ac .ac-ultimo { margin-bottom: 24px; }
.ac .tv-check-row { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .9rem; color: var(--ink); }
.ac .tv-check-box { width: 20px; height: 20px; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.ac .tv-check-row input:checked ~ .tv-check-box { background: var(--teal); border-color: var(--teal); }
.ac .ac-fila .mk-link { font-size: .9rem; }

/* Botones (los antiguos .btn-primary ya tienen el estilo de marca.css; aquí solo la altura) */
.ac .btn-primary { min-height: 52px; width: 100%; justify-content: center; font-size: 1.02rem; }
.ac .btn-spinner { border-color: color-mix(in srgb, var(--on-primary) 25%, transparent); border-top-color: var(--on-primary); }

/* Separador */
.ac .tv-divider { margin: 26px 0 16px; color: var(--ink-muted); font-size: .85rem; }
.ac .tv-divider::before, .ac .tv-divider::after { background: var(--line); }

/* Avisos */
.ac .tv-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); margin: 0 0 18px; font-size: .92rem; font-weight: 500; line-height: 1.5; text-align: left; }
.ac .tv-alert-ico { display: inline-flex; flex-shrink: 0; margin-top: 1px; }
.ac .tv-alert-err { background: color-mix(in srgb, var(--pink) 10%, var(--surface)); border: 1px solid var(--pink); color: var(--ink); }
.ac .tv-alert-err .tv-alert-ico { color: var(--pink-text); }
.ac .tv-alert-ok { background: color-mix(in srgb, var(--teal) 12%, var(--surface)); border: 1px solid var(--teal); color: var(--ink); }
.ac .tv-alert-ok .tv-alert-ico { color: var(--teal-text); }
.ac .tv-alert-info { background: var(--surface-sunken); border: 1px solid var(--line); color: var(--ink); }
.ac .tv-alert-info .tv-alert-ico { color: var(--ink-muted); }

.ac .ac-reenvio { margin: -4px 0 18px; padding: 14px; border-radius: var(--radius-md); background: var(--surface-sunken); }
.ac .ac-reenvio p { margin: 0 0 10px; font-size: .9rem; color: var(--ink-muted); }

/* Icono de estado (contraseña cambiada, cuenta verificada, enlace no válido) */
.ac .ac-estado { width: 64px; height: 64px; border-radius: 50%; margin: 4px auto 16px; display: flex; align-items: center; justify-content: center; }
.ac .ac-estado-ok { background: var(--teal); color: #fff; }
.ac .ac-estado-ko { background: color-mix(in srgb, var(--pink) 14%, var(--surface)); color: var(--pink-text); }
.ac .ac-estado + .tv-auth-title + .tv-auth-sub + a { margin-top: 4px; }

.ac .ac-legal { font-size: .82rem; color: var(--ink-muted); text-align: center; margin: 18px 0 0; line-height: 1.5; }
.ac .ac-legal a { color: var(--teal-text); }

@media (max-width: 480px) {
  .ac .tv-auth-wrap { align-items: flex-start; padding: 24px 12px; }
  .ac .tv-auth-card { padding: 28px 20px 24px; }
  .ac .tv-auth-title { font-size: 1.45rem; }
}

/* v1.20.0 (fase 3.4) — Lo que conserva el invitado al crear la cuenta */
.ac-guardado { margin: 0 0 18px; padding: 16px; border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--teal) 8%, var(--surface)); }
.ac-guardado-tit { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 600; color: var(--ink); }
.ac-guardado-tit svg { color: var(--teal-text); flex: none; }
.ac-guardado dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.ac-guardado dl div { padding: 8px; border-radius: 10px; background: var(--surface); text-align: center; }
.ac-guardado dt { font-size: .75rem; color: var(--ink-muted); }
.ac-guardado dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.ac-guardado-nota { margin: 12px 0 0; font-size: .85rem; color: var(--ink-muted); }
.ac .tv-field label.tv-check-row { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 500; line-height: 1.4; cursor: pointer; }
.ac .tv-check-row .tv-check-box { flex: none; display: grid; place-items: center; }
.ac .tv-field .tv-check-row .tv-check-box { margin-top: 1px; }
/* La casilla real queda invisible pero se puede usar con el teclado */
.ac .tv-check-row { position: relative; }
.ac .tv-check-row input[type=checkbox] { display: block; position: absolute; left: 0; top: 0; width: 20px; height: 20px; margin: 0; opacity: 0; }
.ac .tv-check-row input:focus-visible ~ .tv-check-box { outline: 3px solid var(--focus); outline-offset: 2px; }
