/* ============================================================
   EH Login — pantallas de acceso (login y recuperación de clave)
   Variante oscura "glass" sobre el lenguaje visual de ClickUp.
   La carga SOLO resources/views/auth/eh-auth.blade.php; no toca
   el tema del panel (eh-theme.css).
   Medidas relevadas del login real de ClickUp: campo 40px radio 8,
   botón 40px radio 8 / 14px-500, columna de 400px, aurora superior.
   ============================================================ */

/* Tipografía de marca, servida del proyecto (misma declaración que eh-theme.css:
   esta pantalla no carga el tema del panel). */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk/latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk/latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.eh-auth {
  --marca:#6366f1; --marca-dark:#4f46e5; --marca-claro:#a5b4fc;
  --texto-1:#fff; --texto-2:rgba(255,255,255,.66); --texto-3:rgba(255,255,255,.45);
  --borde:rgba(255,255,255,.14); --hover:rgba(255,255,255,.1);
  --rojo:#ff8a8f; --verde:#4ade80; --ambar:#fbbf24;
  --a1:#22d3ee; --a2:#6366f1; --a3:#8b5cf6; --a4:#14b8a6;

  margin:0; min-height:100vh; position:relative; overflow-x:hidden;
  background:#0e1222; color:var(--texto-1);
  font-family:-apple-system,"system-ui","Segoe UI",roboto,"Helvetica Neue",helvetica,arial,sans-serif;
  font-size:13px; -webkit-font-smoothing:antialiased;
  display:grid; place-items:center; padding:40px 20px 60px;
}
.eh-auth, .eh-auth *, .eh-auth *::before, .eh-auth *::after { box-sizing:border-box; }

