/* ═══════════════════════════════════════════════════════════
   MINDSIGN · Login / Auth  ·  auth.css
   UI premium + interactividad. Construye sobre app.css tokens.
   ═══════════════════════════════════════════════════════════ */

.auth { display: flex; min-height: 100vh; background: var(--surface); }
.auth__form { flex: 1 1 50%; display: flex; flex-direction: column; padding: 40px 48px; position: relative; }
.auth__center { margin: auto; width: 100%; max-width: 400px; }
.auth__center h1 { font-size: clamp(32px, 4vw, 40px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; margin: 0 0 8px; color: var(--ink); }
.auth__lead { font-size: 15px; line-height: 1.55; color: var(--n-500); margin: 0 0 30px; }
.auth__foot { font-family: var(--mono); font-size: 11px; color: var(--n-400); }

/* ── Entrada en cascada ── */
.au-rise { opacity: 0; transform: translateY(14px); animation: auRise .6s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes auRise { to { opacity: 1; transform: none; } }

/* ── Campo con floating label + ícono ── */
.af-field { position: relative; margin-bottom: 15px; }
.af-field input {
  width: 100%; height: 58px; box-sizing: border-box;
  padding: 22px 46px 7px 46px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 14px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.af-field input:hover { border-color: var(--n-300); }
.af-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); background: var(--surface); }
.af-field input::placeholder { color: transparent; }
.af-field label {
  position: absolute; left: 46px; top: 50%; transform: translateY(-50%);
  font-size: 15px; color: var(--n-400); pointer-events: none;
  transition: top .16s ease, font-size .16s ease, color .16s ease, transform .16s ease;
}
.af-field input:focus ~ label,
.af-field input:not(:placeholder-shown) ~ label {
  top: 11px; transform: none; font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand);
}
.af-field input:not(:placeholder-shown):not(:focus) ~ label { color: var(--n-400); }
/* ícono líder */
.af-ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--n-400);
  transition: color .18s; pointer-events: none; display: grid; place-items: center; }
.af-field:focus-within .af-ic { color: var(--brand); }
.af-ic svg { display: block; }
/* toggle ver contraseña */
.af-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; background: transparent; border-radius: 9px;
  display: grid; place-items: center; cursor: pointer; color: var(--n-400);
  transition: color .15s, background .15s; }
.af-eye:hover { color: var(--ink); background: var(--surface-2); }
.af-eye svg { display: block; }

/* caps lock */
.af-caps { display: none; align-items: center; gap: 7px; margin: 8px 2px 0;
  font-size: 12px; font-weight: 600; color: #B45309; }
.af-caps.on { display: flex; animation: auRise .25s ease forwards; }

/* labels superiores secundarios (forgot, etc.) */
.af-meta { display: flex; align-items: center; justify-content: flex-end; margin: -6px 2px 8px; }
.af-link { color: var(--brand); font-weight: 600; font-size: 13px; text-decoration: none; }
.af-link:hover { text-decoration: underline; }

/* ── Botón primario con brillo ── */
.au-btn { width: 100%; height: 54px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), #6366F1); color: #fff;
  font: inherit; font-size: 15.5px; font-weight: 700; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 10px 26px -10px rgba(79,70,229,.55); position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s, filter .18s; }
.au-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(79,70,229,.65); filter: brightness(1.04); }
.au-btn:active { transform: translateY(0); }
.au-btn:disabled { opacity: .8; cursor: default; transform: none; }
/* sheen sweep */
.au-btn::after { content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: left .6s; }
.au-btn:hover::after { left: 130%; }

/* ── Divider ── */
.auth__divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth__divider span { font-family: var(--mono); font-size: 11px; color: var(--n-400); white-space: nowrap; letter-spacing: .06em; }
.auth__divider i { flex: 1; height: 1px; background: var(--line); }

/* ── Botón Google ── */
.au-google { width: 100%; height: 52px; border: 1.5px solid var(--line-2); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 700; border-radius: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s; }
.au-google:hover { border-color: var(--n-300); background: var(--surface-2); transform: translateY(-1px); box-shadow: var(--sh-xs); }
.au-google svg { display: block; }

.au-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--n-600);
  background: var(--brand-tint); border: 1px solid var(--brand-tint-2); padding: 11px 14px; border-radius: 12px; }

.au-extra { margin-top: 26px; font-size: 14px; color: var(--n-500); }
.au-extra a { color: var(--brand); font-weight: 700; text-decoration: none; }
.au-extra a:hover { text-decoration: underline; }
.au-demo { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--n-500); }
.au-demo code { background: var(--surface-2); padding: 3px 8px; border-radius: 6px;
  font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
  transition: background .15s, border-color .15s; }
