/**
 * @doro/design-tokens — CSS custom property tokens
 *
 * Source of truth for Doro Mind's color system. Lifted verbatim from
 * member-app/app/globals.css (as of 2026-04-22) so there is zero drift
 * between the in-app runtime and the design system.
 *
 * Consumers:
 *   - Apps import this file once at the root (e.g. `import '@doro/design-tokens/tokens.css'`).
 *   - Storybook (in @doro/design-ui) imports it via preview globals.
 *   - The Tailwind preset at ./tailwind-preset.ts references these variables.
 *
 * Do not fork these values per-app. If a token needs to change, change it here.
 */

@layer base {
  :root {
    /* Light: brighter cream with soft green undertones + warm primary */
    --background: 88 30% 94%;
    --foreground: 220 18% 22%;

    --card: 35 45% 96%;
    --card-foreground: 220 18% 22%;

    --popover: 35 45% 96%;
    --popover-foreground: 220 18% 22%;

    --primary: 32 65% 48%;
    --primary-foreground: 0 0% 100%;

    --secondary: 142 28% 88%;
    --secondary-foreground: 220 22% 24%;

    --muted: 88 26% 90%;
    --muted-foreground: 220 12% 42%;

    --accent: 150 32% 90%;
    --accent-foreground: 220 20% 20%;

    --destructive: 0 72% 65%;
    --destructive-foreground: 95 40% 98%;

    --warning: 45 93% 47%;
    --warning-foreground: 0 0% 100%;

    --border: 88 22% 86%;
    --input: 88 22% 86%;
    --ring: 142 45% 38%;

    --radius: 0.75rem;

    --chart-1: 32 65% 48%;
    --chart-2: 152 45% 42%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 142 35% 48%;
  }
}

/* Moved outside @layer base to prevent Tailwind v3.4 from stripping the selector */
.dark {
  /* Dark: deep forest green surfaces + warm primary */
  --background: 142 18% 17%;
  --foreground: 95 40% 96%;

  --card: 142 19% 21%;
  --card-foreground: 95 40% 96%;

  --popover: 142 19% 21%;
  --popover-foreground: 95 40% 96%;

  --primary: 32 65% 53%;
  --primary-foreground: 0 0% 100%;

  --secondary: 142 25% 32%;
  --secondary-foreground: 95 35% 95%;

  --muted: 142 16% 24%;
  --muted-foreground: 95 22% 76%;

  --accent: 142 22% 34%;
  --accent-foreground: 95 40% 96%;

  --destructive: 0 65% 55%;
  --destructive-foreground: 95 40% 96%;

  --warning: 45 93% 52%;
  --warning-foreground: 0 0% 100%;

  --border: 142 14% 28%;
  --input: 142 14% 28%;
  --ring: 142 50% 52%;

  --chart-1: 32 65% 53%;
  --chart-2: 152 45% 48%;
  --chart-3: 200 55% 45%;
  --chart-4: 43 65% 58%;
  --chart-5: 142 40% 52%;
}
