/* =====================================================================
   Anymacs design tokens – ONE source for the team portal and WhatsApp CRM.
   The same file is in anymacs.com/assets/brand/ and crm/client/public/brand/.
   Modes: html[data-am-theme="light" | "gray" | "dark"] (set by a small
   script from the person's saved choice; "auto" follows the device).
   All text colours pass WCAG AA (4.5:1) on the surfaces they are used on
   (checked 2026-10-20). Green #3DBE4E = brand accent; buttons use --am-accent.
   ===================================================================== */
:root, html[data-am-theme="light"] {
  --am-bg: #F2F3F0;          /* page */
  --am-surface: #FAFAF8;     /* cards, header, sidebar (never pure white) */
  --am-surface-2: #ECEEEA;   /* inputs, hover, table head */
  --am-border: #DDE1DB;
  --am-text: #1C211E;        /* headings, main text */
  --am-text-2: #3E4641;      /* body text */
  --am-muted: #5A635D;       /* hints, labels */
  --am-accent-fill: #3DBE4E; /* brand green: logo, active marks, focus */
  --am-accent: #1A7F33;      /* buttons */
  --am-accent-hover: #166D2B;
  --am-on-accent: #FFFFFF;
  --am-accent-text: #18752F; /* green text */
  --am-link: #1A62BD;
  --am-logo-word: #3DBE4E;
  --am-blue-soft: #E3EDFB;  --am-blue-text: #1A5DB3;   /* in progress */
  --am-amber-soft: #FBF0D9; --am-amber-text: #8A5300;  /* paused / waiting */
  --am-green-soft: #E1F4E4; --am-green-text: #1A6E2E;  /* done */
  --am-red-soft: #FBE5E3;   --am-red-text: #B4251B; --am-red-line: #F2C4BF; /* problem */
  --am-gray-soft: #E8EAE6;  --am-gray-text: #4A524C;   /* not started / closed */
  --am-out-bubble: #DDF0E0; --am-chat-bg: #EEF0EB;
  --am-ring: rgba(61, 190, 78, .28);
  --am-hover: rgba(28, 33, 30, .05);
  --am-shadow: 0 1px 2px rgba(28, 33, 30, .05), 0 2px 10px rgba(28, 33, 30, .04);
  --am-shadow-lg: 0 12px 32px rgba(28, 33, 30, .14);
  --am-backdrop: rgba(20, 24, 21, .45);
  --am-font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --am-font-head: "Montserrat", "Figtree", -apple-system, BlinkMacSystemFont, sans-serif;
  --am-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --am-radius: 16px; --am-radius-sm: 10px;
  --am-ease: cubic-bezier(.2, .7, .2, 1); --am-fast: .15s;
  color-scheme: light;
}
html[data-am-theme="gray"] {
  --am-bg: #3B3F3C; --am-surface: #444845; --am-surface-2: #4E524F; --am-border: #585D59;
  --am-text: #E3E6E2; --am-text-2: #CDD2CC; --am-muted: #C3C8C2;
  --am-accent-fill: #4CC75C; --am-accent: #5BCB6A; --am-accent-hover: #6DD37B; --am-on-accent: #102414; --am-accent-text: #8EDC98;
  --am-link: #ADCFFF; --am-logo-word: #E3E6E2;
  --am-blue-soft: #3E4F66;  --am-blue-text: #B9D3FF;
  --am-amber-soft: #5C4E30; --am-amber-text: #F3D08C;
  --am-green-soft: #3B5A41; --am-green-text: #A9E5B1;
  --am-red-soft: #634040;   --am-red-text: #FFB9B2; --am-red-line: #7A4C4A;
  --am-gray-soft: #515652;  --am-gray-text: #D5D9D4;
  --am-out-bubble: #3B5641; --am-chat-bg: #3E423F;
  --am-ring: rgba(76, 199, 92, .32); --am-hover: rgba(255, 255, 255, .05);
  --am-shadow: 0 1px 2px rgba(0, 0, 0, .18); --am-shadow-lg: 0 12px 32px rgba(0, 0, 0, .35); --am-backdrop: rgba(0, 0, 0, .5);
  color-scheme: dark;
}
html[data-am-theme="dark"] {
  --am-bg: #151716; --am-surface: #1D201E; --am-surface-2: #262A27; --am-border: #323733;
  --am-text: #E6E9E5; --am-text-2: #C6CBC5; --am-muted: #9AA19B;
  --am-accent-fill: #3DBE4E; --am-accent: #44C556; --am-accent-hover: #55CD66; --am-on-accent: #0C1A0F; --am-accent-text: #6FD67E;
  --am-link: #7EB3FF; --am-logo-word: #E6E9E5;
  --am-blue-soft: #1C2B40;  --am-blue-text: #93BEFF;
  --am-amber-soft: #3A2E14; --am-amber-text: #F0C46A;
  --am-green-soft: #183121; --am-green-text: #83DB90;
  --am-red-soft: #3D1D1B;   --am-red-text: #FF9A90; --am-red-line: #5A2A26;
  --am-gray-soft: #2A2E2B;  --am-gray-text: #BFC5BF;
  --am-out-bubble: #1B3524; --am-chat-bg: #181B19;
  --am-ring: rgba(61, 190, 78, .38); --am-hover: rgba(255, 255, 255, .04);
  --am-shadow: 0 1px 2px rgba(0, 0, 0, .3); --am-shadow-lg: 0 12px 32px rgba(0, 0, 0, .5); --am-backdrop: rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) {
  :root { --am-fast: 0s; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
