@layer components {
  /* ============================================================
     AUTH LAYOUT: Split-screen sign-in / sign-up
     ============================================================
     Left panel  → branded pitch (dark gradient)
     Right panel → form (clean, light)
     ============================================================ */

  .auth-body {
    min-block-size: 100vh;
    background-color: var(--color-canvas);
    display: block;
  }

  .auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-block-size: 100vh;
  }

  /* ── Left: Brand panel ──────────────────────────────────── */

  .auth-brand {
    background: linear-gradient(
      150deg,
      oklch(40% 0.18 264) 0%,
      oklch(28% 0.14 260) 60%,
      oklch(20% 0.10 255) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-2xl);
    position: relative;
    overflow: hidden;
  }

  /* subtle radial glow behind content */
  .auth-brand::before {
    content: "";
    position: absolute;
    inset-block-start: -20%;
    inset-inline-start: -10%;
    inline-size: 80%;
    block-size: 80%;
    background: radial-gradient(
      ellipse at center,
      oklch(60% 0.20 264 / 0.20) 0%,
      transparent 70%
    );
    pointer-events: none;
  }

  .auth-brand__inner {
    position: relative;
    max-inline-size: 400px;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
  }

  .auth-brand__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }

  .auth-brand__name {
    font-size: var(--text-medium);
    font-weight: var(--font-weight-bold);
    color: oklch(100% 0 0);
    letter-spacing: 0.04em;
  }

  .auth-brand__headline {
    font-size: clamp(var(--text-x-large), 4vw, 2.8rem);
    font-weight: var(--font-weight-black);
    line-height: 1.05;
    color: oklch(100% 0 0);
    margin: 0;
    letter-spacing: -0.01em;
  }

  .auth-brand__sub {
    font-size: var(--text-normal);
    line-height: var(--line-height-loose);
    color: oklch(100% 0 0 / 0.72);
    margin-block-start: var(--space-md);
    margin-block-end: 0;
  }

  .auth-brand__pitch {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .auth-brand__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }

  .auth-brand__feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    color: oklch(100% 0 0 / 0.85);
    font-size: var(--text-small);
    line-height: var(--line-height-normal);
  }

  .auth-brand__feature-icon {
    flex-shrink: 0;
    color: oklch(80% 0.15 160); /* green checkmark */
    margin-block-start: 1px;
  }

  .auth-brand__testimonial {
    margin: 0;
    padding: var(--space-md) var(--space-lg);
    border-inline-start: 3px solid oklch(100% 0 0 / 0.25);
    background: oklch(100% 0 0 / 0.06);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
  }

  .auth-brand__testimonial blockquote {
    margin: 0 0 var(--space-xs) 0;
    font-style: italic;
    color: oklch(100% 0 0 / 0.9);
    font-size: var(--text-small);
    line-height: var(--line-height-loose);
  }

  .auth-brand__testimonial figcaption {
    font-size: var(--text-x-small);
    color: oklch(100% 0 0 / 0.55);
  }

  /* ── Right: Form panel ──────────────────────────────────── */

  .auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-2xl);
    background-color: var(--color-canvas);
  }

  .auth-panel__inner {
    inline-size: 100%;
    max-inline-size: 420px;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
  }

  /* ── Auth form card ───────────────────────────────────────
     Wrap the form content in a subtle card */

  .auth-card {
    background-color: var(--color-canvas);
    border: var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
  }

  .auth-card__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .auth-card__title {
    font-size: var(--text-x-large);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0;
    line-height: var(--line-height-tight);
  }

  .auth-card__subtitle {
    font-size: var(--text-small);
    color: var(--color-text-muted);
    margin: 0;
  }

  /* ── Form sections inside the card ────────────────────── */

  .auth-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }

  .auth-section__label {
    font-size: var(--text-x-small);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    padding-block-end: var(--space-sm);
    border-block-end: var(--border-subtle);
    margin-block-end: 0;
  }

  .auth-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  /* ── Footer / switch links ────────────────────────────── */

  .auth-footer {
    text-align: center;
    font-size: var(--text-small);
    color: var(--color-text-muted);
  }

  .auth-footer a {
    color: var(--color-link);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
  }

  .auth-footer a:hover {
    text-decoration: underline;
  }

  /* ── Responsive: stack below 800px ────────────────────── */

  @media (max-width: 800px) {
    .auth-shell {
      grid-template-columns: 1fr;
    }

    .auth-brand {
      display: none; /* hide brand panel on small screens */
    }

    .auth-panel {
      padding: var(--space-xl) var(--space-md);
      align-items: flex-start;
      padding-block-start: var(--space-3xl);
    }
  }
}
