/* ================================================================
   Auth Pages (login, register) + OAuth Pages (consent, login,
   error, success)
   ================================================================ */

@layer components {
  /* ── Auth (login, register) ── */

  .auth-container {
    max-width: 420px;
    margin: var(--space-16) auto;
    background: var(--color-surface-raised);
    padding: var(--space-10);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }

  .auth-container h1,
  .auth-container h2 {
    margin-bottom: var(--space-2);
    color: var(--color-primary);
  }

  .auth-container .subtitle {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    font-size: var(--font-size-sm);
  }

  .auth-form .form-group {
    margin-bottom: var(--space-5);
  }

  .auth-form label {
    display: block;
    margin-bottom: var(--space-1);
    font-weight: 500;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
  }

  .auth-form input[type="email"],
  .auth-form input[type="password"],
  .auth-form input[type="text"] {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    background: var(--color-surface-raised);
    color: var(--color-text);
    transition: border-color 0.2s ease;
  }

  .auth-form input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 117, 31, 0.15);
  }

  /* ── Select dropdowns (organisatie + partij + rol) ──
     Default browser select chrome clashes with the rounded card styling.
     Match the input styling above, replacing the native arrow with a
     custom chevron rendered via background-image so it inherits brand
     colour. */
  .auth-form select {
    width: 100%;
    padding: var(--space-3);
    padding-right: 2.5rem;  /* room for the chevron */
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: var(--color-surface-raised);
    color: var(--color-text);
    transition: border-color 0.2s ease;
    /* Custom chevron — single SVG, matches color-text-secondary. */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%236b6b6b' d='M4 6l4 4 4-4'/></svg>");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    background-size: 16px;
  }

  .auth-form select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(255, 117, 31, 0.15);
  }

  .auth-form select:disabled {
    background-color: var(--color-surface-sunken);
    color: var(--color-text-tertiary);
    cursor: not-allowed;
  }

  /* ── Segmented toggle (Burger / Professioneel) ──
     Implemented as a radio group with hidden inputs + styled labels so
     keyboard-nav and screen readers still see a proper radiogroup. */
  .auth-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: var(--space-6);
  }

  .auth-toggle input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .auth-toggle label {
    display: block;
    text-align: center;
    padding: var(--space-3) var(--space-4);
    border-radius: calc(var(--radius-md) - 4px);
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    user-select: none;
    margin-bottom: 0;
    font-size: var(--font-size-sm);
  }

  .auth-toggle label:hover {
    color: var(--color-text);
  }

  .auth-toggle input[type="radio"]:checked + label {
    background: var(--color-surface-raised);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
  }

  .auth-toggle input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--color-accent-ink);
    outline-offset: 2px;
  }

  /* ── Consent / opt-in checkboxes (AVG, marketing) ──
     Vertical-aligned with a clickable label that reaches the right
     edge — easy to tap on mobile. */
  .auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    line-height: var(--line-height-snug);
  }

  .auth-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
    accent-color: var(--color-accent);
    cursor: pointer;
  }

  .auth-checkbox--required label::after {
    content: " *";
    color: var(--color-error);
    font-weight: 600;
  }

  .auth-checkbox a {
    color: var(--color-accent-ink);
    text-decoration: underline;
  }

  /* ── Password strength meter ──
     Five-tier bar driven by inline JS (no library). Width snaps to
     [0, 20, 40, 60, 80, 100]% based on a simple length+class scorer. */
  .password-meter {
    margin-top: var(--space-2);
  }

  .password-meter-bar {
    height: 4px;
    background: var(--color-border-subtle);
    border-radius: 2px;
    overflow: hidden;
  }

  .password-meter-fill {
    height: 100%;
    width: 0;
    background: var(--color-error);
    transition: width 0.2s ease, background-color 0.2s ease;
  }

  .password-meter-fill[data-score="1"] { width: 20%; background: var(--color-error); }
  .password-meter-fill[data-score="2"] { width: 40%; background: var(--color-error); }
  .password-meter-fill[data-score="3"] { width: 60%; background: var(--color-accent); }
  .password-meter-fill[data-score="4"] { width: 80%; background: var(--color-success); }
  .password-meter-fill[data-score="5"] { width: 100%; background: var(--color-success); }

  .password-meter-label {
    margin-top: var(--space-1);
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    min-height: 1em;  /* reserve space so the form doesn't jump */
  }

  .auth-submit {
    width: 100%;
    margin-top: var(--space-2);
  }

  .auth-link {
    text-align: center;
    margin-top: var(--space-6);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
  }

  .auth-link a {
    color: var(--color-accent-ink);
    text-decoration: none;
    font-weight: 500;
  }

  .auth-link a:hover {
    text-decoration: underline;
    color: var(--color-accent-ink-hover);
  }

  .auth-error {
    background: var(--color-error-light);
    color: var(--color-error);
    border: 1px solid var(--color-error);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-5);
    font-size: var(--font-size-sm);
  }

  .auth-success {
    background: var(--color-success-light);
    color: var(--color-success);
    border: 1px solid var(--color-success);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-5);
    font-size: var(--font-size-sm);
  }

  .password-hint {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-1);
  }

  .beta-notice {
    padding: var(--space-3) var(--space-4);
    background: var(--color-accent-light);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-4);
  }

  /* ── OAuth Pages (consent, login, error, success) ── */

  .auth-container--wide {
    max-width: 460px;
  }

  .auth-container--center {
    text-align: center;
  }

  .mcp-badge {
    display: inline-block;
    background: var(--color-surface-sunken);
    color: var(--color-text-secondary);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    margin-bottom: var(--space-4);
  }

  /* Consent: user info banner */
  .oauth-user-info {
    background: var(--color-primary-light);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-6);
    font-size: var(--font-size-sm);
    color: var(--color-primary);
  }

  /* Consent: scope checklist */
  .scope-list {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
    list-style: none;
  }

  .scope-list li {
    padding: var(--space-1) 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
  }

  .scope-list li::before {
    content: "\2713";
    color: var(--color-success);
    margin-right: var(--space-2);
    font-weight: bold;
  }

  .oauth-scope-intro {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
  }

  /* Consent + Success: button row */
  .oauth-btn-row {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
  }

  .oauth-btn-row .btn,
  .oauth-btn-row .btn-deny {
    flex: 1;
  }

  /* WS78 2026-05-20 — workspace-scope opt-in checkbox on the
     OAuth consent page. Only rendered for fractie members. */
  .oauth-workspace-optin {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin: var(--space-3) 0;
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    cursor: pointer;
  }

  .oauth-workspace-optin input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 0.2em;
  }

  .oauth-workspace-optin span {
    line-height: 1.45;
  }

  .btn-deny {
    background: var(--color-surface-sunken);
    color: var(--color-text-secondary);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
  }

  .btn-deny:hover {
    background: var(--color-border);
  }

  /* Error: error box */
  .oauth-error-box {
    background: var(--color-error-light);
    color: var(--color-error);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-top: var(--space-4);
    font-size: var(--font-size-sm);
  }

  /* Error: back link */
  .oauth-back-link {
    margin-top: var(--space-6);
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
  }

  /* Success: animated checkmark */
  .oauth-checkmark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--color-success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    font-size: var(--font-size-4xl);
    font-weight: bold;
    animation: oauth-pop 0.35s ease-out;
  }

  @keyframes oauth-pop {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
  }

  /* Success: client connection info */
  .oauth-client-info {
    background: var(--color-success-light);
    border: 1px solid #c6f6d5;
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-6);
    font-size: var(--font-size-sm);
    color: var(--color-success);
  }

  /* Success: redirect note */
  .oauth-redirect-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-6);
  }

  /* Success: button row links */
  .oauth-btn-row a {
    flex: 1;
    text-decoration: none;
    text-align: center;
    display: block;
  }

  /* ── Calendar (list view redesign) ── */

  /* Top bar: year select + search + view toggle */
  .cal-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: var(--space-3);
      margin-bottom: var(--space-4);
  }

  .cal-toolbar select,
  .cal-toolbar input {
      font-family: var(--font-body);
      font-size: var(--font-size-sm);
      padding: 0.45rem var(--space-3);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-sm);
      background: var(--color-surface-raised);
      color: var(--color-text);
  }

  .cal-toolbar select:focus,
  .cal-toolbar input:focus {
      outline: 2px solid var(--color-accent-ink);
      outline-offset: -1px;
  }

  .cal-search {
      flex: 1;
      min-width: 180px;
      max-width: 420px;
  }

  /* Right-side toolbar group: toggle + view buttons */
  .cal-toolbar-right {
      display: flex;
      align-items: center;
      gap: var(--space-3);
      margin-left: auto;
  }

  /* "Incl. zonder stukken" checkbox toggle */
  .cal-toggle-label {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      font-size: var(--font-size-xs);
      color: var(--color-text-secondary);
      cursor: pointer;
      white-space: nowrap;
      user-select: none;
  }

  .cal-toggle-label input[type="checkbox"] {
      accent-color: var(--color-accent);
      width: 14px;
      height: 14px;
      cursor: pointer;
  }

  .cal-view-toggle {
      display: inline-flex;
      gap: var(--space-1);
      margin-left: auto;
  }

  .cal-view-toggle button {
      padding: var(--space-2) var(--space-2);
      border: 1px solid var(--color-border);
      background: var(--color-surface-raised);
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: var(--font-size-sm);
      color: var(--color-primary);
      transition: background 0.15s;
  }

  .cal-view-toggle button:hover {
      background: var(--color-surface-sunken);
  }

  .cal-view-toggle button.active {
      background: var(--color-primary);
      color: white;
      border-color: var(--color-primary);
  }

  /* Filter chips */
  .cal-chips {
      display: flex;
      gap: var(--space-2);
      overflow-x: auto;
      padding-bottom: var(--space-1);
      margin-bottom: var(--space-5);
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
      /* D8 — fade-out trailing chips when overflowing */
      mask-image: linear-gradient(to right, black 90%, transparent 100%);
      -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
  }

  .cal-chip {
      flex-shrink: 0;
      padding: var(--space-1) var(--space-3);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-full);
      background: var(--color-surface-raised);
      color: var(--color-primary);
      font-size: var(--font-size-xs);
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.15s;
      font-family: var(--font-body);
  }

  .cal-chip:hover {
      background: var(--color-surface-sunken);
  }

  .cal-chip.active {
      background: var(--color-primary);
      color: white;
      border-color: var(--color-primary);
  }

  /* Date group headers */
  .cal-date-group {
      position: sticky;
      top: 0;
      z-index: var(--z-sticky);
      background: var(--color-surface);
      padding: var(--space-2) 0;
      border-bottom: 2px solid var(--color-accent);
      margin-top: var(--space-6);
      margin-bottom: var(--space-2);
  }

  .cal-date-group:first-child {
      margin-top: 0;
  }

  .cal-date-group h3 {
      margin: 0;
      font-size: var(--font-size-xs);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--color-primary);
  }

  /* Meeting list rows */
  .cal-meeting {
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      background: var(--color-surface-raised);
      margin-bottom: var(--space-2);
      transition: box-shadow 0.15s;
  }

  .cal-meeting:hover {
      box-shadow: var(--shadow-sm);
  }

  .cal-meeting summary {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: var(--space-3);
      padding: var(--space-3) var(--space-4);
      cursor: pointer;
      list-style: none;
      font-size: var(--font-size-sm);
  }

  .cal-meeting summary::-webkit-details-marker {
      display: none;
  }

  .cal-meeting summary::before {
      content: "\25B6";
      font-size: var(--font-size-xs);
      color: var(--color-text-tertiary);
      transition: transform 0.15s;
      flex-shrink: 0;
  }

  .cal-meeting[open] summary::before {
      transform: rotate(90deg);
  }

  .cal-meeting-date {
      font-weight: 600;
      color: var(--color-primary);
      min-width: 90px;
      font-size: var(--font-size-sm);
  }

  .cal-meeting-name {
      font-weight: 500;
      flex: 1;
      min-width: 0;
  }

  .cal-meeting-name a {
      color: var(--color-text);
      text-decoration: none;
  }

  .cal-meeting-name a:hover {
      color: var(--color-accent-ink);
  }

  .cal-meeting-committee {
      font-size: var(--font-size-xs);
      font-weight: 500;
      color: var(--color-accent-ink);
      white-space: nowrap;
  }

  /* D2 — stat line: tabular-nums for counts */
  .cal-meeting-meta {
      font-size: var(--font-size-sm);
      color: var(--color-text-tertiary);
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
  }

  /* D3 — empty-state badge */
  .cal-no-docs-badge {
      background: var(--color-surface-sunken);
      color: var(--color-text-tertiary);
      font-size: var(--font-size-xs);
      border-radius: var(--radius-full);
      padding: 2px var(--space-3);
      white-space: nowrap;
  }

  /* F5 — VERVALLEN (iBabs-cancelled) variant: subtle red tint */
  .cal-no-docs-badge--vervallen {
      background: color-mix(in srgb, var(--color-error) 12%, var(--color-surface-sunken));
      color: color-mix(in srgb, var(--color-error) 80%, var(--color-text-tertiary));
  }

  /* D5 — "Vraag erover" deeplink on calendar rows */
  .cal-vraag-link {
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      text-decoration: none;
      white-space: nowrap;
      transition: color 0.15s;
      margin-left: auto;
  }

  .cal-vraag-link:hover {
      color: var(--color-accent-ink);
  }

  .cal-meeting-body {
      padding: 0 var(--space-4) var(--space-3) var(--space-8);
      font-size: var(--font-size-sm);
      color: var(--color-text-secondary);
      line-height: var(--line-height-relaxed);
  }

  .cal-meeting-body ul {
      margin: var(--space-1) 0 0;
      padding-left: var(--space-5);
      list-style: disc;
  }

  .cal-meeting-body li {
      margin-bottom: var(--space-1);
      line-height: var(--line-height-normal);
  }

  .cal-meeting-body .cal-more {
      font-style: italic;
      color: var(--color-text-tertiary);
      margin-top: var(--space-1);
  }

  .cal-meeting-empty-msg {
      margin: 0;
      color: var(--color-text-tertiary);
  }

  /* Empty state */
  .cal-empty {
      text-align: center;
      padding: var(--space-12) var(--space-4);
      color: var(--color-text-tertiary);
      font-size: var(--font-size-base);
  }

  /* Mobile: stacked rows */
  @media (max-width: 640px) {
      .cal-toolbar {
          flex-direction: column;
          align-items: stretch;
      }

      .cal-search {
          max-width: 100%;
      }

      .cal-view-toggle {
          margin-left: 0;
      }

      .cal-meeting summary {
          flex-direction: column;
          align-items: flex-start;
          gap: var(--space-1);
      }

      .cal-meeting-date {
          min-width: auto;
      }

      .cal-meeting-body {
          padding-left: var(--space-4);
      }

      .cal-vraag-link {
          margin-left: 0;
      }
  }

  /* Grid view (legacy, hidden by default) */
  .cal-grid-container {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 1px;
      background: var(--color-border);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      min-height: 450px;
      overflow: hidden;
  }

  .cal-grid-header {
      background: var(--color-surface-sunken);
      padding: var(--space-2);
      text-align: center;
      font-weight: 700;
      font-size: var(--font-size-xs);
      text-transform: uppercase;
      border-bottom: 2px solid var(--color-border);
      color: var(--color-text-tertiary);
  }

  .cal-grid-header.busy {
      color: var(--color-text);
  }

  .cal-grid-day {
      background: var(--color-surface);
      padding: var(--space-2);
      border: 1px solid var(--color-border);
      position: relative;
      display: flex;
      flex-direction: column;
      transition: all 0.2s;
      color: var(--color-text-tertiary);
  }

  .cal-grid-day.has-meetings {
      background: var(--color-surface-raised);
      color: var(--color-text);
  }

  .cal-grid-day.today {
      background: var(--color-accent-light);
      box-shadow: inset 0 0 0 2px var(--color-accent);
  }

  .cal-grid-day-number {
      font-weight: 700;
      font-size: var(--font-size-sm);
      margin-bottom: var(--space-1);
      padding-bottom: var(--space-1);
  }

  .cal-grid-day.has-meetings .cal-grid-day-number {
      color: var(--color-text);
      border-bottom: 1px solid var(--color-border);
  }

  .cal-grid-day-empty {
      background: var(--color-surface-sunken);
      padding: var(--space-1);
      border: 1px solid var(--color-border-subtle);
      opacity: 0.3;
  }

  .cal-grid-meeting-link {
      font-size: var(--font-size-xs);
      font-weight: 500;
      padding: 3px var(--space-2);
      border-radius: var(--radius-sm);
      background: var(--color-accent-light);
      color: var(--color-accent-ink);
      margin-bottom: var(--space-1);
      border: 1px solid var(--color-border);
      cursor: pointer;
      text-decoration: none;
      line-height: var(--line-height-snug);
      word-break: break-word;
      display: block;
      box-shadow: var(--shadow-xs);
  }

  /* ════════════════════════════════════════════════════
     Split-screen login page (.auth-split)
     Layout: left form column + right Rotterdam photo
     ════════════════════════════════════════════════════ */

  /* Full-bleed override: the login <main> IS .auth-split, so strip any
     layout.css padding / max-width that would constrain it to a centered box. */
  body:has(main.auth-split) {
    max-width: none;
    margin: 0;
    padding: 0;
    display: block;
    overflow-x: clip;
  }

  main.auth-split,
  main:has(.auth-split__form-col) {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* ── Left: form column ── */

  .auth-split__form-col {
    display: flex;
    flex-direction: column;
    padding: clamp(var(--space-6), 5vw, var(--space-12));
    background: var(--color-surface);
  }

  /* Brand / logo row */
  .auth-split__brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    flex-shrink: 0;
  }

  .auth-split__logo {
    display: block;
    border-radius: var(--radius-md);
  }

  .auth-split__brand-name {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: var(--font-size-xl);
    color: var(--color-primary);
    letter-spacing: var(--letter-spacing-display);
  }

  /* Centered form body */
  .auth-split__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-10) 0;
  }

  .auth-split__title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: var(--font-size-4xl);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-display);
    color: var(--color-primary);
    margin: 0;
  }

  .auth-split__sub {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-top: var(--space-2);
    line-height: var(--line-height-body);
  }

  /* Status banners */
  .auth-split__banner {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    margin-top: var(--space-5);
    line-height: var(--line-height-snug);
    border: 1px solid transparent;
  }

  .auth-split__banner-ic {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
  }

  .auth-split__banner--error {
    background: var(--color-error-light);
    color: var(--color-error);
    border-color: color-mix(in oklab, var(--color-error) 30%, transparent);
  }

  .auth-split__banner--success {
    background: var(--color-success-light);
    color: var(--color-success);
    border-color: color-mix(in oklab, var(--color-success) 30%, transparent);
  }

  .auth-split__banner--info {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: color-mix(in oklab, var(--color-primary) 20%, transparent);
  }

  /* Inline resend button inside the info banner */
  .auth-split__inline-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    font-size: inherit;
    font-weight: 600;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  .auth-split__inline-btn:hover {
    opacity: 0.8;
  }

  /* Form fields */
  .auth-split__fields {
    margin-top: var(--space-7);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
  }

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

  .auth-split__field label {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
  }

  .auth-split__field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
  }

  .auth-split__field-link {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-accent-ink);
    text-decoration: none;
    white-space: nowrap;
  }

  .auth-split__field-link:hover {
    text-decoration: underline;
  }

  .auth-split__field input[type="email"],
  .auth-split__field input[type="password"],
  .auth-split__field input[type="text"] {
    width: 100%;
    height: 46px;
    padding: 0 var(--space-4);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    transition: border-color 0.12s, box-shadow 0.12s;
    box-sizing: border-box;
  }

  .auth-split__field input::placeholder {
    color: var(--color-text-tertiary);
  }

  .auth-split__field input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
  }

  .auth-split__field input:focus-visible {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
  }

  /* Password show/hide wrapper */
  .auth-split__pw-wrap {
    position: relative;
  }

  .auth-split__pw-wrap input {
    padding-right: 44px;
  }

  .auth-split__pw-toggle {
    position: absolute;
    right: 4px;
    top: 4px;
    height: 38px;
    width: 38px;
    border: 0;
    background: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color 0.12s, background 0.12s;
  }

  .auth-split__pw-toggle:hover {
    color: var(--color-text);
    background: var(--color-surface-sunken);
  }

  .auth-split__pw-toggle:focus-visible {
    outline: 2px solid var(--color-accent-ink);
    outline-offset: 1px;
  }

  .auth-split__remember {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: calc(-1 * var(--space-2));
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
  }

  .auth-split__remember input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface-raised);
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
  }

  .auth-split__remember input::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: transform 0.12s;
    box-shadow: inset 1em 1em #fff;
    clip-path: polygon(14% 44%, 0 65%, 43% 100%, 100% 16%, 80% 0, 39% 73%);
  }

  .auth-split__remember input:checked {
    background: var(--color-accent);
    border-color: var(--color-accent);
  }

  .auth-split__remember input:checked::before { transform: scale(1); }
  .auth-split__remember input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-accent-light);
  }

  /* Primary CTA — orange pill */
  .auth-split__submit {
    width: 100%;
    height: 48px;
    margin-top: var(--space-2);
    border: 0;
    border-radius: var(--radius-full);
    background: var(--color-accent-ink);
    color: #fff;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: 650;
    cursor: pointer;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px; /* touch target */
  }

  .auth-split__submit:hover {
    background: var(--color-accent-ink-hover);
  }

  .auth-split__submit:active {
    transform: translateY(1px);
  }

  .auth-split__submit:focus-visible {
    outline: 2px solid var(--color-accent-ink);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px var(--color-accent-light);
  }

  @media (prefers-reduced-motion: reduce) {
    .auth-split__submit:active {
      transform: none;
    }
  }

  /* Register link */
  .auth-split__alt {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-6);
    text-align: center;
  }

  .auth-split__alt a {
    color: var(--color-accent-ink);
    font-weight: 600;
    text-decoration: none;
  }

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

  /* Footer links */
  .auth-split__foot {
    display: flex;
    gap: var(--space-5);
    justify-content: center;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    padding-top: var(--space-6);
    flex-shrink: 0;
  }

  .auth-split__foot a {
    color: inherit;
    text-decoration: none;
  }

  .auth-split__foot a:hover {
    color: var(--color-text-secondary);
  }

  /* ── Right: photo panel ── */

  .auth-split__art-col {
    position: relative;
    overflow: hidden;
    background: var(--color-primary);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(var(--space-8), 4vw, var(--space-12));
  }

  /* Full-bleed photo */
  .auth-split__art-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Subtle green scrim via mix-blend; the ::after gradient is the main overlay */
    opacity: 0.55;
  }

  /* Green scrim gradient over the photo */
  .auth-split__art-col::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      175deg,
      color-mix(in oklab, var(--color-primary) 20%, transparent) 0%,
      color-mix(in oklab, var(--color-primary) 75%, transparent) 60%,
      var(--color-primary) 100%
    );
    pointer-events: none;
  }

  /* Content above scrim */
  .auth-split__art-body {
    position: relative;
    z-index: 1;
    max-width: 460px;
  }

  .auth-split__quote {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: var(--font-size-3xl);
    line-height: var(--line-height-snug);
    color: var(--color-text-on-dark);
    letter-spacing: var(--letter-spacing-display);
    margin: 0;
    text-wrap: balance;
  }

  .auth-split__quote-mark {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--font-size-5xl);
    line-height: 0.4;
    color: var(--color-accent-ink);
    margin-bottom: var(--space-4);
  }

  .auth-split__attr {
    margin-top: var(--space-4);
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: rgba(247, 244, 239, 0.75);
    line-height: var(--line-height-body);
  }

  .auth-split__stats {
    display: flex;
    gap: var(--space-8);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(247, 244, 239, 0.18);
  }

  .auth-split__stat-n {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: var(--font-size-3xl);
    color: var(--color-text-on-dark);
    line-height: 1;
    display: block;
    letter-spacing: var(--letter-spacing-display);
  }

  .auth-split__stat-l {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    color: rgba(247, 244, 239, 0.65);
    margin-top: var(--space-1);
    display: block;
  }

  /* ── Responsive: narrow screens ── */

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

    .auth-split__art-col {
      display: none;
    }

    .auth-split__body {
      padding: var(--space-8) 0;
    }
  }

  /* ════════════════════════════════════════════════════
     Registration split-screen wizard (.reg-*)
     Builds on the .auth-split shell (shared with login):
     brand row + multi-step form + Rotterdam hero panel.
     ════════════════════════════════════════════════════ */

  @keyframes ndStepEnter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }

  /* Register uses a slightly wider, ≥540px form column (prototype
     grid); login keeps the shared 1fr 1fr. Collapses to one column
     on narrow screens (art col hidden by the shared .auth-split rule). */
  .reg-split {
    grid-template-columns: minmax(540px, 1.05fr) 1fr;
  }

  @media (max-width: 860px) {
    .reg-split { grid-template-columns: 1fr; }
  }

  /* ── Brand row (serif wordmark + "Al een account? Inloggen") ── */
  .reg-brandrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-shrink: 0;
  }

  .reg-wordmark {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: var(--font-size-3xl);
    line-height: 1;
    letter-spacing: var(--letter-spacing-display);
    color: var(--color-primary);
    text-decoration: none;
  }

  /* Period sized ≥24px → accent fill is permitted here. */
  .reg-wordmark__dot { color: var(--color-accent); }

  .reg-brandrow__alt {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
  }

  .reg-brandrow__alt a {
    color: var(--color-accent-ink);
    text-decoration: none;
    font-weight: 600;
  }

  .reg-brandrow__alt a:hover { text-decoration: underline; }

  /* ── Centered form body ── */
  .reg-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 452px;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-8) 0;
  }

  /* ── Progress stepper ── */
  .reg-progress {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-8);
  }

  .reg-progress__seg {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
    min-width: 0;
  }

  .reg-progress__dot {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-xs);
    border: 1.5px solid transparent;
  }

  .reg-progress__dot--done   { background: var(--color-accent-ink); color: var(--color-text-on-dark); }
  .reg-progress__dot--active { background: var(--color-primary);    color: var(--color-text-on-dark); }
  .reg-progress__dot--todo {
    background: var(--color-surface-sunken);
    color: var(--color-text-tertiary);
    border-color: var(--color-border-strong);
  }

  .reg-progress__label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-xs);
    white-space: nowrap;
    color: var(--color-text-tertiary);
  }

  .reg-progress__seg--active .reg-progress__label { color: var(--color-primary); }

  /* ── Steps: all visible with JS off; one-at-a-time under .js-wizard ── */
  .reg-form.js-wizard .reg-step { display: none; }

  .reg-form.js-wizard .reg-step.is-active {
    display: block;
    animation: ndStepEnter var(--dur-4) var(--ease) both;
  }

  .reg-step__title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: var(--font-size-4xl);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-display);
    color: var(--color-primary);
    margin: 0 0 var(--space-2);
  }

  .reg-step__title:focus { outline: none; }

  .reg-step__sub {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--font-size-base);
    line-height: var(--line-height-body);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-6);
  }

  /* ── User-type toggle cards (radiogroup) ── */
  .reg-typelabel {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-2);
  }

  .reg-typecards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-1);
  }

  .reg-typecards input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .reg-typecard {
    display: block;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    background: transparent;
    color: var(--color-text-secondary);
    box-shadow: none;
    user-select: none;
    transition: background var(--dur-1) var(--ease),
                color var(--dur-1) var(--ease),
                box-shadow var(--dur-1) var(--ease);
  }

  .reg-typecard:hover { color: var(--color-text); }

  .reg-typecard__title {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-base);
    line-height: 1;
    color: inherit;
  }

  .reg-typecard__sub {
    display: block;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-1);
  }

  .reg-typecards input[type="radio"]:checked + .reg-typecard {
    background: var(--color-surface-raised);
    color: var(--color-primary);
    box-shadow: var(--shadow-xs);
  }

  .reg-typecards input[type="radio"]:focus-visible + .reg-typecard {
    outline: 2px solid var(--color-accent-ink);
    outline-offset: 2px;
  }

  /* ── Field groups: labels, inputs, selects ── */
  .reg-fieldgroup { margin-bottom: var(--space-5); }

  .reg-label {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    margin-bottom: var(--space-2);
  }

  .reg-input,
  .reg-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--font-size-base);
    line-height: var(--line-height-snug);
    color: var(--color-text);
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    transition: border-color var(--dur-1) var(--ease),
                box-shadow var(--dur-1) var(--ease);
  }

  .reg-input::placeholder { color: var(--color-text-tertiary); }

  .reg-input:focus,
  .reg-select:focus,
  .reg-input:focus-visible,
  .reg-select:focus-visible {
    outline: none;
    border-color: var(--color-accent-ink);
    box-shadow: 0 0 0 3px var(--color-accent-light);
  }

  .reg-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    padding-right: var(--space-10);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3 5l4 4 4-4' stroke='%235a6664' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    background-size: 14px;
  }

  .reg-select:disabled {
    background-color: var(--color-surface-sunken);
    color: var(--color-text-tertiary);
    cursor: not-allowed;
  }

  .reg-hint {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-2);
    line-height: var(--line-height-snug);
  }

  .reg-fielderr {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--font-size-sm);
    color: var(--color-error);
    margin: var(--space-2) 0 0;
  }

  /* ── Password strength meter (5-bar) ── */
  .reg-meter { margin-top: var(--space-3); }

  .reg-meter__bars {
    display: flex;
    gap: var(--space-1);
  }

  .reg-meter__bar {
    height: 4px;
    flex: 1;
    border-radius: var(--radius-full);
    background: var(--color-border);
    transition: background var(--dur-2) var(--ease);
  }

  .reg-meter__foot {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-2);
  }

  .reg-meter__hint {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
  }

  .reg-meter__label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    min-height: 1em;
  }

  /* ── Consent (AVG card) + marketing opt-in ── */
  .reg-consent {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    background: var(--color-surface-raised);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color var(--dur-1) var(--ease);
  }

  .reg-consent:hover { border-color: var(--color-border-strong); }

  .reg-optin {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    margin-top: var(--space-3);
    cursor: pointer;
  }

  .reg-consent input[type="checkbox"],
  .reg-optin input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--color-accent-ink);
    cursor: pointer;
  }

  .reg-consent span {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-body);
    color: var(--color-text);
  }

  .reg-optin span {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-body);
    color: var(--color-text-secondary);
  }

  .reg-consent a,
  .reg-optin a {
    color: var(--color-accent-ink);
    font-weight: 600;
    text-decoration: none;
  }

  .reg-consent a:hover,
  .reg-optin a:hover { text-decoration: underline; }

  .reg-secnote {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    line-height: var(--line-height-snug);
    color: var(--color-text-tertiary);
    margin: var(--space-4) 0 0;
    text-align: center;
  }

  /* ── Step navigation + buttons ── */
  .reg-nav {
    display: none;                 /* JS-off: intermediate nav is hidden */
    gap: var(--space-3);
    margin-top: var(--space-7);
  }

  .reg-form.js-wizard .reg-nav { display: flex; }

  .reg-btn {
    border: 0;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-base);
    padding: var(--space-4);
    min-height: 44px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dur-1) var(--ease),
                transform var(--dur-2) var(--ease);
  }

  .reg-btn:focus-visible {
    outline: 2px solid var(--color-accent-ink);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px var(--color-accent-light);
  }

  .reg-btn--primary {
    flex: 1;
    background: var(--color-primary);
    color: var(--color-text-on-dark);
  }

  .reg-btn--primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
  }

  .reg-btn--submit {
    flex: 1;
    background: var(--color-accent-ink);
    color: var(--color-text-on-dark);
  }

  .reg-btn--submit:hover {
    background: var(--color-accent-ink-hover);
    transform: translateY(-2px);
  }

  .reg-btn--primary:active,
  .reg-btn--submit:active { transform: translateY(0); }

  .reg-btn--back {
    flex: 0 0 auto;
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-border-strong);
    padding-inline: var(--space-6);
  }

  .reg-btn--back:hover { background: var(--color-surface-sunken); }

  /* No-JS single submit — hidden once the wizard is live. */
  .reg-nojs-submit {
    display: block;
    width: 100%;
    margin-top: var(--space-6);
  }

  .reg-form.js-wizard .reg-nojs-submit { display: none; }

  /* ── AI-disclosure footer (always visible) ── */
  .reg-aifoot {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    line-height: var(--line-height-body);
    color: var(--color-text-tertiary);
    margin: 0;
    max-width: 452px;
    flex-shrink: 0;
  }

  /* ── Hero panel extras (over the shared .auth-split__art-col) ── */
  .reg-art-eyebrow {
    position: absolute;
    top: clamp(var(--space-8), 4vw, var(--space-12));
    right: clamp(var(--space-8), 4vw, var(--space-12));
    z-index: 1;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in oklab, var(--color-text-on-dark) 72%, transparent);
  }

  .reg-art-quote {
    font-style: italic;
    font-size: var(--font-size-4xl);
    margin: 0 0 var(--space-7);
    text-shadow: 0 1px 20px color-mix(in oklab, var(--color-primary) 50%, transparent);
  }

  .reg-beta-card {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: color-mix(in oklab, var(--color-text-on-dark) 12%, transparent);
    border: 1px solid color-mix(in oklab, var(--color-text-on-dark) 22%, transparent);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
  }

  .reg-beta-card__title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text-on-dark);
    margin-bottom: var(--space-1);
  }

  .reg-beta-card__text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-body);
    color: color-mix(in oklab, var(--color-text-on-dark) 82%, transparent);
  }

  /* Stat trio: no divider (matches the registration mockup). */
  .reg-stats {
    border-top: 0;
    padding-top: 0;
    margin-top: var(--space-8);
    flex-wrap: wrap;
  }

  /* ── Motion: honour reduced-motion ── */
  @media (prefers-reduced-motion: reduce) {
    .reg-form.js-wizard .reg-step.is-active { animation: none; }
    .reg-btn:hover,
    .reg-btn:active { transform: none; }
  }
}
