html.sso-pending,
html.sso-pending body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
}

html.sso-pending body > *:not(#sso-login-overlay) {
  visibility: hidden !important;
}

html.sso-pending #sso-login-overlay,
html.sso-pending #sso-login-overlay * {
  visibility: visible !important;
}

#sso-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: #e2e8f0;
  background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#sso-login-overlay,
#sso-login-overlay * {
  box-sizing: border-box;
}

.sso-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(2, 6, 23, 0.8);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
}

.sso-nav-inner {
  display: flex;
  width: 100%;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.sso-brand,
.sso-card-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sso-brand img,
.sso-card-brand img {
  width: 55px;
  height: auto;
}

.sso-brand {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.sso-divider {
  display: block;
  width: 1px;
  height: 24px;
  background: #334155;
}

.sso-blob {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.sso-blob-a {
  top: -180px;
  right: -180px;
  width: 560px;
  height: 560px;
  background: rgba(251, 78, 11, 0.08);
  filter: blur(160px);
}

.sso-blob-b {
  bottom: -180px;
  left: -180px;
  width: 480px;
  height: 480px;
  background: rgba(251, 78, 11, 0.08);
  filter: blur(150px);
}

.sso-login-shell {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: calc(100vh - 64px);
  padding: 24px 16px;
  align-items: center;
  justify-content: center;
}

.sso-login-card {
  width: 100%;
  max-width: 560px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(40px);
  animation: sso-fade-in 0.7s ease-out;
}

.sso-card-brand {
  margin-bottom: 32px;
}

.sso-card-brand .sso-divider {
  height: 28px;
}

.sso-card-brand p {
  margin: 0;
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sso-card-brand h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.sso-login-card h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sso-intro {
  max-width: 480px;
  margin: 0 0 32px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
}

.sso-notice {
  display: flex;
  margin-bottom: 24px;
  padding: 12px 16px;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(251, 78, 11, 0.2);
  border-radius: 12px;
  background: rgba(251, 78, 11, 0.08);
  color: #f1f5f9;
  font-size: 14px;
}

.sso-notice svg,
.sso-login-btn svg {
  width: 16px;
  min-width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sso-notice svg {
  margin-top: 2px;
  color: #fb4e0b;
}

.sso-error {
  display: none;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 14px;
}

.sso-login-btn {
  display: flex;
  width: 100%;
  padding: 14px 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: #fb4e0b;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, opacity 0.2s;
}

.sso-login-btn:hover {
  background: #fb4e0b;
}

.sso-login-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.sso-processing {
  display: none;
  margin-top: 14px;
  color: #cbd5e1;
  font-size: 12px;
  text-align: center;
}

.sso-authorized {
  margin: 16px 0 0;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
}

/* Member portal theme: matches the light Inspira claim experience. */
#sso-login-overlay.sso-theme-member {
  color: #1e293b;
  background:
    radial-gradient(circle at 85% 12%, rgba(251, 78, 11, 0.1), transparent 28%),
    linear-gradient(180deg, #ffffff 0 72px, #f8fafc 72px 100%);
}

.sso-theme-member .sso-nav {
  height: 72px;
  border-bottom: 3px solid #fb4e0b;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 10px rgba(251, 78, 11, 0.09);
  backdrop-filter: blur(16px);
}

.sso-theme-member .sso-brand {
  color: #0f172a;
}

.sso-theme-member .sso-divider {
  background: rgba(251, 78, 11, 0.25);
}

.sso-theme-member .sso-blob-a {
  background: rgba(251, 78, 11, 0.11);
  filter: blur(150px);
}

.sso-theme-member .sso-blob-b {
  background: rgba(251, 78, 11, 0.09);
  filter: blur(140px);
}

.sso-theme-member .sso-login-shell {
  min-height: calc(100vh - 72px);
}

.sso-theme-member .sso-login-card {
  border-color: rgba(251, 78, 11, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 24px 60px rgba(251, 78, 11, 0.13),
    0 2px 8px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(24px);
}

.sso-theme-member .sso-card-brand p {
  color: #64748b;
}

.sso-theme-member .sso-card-brand h2,
.sso-theme-member .sso-login-card h1 {
  color: #0f172a;
}

.sso-theme-member .sso-intro {
  color: #64748b;
}

.sso-theme-member .sso-notice {
  border-color: rgba(251, 78, 11, 0.2);
  background: rgba(251, 78, 11, 0.08);
  color: #334155;
}

.sso-theme-member .sso-notice svg {
  color: #fb4e0b;
}

.sso-theme-member .sso-login-btn {
  background: #fb4e0b;
  box-shadow: 0 8px 20px rgba(251, 78, 11, 0.24);
}

.sso-theme-member .sso-login-btn:hover {
  background: #fb4e0b;
}

.sso-theme-member .sso-processing {
  color: #64748b;
}

.sso-theme-member .sso-authorized {
  color: #94a3b8;
}

@keyframes sso-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .sso-nav {
    padding: 0 16px;
  }

  .sso-login-card {
    padding: 28px 22px;
  }

  .sso-login-card h1 {
    font-size: 29px;
  }
}

/* Short landscape phones need an internally scrollable login surface. The
   document remains locked, so authenticated page content never scrolls behind it. */
@media (max-height: 520px) {
  #sso-login-overlay {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .sso-login-shell,
  .sso-theme-member .sso-login-shell {
    min-height: 0;
    padding-top: 24px;
    padding-bottom: 32px;
    align-items: flex-start;
  }

  .sso-login-card {
    padding-top: 28px;
    padding-bottom: 28px;
  }
}
