.native-auth-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 15% 18%, #fbeadc 0, transparent 42%), var(--canvas);
}
.native-auth-header {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1.35rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.native-auth-header .pw-brand-mark { width: 82px; height: auto; }
.native-auth-header .pw-brand-name { font-size: 1.75rem; }
.native-auth-main {
  flex: 1;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: clamp(1rem, 5vh, 3.5rem) 1rem 2rem;
}
.native-auth-card {
  width: min(100%, 460px);
  padding: 2rem;
  border: 1px solid var(--line, #dde2eb);
  border-top: 4px solid var(--orange, #ed762d);
  border-radius: 1rem;
  background: var(--paper, #fff);
  box-shadow: 0 12px 40px #20294409;
  color: var(--ink, #202944);
}
.native-auth-card *, .native-auth-card *::before, .native-auth-card *::after { box-sizing: border-box; }
.native-auth-card [hidden] { display: none !important; }
.native-auth-card h1 { font-size: 1.9rem; line-height: 1.18; letter-spacing: -.035em; }
.native-auth-card .eyebrow { font-size: .625rem; line-height: 1.55; }
.native-auth-card .native-auth-intro { margin: .8rem 0 1.5rem; }
.native-auth-form { display: grid; gap: 1.2rem; }
.native-auth-field { display: grid; gap: .45rem; min-width: 0; }
.native-auth-field label { font-weight: 700; }
.native-auth-field input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #aeb8cb;
  border-radius: .5rem;
  background: #fff;
  color: var(--ink, #202944);
  padding: .7rem .8rem;
  font: inherit;
  font-size: 1rem;
}
.native-auth-field > input:focus-visible {
  border-color: #516fe0;
  outline: 3px solid #516fe0;
  outline-offset: 3px;
  box-shadow: none;
}
.native-auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .75rem;
}
.native-auth-label-row a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; }
.native-auth-password {
  display: flex;
  overflow: hidden;
  border: 1px solid #aeb8cb;
  border-radius: .5rem;
  background: #fff;
}
.native-auth-password:focus-within {
  border-color: #516fe0;
  outline: 3px solid #516fe0;
  outline-offset: 3px;
}
.native-auth-password input,
.native-auth-password input:focus,
.native-auth-password input:focus-visible {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
}
.native-auth-password-toggle {
  flex: 0 0 46px;
  display: grid;
  width: 46px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-left: 1px solid #d7deea;
  border-radius: 0;
  background: #f7f8fb;
  color: #344466;
}
.native-auth-password-toggle:hover { background: #edf1f7; color: #202944; }
.native-auth-password-toggle:focus-visible { outline: 0; }
.native-auth-password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.native-auth-field .native-auth-code {
  letter-spacing: .2em;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.native-auth-card .native-auth-email {
  color: var(--ink, #202944);
  font-weight: 700;
  overflow-wrap: anywhere;
  margin: -.5rem 0 1rem;
}
.native-auth-card .native-auth-help { font-size: .8rem; line-height: 1.5; }
.native-auth-help:empty { display: none; }
.native-auth-card .native-auth-error {
  padding: .8rem 1rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid #b42332;
  border-radius: .3rem;
  background: #fff1f2;
  color: #8e1c2a;
  line-height: 1.5;
}
.native-auth-submit {
  min-height: 46px;
  border: 1px solid #ce5c17;
  border-radius: .55rem;
  background: var(--orange, #ed762d);
  color: #25170d;
  font-weight: 800;
  padding: .75rem 1rem;
}
.native-auth-submit:hover { background: #f38b4d; }
.native-auth-secondary { margin-top: .7rem; text-align: center; }
.native-auth-secondary button {
  min-height: 44px;
  padding: .55rem .25rem;
  border: 0;
  background: transparent;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.native-auth-card .native-auth-join {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line, #dde2eb);
  text-align: center;
}
.native-auth-join a { display: inline-block; color: var(--ink, #202944); font-weight: 750; padding: .3rem 0; }
.native-auth-back { display: block; text-align: center; min-height: 44px; margin-top: .75rem; padding: .65rem; font-weight: 700; }
.native-auth-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  padding: 1rem 1rem 1.5rem;
  color: var(--muted);
  font-size: .8rem;
}
.native-auth-footer a { display: inline-flex; align-items: center; min-height: 44px; }

.native-auth-dialog {
  width: min(500px, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: #202944;
  box-shadow: 0 28px 90px #10182f42;
}
.native-auth-dialog::backdrop {
  background: rgb(19 27 49 / 58%);
  backdrop-filter: blur(3px);
}
.native-auth-dialog [hidden] { display: none !important; }
.native-auth-dialog-experience {
  --ink: #202944;
  --muted: #5f6b80;
  --paper: #fff;
  --canvas: #f5f6f9;
  --line: #dde2eb;
  --orange: #ed762d;
  --orange-ink: #b4440e;
  position: relative;
  min-height: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--ink);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .875rem;
  line-height: 1.55;
}
.native-auth-dialog-content {
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: inherit;
}
.native-auth-dialog .native-auth-card {
  width: 100%;
  padding-top: 2.75rem;
  box-shadow: none;
}
.native-auth-dialog-close {
  position: absolute;
  z-index: 2;
  top: .75rem;
  right: .75rem;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line, #dde2eb);
  border-radius: 50%;
  background: #fff;
  color: #344466;
}
.native-auth-dialog-close:hover { background: #edf1f7; color: #202944; }
.native-auth-dialog-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.native-auth-dialog-status {
  display: grid;
  min-height: 220px;
  padding: 4rem 2rem 2rem;
  place-items: center;
  align-content: center;
  gap: 1rem;
  border: 1px solid var(--line, #dde2eb);
  border-top: 4px solid var(--orange, #ed762d);
  border-radius: 1rem;
  background: #fff;
  text-align: center;
}
.native-auth-dialog-status p { margin: 0; color: var(--muted, #5f6b80); }
.native-auth-dialog[data-state="error"] .native-auth-dialog-status {
  min-height: auto;
  padding: 1rem 4rem 1rem 1rem;
  border-top-width: 1px;
  border-left: 3px solid #b42332;
  border-radius: .4rem .4rem 0 0;
  background: #fff1f2;
  color: #8e1c2a;
}
.native-auth-dialog[data-state="error"] .native-auth-dialog-status p { color: #8e1c2a; }
.native-auth-dialog[data-state="error"] .native-auth-dialog-spinner { display: none; }
.native-auth-dialog[data-state="error"] .native-auth-dialog-content { border-radius: 0 0 1rem 1rem; }
.native-auth-dialog-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #d9dfeb;
  border-top-color: var(--orange, #ed762d);
  border-radius: 50%;
  animation: native-auth-spin .8s linear infinite;
}
@keyframes native-auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .native-auth-dialog-spinner { animation: none; } }

@media (max-width: 480px) {
  .native-auth-header { padding: .85rem 1rem; gap: .5rem; flex-wrap: wrap; }
  .native-auth-header .pw-brand-mark { width: 66px; }
  .native-auth-header .pw-brand-name { font-size: 1.5rem; }
  .native-auth-header .v3-language { margin-left: auto; }
  .native-auth-main { padding-top: 1rem; }
  .native-auth-card { padding: 1.5rem 1.15rem; }
  .native-auth-card h1 { font-size: 1.65rem; }
  .native-auth-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .native-auth-dialog-content { max-height: calc(100dvh - 1rem); }
  .native-auth-dialog .native-auth-card { padding: 3rem 1.15rem 1.5rem; }
  .native-auth-dialog-close { top: .6rem; right: .6rem; }
}
