    @font-face {
      font-family: "Geist";
      src: url("/ui/shared/fonts/Geist-Regular.woff2") format("woff2");
      font-weight: 400;
      font-style: normal;
      font-display: swap;
    }
    @font-face {
      font-family: "Geist";
      src: url("/ui/shared/fonts/Geist-Medium.woff2") format("woff2");
      font-weight: 500;
      font-style: normal;
      font-display: swap;
    }
    @font-face {
      font-family: "Geist";
      src: url("/ui/shared/fonts/Geist-SemiBold.woff2") format("woff2");
      font-weight: 600;
      font-style: normal;
      font-display: swap;
    }

    :root {
      --rl-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
      --rl-ink: #16141f;
      --rl-ink-2: #2a2735;
      --rl-body: #45414f;
      --rl-muted: #5e5a70;
      --rl-line: #e6e3ee;
      --rl-surface: #ffffff;
      --rl-surface-2: #f7f6fb;
      --rl-lav-50: #f3f0fd;
      --rl-lav-100: #e9e4fb;
      --rl-lav-400: #b3aaf7;
      --rl-lav-500: #8b7cf6;
      --rl-lav-700: #5b4fc4;
      --rl-lav-800: #4b3fb0;
      --rl-ink-line: #2e2b3a;
      --rl-ink-fg: #f4f2fa;
      --rl-ink-muted: #a8a3ba;
      --rl-danger: #b91c1c;
      --rl-danger-bg: #fdeceb;
      --rl-danger-line: #f5c7c2;
      --rl-radius-control: 8px;
      --rl-radius-frame: 14px;
      --rl-accent: var(--rl-lav-500);
      --rl-accent-strong: var(--rl-lav-700);
      --rl-accent-soft: var(--rl-lav-50);
      --rl-accent-soft-line: var(--rl-lav-100);
    }

    * { box-sizing: border-box; }

    html, body {
      margin: 0;
      padding: 0;
      min-height: 100vh;
      overflow-x: hidden;
    }

    body {
      font-family: var(--rl-font);
      color: var(--rl-body);
      background: var(--rl-surface);
      -webkit-font-smoothing: antialiased;
    }

    a { color: inherit; }

    button, a {
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }

    .rl-skip-link {
      position: absolute;
      left: 1rem;
      top: -3rem;
      z-index: 50;
      background: var(--rl-ink);
      color: var(--rl-ink-fg);
      padding: 10px 16px;
      border-radius: var(--rl-radius-control);
      font-size: 13.5px;
      font-weight: 500;
      text-decoration: none;
      transition: top 150ms ease;
    }
    .rl-skip-link:focus-visible {
      top: 1rem;
      outline: 2px solid var(--rl-lav-400);
      outline-offset: 2px;
    }

    /* Neutral accent for the admin / platform-internal variant only. */
    body[data-portal="admin"] {
      --rl-accent: var(--rl-ink-muted);
      --rl-accent-strong: var(--rl-ink-2);
      --rl-accent-soft: var(--rl-surface-2);
      --rl-accent-soft-line: var(--rl-line);
    }

    .rl-shell {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 1fr;
    }

    /* ===== Left brand panel (desktop) ===== */
    .rl-brand {
      display: none;
      background: var(--rl-ink);
      color: var(--rl-ink-fg);
      position: relative;
      overflow: hidden;
    }

    .rl-brand::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(600px 480px at 15% 12%, rgba(139, 124, 246, 0.16), transparent 60%),
        radial-gradient(520px 420px at 90% 88%, rgba(139, 124, 246, 0.10), transparent 60%);
      pointer-events: none;
    }

    .rl-brand-inner {
      position: relative;
      z-index: 1;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 48px 48px 40px;
    }

    .rl-logo {
      width: 180px;
      height: auto;
      display: block;
    }
    .rl-logo--dark { filter: brightness(0) invert(1); }

    .rl-brand-content {
      margin-top: auto;
      margin-bottom: auto;
      padding-top: 56px;
    }

    .rl-portal-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 14px 6px 10px;
      border-radius: 999px;
      background: rgba(139, 124, 246, 0.16);
      border: 1px solid rgba(139, 124, 246, 0.32);
      color: var(--rl-lav-400);
      font-size: 12.5px;
      font-weight: 500;
      letter-spacing: 0.02em;
      margin-bottom: 22px;
    }
    body[data-portal="admin"] .rl-portal-chip,
    body[data-portal="admin"] .rl-mobile-chip {
      background: rgba(168, 163, 186, 0.14);
      border-color: rgba(168, 163, 186, 0.28);
      color: var(--rl-ink-muted);
    }
    .rl-portal-chip svg { width: 14px; height: 14px; flex: 0 0 auto; }

    .rl-brand-desc {
      font-size: 19px;
      line-height: 1.5;
      font-weight: 500;
      color: #ffffff;
      margin: 0;
      max-width: 320px;
    }

    .rl-brand-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 13px;
      color: var(--rl-ink-muted);
    }

    .rl-brand-back {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      text-decoration: none;
      color: var(--rl-ink-muted);
      padding: 6px 2px;
      border-radius: 6px;
      transition: color 150ms ease;
    }
    .rl-brand-back:hover { color: var(--rl-ink-fg); }
    .rl-brand-back svg { width: 14px; height: 14px; }

    /* ===== Right form panel ===== */
    .rl-form-panel {
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      background: var(--rl-surface);
    }

    .rl-mobile-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 20px 20px 0;
    }

    .rl-logo--mobile { width: 150px; height: auto; filter: brightness(0) invert(1); }

    .rl-mobile-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 12px 5px 8px;
      border-radius: 999px;
      background: rgba(139, 124, 246, 0.16);
      border: 1px solid rgba(139, 124, 246, 0.32);
      color: var(--rl-lav-400);
      font-size: 12px;
      font-weight: 500;
      white-space: nowrap;
    }
    .rl-mobile-chip svg { width: 13px; height: 13px; }

    .rl-form-wrap {
      flex: 1;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding: 28px 20px 40px;
    }

    .rl-card {
      width: 100%;
      max-width: 400px;
    }

    .rl-title {
      margin: 0 0 6px;
      font-size: 26px;
      font-weight: 600;
      color: var(--rl-ink);
      letter-spacing: -0.01em;
    }

    .rl-subtitle {
      margin: 0 0 30px;
      font-size: 14.5px;
      line-height: 1.55;
      color: var(--rl-muted);
    }

    .rl-form { display: flex; flex-direction: column; gap: 18px; }

    .rl-field { display: flex; flex-direction: column; gap: 7px; }

    .rl-label {
      font-size: 13px;
      font-weight: 500;
      color: var(--rl-ink-2);
    }

    .rl-input-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }

    .rl-input-icon {
      position: absolute;
      left: 14px;
      display: flex;
      color: var(--rl-muted);
      pointer-events: none;
    }
    .rl-input-icon svg { width: 17px; height: 17px; }

    .rl-input-wrap input {
      width: 100%;
      height: 46px;
      padding: 0 14px 0 42px;
      border: 1px solid var(--rl-line);
      border-radius: var(--rl-radius-control);
      font-size: 15px;
      font-family: var(--rl-font);
      color: var(--rl-ink);
      background: var(--rl-surface);
      transition: border-color 150ms ease, box-shadow 150ms ease;
    }

    .rl-input-wrap input::placeholder { color: #757087; }

    /* Browsers only draw their own reveal/clear icon while typing; passwordToggle.js adds a permanent one. */
    .rl-input-wrap input::-ms-reveal,
    .rl-input-wrap input::-ms-clear { display: none; }

    .rl-has-toggle input { padding-right: 46px; }

    .rl-pw-toggle {
      position: absolute;
      right: 4px;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      padding: 0;
      border: 0;
      border-radius: 8px;
      background: transparent;
      color: var(--rl-muted);
      cursor: pointer;
    }
    .rl-pw-toggle svg { width: 18px; height: 18px; }
    .rl-pw-toggle:hover { color: var(--rl-ink); }
    .rl-pw-toggle:focus-visible {
      outline: none;
      box-shadow: 0 0 0 3px var(--rl-accent-soft);
    }

    .rl-input-wrap input:hover { border-color: #cfc9e6; }

    .rl-input-wrap input:focus-visible {
      outline: none;
      border-color: var(--rl-accent-strong);
      box-shadow: 0 0 0 3px var(--rl-accent-soft);
    }

    .rl-submit {
      margin-top: 6px;
      height: 46px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      border: none;
      border-radius: var(--rl-radius-control);
      background: var(--rl-ink);
      color: #ffffff;
      font-size: 15px;
      font-weight: 500;
      font-family: var(--rl-font);
      cursor: pointer;
      transition: background-color 150ms ease, transform 80ms ease;
    }
    .rl-submit:hover:not(:disabled) { background: var(--rl-ink-2); }
    .rl-submit:active:not(:disabled) { transform: translateY(1px); }
    .rl-submit:disabled { cursor: not-allowed; opacity: 0.75; }
    .rl-submit:focus-visible {
      outline: 2px solid var(--rl-accent-strong);
      outline-offset: 2px;
    }

    .rl-spinner {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 2px solid rgba(255, 255, 255, 0.35);
      border-top-color: #ffffff;
      animation: rl-spin 700ms linear infinite;
      display: none;
      flex: 0 0 auto;
    }
    @keyframes rl-spin { to { transform: rotate(360deg); } }

    .rl-error {
      display: none;
      align-items: flex-start;
      gap: 9px;
      margin-top: 16px;
      padding: 11px 13px;
      border-radius: var(--rl-radius-control);
      background: var(--rl-danger-bg);
      border: 1px solid var(--rl-danger-line);
      color: var(--rl-danger);
      font-size: 13.5px;
      line-height: 1.45;
    }
    .rl-error.rl-error--visible { display: flex; }
    .rl-error svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }

    .rl-links {
      margin-top: 24px;
      padding-top: 20px;
      border-top: 1px solid var(--rl-line);
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .rl-link-row {
      font-size: 13.5px;
      color: var(--rl-muted);
      text-align: center;
    }

    .rl-link-row a {
      color: var(--rl-accent-strong);
      font-weight: 500;
      text-decoration: none;
    }
    .rl-link-row a:hover { text-decoration: underline; }
    .rl-link-row a:focus-visible {
      outline: 2px solid var(--rl-accent-strong);
      outline-offset: 2px;
      border-radius: 4px;
    }

    /* ===== Two-step verification screens ===== */
    .rl-textbtn {
      margin-top: 4px;
      background: none;
      border: 0;
      padding: 6px;
      font: inherit;
      font-size: 13.5px;
      font-weight: 500;
      color: var(--rl-accent-strong);
      cursor: pointer;
    }
    .rl-textbtn:hover { text-decoration: underline; }
    .rl-textbtn:focus-visible { outline: 2px solid var(--rl-accent-strong); outline-offset: 2px; border-radius: 4px; }

    .rl-steps { margin: 0 0 14px; padding-left: 18px; font-size: 13.5px; line-height: 1.5; color: var(--rl-body); }
    .rl-steps li + li { margin-top: 4px; }
    .rl-qr-wrap { display: flex; justify-content: center; margin: 4px 0 10px; }
    .rl-qr-wrap img { border: 1px solid var(--rl-line); border-radius: 10px; padding: 6px; background: #fff; }
    .rl-secret-label { font-size: 12.5px; color: var(--rl-muted); text-align: center; }
    .rl-secret {
      display: block;
      margin: 4px 0 16px;
      text-align: center;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 14px;
      letter-spacing: 0.04em;
      word-break: break-all;
      color: var(--rl-ink);
    }

    .rl-note { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--rl-body); }
    .rl-recovery-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px 12px;
      padding: 14px;
      border: 1px solid var(--rl-line);
      border-radius: var(--rl-radius-control);
      background: var(--rl-surface-2);
    }
    .rl-recovery-grid code {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 13px;
      color: var(--rl-ink);
    }
    .rl-recovery-actions { display: flex; gap: 8px; margin: 12px 0; }
    .rl-secondary {
      flex: 1;
      height: 40px;
      border: 1px solid var(--rl-line);
      border-radius: var(--rl-radius-control);
      background: var(--rl-surface);
      font: inherit;
      font-size: 14px;
      font-weight: 500;
      color: var(--rl-ink);
      cursor: pointer;
    }
    .rl-secondary:hover { border-color: #cfc9e6; background: var(--rl-surface-2); }
    .rl-check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13.5px; color: var(--rl-body); }
    #recoveryContinue { width: 100%; }

    /* ===== Breakpoints ===== */
    @media (min-width: 900px) {
      .rl-shell { grid-template-columns: minmax(250px, 280px) 1fr; }
      .rl-brand { display: block; }
      .rl-mobile-header { display: none; }
      .rl-brand-inner { padding: 40px; }
      .rl-form-wrap { align-items: center; padding: 40px; }
    }

    @media (min-width: 1280px) {
      .rl-shell { grid-template-columns: minmax(400px, 31%) 1fr; }
      .rl-brand-inner { padding: 56px 56px 44px; }
    }

    /* Mobile/tablet composition: dark branded background (reusing .rl-brand's
       ink + lavender wash) behind a floating white card, instead of the flat
       white full-bleed panel used once the desktop split-panel collapses. */
    @media (max-width: 899px) {
      body {
        background:
          radial-gradient(600px 480px at 15% 0%, rgba(139, 124, 246, 0.16), transparent 60%),
          radial-gradient(520px 420px at 100% 100%, rgba(139, 124, 246, 0.10), transparent 60%),
          var(--rl-ink);
      }
      .rl-form-panel { background: transparent; }
      .rl-card {
        background: var(--rl-surface);
        border-radius: var(--rl-radius-frame);
        padding: 28px 24px;
        box-shadow: 0 24px 48px -20px rgba(22, 20, 31, 0.45), 0 2px 6px rgba(22, 20, 31, 0.25);
      }
    }

    @media (max-width: 430px) {
      .rl-title { font-size: 23px; }
      .rl-form-wrap { padding: 24px 16px 32px; }
      .rl-mobile-header { padding: 16px 16px 0; }
      .rl-card { padding: 24px 18px; }
    }

    @media (prefers-reduced-motion: reduce) {
      .rl-spinner { animation: none; }
      .rl-input-wrap input, .rl-submit, .rl-link-row a, .rl-brand-back { transition: none; }
    }
