/* Shared Focus chrome for login and verification. Authentication stays native. */
body.sp-auth-login {
  --sp-login-field-bg: rgb(var(--sp-surface) / .48);
  --sp-login-control-line: #626c86;
  --sp-login-glow-blue: rgb(79 136 244 / .27);
  --sp-login-glow-violet: rgb(121 85 206 / .25);
  --sp-login-glow-cyan: rgb(85 200 235 / .12);
  --sp-login-button-end: #5949d6;
  --sp-login-ray-blue: 79 136 244;
  --sp-login-ray-cyan: 85 200 235;
  --sp-login-ray-violet: 139 103 218;
  --sp-login-ray-indigo: 104 82 210;
  --sp-login-beam-color: 186 213 255;
  --sp-login-spectrum-opacity: .74;
  background: rgb(var(--sp-bg));
  min-height: 100svh;
  font-family: "Inter", system-ui, sans-serif;
  color: rgb(var(--sp-txt));
}

html[data-theme="light"] body.sp-auth-login {
  --sp-login-field-bg: rgb(var(--sp-surface) / .85);
  --sp-login-control-line: #7d879f;
  --sp-login-glow-blue: rgb(79 136 244 / .14);
  --sp-login-glow-violet: rgb(121 85 206 / .11);
  --sp-login-glow-cyan: rgb(85 200 235 / .09);
  --sp-login-button-end: #5949d6;
  --sp-login-beam-color: 65 112 206;
  --sp-login-spectrum-opacity: .6;
}

body.sp-auth-login .sp-auth-shell {
  display: block;
  min-height: 100svh;
}

body.sp-auth-login .sp-auth-identity {
  display: none;
}

body.sp-auth-login .sp-auth-identity * {
  animation: none;
}

body.sp-auth-login .sp-auth-access {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100svh;
  padding: 32px;
}

body.sp-auth-login .sp-auth-col {
  width: 100%;
  max-width: 440px;
  gap: 16px;
}

body.sp-auth-login .sp-auth-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: none;
  animation: none;
}

body.sp-auth-login .sp-login {
  position: relative;
  isolation: isolate;
  width: 100%;
}

body.sp-auth-login .sp-login [hidden] {
  display: none !important;
}

body.sp-auth-login .sp-login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

body.sp-auth-login .sp-login-logo {
  display: block;
  width: 76px;
  height: auto;
  flex: none;
}

body.sp-auth-login .sp-login-emblem {
  position: relative;
  display: block;
  flex: none;
  isolation: isolate;
}

body.sp-auth-login .sp-login-spectrum {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 360px;
  height: 170px;
  overflow: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

body.sp-auth-login .sp-login-beam,
body.sp-auth-login .sp-login-ray {
  position: absolute;
  top: calc(50% - 1px);
  height: 2px;
  border-radius: 100%;
  opacity: 0;
}

body.sp-auth-login .sp-login-beam {
  left: 0;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgb(var(--sp-login-beam-color) / .15) 35%, rgb(var(--sp-login-beam-color)));
  transform-origin: left center;
  transform: scaleX(.1);
}

body.sp-auth-login .sp-login-ray {
  left: calc(50% + 14px);
  width: calc(50% - 18px);
  background: linear-gradient(90deg, rgb(var(--sp-login-ray-color)), rgb(var(--sp-login-ray-color) / .5) 45%, transparent);
  transform-origin: left center;
  transform: rotate(var(--sp-login-ray-angle)) scaleX(.12);
}

body.sp-auth-login .sp-login-ray-blue {
  --sp-login-ray-color: var(--sp-login-ray-blue);
  --sp-login-ray-angle: -20deg;
}

body.sp-auth-login .sp-login-ray-cyan {
  --sp-login-ray-color: var(--sp-login-ray-cyan);
  --sp-login-ray-angle: -6deg;
}

body.sp-auth-login .sp-login-ray-violet {
  --sp-login-ray-color: var(--sp-login-ray-violet);
  --sp-login-ray-angle: 8deg;
}

body.sp-auth-login .sp-login-ray-indigo {
  --sp-login-ray-color: var(--sp-login-ray-indigo);
  --sp-login-ray-angle: 22deg;
}

body.sp-auth-login .sp-login-wordmark {
  font-family: "Unbounded", "Inter", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .1em;
  text-indent: .1em;
}

body.sp-auth-login .sp-login-glow {
  --sp-login-glow-opacity: .5;
  --sp-login-glow-peak: .82;
  --sp-login-ambient-peak: .72;
  position: absolute;
  z-index: -1;
  top: 43%;
  left: 50%;
  width: min(520px, 92vw);
  height: 300px;
  background:
    radial-gradient(ellipse at 65% 35%, var(--sp-login-glow-blue), transparent 64%),
    radial-gradient(ellipse at 35% 60%, var(--sp-login-glow-violet), transparent 63%),
    radial-gradient(ellipse at 65% 65%, var(--sp-login-glow-cyan), transparent 58%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 18%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 18%, transparent 72%);
  pointer-events: none;
  opacity: var(--sp-login-glow-opacity);
  transform: translate(-50%, -50%) scale(1);
}

