/* Mismo lenguaje visual que el login de Hub (Tailwind: slate-950, #008fd0, #36b8f5). */
:root {
  --fondo: #020617;
  --texto: #ffffff;
  --texto-2: #cbd5e1;
  --texto-3: #94a3b8;
  --texto-4: #64748b;
  --borde: rgba(255, 255, 255, 0.1);
  --tarjeta: rgba(255, 255, 255, 0.05);
  --azul: #008fd0;
  --azul-claro: #36b8f5;
  --azul-oscuro: #0073c5;
  --error: #fca5a5;
  --ok: #34d399;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100dvh; }
body {
  background: var(--fondo);
  color: var(--texto);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

.fondo { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.orbe { position: absolute; border-radius: 9999px; filter: blur(64px); }
.orbe-1 { top: -128px; right: -128px; width: 384px; height: 384px; background: rgba(0, 143, 208, 0.15); }
.orbe-2 { bottom: -128px; left: -128px; width: 384px; height: 384px; background: rgba(6, 182, 212, 0.10); }
.orbe-3 { top: 50%; left: 50%; width: 600px; height: 600px; transform: translate(-50%, -50%); background: rgba(0, 143, 208, 0.05); }
.grilla {
  position: absolute; inset: 0; opacity: 0.03;
  background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 64px 64px;
}

.contenedor { position: relative; z-index: 1; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 32px; animation: aparecer .4s ease-out; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .contenedor { animation: none; } }

.marca { text-align: center; }
.logo {
  display: inline-flex; align-items: center; justify-content: center; padding: 12px; border-radius: 16px;
  background: linear-gradient(to bottom right, var(--azul), var(--azul-claro));
  box-shadow: 0 10px 15px -3px rgba(0, 143, 208, .25);
}
.logo svg { width: 32px; height: 32px; color: #fff; }
.marca h1 { margin: 12px 0 0; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.025em; }
.marca .sub { margin: 4px 0 0; font-size: 14px; color: var(--texto-3); }

.tarjeta {
  border: 1px solid var(--borde); background: var(--tarjeta); border-radius: 12px; padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .2);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.tarjeta h2 { margin: 0; font-size: 18px; font-weight: 600; }
.tarjeta .desc { margin: 4px 0 24px; font-size: 14px; color: var(--texto-3); }
.tarjeta .desc strong { color: #e2e8f0; font-weight: 500; word-break: break-all; }

form { display: flex; flex-direction: column; }
label { font-size: 14px; font-weight: 500; color: var(--texto-2); margin: 16px 0 8px; }
form > label:first-of-type, .alerta + label { margin-top: 0; }
.fila { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.fila label { margin: 0; }
input {
  height: 40px; width: 100%; border-radius: 6px; border: 1px solid var(--borde); background: rgba(255,255,255,.05);
  color: var(--texto); padding: 8px 12px; font-size: 14px; font-family: inherit; outline: none;
}
input::placeholder { color: var(--texto-4); }
input:focus-visible { box-shadow: 0 0 0 2px rgba(0, 143, 208, .5); }
input:disabled { opacity: .5; }
input.codigo { text-align: center; font-size: 24px; letter-spacing: .1em; height: 48px; }

button { font-family: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primario {
  margin-top: 24px; height: 40px; border: 0; border-radius: 6px; color: #fff; font-size: 14px; font-weight: 500;
  background: linear-gradient(to right, var(--azul-oscuro), var(--azul));
  box-shadow: 0 10px 15px -3px rgba(0, 143, 208, .25);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.primario:hover:not(:disabled) { background: linear-gradient(to right, var(--azul), var(--azul-claro)); }
.fantasma { margin-top: 8px; height: 40px; border: 0; border-radius: 6px; background: transparent; color: var(--texto-3); font-size: 14px; }
.fantasma:hover { color: #fff; background: rgba(255,255,255,.05); }
.link { margin-top: 12px; background: none; border: 0; color: var(--texto-3); font-size: 14px; transition: color .15s; }
.link:hover { color: var(--azul-claro); }
.link.chico { margin: 0; font-size: 12px; color: var(--azul-claro); }
.link.chico:hover { color: #fff; }
.link.chico:disabled { color: var(--texto-4); }

.alerta { border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; border: 1px solid rgba(239, 68, 68, .3); background: rgba(239, 68, 68, .1); color: var(--error); }
.alerta.ok { border-color: rgba(16, 185, 129, .3); background: rgba(16, 185, 129, .1); color: #6ee7b7; }

.reglas { margin: 12px 0 0; padding-left: 18px; font-size: 12px; color: var(--texto-4); }
.reglas li { margin: 2px 0; }
.reglas li.cumple { color: var(--ok); }

.giro { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.pie { text-align: center; font-size: 12px; color: #475569; }
