/* Pantallas de acceso: panel ilustrado a la izquierda y formulario a la derecha. */

.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: calc(100vh - 57px); }

.auth-art {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 48px;
  overflow: hidden;
  background: var(--bg2);
}
.auth-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: zoom 20s ease-in-out infinite alternate; }
@keyframes zoom { to { transform: scale(1.1); } }
.auth-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 360px at 85% 10%, rgba(157, 78, 221, 0.35), transparent 70%),
    linear-gradient(160deg, rgba(9, 17, 33, 0.5), rgba(9, 17, 33, 0.93) 70%);
  z-index: 1;
  pointer-events: none;
}
.auth-art-inner, .auth-chip { z-index: 2; }
.auth-art-inner { position: relative; max-width: 460px; }
.auth-art h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.02em; margin: 24px 0 16px; animation: up 0.8s 0.15s both; }
.auth-points { margin: 0; padding: 0; list-style: none; }
.auth-points li { display: flex; gap: 10px; align-items: center; padding: 6px 0; color: var(--text); animation: up 0.7s both; }
.auth-points li:nth-child(1) { animation-delay: 0.3s; }
.auth-points li:nth-child(2) { animation-delay: 0.42s; }
.auth-points li:nth-child(3) { animation-delay: 0.54s; }
.auth-points li::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(61, 220, 151, 0.18); color: var(--ok); font-size: 12px; font-weight: 700; }

.auth-qr { position: relative; display: inline-block; padding: 12px; border-radius: 20px; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); overflow: hidden; animation: up 0.8s both, bob 6s 1s ease-in-out infinite; }
.auth-qr canvas { display: block; width: 150px; height: auto; transition: opacity 0.3s; }
.auth-qr::after { content: ""; position: absolute; left: 0; right: 0; top: -20%; height: 18%; background: linear-gradient(180deg, transparent, rgba(0, 217, 255, 0.35)); border-bottom: 2px solid var(--cyan); animation: scan 3s ease-in-out infinite; }
@keyframes scan { 0%, 15% { top: -20%; } 60%, 100% { top: 104%; } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes up { from { opacity: 0; transform: translateY(18px); } }

.auth-chip { position: absolute; padding: 8px 14px; border-radius: 12px; background: rgba(17, 28, 51, 0.88); backdrop-filter: blur(8px); border: 1px solid var(--line); font-size: 13px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); animation: up 0.8s 0.7s both, bob 5s 1.5s ease-in-out infinite; }
.auth-chip.c1 { top: 40px; right: 40px; color: var(--ok); }
.auth-chip.c2 { top: 96px; right: 90px; color: var(--cyan); animation-delay: 0.9s, 3s; }

.auth-main { display: grid; place-items: center; padding: 48px 24px; background: radial-gradient(600px 400px at 50% 0%, rgba(0, 217, 255, 0.07), transparent 70%); }
.auth-card { width: 100%; max-width: 420px; animation: up 0.6s both; }
.auth-card h1 { font-size: 30px; margin-bottom: 6px; }
.auth-card > .muted { margin: 0 0 24px; }
.auth-card form { margin-bottom: 18px; }
.auth-card label { margin-bottom: 6px; }
.auth-card input:not([type="checkbox"]) { margin: 0 0 16px; padding: 13px 14px; border-radius: 12px; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.auth-card input:focus { outline: none; border-color: var(--cyan); background: #0b1428; box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.15); }
.auth-card .btn.big { margin-top: 6px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label-row a { margin-bottom: 6px; }

/* Contraseña con botón de ojo */
.pass { position: relative; }
.pass input { padding-right: 48px !important; }
.eye { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; transition: color 0.2s, background 0.2s; }
.eye:hover { color: var(--cyan); background: rgba(0, 217, 255, 0.08); }
.eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eye[aria-pressed="true"] { color: var(--cyan); }
.eye[aria-pressed="true"] svg { animation: blink 0.3s; }
.eye[aria-pressed="true"]::after { content: ""; position: absolute; width: 22px; height: 2px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }
@keyframes blink { 50% { transform: scaleY(0.1); } }
.caps { margin: -10px 0 14px; color: var(--warn); font-size: 12px; }

/* Medidor de seguridad */
.strength { position: relative; height: 5px; margin: -8px 0 18px; border-radius: 99px; background: var(--line); }
.strength i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: var(--err); transition: width 0.3s, background 0.3s; }
.strength span { position: absolute; right: 0; top: 8px; color: var(--muted); font-size: 11px; }

/* Botón cargando y error */
.btn.loading { pointer-events: none; color: transparent; position: relative; }
.btn.loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #06101f; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shake { animation: up 0.6s both, shake 0.45s 0.15s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.sent-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px; border-radius: 18px; background: var(--grad); color: #06101f; font-size: 30px; animation: up 0.6s both, bob 3s 0.6s ease-in-out infinite; }

@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 260px; padding: 28px 20px; }
  .auth-qr, .auth-chip, .auth-points { display: none; }
  .auth-art h2 { margin: 0; }
  .auth-main { padding: 32px 16px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-photo, .auth-qr, .auth-qr::after, .auth-chip, .sent-icon, .auth-card, .auth-points li, .auth-art h2, .shake { animation: none; }
}
