body.api-docs-auth-pending {
  background:
    radial-gradient(circle at top, rgba(15, 118, 190, 0.2), transparent 45%),
    linear-gradient(180deg, #08111f 0%, #0f172a 100%);
}

body.api-docs-auth-pending #redoc {
  display: none;
}

body.api-docs-auth-authenticated {
  background: #ffffff;
}

.api-docs-auth-shell {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 7, 18, 0.55);
  backdrop-filter: blur(10px);
}

.api-docs-auth-shell[hidden] {
  display: none !important;
}

.api-docs-auth-card {
  width: min(100%, 460px);
  padding: 32px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.35);
  color: #0f172a;
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.api-docs-auth-brand {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0f6fbe;
}

.api-docs-auth-title {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.2;
}

.api-docs-auth-lead {
  margin: 12px 0 0;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.6;
}

.api-docs-auth-meta {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.92rem;
  line-height: 1.55;
  word-break: break-word;
}

.api-docs-auth-form {
  margin-top: 22px;
}

.api-docs-auth-label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
}

.api-docs-auth-input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 1rem;
  color: #0f172a;
  background: #ffffff;
  box-sizing: border-box;
}

.api-docs-auth-input:focus {
  outline: 2px solid rgba(15, 111, 190, 0.18);
  border-color: #0f6fbe;
}

.api-docs-auth-error {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.93rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.api-docs-auth-submit {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0f6fbe 0%, #0a4f91 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.api-docs-auth-submit[disabled] {
  opacity: 0.75;
  cursor: wait;
}

.api-docs-auth-footnote {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.5;
}

.api-docs-auth-toolbar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1900;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.api-docs-auth-toolbar-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.api-docs-auth-toolbar-title {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.api-docs-auth-toolbar-user {
  font-size: 0.93rem;
  font-weight: 600;
}

.api-docs-auth-signout {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.api-docs-auth-signout:hover,
.api-docs-auth-signout:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

/* Shown on the sign-in screen only; after auth the sidebar footer label is used. */
.api-docs-version-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 2100;
  display: none;
  align-items: baseline;
  gap: 6px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: rgba(226, 232, 240, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  font: 600 11px/1.2 Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.02em;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

body.api-docs-auth-pending .api-docs-version-banner {
  display: inline-flex;
}

.api-docs-version-banner-label {
  color: #93c5fd;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.api-docs-version-banner strong {
  color: #f8fafc;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.api-docs-version-inline {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(38, 50, 56, 0.12);
  color: rgba(38, 50, 56, 0.72);
  font: 600 12px/1.4 Montserrat, "Segoe UI", Arial, sans-serif;
}

.api-docs-version-inline strong {
  color: #263238;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .api-docs-auth-card {
    padding: 24px;
    border-radius: 18px;
  }

  .api-docs-auth-toolbar {
    top: auto;
    right: 12px;
    left: 12px;
    bottom: 12px;
    border-radius: 18px;
    justify-content: space-between;
  }
}
