/* Chimcare Group — app design tokens (1 · Ink & Paper (recommended))
   Written by the design playground on 2026-10-28.
   This is the whole visual standard in one file: paste it over tokens/tokens.css in
   chimcare-group-design-system and every app that imports it follows. Values are final. */
:root {
  color-scheme: light;

  /* Fonts and type scale */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --text-label: 11px;   /* small labels, column headers */
  --text-caption: 12px; /* captions, metadata, badges */
  --text-body: 14px;
  --text-section: 18px;
  --text-metric: 21px;
  --text-title: 28px;
  --text-hero: 40px;
  --label-transform: uppercase;
  --label-tracking: 0.06em;
  --label-weight: 500;

  /* Neutrals (ORDEX) */
  --color-paper: #ffffff;
  --color-wash: #f5f5f7;
  --color-band: #ececf0;
  --color-line: #e5e5ea;
  --color-rule: #c7c7cc;
  --color-ink: #1d1d1f;
  --color-ink-2: #3a3a3c;
  --color-ink-raised: #2c2c2e;
  --color-mut: #6e6e73;

  /* Status: Good · Watch · Act · Low (Low is never text). Brighter shades ruled by Dalton 2026-10-28;
     the -strong shade is for text sitting on a tinted fill (tags, notices) so it stays readable */
  --color-good: #16a34a;
  --color-watch: #d97706;
  --color-act: #dc2626;
  --color-low: #8e8e93;
  --color-good-tint: #eef9f0;
  --color-watch-tint: #fff6e5;
  --color-act-tint: #fbecea;
  --color-low-tint: #ececf0;
  --color-good-strong: #15803d;
  --color-watch-strong: #b45309;
  --color-act-strong: #b91c1c;
  --color-dot-good: #16a34a;
  --color-dot-watch: #d97706;
  --color-dot-act: #dc2626;
  --color-dot-low: #8e8e93;

  /* Dark ink surface (featured panels only) */
  --color-ink-fg: #f5f5f7;
  --color-ink-mut: #a1a1a6;
  --color-ink-line: rgb(255 255 255 / 0.14);
  --color-ink-good: #30d158;
  --color-ink-watch: #ff9f0a;
  --color-ink-bad: #ff6961;
  --color-ink-neutral: #98989d;

  /* Medals, charts, third-party */
  --color-medal-1: #d9a520;
  --color-medal-2: #c3c6cc;
  --color-medal-3: #c98b5b;
  --color-series-1: #1d1d1f;
  --color-series-2: #8e8e93;
  --color-series-3: #d1d1d6;
  --color-star: #fbbc04; /* Google review stars only */

  /* Brand (the only client-specific values) */
  --color-brand: #dd020e;
  --accent: var(--color-ink);
  --accent-fg: #ffffff;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* Corners */
  --radius-tag: 4px;
  --radius-control: 6px;
  --radius-segment: 8px;
  --radius-panel: 12px;
  --radius-badge: 4px;

  /* Shadows */
  --shadow-resting: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px -2px rgba(0, 0, 0, 0.06);
  --shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px -8px rgba(0, 0, 0, 0.14);
  --shadow-leader: 0 2px 4px rgba(0, 0, 0, 0.05), 0 18px 40px -14px rgba(0, 0, 0, 0.22);
  --shadow-selected: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-dialog: 0 16px 48px -12px rgba(0, 0, 0, 0.35);

  /* Cards and page */
  --card-border: 1px solid var(--color-line);
  --card-shadow: var(--shadow-resting);
  --pad-card: 16px;
  --gap: 16px;
  --page-bg: var(--color-wash);

  /* Layout: navigation = sidebar (232px desktop, 64px rail on tablet, collapsed on phones); featured dark panel on */
  --sidebar-w: 232px;
  --rail-w: 64px;
  --topbar-h: 56px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-small: 150ms;
  --duration-press: 160ms;
  --duration-open: 200ms;
}

body {
  background: var(--page-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

/* Phones: every text size one pixel bigger (GBP dashboard rule) */
@media (max-width: 600px) {
  :root { --text-body: 15px; --text-caption: 13px; --text-label: 12px; --text-title: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; animation: none !important; }
}
