/* Zelio Pulse design system "Majorelle" — tokens (Stage B0, 2026-11-27).
   Spec: /root/work/pulse-product-recovery/ui-redesign/DESIGN_SYSTEM.md. Every colour, size, space, radius and shadow of
   the new interface comes from here. Tokens are namespaced --p-* so they never collide with the old stylesheet
   (style.css, design system v3) while modules migrate one by one. Contrast is checked by scripts/ds-contrast.mjs. */

/* Latin: Inter (self-hosted, same file as the old stylesheet, so the browser loads it once) */
@font-face { font-family: "Inter Variable"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* Arabic script: Noto Sans Arabic, subset to the Arabic blocks, loaded only when a page shows Arabic characters */
@font-face { font-family: "Noto Sans Arabic"; src: url("/fonts/noto-arabic-regular.woff2") format("woff2"); font-weight: 100 500; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Noto Sans Arabic"; src: url("/fonts/noto-arabic-semibold.woff2") format("woff2"); font-weight: 501 900; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

:root {
  /* neutrals: warm grey ("sand") */
  --p-bg: #FAF9F7; --p-surface: #FFFFFF; --p-sunken: #F3F2EF; --p-hover: #EFEDE9;
  --p-border: #E6E3DE; --p-border-strong: #958F86;
  --p-text: #1A1917; --p-text-2: #55524C; --p-text-3: #6B675F;
  /* accent (Majorelle), ink, channel, AI, brand */
  --p-accent: #2D44C6; --p-accent-hover: #2236A8; --p-accent-soft: #EEF0FC; --p-on-accent: #FFFFFF;
  --p-ink: #1A1917; --p-ink-hover: #000000; --p-on-ink: #FFFFFF;
  --p-wa: #0F7A5C; --p-wa-hover: #0B6249; --p-on-wa: #FFFFFF;
  --p-ai: #6B3FD1; --p-ai-soft: #F3EFFD; --p-ai-line: #D9CCF7;
  --p-brand-mark: #0F9B82;
  /* semantic: text colour + soft fill */
  --p-pos: #18794E; --p-pos-soft: #E9F6EF;
  --p-warn: #9A5B00; --p-warn-soft: #FDF3E2;
  --p-neg: #B42318; --p-neg-soft: #FDECEA;
  /* client steps (one state per client, D5) */
  --p-step-new: var(--p-text-3); --p-step-talk: var(--p-accent); --p-step-ready: #C27803; --p-step-won: var(--p-pos); --p-step-lost: #9A958C;
  /* conversation */
  --p-bubble-in: var(--p-surface); --p-bubble-team: #E7F3EE; --p-bubble-ai: var(--p-ai-soft); --p-thread-bg: var(--p-bg);
  /* data visualisation (the first two cover most charts) */
  --p-c1: #2D44C6; --p-c2: #0F9B82; --p-c3: #C27803; --p-c4: #8A4FD8; --p-c5: #B4485D; --p-c6: #5F6B7A; --p-grid: var(--p-border);
  --p-skel: #ECEAE5;

  /* type: one Latin family + Arabic; six sizes */
  --p-font: "Inter Variable", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --p-t-xs: 12px; --p-lh-xs: 16px;
  --p-t-sm: 13px; --p-lh-sm: 18px;
  --p-t-md: 14px; --p-lh-md: 20px;
  --p-t-lg: 16px; --p-lh-lg: 24px;
  --p-t-xl: 20px; --p-lh-xl: 28px;
  --p-t-fig: 28px; --p-lh-fig: 32px;
  --p-w-regular: 400; --p-w-medium: 500; --p-w-semibold: 600;

  /* space (4 px base) */
  --p-s-1: 4px; --p-s-2: 8px; --p-s-3: 12px; --p-s-4: 16px; --p-s-5: 20px; --p-s-6: 24px; --p-s-8: 32px; --p-s-10: 40px; --p-s-12: 48px;
  /* radius */
  --p-r-sm: 4px; --p-r-md: 6px; --p-r-lg: 8px; --p-r-xl: 12px; --p-r-full: 999px;
  /* depth: borders do the work; shadows only for what floats */
  --p-sh-pop: 0 4px 16px -4px rgb(26 25 23 / .14), 0 0 0 1px var(--p-border);
  --p-sh-modal: 0 24px 48px -12px rgb(26 25 23 / .28), 0 0 0 1px var(--p-border);
  --p-focus: 0 0 0 2px var(--p-surface), 0 0 0 4px var(--p-accent);
  /* layout */
  --p-sidebar-w: 232px; --p-sidebar-w-collapsed: 56px; --p-topbar-h: 48px; --p-content-w: 1200px; --p-settings-w: 720px; --p-panel-w: 480px;
  /* motion */
  --p-fast: 120ms; --p-med: 180ms; --p-ease: cubic-bezier(.2, .7, .3, 1);
  /* touch */
  --p-hit: 32px;
}
@media (pointer: coarse), (max-width: 767px) { :root { --p-hit: 40px; } }

:root[data-theme="dark"] {
  --p-bg: #0E0E10; --p-surface: #16161A; --p-sunken: #1C1C21; --p-hover: #222228;
  --p-border: #2A2A31; --p-border-strong: #66666F;
  --p-text: #EDEBE7; --p-text-2: #B3AFA8; --p-text-3: #908C84;
  --p-accent: #8FA0FF; --p-accent-hover: #A9B6FF; --p-accent-soft: #1D2242; --p-on-accent: #0E0E10;
  --p-ink: #EDEBE7; --p-ink-hover: #FFFFFF; --p-on-ink: #0E0E10;
  --p-wa: #3FCB98; --p-wa-hover: #5CD9AA; --p-on-wa: #0E0E10;
  --p-ai: #B49CFF; --p-ai-soft: #241C3D; --p-ai-line: #3D3266;
  --p-brand-mark: #2FD3B2;
  --p-pos: #5FD08F; --p-pos-soft: #14281D;
  --p-warn: #F0B450; --p-warn-soft: #2E2312;
  --p-neg: #FF8A80; --p-neg-soft: #33171A;
  --p-step-ready: #E0A030; --p-step-lost: #7D7970;
  --p-bubble-team: #16302A; --p-thread-bg: #121215;
  --p-c1: #8FA0FF; --p-c2: #2FD3B2; --p-c3: #E0A030; --p-c4: #B49CFF; --p-c5: #F0899C; --p-c6: #9AA4B2;
  --p-skel: #222228;
  --p-sh-pop: 0 6px 20px -4px rgb(0 0 0 / .6), 0 0 0 1px var(--p-border);
  --p-sh-modal: 0 24px 56px -12px rgb(0 0 0 / .75), 0 0 0 1px var(--p-border);
}

/* The one change B0 makes to the current interface: Arabic customer names and messages use the Arabic face instead of
   whatever the system falls back to (the rest of the old stylesheet is untouched). */
body { font-family: var(--p-font); }

@media (prefers-reduced-motion: reduce) { :root { --p-fast: 0ms; --p-med: 0ms; } }
