:root {
  --bf-bg: #020711;
  --bf-bg-soft: #071527;

  --bf-card: rgba(14, 26, 43, 0.86);
  --bf-card-border: rgba(148, 185, 230, 0.18);

  --bf-input: rgba(4, 13, 26, 0.64);
  --bf-input-border: rgba(166, 196, 235, 0.24);
  --bf-input-border-focus: rgba(56, 189, 248, 0.68);

  --bf-text: #f8fafc;
  --bf-text-soft: #cbd5e1;
  --bf-muted: #94a3b8;

  --bf-blue: #2f80ed;
  --bf-blue-strong: #2563eb;
  --bf-cyan: #22d3ee;
  --bf-cyan-soft: rgba(34, 211, 238, 0.14);

  --bf-danger: #fb7185;
  --bf-warning: #f59e0b;

  --bf-radius-xl: 28px;
  --bf-radius-lg: 18px;
  --bf-radius-md: 14px;

  --bf-shadow-card: 0 30px 80px rgba(0, 0, 0, 0.42);
  --bf-shadow-blue: 0 18px 42px rgba(37, 99, 235, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--bf-text);
  background: var(--bf-bg);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(2, 7, 17, 0.96) 0%, rgba(2, 7, 17, 0.74) 46%, rgba(2, 7, 17, 0.94) 100%),
    radial-gradient(circle at 72% 18%, rgba(37, 99, 235, 0.24), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(14, 165, 233, 0.12), transparent 34%),
    linear-gradient(135deg, #020711 0%, #061426 48%, #020711 100%);
}

/* Fondo tipo data center / red tecnológica */
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 7, 17, 0.88) 0%, rgba(2, 7, 17, 0.38) 50%, rgba(2, 7, 17, 0.86) 100%),
    url("/img/auth/bluefox-hud-bg.png") center center / cover no-repeat;
  opacity: 0.82;
}

/* Si todavía no tienes la imagen bluefox-hud-bg.png, este overlay sostiene el diseño */
.login-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 38%, rgba(59, 130, 246, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(2, 7, 17, 0.18) 0%, rgba(2, 7, 17, 0.68) 100%);
  pointer-events: none;
}

.login-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.14) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 24%, black 76%, transparent 100%);
}

.login-bg-grid::before {
  content: "";
  position: absolute;
  right: -120px;
  top: 110px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(96, 165, 250, 0.025),
    0 0 0 140px rgba(96, 165, 250, 0.018);
}

.login-bg-grid::after {
  content: "";
  position: absolute;
  right: 0;
  top: 185px;
  width: 360px;
  height: 260px;
  opacity: 0.55;
  background-image:
    radial-gradient(circle, rgba(96, 165, 250, 0.65) 1px, transparent 1.5px);
  background-size: 18px 18px;
}

.login-bg-glow {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(38px);
}

.login-bg-glow-one {
  left: 9%;
  bottom: 12%;
  width: 320px;
  height: 120px;
  background: rgba(14, 165, 233, 0.12);
}

.login-bg-glow-two {
  right: 17%;
  top: 16%;
  width: 280px;
  height: 170px;
  background: rgba(37, 99, 235, 0.14);
}

.login-layout {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 56px 56px;
  display: grid;
  grid-template-columns: minmax(380px, 1fr) 470px;
  align-items: center;
  gap: 86px;
}

.login-brand-side {
  max-width: 560px;
  display: grid;
  justify-content: start;
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 48px;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 16px rgba(34, 211, 238, 0.34))
    drop-shadow(0 0 30px rgba(37, 99, 235, 0.24));
}

.brand-copy {
  display: grid;
  gap: 8px;
}

.brand-name {
  color: #ffffff;
  font-size: 2rem;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.brand-product {
  color: var(--bf-cyan);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.48em;
}

.hero-line {
  width: 58px;
  height: 3px;
  margin-bottom: 34px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bf-cyan), var(--bf-blue-strong));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.34);
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 510px;
  color: #ffffff;
  font-size: clamp(2.05rem, 2.25vw, 2.65rem);
  line-height: 1.28;
  letter-spacing: -0.045em;
  font-weight: 500;
}

.hero-copy h1 span {
  color: var(--bf-cyan);
  font-weight: 800;
  text-shadow: 0 0 22px rgba(34, 211, 238, 0.22);
}

.hero-copy p {
  margin: 0;
  max-width: 470px;
  color: rgba(203, 213, 225, 0.78);
  font-size: 1.03rem;
  line-height: 1.72;
  font-weight: 500;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}

.feature-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 10px;
  color: rgba(241, 245, 249, 0.9);
  background: rgba(5, 14, 28, 0.52);
  border: 1px solid rgba(148, 185, 230, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 16px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.feature-pill i {
  color: var(--bf-cyan);
  font-size: 0.88rem;
}

.feature-pill span {
  font-size: 0.86rem;
  font-weight: 800;
}

.login-form-side {
  display: flex;
  justify-content: flex-end;
}

.login-card {
  width: 100%;
  max-width: 470px;
  padding: 42px;
  border-radius: var(--bf-radius-xl);
  color: var(--bf-text);
  background:
    linear-gradient(180deg, rgba(19, 34, 56, 0.9), rgba(10, 21, 38, 0.88));
  border: 1px solid var(--bf-card-border);
  box-shadow: var(--bf-shadow-card);
  backdrop-filter: blur(18px);
}

.login-card-header {
  margin-bottom: 28px;
}

.secure-badge {
  width: fit-content;
  min-height: 34px;
  padding: 0 16px;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  color: #7dd3fc;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.22);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 900;
}

.secure-badge i {
  font-size: 0.72rem;
}

.login-card-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 2.15rem;
  line-height: 1;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.login-card-header p {
  margin: 12px 0 0;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.96rem;
  line-height: 1.55;
  font-weight: 500;
}

.login-form {
  display: grid;
  gap: 20px;
}

.input-group {
  display: grid;
  gap: 9px;
}

.input-label {
  color: rgba(248, 250, 252, 0.9);
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 700;
}

.input-field-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(203, 213, 225, 0.68);
  font-size: 1rem;
  pointer-events: none;
}

