:root {
  /* Measured from a live Zoho CRM instance (see contacts-module-spec.md) -
     this is the app-wide design token set, not just for Contacts. */
  --color-bg: #eef1f9;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f7fc;
  --color-chip-bg: #f0f4fc;
  --color-border: #c5c4d3;
  --border-soft: #d5d8e9;
  --border-panel: #dcdbee;
  --border-row: #edf0f4;
  --color-text: #313949;
  --color-text-strong: #202123;
  --color-text-muted: #616e88;
  --color-text-placeholder: #8c91ab;
  --color-primary: #5464f2;
  --color-primary-hover: #124dc3;
  --color-primary-contrast: #ffffff;
  --color-primary-gradient: linear-gradient(180deg, #5767f6 4.69%, #124dc3 100%);
  --color-brand-accent: #5464f2;
  --color-danger: #f14949;
  --color-danger-bg: #ffecec;
  --color-warning: #c46a0f;
  --color-warning-bg: #fdeddd;
  --color-success: #12aa67;
  --color-success-bg: #ddf8ec;
  --color-info-bg: #f0f1ff;
  --color-link: #5464f2;
  --focus-ring: 0 0 6px 0 rgba(76, 94, 253, 0.5);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.15);
  --radius-sm: 6px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --font-family: "Inter", "DM Sans", system-ui, -apple-system, sans-serif;
  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --topbar-h: 52px;
  --sidebar-w: 200px;

  /* Sidebar: dark navy, per the measured spec. */
  --sidebar-bg: #223458;
  --sidebar-active-bg: #31446f;
  --sidebar-text: #c2cbde;
  --sidebar-text-active: #ffffff;

  /* Deals Kanban stage colors, per deals-module-spec.md. */
  --stage-open-bg: #daf5f7; --stage-open-border: #cfe9ea; --stage-open-accent: #99d1d3;
  --stage-won-bg: #dff7e4; --stage-won-border: #c7e8ce; --stage-won-accent: #93cb9d;
  --stage-lost-bg: #fcdfdf; --stage-lost-border: #f2d1d1; --stage-lost-accent: #f0aeae;
  --kanban-empty-col: #dfe4ef;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  --fab-shadow: 0 6px 15px rgba(76, 94, 253, 0.5);

  /* Per-module accent colors, matching Zoho CRM's colored sidebar icons. */
  --accent-home: #5464f2;
  --accent-leads: #e0367c;
  --accent-contacts: #5464f2;
  --accent-accounts: #8fa9d1;
  --accent-deals: #12aa67;
  --accent-tasks: #0e8f8f;
  --accent-reports: #d9534f;
  --accent-meetings: #8e5cf7;
  --accent-calls: #f59e0b;
  --accent-expansion: #0f9d8a;
  --accent-presales: #3b82f6;
}

:root[data-theme="dark"] {
  --color-bg: #0f1620;
  --color-surface: #16202c;
  --color-surface-alt: #1c2836;
  --color-chip-bg: #1c2836;
  --color-border: #2a3a4c;
  --border-soft: #2a3a4c;
  --border-panel: #2a3a4c;
  --border-row: #223045;
  --color-text: #e6edf3;
  --color-text-strong: #ffffff;
  --color-text-muted: #93a3b5;
  --color-primary: #7c8cf5;
  --color-primary-hover: #9aa6f7;
  --color-primary-contrast: #0a0f2a;
  --color-primary-gradient: linear-gradient(180deg, #7c8cf5 4.69%, #4a5fd6 100%);
  --color-brand-accent: #7c8cf5;
  --color-danger: #f87171;
  --color-danger-bg: #2a1414;
  --color-warning: #f5a35c;
  --color-warning-bg: #2a1e10;
  --color-success: #4ade80;
  --color-success-bg: #10261a;
  --color-info-bg: #232c52;
  --color-link: #7c8cf5;
  --sidebar-bg: #1a2740;
  --sidebar-active-bg: #283a5e;
  --accent-home: #7c8cf5;
  --accent-leads: #ff5c96;
  --accent-contacts: #7c8cf5;
  --accent-accounts: #8fa9d1;
  --accent-deals: #4ade80;
  --accent-tasks: #2dd4bf;
  --accent-reports: #ff7b72;
  --accent-meetings: #b69cff;
  --accent-calls: #fbbf24;
  --accent-expansion: #2dd4bf;
  --accent-presales: #60a5fa;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #0f1620;
    --color-surface: #16202c;
    --color-surface-alt: #1c2836;
    --color-chip-bg: #1c2836;
    --color-border: #2a3a4c;
    --border-soft: #2a3a4c;
    --border-panel: #2a3a4c;
    --border-row: #223045;
    --color-text: #e6edf3;
    --color-text-strong: #ffffff;
    --color-text-muted: #93a3b5;
    --color-primary: #7c8cf5;
    --color-primary-hover: #9aa6f7;
    --color-primary-contrast: #0a0f2a;
    --color-primary-gradient: linear-gradient(180deg, #7c8cf5 4.69%, #4a5fd6 100%);
    --color-brand-accent: #7c8cf5;
    --color-danger: #f87171;
    --color-danger-bg: #2a1414;
    --color-warning: #f5a35c;
    --color-warning-bg: #2a1e10;
    --color-success: #4ade80;
    --color-success-bg: #10261a;
    --color-info-bg: #232c52;
    --color-link: #7c8cf5;
    --sidebar-bg: #1a2740;
    --sidebar-active-bg: #283a5e;
    --accent-home: #7c8cf5;
    --accent-leads: #ff5c96;
    --accent-contacts: #7c8cf5;
    --accent-accounts: #8fa9d1;
    --accent-deals: #4ade80;
    --accent-tasks: #2dd4bf;
  --accent-reports: #ff7b72;
  --accent-meetings: #b69cff;
  --accent-calls: #fbbf24;
  --accent-expansion: #2dd4bf;
  --accent-presales: #60a5fa;
  }
}
