/* ═══════════════════════════════════════════════════════════════════════
   TaskEnd — BRAND COLORS  (the one file to edit to re-colour the software)
   ═══════════════════════════════════════════════════════════════════════

   Change the two values in "1. CORE COLORS" and the whole software follows:
   website, sign-in / sign-up, dashboard, billing, account, buttons, links,
   gradients, charts and the footer. Every shade in "2. DERIVED SHADES" is
   calculated from those two, so you do not need to touch it.

   Loaded on every page by templates/boot-material/header.php (and the
   header_pop.php / auth pages) BEFORE any other brand-coloured stylesheet.

   Only a few places cannot read CSS variables and keep their own copy of the
   hex codes. If you change the core colors, update these as well:
     • includes/scripts/te_dashboard.js   (chart colours)
     • invoice-pdf.php                    (PDF invoices)
     • the e-mail templates stored in the backoffice (Content → E-mail templates)
   ═══════════════════════════════════════════════════════════════════════ */

:root {

  /* ── 1. CORE COLORS — edit these two ─────────────────────────────── */
  --brand-purple: #5f27cd;
  --brand-pink:   #fd4d81;

  /* Same two colors as r, g, b — used for rgba(var(--brand-purple-rgb), .15)
     shadows and glows. Keep in step with the hex codes above. */
  --brand-purple-rgb: 95, 39, 205;
  --brand-pink-rgb:   253, 77, 129;

  /* ── 2. DERIVED SHADES — calculated, no need to edit ─────────────── */
  /* fallbacks first (for very old browsers), exact mixes below */
  --brand-purple-dark:  #4e20a8;   /* hover / pressed                    */
  --brand-purple-deep:  #3b1980;   /* dark panels, strong headings       */
  --brand-ink:          #1c0c3e;   /* darkest brand tone (hero, footer)  */
  --brand-purple-light: #9f7de0;   /* light purple accents               */
  --brand-purple-tint:  #e2d9f6;   /* borders / chips on white           */
  --brand-purple-wash:  #f6f3fd;   /* very light background wash         */
  --brand-pink-soft:    #fe9dba;   /* soft pink accents                  */
  --brand-pink-tint:    #ffc9d9;   /* pink chips / highlights            */
  --brand-pink-wash:    #fff2f6;   /* very light pink background         */

  /* ── 3. NEUTRALS — a faint purple cast so greys sit with the brand ── */
  --brand-text:    #221d33;        /* headings / primary text            */
  --brand-text-2:  #463f5a;        /* body text                          */
  --brand-muted:   #6f6785;        /* secondary text                     */
  --brand-muted-2: #837c96;        /* placeholders, captions             */
  --brand-line:    #ebe7f3;        /* hairlines, card borders            */
  --brand-bg:      #f7f6fb;        /* page / panel background            */
  --brand-page-bg: #f7f8fb;        /* clean page background (no tint, no glow) */

  /* ── 4. READY-MADE COMBINATIONS ──────────────────────────────────── */
  --brand-gradient:      var(--brand-btn-bg);   /* one tone: solid, no gradient */
  --brand-gradient-soft: var(--brand-purple-wash);
  --brand-gradient-dark: linear-gradient(135deg, var(--brand-ink) 0%, var(--brand-purple-deep) 100%);
  /* Buttons: one solid color, about 15% lighter than the core purple */
  --brand-btn-bg:        #7747d4;                 /* solid, ~15% lighter than the core purple */
  --brand-btn-bg-hover:  #6a38c9;
  --brand-btn-gradient:  var(--brand-btn-bg);     /* kept as a name so every button follows; it is a plain color */
  --brand-btn-shadow:    0 6px 16px rgba(var(--brand-purple-rgb), .22);
  --brand-btn-shadow-hover: 0 8px 20px rgba(var(--brand-purple-rgb), .30);
  --brand-shadow:        0 10px 28px rgba(var(--brand-purple-rgb), .28);
  --brand-focus-ring:    0 0 0 3px rgba(var(--brand-purple-rgb), .22);
}

/* Exact shades, derived from the two core colors. Browsers without
   color-mix() simply keep the fallback hex codes above. */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --brand-purple-dark:  color-mix(in srgb, var(--brand-purple) 80%, #000);
    --brand-purple-deep:  color-mix(in srgb, var(--brand-purple) 62%, #000);
    --brand-ink:          color-mix(in srgb, var(--brand-purple) 30%, #000);
    --brand-purple-light: color-mix(in srgb, var(--brand-purple) 62%, #fff);
    --brand-purple-tint:  color-mix(in srgb, var(--brand-purple) 16%, #fff);
    --brand-purple-wash:  color-mix(in srgb, var(--brand-purple) 6%,  #fff);
    --brand-pink-soft:    color-mix(in srgb, var(--brand-pink) 55%, #fff);
    --brand-pink-tint:    color-mix(in srgb, var(--brand-pink) 30%, #fff);
    --brand-pink-wash:    color-mix(in srgb, var(--brand-pink) 8%,  #fff);
    --brand-btn-bg:       color-mix(in srgb, var(--brand-purple) 85%, #fff);
    --brand-btn-bg-hover: color-mix(in srgb, var(--brand-purple) 92%, #fff);
  }
}
