/* DashStack authentication — Figma 0:1945, adapted to the existing A.authPage flows. */
body[data-brand="aura"][data-shell="auth"] {
  --ds-auth-bg: #4880ff;
  --ds-auth-card: #fff;
  --ds-auth-ink: #202224;
  --ds-auth-muted: #64676b;
  --ds-auth-input: #f1f4f9;
  --ds-auth-line: #d8d8d8;
  --ds-auth-link: #3971ed;
  --ds-auth-soft: #eef3ff;
  --ds-auth-error: #c93545;
  --p: #4880ff;
  --p-dark: #376ee9;
  --p-text: var(--ds-auth-link);
  --on-p: #fff;
  --ink: var(--ds-auth-ink);
  --tx: var(--ds-auth-ink);
  --mut: var(--ds-auth-muted);
  --muted: var(--ds-auth-muted);
  --bg: var(--ds-auth-input);
  --card: var(--ds-auth-card);
  --line: var(--ds-auth-line);
  --line-2: var(--ds-auth-line);
  --soft: var(--ds-auth-soft);
  --on-soft: var(--ds-auth-link);
  --soft-2: #d4e1ff;
  --err: var(--ds-auth-error);
  --ring: 0 0 0 3px rgb(72 128 255 / 18%);
  background: var(--ds-auth-bg) !important; /* A.authPage sets an inline legacy background. */
  color: var(--ds-auth-ink);
  font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding: 0;
}

html[data-theme="dark"] body[data-brand="aura"][data-shell="auth"] {
  --ds-auth-bg: #203969;
  --ds-auth-card: #202b40;
  --ds-auth-ink: #f1f4fa;
  --ds-auth-muted: #b4bfd2;
  --ds-auth-input: #2b374e;
  --ds-auth-line: #445168;
  --ds-auth-link: #9bbaff;
  --ds-auth-soft: #2b3e64;
  --ds-auth-error: #ff9ba5;
  --soft-2: #405983;
  color-scheme: dark;
}

html body[data-brand="aura"][data-shell="auth"] main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

html body[data-brand="aura"][data-shell="auth"] .auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: clip;
  background: var(--ds-auth-bg);
  color: var(--ds-auth-ink);
}

html body[data-brand="aura"][data-shell="auth"] .auth::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("/img/dashstack/auth-shape.svg") center / cover no-repeat;
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
  pointer-events: none;
}

html[data-theme="dark"] body[data-brand="aura"][data-shell="auth"] .auth::before {
  opacity: .22;
}

