/* Westore admin theme on top of Tabler. Brand colours come from the Westore logo:
   purple #8770ad, lavender #b9abe9, mauve #c5abd3 and lime #f1fda5. */

:root,
[data-bs-theme="light"] {
    --cl-brand-lavender: #b9abe9;
    --cl-brand-lime: #f1fda5;
    --tblr-primary: #6c52a8;
    --tblr-primary-rgb: 108, 82, 168;
    --tblr-primary-darken: #5a4490;
    --tblr-primary-lt: #f0edf7;
    --tblr-primary-lt-rgb: 240, 237, 247;
    --tblr-primary-text-emphasis: #3f2f6e;
    --tblr-primary-bg-subtle: #e9e4f6;
    --tblr-primary-border-subtle: #cfc5ec;
    --tblr-link-color: #6c52a8;
    --tblr-link-color-rgb: 108, 82, 168;
    --tblr-link-hover-color: #5a4490;
    --tblr-link-hover-color-rgb: 90, 68, 144;
    --tblr-focus-ring-color: rgba(108, 82, 168, .25);

    --cl-series-1: #6c52a8; /* connected */
    --cl-series-2: #c2668f; /* not connected */
    --cl-series-3: #8a9a1b; /* missed / rejected */
    --cl-grid: #e7e5ec;
    --cl-axis: #6b6878;
    --cl-heat-0: #f3f1f8;
    --cl-heat-1: #e3dcf6;
    --cl-heat-2: #c3b5ee;
    --cl-heat-3: #9c86dd;
    --cl-heat-4: #7558c0;
    --cl-heat-5: #4e3690;
}

[data-bs-theme="dark"] {
    --tblr-primary: #a08be0;
    --tblr-primary-rgb: 160, 139, 224;
    --tblr-primary-darken: #8a72d4;
    --tblr-primary-fg: #1b1430;
    --tblr-primary-lt: #2a2240;
    --tblr-primary-lt-rgb: 42, 34, 64;
    --tblr-primary-text-emphasis: #cfc4f2;
    --tblr-primary-bg-subtle: #241c38;
    --tblr-primary-border-subtle: #4a3a78;
    --tblr-link-color: #b9abe9;
    --tblr-link-color-rgb: 185, 171, 233;
    --tblr-link-hover-color: #d3c9f3;
    --tblr-link-hover-color-rgb: 211, 201, 243;
    --tblr-focus-ring-color: rgba(160, 139, 224, .3);

    --cl-series-1: #a08be0;
    --cl-series-2: #e08bb5;
    --cl-series-3: #c4d24a;
    --cl-grid: #2f2a3d;
    --cl-axis: #a29db0;
    --cl-heat-0: #24202f;
    --cl-heat-1: #3a2c62;
    --cl-heat-2: #553f95;
    --cl-heat-3: #7a5fc0;
    --cl-heat-4: #a48ee0;
    --cl-heat-5: #d0c4f3;
}

/* Tabler hard-codes its blue in these, so they don't follow --tblr-primary */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.input-group-flat:focus-within .form-control,
.input-group-flat:focus-within .input-group-text { border-color: rgba(var(--tblr-primary-rgb), .6); }
.list-group-item.active { border-left-color: var(--tblr-primary); }
.page-link:hover .page-item-title { color: var(--tblr-primary); }
.status-primary { --tblr-status-color: var(--tblr-primary); --tblr-status-color-rgb: var(--tblr-primary-rgb); }

/* Sidebar in deep brand purple, in both themes */
.navbar-vertical[data-bs-theme="dark"] {
    --tblr-navbar-bg: #241b38;
    --tblr-navbar-active-border-color: var(--cl-brand-lime);
    background-color: #241b38;
}

body {
    font-feature-settings: "cv03", "cv04", "cv11";
}

/* Sidebar brand */
.brand-logo { display: block; height: 3rem; width: auto; }
.login-logo { display: block; height: 5.5rem; width: auto; margin: 0 auto; }

.page-pretitle { letter-spacing: .04em; }