/* ── Aurora: blobs difuminados que derivan lento ──────────────────────── */
.eh-aurora { position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
.eh-aurora i {
  position:absolute; display:block; border-radius:50%;
  filter:blur(90px); opacity:.52; will-change:transform;
  animation:eh-deriva 22s ease-in-out infinite alternate;
}
.eh-aurora i:nth-child(1){ width:720px; height:420px; left:-10%; top:-16%; background:var(--a1); animation-duration:26s; }
.eh-aurora i:nth-child(2){ width:640px; height:400px; left:18%;  top:-10%; background:var(--a2); animation-duration:19s; animation-delay:-4s; }
.eh-aurora i:nth-child(3){ width:680px; height:420px; left:46%;  top:-14%; background:var(--a3); animation-duration:23s; animation-delay:-8s; }
.eh-aurora i:nth-child(4){ width:600px; height:400px; right:-4%; top:-6%;  background:var(--a4); animation-duration:29s; animation-delay:-2s; opacity:.42; }
.eh-aurora::after { content:""; position:absolute; inset:0;
  background:radial-gradient(120% 70% at 50% 0%, rgba(14,18,34,0) 0%, rgba(14,18,34,.72) 55%, #0e1222 85%); }
@keyframes eh-deriva {
  0%   { transform:translate3d(0,0,0) scale(1); }
  50%  { transform:translate3d(4%,3%,0) scale(1.12); }
  100% { transform:translate3d(-3%,6%,0) scale(1.04); }
}

/* ── Card de vidrio ───────────────────────────────────────────────────── */
.eh-auth-caja {
  position:relative; z-index:2; width:100%; max-width:432px; padding:32px;
  background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.1); border-radius:16px;
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  box-shadow:0 30px 70px -25px rgba(0,0,0,.8);
}

/* entrada escalonada de los bloques */
.eh-anim > * { opacity:0; transform:translateY(10px); animation:eh-sube .5s cubic-bezier(.2,.7,.3,1) forwards; }
.eh-anim > *:nth-child(1){animation-delay:.02s} .eh-anim > *:nth-child(2){animation-delay:.07s}
.eh-anim > *:nth-child(3){animation-delay:.12s} .eh-anim > *:nth-child(4){animation-delay:.17s}
.eh-anim > *:nth-child(5){animation-delay:.22s} .eh-anim > *:nth-child(6){animation-delay:.27s}
.eh-anim > *:nth-child(7){animation-delay:.32s} .eh-anim > *:nth-child(8){animation-delay:.37s}
.eh-anim > *:nth-child(n+9){animation-delay:.42s}
@keyframes eh-sube { to { opacity:1; transform:none; } }

/* ── Marca (mismo cubo que el header del panel: .eh-logo de eh-theme) ─── */
.eh-marca-fila { display:flex; align-items:center; gap:10px; margin-bottom:22px; }
.eh-marca-cubo { width:42px; height:42px; border-radius:12px; display:grid; place-items:center;
  background:linear-gradient(135deg,#22d3ee 0%,#6366f1 50%,#8b5cf6 100%); color:#fff; box-shadow:0 6px 18px -4px rgba(99, 102, 241,.55);
  position:relative; overflow:hidden; flex:none; }
.eh-marca-cubo::after { content:""; position:absolute; inset:0;
  background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.45) 50%,transparent 65%);
  transform:translateX(-120%); animation:eh-brillo 4.5s ease-in-out 1.2s infinite; }
@keyframes eh-brillo { 0%,72%{transform:translateX(-120%)} 88%,100%{transform:translateX(120%)} }
.eh-marca-txt { font-family:"Space Grotesk",-apple-system,"system-ui","Segoe UI",roboto,sans-serif; font-size:15px; font-weight:400; letter-spacing:-.03em; line-height:1.15; }
.eh-marca-txt b { font-weight:700; }
.eh-marca-cubo img { width:62%; height:62%; display:block; }
.eh-marca-txt small { display:block; font-size:11.5px; font-weight:500; color:var(--texto-3); letter-spacing:.2px; }

/* Chip de rol */
.eh-rol-chip { display:inline-flex; align-items:center; gap:6px; height:24px; padding:0 10px;
  border-radius:12px; font-size:12px; font-weight:500; margin-bottom:14px;
  background:rgba(99, 102, 241,.18); border:1px solid rgba(99, 102, 241,.4); color:var(--marca-claro); }
.eh-rol-chip i { font-size:14px; }

/* Títulos */
.eh-auth-h1 { font-size:28px; font-weight:700; letter-spacing:-.7px; margin:0 0 6px; line-height:1.2; }
.eh-auth-sub { font-size:14px; color:var(--texto-2); margin:0 0 24px; line-height:1.5; }

/* ── Campos ───────────────────────────────────────────────────────────── */
.eh-campo { margin-bottom:14px; }
.eh-campo > label { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:500;
  color:var(--texto-3); margin-bottom:6px; }
.eh-campo > label i { font-size:14px; }
.eh-campo .link-der { margin-left:auto; color:var(--texto-2); text-decoration:none; font-weight:500; }
.eh-campo .link-der:hover { color:var(--marca-claro); text-decoration:underline; }
.eh-box { display:flex; align-items:center; gap:8px; height:40px; padding:0 10px;
  background:rgba(255,255,255,.06); border:1px solid var(--borde); border-radius:8px;
  transition:border-color .12s, box-shadow .12s; }
.eh-box:focus-within { border-color:#fff; box-shadow:0 0 0 3px rgba(99, 102, 241,.3); }
.eh-box.error { border-color:rgba(255,138,143,.6); }
.eh-box > i.pre { font-size:16px; color:var(--texto-3); flex:none; line-height:1; }
.eh-box:focus-within > i.pre { color:#fff; }
.eh-box input { flex:1; min-width:0; border:0; outline:0; background:transparent; font:inherit;
  font-size:14px; color:#fff; padding:0; }
.eh-box input::placeholder { color:rgba(255,255,255,.35); }
.eh-box input:read-only { color:var(--texto-2); cursor:default; }
/* el autofill de Chrome pinta el campo de blanco: lo forzamos al look oscuro */
.eh-box input:-webkit-autofill,
.eh-box input:-webkit-autofill:hover,
.eh-box input:-webkit-autofill:focus {
  -webkit-text-fill-color:#fff;
  -webkit-box-shadow:0 0 0 40px #23232b inset;
  caret-color:#fff;
}
.eh-ojo { border:0; background:transparent; padding:4px; margin-right:-4px; border-radius:6px;
  color:var(--texto-3); cursor:pointer; display:grid; place-items:center; line-height:1; }
.eh-ojo:hover { background:var(--hover); color:#fff; }
.eh-ojo i { font-size:17px; }
.eh-campo-error { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--rojo); margin-top:6px; }
.eh-campo-error i { font-size:14px; }

/* Recordarme */
.eh-fila-rec { display:flex; align-items:center; justify-content:space-between; margin:16px 0 18px; }
.eh-check { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--texto-2);
  cursor:pointer; user-select:none; }
.eh-check input { position:absolute; opacity:0; pointer-events:none; }
.eh-check .caja { width:16px; height:16px; border:1.5px solid rgba(255,255,255,.25); border-radius:5px;
  display:grid; place-items:center; transition:.12s; background:rgba(255,255,255,.08); flex:none; }
.eh-check .caja i { font-size:11px; color:#fff; opacity:0; transform:scale(.5); transition:.12s; }
.eh-check input:checked + .caja { background:var(--marca); border-color:var(--marca); }
.eh-check input:checked + .caja i { opacity:1; transform:none; }
.eh-check input:focus-visible + .caja { box-shadow:0 0 0 3px rgba(99, 102, 241,.4); }

/* ── Botón principal ──────────────────────────────────────────────────── */
.eh-btn-entrar { width:100%; height:40px; border:0; border-radius:8px; background:#fff; color:#111;
  font:inherit; font-size:14px; font-weight:500; cursor:pointer; position:relative;
  display:flex; align-items:center; justify-content:center; gap:7px; overflow:hidden;
  transition:transform .12s, box-shadow .12s, opacity .12s; }
.eh-btn-entrar:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 8px 24px -6px rgba(99, 102, 241,.6); }
.eh-btn-entrar:active:not(:disabled) { transform:translateY(0); }
.eh-btn-entrar:disabled { opacity:.4; cursor:not-allowed; }
.eh-btn-entrar i { font-size:16px; transition:transform .16s; }
.eh-btn-entrar:hover:not(:disabled) i { transform:translateX(3px); }
.eh-btn-entrar::after { content:""; position:absolute; inset:0;
  background:linear-gradient(115deg,transparent 40%,rgba(99, 102, 241,.25) 50%,transparent 60%);
  transform:translateX(-120%); }
.eh-btn-entrar:hover:not(:disabled)::after { transform:translateX(120%); transition:transform .7s ease; }

/* Botón secundario / volver */
.eh-btn-volver { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; height:38px;
  border:1px solid var(--borde); border-radius:8px; background:transparent; color:var(--texto-2);
  font:inherit; font-size:13px; font-weight:500; text-decoration:none; margin-top:10px; transition:.12s; }
.eh-btn-volver:hover { background:var(--hover); color:#fff; }
.eh-btn-volver i { font-size:15px; }

/* ── Pie ──────────────────────────────────────────────────────────────── */
.eh-auth-pie { margin-top:20px; font-size:13px; color:var(--texto-2); text-align:center; }
.eh-auth-pie a { color:var(--marca-claro); font-weight:500; text-decoration:none; }
.eh-auth-pie a:hover { text-decoration:underline; }
.eh-auth-legal { position:fixed; bottom:16px; left:0; right:0; text-align:center;
  font-size:11.5px; color:rgba(255,255,255,.3); z-index:1; pointer-events:none; }

/* ── Avisos ───────────────────────────────────────────────────────────── */
.eh-alert { display:flex; align-items:flex-start; gap:8px; padding:9px 11px; border-radius:8px;
  font-size:12.5px; line-height:1.45; margin-bottom:16px; }
.eh-alert i { font-size:15px; flex:none; margin-top:1px; }
.eh-alert.error { background:rgba(211,61,68,.16); border:1px solid rgba(211,61,68,.4); color:var(--rojo); }
.eh-alert.ok    { background:rgba(20, 184, 166,.16); border:1px solid rgba(20, 184, 166,.45); color:var(--verde); }
.eh-alert div + div { margin-top:2px; }

/* ── Medidor de fortaleza (pantallas de nueva contraseña) ─────────────── */
.eh-fuerza { display:flex; gap:4px; margin:12px 0 10px; }
.eh-fuerza span { flex:1; height:4px; border-radius:2px; background:rgba(255,255,255,.12); transition:background .2s; }
.eh-reqs { list-style:none; margin:0; padding:0; font-size:12px; color:var(--texto-3); }
.eh-reqs li { display:flex; align-items:center; gap:6px; margin-bottom:3px; transition:color .15s; }
.eh-reqs li i { font-size:14px; }
.eh-reqs li.ok { color:var(--verde); }
.eh-coincide { display:flex; align-items:center; gap:5px; font-size:12px; margin-top:6px; }
.eh-coincide i { font-size:14px; }
.eh-coincide.si { color:var(--verde); } .eh-coincide.no { color:var(--rojo); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width:520px) {
  .eh-auth { padding:24px 14px 50px; align-items:start; }
  .eh-auth-caja { padding:24px 20px; border-radius:14px; }
  .eh-auth-h1 { font-size:24px; }
}
@media (prefers-reduced-motion:reduce) {
  .eh-aurora i, .eh-marca-cubo::after { animation:none !important; }
  .eh-anim > * { animation:none !important; opacity:1; transform:none; }
  .eh-btn-entrar, .eh-btn-entrar i, .eh-btn-entrar::after { transition:none !important; }
}
