/* ═══════════════════════════════════════════════════════════════════════════
   crm_tokens.css — design tokens of the new CRM design.
   Part 1 of the shared Brand layer, copied UNCHANGED from
   markets_advices/shared/css/brand.css (identical in tradingplatform, invest, portalapi).
   Do not edit values here: change the palette per company from Company > Branding,
   which overrides --primary / --primary-2 / --cyan / --buy / --sell at runtime.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Part 1 · Tokens (identical across projects) ─────────────────────────── */
:root {
  --primary: #7c6cff;
  --primary-2: #4f8bff;
  --cyan: #22d3ee;
  --buy: #0aa574;
  --sell: #e5304f;
  --amber: #d98a00;
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 55%, var(--cyan) 100%);
  --buy-bg: color-mix(in srgb, var(--buy) 12%, transparent);
  --sell-bg: color-mix(in srgb, var(--sell) 10%, transparent);
  --amber-bg: color-mix(in srgb, var(--amber) 12%, transparent);
  --focus: color-mix(in srgb, var(--primary) 28%, transparent);

  /* colorful light */
  --bg: color-mix(in srgb, var(--primary) 6%, #f6f7fa);
  --bg-2: color-mix(in srgb, var(--primary) 8%, #eef0f5);
  --surface: #ffffff;
  --surface-2: color-mix(in srgb, var(--primary) 4%, #f7f8fb);
  --surface-3: color-mix(in srgb, var(--primary) 10%, #ebeef3);
  --border: color-mix(in srgb, var(--primary) 14%, #dde1e8);
  --text: #161b26;
  --muted: #647087;
  --shadow: 0 1px 2px rgba(20, 30, 60, .08);
  --shadow-lg: 0 10px 30px rgba(40, 55, 120, .12);
  --btn-glow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent);

  --radius: 10px;
  --radius-sm: 8px;
  --t: .14s ease;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
:root.dark, :root[data-theme="dark"], :root[data-bs-theme="dark"] {
  --buy: #14c38e;
  --sell: #ff5470;
  --amber: #ffb020;
  --buy-bg: color-mix(in srgb, var(--buy) 14%, transparent);
  --sell-bg: color-mix(in srgb, var(--sell) 14%, transparent);
  --amber-bg: color-mix(in srgb, var(--amber) 14%, transparent);

  /* colorful dark */
  --bg: color-mix(in srgb, var(--primary) 7%, #090c12);
  --bg-2: color-mix(in srgb, var(--primary) 9%, #0d1118);
  --surface: color-mix(in srgb, var(--primary) 8%, #10141c);
  --surface-2: color-mix(in srgb, var(--primary) 11%, #161b25);
  --surface-3: color-mix(in srgb, var(--primary) 16%, #1e2531);
  --border: color-mix(in srgb, var(--primary) 16%, #222937);
  --text: #e8ecf3;
  --muted: #8b95a8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 10px 30px rgba(3, 6, 20, .45);
  color-scheme: dark;
}
/* Neutral surface style: plain white / black and greys, no glow. Only the backgrounds change:
   buttons keep the palette gradient, and buy / sell colours still come from the palette. */
:root[data-tone="neutral"] {
  --bg: #f5f5f6;
  --bg-2: #fafafa;
  --surface: #ffffff;
  --surface-2: #f6f6f7;
  --surface-3: #ececee;
  --border: #e4e4e7;
  --text: #18181b;
  --muted: #6b6b73;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .08);
  --btn-glow: none;
}
:root[data-tone="neutral"]:is(.dark, [data-theme="dark"], [data-bs-theme="dark"]) {
  --bg: #000000;
  --bg-2: #0a0a0b;
  --surface: #111112;
  --surface-2: #19191b;
  --surface-3: #232326;
  --border: #27272a;
  --text: #ededef;
  --muted: #8b8b92;
  --shadow: none;
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .55);
}
/* Sahmee surface style (the sahmeeai.com landing look): navy ink in dark mode, slate / white
   in light mode, Poppins, flat brand-colour buttons with a soft brand glow. */
:root[data-tone="sahmee"] {
  --bg: #f1f5f9;
  --bg-2: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #e2e8f0;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --grad: linear-gradient(0deg, var(--primary), var(--primary));
  --btn-glow: 0 10px 24px color-mix(in srgb, var(--primary-2) 25%, transparent);
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, .12);
  --font: 'Poppins', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
:root[data-tone="sahmee"]:is(.dark, [data-theme="dark"], [data-bs-theme="dark"]) {
  --bg: #051628;
  --bg-2: #030e1b;
  --surface: #0a1f38;
  --surface-2: #12294a;
  --surface-3: #1e3557;
  --border: #1b3150;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 50px rgba(1, 8, 20, .55);
}
html[lang="ar"] { --font: 'Cairo', 'Inter', system-ui, sans-serif; }

/* ── Part 1 · Base ───────────────────────────────────────────────────────── */
html body { font-family: var(--font); color: var(--text); letter-spacing: 0; -webkit-font-smoothing: antialiased; }
::selection { background: color-mix(in srgb, var(--primary) 35%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
:root ::-webkit-scrollbar-track { background: transparent; }
:root ::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
:root ::-webkit-scrollbar-thumb:hover { background: var(--muted); }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
