.auth-page {
  min-height: 100vh;
  overflow: auto;
  background: var(--page);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(470px, 0.94fr) minmax(520px, 1.06fr);
}

.auth-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 34px clamp(34px, 4.4vw, 72px) 30px;
  background:
    radial-gradient(circle at 82% 18%, rgba(147, 127, 255, 0.35), transparent 24%),
    radial-gradient(circle at 16% 84%, rgba(255, 120, 103, 0.16), transparent 28%),
    linear-gradient(145deg, #433776 0%, #302653 54%, #261f43 100%);
  color: #fff;
}

.auth-story::before,
.auth-story::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.auth-story::before {
  top: -160px;
  right: -210px;
  width: 520px;
  height: 520px;
}

.auth-story::after {
  bottom: -260px;
  left: -250px;
  width: 640px;
  height: 640px;
}

.auth-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 13px;
  color: #fff;
  text-decoration: none;
}

.auth-brand-mark {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: linear-gradient(145deg, #8a7cff, #6856df);
  box-shadow: 0 13px 30px rgba(19, 11, 50, 0.28), inset 0 1px rgba(255, 255, 255, 0.3);
}

.auth-brand-mark svg {
  width: 31px;
  height: 31px;
}

.auth-brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.auth-brand strong {
  font-size: 23px;
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1;
}

.auth-brand small {
  margin-top: 6px;
  color: #c2badc;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.auth-story-content {
  position: relative;
  z-index: 2;
  width: min(580px, 100%);
  margin: auto 0;
  padding: 54px 0 46px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #d9d4ea;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-kicker i,
.secure-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #50d6b7;
  box-shadow: 0 0 0 5px rgba(80, 214, 183, 0.13), 0 0 18px rgba(80, 214, 183, 0.36);
}

.auth-story h1 {
  margin: 24px 0 18px;
  font-size: clamp(42px, 4.1vw, 66px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.auth-story h1 em {
  color: #9c8fff;
  font-style: normal;
}

.auth-story-content > p {
  max-width: 500px;
  margin: 0;
  color: #c4bddb;
  font-size: 16px;
  line-height: 1.65;
}

.access-board {
  display: grid;
  margin-top: 38px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.access-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 75px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
}

.access-card--primary {
  min-height: 82px;
  grid-column: 1 / -1;
  background: linear-gradient(105deg, rgba(126, 108, 244, 0.26), rgba(255, 255, 255, 0.07));
}

.access-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 14px;
  background: #7562eb;
  color: #fff;
  box-shadow: 0 8px 20px rgba(25, 14, 65, 0.22);
}

.access-icon svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.access-card > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.access-card small {
  color: #bdb5d6;
  font-size: 14px;
}

.access-card strong {
  margin-top: 5px;
  font-size: 16px;
  font-weight: 720;
}

.access-card--primary b {
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(80, 214, 183, 0.14);
  color: #72e4ca;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.access-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
}

.access-dot--mint {
  background: #50d6b7;
  box-shadow: 0 0 0 5px rgba(80, 214, 183, 0.1);
}

.access-dot--coral {
  background: #ff8878;
  box-shadow: 0 0 0 5px rgba(255, 136, 120, 0.1);
}

.access-wave {
  width: 45px;
  height: 19px;
  margin-left: auto;
  opacity: 0.8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 20'%3E%3Cpath d='M1 12c5 0 5-8 10-8s5 12 10 12 5-7 10-7 5 5 9 5 5-9 9-9' fill='none' stroke='%2350d6b7' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.mini-avatars {
  display: flex !important;
  margin-left: auto;
  flex-direction: row !important;
}

.mini-avatars i {
  display: grid;
  width: 27px;
  height: 27px;
  margin-left: -7px;
  place-items: center;
  border: 2px solid #3b3067;
  border-radius: 9px;
  background: #7464ca;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.mini-avatars i:nth-child(2) { background: #d36f79; }
.mini-avatars i:nth-child(3) { background: #504671; }

.auth-story-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a9a0c6;
  font-size: 14px;
}

.secure-state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.secure-state i {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.auth-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 90px clamp(32px, 6vw, 104px) 70px;
  background:
    radial-gradient(circle at 83% 12%, color-mix(in srgb, var(--coral) 8%, transparent), transparent 24%),
    radial-gradient(circle at 12% 88%, color-mix(in srgb, var(--purple) 10%, transparent), transparent 25%),
    var(--page);
}

.auth-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--purple) 2.4%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--purple) 2.4%, transparent) 1px, transparent 1px);
  background-size: 30px 30px;
  content: "";
  mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
}

