.auth-gate-pending body {
  visibility: hidden;
}

.auth-gate-ready body {
  visibility: visible;
}

.auth-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(34, 114, 255, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(9, 23, 44, 0.9), rgba(10, 18, 34, 0.96));
  backdrop-filter: blur(12px);
}

.auth-gate-card {
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 70px rgba(6, 18, 38, 0.35);
  color: #173156;
}

.auth-gate-lock {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1d7df2 0%, #0f5fcc 100%);
  color: #fff;
  box-shadow: 0 16px 28px rgba(15, 95, 204, 0.24);
  font-size: 1.5rem;
}

.auth-gate-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.1;
}

.auth-gate-text {
  margin: 0 0 22px;
  color: #5e7396;
  line-height: 1.65;
}

.auth-gate-otp {
  display: grid;
  gap: 14px;
}

.auth-gate-inputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.auth-gate-input {
  width: 100%;
  min-height: 68px;
  padding: 0;
  border: 1px solid rgba(99, 123, 167, 0.22);
  border-radius: 18px;
  background: #fff;
  color: #173156;
  text-align: center;
  font: inherit;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-gate-input:focus {
  border-color: #1d7df2;
  box-shadow: 0 0 0 4px rgba(29, 125, 242, 0.16);
  transform: translateY(-1px);
}

.auth-gate-input.is-error {
  border-color: #d84c4c;
  box-shadow: 0 0 0 4px rgba(216, 76, 76, 0.12);
}

.auth-gate-error {
  min-height: 22px;
  margin: 0;
  color: #c53d3d;
  font-size: 0.95rem;
  font-weight: 700;
}

.auth-gate-hint {
  margin: 0;
  color: #7a8da9;
  font-size: 0.9rem;
}

@media (max-width: 540px) {
  .auth-gate-overlay {
    padding: 16px;
  }

  .auth-gate-card {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .auth-gate-inputs {
    gap: 10px;
  }

  .auth-gate-input {
    min-height: 58px;
    border-radius: 14px;
  }
}
