/* AMT Journal — páginas de acceso (register, login, recover).
   Medidas calcadas de los mockups del propietario (design/refs/02 y 04). Cada página define una unidad
   --u que vale 10px al tamaño del mockup y encoge con la ventana: todo se expresa en múltiplos de --u. */

.auth {
  /* paleta medida sobre los mockups (más neutra que la de la app) */
  --a-card: #0c0c0c;
  --a-field: #0d0d0d;
  --a-muted: #b6b6bb;
  --a-ph: #97979c;
  --a-line: rgba(255, 255, 255, .10);
  --a-focus: rgba(76, 141, 255, .7);
  --a-ring: 0 0 0 3px rgba(76, 141, 255, .14);
  --a-ring-neg: 0 0 0 3px rgba(240, 97, 109, .13);
  margin: 0;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* El contenido traducible aparece cuando el JS ya aplicó idioma e iconos (sin JS, a los 2 s). */
.auth-reveal { opacity: 0; animation: auth-in-nojs .4s 2s both; }
.is-ready .auth-reveal { animation: auth-in .7s var(--ease) both; }
@keyframes auth-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes auth-in-nojs { from { opacity: 0; } to { opacity: 1; } }

/* ---------- selector de idioma ---------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .09em; color: var(--text-4);
  user-select: none;
}
.lang-switch button {
  padding: 4px 3px; border-radius: 4px;
  color: var(--text-3); letter-spacing: inherit; font-weight: inherit;
  transition: color .15s;
}
.lang-switch button:hover { color: var(--text-2); }
.lang-switch button[aria-pressed="true"] { color: var(--text); }

/* ---------- avisos sobre el formulario ---------- */
.auth-notice, .auth-alert {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, .025);
  font-size: 13px; line-height: 1.45; color: var(--text-2); letter-spacing: -.005em;
}
.auth-notice-ic { flex: none; margin-top: 2px; color: var(--text-3); }
.auth-notice a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .3); }
.auth-notice a:hover { text-decoration-color: currentColor; }
.auth-alert { border-color: var(--neg-line); background: var(--neg-soft); color: #f6c9cd; }
.auth-alert .auth-notice-ic { color: var(--neg); }

/* ---------- errores de campo ---------- */
.fld { position: relative; display: flex; flex-direction: column; min-width: 0; }
.fld-err { margin-top: 5px; font-size: 12.5px; line-height: 16px; color: var(--neg); letter-spacing: -.005em; }

/* ---------- botón de envío ---------- */
.auth-submit { position: relative; width: 100%; letter-spacing: -.015em; }
.auth-submit-ic { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; }
.auth-submit:disabled { opacity: .5; }
.auth-submit.is-loading:disabled { opacity: 1; }
.auth-submit.is-loading .auth-submit-ic svg { display: none; }
.auth-submit.is-loading .auth-submit-ic::after {
  content: ""; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .2); border-top-color: #fff;
  animation: spin .7s linear infinite;
}

/* autocompletado del navegador sin el fondo claro por defecto */
.auth input:-webkit-autofill,
.auth input:-webkit-autofill:hover,
.auth input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  box-shadow: 0 0 0 1000px var(--a-fill, var(--a-field)) inset;
  transition: background-color 99999s ease-out;
}

/* ============================================================
   Create account
   ============================================================ */
.auth--register {
  --u: clamp(6.7px, min(.9372vh, .68vw), 12.5px);
  --gap: calc(var(--u) * 2.3);
  height: 100vh; height: 100dvh;
  padding: calc(var(--u) * 1.85) 15px;
  background: #010101;
  overflow: hidden;
}

.reg {
  height: 100%; max-width: calc(var(--u) * 205); margin: 0 auto; /* en ultrapanorámicos el marco no se estira más */
  display: grid; grid-template-columns: 47% minmax(0, 1fr);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: calc(var(--u) * 2.8);
  background: #050505;
  overflow: hidden;
}

