:root {
  color-scheme: dark;
  --auth-bg: #15151b;
  --auth-card: #1b1b25;
  --auth-field: #171721;
  --auth-border: #383746;
  --auth-text: #f1eff8;
  --auth-muted: #b5b1c6;
  --auth-lavender: #c3b4ff;
  --auth-green: #c1fa72;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 12%, #211d31, transparent 56%), var(--auth-bg);
  color: var(--auth-text);
  font: 16px/1.5 system-ui, sans-serif;
}

.auth-card {
  width: min(100%, 424px);
  padding: clamp(20px, 6vw, 34px);
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  box-shadow: 0 20px 60px #0b0b1373;
}

.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.auth-brand img { display: block; border-radius: 10px; }

h1 {
  margin: 22px 0 20px;
  font-size: clamp(27px, 7vw, 34px);
  line-height: 1.17;
  letter-spacing: -.035em;
}

.auth-icon { display: block; width: 18px; height: 18px; }
.auth-security-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 20px;
}
.auth-security-heading h1 { margin: 0; overflow-wrap: anywhere; }
.auth-security-seal {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #66588e;
  border-radius: 50%;
  background: linear-gradient(145deg, #42345e, #28243b);
  color: #d3c7ff;
  box-shadow: inset 0 0 0 3px #1b1b25a6, 0 4px 12px #100c2366;
}
.auth-security-seal .auth-icon { width: 25px; height: 25px; }

p { margin: 0; }
input, select, button { font: inherit; }
button { cursor: pointer; }

.auth-form, .auth-field { display: grid; min-width: 0; }
.auth-form { gap: 15px; }
.auth-field { gap: 6px; color: var(--auth-muted); font-size: 14px; font-weight: 600; }
.auth-field :is(input, select) {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--auth-border);
  border-radius: 11px;
  background: var(--auth-field);
  color: var(--auth-text);
  font-size: 16px;
  font-weight: 400;
}

.auth-field :is(input, select):focus { border-color: var(--auth-lavender); outline: none; }
.auth-password { position: relative; }
.auth-password.auth-can-reveal input { padding-inline-end: 48px; }
.auth-reveal {
  position: absolute;
  inset: 2px 2px 2px auto;
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--auth-muted);
}

.auth-reveal:focus-visible { outline-offset: -3px; }
.auth-reveal[aria-pressed="true"] { color: var(--auth-lavender); }
.auth-reveal svg { width: 19px; height: 19px; }
.auth-eye-off { display: none; }
.auth-reveal[aria-pressed="true"] .auth-eye-off { display: inline; }
.auth-hint { margin-top: -8px; color: var(--auth-muted); font-size: 13px; }

.auth-submit {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--auth-lavender);
  color: #221938;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color 140ms ease, filter 140ms ease;
}

