/* ============================================================
   The RHM brand on the client portal (11 Nov 2026, Abbu: "Yes, the portal").
   Source of truth: the RHM brand system (tokens.json) — the signature's blue and navy,
   Sora for headings, Inter for reading, JetBrains Mono for labels, near-square corners,
   the exact arrow mark. Loaded after design-system.css and portal.css, portal pages only.
   ============================================================ */
:root {
  --bg: #FFFFFF; --bg-soft: #F3F6FD;
  --surface: #FFFFFF; --surface-2: #F3F6FD; --surface-3: #E9EEFB;
  --border: #DCE2F2; --border-subtle: #E6EAF5;
  --text: #16213A; --text-2: #2B3550; --text-3: #5B6376; --text-4: #7A8296;
  --accent: #4063D7; --accent-soft: #6A86F0; --accent-dim: #3352BE;
  --accent-bg: #E9EEFB; --accent-on-bg: #16213A;
  --ink: #0A0F1E; --ink-2: #16213A;
  --radius-sm: 4px; --radius: 8px; --radius-lg: 8px; --radius-xl: 16px;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0A0F1E; --bg-soft: #121A30;
  --surface: #121A30; --surface-2: #0E1528; --surface-3: #18223D;
  --border: #263152; --border-subtle: #1E2844;
  --text: #E9EDF8; --text-2: #C9D0E2; --text-3: #9AA3B8; --text-4: #7A8296;
  --accent: #6A86F0; --accent-soft: #8299F4; --accent-dim: #8299F4;
  --accent-bg: #18223D; --accent-on-bg: #C9D3FA;
}
body { font-family: "Inter", "Segoe UI", system-ui, sans-serif; }
h1, h2, h3, .page-title, .auth-copy h1 { font-family: var(--display); letter-spacing: -0.02em; }
h1 em, h2 em, h3 em { font-style: normal; font-weight: inherit; color: var(--accent); }

/* the sidebar: flat RHM ink, the arrow in the brand blue */
.sidebar { background: #0A0F1E !important; border-right: 1px solid #1E2844 !important; }
.brand-mark { width: 32px; height: 32px; border-radius: 0; color: #4063D7; background: none; box-shadow: none !important; }
.sidebar .brand-mark, :root[data-theme="dark"] .brand-mark { color: #6A86F0; }
.brand-link .name { font-family: var(--display); font-weight: 700; letter-spacing: .03em; }

/* the sign-in canvas: RHM navy with the arrow rising off the corner, near-square seam */
.auth-canvas.canvas-blue { background: #0A0F1E url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 420'%3E%3Cpath fill='%2316213A' d='M63 56H367L317 362H253L291 126H52Z'/%3E%3Cpath fill='%2318223D' d='M68 146H268L236 346H191L217 186H61Z'/%3E%3C/svg%3E") no-repeat right -12% bottom -18% / 78% auto !important; border-radius: 0 16px 16px 0 !important; }
.auth-canvas.grain::before, .auth-canvas.grain::after { display: none !important; }
.auth-canvas .brand-mark { color: #6A86F0 !important; }
.auth-copy .eyebrow-c { color: #22C3EE !important; font-family: var(--mono); }
.auth-copy .eyebrow-c::before { background: #22C3EE !important; }
.trust-pill { border-radius: 4px !important; }

/* controls: 52px, near-square */
.btn, .btn-primary, .btn-ink, .btn-soft, .btn-ghost { border-radius: 8px; min-height: 44px; }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: var(--accent-dim); }
:root[data-theme="dark"] .btn-primary { color: #0A0F1E; }
input, select, textarea { border-radius: 8px; }

/* the one main action on the sign-in pages: RHM blue, flat (it was near-black with a heavy shadow) */
.btn-ink { background: #4063D7 !important; color: #FFFFFF !important; border: 0 !important; box-shadow: none !important; }
.btn-ink:hover { background: #3352BE !important; }
.btn-ink:focus-visible { outline: 2px solid #4063D7; outline-offset: 2px; }

/* the small one-task cards (reset password, two-step code): near-square, a hairline instead of a lift */
.pw-card, .center-card { border-radius: 8px !important; box-shadow: none !important; border: 1px solid var(--border) !important; }

/* design review, 11 Nov (UX Pilot Pro, each claim measured on the live page; Abbu: "Yes, fix them") */
/* 1. field edges: WCAG 1.4.11 asks 3:1 for a field's boundary; #DCE2F2 on white was 1.30:1 */
.input, .select, .textarea { border-color: #7F89A3; }                     /* 3.49:1 on white */
:root[data-theme="dark"] .input, :root[data-theme="dark"] .select, :root[data-theme="dark"] .textarea { border-color: #5D6C96; } /* 3.3-3.5:1 */
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
/* 2. field labels were 10.5px: readable size, same quiet colour (6:1) */
.label-mono { font-size: 12px; letter-spacing: .06em; }
/* 3. show-password toggle (assets/js/show-password.js wraps each password field) */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 68px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 0 10px;
  font: 600 12.5px/1 "Inter", system-ui, sans-serif; color: var(--accent); background: none; border: 0; border-radius: 4px; cursor: pointer; }
.pw-toggle:hover { background: var(--accent-bg); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