/* --- panel de arte --- */
.reg-art { position: relative; min-width: 0; overflow: hidden; border-right: 1px solid rgba(255, 255, 255, .09); background: #000; }
.reg-art-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.reg-lines path { stroke-width: 1; vector-effect: non-scaling-stroke; shape-rendering: crispEdges; }
.reg-eye { mix-blend-mode: screen; opacity: .25; animation: reg-eye 6.5s ease-in-out infinite; }
.reg-glint { transform-origin: 346px 495px; animation: reg-glint 5.2s ease-in-out infinite; }
@keyframes reg-eye { 0%, 100% { opacity: .08; } 50% { opacity: .5; } }
@keyframes reg-glint { 0%, 100% { opacity: .7; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.12); } }

.reg-art-brand {
  position: absolute; left: calc(var(--u) * 4); top: calc(var(--u) * 4.7);
  font-size: calc(var(--u) * 2.3); font-weight: 600; line-height: 1; letter-spacing: .16em; color: #fff;
}
.reg-art-copy {
  position: absolute; left: calc(var(--u) * 3.8); bottom: calc(var(--u) * 3.7);
  font-size: max(10.5px, calc(var(--u) * 1.15)); line-height: 1; letter-spacing: -.025em; color: rgba(255, 255, 255, .68);
}

/* --- tarjeta --- */
.reg-side { display: flex; min-width: 0; min-height: 0; padding: calc(var(--u) * 2.6); }
.reg-card {
  flex: 1; min-width: 0; max-width: calc(var(--u) * 84); margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(var(--u) * 3) calc(var(--u) * 4.4) calc(var(--u) * 3) calc(var(--u) * 4);
  background: var(--a-card);
  border-radius: calc(var(--u) * 3.6);
  overflow: hidden auto;
}

.reg-top {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: calc(var(--u) * 2.2);
  margin-right: calc(var(--u) * -1.3);
}
.reg-brand { display: none; }
.reg-have { font-size: max(12.5px, calc(var(--u) * 1.55)); line-height: 1.3; letter-spacing: -.02em; color: var(--a-muted); white-space: nowrap; }
.reg-have a { margin-left: .3em; color: #fff; font-weight: 500; }
.reg-have a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .4); }
.reg-have--bottom { display: none; }

/* separadores flexibles: reparten el espacio libre y lo ceden si aparecen errores */
.reg-sp--a { flex: 1 1 calc(var(--u) * 3.8); min-height: calc(var(--u) * 1); }
.reg-sp--b { flex: 1 1 0px; }

.reg-body { flex: none; }
.reg-title { font-size: calc(var(--u) * 4.2); font-weight: 500; line-height: 1.19; letter-spacing: -.045em; color: #fff; }
.reg-sub { margin-top: calc(var(--u) * .8); font-size: max(13px, calc(var(--u) * 1.7)); line-height: 1.42; letter-spacing: -.02em; color: var(--a-muted); text-wrap: balance; }
.reg-body > .auth-notice, .reg-body > .auth-alert { margin-top: calc(var(--u) * 1.8); margin-bottom: calc(var(--u) * -2.4); }

.reg-form { display: flex; flex-direction: column; gap: var(--gap); margin-top: calc(var(--u) * 4.4); }
.reg-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(var(--u) * 4.2); }

.auth--register .fld > label {
  align-self: flex-start;
  margin-bottom: calc(var(--u) * .6);
  font-size: max(12.5px, calc(var(--u) * 1.4)); font-weight: 500; line-height: calc(var(--u) * 2); letter-spacing: -.01em; color: #fff;
}

/* caja del campo: el borde y el foco viven aquí, el input es transparente */
.box {
  position: relative; display: flex; align-items: center;
  height: max(40px, calc(var(--u) * 6.2));
  border: 1px solid var(--a-line); border-radius: 8px;
  background: var(--a-field);
  transition: border-color .16s, box-shadow .16s;
}
.box:hover { border-color: rgba(255, 255, 255, .17); }
.box input:not([type="hidden"]) {
  flex: 1; min-width: 0; height: 100%;
  padding: 0 calc(var(--u) * 1.7);
  border: 0; border-radius: 7px; background: transparent; outline: none;
  font-size: max(13.5px, calc(var(--u) * 1.85)); letter-spacing: -.015em; color: #fff;
  text-overflow: ellipsis;
}
.box input::placeholder { color: var(--a-ph); opacity: 1; }
.box:has(input:focus), .box:has(.sel:focus-visible), .box:has([aria-expanded="true"]) { border-color: var(--a-focus); box-shadow: var(--a-ring); }
.fld.is-invalid .box { border-color: rgba(240, 97, 109, .6); }
.fld.is-invalid .box:has(input:focus), .fld.is-invalid .box:has(.sel:focus-visible) { border-color: rgba(240, 97, 109, .8); box-shadow: var(--a-ring-neg); }

