.auth-body {
  min-height: 100svh;
  background: #fff;
  color: #182438;
  font-size: 15px;
  line-height: 1.6;
}
.auth-experience {
  --auth-blue: #174ae6;
  --auth-ink: #182438;
  --auth-muted: #667287;
  --auth-line: #dfe5ef;
  min-height: 100svh;
}
.auth-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  gap: 24px;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
}
.auth-header img {
  width: 154px;
  height: auto;
}
.auth-header > a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: #5b677b;
  font-size: 13px;
}
.auth-header > a:hover {
  color: var(--auth-blue);
}
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(100svh - 88px);
  padding: 0;
  isolation: auto;
  overflow: visible;
  background: none;
}
.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px max(40px, calc((100vw - 1200px) / 2));
  padding-right: 64px;
  background: #f0f4ff;
  border-right: 1px solid #e5ebf8;
  overflow: hidden;
}
.auth-story-copy {
  max-width: 450px;
}
.auth-story h2 {
  font-family: Outfit, sans-serif;
  font-size: clamp(34px, 3.35vw, 49px);
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 0 0 24px;
  color: #18336c;
}
.auth-story-copy > p {
  font-size: 16px;
  line-height: 1.7;
  color: #586983;
}
.auth-workflow {
  width: 100%;
  max-width: 400px;
  margin-top: 48px;
}
.workflow-request {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d8e2fb;
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
  color: #435377;
  box-shadow: 0 6px 25px #244ba308;
}
.workflow-spark {
  color: #174ae6;
  font-size: 23px;
  line-height: 1;
}
.workflow-enter {
  margin-left: auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: #f0f4ff;
  border: 1px solid #dfe7fb;
  border-radius: 6px;
  color: #667da8;
}
.workflow-connector {
  height: 27px;
  width: 1px;
  background: #b4c7f4;
  margin: auto;
}
.workflow-hub {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid #c6d5fa;
  border-radius: 16px;
  box-shadow: 0 12px 36px #214fad0a;
}
.workflow-hub img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.workflow-hub > div {
  display: grid;
  gap: 1px;
}
.workflow-hub strong {
  font-family: Outfit, sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: #1e3569;
}
.workflow-hub div > span {
  font-size: 11px;
  color: #586983;
}
.workflow-ready {
  margin-left: auto;
  background: #edf8f3;
  border-radius: 6px;
  color: #237355;
  font-size: 10px;
  padding: 3px 8px;
}
.workflow-lines {
  width: 100%;
  height: 48px;
  color: #b4c7f4;
  display: block;
}
.workflow-devices {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.workflow-devices > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  font-size: 11px;
  color: #596c91;
}
.workflow-devices svg {
  width: 52px;
  height: 52px;
  padding: 10px;
  border: 1px solid #d9e3f9;
  border-radius: 14px;
  background: #f8faff;
  color: #3862bf;
}
.auth-story-foot {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
  color: #586983;
  margin-top: 65px;
}
.auth-trust-dot {
  width: 6px;
  height: 6px;
  background: #428267;
  border-radius: 50%;
  flex-shrink: 0;
}
.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 54px 40px 28px;
  min-width: 0;
}
.auth-card {
  width: min(100%, 400px);
  text-align: left;
  margin: auto 0;
  padding: 20px 0;
}
.auth-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 22px;
}
.auth-card h1 {
  font:
    500 32px/1.2 Outfit,
    sans-serif;
  letter-spacing: -0.035em;
  margin: 0 0 10px;
  color: var(--auth-ink);
}
.auth-subtitle {
  font-size: 14px;
  color: var(--auth-muted);
  line-height: 1.65;
  margin: 0 0 30px;
}
.auth-footer {
  text-align: center;
  font-size: 10px;
  color: #586983;
  margin: 32px 0 0;
  line-height: 1.5;
}
.auth-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  border: 1px solid #d5dce8;
  border-radius: 10px;
  background: #fff;
  color: #25334c;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
}
.auth-provider img {
  width: 20px;
  height: 20px;
}
.auth-provider:hover:not(:disabled) {
  background: #f7f9ff;
  border-color: #b9c9eb;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 23px 0;
  color: #586983;
  font-size: 12px;
  line-height: 20px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: #e8ecf3;
  flex: 1;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.auth-form label {
  font-size: 13px;
  font-weight: 500;
  color: #34425b;
}
.auth-form > input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cfd7e5;
  border-radius: 10px;
  padding: 13px 15px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: #182438;
  box-shadow: 0 1px 2px #18243803;
}
.auth-form > input::placeholder {
  color: #8a95a7;
}
.auth-form > input:focus {
  border-color: #174ae6;
  outline: 3px solid #174ae612;
  outline-offset: 0;
}
.auth-form > input[aria-invalid="true"] {
  border-color: #b4354b;
}
.auth-hint {
  color: #69768c;
  font-size: 12px;
  line-height: 1.6;
  margin: 1px 0 10px;
}
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 49px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #174ae6;
  color: #fff;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 3px 7px #174ae618;
  margin-top: 8px;
}
.auth-submit:hover:not(:disabled) {
  background: #123fc8;
}
.auth-submit:disabled,
.auth-provider:disabled {
  opacity: 0.55;
  cursor: default;
}
.auth-form-help {
  font-size: 12px;
  line-height: 1.7;
  color: #586983;
  text-align: center;
  margin-top: 23px;
}
.auth-availability {
  margin-top: 10px;
}
.auth-text-button,
.auth-back-methods {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  background: transparent;
  color: #174ae6;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.5;
}
.auth-text-button:hover:not(:disabled),
.auth-back-methods:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.auth-text-button:disabled,
.auth-back-methods:disabled {
  color: #718096;
  cursor: default;
}
.auth-back-methods {
  width: 100%;
  margin-top: 14px;
  color: #627189;
}
.auth-error,
.auth-success,
.auth-notice {
  font-size: 12px;
  line-height: 1.65;
  padding: 12px 14px;
  border-radius: 9px;
  text-align: left;
  margin: 0 0 18px;
  border: 1px solid;
}
.auth-error {
  color: #a02c41;
  background: #fff4f5;
  border-color: #f0d3d9;
}
.auth-success {
  color: #246e54;
  background: #f0f9f5;
  border-color: #daeee4;
}
.auth-notice {
  color: #526381;
  background: #f4f7fd;
  border-color: #dfe7f3;
}
.auth-notice a {
  color: #174ae6;
  text-decoration: underline;
}
.auth-login-flow > .auth-error {
  margin-bottom: 18px;
}
.auth-code-heading {
  margin: 4px 0 20px;
}
.auth-code-heading h2 {
  font:
    500 22px/1.3 Outfit,
    sans-serif;
  letter-spacing: -0.02em;
  margin: 0 0 9px;
}
.auth-code-heading p {
  color: #6b778b;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.auth-code-heading strong {
  color: #33425e;
  font-weight: 500;
}
.auth-code-heading .auth-text-button {
  margin-top: 4px;
  min-height: 34px;
}
.auth-code-heading + .auth-success {
  padding: 10px 12px;
  margin-bottom: 20px;
  font-size: 11px;
}
.auth-stage-code .auth-form {
  gap: 12px;
}
.code-control {
  position: relative;
  width: 100%;
  height: 58px;
  isolation: isolate;
}
.code-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  height: 100%;
}
.code-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd8e8;
  border-radius: 10px;
  background: #fff;
  color: #203a70;
  font-size: 24px;
  font-family: Outfit, sans-serif;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px #18243803;
}
.code-placeholder {
  width: 6px;
  height: 6px;
  background: #d6deeb;
  border-radius: 50%;
}
.code-filled {
  background: #f9fbff;
  border-color: #c7d4ee;
}
.code-control:focus-within .code-current {
  border-color: #174ae6;
  background: #f6f9ff;
  box-shadow: 0 0 0 3px #174ae610;
}
.code-invalid .code-slot {
  border-color: #bf5265;
}
.code-control > .auth-code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  color: transparent !important;
  caret-color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  font-size: 16px;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 10px;
  letter-spacing: 0;
  cursor: text;
  padding: 0;
}
.code-control > .auth-code-input::selection {
  background: transparent;
  color: transparent;
}
.auth-resend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  min-height: 44px;
}
.auth-resend > .auth-hint {
  margin: 0;
  font-size: 12px;
}
.resend-button {
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.resend-count {
  display: inline-block;
  min-width: 3ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 11px;
  letter-spacing: 0;
  line-height: 20px;
}
.auth-card :is(button, a):focus-visible {
  outline: 3px solid #8daefa;
  outline-offset: 3px;
}
.auth-progress {
  width: 28px;
  height: 28px;
  border: 2px solid #dbe5fb;
  border-top-color: #174ae6;
  border-radius: 50%;
  margin: 30px auto;
}
.auth-check-copy,
.auth-account-note {
  color: #69768c;
  font-size: 14px;
}
.auth-methods {
  display: grid;
  gap: 12px;
}
.auth-email-symbol {
  color: #174ae6;
  margin: 0 0 18px;
}
.auth-help {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  margin: 24px 0;
}
.auth-account-details {
  margin: 20px 0;
}
.auth-account-details dt {
  font-size: 12px;
  color: #667287;
}
.auth-account-details dd {
  margin: 0 0 12px;
}
@media (min-width: 1500px) {
  .auth-story {
    padding-left: max(72px, calc((100vw - 1250px) / 2));
    padding-right: 100px;
  }
  .auth-card {
    width: 420px;
  }
}
@media (max-width: 1000px) {
  .auth-story {
    padding: 48px 32px;
  }
  .auth-story h2 {
    font-size: 36px;
  }
  .auth-form-panel {
    padding: 40px 30px 24px;
  }
  .auth-workflow {
    margin-top: 36px;
  }
  .auth-story-foot {
    margin-top: 44px;
  }
}
@media (max-width: 760px) {
  .auth-header {
    height: 76px;
    padding: 0 24px;
  }
  .auth-header img {
    width: 136px;
  }
  .auth-header > a {
    font-size: 12px;
  }
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: calc(100svh - 76px);
  }
  .auth-story {
    display: none;
  }
  .auth-form-panel {
    padding: 28px 24px 22px;
  }
  .auth-card {
    width: min(100%, 400px);
    padding: 16px 0;
  }
  .auth-card h1 {
    font-size: 30px;
  }
  .auth-footer {
    margin-top: 32px;
  }
  .auth-subtitle {
    margin-bottom: 26px;
  }
  .auth-mark {
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
  }
}
@media (max-width: 360px) {
  .auth-header {
    padding: 0 18px;
    gap: 10px;
  }
  .auth-header img {
    width: 122px;
  }
  .auth-form-panel {
    padding-inline: 20px;
  }
  .auth-header > a {
    font-size: 11px;
  }
  .code-slots {
    gap: 7px;
  }
  .code-control {
    height: 52px;
  }
  .auth-card h1 {
    font-size: 28px;
  }
  .auth-resend {
    gap: 4px;
  }
  .auth-resend > .auth-hint {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-experience * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto;
  }
}
@media (forced-colors: active) {
  .auth-provider,
  .auth-submit,
  .code-slot {
    border: 1px solid ButtonText;
  }
  .auth-mark,
  .auth-provider img {
    forced-color-adjust: none;
  }
  .code-control:focus-within .code-current {
    outline: 2px solid Highlight;
  }
  .code-placeholder {
    background: CanvasText;
  }
}

