/* ===============================
   HELIXOS LOGIN MODULE
   =============================== */

.login-modal {
  width: min(470px, 92vw);
  background: linear-gradient(180deg, #111111 0%, #0b0b0b 100%);
  border: 1px solid rgba(240,156,58,0.22);
  border-radius: 22px;

  box-shadow:
    0 32px 100px rgba(0,0,0,0.58),
    0 0 0 1px rgba(255,255,255,0.03) inset;

  overflow: hidden;
  color: #fff;
  position: relative;
}

.login-modal::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    radial-gradient(circle at 50% 0%, rgba(240,156,58,0.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 16%);

  pointer-events: none;
}

/* ===============================
   HEADER
   =============================== */

.login-modal-header {
  height: 74px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.10em;
  text-transform: uppercase;

  background: linear-gradient(180deg, #191919, #111111);
  border-bottom: 1px solid rgba(255,255,255,0.05);

  position: relative;
}

.login-modal-header .hdr-helix {
  color: #ffffff;
}

.login-modal-header .hdr-os {
  color: var(--accent);
  margin-left: 0.02em;

  text-shadow: 0 0 14px rgba(240,156,58,0.28);
}

.login-modal-header::after {
  content: "";

  position: absolute;
  left: 50%;
  bottom: 0;

  width: 120px;
  height: 2px;

  transform: translateX(-50%);

  background: linear-gradient(
    90deg,
    transparent,
    rgba(240,156,58,0.95),
    transparent
  );

  box-shadow: 0 0 14px rgba(240,156,58,0.38);
}

/* ===============================
   BODY
   =============================== */

.login-modal-body {
  padding: 30px 30px 26px;
  position: relative;
  z-index: 1;
}

/* ===============================
   STEPS
   =============================== */

.login-step {
  display: none;
}

.login-step.active {
  display: block;
  animation: fadeInUp 0.25s ease;
}

/* ===============================
   FORM FIELDS
   =============================== */

.login-field-wrap {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.login-field {
  height: 62px;
  border-radius: 16px;

  border: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(180deg, #171717, #111111);

  color: #ededed;
  font-size: 16px;
  font-weight: 700;

  padding: 0 20px;

  outline: none;

  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.login-field:focus {
  border-color: rgba(240,156,58,0.55);

  box-shadow:
    0 0 0 3px rgba(240,156,58,0.12),
    inset 0 1px 0 rgba(255,255,255,0.04);

  transform: translateY(-1px);
}

.login-field::placeholder {
  color: #777;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ===============================
   PRIMARY BUTTON
   =============================== */

.login-primary-btn {
  width: 100%;
  height: 60px;

  border: none;
  border-radius: 16px;

  background: linear-gradient(
    180deg,
    #f6c26d 0%,
    #f09c3a 58%,
    #d9821b 100%
  );

  color: #111;

  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;

  cursor: pointer;
  text-transform: uppercase;

  box-shadow:
    0 14px 28px rgba(240,156,58,0.26),
    inset 0 1px 0 rgba(255,255,255,0.30);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.login-primary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);

  box-shadow:
    0 18px 32px rgba(240,156,58,0.30),
    inset 0 1px 0 rgba(255,255,255,0.30);
}

/* ===============================
   FOOTER LINKS
   =============================== */

.login-footer-links {
  margin-top: 14px;

  display: flex;
  justify-content: space-between;
  gap: 12px;

  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-footer-links button {
  background: none;
  border: none;

  color: rgba(240,156,58,0.88);

  cursor: pointer;
  padding: 0;

  font-weight: 800;
}

/* ===============================
   HELPER TEXT
   =============================== */

.login-helper {
  font-size: 13px;
  color: #bdbdbd;

  line-height: 1.5;
  text-align: center;

  margin-bottom: 18px;
}

/* ===============================
   PIN DISPLAY
   =============================== */

.pin-display {
  display: flex;
  justify-content: center;
  gap: 14px;

  margin-bottom: 22px;
  min-height: 44px;
}

.pin-digit-box {
  width: 34px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-bottom: 2px solid rgba(255,255,255,0.10);

  color: #ffffff;
  font-size: 28px;
  font-weight: 800;

  letter-spacing: 0.02em;

  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.pin-digit-box.filled {
  border-bottom-color: rgba(240,156,58,0.85);

  color: #f6c26d;

  text-shadow: 0 0 12px rgba(240,156,58,0.24);
}

.pin-digit-box.pop {
  animation: pinPop 0.24s ease;
}

@keyframes pinPop {
  0% {
    transform: translateY(8px) scale(0.92);
    opacity: 0.5;
  }

  60% {
    transform: translateY(-2px) scale(1.08);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ===============================
   PIN KEYPAD
   =============================== */

.pin-grid {
  width: 234px;
  margin: 0 auto 20px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;

  overflow: hidden;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.02),
    rgba(255,255,255,0.01)
  );

  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.pin-btn,
.pin-clear {
  height: 58px;

  border: 1px solid rgba(255,255,255,0.05);

  background: transparent;

  color: #f0f0f0;
  font-size: 20px;
  font-weight: 800;

  cursor: pointer;

  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.pin-clear {
  grid-column: span 2;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.pin-btn:hover,
.pin-clear:hover {
  background: rgba(240,156,58,0.10);
  color: #fff;
}

/* ===============================
   STATUS
   =============================== */

.login-status {
  min-height: 18px;
  margin-bottom: 12px;

  text-align: center;
  font-size: 13px;

  color: #f6c26d;
}

/* ===============================
   ERROR SHAKE
   =============================== */

.shake {
  animation: modalShake 0.42s ease;
}

@keyframes modalShake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
  100% { transform: translateX(0); }
}