/* ===================================================================
   LOGIN.CSS
   Estilos exclusivos de la pantalla de login (fragua + formulario).
   Las variables, tipografía general, .field, .form-control, .btn-forge
   y .error-box viven en base.css porque se reutilizan en otras pantallas.
   =================================================================== */

/* ---------- PANEL IZQUIERDO: LA FRAGUA ---------- */
.forge{
  position: relative;
  background: radial-gradient(120% 140% at 15% 85%, #2A2F35 0%, var(--iron) 45%, #0E1013 100%);
  color: var(--on-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  overflow: hidden;
  min-height: 100%;
}

.forge::before{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 20% 100%, rgba(181, 72, 15, 0.35) 0%, transparent 70%);
  pointer-events: none;
  animation: glow 6s ease-in-out infinite;
}

@keyframes glow{
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.ember-particle{
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ember-bright);
  box-shadow: 0 0 6px 2px rgba(240, 129, 46, 0.7);
  opacity: 0;
  animation: rise 5s ease-in infinite;
}

@keyframes rise{
  0%{ transform: translateY(0) translateX(0); opacity: 0; }
  10%{ opacity: 1; }
  100%{ transform: translateY(-70vh) translateX(var(--drift, 20px)); opacity: 0; }
}

.brand{
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

.brand-mark{
  height: 52px;
  color: var(--on-dark);
}

.forge-copy{
  position: relative;
  z-index: 2;
  max-width: 430px;
}

.forge-copy h1{
  font-size: 42px;
  line-height: 1.12;
  margin: 0 0 20px;
}

.forge-copy p{
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-dark-dim);
  margin: 0;
}

.horseshoe-wrap{
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
}

.horseshoe path{
  fill: none;
  stroke: var(--brass);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: forge-draw 1.8s cubic-bezier(.65,0,.35,1) 0.3s forwards;
}

.horseshoe circle{
  fill: var(--iron);
  stroke: var(--brass);
  stroke-width: 2;
  opacity: 0;
  animation: nail-in 0.4s ease-out forwards;
}
.horseshoe circle:nth-of-type(1){ animation-delay: 1.9s; }
.horseshoe circle:nth-of-type(2){ animation-delay: 2.0s; }
.horseshoe circle:nth-of-type(3){ animation-delay: 2.1s; }
.horseshoe circle:nth-of-type(4){ animation-delay: 2.2s; }
.horseshoe circle:nth-of-type(5){ animation-delay: 2.3s; }
.horseshoe circle:nth-of-type(6){ animation-delay: 2.4s; }

@keyframes forge-draw{
  to{ stroke-dashoffset: 0; }
}
@keyframes nail-in{
  from{ opacity: 0; transform: scale(0); transform-origin: center; }
  to{ opacity: 1; transform: scale(1); }
}

/* ---------- PANEL DERECHO: EL FORMULARIO ---------- */
.bench{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  min-height: 100%;
}

.form-card{
  width: 100%;
  max-width: 380px;
}

.form-card h2{
  font-size: 30px;
  margin: 0 0 8px;
}

.form-card .sub{
  font-size: 14px;
  color: var(--ink-faint);
  margin: 0 0 36px;
}

@media (prefers-reduced-motion: reduce){
  .horseshoe path, .horseshoe circle, .ember-particle, .forge::before{
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 1 !important;
  }
}

.form-card .foot-note{
  margin-top: 20px;
}

.foot-note-sep{
  margin: 0 8px;
  opacity: 0.5;
}

@media (max-width: 991.98px){
  .forge{ display: none; }
}