/* Fit the sign-in experience to the usable viewport, rather than a tall content minimum. */
.auth-experience {
  --auth-header-height: 80px;
}
.auth-header {
  height: var(--auth-header-height);
}
.auth-shell {
  min-height: 0;
  height: calc(100svh - var(--auth-header-height));
}
.auth-story {
  min-height: 0;
  padding-block: clamp(24px, 5svh, 48px);
}
.auth-story h2 {
  font-size: clamp(32px, 4.5svh, 49px);
}
.auth-workflow {
  margin-top: clamp(20px, 4svh, 44px);
}
.auth-story-foot {
  margin-top: clamp(20px, 4svh, 48px);
}
.auth-form-panel {
  min-height: 0;
  padding-block: clamp(16px, 3svh, 32px);
}
.auth-footer {
  flex-shrink: 0;
  margin-top: 20px;
}
@media (max-height: 850px) {
  .auth-experience {
    --auth-header-height: 68px;
  }
  .auth-header img {
    width: 142px;
  }
  .auth-story h2 {
    margin-bottom: 16px;
    line-height: 1.12;
  }
  .auth-story-copy > p {
    font-size: 14px;
    line-height: 1.6;
  }
  .workflow-request {
    padding-block: 10px;
  }
  .workflow-connector {
    height: 18px;
  }
  .workflow-hub {
    padding: 14px 18px;
  }
  .workflow-lines {
    height: 32px;
  }
  .workflow-devices svg {
    width: 44px;
    height: 44px;
    padding: 8px;
  }
  .auth-card {
    padding-block: 0;
  }
  .auth-mark {
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
  }
  .auth-card h1 {
    font-size: 28px;
    margin-bottom: 8px;
  }
  .auth-subtitle {
    margin-bottom: 22px;
    font-size: 13px;
  }
  .auth-divider {
    margin-block: 18px;
  }
  .auth-form-help {
    margin-top: 16px;
  }
  .auth-footer {
    margin-top: 16px;
  }
  .auth-card:has(.auth-stage-code) > .auth-mark {
    display: none;
  }
  .auth-code-heading {
    margin-bottom: 12px;
  }
  .auth-code-heading h2 {
    font-size: 20px;
    margin-bottom: 7px;
  }
  .auth-code-heading p {
    line-height: 1.6;
  }
  .auth-code-heading + .auth-success {
    margin-bottom: 14px;
  }
  .auth-stage-code .auth-form {
    gap: 9px;
  }
  .auth-stage-code .code-control {
    height: 52px;
  }
  .auth-back-methods {
    margin-top: 6px;
  }
  .auth-resend {
    margin-top: 6px;
  }
}
@media (max-height: 700px) {
  .auth-experience {
    --auth-header-height: 60px;
  }
  .auth-form-panel {
    padding-block: 12px;
  }
  .auth-story {
    padding-block: 20px;
  }
  .auth-story h2 {
    font-size: 32px;
  }
  .auth-workflow {
    margin-top: 20px;
  }
  .auth-story-foot {
    margin-top: 20px;
  }
  .auth-mark {
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
  }
  .auth-subtitle {
    margin-bottom: 16px;
  }
  .auth-divider {
    margin-block: 13px;
  }
  .auth-form-help {
    margin-top: 12px;
    font-size: 11px;
  }
  .auth-footer {
    margin-top: 10px;
  }
  .auth-stage-code .auth-success {
    padding-block: 8px;
    margin-bottom: 10px;
  }
  .auth-code-heading {
    margin-bottom: 8px;
  }
  .auth-stage-code .auth-hint {
    margin-bottom: 4px;
  }
}
@media (max-width: 760px) {
  .auth-experience {
    --auth-header-height: 68px;
  }
  .auth-form-panel {
    padding-inline: 24px;
  }
}
/* Keep every control reachable at high zoom, with a keyboard open, or on a very short screen. */
@media (max-height: 590px) {
  .auth-shell {
    height: auto;
    min-height: calc(100svh - var(--auth-header-height));
  }
}
@media (max-height: 700px) and (max-width: 760px) {
  .auth-experience {
    --auth-header-height: 60px;
  }
  .auth-card:has(.auth-stage-code) > .auth-subtitle {
    margin-bottom: 10px;
  }
  .auth-stage-code .auth-success {
    padding: 6px 10px;
    line-height: 1.5;
    margin-bottom: 8px;
  }
  .auth-code-heading h2 {
    margin-bottom: 5px;
  }
}