/* Stat tiles */
.stat-link { color: inherit; text-decoration: none; display: block; }
.stat-link:hover { color: inherit; text-decoration: none; }
.stat-link:hover .card { box-shadow: var(--tblr-box-shadow-card-hover, 0 2px 12px rgba(0, 0, 0, .08)); }
.stat-value { font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.stat-hero { font-size: 2.75rem; font-weight: 600; line-height: 1; }
.stat-delta { font-size: .8125rem; }

.table td, .table th { vertical-align: middle; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.note-cell { max-width: 260px; white-space: pre-wrap; }

/* Sortable table headers */
th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-sort]::after { content: ""; display: inline-block; width: 1em; opacity: .5; }
th[data-sort][aria-sort="ascending"]::after { content: "▲"; font-size: .65em; padding-left: .25em; }
th[data-sort][aria-sort="descending"]::after { content: "▼"; font-size: .65em; padding-left: .25em; }

/* Small inline sparkline */
.sparkline { display: block; color: var(--cl-series-1); }
.sparkline polyline { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sparkline circle { fill: currentColor; stroke: var(--tblr-bg-surface); stroke-width: 2; }

/* Legend chips */
.legend-dot { display: inline-block; width: .625rem; height: .625rem; border-radius: 2px; margin-right: .375rem; vertical-align: baseline; }
.legend-line { display: inline-block; width: 1.25rem; border-top: 3px solid var(--cl-series-1); margin-right: .375rem; vertical-align: middle; }
.legend-line-dashed { border-top: 2px dashed var(--cl-axis); }

/* Dashboard section headings: what each block is for */
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin: 1.5rem 0 .75rem; }
.section-heading:first-child { margin-top: 0; }
.section-heading h3 { margin: 0; font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.section-heading p { margin: 0; color: var(--tblr-secondary); font-size: .8125rem; }

/* Small counts inside a card header */
.mini-stats { display: flex; gap: .5rem; }
.mini-stats > div { flex: 1; padding: .5rem .75rem; border-radius: var(--tblr-border-radius); background: var(--tblr-bg-surface-secondary); }
.mini-stats strong { display: block; font-size: 1.25rem; line-height: 1.2; }
.mini-stats span { font-size: .75rem; color: var(--tblr-secondary); }

/* Call drop watch: flagged executives */
.is-drop { box-shadow: inset 3px 0 0 var(--tblr-red); }
.is-drop .sparkline { color: var(--tblr-red); }

/* Proportion bar in a table cell */
.meter { height: 6px; border-radius: 3px; background: var(--tblr-border-color); overflow: hidden; min-width: 60px; }
.meter > span { display: block; height: 100%; border-radius: 3px; background: var(--cl-series-1); }

.chart { min-height: 260px; }
.chart-sm { min-height: 200px; }

/* Login page */
.login-hero {
    background: radial-gradient(1200px 600px at 10% 0%, rgba(185, 171, 233, .30), transparent 60%),
                radial-gradient(800px 500px at 100% 100%, rgba(241, 253, 165, .35), transparent 60%);
}

/* Boxed dashboard sections (x-dash-panel): coloured top edge, icon chip, softer tiles inside */
.dash-panel {
    --panel-accent: var(--tblr-primary);
    position: relative;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--tblr-bg-surface);
    border: 1px solid var(--tblr-border-color);
    border-radius: .75rem;
    box-shadow: var(--tblr-box-shadow-card, 0 1px 2px rgba(0, 0, 0, .04));
    overflow: hidden;
}
.dash-panel:first-child { margin-top: 0; }
.dash-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--panel-accent); }
.dash-panel-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.dash-panel-head h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.dash-panel-head p { margin: .125rem 0 0; color: var(--tblr-secondary); font-size: .8125rem; }
.dash-panel-icon {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; border-radius: .625rem; font-size: 1.375rem;
    color: var(--panel-accent);
    background: color-mix(in srgb, var(--panel-accent) 14%, transparent);
}
.dash-panel .card { box-shadow: none; }
.dash-panel .card-sm { background: var(--tblr-bg-surface-secondary); border-color: transparent; }
.dash-panel .stat-link:hover .card-sm { border-color: color-mix(in srgb, var(--panel-accent) 45%, transparent); }
.stat-icon {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: .5rem; font-size: 1.125rem;
}

/* How a total splits: a segmented bar with a legend */
.share-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.share-total { min-width: 7rem; }
.share-total a:hover { text-decoration: none; color: var(--panel-accent) !important; }
.share-bar { display: flex; gap: 2px; height: .75rem; border-radius: .375rem; overflow: hidden; background: var(--tblr-border-color); }
.share-bar > span { display: block; height: 100%; min-width: 3px; }
.share-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .5rem; font-size: .8125rem; color: var(--tblr-secondary); }
.share-legend strong { color: var(--tblr-body-color); font-weight: 600; }
.share-legend .legend-dot { vertical-align: 0; }