.auth-submit[aria-disabled="true"] { cursor: progress; filter: saturate(.72); }
.auth-danger { background: #f6b6c0; color: #33171d; }
.auth-link { color: var(--auth-lavender); font-weight: 650; text-underline-offset: .18em; }
.auth-forgot { justify-self: end; padding-block: 4px; font-size: 14px; }
.auth-footer { margin-top: 17px; color: var(--auth-muted); text-align: center; font-size: 14px; }
.auth-footer .auth-link { display: inline-block; padding-block: 6px; }
.auth-copy { margin-bottom: 16px; color: var(--auth-muted); }
.auth-confirm { display: flex; gap: 8px; align-items: flex-start; color: var(--auth-muted); }
.auth-confirm input { margin-top: 5px; accent-color: var(--auth-lavender); }
.auth-enroll-option { display: grid; gap: 5px; }
.auth-enroll-option .auth-confirm { color: var(--auth-text); }
.auth-enroll-option p { margin: 0 0 0 25px; color: var(--auth-muted); font-size: 13px; }

.auth-field input[name=code] { font-variant-numeric: tabular-nums; letter-spacing: .2em; }
.auth-code { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.auth-code legend { margin-bottom: 8px; padding: 0; color: var(--auth-muted); font-size: 14px; font-weight: 600; }
.auth-code-digits { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: clamp(4px,2vw,9px); }
.auth-code-digits input {
  width: 100%; min-width: 0; min-height: 48px; padding: 5px 0;
  border: 1px solid var(--auth-border); border-radius: 10px; outline: none;
  background: var(--auth-field); color: var(--auth-text);
  font-size: clamp(18px,5vw,24px); font-weight: 650; font-variant-numeric: tabular-nums; text-align: center;
}
.auth-code-digits input:focus { border-color: var(--auth-lavender); box-shadow: inset 0 0 0 1px var(--auth-lavender); }
.auth-outline {
  min-height: 38px;
  padding: 6px 11px;
  border: 1px solid var(--auth-border);
  border-radius: 9px;
  background: var(--auth-field);
  color: var(--auth-lavender);
  font-size: 13px;
  font-weight: 650;
}
.auth-outline:hover { border-color: var(--auth-lavender); }
.auth-security-section a.auth-outline { display: inline-flex; align-items: center; text-decoration: none; }
.auth-security-section .auth-account-danger { color: #f1bec5; }
.auth-account-email { overflow-wrap: anywhere; }
.auth-security { display: grid; gap: 12px; }
.auth-security-section {
  min-width: 0; padding: clamp(12px,4vw,16px);
  border: 1px solid var(--auth-border); border-radius: 14px; background: #22222e;
}
.auth-security-section h2 { margin: 0 0 12px; font-size: 16px; }
.auth-security-section .auth-copy { margin-bottom: 12px; font-size: 14px; }
.auth-security-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.auth-security-status {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 2px 8px; border-radius: 20px; background: #2d2a41; color: var(--auth-lavender);
  font-size: 12px; font-weight: 650; vertical-align: middle;
}
.auth-security-title .auth-security-status { background: var(--auth-field); color: var(--auth-muted); }
.auth-security-title [data-enabled=true] { background: #293525; color: var(--auth-green); }
.auth-security-title [data-enabled=true]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.auth-security-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.auth-security-list li {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px 12px; padding: 9px 10px; border: 1px solid var(--auth-border); border-radius: 10px;
  background: var(--auth-field); font-size: 14px;
}
.auth-security-row-name { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; min-width: 0; overflow-wrap: anywhere; }
.auth-security-row-name small { flex-basis: 100%; color: var(--auth-muted); font-size: 12px; }
.auth-security-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-security-policy { margin-bottom: 3px; color: var(--auth-text); font-size: 14px; font-weight: 650; }
.auth-security-add, .auth-security-list + .auth-form { margin-top: 12px; }
.auth-security-add summary {
  display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 10px;
  border-radius: 8px; background: #2d2a41; color: var(--auth-lavender);
  font-size: 14px; font-weight: 650; cursor: pointer; list-style: none;
}
.auth-security-add summary::-webkit-details-marker { display: none; }
.auth-security-add summary::before { content: "+"; flex: none; width: 14px; font-size: 17px; line-height: 1; text-align: center; }
.auth-security-add[open] summary::before { content: "−"; }
.auth-security-add[open] .auth-copy { margin-top: 10px; }
.auth-security-section [value=remove-factor] ~ .auth-outline { color: #f1bec5; }
.auth-security + .auth-footer { margin-top: 12px; }
.auth-mfa-qr { display: block; max-width: 100%; height: auto; margin: 0 auto 13px; padding: 6px; border-radius: 12px; background: white; }
.auth-mfa-secret { margin-bottom: 16px; color: var(--auth-muted); font-size: 14px; }
.auth-mfa-secret summary { cursor: pointer; }
.auth-mfa-secret code { display: block; margin-top: 8px; overflow-wrap: anywhere; color: var(--auth-text); }


.auth-providers { display: grid; gap: 8px; margin-top: 21px; }
.auth-provider-divider { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; color: var(--auth-muted); font-size: 13px; white-space: nowrap; }
.auth-provider-divider::before, .auth-provider-divider::after { content: ""; flex: 1; height: 1px; background: var(--auth-border); }
.auth-provider {
  display: grid; grid-template-columns: 24px minmax(0,1fr) 24px; align-items: center; gap: 9px;
  min-height: 44px; padding: 5px 12px; border: 1px solid #66666f; border-radius: 9px;
  background: #17171b; color: #fff; font-size: 14px; font-weight: 650;
}
.auth-provider img { justify-self: center; object-fit: contain; }
.auth-provider--google { background: #fff; color: #1f1f1f; border-color: #747775; }
.auth-provider--apple { background: #000; border-color: #76767b; }
.auth-microsoft-mark { display: grid; grid-template-columns: repeat(2,8px); gap: 2px; justify-self: center; }
.auth-microsoft-mark i { width: 8px; height: 8px; background: #f25022; }
.auth-microsoft-mark i:nth-child(2) { background: #7fba00; }
.auth-microsoft-mark i:nth-child(3) { background: #00a4ef; }
.auth-microsoft-mark i:nth-child(4) { background: #ffb900; }
.auth-oauth-status { margin-top: 14px; color: var(--auth-muted); text-align: center; font-size: 14px; }

.auth-notice {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #49425e;
  border-radius: 10px;
  background: #292439;
  color: var(--auth-text);
  font-size: 14px;
}

.auth-activity {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-activity.is-loading { margin-top: 12px; }
.auth-dots { display: flex; gap: 4px; }
.auth-dots i {
  display: block;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--auth-green);
  animation: auth-pulse 980ms ease-in-out infinite;
}
.auth-dots i:nth-child(2) { animation-delay: 110ms; }
.auth-dots i:nth-child(3) { animation-delay: 220ms; }

@keyframes auth-pulse {
  0%, 70%, 100% { opacity: .4; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-2px); }
}

:is(input, select, button, a, summary):focus-visible { outline: 2px solid var(--auth-lavender); outline-offset: 3px; }
.auth-card--security { width: min(100%,520px); }


.auth-notice[role="alert"] { border-color: #784b5a; background: #34242d; color: #ffd2d9; }
.auth-progress {
  --auth-progress-scale: 0;
  --auth-progress-left: 16.6667%;
  --auth-step-size: 32px;
  --auth-step-center: calc(var(--auth-step-size) / 2);
  position: relative;
  margin-bottom: 20px;
}

.auth-progress[data-step="2"] { --auth-progress-scale: .5; --auth-progress-left: 50%; }
.auth-progress[data-step="3"] { --auth-progress-scale: 1; --auth-progress-left: 83.3333%; }

.auth-progress-line {
  position: absolute;
  top: calc(var(--auth-step-center) - 1px);
  left: 16.6667%;
  right: 16.6667%;
  height: 2px;
  border-radius: 2px;
  background: var(--auth-border);
}

.auth-progress-line::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--auth-green);
  content: "";
  transform: scaleX(var(--auth-progress-scale));
  transform-origin: left center;
  transition: transform 390ms cubic-bezier(.2,.72,.26,1);
}

.auth-progress-marker {
  position: absolute;
  z-index: 1;
  top: var(--auth-step-center);
  left: var(--auth-progress-left);
  width: calc(var(--auth-step-size) + 4px);
  height: calc(var(--auth-step-size) + 4px);
  border: 1px solid var(--auth-green);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #c1fa721a, 0 0 10px #c1fa7240;
  pointer-events: none;
  transform: translate(-50%,-50%);
  transition: left 390ms cubic-bezier(.2,.72,.26,1);
}

.auth-progress[data-advance] .auth-progress-marker { animation: auth-marker-arrive 450ms cubic-bezier(.2,.72,.26,1) both; }
.auth-progress[data-advance] .auth-progress-line::after { animation: auth-track-arrive 450ms cubic-bezier(.2,.72,.26,1) both; }
@keyframes auth-marker-arrive { from { left: 50%; } }
@keyframes auth-track-arrive { from { transform: scaleX(.5); } }

.auth-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-steps li {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding-inline: 3px;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.auth-step-icon {
  display: grid;
  place-items: center;
  width: var(--auth-step-size);
  height: var(--auth-step-size);
  border: 1px solid #555166;
  border-radius: 50%;
  background: var(--auth-card);
}

.auth-step-done .auth-step-icon,
.auth-steps [aria-current="step"] .auth-step-icon {
  border-color: #667950;
  background: #2a3623;
  color: var(--auth-green);
}
.auth-steps li[aria-current="step"] { color: var(--auth-text); font-weight: 650; }
.auth-signup-password { display: grid; min-inline-size: 0; gap: 15px; margin: 0; padding: 0; border: 0; }
.auth-signup-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-inline: 10px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-signup-summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-signup-summary button { flex: none; min-height: 36px; border: 0; background: transparent; padding: 3px 0; }
.auth-password-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
  margin: -5px 0 0;
  padding: 0;
  list-style: none;
  color: var(--auth-muted);
  font-size: 12px;
}

.auth-password-rules li { display: flex; align-items: start; gap: 7px; }
.auth-password-rules li span {
  display: grid;
  flex: none;
  place-items: center;
  width: 12px;
  height: 12px;
  margin-block-start: 3px;
  border: 1px solid #615d72;
  border-radius: 50%;
}

.auth-password-rules .auth-rule-met { color: var(--auth-green); }
.auth-password-rules .auth-rule-met span { border-color: currentColor; background: #2a3623; }
.auth-password-rules .auth-rule-met span::after {
  width: 4px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  content: "";
  transform: translateY(-1px) rotate(45deg);
}
.auth-signup-success { border-color: #566a3b; background: #283220; color: #dcf5c2; }

@media (hover: hover) {
  .auth-submit:not([aria-disabled="true"]):hover { filter: brightness(1.09); }
  .auth-reveal:hover { background: #ffffff10; color: var(--auth-text); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-dots i,
  .auth-progress[data-advance] .auth-progress-marker,
  .auth-progress[data-advance] .auth-progress-line::after { animation: none; }
  .auth-submit, .auth-progress-marker, .auth-progress-line::after { transition: none; }
}
.auth-languages{display:flex;justify-content:center;gap:16px;margin-top:22px;font-size:.8rem}
.auth-languages a{color:inherit;opacity:.72}
.auth-languages a:hover,.auth-languages a:focus-visible,html[lang=de] .auth-languages a[lang=de],html[lang=en] .auth-languages a[lang=en]{opacity:1}