/* ---- Align sign-in with the main site: dotted canvas, frosted header, pill controls ---- */
.auth-body { background: transparent; }
.auth-header {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 76px;
  padding: 0 max(3.125%, calc((100% - 2400px) / 2));
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(20, 32, 52, 0.07);
}
.auth-header img { width: 160px; }
.auth-header > a:not(:first-child) {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(20, 32, 52, 0.035);
  box-shadow: inset 0 0 0 1px rgba(20, 32, 52, 0.07);
  color: #3a4659;
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color .2s, color .2s;
}
.auth-header > a:not(:first-child):hover { background: rgba(20, 32, 52, 0.07); color: #142034; }

.auth-shell { min-height: calc(100svh - 76px); }
.auth-story {
  background:
    radial-gradient(60% 50% at 20% 10%, #2e63ff1f, transparent 70%),
    radial-gradient(50% 50% at 90% 95%, #7a4dff1a, transparent 70%),
    rgba(240, 244, 255, 0.55);
  border-right: 1px solid rgba(20, 32, 52, 0.06);
}
.auth-story h2 { color: #142034; font-weight: 500; }
.auth-aurora {
  color: transparent;
  background-image: linear-gradient(100deg, #003fe6 0%, #4a6bff 25%, #7a4dff 50%, #2f9bff 75%, #003fe6 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: aurora-shift 7s ease-in-out infinite alternate;
}
.workflow-request, .workflow-hub {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-color: rgba(20, 32, 52, 0.08);
  box-shadow: 0 10px 30px -16px rgba(20, 32, 52, 0.18);
}

.auth-provider { border-radius: 999px; min-height: 48px; border-color: #dde3ee; background: rgba(255, 255, 255, 0.85); }
.auth-form > input { border-radius: 12px; min-height: 48px; border-color: #dde3ee; }
.auth-form > input:hover { border-color: #c5d0e4; }
.auth-form > input:focus { border-color: #7f9dff; outline: 0; box-shadow: 0 0 0 3px #2e63ff14; }
.auth-submit {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  background: linear-gradient(180deg, #2a5cff 0%, #0a3fe0 55%, #0033c4 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 40, 160, 0.3), 0 10px 22px -10px rgba(0, 63, 230, 0.6);
  transition: transform .2s, box-shadow .25s, filter .25s;
}
.auth-submit:hover:not(:disabled) { background: linear-gradient(180deg, #3a69ff 0%, #124aef 55%, #0039d2 100%); transform: translateY(-2px); }
.auth-submit:disabled { filter: saturate(0.5); opacity: 0.6; box-shadow: none; }
.auth-submit:not(:disabled)::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  animation: rb-sweep 5.5s ease-in-out 1.2s infinite;
}
.auth-footer { color: #586983; }
@media (prefers-reduced-motion: reduce) { .auth-aurora, .auth-submit::before { animation: none; } }
