/* Design tokens: the only place that defines colours, shadows, radii and the
   font family (docs/frontend_guidelines.md). Loaded first by every page of the
   customer app, /sys and the Pipedrive panel. */

:root {
  --ink: #14201b;
  --muted: #5f6d66;
  --muted-strong: #4b5952;
  --faint: #87938c; /* decorative only: icons, dividers (3:1, never text) */
  --canvas: #ebeee8;
  --surface: #fff;
  --surface-soft: #f2f4ef;
  --line: #d8dfd9;
  --line-soft: #e6eae5;
  --line-strong: #c4cdc6;
  --neutral-soft: #e9ece9;
  --nav: #172a24;
  --nav-active: #25463b;
  --nav-muted: #aebcb5;
  /* Bridge: zap2crm itself and everything that links to Pipedrive */
  --bridge: #1b6fa3;
  --bridge-strong: #155a85;
  --bridge-soft: #e6f2fa;
  --brand-highlight: #6fd3ff;
  /* WhatsApp conversation only */
  --wa: #2e745c;
  --wa-strong: #245e4b;
  --wa-soft: #e5f1eb;
  --bubble-out: #dff1e8;
  --bubble-out-strong: #cfe6da;
  --conversation-bg: #f1f3ef;
  --accent: var(--bridge);
  --accent-strong: var(--bridge-strong);
  --accent-soft: var(--bridge-soft);
  /* Status */
  --ok: #24603f;
  --ok-soft: #e5f1eb;
  --blue: #46597a;
  --blue-soft: #edf0f6;
  --violet: #725f89;
  --violet-soft: #f1edf6;
  --amber: #8a5a12;
  --amber-soft: #fff3dc;
  --danger: #9a3f3b;
  --danger-soft: #fbeceb;
  /* Status borders (decorative: text or icon always carries the state) */
  --ok-line: #b7d3c3;
  --blue-line: #c4ccdb;
  --amber-line: #e2c48f;
  --danger-line: #d9a6a3;
  --bridge-line: #b9d6ea;
  /* Text on filled colour (buttons, dark tooltips, the sidebar) */
  --ink-inverse: #fff;
  /* Almost white: form fields and alternating rows */
  --surface-subtle: #fbfcfa;
  /* Categorical palettes: identity, never state. Marker colours are the
     ones a user picks (services/conversation_marker_service.COLORS). */
  --marker-slate: #64748b; --marker-slate-soft: #e2e8f0; --marker-slate-ink: #1e293b;
  --marker-violet: #7c3aed; --marker-violet-soft: #ede9fe; --marker-violet-ink: #5b21b6;
  --marker-rose: #e11d48; --marker-rose-soft: #ffe4e6; --marker-rose-ink: #9f1239;
  --marker-amber: #d97706; --marker-amber-soft: #fef3c7; --marker-amber-ink: #92400e;
  --marker-orange: #ea580c; --marker-orange-soft: #ffedd5; --marker-orange-ink: #9a3412;
  --marker-brown: #92400e; --marker-brown-soft: #f2e8df; --marker-brown-ink: #6f3d1b;
  --marker-blue-soft: #dbeafe; --marker-blue-ink: #1e40af; /* legacy, no longer offered */
  --marker-green-soft: #dcfce7; --marker-green-ink: #166534; /* legacy, no longer offered */
  /* Contact avatars and group-author names: sober, >= 5:1 against white and
     the outgoing bubble (static/js/chat.js AVATAR_COLORS). */
  --avatar-1: #2f6f62; --avatar-2: #2f5f8a; --avatar-3: #7d5523; --avatar-4: #66508a;
  --avatar-5: #8c3d58; --avatar-6: #4f5d6b; --avatar-7: #44508f; --avatar-8: #566429;
  --file-pdf: #c0392b;
  --file-doc: #2b6cd1;
  --file-xls: #1f9d55;
  --file-ppt: #d9622b;
  --file-zip: #8a6d3b;
  /* Translucent tints: bases mixed with color-mix(in srgb, var(--x) N%,
     transparent), where N is the opacity the rule needs. A theme changes
     the base, never the percentages. */
  --tint: #000; /* darkens what is behind: hovers, quoted replies, document cards */
  --neutral-tint: #7f7f7f; /* mid grey that reads on any background: reactions, system messages, dividers */
  --spinner-track: #667781; /* the static ring of a loading spinner on a light background */
  --conversation-wash: #efeae2; /* warm wash over the conversation background */
  --preview-pattern: #645849; /* dot pattern of the conversation preview (start chat) */
  --scrim: #0b141a; /* chat overlays: media lightbox, send preview, resend confirmation */
  /* Media players (dark surface) */
  --media-ink: #fff; /* spinners and controls drawn over media and the lightbox */
  --media-bg: #000;
  --media-error-bg: #3a2a2a;
  --media-error-ink: #ffb4a8;
  --media-expired-from: #3b3236;
  --media-expired-to: #1a1518;
  --media-expired-ink: #ffd2c9;
  /* Charts: validated against the bridge blue (GUIA_DO_MOCKUP.md, Estatísticas) */
  --chart-received: #a14d7a;
  /* Call outcomes (validated with the dataviz palette checker; grey = undetermined) */
  --chart-call-answered: #2e7d4f;
  --chart-call-missed: #d97706;
  --chart-call-rejected: #b4423d;
  --chart-call-unknown: #aab5ae;
  /* Categorical series in fixed order (calls per user); validated with the
     dataviz palette checker on #fff: worst adjacent CVD dE 12.3, normal 23.4 */
  --chart-series-1: #1b6fa3;
  --chart-series-2: #d9622b;
  --chart-series-3: #0d9488;
  --chart-series-4: #7c3aed;
  --chart-series-5: #c08a00;
  --chart-series-6: #c2417e;
  /* Sequential heat scale (automation activity), light to dark bridge */
  --heat-2: #b3d4ec;
  --heat-3: #6aa5d2;
  --heat-4: #2c74a8;
  --heat-5: #0f4469;
  --shadow-lg: 0 18px 48px rgba(23, 42, 36, .10);
  /* Veil behind every modal (ui-dialog::backdrop) */
  --backdrop: rgba(20, 32, 27, .45);
  --shadow-md: 0 8px 24px rgba(23, 42, 36, .16);
  --shadow-sm: 0 1px 2px rgba(23, 42, 36, .06), 0 2px 8px rgba(23, 42, 36, .04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  /* Page width: forms and settings read best narrow, tables and charts wide */
  --content-max: 1180px;
  --content-max-wide: 1440px;
  --font-sans: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