.auth-panel-toolbar {
  position: absolute;
  top: 28px;
  right: 30px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
}

.auth-language {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(455px, 100%);
  padding: clamp(30px, 3.8vw, 46px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: 0 22px 70px rgba(57, 43, 117, 0.13);
  backdrop-filter: blur(20px);
}

html[data-theme="dark"] .login-card {
  box-shadow: 0 25px 74px rgba(0, 0, 0, 0.3);
}

.login-heading { margin-bottom: 28px; }

.login-eyebrow {
  color: var(--purple);
  font-size: 14px;
  font-weight: 820;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-heading h2 {
  margin: 11px 0 9px;
  font-size: clamp(30px, 3vw, 39px);
  font-weight: 770;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.login-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.auth-message {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.45;
}

.auth-message svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-message--error {
  border-color: color-mix(in srgb, var(--coral) 28%, var(--line));
  background: color-mix(in srgb, var(--coral) 8%, var(--surface));
  color: #db5f51;
}

.auth-message--success {
  border-color: color-mix(in srgb, var(--mint) 28%, var(--line));
  background: color-mix(in srgb, var(--mint) 8%, var(--surface));
  color: #239b80;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 19px;
}

.field-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.field-label {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 720;
}

.field-control {
  position: relative;
  display: flex;
  height: 55px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field-control:focus-within {
  border-color: color-mix(in srgb, var(--purple) 65%, var(--line));
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--purple) 11%, transparent);
}

.field-control > svg {
  width: 20px;
  height: 20px;
  margin-left: 16px;
  flex: 0 0 20px;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-control input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 15px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}

.field-group > small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.password-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  margin-right: 6px;
  flex: 0 0 42px;
  cursor: pointer;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
}

.password-toggle:hover {
  background: var(--purple-soft);
  color: var(--purple);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.caps-lock-hint {
  position: absolute;
  right: 0;
  bottom: -16px;
  display: none;
  color: var(--coral) !important;
  font-weight: 700;
}

.caps-lock-hint.is-visible { display: block; }

.login-submit {
  position: relative;
  display: flex;
  height: 56px;
  margin-top: 3px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #7e6df3, #6754df);
  color: #fff;
  font-size: 16px;
  font-weight: 760;
  box-shadow: 0 12px 28px rgba(92, 70, 210, 0.25), inset 0 1px rgba(255, 255, 255, 0.25);
  transition: transform 160ms ease, filter 160ms ease;
}

.login-submit::before {
  position: absolute;
  top: -60%;
  left: -20%;
  width: 40%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.17), transparent);
  content: "";
  transform: rotate(18deg);
  transition: left 480ms ease;
}

.login-submit:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.login-submit:hover::before { left: 105%; }

.login-submit svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.submit-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 700ms linear infinite;
}

.login-submit.is-loading span,
.login-submit.is-loading svg { display: none; }
.login-submit.is-loading .submit-spinner { display: block; }

