/*
 * Dark „neon” theme (default). A light theme will be theme-light.css defining the SAME variables
 * under [data-theme="light"]; nothing outside theme-*.css and tokens.css may contain colour literals.
 * Values follow the approved mockup (docs/design/makieta/), derived from pm/os „neon”.
 */
:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces */
  --color-bg: #0a0b0a;
  --color-surface: rgba(16, 18, 16, 0.92);
  --color-surface-solid: #101210;      /* sticky table cells need an opaque background */
  --color-surface-hover: #161916;      /* opaque hover for sticky cells */
  --color-surface-raised: rgba(20, 23, 20, 0.96);
  --color-header: rgba(12, 14, 12, 0.88);
  --color-sidebar: rgba(12, 14, 12, 0.82);
  --color-field: rgba(5, 7, 5, 0.45);
  --color-field-focus: rgba(5, 7, 5, 0.8);
  --color-inset: rgba(5, 7, 5, 0.5);
  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-strong: rgba(255, 255, 255, 0.12);
  --color-hover: rgba(255, 255, 255, 0.045);
  --color-hover-faint: rgba(255, 255, 255, 0.03);
  --color-hover-cross: rgba(255, 255, 255, 0.07);

  /* Text (faint is the darkest allowed for text on surface: WCAG AA) */
  --color-text: #eef2ec;
  --color-text-strong: #ffffff;
  --color-text-row: #e3e8e1;
  --color-text-soft: #c9d1c8;
  --color-text-nav: #b9c2b8;
  --color-text-muted: #9aa49a;
  --color-text-faint: #8a948a;
  --color-text-ghost: #5e675e;         /* separators and decoration only, never text */

  /* Accent: muted neon green = main action, brand, „you are here” */
  --color-accent: #3ccb5c;
  --color-accent-light: #77db8d;
  --color-accent-ink: #06210d;         /* text on the accent gradient */
  --color-accent-soft: rgba(60, 203, 92, 0.12);
  --color-accent-line: rgba(60, 203, 92, 0.4);
  --color-accent-glow: rgba(60, 203, 92, 0.4);
  --color-accent-faint: rgba(60, 203, 92, 0.09);

  /* Semantic colours (colour always means something) */
  --color-warning: #fbbf24;            /* suspect price, ⚠, „report a problem” */
  --color-warning-text: #fcd34d;
  --color-danger: #ff5d6c;             /* destructive action, rejection, critical */
  --color-danger-text: #ff8a95;
  --color-info: #38bdf8;
  --color-info-text: #8fd8fb;

  /* Offer status (Offer.status) */
  --status-candidate: #38bdf8;
  --status-candidate-text: #8fd8fb;
  --status-needs-review: #ff9d3c;
  --status-needs-review-text: #ffc48a;
  --status-approved: #2fd58c;
  --status-approved-text: #7feab9;
  --status-rejected: #ff5d6c;
  --status-rejected-text: #ff8a95;
  --status-retired: #a3aca3;
  --status-retired-text: #c9d1c8;

  /* Prices: min green, max red (PLAN S9); always with a dot and bold, not hue alone */
  --price-min: #2fd58c;
  --price-min-text: #7feab9;
  --price-max: #ff5d6c;
  --price-max-text: #ff8a95;
  --price-stale-text: #9aa49a;
  --price-used-text: #b9c2b8;

  /* Match tokens in the review queue */
  --token-ok-bg: rgba(47, 213, 140, 0.14);
  --token-ok-border: rgba(47, 213, 140, 0.45);
  --token-ok-text: #b5f5d6;
  --token-ambiguous-bg: rgba(251, 191, 36, 0.12);
  --token-ambiguous-border: rgba(251, 191, 36, 0.5);
  --token-ambiguous-text: #fde68a;
  --token-excluded-bg: rgba(255, 93, 108, 0.12);
  --token-excluded-border: rgba(255, 93, 108, 0.5);
  --token-excluded-text: #ffc2c8;

  /* Charts (read by static/js/echarts-theme.js) */
  --chart-line: rgba(200, 214, 200, 0.55);
  --chart-grid: rgba(255, 255, 255, 0.05);
  --chart-axis: rgba(255, 255, 255, 0.09);
  --chart-today: #f2f5f0;
  --chart-tooltip-bg: rgba(20, 23, 20, 0.96);

  /* Backgrounds, gradients, shadows */
  --app-bg-image: radial-gradient(900px 480px at 92% -8%, rgba(60, 203, 92, 0.09), transparent 65%),
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.6px);
  --app-bg-size: auto, 22px 22px;
  --brand-tile-bg: linear-gradient(145deg, #2a2f2a, #111311);
  --accent-card-bg: linear-gradient(125deg, rgba(60, 203, 92, 0.38) 0%, rgba(60, 203, 92, 0.13) 45%,
      rgba(18, 21, 18, 0.95) 100%);
  --button-primary-bg: linear-gradient(180deg, var(--color-accent-light), var(--color-accent));
  --button-primary-shadow: 0 0 12px var(--color-accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  --button-bg: rgba(255, 255, 255, 0.05);
  --button-border: rgba(255, 255, 255, 0.12);
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 14px 30px rgba(0, 0, 0, 0.5);
  --shadow-tile: 0 6px 18px rgba(0, 0, 0, 0.5);
}
