/* Call Logs admin theme on top of Tabler. */

:root,
[data-bs-theme="light"] {
    --cl-series-1: #2a78d6; /* connected */
    --cl-series-2: #eb6834; /* not connected */
    --cl-series-3: #1baf7a; /* missed / rejected */
    --cl-grid: #e6e7e9;
    --cl-axis: #6b7280;
    --cl-heat-0: #f1f3f6;
    --cl-heat-1: #cde2fb;
    --cl-heat-2: #86b6ef;
    --cl-heat-3: #3987e5;
    --cl-heat-4: #1c5cab;
    --cl-heat-5: #0d366b;
}

[data-bs-theme="dark"] {
    --cl-series-1: #3987e5;
    --cl-series-2: #d95926;
    --cl-series-3: #199e70;
    --cl-grid: #2a3547;
    --cl-axis: #9aa4b2;
    --cl-heat-0: #1f2b3d;
    --cl-heat-1: #104281;
    --cl-heat-2: #1c5cab;
    --cl-heat-3: #2a78d6;
    --cl-heat-4: #5598e7;
    --cl-heat-5: #9ec5f4;
}

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

/* Sidebar brand */
.navbar-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    background: linear-gradient(135deg, #3987e5, #1c5cab);
    color: #fff;
    font-size: 1.1rem;
}

.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(57, 135, 229, .18), transparent 60%),
                radial-gradient(800px 500px at 100% 100%, rgba(27, 175, 122, .12), 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; }

/* Drag-to-reorder rows (subcategory order) */
tr[draggable="true"] .drag-handle { cursor: grab; }