body.sp-auth-login [data-login-motion="enter"] [data-login-decoration] {
  animation: sp-login-glow 1650ms cubic-bezier(.4,0,.2,1) both;
}

body.sp-auth-login [data-login-motion="enter"] .sp-login-beam {
  animation: sp-login-beam 1650ms cubic-bezier(.4,0,.2,1) both;
}

body.sp-auth-login [data-login-motion="enter"] .sp-login-ray {
  animation: sp-login-spectrum 1650ms cubic-bezier(.4,0,.2,1) both;
}

body.sp-auth-login :is([data-login-ambient="running"], [data-login-ambient="paused"]) [data-login-decoration] {
  animation: sp-login-breathe 7000ms ease-in-out infinite;
}

body.sp-auth-login [data-login-ambient="paused"] [data-login-decoration] {
  animation-play-state: paused;
}

html[data-theme="light"] body.sp-auth-login .sp-login-glow {
  --sp-login-glow-opacity: .35;
  --sp-login-glow-peak: .6;
  --sp-login-ambient-peak: .5;
}

@keyframes sp-login-glow {
  0% { opacity: var(--sp-login-glow-opacity); transform: translate(-50%, -50%) scale(1); }
  45% { opacity: var(--sp-login-glow-peak); transform: translate(-50%, -50%) scale(1.06); }
  100% { opacity: var(--sp-login-glow-opacity); transform: translate(-50%, -50%) scale(1); }
}

@keyframes sp-login-beam {
  0% { opacity: 0; transform: scaleX(.1); }
  22% { opacity: var(--sp-login-spectrum-opacity); transform: scaleX(1); }
  46%, 100% { opacity: 0; transform: scaleX(1); }
}

@keyframes sp-login-spectrum {
  0%, 18% { opacity: 0; transform: rotate(0deg) scaleX(.12); }
  45% { opacity: var(--sp-login-spectrum-opacity); transform: rotate(var(--sp-login-ray-angle)) scaleX(1); }
  100% { opacity: 0; transform: rotate(var(--sp-login-ray-angle)) scaleX(1.06); }
}

@keyframes sp-login-breathe {
  0%, 100% { opacity: var(--sp-login-glow-opacity); transform: translate(-50%, -50%) scale(1); }
  50% { opacity: var(--sp-login-ambient-peak); transform: translate(-50%, -50%) scale(1.025); }
}

body.sp-auth-login .sp-login-title {
  margin: 0;
  font-size: 32px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.035em;
  text-align: center;
  color: rgb(var(--sp-txt));
}

body.sp-auth-login .sp-login-progress {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 14px;
}

body.sp-auth-login .sp-login-progress-caption {
  margin: 0;
  color: rgb(var(--sp-muted));
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

body.sp-auth-login .sp-login-progress-caption span {
  color: rgb(var(--sp-txt));
  font-weight: 600;
}

body.sp-auth-login .sp-login-progress-track {
  display: flex;
  gap: 6px;
  width: 102px;
}

body.sp-auth-login .sp-login-progress-track span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgb(var(--sp-txt) / .12);
}

body.sp-auth-login .sp-login-progress-track .is-current {
  background: rgb(var(--sp-btn-primary-bg));
}

body.sp-auth-login .sp-login-progress-track .is-complete {
  background: rgb(var(--sp-accent) / .45);
}

body.sp-auth-login .sp-login-form {
  margin-top: 28px;
}

body.sp-auth-login .sp-login-field + .sp-login-field {
  margin-top: 20px;
}

body.sp-auth-login .sp-login-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
  color: rgb(var(--sp-txt));
}

body.sp-auth-login .sp-login-input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--sp-login-control-line);
  border-radius: 12px;
  background: var(--sp-login-field-bg);
  color: rgb(var(--sp-txt));
  font: inherit;
  font-size: 16px;
  line-height: normal;
  outline: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

body.sp-auth-login .sp-login-input::placeholder {
  opacity: 1;
  color: rgb(var(--sp-muted));
}

body.sp-auth-login .sp-login-input:focus {
  border-color: rgb(var(--sp-accent));
  outline: 2px solid rgb(var(--sp-accent));
  outline-offset: 3px;
}

body.sp-auth-login .sp-login-password {
  position: relative;
}

body.sp-auth-login .sp-login-password .sp-login-input {
  padding-inline-end: 58px;
}

body.sp-auth-login .sp-login-password-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgb(var(--sp-muted));
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

