/* MK Codeworx brand tokens. One red, shared neutrals, shared status colors. Same file in every app.
   Two themes only: light and dark, set with <html data-theme="light|dark">. No "system" option and no per-app themes. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  /* Brand red (Signal red) */
  --brand: #b8323a;          /* logo, wordmark, links, focus ring */
  --brand-fill: #b8323a;     /* filled buttons */
  --brand-fill-hover: #9c2830;
  --brand-deep: #8c2229;     /* pressed states, destructive confirm, logo shade */
  --on-brand: #ffffff;
  --brand-soft: #f8e6e7;     /* selected rows, soft badges */
  --on-brand-soft: #8c2229;  /* text on --brand-soft */
  /* Neutrals */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #edf1f6;
  --text: #192333;
  --muted: #525f71;
  --border: #d8e0ea;
  /* Status */
  --good: #18764d;   --good-soft: #dff3e8;
  --warn: #8a5a00;   --warn-soft: #fbefd0;
  --info: #0b5cad;   --info-soft: #dcebfa;
  --danger: #8c2229; --danger-soft: #f8e6e7;
  --danger-fill: #8c2229; /* destructive buttons: always with a label such as "Delete" */
  /* Chart and data colors. Never red: red is the brand and the error color. Safe for color blindness. */
  --data-1: #1f6fbf; --data-2: #b7791f; --data-3: #0f8a7e; --data-4: #7c4dcc; --data-5: #525f71;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #f0666b; --brand-fill: #c9343c; --brand-fill-hover: #d23b43; --brand-deep: #9c2830; --on-brand: #ffffff; --brand-soft: #3a1a1c; --on-brand-soft: #f0666b;
  --bg: #0d1015; --surface: #151a21; --surface-2: #1d242d; --text: #f0f2f5; --muted: #a1aab6; --border: #2a323d;
  --good: #4fd1a1; --good-soft: #12332a; --warn: #f5b83d; --warn-soft: #3a2c0c; --info: #6ea8fe; --info-soft: #14283f; --danger: #f0666b; --danger-soft: #3a1a1c; --danger-fill: #9c2830;
  --data-1: #4096e6; --data-2: #f4cc55; --data-3: #3cc9b8; --data-4: #a98bf0; --data-5: #9aa5b4;
}
/* Server-rendered pages that have no script to read the device (MK Auth): data-theme="auto" means nothing chosen yet, so follow the device.
   Same dark values as above; the picker apps set light or dark with mk-theme.js instead. */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --brand: #f0666b; --brand-fill: #c9343c; --brand-fill-hover: #d23b43; --brand-deep: #9c2830; --on-brand: #ffffff; --brand-soft: #3a1a1c; --on-brand-soft: #f0666b;
    --bg: #0d1015; --surface: #151a21; --surface-2: #1d242d; --text: #f0f2f5; --muted: #a1aab6; --border: #2a323d;
    --good: #4fd1a1; --good-soft: #12332a; --warn: #f5b83d; --warn-soft: #3a2c0c; --info: #6ea8fe; --info-soft: #14283f; --danger: #f0666b; --danger-soft: #3a1a1c; --danger-fill: #9c2830;
    --data-1: #4096e6; --data-2: #f4cc55; --data-3: #3cc9b8; --data-4: #a98bf0; --data-5: #9aa5b4;
  }
}
/* Shape, space, type: identical in both themes */
:root {
  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px; --radius-pill: 999px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --text-xs: .75rem; --text-sm: .875rem; --text-md: 1rem; --text-lg: 1.125rem; --text-xl: 1.375rem; --text-2xl: 1.75rem; --text-3xl: 2.25rem;
  --header-h: 56px;
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 40%, transparent);
}
