.auth-page {
  --auth-border: color-mix(in srgb, #8070b2 28%, var(--line));
  --auth-surface: color-mix(in srgb, #ac9ee3 11%, var(--paper));
  --auth-input: color-mix(in srgb, #9581c7 8%, var(--paper));
  min-height: 100dvh;
  padding: clamp(12px, 4vw, 44px);
  font-family: Onest, Inter, "Segoe UI", sans-serif;
  background: radial-gradient(ellipse at 30% 15%, #8c6ad83b, transparent 59%),
    radial-gradient(ellipse at 94% 86%, #3d9f8f32, transparent 54%), var(--canvas);
}

[data-theme="dark"] .auth-page {
  --auth-border: #c0aef34a;
  --auth-surface: #25263cd9;
  --auth-input: #181b2ea6;
  --canvas: #151522;
  --ink: #f1efff;
  --muted: #bcc0d9;
  --primary: #d3c6ff;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  width: min(100%, 820px);
  overflow: hidden;
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  background: var(--auth-surface);
  box-shadow: 0 20px 70px #10102435;
}

.auth-brand {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 13px;
  padding: clamp(24px, 4vw, 52px);
  border-inline-end: 1px solid #cabafa2e;
  color: #f1efff;
  background: radial-gradient(ellipse at 8% 90%, #235452b3, transparent 66%), linear-gradient(145deg, #4a397a, #23263a);
}

.auth-brand img { width: min(100%, 146px); height: auto; margin-bottom: 6px; }
.auth-brand p { max-width: 13ch; margin: 0; font-size: clamp(21px, 3.1vw, 34px); line-height: 1.08; font-weight: 760; letter-spacing: -.035em; }
.auth-brand small { color: #c1c7df; font-size: 14px; }

.auth-form.login {
  align-content: center;
  width: 100%;
  min-width: 0;
  padding: clamp(22px, 4.5vw, 50px);
  gap: 14px;
}

.auth-form.login h1 { margin: 0 0 3px; font-size: clamp(25px, 3.8vw, 34px); line-height: 1.08; letter-spacing: -.025em; overflow-wrap: anywhere; }
.auth-form > p:not(.alert) { margin: 0; color: var(--muted); line-height: 1.5; }
.auth-form .field input { min-height: 44px; border-color: var(--auth-border); border-radius: 10px; background: var(--auth-input); }
.auth-form .button { min-height: 44px; border-radius: 24px; }
.auth-form .button.primary, .auth-form .button.primary:hover {
  border-color: #cdc4ffad;
  color: #17152b;
  background: linear-gradient(120deg, #c8b7f6, #a1b9ff);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.auth-form .button.primary:hover { border-color: #ede4ff; box-shadow: 0 4px 17px #b6a9fa59; }
.auth-form .linked { justify-self: start; text-underline-offset: 3px; }
.auth-form p.auth-status {
  padding: 12px 14px;
  border-inline-start: 3px solid var(--primary);
  border-radius: 8px;
  color: var(--ink);
  background: var(--accent-surface);
}
.auth-links { display: grid; gap: 8px; }

@media (max-width: 650px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); border-radius: 16px; }
  .auth-brand {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 3px 12px;
    padding: 18px 20px;
  }
  .auth-brand img { grid-row: span 2; width: clamp(74px, 23vw, 100px); margin: 0; }
  .auth-brand p { max-width: none; font-size: 17px; }
  .auth-brand small { font-size: 13px; }
}

@media (prefers-reduced-motion: no-preference) {
  .auth-shell { animation: auth-arrive 260ms ease-out both; }
  .auth-brand img { animation: auth-arrive 380ms 45ms ease-out both; }

  @keyframes auth-arrive {
    from { opacity: 0; translate: 0 9px; }
    to { opacity: 1; translate: 0 0; }
  }

}