.au-demo code:hover { background: var(--brand-tint); border-color: var(--brand-tint-2); }

.flash--error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B;
  padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; margin-bottom: 18px; }

/* ════════════ PANEL VISUAL DERECHO ════════════ */
.auth__visual { flex: 1 1 50%; position: relative; overflow: hidden; border-left: 1px solid var(--line);
  background: linear-gradient(160deg, #F4F5FE, #E9EAF8); display: grid; place-items: center; }
/* aurora animada */
.auth__visual .aurora { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.auth__visual .aurora span { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; }
.auth__visual .aurora .b1 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(99,102,241,.5), transparent 70%); top: -120px; left: -100px; animation: auFloat1 14s ease-in-out infinite; }
.auth__visual .aurora .b2 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(124,58,237,.4), transparent 70%); bottom: -100px; right: -80px; animation: auFloat2 17s ease-in-out infinite; }
.auth__visual .aurora .b3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(56,189,248,.32), transparent 70%); top: 40%; left: 55%; animation: auFloat1 20s ease-in-out infinite reverse; }
@keyframes auFloat1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,30px) scale(1.1); } }
@keyframes auFloat2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-36px,-26px) scale(1.12); } }

.auth__visual-in { position: relative; z-index: 1; text-align: center; max-width: 600px; width: 100%; padding: 40px 36px; }
.av-mono { display: inline-flex; margin-bottom: 26px; }

/* tarjeta showcase con parallax */
/* Mockup de correo: la firma se ve DENTRO de un mail (contexto real) */
.av-mail { background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 70px -28px rgba(79,70,229,.35), var(--sh); text-align: left; overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.7,.3,1); will-change: transform; }
.av-mail__bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #F6F8FC; border-bottom: 1px solid var(--line); }
.av-mail__bar img { height: 15px; width: auto; }
.av-mail__title { font-size: 12px; font-weight: 700; color: var(--ink); flex: 1; }
.av-mail__dots { display: flex; gap: 5px; }
.av-mail__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--n-300); }
.av-mail__head { padding: 2px 16px; }
.av-mail__row { display: flex; gap: 8px; font-size: 12px; color: var(--n-600); padding: 9px 0; border-bottom: 1px solid var(--line); }
.av-mail__row span { color: var(--n-400); min-width: 46px; }
.av-mail__body { padding: 16px; }
.av-mail__text { font-size: 13px; color: var(--n-600); line-height: 1.6; margin: 0 0 14px; }
.av-mail__chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 11px; font-weight: 600;
  color: var(--brand); background: var(--brand-tint, #EEF1FF); border: 1px solid #D9DEFF; padding: 6px 11px; border-radius: 999px; }
.av-mail__chip .tick { width: 17px; height: 17px; border-radius: 50%; background: var(--ok, #059669); display: grid; place-items: center; flex: none; }
/* carrusel de firmas (crossfade · grid-stack: alto = firma más alta, sin encimes ni colapso) */
.av-stack { display: grid; }
.av-slide { grid-area: 1 / 1; min-width: 0; opacity: 0; transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease; pointer-events: none; }
.av-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.av-confid { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 9.5px; line-height: 1.5; color: var(--n-400); }

/* dots */
.av-dots { display: flex; gap: 7px; justify-content: center; margin-top: 22px; }
.av-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--n-300); border: none; cursor: pointer; padding: 0;
  transition: background .2s, width .2s; }
.av-dot.on { background: var(--brand); width: 22px; border-radius: 5px; }

/* toast aplicada */
.av-toast { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 13px; box-shadow: var(--sh-md); font-size: 14px; font-weight: 600;
  margin-top: 24px; opacity: 0; transform: translateY(10px); }
.av-toast.on { animation: auPop .5s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes auPop { to { opacity: 1; transform: none; } }
.av-toast .tick { width: 20px; height: 20px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; flex: none; }

.av-foot { display: inline-flex; align-items: center; gap: 9px; justify-content: center; margin-top: 26px; }
.av-foot .lbl { font-family: var(--mono); font-size: 11px; color: var(--n-400); }
.av-foot .gw { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--n-600); }
.av-tagline { margin-top: 14px; font-size: 14px; line-height: 1.6; color: var(--n-500); }

@media (max-width: 920px) {
  .auth__visual { display: none; }
  .auth__form { flex: 1 1 100%; padding: 32px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .au-rise, .av-toast.on { animation: none; opacity: 1; transform: none; }
  .auth__visual .aurora span { animation: none; }
  .av-slide { transition: opacity .3s; }
}
