/**
 * Guest auth pages — mill design tokens (see .cursor/rules/design-system.mdc).
 * Scoped to body.auth-shell so marketing CSS is not required.
 */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.auth-shell {
  --ink: #111826;
  --ink-2: #3d4a5c;
  --ink-3: #6b7889;
  --page: #eef1f5;
  --card: #ffffff;
  --sub: #f7f9fb;
  --line: #e2e6ec;
  --line-2: #cbd3dd;
  --steel: #14b8a6;
  --steel-soft: #e6faf7;
  --moss: #127355;
  --moss-soft: #e2f2ec;
  --rust: #b2342f;
  --rust-soft: #fbe9e8;
  --ember: #b8600e;
  --ember-soft: #fdf0dd;
  --font-ui: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
  --fs-eyebrow: 11px;
  --ls-eyebrow: 0.16em;
  --fs-caption: 12px;
  --fs-body: 14px;
  --fs-lead: 15px;
  --fs-h2: 16px;
  --fs-h1: 30px;
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --h-control: 42px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --dur: 0.15s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --steel-hover: #0d9488;

  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

html[data-bs-theme='dark'] body.auth-shell {
  --ink: #e8ecf1;
  --ink-2: #aab6c4;
  --ink-3: #7e8b9b;
  --page: #0f1419;
  --card: #171d25;
  --sub: #1e252e;
  --line: #2a323c;
  --line-2: #3a444f;
  --steel: #2dd4bf;
  --steel-soft: #134e4a;
  --moss: #4bb894;
  --moss-soft: #103028;
  --rust: #e07a75;
  --rust-soft: #331a19;
  --ember: #e0a04a;
  --ember-soft: #33240f;
  --steel-hover: #5eead4;
}

body.auth-shell .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

body.auth-shell :where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body.auth-shell *,
  body.auth-shell *::before,
  body.auth-shell *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Layout */
body.auth-shell .auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 64px;
  gap: var(--sp-6);
}

body.auth-shell .auth-page__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
  max-width: 28rem;
}

body.auth-shell .auth-page__logo {
  display: block;
  width: auto;
  height: 72px;
  object-fit: contain;
}

body.auth-shell .auth-page__product {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

body.auth-shell .auth-page__tagline {
  margin: 0;
  font-size: var(--fs-lead);
  color: var(--ink-3);
  max-width: 22rem;
}

body.auth-shell .auth-page__panel {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

body.auth-shell .auth-page__panel-head {
  padding: var(--sp-5) 18px 0;
}

body.auth-shell .auth-page__eyebrow {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-3);
}

body.auth-shell .auth-page__title {
  margin: 0;
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

body.auth-shell .auth-page__lead {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-body);
  color: var(--ink-2);
}

body.auth-shell .auth-page__body {
  padding: var(--sp-5) 18px 18px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

body.auth-shell .auth-page__body > .auth-page__alert,
body.auth-shell .auth-page__body > .auth-page__errors {
  margin: 0;
}

body.auth-shell .auth-page__form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

body.auth-shell .auth-page__field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

body.auth-shell .auth-page__label {
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--ink-3);
}

body.auth-shell .auth-page__input {
  width: 100%;
  height: var(--h-control);
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--card);
  font: 400 14px var(--font-ui);
  color: var(--ink);
}

body.auth-shell .auth-page__input::placeholder {
  color: var(--ink-3);
}

body.auth-shell .auth-page__input:focus {
  border-color: var(--steel);
  outline: none;
}

body.auth-shell .auth-page__input.is-invalid {
  border-color: var(--rust);
}

body.auth-shell .auth-page__error {
  margin: 0;
  font-size: var(--fs-caption);
  color: var(--rust);
}

body.auth-shell .auth-page__errors {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: 12px 14px;
  border: 1px solid #f0d3d1;
  border-radius: var(--r);
  background: var(--rust-soft);
}

html[data-bs-theme='dark'] body.auth-shell .auth-page__errors {
  border-color: #5c2e2c;
}

body.auth-shell .auth-page__alert {
  margin: 0 0 var(--sp-4);
  padding: 12px 14px;
  border: 1px solid #f0d9b8;
  border-radius: var(--r);
  background: var(--ember-soft);
  font-size: var(--fs-caption);
  color: var(--ember);
}

html[data-bs-theme='dark'] body.auth-shell .auth-page__alert {
  border-color: #5c4520;
}

body.auth-shell .auth-page__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

body.auth-shell .auth-page__check {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-body);
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}

body.auth-shell .auth-page__check input {
  width: 16px;
  height: 16px;
  accent-color: var(--steel);
  cursor: pointer;
}

body.auth-shell .auth-page__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  height: var(--h-control);
  padding: 0 18px;
  border: 1px solid var(--steel);
  border-radius: var(--r);
  background: var(--steel);
  color: #fff;
  font: 500 14px/1 var(--font-ui);
  cursor: pointer;
  transition:
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

body.auth-shell .auth-page__submit:hover {
  background: var(--steel-hover);
  border-color: var(--steel-hover);
}

body.auth-shell .auth-page__submit:active {
  transform: translateY(1px);
}

body.auth-shell .auth-page__ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--h-control);
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  font: 500 14px/1 var(--font-ui);
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

body.auth-shell .auth-page__ghost:hover {
  border-color: var(--ink-3);
  background: var(--sub);
}

body.auth-shell .auth-page__foot {
  margin-top: var(--sp-1);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: var(--fs-body);
  color: var(--ink-3);
}

body.auth-shell .auth-page__foot a {
  color: var(--steel);
  font-weight: 500;
  text-decoration: none;
}

body.auth-shell .auth-page__foot a:hover {
  text-decoration: underline;
}

body.auth-shell .auth-page__toolbar {
  position: fixed;
  top: var(--sp-4);
  inset-inline-end: var(--sp-4);
  display: flex;
  gap: var(--sp-2);
}

body.auth-shell .auth-page__icon-btn {
  width: var(--h-control-sm, 34px);
  height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

body.auth-shell .auth-page__icon-btn:hover {
  background: var(--steel-soft);
  color: var(--steel);
}

body.auth-shell .auth-page__icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.auth-shell .auth-page__identity {
  margin: 0;
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--ink);
}

body.auth-shell .auth-page__portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

@media (max-width: 520px) {
  body.auth-shell .auth-page {
    padding: 20px 14px 48px;
    justify-content: flex-start;
    padding-top: 72px;
  }

  body.auth-shell .auth-page__logo {
    height: 56px;
  }

  body.auth-shell .auth-page__row {
    grid-template-columns: 1fr;
  }
}
