/* TrustBridge account selection — isolated from the review workspace styles. */
:root {
  color-scheme: light;
  --page: #f3f6f9;
  --card: #fff;
  --ink: #16222f;
  --muted: #4d6273;
  --line: #d8e0e8;
  --teal: #147e73;
  --icon-bg: #e8f7f5;
  --arrow-bg: #eff5f6;
  --hover: #fafffe;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #151f2b;
  --card: #1b2634;
  --ink: #e8eef5;
  --muted: #a3b5c9;
  --line: #334354;
  --teal: #63cdbd;
  --icon-bg: #193e3e;
  --arrow-bg: #233b43;
  --hover: #21313d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--teal); text-underline-offset: 4px; }
button { font: inherit; }
svg { display: block; width: 100%; height: 100%; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 5; padding: 12px 20px; background: var(--card); border-radius: 8px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.onboarding { display: grid; grid-template-columns: 34.25% minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.brand-panel { position: relative; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; padding: 48px clamp(30px, 3.55vw, 64px) 40px; background: #0f1b24; color: #f6f8fa; }
.brand-lockup { display: flex; align-items: center; gap: 24px; }
.brand-mark { flex: 0 0 62px; height: 64px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg, #38cbbb, #2f9e8f 42%, #317cc2); box-shadow: inset 0 1px 0 #ffffff30; color: #fff; font-size: 32px; font-weight: 750; letter-spacing: -2px; }
.brand-name { font-size: clamp(23px, 2.1vw, 32px); font-weight: 650; line-height: 1.2; letter-spacing: -.8px; }
.brand-company { display: block; margin-top: 8px; color: #c1cdd7; font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 5.5px; }
.brand-message { margin-top: clamp(65px, 9vh, 108px); position: relative; z-index: 1; }
.brand-message h2 { margin: 0; font-size: clamp(36px, 4.05vw, 64px); font-weight: 650; line-height: 1.08; letter-spacing: -2px; }
.brand-message p { max-width: 360px; margin: 20px 0 0; color: #a1b7c9; font-size: clamp(14px, 1.3vw, 19px); line-height: 1.6; }
.bridge-art { position: absolute; z-index: -1; width: 112%; height: 55%; object-fit: fill; bottom: 72px; left: -6%; opacity: .9; pointer-events: none; }
.brand-footer { margin-top: auto; padding-top: 300px; font-size: 13px; }
.brand-footer small { display: block; color: #8da6ba; margin-top: 4px; font-size: 12px; }
.selection-panel { display: flex; flex-direction: column; min-width: 0; padding: 36px clamp(32px, 5.1vw, 88px) 64px; background: radial-gradient(ellipse at 90% 100%, #e6f0f32b, transparent 65%); }
.selection-header { display: flex; align-items: center; justify-content: flex-end; gap: 28px; }
.selection-header p { margin: 0; color: var(--muted); font-size: 14px; }
.selection-header a { margin-left: 4px; font-weight: 600; }
.theme-toggle { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; padding: 10px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.theme-toggle:hover { background: var(--card); color: var(--teal); }
.moon-icon, [data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }
.selection-content { width: 100%; max-width: 760px; margin: auto; padding: 76px 0 58px; }
.selection-content:focus { outline: none; }
.eyebrow { margin: 0 0 18px; color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(30px, 3.05vw, 46px); line-height: 1.16; font-weight: 700; letter-spacing: -1.6px; text-wrap: balance; }
.intro { margin: 14px 0 34px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.role-options { display: grid; gap: 17px; }
.role-card { display: flex; align-items: center; gap: 26px; min-height: 126px; padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 0 5px 22px #16222f03; transition: border-color .18s, box-shadow .18s, transform .18s, background .18s; }
.role-card:hover { border-color: var(--teal); background: var(--hover); box-shadow: 0 8px 25px #147e730c; transform: translateY(-2px); }
.role-icon { flex: 0 0 76px; height: 76px; display: grid; place-items: center; padding: 20px; border-radius: 14px; background: var(--icon-bg); color: var(--teal); }
.role-copy { flex: 1; min-width: 0; }
.role-title { display: block; font-size: 24px; font-weight: 650; line-height: 1.3; letter-spacing: -.6px; }
.role-description { display: block; margin-top: 5px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.role-arrow { flex: 0 0 44px; height: 44px; padding: 11px; border-radius: 50%; color: var(--teal); background: var(--arrow-bg); transition: background .18s, color .18s; }
.role-card:hover .role-arrow { background: var(--teal); color: var(--card); }
@media (min-width: 1600px) { .selection-content { max-width: 820px; } }
@media (max-width: 1100px) {
  .brand-panel { padding: 36px 28px; }
  .brand-lockup { gap: 14px; }
  .brand-mark { flex-basis: 48px; height: 50px; font-size: 27px; }
  .brand-company { letter-spacing: 3.5px; }
  .selection-panel { padding: 30px 32px 40px; }
  .role-card { gap: 18px; padding: 20px; }
  .role-icon { flex-basis: 60px; height: 60px; padding: 15px; }
  .role-title { font-size: 22px; }
  .role-description { font-size: 15px; }
}
@media (max-width: 760px) {
  .onboarding { grid-template-columns: 1fr; }
  .brand-panel { padding: 25px 24px 30px; }
  .brand-name { font-size: 24px; }
  .brand-message { margin-top: 30px; }
  .brand-message h2 { max-width: 400px; font-size: 35px; line-height: 1.12; letter-spacing: -1px; }
  .brand-message h2 br { display: none; }
  .brand-message p { max-width: 310px; margin-top: 12px; }
  .bridge-art { width: 70%; height: 100%; left: auto; right: -25%; bottom: -20%; opacity: .35; }
  .brand-footer { display: none; }
  .selection-panel { padding: 24px; }
  .selection-header { justify-content: space-between; gap: 12px; }
  .selection-header p { font-size: 13px; }
  .selection-content { margin: 0 auto; padding: 38px 0 20px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.6px; margin-bottom: 14px; }
  h1 { font-size: 31px; letter-spacing: -1px; }
  .intro { font-size: 15px; margin-bottom: 26px; }
  .role-options { gap: 12px; }
  .role-card { min-height: 110px; padding: 18px 16px; gap: 14px; border-radius: 12px; }
  .role-icon { flex-basis: 48px; height: 52px; padding: 11px; border-radius: 10px; }
  .role-title { font-size: 19px; }
  .role-description { font-size: 13px; }
  .role-arrow { flex-basis: 30px; height: 30px; padding: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Login shares the same brand panel, theme, and responsive shell. */
.login-content { max-width: 480px; }
.login-content h1 { font-size: clamp(36px, 3.4vw, 48px); }
.login-content .intro { margin-bottom: 36px; }
.login-form { display: grid; gap: 24px; }
.login-field label { display: block; margin-bottom: 9px; color: var(--ink); font-size: 14px; font-weight: 600; }
.login-field input { display: block; width: 100%; min-height: 54px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; transition: border-color .18s, box-shadow .18s; }
.login-field input:hover { border-color: var(--muted); }
.login-field input:focus { outline: 2px solid var(--teal); outline-offset: 2px; border-color: var(--teal); box-shadow: 0 0 0 5px #2f9e8f10; }
.login-field input[aria-invalid="true"] { border-color: #c04444; }
.login-submit { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 54px; margin-top: 6px; padding: 14px 20px; border: 1px solid #147e73; border-radius: 10px; background: #147e73; color: #fff; font-size: 16px; font-weight: 650; cursor: pointer; transition: background .18s, box-shadow .18s; }
.login-submit:hover { background: #10675e; box-shadow: 0 5px 18px #147e7320; }
.login-submit:active { background: #0d584f; }
.submit-arrow { width: 20px; height: 20px; }
.login-signup { margin: 32px 0 0; padding-top: 26px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 14px; line-height: 1.8; }
.login-signup a { font-weight: 600; margin-left: 4px; }
.form-alert { padding: 14px 16px; border: 1px solid #e8baba; border-radius: 10px; background: #fff2f2; color: #972e2e; font-size: 14px; }
.form-alert p { margin: 0; }
.login-field .errorlist { margin: 8px 0 0; padding: 0; list-style: none; color: #a93535; font-size: 13px; }
[data-theme="dark"] .form-alert { background: #3b252b; border-color: #754048; color: #ffb7b7; }
[data-theme="dark"] .login-field .errorlist { color: #ffb7b7; }
@media (max-width: 760px) {
  .login-content { margin-inline: auto; }
  .login-content .intro { margin-bottom: 28px; }
  .login-form { gap: 20px; }
  .login-signup { margin-top: 26px; }
}

/* Account creation keeps longer forms comfortably scrollable on every screen. */
.signup-content { max-width: 520px; padding-top: 38px; padding-bottom: 0; }
.signup-back { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 30px; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; }
.signup-back:hover { color: var(--teal); text-decoration: underline; }
.signup-content h1 { font-size: clamp(30px, 2.6vw, 40px); line-height: 1.15; letter-spacing: -1.2px; }
.signup-content .eyebrow { margin-bottom: 14px; }
.signup-content .intro { margin-top: 14px; margin-bottom: 28px; font-size: 16px; }
.signup-form { gap: 19px; }
.signup-form .login-submit { margin-top: 9px; }
.field-help, .field-optional { color: var(--muted); font-size: 13px; font-weight: 400; }
.field-help { margin-top: 8px; }
.field-help ul { margin: 0; padding-left: 20px; }
.login-field input::placeholder { color: var(--muted); opacity: .8; }
@media (max-width: 760px) {
  .signup-content { padding-top: 25px; padding-bottom: 20px; }
  .signup-back { margin-bottom: 25px; }
  .signup-content h1 { font-size: 30px; }
  .signup-content .intro { font-size: 15px; }
}

/* --- TrustBridge additions: disabled role card + local demo login --- */
.role-card.is-disabled { cursor: default; box-shadow: none; opacity: .72; }
.role-card.is-disabled:hover { border-color: var(--line); background: var(--card); transform: none; box-shadow: none; }
.role-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--teal); background: var(--icon-bg); vertical-align: middle; }

.demo-divider { display: flex; align-items: center; gap: 10px; margin: 22px 0 14px; }
.demo-divider::before, .demo-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.demo-divider span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.demo-list { display: flex; flex-direction: column; gap: 10px; }
.demo-login-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 12px 16px; cursor: pointer; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; transition: border-color .16s, background .16s, transform .16s; }
.demo-login-btn:hover { border-color: var(--teal); background: var(--hover); transform: translateY(-1px); }
.demo-login-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.demo-login-btn[disabled] { opacity: .55; cursor: progress; transform: none; }
.demo-login-btn.is-loading .demo-label::after { content: " · signing in…"; color: var(--muted); font-weight: 400; }
.demo-label { font-size: 15px; font-weight: 650; letter-spacing: -.2px; }
.demo-hint { font-size: 13px; color: var(--muted); }
.demo-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.demo-note code { background: var(--arrow-bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.signup-fineprint { margin-top: 14px; font-size: 13px; color: var(--muted); }
