.auth-shell {
  width: min(100%, 46rem);
  min-height: calc(100vh - 6rem);
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 6rem) 1.25rem;
  display: grid;
  align-items: start;
}

.auth-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 6vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background:
    radial-gradient(circle at 100% 0, rgba(0, 216, 255, .13), transparent 23rem),
    linear-gradient(150deg, rgba(255, 255, 255, .035), transparent 38%),
    var(--panel);
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, .3);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 42%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.auth-heading {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 2rem;
}

.auth-mark { width: 2.8rem; height: auto; margin-top: .15rem; }
.auth-heading .eyebrow { margin: 0; }
.auth-card h1 { margin: .35rem 0 .75rem; font-size: clamp(2.35rem, 8vw, 3.75rem); line-height: .98; letter-spacing: -.06em; }
.auth-lede { max-width: 31rem; margin: 0; color: var(--muted); line-height: 1.6; }

.auth-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 10rem;
  color: var(--muted);
}

.spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(255, 255, 255, .18);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: auth-spin .75s linear infinite;
}

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

.auth-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.auth-option {
  width: 100%;
  min-height: 3.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  margin: 0;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: rgba(255, 255, 255, .04);
  color: #f5f7ff;
  font: inherit;
  font-weight: 780;
  cursor: pointer;
}

.auth-option:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(0, 216, 255, .48); background: rgba(0, 216, 255, .075); }
.auth-option:disabled { cursor: wait; opacity: .62; }
.auth-option-primary { background: rgba(255, 255, 255, .075); }
.auth-option.compact { min-height: 3rem; font-size: .9rem; }

.provider-glyph {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  color: #090b12;
  font-size: .82rem;
  font-weight: 900;
}

.provider-apple { font-size: .7rem; }
.provider-phone { background: rgba(0, 216, 255, .14); color: var(--cyan); border: 1px solid rgba(0, 216, 255, .28); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.35rem 0;
  color: #77829d;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.security-note, .implementation-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  margin-top: 1.1rem;
  padding: 1rem;
  border: 1px solid rgba(0, 216, 255, .18);
  border-radius: 1rem;
  background: rgba(0, 216, 255, .045);
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}

.security-note strong { color: var(--cyan); font-size: .7rem; letter-spacing: .1em; }
.security-note p, .implementation-notice p { margin: 0; }
.implementation-notice { margin-top: 1.5rem; border-color: var(--line); background: rgba(255, 255, 255, .025); }
.implementation-notice > span { color: var(--cyan); }
.implementation-notice strong { color: #f4f6ff; }

.account-summary { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.account-avatar { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 216, 255, .12); border: 1px solid rgba(0, 216, 255, .35); color: var(--cyan); font-weight: 900; }
.account-kicker { margin: 0 0 .18rem; color: var(--cyan); font-size: .65rem; font-weight: 900; letter-spacing: .14em; }
.account-summary h2 { margin: 0; font-size: 1.5rem; }
.account-identity { margin: .25rem 0 0; color: var(--muted); overflow-wrap: anywhere; }

.readiness-card, .link-panel, .phone-panel {
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .025);
}

.readiness-header { display: flex; align-items: center; gap: .65rem; }
.readiness-card p, .link-panel p { margin: .55rem 0 0; color: var(--muted); line-height: 1.55; font-size: .88rem; }
.readiness-dot { width: .65rem; height: .65rem; border-radius: 50%; background: #f9a23b; box-shadow: 0 0 1rem rgba(249, 162, 59, .5); }
.readiness-card[data-readiness="identity-ready"] .readiness-dot { background: #65e6aa; box-shadow: 0 0 1rem rgba(101, 230, 170, .5); }
.readiness-card[data-readiness="phone-required"] .readiness-dot { background: var(--cyan); box-shadow: 0 0 1rem rgba(0, 216, 255, .5); }
.provider-badges { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; }
.provider-badge { padding: .35rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: #dfe5f5; font-size: .7rem; font-weight: 760; }
.link-panel h3 { margin: 0; font-size: 1rem; }
.link-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: .9rem; }

.phone-panel { margin-top: 1.25rem; background: rgba(5, 9, 18, .72); }
.phone-panel-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.phone-panel-heading .eyebrow { margin: 0 0 .25rem; }
.phone-panel h2 { margin: 0; font-size: 1.55rem; }
.icon-button { width: 2.25rem; height: 2.25rem; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: #fff; font: inherit; font-size: 1.3rem; cursor: pointer; }
.icon-button:hover { border-color: var(--cyan); color: var(--cyan); }

.phone-panel form { display: grid; gap: .65rem; }
.phone-panel label { color: #f0f3ff; font-size: .82rem; font-weight: 800; }
.phone-panel input { width: 100%; box-sizing: border-box; padding: .92rem 1rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(255, 255, 255, .045); color: #fff; font: inherit; font-size: 1rem; }
.phone-panel input:focus { outline: 3px solid rgba(0, 216, 255, .28); border-color: var(--cyan); }
.field-help { margin: 0 0 .35rem; color: var(--muted); font-size: .76rem; line-height: 1.5; }

.text-button { display: inline-flex; margin-top: 1rem; padding: .35rem 0; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; }
.text-button:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.auth-status { margin: 1rem 0 0; padding: .85rem 1rem; border: 1px solid rgba(0, 216, 255, .25); border-radius: .85rem; background: rgba(0, 216, 255, .06); color: #dffaff; font-size: .84rem; line-height: 1.5; }
.auth-status[data-type="success"] { border-color: rgba(101, 230, 170, .35); background: rgba(101, 230, 170, .07); color: #dfffee; }
.auth-status[data-type="error"] { border-color: rgba(255, 94, 123, .42); background: rgba(255, 94, 123, .08); color: #ffdce3; }
.auth-footnote { margin: 1rem 0 0; color: #717b92; font-size: .72rem; line-height: 1.5; text-align: center; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 38rem) {
  .auth-shell { padding: 1.5rem .8rem 3rem; }
  .auth-card { border-radius: 1.25rem; padding: 1.25rem; }
  .auth-heading { grid-template-columns: 2.35rem 1fr; gap: .85rem; }
  .auth-mark { width: 2.25rem; }
  .auth-options, .link-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  .auth-option { transition: none; }
}