/* botón dentro de la caja (ojo de la contraseña) */
.box-btn {
  flex: none; display: grid; place-items: center;
  width: max(40px, calc(var(--u) * 6.2)); height: 100%;
  border-radius: 7px; color: #bcbcc1;
  transition: color .15s;
}
.box-btn:hover { color: #fff; }
.box-btn:focus-visible { outline-offset: -5px; }
.box-btn svg { width: max(17px, calc(var(--u) * 2.2)); height: auto; }

/* teléfono: prefijo (bandera + código) y número en una sola caja */
.dial {
  flex: none; display: flex; align-items: center; height: 100%;
  padding: 0 calc(var(--u) * .4) 0 calc(var(--u) * 1.6);
  border-radius: 7px 0 0 7px; color: #fff;
}
.dial:focus-visible { outline-offset: -4px; }
.dial .flag { font-size: max(20px, calc(var(--u) * 3.3)); line-height: 1; }
.dial-code { margin-left: calc(var(--u) * 1.1); font-size: max(13.5px, calc(var(--u) * 1.85)); letter-spacing: -.01em; color: #ededee; }
.dial .chev { margin-left: calc(var(--u) * 1.2); }
.chev { display: grid; place-items: center; color: #fff; transition: transform .2s var(--ease); }
.chev svg { width: max(17px, calc(var(--u) * 2.4)); height: auto; }
[aria-expanded="true"] > .chev { transform: rotate(180deg); }
.box--phone input:not([type="hidden"]) { padding-left: calc(var(--u) * 2); }

/* desplegables de país y edad */
.sel {
  flex: 1; min-width: 0; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 calc(var(--u) * 1.5) 0 calc(var(--u) * 1.7);
  border-radius: 7px; text-align: left;
  font-size: max(13.5px, calc(var(--u) * 1.85)); letter-spacing: -.015em; color: #fff;
}
.sel:focus-visible { outline: none; }
.sel-value { display: flex; align-items: center; gap: .55em; min-width: 0; overflow: hidden; white-space: nowrap; }
.sel-value > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.sel-value.is-placeholder { display: block; text-overflow: ellipsis; color: var(--a-ph); }
.sel-value .flag { font-size: 1.15em; line-height: 1; }

/* sin emoji de banderas (Windows): código ISO en una pastilla */
.no-flags .flag {
  padding: 2px 4px; border: 1px solid var(--line-strong); border-radius: 4px;
  font: 600 10px/1.2 var(--mono) !important; letter-spacing: .04em; color: var(--text-2);
}

/* seguridad de la contraseña: cuelga bajo la caja sin ocupar sitio */
.pw-meter {
  position: absolute; right: 1px; top: calc(100% + 7px);
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; line-height: 12px; letter-spacing: -.005em; color: var(--text-3);
  pointer-events: none;
}
.pw-bars { display: flex; gap: 3px; }
.pw-bars i { width: 18px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .1); transition: background .25s; }
.pw-meter[data-level="1"] i:nth-child(-n+1) { background: rgba(255, 255, 255, .42); }
.pw-meter[data-level="2"] i:nth-child(-n+2) { background: rgba(255, 255, 255, .6); }
.pw-meter[data-level="3"] i:nth-child(-n+3) { background: rgba(76, 141, 255, .85); }
.pw-meter[data-level="4"] i { background: var(--blue); }
.pw-meter[data-level="3"] .pw-word, .pw-meter[data-level="4"] .pw-word { color: var(--text-2); }
.fld:has(.pw-meter:not([hidden])) .fld-err { padding-right: 150px; }

/* términos */
.fld--terms { margin-top: calc(var(--u) * 1); }
.terms { display: flex; align-items: center; gap: calc(var(--u) * 1.1); }
.terms input {
  appearance: none; -webkit-appearance: none;
  flex: none; display: grid; place-content: center;
  width: max(18px, calc(var(--u) * 2.4)); height: max(18px, calc(var(--u) * 2.4));
  border: 1px solid rgba(255, 255, 255, .46); border-radius: 50%;
  background: transparent; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.terms input:hover { border-color: rgba(255, 255, 255, .75); }
.terms input:checked { background: var(--blue-600); border-color: var(--blue); }
.terms input:checked::after {
  content: "";
  width: max(8px, calc(var(--u) * 1)); height: max(4px, calc(var(--u) * .5));
  border-left: 1.7px solid #fff; border-bottom: 1.7px solid #fff;
  transform: translateY(-15%) rotate(-45deg);
}
.fld--terms.is-invalid .terms input { border-color: rgba(240, 97, 109, .75); }
.terms label { font-size: max(12.5px, calc(var(--u) * 1.4)); line-height: 1.35; letter-spacing: -.02em; color: var(--a-muted); cursor: pointer; }
.terms a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .5); transition: color .15s; }
.terms a:hover { color: #fff; }

.reg-form .auth-submit {
  margin-top: calc(var(--u) * 2);
  height: max(46px, calc(var(--u) * 7.2));
  border-radius: 8px;
  font-size: max(15px, calc(var(--u) * 2)); font-weight: 700; letter-spacing: -.02em;
}
/* halo más contenido que el .btn-glow base: en el mockup el brillo queda pegado al contorno */
.reg-form .btn-glow {
  background: linear-gradient(90deg, rgba(47, 107, 255, .1), rgba(47, 107, 255, .035) 16%, transparent 34%), var(--a-card);
  border-color: rgba(64, 114, 240, .85);
  box-shadow: 0 0 0 1px rgba(47, 107, 255, .12), 0 0 14px rgba(47, 107, 255, .26), inset 0 0 12px rgba(47, 107, 255, .08);
}
.reg-form .btn-glow:hover {
  background: linear-gradient(90deg, rgba(47, 107, 255, .17), rgba(47, 107, 255, .06) 22%, transparent 48%), var(--a-card);
  border-color: rgba(110, 156, 255, .95);
  box-shadow: 0 0 0 1px rgba(47, 107, 255, .18), 0 0 22px rgba(47, 107, 255, .3), inset 0 0 16px rgba(47, 107, 255, .1);
}
.reg-form .auth-submit-ic { right: calc(var(--u) * 3.2); }
.reg-form .auth-submit-ic svg { width: max(21px, calc(var(--u) * 3)); height: auto; }

/* En escritorio el error se come parte del hueco entre campos para que la tarjeta apenas crezca. */
@media (min-width: 980px) {
  .auth--register .fld-err { margin-bottom: calc(-1 * min(21px, var(--gap) - 6px)); }
}

/* --- móvil y tablet: sin panel de arte, la tarjeta es la página --- */
@media (max-width: 979px) {
  .auth--register {
    --u: 8.7px; --gap: 18px;
    height: auto; min-height: 100vh; min-height: 100dvh;
    padding: 0; overflow: visible;
    background: var(--a-card);
  }
  .reg { display: block; height: auto; border: 0; border-radius: 0; background: none; overflow: visible; }
  .reg-art { display: none; }
  .reg-side { display: block; padding: 0; }
  .reg-card {
    max-width: 540px; min-height: 100vh; min-height: 100dvh; margin: 0 auto;
    padding: 20px 24px 32px; border-radius: 0; overflow: visible;
  }
  .reg-top { margin-right: 0; min-height: 32px; }
  .reg-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; letter-spacing: -.02em; color: #fff; }
  .reg-have--top { display: none; }
  .reg-have--bottom { display: block; margin-top: 24px; text-align: center; font-size: 14px; white-space: normal; }
  .reg-sp--a { flex: 1 1 36px; min-height: 36px; }   /* en tablet el bloque queda centrado, algo alto */
  .reg-sp--b { flex: 1.5 1 0px; }
  .reg-title { font-size: 34px; }
  .reg-sub { font-size: 15.5px; }
  .reg-form { margin-top: 30px; }
  .reg-row { gap: 14px; }
  .auth--register .fld > label { font-size: 13.5px; line-height: 20px; margin-bottom: 6px; }
  .box { height: 54px; }
  .box input:not([type="hidden"]), .sel, .dial-code { font-size: 16px; } /* 16px evita el zoom de iOS al enfocar */
  .box input:not([type="hidden"]), .sel { padding-left: 15px; }
  .dial { padding-left: 14px; }
  .box--phone input:not([type="hidden"]) { padding-left: 14px; }
  .terms { align-items: flex-start; gap: 11px; }
  .terms input { width: 22px; height: 22px; margin-top: -1px; }
  .terms label { font-size: 13.5px; line-height: 1.5; }
  .fld--terms { margin-top: 6px; }
  .reg-form .auth-submit { margin-top: 12px; height: 58px; font-size: 16.5px; }
  .reg-form .auth-submit-ic { right: 22px; }
  .reg-body > .auth-notice, .reg-body > .auth-alert { margin-top: 18px; margin-bottom: -8px; }
}
@media (max-width: 479px) {
  .reg-row { grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
  .fld:has(.pw-meter:not([hidden])) .fld-err { padding-right: 0; margin-top: 24px; }
}

/* ============================================================
   Sign in · Recover
   ============================================================ */
.auth--login {
  --u: clamp(8px, min(1.002vh, .6345vw), 12.5px);
  --a-fill: #020205;
  --a-muted: #a3a4aa;   /* en este mockup los grises son más apagados y azulados */
  --a-label: #8e9097;
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  background: #030509; /* el #030408 del mockup, un nivel arriba: es el tono exacto del borde de auth-waves (sin costura) */
  overflow-x: hidden;
}

/* ondas: ancladas a la derecha, a toda altura, fundidas hacia la izquierda.
   Dos máscaras: la del contenedor atenúa lo que quede detrás del formulario en ventanas estrechas
   (al tamaño del mockup no actúa); la de la imagen funde su borde izquierdo con el fondo. */
.lg-bg {
  position: fixed; inset: 0;
  overflow: hidden; pointer-events: none;
  --lg-veil: linear-gradient(90deg, rgba(0, 0, 0, .3) calc(9.5vw + var(--u) * 46), #000 calc(9.5vw + var(--u) * 66));
  -webkit-mask-image: var(--lg-veil); mask-image: var(--lg-veil);
}
.lg-bg picture {
  position: absolute; inset: 0 0 0 auto;
  width: max(55.2vw, 87.2vh);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16%);
}
.lg-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: right center;
  transform: scale(1.03);
  animation: lg-drift 60s ease-in-out infinite alternate;
}
@keyframes lg-drift { from { transform: scale(1.03) translate3d(0, 0, 0); } to { transform: scale(1.03) translate3d(-9px, 6px, 0); } }

.lg-logo {
  position: absolute; left: calc(var(--u) * 3.7); top: calc(var(--u) * 2.9); z-index: 1;
  display: block; height: calc(var(--u) * 6);
  color: #23262e; transition: color .2s;
}
.lg-logo:hover { color: #3b404c; }
.lg-logo span, .lg-logo svg { display: block; height: 100%; width: auto; color: inherit; }

.lg-main {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  padding: 0 24px 0 9.5vw;
}
/* el bloque queda donde en el mockup: 302px libres arriba por 233 abajo */
.lg-main::before { content: ""; flex: 302 1 0px; min-height: calc(var(--u) * 12); }
.lg-main::after { content: ""; flex: 233 1 0px; min-height: 72px; }

.lg-col { flex: none; width: min(100%, calc(var(--u) * 54)); }
.lg-title { font-size: calc(var(--u) * 4.4); font-weight: 500; line-height: 1.14; letter-spacing: -.04em; color: #fff; }
.lg-title:focus { outline: none; }
.lg-sub { margin-top: calc(var(--u) * .6); font-size: max(14px, calc(var(--u) * 1.82)); line-height: 1.4; letter-spacing: -.02em; color: var(--a-muted); text-wrap: balance; }
.lg-col .auth-notice, .lg-col .auth-alert { margin-top: calc(var(--u) * 2.4); margin-bottom: calc(var(--u) * -1.8); }

.lg-form { display: flex; flex-direction: column; gap: calc(var(--u) * 2.5); margin-top: calc(var(--u) * 4.2); }

/* campo con la etiqueta dentro de la caja */
.ibox {
  position: relative;
  height: max(54px, calc(var(--u) * 6.7));
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 8px;
  background: rgba(0, 0, 2, .62);
  transition: border-color .16s, box-shadow .16s;
}
.ibox:hover { border-color: rgba(255, 255, 255, .16); }
.ibox input {
  width: 100%; height: 100%;
  padding: calc(var(--u) * 2.9) calc(var(--u) * 1.9) calc(var(--u) * .8);
  border: 0; border-radius: 7px; background: transparent; outline: none;
  font-size: max(15px, calc(var(--u) * 1.9)); letter-spacing: -.01em; color: #fff;
}
.ibox--pw input { padding-right: calc(var(--u) * 7.2); }
/* puntos de contraseña pequeños y juntos, como en el mockup */
.ibox input[type="password"]:not(:placeholder-shown) { font-size: max(11px, calc(var(--u) * 1.25)); letter-spacing: .13em; }
.ibox label {
  position: absolute; left: calc(var(--u) * 1.9); top: calc(var(--u) * 1.25);
  font-size: max(11.5px, calc(var(--u) * 1.3)); line-height: 1.25; letter-spacing: -.005em; color: var(--a-label);
  pointer-events: none; transform-origin: left top;
  transition: transform .2s var(--ease), color .2s;
}
/* vacío y sin foco: la etiqueta descansa centrada, a tamaño de valor */
.ibox input:placeholder-shown:not(:focus) + label { transform: translateY(calc(var(--u) * .95)) scale(1.38); }
.ibox input:-webkit-autofill + label { transform: none; }
.ibox:has(input:focus) { border-color: var(--a-focus); box-shadow: var(--a-ring); }
.fld.is-invalid .ibox { border-color: rgba(240, 97, 109, .6); }
.fld.is-invalid .ibox:has(input:focus) { border-color: rgba(240, 97, 109, .8); box-shadow: var(--a-ring-neg); }
.ibox .box-btn { position: absolute; right: 0; top: 0; width: calc(var(--u) * 7.6); color: #8d8e94; }
.ibox .box-btn svg { width: max(20px, calc(var(--u) * 2.6)); }

.lg-forgot {
  align-self: flex-end;
  margin-top: calc(var(--u) * -.4);
  font-size: max(13px, calc(var(--u) * 1.5)); line-height: 1.35; letter-spacing: -.01em; color: var(--a-muted);
  transition: color .15s;
}
.lg-forgot:hover { color: #fff; }

/* botón: contorno lavanda con halo suave */
.lg-submit {
  margin-top: calc(var(--u) * .1);
  height: max(52px, calc(var(--u) * 6.9));
  border: 1px solid rgba(150, 172, 255, .65); border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(64, 92, 200, .15), rgba(64, 92, 200, .07) 30%, transparent 58%),
    rgba(6, 8, 13, .9);
  box-shadow: 0 0 0 1px rgba(150, 172, 255, .05), 0 0 18px rgba(120, 146, 255, .13), 0 8px 22px -10px rgba(96, 124, 255, .32), inset 0 0 16px rgba(120, 146, 255, .05);
  font-size: max(15.5px, calc(var(--u) * 1.9)); font-weight: 600; color: #fff;
}
.lg-submit:hover {
  border-color: rgba(178, 195, 255, .9);
  background:
    linear-gradient(90deg, rgba(64, 92, 200, .24), rgba(64, 92, 200, .1) 38%, transparent 74%),
    rgba(6, 8, 13, .9);
  box-shadow: 0 0 0 1px rgba(150, 172, 255, .1), 0 0 28px rgba(120, 146, 255, .22), 0 10px 28px -10px rgba(96, 124, 255, .45), inset 0 0 20px rgba(120, 146, 255, .08);
}
.lg-submit .auth-submit-ic { right: calc(var(--u) * 2.6); }
.lg-submit .auth-submit-ic svg { width: max(20px, calc(var(--u) * 2.6)); height: auto; }

.lg-alt { margin-top: calc(var(--u) * 2.6); text-align: center; font-size: max(13px, calc(var(--u) * 1.5)); letter-spacing: -.01em; color: var(--a-muted); }
.lg-alt a { margin-left: .25em; color: #fff; font-weight: 500; }
.lg-alt a:hover, .lg-back:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .4); }

.lg-lang { position: absolute; right: 30px; bottom: 24px; z-index: 1; }

/* --- recover: estados de resultado --- */
.lg-badge {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: calc(var(--u) * 2.4);
  border: 1px solid var(--blue-line); border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
}
.lg-badge--neg { border-color: var(--neg-line); background: var(--neg-soft); color: var(--neg); }
.lg-text { margin-top: calc(var(--u) * 1.2); max-width: 46ch; font-size: max(14px, calc(var(--u) * 1.7)); line-height: 1.55; letter-spacing: -.012em; color: var(--a-muted); }
.lg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: calc(var(--u) * 3.4); }
.lg-actions .lg-submit { width: auto; min-width: calc(var(--u) * 24); padding: 0 calc(var(--u) * 7) 0 calc(var(--u) * 3); }
.lg-back { display: inline-flex; align-items: center; gap: 8px; font-size: max(13px, calc(var(--u) * 1.5)); letter-spacing: -.01em; color: var(--a-muted); transition: color .15s; }
.lg-back:hover { color: #fff; }
.lg-alt .lg-back { margin-left: 0; font-weight: 400; color: var(--a-muted); }
.lg-alt .lg-back:hover { color: #fff; }

@media (max-width: 759px) {
  .auth--login { --u: 9px; }
  .lg-bg { opacity: .5; --lg-veil: linear-gradient(180deg, #000 30%, transparent 96%); }
  .lg-bg picture { width: 100%; -webkit-mask-image: none; mask-image: none; }
  .lg-logo { left: 24px; top: 22px; height: 40px; }
  .lg-main { padding: 0 24px; }
  .lg-main::before { flex: 1 1 0px; min-height: 104px; }
  .lg-main::after { flex: 1.3 1 0px; min-height: 84px; }
  .lg-col { width: 100%; max-width: 460px; margin: 0 auto; }
  .lg-title { font-size: 34px; }
  .lg-sub { font-size: 15.5px; }
  .ibox { height: 60px; background: rgba(3, 4, 8, .72); }
  .ibox input { font-size: 16px; padding: 27px 16px 8px; }
  .ibox label { left: 16px; top: 11px; font-size: 12px; }
  .ibox input:placeholder-shown:not(:focus) + label { transform: translateY(9px) scale(1.33); }
  .lg-submit { height: 58px; font-size: 16.5px; }
  .lg-lang { right: 20px; bottom: 18px; }
}

/* ============================================================
   Popover de los desplegables (se monta en <body>)
   ============================================================ */
.pop {
  position: fixed; z-index: 60;
  display: flex; flex-direction: column;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  background: var(--bg-2);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  font-size: 13.5px;
  transform-origin: top center;
  animation: pop-in .16s var(--ease);
}
.pop[data-side="top"] { transform-origin: bottom center; }
@keyframes pop-in { from { opacity: 0; transform: scale(.985) translateY(-3px); } to { opacity: 1; transform: none; } }

.pop-search {
  flex: none; display: flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 13px;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
}
.pop-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 13.5px; color: var(--text); }
.pop-search input::placeholder { color: var(--text-4); opacity: 1; }

.pop-list { position: relative; flex: 1; min-height: 0; padding: 5px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.pop-list:focus { outline: none; }
.pop-opt {
  display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 0 9px;
  border-radius: var(--r-sm);
  color: var(--text-2); cursor: pointer;
}
.pop-opt.is-active { background: var(--active); color: var(--text); }
.pop-opt[aria-selected="true"] { color: var(--text); }
.pop-opt .flag { flex: none; width: 22px; text-align: center; font-size: 17px; line-height: 1; }
.pop-opt-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-opt-trail { flex: none; font-size: 12.5px; color: var(--text-3); }
.pop-opt .ic-check { flex: none; color: var(--blue); }
.pop-empty { padding: 20px 12px; text-align: center; color: var(--text-3); }

@media (max-width: 979px) {
  .pop-search { height: 48px; }
  .pop-search input { font-size: 16px; }
  .pop-opt { min-height: 42px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .reg-eye, .reg-glint, .lg-bg img, .auth-submit.is-loading .auth-submit-ic::after { animation: none !important; }
  .reg-eye { opacity: .2; }
}
