/*
 * Our Experts brand palette ("Midnight Indigo").
 *
 * Loaded after core.css so every Bootstrap / Sneat component (buttons, menu,
 * badges, links, form focus, charts reading window.config.colors) picks up
 * the brand colours. The --brand-* tokens are for pages that need more than
 * Bootstrap's roles, such as the dashboard charts.
 *
 * Chart series (--brand-series-1..7) are a fixed categorical order, checked
 * for colour-blind separation and contrast against both card surfaces.
 * Status colours (success / warning / danger / info) are kept for states.
 */

:root,
[data-bs-theme=light] {
    /* Brand */
    --brand-ink: #1e1b4b;
    --brand-primary: #4f46e5;
    --brand-primary-strong: #4338ca;
    --brand-teal: #0d9488;
    --brand-gold: #d97706;
    --brand-gradient: linear-gradient(125deg, #1e1b4b 0%, #312e81 38%, #4f46e5 72%, #0d9488 130%);
    --brand-glow: 0 1rem 2.5rem rgba(49, 46, 129, .28);

    /* Chart series, in this order */
    --brand-series-1: #4f46e5; /* indigo */
    --brand-series-2: #0d9488; /* teal */
    --brand-series-3: #d97706; /* amber */
    --brand-series-4: #e11d48; /* rose */
    --brand-series-5: #0284c7; /* sky */
    --brand-series-6: #65a30d; /* lime */
    --brand-series-7: #9333ea; /* purple */

    /* Single-hue ramp for magnitude (heatmaps, funnels) */
    --brand-seq-1: #e0e7ff;
    --brand-seq-2: #a5b4fc;
    --brand-seq-3: #6366f1;
    --brand-seq-4: #4338ca;
    --brand-seq-5: #312e81;

    /* Bootstrap roles */
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-primary-bg-subtle: #e0e7ff;
    --bs-primary-border-subtle: #c7d2fe;
    --bs-primary-text-emphasis: #312e81;
    --bs-link-color: #4f46e5;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: #4338ca;
    --bs-link-hover-color-rgb: 67, 56, 202;

    --bs-info: #0284c7;
    --bs-info-rgb: 2, 132, 199;
    --bs-info-bg-subtle: #e0f2fe;
    --bs-info-border-subtle: #bae6fd;
    --bs-info-text-emphasis: #075985;

    --bs-success: #16a34a;
    --bs-success-rgb: 22, 163, 74;
    --bs-success-bg-subtle: #dcfce7;
    --bs-success-border-subtle: #bbf7d0;
    --bs-success-text-emphasis: #166534;

    --bs-warning: #d97706;
    --bs-warning-rgb: 217, 119, 6;
    --bs-warning-bg-subtle: #fef3c7;
    --bs-warning-border-subtle: #fde68a;
    --bs-warning-text-emphasis: #92400e;

    --bs-danger: #e11d48;
    --bs-danger-rgb: 225, 29, 72;
    --bs-danger-bg-subtle: #ffe4e6;
    --bs-danger-border-subtle: #fecdd3;
    --bs-danger-text-emphasis: #9f1239;
}

[data-bs-theme=dark] {
    --brand-ink: #0f0d2e;
    --brand-primary: #6366f1;
    --brand-primary-strong: #818cf8;
    --brand-teal: #14b8a6;
    --brand-gold: #f59e0b;
    --brand-gradient: linear-gradient(125deg, #1e1b4b 0%, #312e81 40%, #4f46e5 78%, #0f766e 135%);
    --brand-glow: 0 1rem 2.5rem rgba(0, 0, 0, .35);

    --brand-series-1: #6366f1;
    --brand-series-2: #0d9488;
    --brand-series-3: #d97706;
    --brand-series-4: #e11d48;
    --brand-series-5: #0284c7;
    --brand-series-6: #65a30d;
    --brand-series-7: #a855f7;

    --brand-seq-1: #3a3b63;
    --brand-seq-2: #4b4f9e;
    --brand-seq-3: #5b5fd6;
    --brand-seq-4: #818cf8;
    --brand-seq-5: #c7d2fe;

    --bs-primary: #6366f1;
    --bs-primary-rgb: 99, 102, 241;
    --bs-primary-bg-subtle: #34356a;
    --bs-primary-border-subtle: #44468a;
    --bs-primary-text-emphasis: #c7d2fe;
    --bs-link-color: #a5b4fc;
    --bs-link-color-rgb: 165, 180, 252;
    --bs-link-hover-color: #c7d2fe;
    --bs-link-hover-color-rgb: 199, 210, 254;

    --bs-info: #38bdf8;
    --bs-info-rgb: 56, 189, 248;
    --bs-info-bg-subtle: #23435a;
    --bs-info-border-subtle: #2c5873;
    --bs-info-text-emphasis: #bae6fd;

    --bs-success: #4ade80;
    --bs-success-rgb: 74, 222, 128;
    --bs-success-bg-subtle: #254634;
    --bs-success-border-subtle: #2f5c42;
    --bs-success-text-emphasis: #bbf7d0;

    --bs-warning: #fbbf24;
    --bs-warning-rgb: 251, 191, 36;
    --bs-warning-bg-subtle: #4a3f25;
    --bs-warning-border-subtle: #66552c;
    --bs-warning-text-emphasis: #fde68a;

    --bs-danger: #fb7185;
    --bs-danger-rgb: 251, 113, 133;
    --bs-danger-bg-subtle: #4d2a3a;
    --bs-danger-border-subtle: #6b3448;
    --bs-danger-text-emphasis: #fecdd3;
}

::selection { background: rgba(var(--bs-primary-rgb), .22); }
