/* CRMAA — portal theme for the products that brought their own design system
 *
 * CRI India and ExQ were built with their own token sets (dark cobalt and a
 * dark teal "ServiceNow" scheme) and their own type (Georgia / system UI).
 * Under the shared Hub ribbon they looked like other companies' products.
 * "Develop these portals in parity, with the same format" (2026-11-18,
 * confirmed 2026-11-21).
 *
 * Both products drive almost everything from the same variable names, so
 * this file re-points those names at the standard portal tokens
 * (css/crmaa-portal-tokens.css) instead of rewriting either product. Load it
 * AFTER the product's own tokens.css. Layout, content and behaviour are
 * untouched.
 *
 * How the names map:
 *   --n0..--n6   surfaces, darkest first  ->  #F6F8FC page, white cards, cool greys
 *   --tx / -m / -d   text                 ->  portal ink, muted, dim
 *   --gold, --blue   used as FILLS        ->  brand gold, brand navy
 *   --gold-l, --blue-l used as TEXT       ->  AA-safe gold ink, navy
 * The top nav keeps a navy bar like .exi-nav, so it re-scopes the same names
 * to light-on-navy values.
 */
:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  --n0: #F6F8FC; --n1: #FFFFFF; --n2: #FFFFFF; --n3: #EEF3FA;
  --n4: #E3E9F2; --n5: #C9D6EA; --n6: #9FB3D3;

  --tx: #1A2332; --tx-m: #5B6B84; --tx-d: #66758B;

  --gold: #C8923A; --gold-text: #8A6024;
  --gold-l: #8A6024; --gold-ll: #E8B96A;
  --gold-p: rgba(200,146,58,.10); --gold-b: rgba(200,146,58,.30);

  --blue: #0B3D91; --blue-l: #0B3D91;
  --blue-p: rgba(11,61,145,.07); --blue-b: rgba(11,61,145,.22);
  --royal: #0B3D91; --royal-l: #0E3580; --royal-p: rgba(11,61,145,.07);

  --bd: #E3E9F2; --bd2: #D3DCEA; --bd-g: rgba(200,146,58,.35);
  --cd: #FFFFFF; --cd-h: #F4F7FC;
  --bg-1: #FFFFFF;          /* dashboard dialogs fall back to a dark literal without it */
  --overlay: rgba(7,31,82,.55);
  --nav-bg: #071F52;

  /* Status colours. The dark themes used bright tints (#2AB878, #F5A623)
     that measured 1.9-2.6:1 as text on white; these are the AA shades.
     The pale "-p" washes behind them are unchanged. */
  --green: #15803D; --amber: #B45309; --red: #B91C1C; --violet: #6D28D9;
  --em: #047857; --am: #B45309; --ro: #BE123C; --cy: #0E7490; --vi: #6D28D9;
  --green-l: #15803D;

  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --r: 12px; --r-lg: 16px;
  --sh-sm: 0 1px 3px rgba(7,31,82,.07);
  --sh: 0 1px 3px rgba(7,31,82,.07), 0 4px 14px rgba(7,31,82,.05);
  --sh-lg: 0 8px 32px rgba(7,31,82,.13);
  --sh-blue: 0 2px 10px rgba(11,61,145,.18);
  --sh-gold: 0 0 0 2px var(--gold);
}

body { background: var(--n0); color: var(--tx); font-family: var(--font-body); }

/* Navy top bar, as on every other portal. */
.top-nav {
  --tx: #FFFFFF; --tx-m: rgba(255,255,255,.78); --tx-d: rgba(255,255,255,.6);
  --gold-l: #E8B96A; --blue-l: #E8B96A;
  --bd: rgba(255,255,255,.16); --bd2: rgba(255,255,255,.24);
  --cd: rgba(255,255,255,.06); --cd-h: rgba(255,255,255,.12);
  --n0: #071F52;            /* text colour on the gold primary button */
  background: #071F52;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(200,146,58,.35);
  box-shadow: 0 2px 12px rgba(7,31,82,.3);
}
.top-nav a, .top-nav button { color: var(--tx-m); }
.top-nav .btn-primary { color: #071F52; }

/* Primary actions: gold with navy text, the CRMAA call-to-action. */
.btn-primary {
  background: var(--gold); color: #071F52; border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(200,146,58,.25);
}
.btn-primary:hover:not(:disabled) { background: #E8B96A; }

/* ExQ's dark/light switch: the other portals have one light theme. */
[onclick="toggleTheme()"] { display: none !important; }