/* Replace the previous decorative animation with the original DashStack artwork. */
html body[data-brand="aura"][data-shell="auth"] .auth > .auth-fx {
  display: none;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-top {
  padding: 24px 40px 0;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html body[data-brand="aura"][data-shell="auth"] .auth .wm,
html body[data-brand="aura"][data-shell="auth"] .auth .wm i {
  color: #fff;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-nav-r {
  display: flex;
  align-items: center;
  gap: 12px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-nav .auth-link {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-nav .auth-cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 20px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 8px;
  background: rgb(255 255 255 / 12%);
  box-shadow: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-nav :is(.auth-link, .auth-cta):hover {
  background: rgb(255 255 255 / 20%);
  transform: none;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-width: 0;
  padding: 48px 24px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card {
  box-sizing: border-box;
  width: min(630px, 100%);
  min-width: 0;
  padding: 48px 56px 44px;
  border: 1px solid rgb(185 185 185 / 30%);
  border-radius: 24px;
  background: var(--ds-auth-card);
  box-shadow: 0 12px 40px rgb(24 57 137 / 7%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--ds-auth-ink);
  overflow-wrap: break-word;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .auth-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 14px;
  background: var(--ds-auth-soft);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .auth-icon span {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--ds-auth-link);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card h1 {
  margin: 0 0 14px;
  color: var(--ds-auth-ink);
  font-family: inherit;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.11px;
  text-align: center;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .sub {
  margin: 0 0 36px;
  color: var(--ds-auth-muted);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .sub b {
  color: var(--ds-auth-ink);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .fld {
  min-width: 0;
  margin: 0 0 24px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card label {
  margin: 0 0 10px;
  color: var(--ds-auth-ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card input.i:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html body[data-brand="aura"][data-shell="auth"] .auth .auth-card select,
html body[data-brand="aura"][data-shell="auth"] .mfa .mfa-code {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--ds-auth-line);
  border-radius: 8px;
  background: var(--ds-auth-input);
  color: var(--ds-auth-ink);
  font-family: inherit;
  font-size: 17px;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card input.i::placeholder {
  color: #8b8f96;
  opacity: 1;
}

html[data-theme="dark"] body[data-brand="aura"][data-shell="auth"] .auth .auth-card input.i::placeholder {
  color: #aab6ca;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card select option {
  background: var(--ds-auth-card);
  color: var(--ds-auth-ink);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card input.i:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
html body[data-brand="aura"][data-shell="auth"] .auth .auth-card select:focus,
html body[data-brand="aura"][data-shell="auth"] .mfa .mfa-code:focus {
  border-color: #4880ff;
  outline: none;
  box-shadow: var(--ring);
}

html body[data-brand="aura"][data-shell="auth"] :is(a, button, input[type="checkbox"], input[type="radio"]):focus-visible {
  outline: 3px solid var(--ds-auth-link);
  outline-offset: 4px;
}

html body[data-brand="aura"][data-shell="auth"] .auth :is(.auth-nav, .auth-foot) a:focus-visible {
  outline-color: #fff;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .pw input.i:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  padding-right: 54px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .pw button {
  right: 8px;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  color: var(--ds-auth-muted);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .pw button:hover {
  background: var(--ds-auth-soft);
  color: var(--ds-auth-link);
}

html body[data-brand="aura"][data-shell="auth"] input:is([type="checkbox"], [type="radio"]) {
  width: 20px;
  height: 20px;
  accent-color: #4880ff;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .auth-opts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 30px;
  font-size: 15px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .auth-opts label.row {
  margin: 0;
  gap: 9px;
  color: var(--ds-auth-muted);
  font-size: 15px;
  font-weight: 600;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card a {
  color: var(--ds-auth-link);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .btn,
html body[data-brand="aura"][data-shell="auth"] .mfa .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  min-height: 56px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #4880ff;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  transition: background-color .15s, border-color .15s;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .btn:hover:not(:disabled),
html body[data-brand="aura"][data-shell="auth"] .mfa .btn:hover:not(:disabled) {
  background: #376ee9;
  transform: none;
  box-shadow: none;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .btn:disabled,
html body[data-brand="aura"][data-shell="auth"] .mfa .btn:disabled {
  background: #4880ff;
  color: #fff;
  opacity: .5;
  box-shadow: none;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .btn.sec {
  border-color: var(--ds-auth-line);
  background: var(--ds-auth-card);
  color: var(--ds-auth-link);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .btn.sec:hover {
  border-color: #4880ff;
  background: var(--ds-auth-soft);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card #lf > .btn {
  display: flex;
  width: min(418px, 100%);
  margin: 0 auto;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .auth-new {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  margin: 26px 0 0;
  color: var(--ds-auth-muted);
  font-size: 17px;
  font-weight: 600;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .auth-new .btn.sec {
  width: auto;
  min-height: 38px;
  height: auto;
  padding: 8px 14px;
  border: 1px solid var(--ds-auth-line);
  border-radius: 8px;
  background: var(--ds-auth-soft);
  color: var(--ds-auth-link);
  font-size: inherit;
  text-decoration: none;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .alt {
  margin: 22px 0 0;
  color: var(--ds-auth-muted);
  font-size: 15px;
  line-height: 1.7;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card :is(.hint, small.mut) {
  display: block;
  margin-top: 7px;
  color: var(--ds-auth-muted);
  font-size: 13px;
  line-height: 1.5;
}

html body[data-brand="aura"][data-shell="auth"] .auth .ferr {
  align-items: flex-start;
  color: var(--ds-auth-error);
  font-size: 14px;
  line-height: 1.5;
}

html body[data-brand="aura"][data-shell="auth"] .auth .ferr svg {
  flex: none;
  margin-top: 3px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .fld.err input.i:not([type="checkbox"]) {
  border-color: var(--ds-auth-error);
  background: var(--ds-auth-input);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .g-wrap {
  margin-bottom: 24px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .g-or {
  margin-top: 20px;
  color: var(--ds-auth-muted);
  font-size: 14px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .otp {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .otp input.i:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  flex: 1;
  width: 0;
  max-width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 8px;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .otp input.i:not([type="checkbox"]):not([type="radio"]):not([type="file"]).filled {
  border-color: #4880ff;
  background: var(--ds-auth-soft);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .kp {
  border-color: var(--ds-auth-line);
  border-radius: 12px;
  background: var(--ds-auth-input);
  color: var(--ds-auth-ink) !important;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .kp:hover {
  border-color: #4880ff;
  background: var(--ds-auth-soft);
  transform: none;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card :is(.kp-t b, .ask legend, .chk-line) {
  color: var(--ds-auth-ink);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card :is(.kp-t small, .kp-hint) {
  color: var(--ds-auth-muted);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .kp-i {
  border-radius: 10px;
  background: #4880ff;
  box-shadow: none;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card :is(.kp-hint, .kind-chip) {
  border: 1px solid var(--soft-2);
  border-radius: 10px;
  background: var(--ds-auth-soft);
  color: var(--ds-auth-muted);
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .kind-chip a {
  color: var(--ds-auth-link) !important;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 40px 24px;
  color: rgb(255 255 255 / 88%);
  font-size: 13px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-foot nav a {
  min-height: 28px;
  color: rgb(255 255 255 / 88%);
  background: transparent;
}

html body[data-brand="aura"][data-shell="auth"] .auth .auth-foot nav a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* MFA stays a real dialog, including close, trusted-device and recovery-code actions. */
html body[data-brand="aura"][data-shell="auth"] dialog.gd-dlg:has(.mfa) {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 40px;
  border: 1px solid var(--ds-auth-line);
  border-radius: 24px;
  background: var(--ds-auth-card);
  color: var(--ds-auth-ink);
  font-family: inherit;
  overflow-y: auto;
}

html body[data-brand="aura"][data-shell="auth"] dialog.gd-dlg:has(.mfa)::backdrop {
  background: rgb(15 32 64 / 50%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

html body[data-brand="aura"][data-shell="auth"] .mfa h2 {
  margin: 0 12px 12px;
  color: var(--ds-auth-ink);
  font-family: inherit;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
}

html body[data-brand="aura"][data-shell="auth"] .mfa .mfa-ic {
  border-radius: 14px;
  background: var(--ds-auth-soft);
  color: var(--ds-auth-link);
}

html body[data-brand="aura"][data-shell="auth"] .mfa .mfa-code {
  height: 64px;
  padding: 0 .5em 0 1em;
  font-size: 26px;
}

html body[data-brand="aura"][data-shell="auth"] .mfa .mfa-trust {
  padding: 16px;
  border-color: var(--ds-auth-line);
  border-radius: 8px;
  background: var(--ds-auth-input);
  color: var(--ds-auth-ink);
}

html body[data-brand="aura"][data-shell="auth"] .mfa .linkish {
  color: var(--ds-auth-link);
}

@media (max-width: 680px) {
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-top {
    padding: calc(16px + env(safe-area-inset-top)) 20px 0;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-body {
    padding: 28px 16px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-card {
    padding: 32px 28px;
    border-radius: 20px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-card h1 {
    font-size: 28px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .sub {
    margin-bottom: 28px;
    font-size: 16px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-foot {
    flex-direction: column;
    justify-content: center;
    padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
    text-align: center;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-foot nav {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-nav-r {
    gap: 3px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-nav .auth-link {
    padding: 8px;
    font-size: 13px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-nav .auth-cta {
    padding: 8px 10px;
    font-size: 13px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-card {
    padding: 28px 22px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-card h1 {
    font-size: 26px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-card label {
    font-size: 16px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-card :is(.auth-opts, .auth-opts label.row) {
    font-size: 13px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .otp {
    gap: 7px;
  }
  html body[data-brand="aura"][data-shell="auth"] .auth .auth-card .otp input.i:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    height: 50px;
    font-size: 22px;
  }
  html body[data-brand="aura"][data-shell="auth"] dialog.gd-dlg:has(.mfa) {
    padding: 28px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body[data-brand="aura"][data-shell="auth"] .auth :is(input, select, a, button) {
    transition: none;
  }
}
