/**
 * DealMesh design tokens.
 *
 * This is the single source of truth for the redesigned CRM UI (owner + deals).
 * Every library component references the *semantic* Tailwind utilities that map
 * to these variables (e.g. `bg-surface`, `text-foreground`, `bg-primary`),
 * never raw palette values. To re-theme the product globally, edit the values
 * here -- nothing else needs to change.
 *
 * Color values are stored as space-separated RGB channels so Tailwind can apply
 * opacity modifiers via `rgb(var(--token) / <alpha-value>)`.
 */

:root {
  /* Surfaces & text */
  --color-background: 244 247 251; /* app canvas */
  --color-surface: 255 255 255; /* cards, panels */
  --color-surface-muted: 246 247 249; /* subtle fills, table headers */
  --color-surface-hover: 241 243 246; /* row / item hover */
  --color-foreground: 24 24 27; /* primary text */
  --color-muted: 100 105 115; /* secondary text */
  --color-subtle: 148 153 163; /* tertiary text, placeholders */
  --color-border: 226 228 233; /* hairlines */
  --color-border-strong: 203 207 214;

  /* Brand */
  --color-primary: 28 53 104; /* navy-700 */
  --color-primary-hover: 19 37 73; /* navy-800 */
  --color-primary-foreground: 255 255 255;
  --color-primary-soft: 229 237 248; /* navy-100 */

  --color-accent: 188 137 92; /* bronze-500 */
  --color-accent-hover: 152 104 62; /* bronze-600 */
  --color-accent-foreground: 255 255 255;
  --color-accent-soft: 244 236 228; /* bronze-100 */

  /* Sidebar (dark navy brand chrome).
   * Content stays on the light canvas above; the primary nav rail carries the
   * Perthshire brand's darker, navy-forward feel (echoing the marketing site)
   * with a bronze accent for active/brand moments. */
  --color-sidebar: 12 21 40; /* navy-900 */
  --color-sidebar-hover: 19 37 73; /* navy-800 */
  --color-sidebar-active: 28 53 104; /* navy-700 */
  --color-sidebar-foreground: 229 237 248; /* navy-100 */
  --color-sidebar-muted: 159 189 224; /* navy-300 */
  --color-sidebar-border: 19 37 73; /* navy-800 */

  /* Status */
  --color-success: 21 128 61;
  --color-success-soft: 220 252 231;
  --color-warning: 180 83 9;
  --color-warning-soft: 254 243 199;
  --color-danger: 185 28 28;
  --color-danger-soft: 254 226 226;
  --color-info: 37 99 235;
  --color-info-soft: 219 234 254;
  --color-neutral: 82 82 91;
  --color-neutral-soft: 244 244 245;

  /* Focus ring */
  --color-ring: 58 99 164; /* navy-500 */

  /* Radius & elevation */
  --radius-sm: 0.375rem;
  --radius: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1rem;
  --shadow-card: 0 1px 2px rgb(16 24 40 / 0.04), 0 1px 3px rgb(16 24 40 / 0.06);
  --shadow-pop: 0 8px 24px rgb(16 24 40 / 0.12), 0 2px 6px rgb(16 24 40 / 0.06);

  /* Density (comfortable default). Toggled via [data-density="compact"]. */
  --row-py: 0.75rem;
  --row-px: 1rem;
  --row-font: 0.875rem;
  --row-h: 3rem;
  --control-h: 2.5rem;
}

[data-density="compact"] {
  --row-py: 0.4375rem;
  --row-px: 0.75rem;
  --row-font: 0.8125rem;
  --row-h: 2.25rem;
  --control-h: 2.125rem;
}
