/* ===== HudPost CRM tokens (style guide, project six) =====
   One set of --hp-* values for the admin and the rep app. Dark is the default on :root; light sits on
   html.light-theme (the stored choice) and, when the stored choice is "system", on html.system-theme under
   prefers-color-scheme: light. Both apps keep their old names (--admin-*, --bg-primary ...) as aliases to these,
   so nothing breaks; new code uses --hp-* only. Every color, radius, shadow and font stack lives here. */
:root {
  /* Surfaces and lines */
  --hp-bg: #0f0f11;
  --hp-surface: #1a1a1f;
  --hp-surface-2: #22222a;
  --hp-surface-hover: #26262f;
  --hp-field-bg: #141418;
  --hp-fill: #141418; /* a borderless filled control (the rep app's fields, segmented tracks, small pills) */
  --hp-border: #30303a;
  --hp-border-strong: #44444f;
  /* Text */
  --hp-text: #f0f0f5;
  --hp-text-2: #9a9aa6;
  --hp-text-3: #8a8a96;
  --hp-accent-text: #4da3ff;
  /* Accent and meaning: blue = link, new, role; orange = waiting; red = a problem now; green = money in or done */
  --hp-accent: #0a84ff;
  --hp-accent-hover: #2a94ff;
  --hp-on-accent: #ffffff;
  --hp-on-strong: #0f0f11; /* text on a solid green, orange or red fill */
  --hp-green: #30d158;
  --hp-orange: #ff9f0a;
  --hp-red: #ff453a;
  --hp-blue: #64b5ff;
  /* Soft backgrounds: chips and tints */
  --hp-accent-soft: rgba(10, 132, 255, 0.16);
  --hp-green-soft: rgba(48, 209, 88, 0.16);
  --hp-orange-soft: rgba(255, 159, 10, 0.16);
  --hp-red-soft: rgba(255, 69, 58, 0.14);
  --hp-blue-soft: rgba(100, 181, 255, 0.16);
  --hp-neutral-soft: rgba(255, 255, 255, 0.07);
  /* Chart slots: categories side by side (products, channels, platforms), always used in this order. Four, because that
     is the most that stay apart from each other AND from the green, orange and red that carry meaning, in both themes
     (every pair checked with the data-viz validator, 3:1 on the card). Past four, a doughnut folds into "Other" and a line
     repeats the four with a dash, then a dot; lines also carry a point shape per slot. */
  --hp-chart-1: #1d9bf0;
  --hp-chart-2: #11968b;
  --hp-chart-3: #ab27b6;
  --hp-chart-4: #6d5ce7;
  /* Overlays and documents */
  --hp-scrim: rgba(0, 0, 0, 0.5);
  --hp-glass: rgba(26, 26, 31, 0.85);
  --hp-paper: #ffffff; /* a document or an embedded page keeps its own white */
  /* Focus, radius, elevation */
  --hp-focus: 0 0 0 3px rgba(10, 132, 255, 0.35);
  --hp-radius: 12px;
  --hp-radius-sm: 8px;
  --hp-radius-pill: 999px;
  --hp-shadow-1: 0 2px 8px rgba(0, 0, 0, 0.35);
  --hp-shadow-2: 0 12px 32px rgba(0, 0, 0, 0.5);
  /* Type and chrome */
  --hp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --hp-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --hp-topbar-h: 52px;
  --hp-sidebar-w: 240px;
  --hp-tap: 44px;
  /* Third-party brand marks that keep their own colors in both themes (the Google sign-in button) */
  --hp-google-text: #1f1f1f;
  --hp-google-border: #dadce0;
  color-scheme: dark;
}
/* Light: the stored choice */
html.light-theme {
  --hp-bg: #f2f2f7;
  --hp-surface: #ffffff;
  --hp-surface-2: #f6f6f9;
  --hp-surface-hover: #f0f0f4;
  --hp-field-bg: #ffffff;
  --hp-fill: #e9e9eb; /* not the card white: a borderless field must still read as a field */
  --hp-border: #d1d1d6;
  --hp-border-strong: #b9b9c2;
  --hp-text: #111115;
  --hp-text-2: #5c5c68;
  --hp-text-3: #66666f;
  --hp-accent-text: #0b63c9;
  --hp-accent: #0a6fe0;
  --hp-accent-hover: #0860c4;
  --hp-on-accent: #ffffff;
  --hp-on-strong: #ffffff;
  --hp-green: #15803d;
  --hp-orange: #a35500;
  --hp-red: #c5221f;
  --hp-blue: #0b63c9;
  --hp-accent-soft: rgba(10, 111, 224, 0.12);
  --hp-green-soft: rgba(21, 128, 61, 0.12);
  --hp-orange-soft: rgba(163, 85, 0, 0.12);
  --hp-red-soft: rgba(197, 34, 31, 0.10);
  --hp-blue-soft: rgba(11, 99, 201, 0.12);
  --hp-neutral-soft: rgba(0, 0, 0, 0.06);
  /* The same four slots for the white card: deeper steps that clear 3:1 and stay apart (validator, light surface #ffffff) */
  --hp-chart-1: #2563eb;
  --hp-chart-2: #0891b2;
  --hp-chart-3: #c026d3;
  --hp-chart-4: #5b21b6;
  --hp-scrim: rgba(0, 0, 0, 0.35);
  --hp-glass: rgba(255, 255, 255, 0.85);
  --hp-focus: 0 0 0 3px rgba(10, 111, 224, 0.30);
  --hp-shadow-1: 0 2px 8px rgba(0, 0, 0, 0.06);
  --hp-shadow-2: 0 12px 32px rgba(0, 0, 0, 0.12);
  color-scheme: light;
}
/* Light: the system choice, following the device */
@media (prefers-color-scheme: light) {
  html.system-theme {
    --hp-bg: #f2f2f7;
    --hp-surface: #ffffff;
    --hp-surface-2: #f6f6f9;
    --hp-surface-hover: #f0f0f4;
    --hp-field-bg: #ffffff;
    --hp-fill: #e9e9eb;
    --hp-border: #d1d1d6;
    --hp-border-strong: #b9b9c2;
    --hp-text: #111115;
    --hp-text-2: #5c5c68;
    --hp-text-3: #66666f;
    --hp-accent-text: #0b63c9;
    --hp-accent: #0a6fe0;
    --hp-accent-hover: #0860c4;
    --hp-on-accent: #ffffff;
    --hp-on-strong: #ffffff;
    --hp-green: #15803d;
    --hp-orange: #a35500;
    --hp-red: #c5221f;
    --hp-blue: #0b63c9;
    --hp-accent-soft: rgba(10, 111, 224, 0.12);
    --hp-green-soft: rgba(21, 128, 61, 0.12);
    --hp-orange-soft: rgba(163, 85, 0, 0.12);
    --hp-red-soft: rgba(197, 34, 31, 0.10);
    --hp-blue-soft: rgba(11, 99, 201, 0.12);
    --hp-neutral-soft: rgba(0, 0, 0, 0.06);
    --hp-chart-1: #2563eb;
    --hp-chart-2: #0891b2;
    --hp-chart-3: #c026d3;
    --hp-chart-4: #5b21b6;
    --hp-scrim: rgba(0, 0, 0, 0.35);
    --hp-glass: rgba(255, 255, 255, 0.85);
    --hp-focus: 0 0 0 3px rgba(10, 111, 224, 0.30);
    --hp-shadow-1: 0 2px 8px rgba(0, 0, 0, 0.06);
    --hp-shadow-2: 0 12px 32px rgba(0, 0, 0, 0.12);
    color-scheme: light;
  }
}
