body.resource-auth-pending > :not(.resource-auth-layer) {
  visibility: hidden;
}

body.resource-auth-ready {
  padding-top: 68px;
}

.resource-auth-layer,
.resource-auth-bar {
  box-sizing: border-box;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.resource-auth-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #172033;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(244, 248, 255, .96)),
    #ffffff;
}

.resource-auth-panel {
  width: min(100%, 520px);
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(20, 35, 60, .14);
}

.resource-auth-brand {
  width: 190px;
  max-width: 60%;
  height: auto;
}

.resource-auth-eyebrow {
  margin: 0;
  color: #245c9f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.resource-auth-panel h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.04;
}

.resource-auth-panel p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.55;
}

.resource-auth-form {
  display: grid;
  gap: 12px;
}

.resource-auth-form label {
  display: grid;
  gap: 7px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
}

.resource-auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #111827;
  font: inherit;
}

.resource-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.resource-auth-button,
.resource-auth-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid #1f5f9f;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.resource-auth-button {
  color: #ffffff;
  background: #1f5f9f;
}

.resource-auth-button:disabled {
  cursor: wait;
  opacity: .65;
}

.resource-auth-link {
  color: #1f5f9f;
  background: #ffffff;
}

.resource-auth-message {
  min-height: 24px;
  color: #4b5563;
  font-weight: 700;
}

.resource-auth-message.success {
  color: #0f7a45;
}

.resource-auth-message.error {
  color: #b42318;
}

.resource-auth-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 9000;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 34px);
  border-bottom: 1px solid #d9e2ee;
  color: #142033;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.resource-auth-bar strong,
.resource-auth-bar span {
  display: block;
}

.resource-auth-bar small {
  color: #64748b;
}

.resource-auth-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.resource-auth-bar .resource-auth-link,
.resource-auth-bar .resource-auth-button {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 14px;
}

@media (max-width: 680px) {
  body.resource-auth-ready {
    padding-top: 118px;
  }

  .resource-auth-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-auth-bar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .resource-auth-bar .resource-auth-link,
  .resource-auth-bar .resource-auth-button {
    flex: 1;
  }

  .resource-auth-panel {
    padding: 22px;
  }
}
