@import url('./ui-polish.css');

.admin-auth-locked {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 15% 20%, rgb(245 158 11 / 12%), transparent 30%),
    radial-gradient(circle at 85% 80%, rgb(37 99 235 / 10%), transparent 34%),
    #f7f8fa;
}

.auth-gate__card {
  inline-size: min(100%, 460px);
  padding: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgb(15 23 42 / 12%);
  text-align: center;
}

.auth-gate__brand {
  display: grid;
  place-items: center;
  inline-size: 52px;
  block-size: 52px;
  margin-inline: auto;
  margin-block-end: 18px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.auth-gate__eyebrow {
  display: block;
  margin-block-end: 8px;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-gate h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.2;
}

.auth-gate p {
  margin: 14px 0 0;
  color: #4b5563;
  line-height: 1.6;
}

.auth-gate__identity {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.auth-gate__actions {
  display: grid;
  gap: 12px;
  margin-block-start: 24px;
}

.auth-gate__form {
  display: grid;
  gap: 14px;
  text-align: start;
}

.auth-gate__field {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.auth-gate__field input {
  inline-size: 100%;
  min-block-size: 46px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: #111827;
  font: inherit;
  font-weight: 500;
}

.auth-gate__field input:hover {
  border-color: #9ca3af;
}

.auth-gate__field input:focus {
  border-color: #b45309;
  outline: 3px solid rgb(245 158 11 / 22%);
  outline-offset: 1px;
}

.auth-gate__button {
  inline-size: 100%;
  min-block-size: 46px;
  border: 0;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.auth-gate__button:hover {
  background: #1f2937;
}

.auth-gate__button:focus-visible {
  outline: 3px solid rgb(245 158 11 / 45%);
  outline-offset: 3px;
}

.auth-gate__button--secondary {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
}

.auth-gate__button--secondary:hover {
  background: #f9fafb;
}

.auth-gate__divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: #9ca3af;
  font-size: 12px;
  text-transform: uppercase;
}

.auth-gate__divider::before,
.auth-gate__divider::after {
  block-size: 1px;
  background: #e5e7eb;
  content: '';
}

.auth-gate__boundary {
  padding-block-start: 18px;
  border-block-start: 1px solid #e5e7eb;
  font-size: 12px;
}

.auth-gate code {
  border-radius: 5px;
  background: #f3f4f6;
  padding: 2px 5px;
  color: #374151;
}

@media (max-width: 520px) {
  .auth-gate {
    place-items: start center;
    padding: 14px;
  }

  .auth-gate__card {
    padding: 28px 22px;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-gate *,
  .auth-gate *::before,
  .auth-gate *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* KePixel mobile authentication layout */
@media (max-width: 520px) {
  .auth-gate {
    min-block-size: 100svh;
    padding:
      max(14px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }

  .auth-gate__field input {
    min-block-size: 48px;
    font-size: 16px;
  }

  .auth-gate__button {
    min-block-size: 48px;
  }

  .auth-gate__boundary {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 360px) {
  .auth-gate__card {
    padding: 24px 16px;
  }

  .auth-gate__brand {
    inline-size: 46px;
    block-size: 46px;
  }
}