.login-security {
  display: flex;
  margin-top: 23px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.login-security svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke: var(--mint);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-support {
  position: absolute;
  right: 30px;
  bottom: 25px;
  left: 30px;
  z-index: 2;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
  .auth-shell { grid-template-columns: minmax(360px, 0.78fr) minmax(500px, 1.22fr); }
  .auth-story { padding-inline: 36px; }
  .auth-story h1 { font-size: 46px; }
  .access-board { grid-template-columns: 1fr; }
  .access-card--primary { grid-column: auto; }
  .access-card--team { display: none; }
}

@media (max-width: 820px) {
  .auth-shell { display: block; }
  .auth-story {
    min-height: auto;
    padding: 24px;
    background: linear-gradient(145deg, #433776, #302653);
  }
  .auth-story-content,
  .auth-story-footer { display: none; }
  .auth-brand-mark { width: 42px; height: 42px; border-radius: 14px; }
  .auth-brand-mark svg { width: 28px; height: 28px; }
  .auth-panel { min-height: calc(100vh - 90px); padding: 90px 22px 70px; }
  .auth-panel-toolbar { top: 22px; right: 22px; }
}

@media (max-width: 480px) {
  .auth-story { padding: 18px; }
  .auth-brand strong { font-size: 20px; }
  .auth-panel { align-items: flex-start; padding: 76px 12px 60px; }
  .auth-panel-toolbar { top: 15px; right: 15px; }
  .auth-language,
  .auth-panel-toolbar .icon-button { width: 40px; height: 40px; }
  .login-card { padding: 27px 21px; border-radius: 22px; }
  .login-heading { margin-bottom: 24px; }
  .login-heading h2 { font-size: 30px; }
}

/* Mandatory two-factor authentication */
.auth-story--factor {
  background:
    radial-gradient(circle at 76% 22%, rgba(112, 91, 242, 0.42), transparent 25%),
    radial-gradient(circle at 14% 84%, rgba(62, 198, 168, 0.16), transparent 28%),
    linear-gradient(145deg, #3e3470 0%, #2d254f 55%, #211b3a 100%);
}

.factor-story-content { padding-bottom: 30px; }

.factor-story-board {
  position: relative;
  min-height: 255px;
  margin-top: 35px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(15px);
}

.factor-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(155, 143, 255, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.factor-orbit--one { width: 185px; height: 185px; }
.factor-orbit--two { width: 285px; height: 285px; }

.factor-shield {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  background: linear-gradient(145deg, #806ff5, #6552d8);
  box-shadow: 0 18px 42px rgba(19, 10, 56, 0.35), inset 0 1px rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%) rotate(-4deg);
}
.factor-shield svg { width: 48px; height: 48px; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.factor-story-card {
  position: absolute;
  display: flex;
  min-width: 190px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(37, 28, 69, 0.72);
  box-shadow: 0 12px 28px rgba(18, 10, 48, 0.25);
  backdrop-filter: blur(18px);
}
.factor-story-card--password { top: 24px; left: 24px; }
.factor-story-card--code { right: 24px; bottom: 24px; }
.factor-story-card > i {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 10px;
  background: rgba(127, 109, 243, 0.23);
  color: #ad9fff;
  font-size: 14px;
  font-style: normal;
  font-weight: 820;
}
.factor-story-card--code > i { background: rgba(80, 214, 183, 0.16); color: #6de0c5; }
.factor-story-card > span { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.factor-story-card small { color: #a9a0c6; font-size: 12px; }
.factor-story-card strong { margin-top: 4px; font-size: 15px; }
.factor-story-card > b { color: #d8d1ed; font-size: 14px; letter-spacing: 0.08em; }

.factor-auth-panel { padding: 70px clamp(24px, 3.7vw, 60px) 50px; }
.two-factor-card { width: min(640px, 100%); padding: clamp(24px, 2.8vw, 36px); }
.factor-heading { margin-bottom: 17px; }
.factor-heading h2 { font-size: clamp(27px, 2.5vw, 35px); }

.factor-account {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
}
.factor-account > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #8273f8, #6855df);
  color: #fff;
  font-size: 15px;
  font-weight: 820;
  box-shadow: 0 7px 16px rgba(94, 72, 210, 0.2);
}
.factor-account > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.factor-account small { color: var(--muted); font-size: 12px; }
.factor-account strong { margin-top: 4px; font-size: 15px; }
.factor-account > i {
  padding: 6px 8px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--mint) 10%, var(--surface));
  color: var(--mint);
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.two-factor-card .auth-message { margin-bottom: 15px; }

.factor-steps {
  display: grid;
  align-items: center;
  margin: 1px 0 15px;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 7px;
}
.factor-steps > span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.factor-steps > span > i {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.factor-steps > span > small { font-size: 11px; font-weight: 700; }
.factor-steps > span.is-active { color: var(--purple); }
.factor-steps > span.is-active > i { border-color: var(--purple); background: var(--purple); color: #fff; }
.factor-steps > b { height: 1px; background: var(--line); }

.factor-setup-grid {
  display: grid;
  margin-bottom: 17px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--purple) 2.5%, var(--surface-soft));
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 15px;
}
.factor-qr-wrap { display: flex; align-items: center; flex-direction: column; justify-content: center; }
.factor-qr {
  display: grid;
  width: 158px;
  height: 158px;
  place-items: center;
  overflow: hidden;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--purple) 20%, var(--line));
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 9px 22px rgba(64, 47, 124, 0.1);
}
.factor-qr img { display: block; width: 100%; height: 100%; }
.factor-qr-wrap > small { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: center; }

.factor-instructions { min-width: 0; }
.factor-instructions ol { display: flex; margin: 0; padding: 0; list-style: none; flex-direction: column; gap: 7px; }
.factor-instructions li { display: flex; align-items: center; gap: 8px; }
.factor-instructions li > i {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 8px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
}
.factor-instructions li > span { display: flex; min-width: 0; flex-direction: column; }
.factor-instructions li strong { font-size: 12px; }
.factor-instructions li small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.manual-secret {
  display: flex;
  margin-top: 10px;
  padding: 9px;
  border: 1px dashed color-mix(in srgb, var(--purple) 28%, var(--line));
  border-radius: 11px;
  background: var(--surface);
  flex-direction: column;
}
.manual-secret > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.manual-secret small { color: var(--purple); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.manual-secret strong { color: var(--muted); font-size: 10px; font-weight: 650; }
.manual-secret code {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.factor-form { gap: 14px; }
.factor-code-control { height: 60px; }
.factor-code-control input {
  font-size: 20px;
  font-weight: 780;
  letter-spacing: 0.32em;
  text-align: center;
}
.factor-code-control input::placeholder { color: color-mix(in srgb, var(--muted) 50%, transparent); }
.factor-form .login-submit { height: 52px; }

.factor-verify-visual {
  position: relative;
  display: grid;
  min-height: 140px;
  margin: 4px 0 18px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--purple) 12%, transparent), transparent 42%),
    var(--surface-soft);
}
.factor-verify-visual > span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #8273f8, #6855df);
  color: #fff;
  box-shadow: 0 15px 32px rgba(94, 72, 210, 0.25);
}
.factor-verify-visual svg { width: 48px; height: 48px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.factor-verify-visual > i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.factor-verify-visual > i:nth-child(2) { top: 26px; left: 24%; }
.factor-verify-visual > i:nth-child(3) { right: 21%; bottom: 27px; background: var(--coral); }
.factor-verify-visual > i:nth-child(4) { top: 31px; right: 31%; width: 5px; height: 5px; background: var(--purple); }

.factor-cancel { display: flex; justify-content: center; margin-top: 13px; }
.factor-cancel button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}
.factor-cancel button:hover { color: var(--purple); }
.factor-cancel svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.factor-security-note { margin-top: 11px; }

@media (max-width: 1180px) {
  .two-factor-card { width: min(560px, 100%); }
  .factor-setup-grid { grid-template-columns: 150px minmax(0, 1fr); }
  .factor-qr { width: 138px; height: 138px; }
  .factor-story-card { min-width: 165px; }
}

@media (max-width: 820px) {
  .factor-auth-panel { padding-top: 82px; }
  .two-factor-card { width: min(640px, 100%); }
}

@media (max-width: 560px) {
  .factor-auth-panel { padding-inline: 12px; }
  .two-factor-card { padding: 22px 18px; }
  .factor-setup-grid { grid-template-columns: 1fr; }
  .factor-steps > span > small { display: none; }
  .factor-qr { width: 170px; height: 170px; }
  .manual-secret > span { align-items: flex-start; flex-direction: column; }
}

@media (max-height: 800px) and (min-width: 821px) {
  .factor-auth-panel { align-items: flex-start; padding-top: 36px; padding-bottom: 24px; }
  .factor-auth-panel .auth-panel-toolbar { top: 18px; }
  .two-factor-card { padding: 21px 28px; }
  .factor-heading { margin-bottom: 11px; }
  .factor-heading h2 { margin-block: 7px 5px; font-size: 28px; }
  .factor-heading p { font-size: 14px; }
  .factor-account { min-height: 48px; margin-bottom: 10px; padding-block: 6px; }
  .factor-account > span:first-child { width: 34px; height: 34px; flex-basis: 34px; }
  .factor-steps { margin-bottom: 9px; }
  .factor-setup-grid { margin-bottom: 10px; padding: 10px; }
  .factor-qr { width: 130px; height: 130px; }
  .factor-qr-wrap > small { margin-top: 5px; }
  .factor-instructions ol { gap: 4px; }
  .factor-instructions li > i { width: 23px; height: 23px; flex-basis: 23px; }
  .manual-secret { margin-top: 6px; padding: 7px; }
  .manual-secret code { margin-top: 4px; font-size: 12px; }
  .factor-form { gap: 8px; }
  .factor-code-control { height: 52px; }
  .factor-form .login-submit { height: 46px; }
  .factor-cancel { margin-top: 6px; }
  .factor-security-note { margin-top: 5px; }
  .factor-verify-visual { min-height: 110px; margin-bottom: 11px; }
}
