html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Numeric count pill — shared by every count badge in the nav (and reusable app-wide).
   SINGLE SOURCE OF TRUTH for the pill colors: change --count-pill-bg / --count-pill-fg in this
   one place to recolor every pill at once. Defaults reproduce the original grey pills (grey
   background, default dark text). */
:root {
    --count-pill-bg: var(--mud-palette-action-disabled); /* grey */
    --count-pill-fg: var(--mud-palette-text-primary);    /* dark — what the old spans inherited */
}

.count-pill {
    display: inline-block;
    font-size: 11px;
    background: var(--count-pill-bg);
    color: var(--count-pill-fg);
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Landscape-phone bandaid (pre-beta). The real responsive pass — collapsible drawer,
   card list under Sm, reflowed dashboard — is the post-beta lane; this only polishes the
   landscape emulator so nothing looks broken on stage. Cosmetic only, no structure changes,
   and scoped to ≤960px so desktop is completely untouched.
   NOTE: unverified this session — a registered service worker serves stale CSS, so it needs a
   rebuild + one hard refresh (Ctrl+F5) to take effect. Eyeball on next build; trivially revert
   by deleting this block. */
@media (max-width: 960px) {
    /* Filter chips: scroll as one row instead of wrapping into a ragged stack.
       !important overrides the element's inline flex-wrap:wrap (kept for desktop). */
    .lb-filter-toolbar {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 4px;
    }

    /* Leads table: tighten cell padding so more of the columns fit before horizontal scroll. */
    .lb-leads-table .mud-table-cell,
    .lb-leads-table .mud-table-cell-header {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ── Leads-by-Region dashboard bars (Executive / ManufacturerRSM overview). Theme-driven,
   no chart dependency — a labeled horizontal bar per Chelsea region, widths relative to the busiest. */
.lb-region-bars { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.lb-region-row  { display: flex; align-items: center; gap: 12px; }
.lb-region-label {
    flex: 0 0 120px; text-align: right;
    font-size: 0.8rem; color: var(--mud-palette-text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-region-track {
    flex: 1 1 auto; height: 14px; border-radius: 7px; overflow: hidden;
    background: var(--mud-palette-action-default-hover, rgba(0,0,0,0.06));
}
.lb-region-fill {
    height: 100%; border-radius: 7px;
    background: var(--mud-palette-primary);
    transition: width 0.3s ease;
}
.lb-region-count { flex: 0 0 34px; font-size: 0.8rem; font-weight: 600; }

/* ── Rep Performance table (dashboard). Desktop polish + phone stacking. All accents are
   theme-driven (var(--mud-palette-primary[-rgb])) so the header tint / win-rate bar follow the
   tenant brand — olive for Everlast, navy for Cornerstone — never a hardcoded color. */
.lb-perf-table .mud-table-cell { font-variant-numeric: tabular-nums; }
.lb-perf-table thead th.mud-table-cell {
    background: rgba(var(--mud-palette-primary-rgb, 115,112,56), 0.08) !important;
    color: var(--mud-palette-primary) !important;
    font-weight: 600; font-size: 0.68rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(var(--mud-palette-primary-rgb, 115,112,56), 0.25) !important;
}
.lb-perf-table tbody tr:nth-of-type(even) { background: rgba(0,0,0,0.02); }

.lb-perf-rep  { font-weight: 600; line-height: 1.2; }
.lb-perf-firm { font-size: 0.72rem; color: var(--mud-palette-text-secondary); line-height: 1.2; }

/* Win-rate: mini track + bar (desktop), right-aligned with the number. */
.lb-perf-wr { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.lb-perf-wr-track { width: 52px; height: 6px; border-radius: 3px; background: rgba(0,0,0,0.08); overflow: hidden; }
.lb-perf-wr-fill  { display: block; height: 100%; background: var(--mud-palette-primary); }
.lb-perf-wr-num   { font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

/* SLA counter cards — a full subtle border + a thick colored left edge (color set inline per card:
   error / warning / success / disabled). Refines the old bare border-left boxes. */
.lb-sla-stat {
    border: 1px solid rgba(0,0,0,0.08);
    border-left-width: 4px;
    border-radius: 6px;
    padding: 8px 16px;
    min-width: 92px;
    background: rgba(0,0,0,0.015);
}

/* Phone (<600px): MudBlazor already stacks this (Breakpoint.Sm). Turn each rep row into a card,
   lay each metric out as "LABEL … value", promote the Rep cell to the card title, and hide the
   win-rate bar (the % alone reads cleaner in the stacked view). */
@media (max-width: 599.98px) {
    .lb-perf-table tbody tr {
        display: block;
        border: 1px solid rgba(0,0,0,0.08);
        border-radius: 6px;
        margin-bottom: 10px;
        background: rgba(0,0,0,0.01);
    }
    .lb-perf-table .mud-table-cell {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center;
        text-align: right !important;
        border: 0 !important;
        padding: 6px 12px !important;
        white-space: normal !important;
    }
    .lb-perf-table .mud-table-cell::before {
        font-weight: 600; font-size: 0.72rem;
        text-transform: uppercase; letter-spacing: 0.04em;
        color: var(--mud-palette-text-secondary);
        margin-right: 12px; text-align: left !important;
    }
    /* Rep cell = card header: full width, no data-label prefix. */
    .lb-perf-table .mud-table-cell[data-label="Rep"] {
        display: block !important;
        text-align: left !important;
        padding-bottom: 2px !important;
        border-bottom: 1px solid rgba(0,0,0,0.06) !important;
        margin-bottom: 4px;
    }
    .lb-perf-table .mud-table-cell[data-label="Rep"]::before { display: none !important; }
    .lb-perf-table .lb-perf-wr-track { display: none; }
    .lb-perf-table .lb-perf-wr { gap: 0; }

    /* Region bars: shrink the right-aligned label so the track keeps usable width at 375px. */
    .lb-region-label { flex-basis: 74px; font-size: 0.75rem; }
    .lb-region-bars  { max-width: none; }
}
