/* Layout adapter for the U-ON templates. Core design values live in app.css. */
.page-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-head h1 {
    margin: 0 0 .25rem;
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.page-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .25rem;
    font-size: clamp(1.3rem, 1.08rem + .9vw, 1.75rem) !important;
    font-weight: 500 !important;
    line-height: 1.2;
}
.page-title-icon { color: var(--via-primary); font-size: .9em; }

.muted { color: var(--bs-secondary-color); }
.small { font-size: .875em; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-reset-button { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; }

.panel {
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: var(--bs-body-bg);
    border: 1px solid #e1e6f0;
    border-radius: .9rem;
    box-shadow: 0 .25rem 1rem rgba(30, 42, 76, .07);
}

.panel-pad { padding: 1rem; }
.section { margin-bottom: 1.5rem; }

/* Public manager availability monitor. */
.availability-head { align-items: center; }
.availability-selected-day {
    margin: .15rem 0 .25rem;
    color: #34415f;
    font-size: .9rem;
    font-weight: 700;
}
.availability-date-controls {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.availability-date-controls input { width: 9.8rem; }
.availability-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1.15rem;
    margin-bottom: 1rem;
    font-size: .78rem;
}
.availability-meta > div {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    gap: .38rem;
}
.availability-latest { margin-left: auto; white-space: normal; overflow-wrap: anywhere; }
.availability-legend-dot {
    width: .72rem;
    height: .72rem;
    border: 1px solid transparent;
    border-radius: .22rem;
}
.availability-legend-dot.is-online { background: #56c596; border-color: #35a97a; }
.availability-legend-dot.is-offline { background: #e9edf3; border-color: #d5dbe5; }
.availability-legend-dot.is-unknown { background: #ffd785; border-color: #e9b64e; }
.availability-legend-dot.is-missing { background: #fff; border-color: #e7ebf2; }
.availability-state.is-online { background: rgba(86, 197, 150, .8); border-color: #35a97a; }
.availability-state.is-offline { background: rgba(233, 237, 243, .8); border-color: #d5dbe5; }
.availability-state.is-unknown { background: rgba(255, 215, 133, .8); border-color: #e9b64e; }
.availability-state.is-missing { background: rgba(255, 255, 255, .8); border-color: #e7ebf2; }
.availability-office {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 1rem;
}
.availability-office .section-head,
.availability-office .section-head > div { min-width: 0; max-width: 100%; }
.availability-table-wrap {
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.availability-office .availability-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .7rem;
}
.availability-office .availability-table th,
.availability-office .availability-table td {
    min-width: 42px;
    height: 32px;
    padding: .28rem .2rem;
    border-right: 1px solid #edf0f5;
    border-bottom: 1px solid #edf0f5;
    text-align: center;
    white-space: nowrap;
}
.availability-office .availability-table thead th {
    color: #67718a;
    background: #f7f9fc;
    font-weight: 700;
}
.availability-office .availability-table .availability-name-column {
    width: 230px;
    min-width: 230px;
    max-width: 230px;
    overflow: hidden;
    padding-left: .85rem;
    background: #fff;
    text-align: left;
    text-overflow: ellipsis;
}
.availability-office .availability-table thead .availability-name-column { background: #f7f9fc; }
.availability-summary-row .availability-name-column { background: #eef3ff; }
.availability-table tbody tr:not(.availability-summary-row) > .availability-name-column { font-weight: 500; }
.availability-summary-cell { color: #758097; background: #fafbfc; }
.availability-summary-cell strong { color: #293249; font-size: .78rem; }
.availability-summary-cell span { color: #8a93a6; font-size: .62rem; }
.availability-summary-cell.has-online { background: #dff5eb; }
.availability-summary-cell.has-online strong { color: #187957; }
.availability-summary-cell.is-missing { color: #aab1bf; background: #fff; }
.availability-state { border: 4px solid #fff !important; border-radius: .42rem; }
.panel .availability-table tbody tr:not(.availability-summary-row):hover > .availability-state.is-online { background: #56c596; }
.panel .availability-table tbody tr:not(.availability-summary-row):hover > .availability-state.is-offline { background: #e9edf3; }
.panel .availability-table tbody tr:not(.availability-summary-row):hover > .availability-state.is-unknown { background: #ffd785; }
.panel .availability-table tbody tr:not(.availability-summary-row):hover > .availability-state.is-missing { background: #fff; }
.availability-office .availability-table tr > *:last-child { border-right: 0; }
.availability-table tbody tr:last-child > .availability-name-column { border-bottom: 0 !important; }
.availability-empty { color: var(--bs-secondary-color); text-align: center; }

/* Public manager sales rating. */
.manager-rating-page { width: 100%; max-width: none; margin: 0; }
.manager-rating-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 1.35rem 1.5rem;
    color: #fff;
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 218, 121, .28), transparent 24%),
        linear-gradient(125deg, #2f4fc5 0%, #6545b9 58%, #8d4da4 100%);
    border-radius: 1rem;
    box-shadow: 0 .55rem 1.5rem rgba(52, 66, 139, .2);
}
.manager-rating-hero-copy { max-width: 44rem; }
.manager-rating-kicker {
    margin-bottom: .35rem;
    color: #ffe39a;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.manager-rating-hero h1 { margin: 0; font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.35rem); font-weight: 800; }
.manager-rating-hero p { margin: .45rem 0 0; color: rgba(255,255,255,.84); font-size: .875rem; line-height: 1.45; }
.manager-rating-filter {
    display: grid;
    grid-template-columns: 9.5rem 9.5rem auto;
    align-items: end;
    gap: .45rem;
    flex: 0 0 auto;
}
.manager-rating-filter label { color: rgba(255,255,255,.82); font-size: .6875rem; font-weight: 700; }
.manager-rating-filter input { margin-top: .22rem; border-color: rgba(255,255,255,.42); }
.manager-rating-filter .btn { min-height: 31px; color: #3c4394; font-weight: 700; }
.manager-rating-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: .65rem;
    margin-bottom: 1rem;
}
.manager-rating-facts > div {
    padding: .7rem .8rem;
    background: #fff;
    border: 1px solid #e4e8f2;
    border-radius: .75rem;
    box-shadow: 0 .15rem .55rem rgba(35, 47, 82, .045);
}
.manager-rating-facts span { display: block; margin-bottom: .18rem; color: #7b8498; font-size: .66rem; text-transform: uppercase; letter-spacing: .035em; }
.manager-rating-facts strong { color: #2c3448; font-size: .82rem; }
.manager-rating-message { margin-bottom: .65rem; padding: .65rem .85rem; font-size: .78rem; }
.manager-rating-public-settings {
    display: grid;
    grid-template-columns: minmax(13rem, 1.4fr) repeat(3, minmax(9rem, .7fr)) auto;
    align-items: end;
    gap: .65rem;
    margin-bottom: 1rem;
    padding: .8rem 1rem;
}
.manager-rating-public-settings-copy { display: grid; align-self: center; gap: .16rem; }
.manager-rating-public-settings-copy strong { color: #343d54; font-size: .8rem; }
.manager-rating-public-settings-copy span { color: #7a8395; font-size: .66rem; line-height: 1.3; }
.manager-rating-public-settings label > span { display: block; margin-bottom: .22rem; color: #687185; font-size: .66rem; font-weight: 700; }
.manager-rating-public-settings .btn { white-space: nowrap; }
.manager-rating-board { overflow: hidden; }
.manager-rating-table { width: max-content; min-width: 100%; }
.manager-rating-table thead th { white-space: nowrap; }
.manager-rating-table tbody tr > * { vertical-align: middle; }
.manager-rating-place-col { width: 5.5rem; text-align: center; }
.manager-rating-place { position: relative; color: #33405f; text-align: center; }
.manager-rating-place > strong { font-size: 1rem; }
.manager-rating-crown { margin-right: .32rem; color: #d79810; }
.manager-rating-adjustment {
    margin-left: .12rem;
    padding: 0 .14rem;
    color: #8456a8;
    background: transparent;
    border: 0;
    font-size: .95rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}
.manager-rating-winner { background: linear-gradient(90deg, #fff4c7 0%, #fff9e7 48%, #fffdf7 100%); }
.manager-rating-table tbody tr.manager-rating-winner > *,
.manager-rating-table tbody tr.manager-rating-winner:hover > * { background: transparent !important; }
.manager-rating-winner .name strong { color: #8a5b00; }
.manager-rating-comment { max-width: 31rem; margin-top: .18rem; color: #7b6a88; font-size: .66rem; line-height: 1.3; white-space: normal; }
.manager-rating-media-count { margin-top: .12rem; color: #7c8495; font-size: .65rem; font-weight: 500; }
.manager-rating-category-points strong { color: #3b455b; font-size: .9rem; }
.manager-rating-category-points div { margin-top: .12rem; color: #9299a8; font-size: .61rem; white-space: nowrap; }
.manager-rating-points strong { color: #4054bb; font-size: 1.05rem; }
.manager-rating-points div { margin-top: .12rem; color: #8991a1; font-size: .63rem; white-space: nowrap; }
.manager-rating-rules {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .75rem;
    margin-top: -.5rem;
    padding: .8rem 1rem;
    color: #626b7d;
    background: #f7f8fc;
    border: 1px solid #e4e8f1;
    border-radius: .75rem;
    font-size: .72rem;
}
.manager-rating-rules strong { color: #3b455b; }
.manager-rating-rules span::before { margin-right: .5rem; color: #b2b8c5; content: "•"; }
.manager-rating-settings-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(9rem, 1fr));
    gap: .65rem;
}
.manager-rating-settings-fields label > span { display: block; margin-bottom: .25rem; color: #5f6878; font-size: .72rem; font-weight: 600; }
.manager-rating-category-settings {
    display: grid;
    grid-template-columns: repeat(3, minmax(13rem, 1fr));
    gap: .65rem;
}
.manager-rating-category-setting {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8rem;
    gap: .65rem;
    align-items: end;
    padding: .7rem;
    background: #f8f9fc;
    border: 1px solid #e3e7ef;
    border-radius: .65rem;
}
.manager-rating-category-setting .form-check { align-self: center; margin: 0; }
.manager-rating-category-setting .form-check-label { display: grid; line-height: 1.25; }
.manager-rating-category-setting .form-check-label strong { font-size: .76rem; }
.manager-rating-category-setting .form-check-label small { margin-top: .12rem; color: #81899a; font-size: .63rem; }
.manager-rating-category-setting > label:last-child > span { display: block; margin-bottom: .25rem; color: #5f6878; font-size: .67rem; font-weight: 600; }

@media (max-width: 767.98px) {
    .manager-rating-hero { align-items: stretch; flex-direction: column; padding: 1rem; }
    .manager-rating-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .manager-rating-filter .btn { grid-column: 1 / -1; }
    .manager-rating-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .manager-rating-public-settings { grid-template-columns: 1fr; }
    .manager-rating-public-settings .btn { width: 100%; }
    .manager-rating-settings-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .manager-rating-category-settings { grid-template-columns: 1fr; }
    .availability-date-controls { width: 100%; max-width: 100%; flex-wrap: wrap; }
    .availability-date-controls form { flex: 1 1 9rem; min-width: 0; }
    .availability-date-controls input { width: 100%; min-width: 0; }
    .availability-latest { width: 100%; margin-left: 0; }
    .availability-office .availability-table .availability-name-column {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
    }
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    background: linear-gradient(115deg, #f7f9ff 0%, #fff 68%);
    border-bottom: 1px solid #e4e9f2;
}

.section-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0;
    color: #252b3b;
    font-size: 1.02rem;
    font-weight: 700;
}

.section-title i {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    color: var(--via-primary);
    background: #e9eeff;
    border-radius: .7rem;
    font-size: 1rem;
}
.section-subtitle { margin-top: .25rem; color: var(--bs-secondary-color); }
.section-note { padding: .75rem 1rem; color: var(--bs-secondary-color); font-size: .875rem; border-top: 1px solid var(--bs-border-color); }

.filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.filters > div { min-width: 0; }
.compact-filters {
    grid-template-columns: 112px 112px repeat(4, minmax(135px, 1fr)) auto;
    gap: .65rem;
    padding: .8rem;
}
.compact-filters.manager-profile-filters {
    grid-template-columns: 112px 112px repeat(2, minmax(135px, 1fr)) auto;
}
.compact-filters label { margin-bottom: .25rem; font-size: .75rem; }
.compact-filters input, .compact-filters select { min-height: 31px; padding: .25rem .5rem; font-size: .78rem; }
.compact-filters .btn { min-height: 31px; padding: .25rem .55rem; font-size: .75rem; }
.quick-periods {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: .35rem;
    padding-top: .55rem;
    border-top: 1px solid var(--bs-border-color);
}
.quick-periods .btn { min-height: 27px; padding: .16rem .5rem; font-size: 11px; }
.quick-periods .btn.is-selected {
    color: #4b5981;
    background: #f0f3ff;
    border-color: #c5cee9;
}
.quick-periods .btn.is-applied {
    color: #243f98;
    background: #dfe6ff;
    border-color: #8092d2;
    box-shadow: inset 0 0 0 .0625rem rgba(49, 87, 213, .08);
    font-weight: 700;
}
.quick-periods .btn.is-selected:hover,
.quick-periods .btn.is-applied:hover { color: #243f98; background: #e7ecff; border-color: #8092d2; }

.manager-profile-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(24rem, 2fr);
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.manager-profile-top-grid > .panel { margin-bottom: 0; }
.manager-profile-top-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1rem;
}
.manager-profile-top-main > .panel { margin-bottom: 0; }
.manager-profile-top-main .summary-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(9rem, 1fr));
    grid-template-rows: repeat(2, auto);
    overflow-x: auto;
}
.manager-profile-top-main .summary-strip > div {
    min-width: 0;
    border-right: 1px solid #e8ebf1;
}
.manager-profile-top-main .summary-strip > div:nth-child(-n+6) {
    border-bottom: 1px solid #e8ebf1;
}
.manager-profile-top-main .summary-strip > div:nth-child(6n) {
    border-right: 0;
}
.manager-profile-top-grid .manager-profile-filters {
    grid-template-columns: 112px 112px repeat(2, minmax(0, 1fr)) auto;
    align-content: space-between;
    column-gap: .5rem;
}
.manager-profile-top-grid .office-profile-filters {
    grid-template-columns: 112px 112px repeat(3, minmax(0, 1fr)) auto;
    align-content: space-between;
    column-gap: .5rem;
}
.manager-profile-top-grid .dashboard-analytics-filters {
    grid-template-columns: 112px 112px repeat(3, minmax(0, 1fr)) auto;
    align-content: space-between;
    column-gap: .5rem;
}
.manager-profile-top-grid .source-profile-filters {
    grid-template-columns: 112px 112px repeat(2, minmax(0, 1fr)) auto;
    align-content: space-between;
    column-gap: .5rem;
}
.profile-split-filters .quick-periods .btn {
    min-height: 24px;
    padding-top: .08rem;
    padding-bottom: .08rem;
}
.profile-split-filters .filter-reset-button { min-width: 31px; }
.manager-profit-chart {
    display: flex;
    min-width: 0;
    flex-direction: column;
}
.manager-profit-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    padding: .5rem .7rem .1rem;
}
.manager-profit-chart-head h2 {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    color: #252b3b;
    font-size: .875rem;
    font-weight: 700;
}
.manager-profit-chart-head h2 i { color: var(--via-primary); }
.manager-profit-chart-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .3rem;
    flex-wrap: wrap;
}
.manager-profit-chart-metrics .btn,
.manager-profit-chart-periods .btn {
    padding: .16rem .45rem;
    font-size: .6875rem;
}
.manager-profit-chart-metrics .btn.active,
.manager-profit-chart-periods .btn.active {
    color: #243f98;
    background: #dfe6ff;
    border-color: #8092d2;
}
.manager-profit-chart-week-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .25rem;
    min-height: 0;
    padding: 0;
    color: #667085;
    font-size: .6875rem;
}
.manager-profit-chart-week-navigation[hidden] { display: none; }
.manager-profit-chart-week-navigation .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    min-height: 1.4rem;
    padding: 0;
    font-size: .6875rem;
}
.manager-profit-chart-canvas {
    position: relative;
    min-height: 9.25rem;
    flex: 1 1 auto;
    padding: .15rem .7rem .55rem .35rem;
}
.statistics-disclosure > summary {
    display: inline-flex;
    align-items: center;
    color: var(--via-primary);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: .2rem;
    cursor: pointer;
    list-style: none;
}
.statistics-disclosure > summary::-webkit-details-marker { display: none; }
.statistics-disclosure > summary::before { content: "▸"; margin-right: .35rem; }
.statistics-disclosure[open] > summary::before { content: "▾"; }
.filters label, .source-picker label {
    display: block;
    margin-bottom: .5rem;
    font-size: .875rem;
    font-weight: 600;
}

.filters input[type="date"],
.filters input[type="text"],
.filters select,
.compare-fields input,
.compare-fields select,
.panel input[type="text"],
.panel input[type="date"],
.panel select {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.filters input, .filters select { min-height: 38px; }
.filters select[multiple] { min-height: 9rem; }

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric {
    margin: 0;
    padding: 1rem;
    border: 1px solid #e4e7ee;
    box-shadow: 0 .125rem .5rem rgba(25, 35, 65, .04);
}

.metric-hint { margin-top: .25rem; color: #6b7280; font-size: .78rem; }

.summary-strip {
    display: flex;
    gap: 0;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: .65rem;
    box-shadow: 0 .125rem .5rem rgba(25, 35, 65, .04);
}
.summary-strip > div {
    min-width: 7rem;
    flex: 1 0 auto;
    padding: .55rem .7rem;
    border-right: 1px solid #e8ebf1;
}
.summary-strip > div:last-child { border-right: 0; }
.summary-strip span { display: block; color: #6b7280; font-size: .75rem; line-height: 1.15; white-space: nowrap; }
.summary-strip strong { display: block; margin-top: .2rem; color: #252b3b; font-size: .9375rem; line-height: 1.15; white-space: nowrap; }
.summary-strip .summary-profit { cursor: help; }
.summary-strip .summary-profit strong { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.summary-strip .summary-profit strong i { font-size: 1rem; }
.summary-strip .summary-profit-up { background: linear-gradient(135deg, #effaf4 0%, #dff4e8 100%); }
.summary-strip .summary-profit-up strong i { color: #198754; }
.summary-strip .summary-profit-same { background: linear-gradient(135deg, #fff9e8 0%, #fff1c7 100%); }
.summary-strip .summary-profit-same strong i { color: #b77900; }
.summary-strip .summary-profit-down { background: linear-gradient(135deg, #fff2f2 0%, #fbdede 100%); }
.summary-strip .summary-profit-down strong i { color: #c63f4a; }
.summary-strip .summary-qualified-request {
  background: #f4f4f6;
  box-shadow: inset 0 0 0 1px rgba(62, 68, 82, .035);
}

.breakdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: 0;
    color: var(--via-primary);
    background: none;
    border: 0;
    font: inherit;
    font-weight: 600;
    text-align: left;
}
.breakdown-toggle:hover span { text-decoration: underline; }
.dimension-page-link {
    color: inherit;
    text-decoration: none;
}
.dimension-page-link:hover { text-decoration: underline; }
.breakdown-toggle i { width: .8rem; font-size: 10px; }
.breakdown-row > td { padding: .7rem !important; background: #f6f8fc; }
.breakdown-container > .panel { margin: 0; border-radius: .55rem; box-shadow: none; }
.breakdown-container .breakdown-row > td { background: #eef2f8; }
.breakdown-loading, .breakdown-error { padding: 1rem; color: var(--bs-secondary-color); text-align: center; }
.breakdown-error { color: var(--bs-danger-text-emphasis); }
.detail-trigger-row { cursor: pointer; }
.detail-trigger-row.active-detail-row > *,
.detail-trigger-row.active-detail-row:hover > * { background: #dceaff !important; }
.office-detail-slot { scroll-margin-top: 1rem; }
.office-detail-card {
    margin: -.65rem 0 1.5rem;
    border: 1px solid #d8cef5;
    border-left: 5px solid #7557c8;
    border-radius: .7rem;
    box-shadow: 0 .45rem 1.2rem rgba(71, 50, 132, .11);
}
.office-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1rem;
    background: linear-gradient(115deg, #f1edff 0%, #fbfaff 70%);
    border-bottom: 1px solid #ddd5f3;
}
.office-detail-head h2 { margin: .15rem 0 0; font-size: 1rem; font-weight: 700; }
.office-detail-kicker { color: #6044b0; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.office-detail-body > .panel { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.office-detail-body > .panel > .table-wrap { max-height: none; }
.office-detail-body .active-source-group-row > *,
.office-detail-body .active-source-group-row:hover > * { background: #ffedc2 !important; }
.breakdown-trigger-row { cursor: pointer; }
.office-detail-body .breakdown-row > td { padding: 0 !important; background: #fffaf1; }
.manager-source-groups .active-source-group-row > *,
.manager-source-groups .active-source-group-row:hover > * { background: #ffedc2 !important; }
.manager-source-groups .breakdown-row > td { padding: 0 !important; background: #fffaf1; }
.manager-source-groups .inline-source-breakdown,
.manager-source-groups .inline-source-breakdown table,
.manager-source-groups .inline-source-breakdown table tbody tr > * { background: #fffaf1; }
.manager-source-groups .inline-source-breakdown table tbody tr:hover > * { background: #f8eedb !important; }
.inline-source-breakdown { margin: 0; padding: 0; background: #fffaf1; }
.inline-source-breakdown table { margin: 0; background: #fffaf1; }
.inline-source-breakdown table tbody tr > * { background: #fffaf1; }
.inline-source-breakdown table tbody tr:hover > * { background: #f8eedb !important; }
.inline-source-breakdown table tfoot > * { background: #fbf1df; }

.company-source-overview {
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: #f4fcff;
    border: .0625rem solid #d6e6ed;
    box-shadow: 0 .25rem .9rem rgba(44, 93, 128, .07);
}
.company-source-head {
    padding: .8rem 1rem;
    border-bottom: .0625rem solid #d6e6ed;
}
.company-source-head .section-title i { color: var(--via-primary); background: #e9eeff; }
.company-source-body > .panel {
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.company-source-body > .panel > .table-wrap { max-height: none; }
.company-source-body > .panel > .table-wrap > table > thead th,
.company-source-body > .panel > .table-wrap > table > tfoot > * > * {
    background: #e8f2f7;
}
.company-source-overview .active-source-group-row > *,
.company-source-overview .active-source-group-row:hover > * { background: #ffedc2 !important; }
.company-source-overview .breakdown-row > td { padding: 0 !important; background: #fffaf1; }
.company-source-overview .inline-source-breakdown,
.company-source-overview .inline-source-breakdown table,
.company-source-overview .inline-source-breakdown table tbody tr > * { background: #fffaf1; }
.company-source-overview .inline-source-breakdown table tbody tr:hover > * { background: #f8eedb !important; }
.company-source-overview .inline-source-breakdown table tfoot > * { background: #fbf1df; }

.analytics-metrics-table { min-width: 106rem; table-layout: fixed; }
.analytics-metrics-table .metric-col-check { width: 2.25rem; }
.analytics-metrics-table .metric-col-name { width: 13rem; }
.analytics-metrics-table .metric-col-appeals { width: 6.25rem; }
.analytics-metrics-table .metric-col-applications { width: 6.25rem; }
.analytics-metrics-table .metric-col-nonlead { width: 7.25rem; }
.analytics-metrics-table .metric-col-qualified { width: 7rem; }
.analytics-metrics-table .metric-col-conversion { width: 7rem; }
.analytics-metrics-table .metric-col-sales { width: 6rem; }
.analytics-metrics-table .metric-col-payment { width: 7.25rem; }
.analytics-metrics-table .metric-col-money { width: 8rem; }

.manager-overview {
    overflow: hidden;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}
.manager-overview:not(.manager-overview-expanded) {
    background: #f4fcff;
    border: .0625rem solid #d6e6ed;
    box-shadow: 0 .25rem .9rem rgba(44, 93, 128, .07);
}
.manager-overview-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: .8rem 1rem 0; }
.manager-overview:not(.manager-overview-expanded) .manager-overview-head .section-title i { color: var(--via-primary); background: #e9eeff; }
.manager-name-search { width: min(320px, 100%); margin: 0 0 0 auto; }
.manager-name-search span { display: block; margin-bottom: .25rem; color: #6b7280; font-size: 11px; font-weight: 600; }
.manager-name-search input { display: block; width: 100%; min-height: 31px; padding: .25rem .55rem; font-size: 12px; }
.manager-office-checks { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin: .7rem 1rem 0; padding-top: .65rem; border-top: .0625rem solid #cadce9; }
.manager-office-checks label { display: inline-flex; align-items: center; gap: .3rem; margin: 0; font-size: 12px; cursor: pointer; }
.manager-office-checks input { margin: 0; }
.manager-overview-table { margin-top: .7rem; border-top: .0625rem solid #cadce9; }
.manager-overview:not(.manager-overview-expanded) .manager-office-checks,
.manager-overview:not(.manager-overview-expanded) .manager-overview-table { border-color: #d6e6ed; }
.manager-overview-table > .panel { margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.manager-overview-table > .panel > .table-wrap { max-height: 32.5rem; }
.manager-overview:not(.manager-overview-expanded) .manager-overview-table > .panel > .table-wrap > table > thead th,
.manager-overview:not(.manager-overview-expanded) .manager-overview-table > .panel > .table-wrap > table > tfoot > * > * {
    background: #e8f2f7;
}
.manager-overview-expanded {
    background: var(--bs-body-bg);
    border: 1px solid #e1e6f0;
    box-shadow: 0 .25rem 1rem rgba(30, 42, 76, .07);
}
.manager-overview-expanded .manager-quick-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem);
    align-items: end;
    gap: 1rem;
    padding: .85rem 1rem;
    background: linear-gradient(115deg, #f7f9ff 0%, #fff 68%);
    border-bottom: 1px solid #e4e9f2;
}
.manager-overview-expanded .manager-quick-filters .manager-office-checks {
    margin: 0;
    padding: 0 0 .35rem;
    background: transparent;
    border-top: 0;
    border-bottom: 0;
}
.manager-overview-expanded .manager-quick-filters .manager-name-search { width: 100%; }
.manager-overview-expanded .manager-overview-table { margin-top: 0; border-top: 0; }
.manager-overview-expanded .manager-overview-table > .panel > .table-wrap { max-height: none; }
.manager-directory-table { min-width: 88rem; }
.manager-directory-table .manager-directory-name-col { width: 14rem; }
.manager-directory-table .manager-directory-rating-col { width: 7.5rem; }
.manager-rating-sort {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .3rem;
    width: 100%;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    font: inherit;
    text-align: right;
    cursor: pointer;
}
.manager-rating-sort:hover,
.manager-rating-sort:focus-visible { color: var(--via-primary); }
.manager-rating-sort i { flex: 0 0 auto; font-size: .7rem; }
.manager-directory-rating { color: #44536a; font-weight: 700; }
.manager-directory-conversion .manager-conversion-value {
  display: inline;
  color: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  transition: color .12s ease;
}
.manager-conversion-value.conversion-rate-low {
  color: #b3404b;
}
.manager-conversion-value.conversion-rate-mid {
  color: #a87900;
}
.manager-conversion-value.conversion-rate-high {
  color: #27824b;
}

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.list-scroll { max-height: 520px; overflow: auto; }
.list-scroll thead { position: sticky; top: 0; z-index: 2; }

.panel table {
    width: 100%;
    margin-bottom: 0;
    color: var(--bs-emphasis-color);
    vertical-align: top;
    border-color: var(--bs-border-color);
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}

.panel table > :not(caption) > * > * {
    padding: .38rem .46rem;
    border-bottom-width: var(--bs-border-width);
    border-color: inherit;
}

.panel table thead th {
    color: #6b7280;
    background: #f8f9fb;
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .025em;
    white-space: nowrap;
}

.analytics-metrics-table thead th { vertical-align: bottom; white-space: normal; }
.analytics-metrics-table .metric-header-label {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.profit-header { white-space: nowrap; }
.analytics-metrics-table .metric-header-label.profit-header {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    overflow: visible;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}
.paid-profit-icon { color: #8795a3; font-size: .82em; font-weight: 400; opacity: .72; }
.analytics-metrics-table th.num .metric-header-label { text-align: right; }

.table { font-size: 12px; }
.table thead th { font-size: 11px; }

.compact-filters label { margin-bottom: .25rem; font-size: 12px; }
.compact-filters input, .compact-filters select { min-height: 31px; padding: .25rem .5rem; font-size: 12px; }
.compact-filters .btn { min-height: 31px; padding: .25rem .55rem; font-size: 12px; }

.panel table tbody tr:hover > * { background: rgba(var(--bs-emphasis-color-rgb), .025); }
.panel table tfoot > * { font-weight: 700; background: #f8f9fb; }
.num { text-align: right; white-space: nowrap; }
.name { font-weight: 600; }
.coverage { display: block; color: var(--bs-secondary-color); font-size: .72rem; font-weight: 400; }
.empty { padding: 3rem 1rem !important; color: var(--bs-secondary-color); text-align: center; }

.badge-good { color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); }
.badge-warn { color: var(--bs-warning-text-emphasis); background: var(--bs-warning-bg-subtle); }
.badge-appeal { color: #365465; background: #e7f1f5; }
.via-call-column,
.via-call-cell { min-width: 22rem; }
.via-call-cell { padding-top: .45rem; padding-bottom: .45rem; }
.via-call-item + .via-call-item {
    margin-top: .55rem;
    padding-top: .55rem;
    border-top: 1px solid #e5e9ee;
}
.via-call-media { display: flex; align-items: center; gap: .45rem; }
.via-call-audio { width: 16.5rem; height: 2rem; }
.via-call-date {
    margin-bottom: .25rem;
    color: #687183;
    font-size: .6875rem;
    font-weight: 500;
    line-height: 1.25;
}
.via-call-transcript-button {
    flex: 0 0 auto;
    padding: .28rem .5rem;
    font-size: .75rem;
    white-space: nowrap;
}
.via-call-no-record {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    width: 13.5rem;
    min-height: 2rem;
    color: #707887;
    background: #f4f6f8;
    border: 1px solid #e1e5e9;
    border-radius: .4rem;
    font-size: .75rem;
}
.via-call-transcript-modal .modal-dialog { max-width: 48rem; }
.via-call-transcript-modal .modal-title { font-size: .9375rem; font-weight: 700; }
.via-call-dialogue-meta { margin-top: .15rem; color: #707887; font-size: .75rem; }
.via-call-dialogue-state { padding: 1.5rem .5rem; color: #707887; text-align: center; }
.via-call-dialogue { display: flex; flex-direction: column; gap: .65rem; }
.via-call-dialogue-message {
    align-self: flex-start;
    max-width: 84%;
    padding: .65rem .75rem;
    color: #303846;
    background: #f1f3f5;
    border: 1px solid #e2e6ea;
    border-radius: .75rem .75rem .75rem .2rem;
    font-size: .8125rem;
    line-height: 1.45;
    white-space: pre-wrap;
}
.via-call-dialogue-message.is-client {
    align-self: flex-end;
    background: #edf7fb;
    border-color: #d7e9f0;
    border-radius: .75rem .75rem .2rem .75rem;
}
.via-call-dialogue-speaker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .25rem;
    color: #647080;
    font-size: .6875rem;
}
.badge-request { color: #294b8f; background: #e3ebff; }
.distribution-list { height: 31.25rem; overflow: auto; }
.distribution-list thead { position: sticky; top: 0; z-index: 1; }
.distribution-list label { cursor: pointer; margin: 0; font-weight: 400; }
.care-calls-panel { width: 100%; max-width: 55rem; margin-left: 0; margin-right: auto; }
.care-calls-table th:first-child,
.care-calls-table td:first-child { width: 12rem; white-space: nowrap; }
.care-calls-table th:nth-child(2),
.care-calls-table td:nth-child(2) { min-width: 14rem; }
.distribution-page, .distribution-settings, .lead-public { font-size: .75rem; }
.distribution-page .btn, .distribution-settings .btn, .lead-public .btn,
.distribution-settings input, .lead-public input, .lead-public textarea { font-size: .75rem; }
.distribution-office-settings-table { overflow-x: auto; }
.distribution-office-settings-table table { min-width: 45rem; }
.distribution-office-settings-table th:nth-child(2) { width: 22%; }
.distribution-office-settings-table th:nth-child(3) { width: 34%; }
.distribution-office-alias { min-width: 13rem; }
.distribution-form-groups-table table { min-width: 38rem; }
.distribution-history-table { min-width: 58rem; }
.distribution-history-table th:first-child,
.distribution-history-table td:first-child,
.distribution-history-table th:nth-child(4),
.distribution-history-table td:nth-child(4) { width: 11.5rem; white-space: nowrap; }
.distribution-queue-actions { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.distribution-queue-actions form { display: inline-flex; margin: 0; }
.distribution-queue-contact { display: inline-block; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.distribution-queue-badge { color: #664d03; background: #fff3cd; border: 1px solid #ffecb5; font-weight: 500; }
.distribution-queue-modal { font-size: .75rem; }
.distribution-queue-modal .form-control,
.distribution-queue-modal .form-select,
.distribution-queue-modal .btn { font-size: .75rem; }
.distribution-journal-panel { font-size: .75rem; }
.distribution-journal-table { min-width: 76rem; }
.distribution-journal-table > thead > tr > th:first-child,
.distribution-journal-table > tbody > tr > td:first-child { width: 12rem; }
.distribution-journal-table > thead > tr > th:last-child,
.distribution-journal-table > tbody > tr:not(.distribution-decision-detail) > td:last-child { width: 3rem; text-align: right; }
.distribution-decision-detail > td { padding: .75rem 1rem; background: #f7fafc; }
.distribution-decision-explanation { color: #465568; }
.distribution-decision-math { padding: .45rem .6rem; border: 1px solid #dce5ee; border-radius: .4rem; color: #465568; background: #fff; }
.distribution-candidates-table { min-width: 92rem; background: #fff; }
.distribution-candidate-selected > td { background: #edf7fb; }
.distribution-decision-state { display: inline-flex; padding: .2rem .45rem; border-radius: 999px; background: #eef2f6; color: #435064; white-space: nowrap; }
.distribution-decision-state-sent { background: #e5f5ea; color: #24643a; }
.distribution-decision-state-verifying,
.distribution-decision-state-no_eligible_manager { background: #fff4d9; color: #765a13; }
.distribution-decision-state-candidate_changed { background: #fce9e9; color: #8a3131; }
.lead-public { max-width: 44rem; font-size: .8125rem; }
.lead-public .btn,
.lead-public input,
.lead-public textarea { font-size: .8125rem; }
.lead-public .page-title { font-size: 1.15rem !important; }
.lead-public legend { font-size: .9375rem; font-weight: 600; }

.uon-card-link,
.uon-card-link:visited {
    color: #527596;
    font-weight: inherit;
    text-decoration: none;
}
.uon-card-link:hover,
.uon-card-link:focus-visible {
    color: #315d82;
    text-decoration: none;
}

.tabs, .operation-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.tab, .operation-tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .375rem .75rem;
    color: var(--via-primary);
    background: transparent;
    border: 1px solid var(--via-primary);
    border-radius: var(--bs-border-radius-sm);
    font-size: .875rem;
    font-weight: 400;
    text-decoration: none;
}
.tab.active, .operation-tab.active { color: #fff; background: var(--via-primary); }

.entity-head {
    padding: 1rem;
    background: var(--bs-body-bg);
    border-left: 4px solid var(--via-primary);
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow-sm);
}
.entity-heading { display: flex; align-items: center; gap: 1rem; }
.entity-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; color: var(--via-primary); background: #eef2ff; border-radius: 50%; font-size: 1.35rem; }
.entity-office { border-left-color: var(--bs-success); }
.entity-source { border-left-color: var(--bs-warning); }
.manager-profile-head {
    padding: 1rem;
    background: var(--bs-body-bg);
    border-left: 4px solid var(--via-primary);
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow-sm);
}
.manager-profile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    margin-left: auto;
}
.manager-quality-button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 1.9375rem;
    padding: .25rem .55rem;
    color: #626b78;
    border-color: #cbd1d9;
    font-size: .75rem;
    white-space: nowrap;
}
.manager-quality-rating {
    display: flex;
    align-items: baseline;
    gap: .3rem;
    margin-top: .35rem;
    color: #697382;
    font-size: .75rem;
    line-height: 1.25;
    white-space: nowrap;
}
.manager-quality-rating strong {
    color: #303948;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.manager-quality-modal .modal-dialog {
    width: calc(100vw - 2rem);
    max-width: 96rem;
}
.manager-quality-modal .modal-title {
    color: #293041;
    font-size: 1rem;
    font-weight: 700;
}
.manager-quality-subtitle {
    margin-top: .2rem;
    color: #737c89;
    font-size: .75rem;
}
.manager-quality-modal .modal-body { padding: .85rem; }
.manager-quality-loading,
.manager-quality-error {
    padding: 1.5rem;
    color: #747d8a;
    font-size: .75rem;
    text-align: center;
}
.manager-quality-loading .spinner-border { margin-right: .35rem; }
.manager-quality-error { color: #97353d; }
.manager-quality-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e1e6ec;
    border-radius: .55rem;
    -webkit-overflow-scrolling: touch;
}
.manager-quality-table {
    width: 100%;
    min-width: 78rem;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.manager-quality-table th,
.manager-quality-table td {
    padding: .65rem .55rem;
    border-right: 1px solid #e4e8ed;
    border-bottom: 1px solid #e4e8ed;
    font-size: .75rem;
    line-height: 1.25;
    text-align: center;
    vertical-align: middle;
}
.manager-quality-table thead th {
    min-width: 7.2rem;
    color: #576171;
    background: #f3f5f8;
    font-weight: 600;
}
.manager-quality-table thead th:first-child {
    width: 10rem;
    min-width: 10rem;
    text-align: left;
}
.manager-quality-table tbody th {
    color: #3d4655;
    background: #fafbfc;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}
.manager-quality-table tr > *:last-child { border-right: 0; }
.manager-quality-table tbody tr:last-child > * { border-bottom: 0; }
.manager-quality-cell { font-weight: 700; }
.manager-quality-cell-good { color: #176540; background: #e7f6ed; }
.manager-quality-cell-warning { color: #7a5913; background: #fff4d5; }
.manager-quality-cell-bad { color: #97353d; background: #fdebed; }
.manager-quality-cell-empty {
    color: #9299a5;
    background: #f7f8fa;
    font-weight: 500;
}

.forecast-office-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem .875rem;
}
.forecast-office-filter-copy { flex: 0 0 auto; min-width: 11.5rem; }
.forecast-office-filter-copy h2 {
    margin: 0 0 .2rem;
    color: #252b3b;
    font-size: .875rem;
    font-weight: 700;
}
.forecast-office-filter-copy h2 i { margin-right: .25rem; color: var(--via-primary); }
.forecast-office-filter-copy .muted { max-width: 18rem; font-size: .75rem; line-height: 1.3; }
.forecast-office-options { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: .4rem .55rem; min-width: 0; }
.forecast-office-option {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
    padding: .3rem .5rem;
    color: #4d5565;
    background: #f8f9fc;
    border: .0625rem solid #e0e5ee;
    border-radius: .45rem;
    font-size: .75rem;
    line-height: 1.2;
    cursor: pointer;
}
.forecast-office-option:hover { background: #f1f4fa; border-color: #cfd7e5; }
.forecast-office-option-all { color: #2848ae; background: #eef2ff; border-color: #cfd9ff; font-weight: 700; }
.forecast-office-option input { width: .875rem; height: .875rem; margin: 0; accent-color: var(--via-primary); }
.forecast-office-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .65rem; }
.forecast-office-selection { max-width: 13rem; overflow: hidden; color: #707889; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.forecast-office-actions .btn { min-height: 2rem; padding: .3rem .65rem; font-size: .75rem; white-space: nowrap; }

.retention-panel { overflow: hidden; }
.retention-head { padding: .75rem .9rem; }
.retention-overview-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: linear-gradient(135deg, #f7faf9 0%, #f7f9fd 100%);
}
.retention-overview-kpi {
    min-width: 0;
    padding: .8rem .9rem;
    border-right: .0625rem solid #e1e7e8;
}
.retention-overview-kpi:last-child { border-right: 0; }
.retention-overview-kpi > span,
.retention-overview-kpi small {
    display: block;
    color: #68717d;
    font-size: .75rem;
    line-height: 1.3;
}
.retention-overview-kpi small + small { margin-top: .18rem; }
.retention-overview-kpi strong {
    display: block;
    margin: .2rem 0;
    color: #252b3b;
    font-size: 1.125rem;
    line-height: 1.2;
}
.retention-overview-kpi strong em {
    color: #34765a;
    font-size: .75rem;
    font-style: normal;
    font-weight: 700;
}
.retention-year-kpi .retention-year-switch {
    max-width: 100%;
    margin: .45rem 0;
}
.retention-year-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .125rem;
    overflow: visible;
    padding: .125rem;
    background: #eef1f6;
    border: .0625rem solid #dfe4ed;
    border-radius: .65rem;
}
.retention-year-link {
    min-width: 3.35rem;
    padding: .25rem .55rem;
    color: #61697a;
    border-radius: 50rem;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}
.retention-year-link:hover { color: #2848ae; background: rgba(255, 255, 255, .65); }
.retention-year-link.is-active {
    color: #fff;
    background: var(--via-primary);
    box-shadow: 0 .125rem .3rem rgba(49, 87, 213, .2);
}
.retention-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #fbfcff;
    border-top: .0625rem solid #e4e9f2;
    border-bottom: .0625rem solid #e4e9f2;
}
.retention-kpi {
    min-width: 0;
    padding: .7rem .85rem;
    border-right: .0625rem solid #e4e9f2;
}
.retention-kpi:last-child { border-right: 0; }
.retention-kpi > span,
.retention-kpi small { display: block; color: #6b7280; font-size: .75rem; line-height: 1.25; }
.retention-kpi strong { display: block; margin: .18rem 0; color: #252b3b; font-size: 1.0625rem; line-height: 1.2; }
.retention-kpi strong em { color: var(--via-primary); font-size: .75rem; font-style: normal; font-weight: 700; }
.retention-plan-forecast-label {
    display: inline;
    margin-left: .15rem;
    color: #6b7280;
    font-size: .625rem;
    font-weight: 600;
}
.retention-kpi-current { background: #f2f5ff; box-shadow: inset .1875rem 0 0 var(--via-primary); }

.retention-periods {
    display: grid;
    grid-template-columns: none;
    grid-template-rows: 1fr;
    grid-auto-flow: column;
    grid-auto-columns: minmax(17rem, 1fr);
    gap: .75rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: .875rem;
    scroll-snap-type: inline proximity;
    -webkit-overflow-scrolling: touch;
}
.retention-period {
    min-width: 17rem;
    padding: .75rem;
    background: #fff;
    border: .0625rem solid #e1e6f0;
    border-top: .1875rem solid #cbd2df;
    border-radius: .55rem;
    scroll-snap-align: start;
}
.retention-period-clickable {
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.retention-period-clickable:hover {
    border-right-color: #aebbd1;
    border-bottom-color: #aebbd1;
    border-left-color: #aebbd1;
    box-shadow: 0 .28rem .75rem rgba(48, 66, 105, .11);
    transform: translateY(-.0625rem);
}
.retention-period-clickable:focus-visible {
    outline: .125rem solid rgba(49, 87, 213, .35);
    outline-offset: .125rem;
}
.retention-period-clickable.is-selected {
    border-right-color: #7f94d8;
    border-bottom-color: #7f94d8;
    border-left-color: #7f94d8;
    box-shadow: 0 0 0 .125rem rgba(49, 87, 213, .12), 0 .32rem .8rem rgba(48, 66, 105, .13);
}
.retention-period-current { background: #f8faff; box-shadow: 0 .25rem .7rem rgba(49, 87, 213, .12); }
.retention-period-future { background: #fafbfc; }
.retention-tone-good { border-top-color: #2d9b67; }
.retention-tone-warn { border-top-color: #d89a25; }
.retention-tone-bad { border-top-color: #dc5961; }
.retention-tone-current { border-top-color: var(--via-primary); }
.retention-tone-future { border-top-color: #aeb6c4; }
.retention-period-heading { position: relative; min-height: 3.75rem; margin-bottom: .55rem; padding-right: 1.1rem; }
.retention-period-heading > div { display: flex; align-items: baseline; gap: .35rem; }
.retention-period-number { color: #a0a7b5; font-size: .75rem; font-weight: 700; }
.retention-period h3 { margin: 0; color: #252b3b; font-size: .875rem; font-weight: 700; line-height: 1.2; }
.retention-status {
    display: inline-block;
    margin-top: .25rem;
    padding: .12rem .35rem;
    color: #606879;
    background: #f1f3f7;
    border-radius: 50rem;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.2;
}
.retention-tone-good .retention-status { color: #176540; background: #e9f7f0; }
.retention-tone-warn .retention-status { color: #805b13; background: #fff4d7; }
.retention-tone-bad .retention-status { color: #9d3038; background: #fdecee; }
.retention-tone-current .retention-status { color: #2848ae; background: #e9eeff; }
.retention-period-open-icon {
    position: absolute;
    top: .05rem;
    right: 0;
    color: #8a94a5;
    font-size: .75rem;
    transition: transform .16s ease, color .16s ease;
}
.retention-period-clickable.is-selected .retention-period-open-icon {
    color: #3157b8;
    transform: rotate(180deg);
}
.retention-bar-row { margin-top: .42rem; }
.retention-bar-row > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; }
.retention-bar-row span { color: #707889; font-size: .75rem; }
.retention-bar-row strong { color: #303747; font-size: .875rem; }
.retention-forecast-adjustment-icon { margin-left: .12rem; color: #7585ba; font-size: .6875rem; cursor: help; }
.retention-bar-track { height: .3125rem; overflow: hidden; margin-top: .12rem; background: #edf0f5; border-radius: 50rem; }
.retention-bar-track > span { display: block; min-width: 0; height: 100%; border-radius: inherit; }
.retention-bar-forecast { background: #7890e6; }
.retention-bar-actual { background: #38a875; }
.retention-composition {
    margin-top: .5rem;
    padding: .45rem .5rem;
    background: #f6f8fc;
    border: .0625rem solid #e9edf4;
    border-radius: .4rem;
}
.retention-composition-actual { background: #f4faf7; border-color: #e0f0e7; }
.retention-composition > div { display: flex; justify-content: space-between; gap: .5rem; margin-top: .3rem; }
.retention-composition > div:first-child { margin-top: 0; }
.retention-composition span,
.retention-composition strong { font-size: .75rem; line-height: 1.25; }
.retention-composition span { color: #747c8c; }
.retention-composition strong { color: #303747; white-space: nowrap; }
.retention-composition-title { padding-bottom: .3rem; border-bottom: .0625rem solid rgba(67, 78, 100, .1); }
.retention-composition-title span,
.retention-composition-title strong { color: #4b5363; font-weight: 700; }
.retention-projection { display: flex; justify-content: space-between; gap: .5rem; margin-top: .55rem; padding: .45rem .5rem; background: #edf1ff; border-radius: .4rem; }
.retention-projection span,
.retention-projection strong { font-size: .75rem; line-height: 1.25; }
.retention-projection span { color: #586277; }
.retention-projection strong { color: #2848ae; white-space: nowrap; }
.retention-insufficient {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem .9rem;
    color: #626b79;
    background: #fafbfc;
    border-top: .0625rem solid #e4e9f2;
    font-size: .75rem;
    line-height: 1.35;
}
.retention-insufficient i { color: #8791a2; font-size: .875rem; }
.retention-period-detail {
    margin: 0 .875rem .875rem;
    background: #fbfcff;
    border: .0625rem solid #dfe5ef;
    border-radius: .6rem;
    box-shadow: 0 .2rem .65rem rgba(49, 62, 93, .07);
}
.retention-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .85rem;
    border-bottom: .0625rem solid #e5e9f1;
}
.retention-detail-head h3 {
    margin: 0;
    color: #293041;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.3;
}
.retention-detail-summary,
.retention-detail-note {
    margin-top: .18rem;
    color: #687183;
    font-size: .75rem;
    line-height: 1.35;
}
.retention-detail-note { color: #7a6497; }
.retention-detail-close { flex: 0 0 auto; width: .75rem; height: .75rem; margin-top: .1rem; padding: .35rem; font-size: .65rem; }
.retention-detail-table-wrap { border-radius: 0 0 .6rem .6rem; }
.retention-detail-table { min-width: 67rem; margin: 0; }
.retention-detail-table th,
.retention-detail-table td {
    padding: .55rem .7rem;
    font-size: .75rem;
    line-height: 1.35;
    vertical-align: middle;
}
.retention-detail-table th {
    color: #626b7a;
    background: #f2f5fa;
    white-space: nowrap;
}
.retention-detail-table th:first-child { min-width: 15rem; }
.retention-detail-table th:nth-child(2),
.retention-detail-table th:nth-child(5) { min-width: 11rem; }
.retention-detail-table th:nth-child(3) { min-width: 11.5rem; }
.retention-detail-table th:nth-child(4) { min-width: 17rem; }
.retention-client-id {
    display: inline;
    margin-left: .3rem;
    color: #9299a7;
    font-size: .6875rem;
    font-weight: 400;
    white-space: nowrap;
}
.retention-client-cell a {
    color: #3157b8;
    font-weight: 600;
    text-decoration: none;
}
.retention-manager-cell,
.retention-manager-cell a {
    color: #755f86;
    font-weight: 400;
}
.retention-manager-cell a { text-decoration: none; }
.retention-client-cell a:hover,
.retention-manager-cell a:hover { text-decoration: underline; }
.retention-detail-badge {
    display: inline-block;
    padding: .22rem .4rem;
    color: #596273;
    background: #eef1f5;
    border-radius: .35rem;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.25;
}
.retention-detail-badge-stable { color: #2e4a9b; background: #eaf0ff; }
.retention-detail-badge-changed { color: #675581; background: #f2edfa; }
.retention-detail-badge-good { color: #176540; background: #e6f6ee; }
.retention-detail-badge-shifted { color: #805b13; background: #fff3d2; }
.retention-detail-badge-bad { color: #96333b; background: #fdebed; }
.retention-detail-badge-pending,
.retention-detail-badge-muted { color: #616a79; background: #eef1f5; }
.retention-detail-loading,
.retention-detail-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 5rem;
    padding: 1rem;
    color: #687183;
    font-size: .75rem;
}
.retention-detail-error { color: #96333b; }

.settings-grid { display: grid; gap: 1rem; }
.access-settings, .access-settings .form-control, .access-settings .form-select,
.access-settings .form-label, .access-settings .btn { font-size: .75rem; }
.settings-section { margin-bottom: 0; scroll-margin-top: 1rem; }
.settings-section-head { padding: .7rem .85rem; }
.settings-section-head .section-title i { width: 2rem; height: 2rem; }
.settings-section-head .btn,
.settings-percentage-form .btn,
.settings-assignment-toolbar .btn,
.settings-create-modal .btn,
.settings-edit-modal .btn {
    min-height: 1.9375rem;
    padding: .25rem .5rem;
    font-size: .75rem;
}
.settings-percentage-form {
    display: flex;
    align-items: end;
    gap: .75rem;
    padding: .85rem;
    border-top: .0625rem solid var(--bs-border-color);
}
.settings-percentage-form > label,
.settings-assignment-toolbar label > span {
    display: block;
    color: #5f6878;
    font-size: .75rem;
    font-weight: 600;
}
.settings-percentage-control { position: relative; width: 7.5rem; }
.settings-percentage-control input { width: 100%; min-height: 2rem; padding: .3rem 2rem .3rem .6rem; font-size: .75rem; }
.settings-percentage-control span { position: absolute; top: 50%; right: .7rem; color: #677083; transform: translateY(-50%); }
.settings-assignment-toolbar {
    display: flex;
    align-items: end;
    gap: .75rem;
    padding: .8rem .85rem;
    background: #f8f9fc;
    border-top: .0625rem solid var(--bs-border-color);
    border-bottom: .0625rem solid var(--bs-border-color);
}
.settings-assignment-toolbar label { flex: 1 1 18rem; margin: 0; }
.settings-assignment-toolbar select { width: 100%; min-height: 2rem; margin-top: .25rem; padding: .3rem .6rem; font-size: .75rem; }
.settings-assignment-list { max-height: 18rem; overflow: auto; }
.settings-assignment-list table { table-layout: fixed; }
.settings-assignment-list tbody tr > * { background: #fff; }
.settings-check-column { width: 3.75rem; text-align: center; }
.settings-check-column input { width: 1rem; height: 1rem; margin: 0; }
.settings-saved-head { display: flex; align-items: baseline; gap: .6rem; padding: .8rem .85rem .4rem; border-top: .0625rem solid var(--bs-border-color); }
.settings-saved-head strong { font-size: .8125rem; }
.settings-table-wrap { max-height: 330px; overflow: auto; }
.settings-composition { max-width: 680px; color: var(--bs-secondary-color); font-size: 11px; white-space: normal; }
.settings-actions-column { width: 86px; }
.settings-row-actions { display: flex; justify-content: flex-end; gap: .3rem; }
.settings-row-actions form { margin: 0; }
.settings-row-actions .btn { display: inline-grid; width: 31px; height: 29px; padding: 0; place-items: center; }
.settings-create-modal,
.settings-edit-modal { font-size: .75rem; }
.settings-create-modal .modal-title,
.settings-edit-modal .modal-title { font-size: .875rem; font-weight: 700; }
.settings-create-modal .modal-header,
.settings-edit-modal .modal-header { padding: .7rem .85rem; }
.settings-create-modal .modal-body,
.settings-edit-modal .modal-body { padding: .85rem; }
.settings-create-modal .modal-footer,
.settings-edit-modal .modal-footer { padding: .6rem .85rem; }
.settings-create-modal label,
.settings-edit-modal label { font-size: .75rem; }
.settings-create-modal .form-control,
.settings-edit-modal .form-control { min-height: 2rem; padding: .3rem .6rem; font-size: .75rem; }
.settings-modal-name { display: block; margin: 0; color: #4f596a; font-weight: 600; }
.settings-modal-name .form-control { margin-top: .25rem; }
.settings-modal-note { margin: .65rem 0 .45rem; font-size: .75rem; line-height: 1.35; }
.settings-modal-list { background: var(--bs-tertiary-bg); }
.settings-modal-table-scroll {
    max-height: min(50vh, 30rem);
    overflow: auto;
    background: var(--bs-body-bg);
    border-radius: calc(var(--bs-border-radius) - .125rem);
}
.settings-modal-table-scroll .table { min-width: 100%; font-size: .75rem; }
.settings-modal-table-scroll .table > :not(caption) > * > * { padding: .38rem .5rem; }
.settings-modal-table-scroll thead { position: sticky; top: 0; z-index: 2; }
.settings-modal-table-scroll thead th {
    background: var(--bs-tertiary-bg);
    box-shadow: inset 0 -.0625rem 0 var(--bs-border-color);
    font-size: .6875rem;
    white-space: nowrap;
}
.settings-modal-table-scroll tbody tr > * { background: var(--bs-body-bg); }
[data-office-group-modal] .settings-modal-table-scroll .table { min-width: 32rem; }
.settings-modal-check { width: 6rem; text-align: center; }
.settings-modal-hide { width: 10rem; text-align: center; }
.settings-modal-check input,
.settings-modal-hide input { width: 1rem; height: 1rem; margin: 0; }
.settings-modal-hide label { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 500; cursor: pointer; }
.settings-modal-hide input:disabled + span { color: #a3a9b3; }

.two-col, .compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.compare-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.compare-fields .wide { grid-column: 1 / -1; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-card { padding: 1rem; border-right: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); }
.work-card:nth-child(2n) { border-right: 0; }
.work-card h3 { margin: 0 0 .75rem; font-size: 1.05rem; font-weight: 600; }

.operation-note, .callout {
    margin-bottom: 1.5rem;
    padding: 1rem;
    color: var(--bs-info-text-emphasis);
    background: var(--bs-info-bg-subtle);
    border: 1px solid var(--bs-info-border-subtle);
    border-radius: var(--bs-border-radius);
}
.error { margin-bottom: 1rem; padding: 1rem; color: var(--bs-danger-text-emphasis); background: var(--bs-danger-bg-subtle); border: 1px solid var(--bs-danger-border-subtle); border-radius: var(--bs-border-radius); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { padding: .35rem .65rem; color: var(--bs-secondary-color); background: var(--bs-secondary-bg); border-radius: 50rem; font-size: .8rem; }
.source-picker, .group-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-height: 500px; overflow-y: auto; }
.source-option { display: flex !important; align-items: center; gap: .5rem; padding: .75rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); }
.group-card { padding: 1rem; }
.office-source-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 1rem; align-items: end; }
.office-source-empty { padding: 2rem; color: var(--bs-secondary-color); text-align: center; }

@media (max-width: 1199.98px) {
    .manager-profile-top-grid { grid-template-columns: 1fr; }
    .manager-profile-top-main > .compact-filters.manager-profile-filters {
        grid-template-columns: 112px 112px repeat(2, minmax(0, 1fr)) auto;
    }
    .manager-profile-top-main > .compact-filters.office-profile-filters {
        grid-template-columns: 112px 112px repeat(3, minmax(0, 1fr)) auto;
    }
    .manager-profile-top-main > .compact-filters.dashboard-analytics-filters {
        grid-template-columns: 112px 112px repeat(3, minmax(0, 1fr)) auto;
    }
    .manager-profile-top-main > .compact-filters.source-profile-filters {
        grid-template-columns: 112px 112px repeat(2, minmax(0, 1fr)) auto;
    }
    .manager-profit-chart-canvas { min-height: 12rem; }
    .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .compact-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .compact-filters.manager-profile-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .forecast-office-filter { align-items: flex-start; flex-wrap: wrap; }
    .forecast-office-filter-copy { flex-basis: 100%; }
    .forecast-office-filter-copy .muted { max-width: none; }
}

@media (max-width: 767.98px) {
    .manager-profile-top-main > .compact-filters.manager-profile-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .manager-profile-top-main > .compact-filters.office-profile-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .manager-profile-top-main > .compact-filters.dashboard-analytics-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .manager-profile-top-main > .compact-filters.source-profile-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .manager-profit-chart-head { flex-wrap: wrap; }
    .manager-profit-chart-controls { width: 100%; justify-content: flex-start; }
    .manager-profit-chart-metrics,
    .manager-profit-chart-periods { width: 100%; }
    .manager-profit-chart-metrics .btn,
    .manager-profit-chart-periods .btn { flex: 1 1 0; }
    .manager-profit-chart-week-navigation { justify-content: flex-start; }
    .manager-profit-chart-canvas { min-height: 11rem; }
    .manager-overview-head { align-items: stretch; flex-direction: column; }
    .manager-overview-expanded .manager-quick-filters { grid-template-columns: 1fr; }
    .manager-name-search { width: 100%; }
    .filters, .metrics, .two-col, .compare-grid, .compare-fields, .work-grid,
    .source-picker, .group-list, .office-source-filter { grid-template-columns: 1fr; }
    .compact-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .compact-filters.manager-profile-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .compact-filters > .actions,
    .compact-filters > .quick-periods { grid-column: 1 / -1; }
    .compact-filters > .actions .btn { flex: 1 1 0; }
    .compact-filters > .quick-periods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .compact-filters > .quick-periods .btn { width: 100%; }
    .page-head { display: block; }
    .page-head .actions { margin-top: 1rem; }
    .manager-profile-head .entity-heading { align-items: flex-start; }
    .manager-profile-head .entity-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 1.05rem; }
    .manager-profile-actions { margin-top: .75rem; }
    .forecast-office-filter { display: block; }
    .forecast-office-options { margin-top: .7rem; }
    .forecast-office-actions { justify-content: space-between; margin-top: .75rem; padding-top: .65rem; border-top: .0625rem solid #e8ebf1; }
    .forecast-office-selection { max-width: calc(100% - 9rem); }
    .retention-overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .retention-overview-kpi { border-bottom: .0625rem solid #e1e7e8; }
    .retention-overview-kpi:nth-child(2) { border-right: 0; }
    .retention-overview-kpi:nth-child(n+3) { border-bottom: 0; }
    .retention-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .retention-kpi:nth-child(2) { border-right: 0; }
    .retention-kpi:nth-child(-n+2) { border-bottom: .0625rem solid #e4e9f2; }
    .retention-periods { padding: .75rem; }
    .work-card { border-right: 0; }
    .settings-percentage-form,
    .settings-assignment-toolbar { align-items: stretch; flex-direction: column; }
    .settings-assignment-toolbar label { width: 100%; flex-basis: auto; }
    .settings-percentage-form .btn,
    .settings-assignment-toolbar .btn { width: 100%; }
    .profile-split-filters .actions .filter-reset-button {
        width: auto;
        min-width: 31px;
        flex: 0 0 auto;
    }
}