body.sp-auth-login .sp-login-eye-off,
body.sp-auth-login .sp-login-password-toggle[aria-pressed="true"] .sp-login-eye {
  display: none;
}

body.sp-auth-login .sp-login-password-toggle[aria-pressed="true"] .sp-login-eye-off {
  display: block;
}

body.sp-auth-login .sp-login-password-toggle:active {
  background: rgb(var(--sp-txt) / .1);
  color: rgb(var(--sp-txt));
}

body.sp-auth-login .sp-login-submit {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(110deg, rgb(var(--sp-btn-primary-bg)), var(--sp-login-button-end));
  box-shadow: 0 8px 24px rgb(var(--sp-accent) / .15);
  color: white;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

body.sp-auth-login .sp-login-submit:active {
  background: var(--sp-btn-primary-hover);
  box-shadow: 0 3px 12px rgb(var(--sp-accent) / .16);
}

body.sp-auth-login .sp-login-submit:disabled {
  cursor: wait;
  box-shadow: none;
}

body.sp-auth-login .sp-login-status {
  min-height: 20px;
  margin-top: 6px;
  color: rgb(var(--sp-muted));
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

body.sp-auth-login .sp-login-recovery {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  color: rgb(var(--sp-accent));
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 140ms ease;
}

body.sp-auth-login .sp-login-admin-help {
  padding-inline: 0;
  color: rgb(var(--sp-muted));
  font-weight: 400;
  text-decoration: none;
}

body.sp-auth-login .sp-login-organization {
  margin: 24px 0 0;
  color: rgb(var(--sp-muted));
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

body.sp-auth-login .sp-login-alert,
body.sp-auth-login .sp-login-error,
body.sp-auth-login .sp-auth-col > .sp-auth-msg {
  padding: 12px 14px;
  border: 1px solid rgb(var(--sp-warn) / .35);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

body.sp-auth-login .sp-login-alert {
  margin-top: 24px;
}

body.sp-auth-login .sp-login-error {
  margin-bottom: 20px;
}

body.sp-auth-login :is(.sp-login-password-toggle, .sp-login-submit, a.sp-login-recovery):focus-visible {
  outline: 2px solid rgb(var(--sp-accent));
  outline-offset: 4px;
}

@media (hover: hover) {
  body.sp-auth-login .sp-login-password-toggle:hover {
    color: rgb(var(--sp-txt));
    background: rgb(var(--sp-txt) / .07);
  }
  body.sp-auth-login .sp-login-submit:hover {
    box-shadow: 0 10px 26px rgb(var(--sp-accent) / .24);
  }
  body.sp-auth-login a.sp-login-recovery:hover {
    color: var(--sp-accent-hover);
  }
}

@media (min-width: 641px) and (max-height: 800px) {
  body.sp-auth-login .sp-login-logo {
    width: 64px;
  }
  body.sp-auth-login .sp-login-brand {
    margin-bottom: 24px;
  }
}

@media (max-width: 640px) {
  body.sp-auth-login .sp-auth-access {
    display: block;
    padding: 24px 20px 32px;
  }
  body.sp-auth-login .sp-auth-col {
    margin-inline: auto;
  }
  body.sp-auth-login .sp-login-brand {
    flex-direction: row;
    justify-content: center;
    min-height: 64px;
    gap: 14px;
    margin-bottom: 24px;
  }
  body.sp-auth-login .sp-login-logo {
    width: 52px;
  }
  body.sp-auth-login .sp-login-spectrum {
    width: 148px;
    height: 110px;
  }
  body.sp-auth-login .sp-login-ray {
    left: calc(50% + 9px);
    width: calc(50% - 13px);
  }
  body.sp-auth-login .sp-login-wordmark {
    font-size: 20px;
  }
  body.sp-auth-login .sp-login-glow {
    --sp-login-glow-opacity: .35;
    --sp-login-glow-peak: .64;
    --sp-login-ambient-peak: .5;
    top: 50%;
    width: 260px;
    height: 140px;
  }
  html[data-theme="light"] body.sp-auth-login .sp-login-glow {
    --sp-login-glow-opacity: .28;
    --sp-login-glow-peak: .48;
    --sp-login-ambient-peak: .4;
  }
  body.sp-auth-login .sp-login-title {
    font-size: 28px;
  }
  body.sp-auth-login .sp-login-form {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sp-auth-login [data-login-decoration],
  body.sp-auth-login [data-login-motion="enter"] [data-login-decoration],
  body.sp-auth-login [data-login-motion="enter"] :is(.sp-login-beam, .sp-login-ray),
  body.sp-auth-login :is([data-login-ambient="running"], [data-login-ambient="paused"]) [data-login-decoration] {
    animation: none;
  }
  body.sp-auth-login :is(.sp-login-input, .sp-login-password-toggle, .sp-login-submit, .sp-login-recovery) {
    transition: none;
  }
}