.input-field {
  width: 100%;
  min-height: 58px;
  padding: 0 54px 0 54px;
  border-radius: 10px;
  border: 1px solid var(--bf-input-border);
  outline: none;
  color: #e5edf8;
  background: var(--bf-input);
  font-size: 0.98rem;
  font-weight: 500;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.input-field::placeholder {
  color: rgba(203, 213, 225, 0.55);
}

.input-field:hover:not(:disabled) {
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(4, 13, 26, 0.76);
}

.input-field:focus {
  border-color: var(--bf-input-border-focus);
  background: rgba(4, 13, 26, 0.86);
  box-shadow:
    0 0 0 4px rgba(14, 165, 233, 0.1),
    0 0 28px rgba(14, 165, 233, 0.08);
}

.input-field:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.toggle-password {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: rgba(203, 213, 225, 0.74);
  background: transparent;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background-color 0.18s ease;
}

.toggle-password:hover:not(:disabled) {
  color: #7dd3fc;
  background: rgba(37, 99, 235, 0.12);
}

.toggle-password:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-submit {
  width: 100%;
  min-height: 62px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #36a3ff 0%, #2563eb 100%);
  box-shadow: var(--bf-shadow-blue);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(37, 99, 235, 0.42);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.btn-arrow {
  font-size: 0.94rem;
}

.form-assurance {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  color: rgba(203, 213, 225, 0.76);
  font-size: 0.84rem;
  font-weight: 700;
}

.form-assurance span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.form-assurance span:last-child {
  justify-content: flex-end;
}

.form-assurance i {
  color: #38bdf8;
  font-size: 0.9rem;
}

.assurance-divider {
  width: 1px;
  height: 22px;
  background: rgba(148, 185, 230, 0.18);
}

/* Alertas */
.alert-box,
.countdown-lock,
.timeout-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  font-weight: 600;
}

.alert-box i,
.countdown-lock i,
.timeout-alert i {
  margin-top: 2px;
  flex-shrink: 0;
}

.alert-error,
.error-alert-unified {
  color: #fecdd3;
  background: rgba(127, 29, 29, 0.28);
  border: 1px solid rgba(251, 113, 133, 0.22);
}

.alert-info,
.info-alert-unified {
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.24);
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.countdown-lock,
.timeout-alert {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.28);
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.countdown-lock strong,
.timeout-alert strong {
  color: #fef3c7;
}

/* Responsive */
@media (max-width: 1180px) {
  .login-layout {
    width: min(100%, 1080px);
    grid-template-columns: minmax(340px, 1fr) 450px;
    gap: 54px;
    padding: 44px;
  }

  .hero-copy h1 {
    font-size: clamp(1.95rem, 2.6vw, 2.35rem);
  }

  .login-card {
    max-width: 450px;
    padding: 38px;
  }
}

@media (max-width: 920px) {
  .login-layout {
    min-height: 100vh;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 36px;
    padding: 32px 22px;
  }

  .login-brand-side {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    justify-content: center;
  }

  .brand-block {
    justify-content: center;
    margin-bottom: 30px;
  }

  .hero-line {
    margin-inline: auto;
    margin-bottom: 26px;
  }

  .hero-copy h1,
  .hero-copy p {
    margin-inline: auto;
  }

  .feature-pills {
    justify-content: center;
    margin-top: 28px;
  }

  .login-form-side {
    justify-content: center;
  }

  .login-card {
    max-width: 470px;
  }
}

@media (max-width: 620px) {
  .login-layout {
    padding: 24px 16px;
    gap: 28px;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
  }

  .brand-name {
    font-size: 1.45rem;
  }

  .brand-product {
    font-size: 0.76rem;
  }

  .hero-copy h1 {
    font-size: 1.8rem;
    line-height: 1.26;
  }

  .hero-copy p {
    font-size: 0.94rem;
  }

  .feature-pills {
    display: none;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .secure-badge {
    min-height: 30px;
    font-size: 0.68rem;
  }

  .login-card-header h2 {
    font-size: 1.8rem;
  }

  .login-card-header p {
    font-size: 0.9rem;
  }

  .input-field,
  .btn-submit {
    min-height: 54px;
  }

  .form-assurance {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-assurance span,
  .form-assurance span:last-child {
    justify-content: center;
  }

  .assurance-divider {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .login-layout {
    padding: 18px 12px;
  }

  .brand-block {
    margin-bottom: 22px;
  }

  .hero-copy h1 {
    font-size: 1.55rem;
  }

  .login-card {
    padding: 24px 18px;
  }
}