/* =====================================================================
   Pantalla de ingreso
   ===================================================================== */
body.login {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Panel de marca ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px 48px;
  background: radial-gradient(120% 80% at 0% 0%, #06224A 0%, var(--bg) 62%);
  border-right: 1px solid var(--line);
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none; }
.orb-1 { width: 460px; height: 460px; background: var(--azul-claro); top: -160px; left: -120px; animation: flotar 14s ease-in-out infinite; }
.orb-2 { width: 380px; height: 380px; background: var(--morado); bottom: -180px; right: -100px; opacity: .35; animation: flotar 18s ease-in-out infinite reverse; }
.grid-lines {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 50%, #000 30%, transparent 100%);
  opacity: .5;
}
@keyframes flotar { 50% { transform: translate(40px, 30px) scale(1.08); } }

.hero-top { position: relative; display: flex; justify-content: space-between; align-items: center; }
.clock { text-align: right; }
.clock span { display: block; font: 700 28px var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.clock small { display: block; color: var(--text-2); }
.clock small::first-letter { text-transform: uppercase; }

.hero-copy { position: relative; max-width: 520px; }
.eyebrow { color: var(--azul-claro); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; margin: 0 0 14px; }
.hero h1 { font-size: clamp(34px, 4vw, 54px); line-height: 1.05; font-weight: 800; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--azul-claro), var(--morado));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--text-2); font-size: 18px; margin: 18px 0 0; }

.tickets { position: relative; height: 230px; }
.ticket {
  position: absolute; width: 228px; padding: 16px;
  background: rgba(10,27,61,.72); backdrop-filter: blur(14px);
  border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--sombra);
  animation: aparecer .8s cubic-bezier(.2,.8,.2,1) both, mecer 7s ease-in-out infinite;
}
.t1 { left: 0;     top: 70px; animation-delay: .2s, 1s; }
.t2 { left: 244px; top: 0;    animation-delay: .4s, 2s; }
.t3 { left: 488px; top: 60px; animation-delay: .6s, 3s; }
@keyframes aparecer { from { opacity: 0; transform: translateY(30px); } }
@keyframes mecer    { 50% { transform: translateY(-8px); } }
.ticket-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-family: var(--f-display); }
.ticket ul { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; font-size: 14px; }
.ticket li span { color: var(--azul-claro); font-weight: 700; margin-right: 4px; }
.ticket-bar { height: 5px; border-radius: 9px; background: var(--line-2); overflow: hidden; }
.ticket-bar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--azul-claro), var(--morado)); animation: llenar 2s ease both 1s; }
@keyframes llenar { from { width: 0; } }
.ticket-big { display: block; font: 800 26px var(--f-display); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.spark { width: 100%; height: 34px; }
.spark polyline { stroke: var(--ok); stroke-width: 2.5; fill: none; stroke-dasharray: 200; stroke-dashoffset: 200; animation: trazo 2s ease forwards 1.2s; }
@keyframes trazo { to { stroke-dashoffset: 0; } }

/* ---------- Panel de ingreso ---------- */
.panel { position: relative; display: grid; place-items: center; padding: 32px 16px; }
.card { width: 100%; max-width: 400px; animation: aparecer .6s ease both; }
.card h2 { font-size: 30px; }
.card > .muted { margin: 4px 0 24px; }
.brand-mobile { display: none; margin-bottom: 28px; }
.brand-hero .brand-logo { height: 46px; }
.brand-mobile .brand-logo { height: 40px; }

.segmented {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; margin-bottom: 24px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
}
.seg { position: relative; z-index: 1; height: 42px; border: 0; background: none; border-radius: 10px; font-weight: 600; color: var(--text-2); transition: color .25s; }
.seg.activo { color: var(--text); }
.seg-indicador {
  position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: 42px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px;
  transition: transform .35s cubic-bezier(.3,.9,.3,1);
}
.segmented[data-modo="password"] .seg-indicador { transform: translateX(100%); }

/* PIN */
.pin-dots { display: flex; justify-content: center; gap: 14px; height: 18px; margin: 6px 0 26px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); transition: all .2s; }
.pin-dots i.opc { opacity: .35; }
.pin-dots i.lleno { background: var(--azul-claro); border-color: var(--azul-claro); opacity: 1; transform: scale(1.1); box-shadow: 0 0 14px var(--brand-glow); }
.pin-dots.error i { border-color: var(--error); background: var(--error); }

.key { color: var(--text); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key {
  height: 68px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  font: 600 24px var(--f-display);
  transition: background .15s, transform .1s, border-color .15s;
  display: grid; place-items: center;
}
.key:hover  { background: var(--surface-2); border-color: var(--line-2); }
.key:active, .key.pulsada { transform: scale(.94); background: var(--surface-2); }
.key svg { width: 26px; height: 26px; }
.key-soft { background: transparent; color: var(--text-2); }
.key-go { background: var(--degradado); color: var(--sobre-brand); border: 0; box-shadow: 0 10px 28px -10px var(--brand-glow); }
.key-go:hover { background: var(--degradado); filter: brightness(1.08); }

.campo-pass { position: relative; }
.campo-pass input { padding-right: 52px; }
.ver-pass { position: absolute; right: 6px; top: 6px; width: 38px; height: 38px; border: 0; background: none; color: var(--text-3); border-radius: 8px; display: grid; place-items: center; }
.ver-pass svg { width: 20px; height: 20px; }
.ver-pass:hover { color: var(--text); }
#form-password .btn { margin-top: 8px; }

.mensaje { min-height: 22px; margin: 18px 0 0; text-align: center; color: var(--error); font-weight: 500; }
.temblar { animation: temblar .4s; }
@keyframes temblar { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }

/* Bienvenida */
.bienvenida {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px;
  background: var(--bg); opacity: 0; pointer-events: none; transition: opacity .35s;
}
.bienvenida.visible { opacity: 1; pointer-events: auto; }
.bienvenida h3 { font-size: 28px; }
.bienvenida p { color: var(--text-2); margin: 0; }
.check {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 12px;
  background: var(--degradado); color: var(--sobre-brand);
  box-shadow: 0 0 0 0 var(--brand-glow);
}
.bienvenida.visible .check { animation: latido 1s ease; }
.check svg { width: 40px; height: 40px; stroke-width: 3; stroke-dasharray: 30; stroke-dashoffset: 30; }
.bienvenida.visible .check svg { animation: trazo .5s ease forwards .2s; }
@keyframes latido { 0% { transform: scale(.6); box-shadow: 0 0 0 0 var(--brand-glow); } 60% { transform: scale(1.05); box-shadow: 0 0 0 24px transparent; } }

.pie { position: absolute; bottom: 16px; font-size: 12px; color: var(--text-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .t3 { display: none; } }
@media (max-width: 900px) {
  body.login { grid-template-columns: 1fr; }
  .hero { display: none; }
  .brand-mobile { display: flex; }
  .panel { min-height: 100vh; }
}
@media (max-width: 380px) { .key { height: 60px; } }
