/* LAB Agent — overlay on home-lab-service shell (body.lab-agt-page) */

body.lab-agt-page {
    --lab-agt-accent: #2a5f6e;
    --lab-agt-accent-soft: rgba(42, 95, 110, 0.1);
}

body.lab-agt-page .lab-svc-rail__lab {
    color: var(--lab-agt-accent);
    letter-spacing: 0.07em;
}

body.lab-agt-page .lab-svc-brand__mark {
    background: var(--lab-agt-accent);
}

body.lab-agt-page .lab-svc-nav a.is-active {
    background: rgba(221, 237, 173, 0.65);
    box-shadow: inset 0 0 0 1px rgba(23, 59, 66, 0.08);
}

body.lab-agt-page .lab-agt-nav {
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 2px 6px;
    scrollbar-width: thin;
}

body.lab-agt-page .lab-agt-nav > a {
    padding: 9px 12px;
    font-size: 0.88rem;
}

/* Accordion sections: Partners / Agent */
body.lab-agt-page .lab-agt-acc {
    margin: 0;
    border: 1px solid var(--lab-line, #e4e8e1);
    border-radius: 12px;
    background: rgba(250, 251, 247, 0.92);
    overflow: hidden;
}

body.lab-agt-page .lab-agt-acc[open] {
    background: #fff;
    border-color: rgba(23, 59, 66, 0.14);
    box-shadow: 0 1px 0 rgba(18, 32, 58, 0.03);
}

body.lab-agt-page .lab-agt-acc__sum {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 10px 10px 12px;
    cursor: pointer;
    user-select: none;
    color: var(--lab-ink, #173b42);
    transition: background 160ms ease;
}

body.lab-agt-page .lab-agt-acc__sum::-webkit-details-marker {
    display: none;
}

body.lab-agt-page .lab-agt-acc__sum:hover {
    background: rgba(23, 59, 66, 0.04);
}

body.lab-agt-page .lab-agt-acc__sum:focus-visible {
    outline: 2px solid rgba(23, 59, 66, 0.28);
    outline-offset: -2px;
}

body.lab-agt-page .lab-agt-acc__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--lab-agt-accent-soft);
    color: var(--lab-agt-accent);
    flex-shrink: 0;
}

body.lab-agt-page .lab-agt-acc__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
}

body.lab-agt-page .lab-agt-acc__count {
    flex: 0 0 auto;
    min-width: 1.4em;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.3;
    color: var(--lab-muted, #6b7280);
    background: rgba(23, 59, 66, 0.06);
}

body.lab-agt-page .lab-agt-acc[open] .lab-agt-acc__count {
    color: var(--lab-agt-accent);
    background: rgba(221, 237, 173, 0.65);
}

body.lab-agt-page .lab-agt-acc__chev {
    width: 14px;
    height: 14px;
    margin-right: 2px;
    flex-shrink: 0;
    opacity: 0.55;
    color: var(--lab-ink, #173b42);
    transition: transform 160ms ease, opacity 160ms ease;
}

body.lab-agt-page .lab-agt-acc[open] .lab-agt-acc__chev {
    transform: rotate(180deg);
    opacity: 0.8;
}

body.lab-agt-page .lab-agt-acc__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 6px 8px;
    border-top: 1px solid rgba(23, 59, 66, 0.06);
}

body.lab-agt-page .lab-agt-acc__body a {
    padding: 8px 10px;
    font-size: 0.84rem;
    border-radius: 9px;
}

body.lab-agt-page .lab-agt-acc.has-active:not([open]) .lab-agt-acc__sum {
    background: rgba(221, 237, 173, 0.35);
}

body.lab-agt-page .lab-agt-acc.has-active:not([open]) .lab-agt-acc__ico {
    background: rgba(221, 237, 173, 0.75);
}

/* Collapsed rail: hide accordion chrome, show only icons of open body if needed */
body.lab-agt-page.is-rail-collapsed .lab-agt-acc__title,
body.lab-agt-page.is-rail-collapsed .lab-agt-acc__count,
body.lab-agt-page.is-rail-collapsed .lab-agt-acc__chev {
    display: none;
}

body.lab-agt-page.is-rail-collapsed .lab-agt-acc__sum {
    justify-content: center;
    padding: 8px;
}

body.lab-agt-page.is-rail-collapsed .lab-agt-acc__body a .lab-svc-nav__label {
    display: none;
}

body.lab-agt-page.is-rail-collapsed .lab-agt-acc__body a {
    justify-content: center;
    padding: 8px;
}

body.lab-agt-page .lab-agt-status:not([hidden]) {
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--lab-ink, #173b42);
    border: 1px solid rgba(23, 59, 66, 0.12);
    background: rgba(221, 237, 173, 0.45);
}

body.lab-agt-page .lab-agt-status.is-err:not([hidden]) {
    background: #fef2f2;
    border-color: rgba(185, 28, 28, 0.22);
    color: #7f1d1d;
}

body.lab-agt-page .lab-agt-status.is-info:not([hidden]) {
    background: rgba(232, 240, 254, 0.9);
}

body.lab-agt-page .lab-agt-period {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--lab-muted, #6b7280);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(23, 59, 66, 0.05);
}

body.lab-agt-page .lab-agt-kpi {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 22px;
}

body.lab-agt-page .lab-agt-kpi__card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 118px;
    padding: 14px 16px 12px;
    border-radius: 14px;
    border: 1px solid var(--lab-line, #e4e8e1);
    background: var(--lab-panel, #fff);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(18, 32, 58, 0.03);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

a.lab-agt-kpi__card:hover {
    border-color: rgba(23, 59, 66, 0.22);
    background: #fafbf8;
    box-shadow: 0 6px 18px rgba(18, 32, 58, 0.06);
}

body.lab-agt-page .lab-agt-kpi__card--mix {
    background: linear-gradient(160deg, rgba(221, 237, 173, 0.4), #fff 72%);
}

body.lab-agt-page .lab-agt-kpi__label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--lab-muted, #6b7280);
}

body.lab-agt-page .lab-agt-kpi__value {
    margin: 4px 0 0;
    font-family: 'Unbounded', 'Manrope', sans-serif;
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--lab-ink, #173b42);
    line-height: 1.15;
}

body.lab-agt-page .lab-agt-kpi__value--sm {
    font-size: 1.05rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
}

body.lab-agt-page .lab-agt-kpi__hint {
    margin: auto 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--lab-muted, #6b7280);
}

body.lab-agt-page .lab-agt-regions {
    margin: 0 0 28px;
    padding: 16px 16px 12px;
    border-radius: 16px;
    border: 1px solid var(--lab-line, #e4e8e1);
    background: var(--lab-panel, #fff);
}

body.lab-agt-page .lab-agt-regions__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 12px;
}

body.lab-agt-page .lab-agt-regions__title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--lab-ink, #173b42);
}

body.lab-agt-page .lab-agt-regions__sub {
    margin: 0;
    max-width: 36rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--lab-muted, #6b7280);
}

body.lab-agt-page .lab-agt-regions__seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(23, 59, 66, 0.06);
}

body.lab-agt-page .lab-agt-regions__seg button {
    margin: 0;
    padding: 7px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--lab-muted, #6b7280);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 650;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

body.lab-agt-page .lab-agt-regions__seg button:hover {
    color: var(--lab-ink, #173b42);
}

body.lab-agt-page .lab-agt-regions__seg button.is-active {
    background: #fff;
    color: var(--lab-ink, #173b42);
    box-shadow: 0 1px 2px rgba(18, 32, 58, 0.08);
}

body.lab-agt-page .lab-agt-regions__table-wrap {
    overflow-x: auto;
}

body.lab-agt-page .lab-agt-regions__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

body.lab-agt-page .lab-agt-regions__table th,
body.lab-agt-page .lab-agt-regions__table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--lab-line, #e4e8e1);
    vertical-align: middle;
}

body.lab-agt-page .lab-agt-regions__table th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--lab-muted, #6b7280);
}

body.lab-agt-page .lab-agt-regions__table td:nth-child(2),
body.lab-agt-page .lab-agt-regions__table td:nth-child(3),
body.lab-agt-page .lab-agt-regions__table td:nth-child(4),
body.lab-agt-page .lab-agt-regions__table th:nth-child(2),
body.lab-agt-page .lab-agt-regions__table th:nth-child(3),
body.lab-agt-page .lab-agt-regions__table th:nth-child(4) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body.lab-agt-page .lab-agt-regions__name {
    font-weight: 650;
    color: var(--lab-ink, #173b42);
}

body.lab-agt-page .lab-agt-regions__empty {
    text-align: center !important;
    color: var(--lab-muted, #6b7280);
    padding: 22px 12px !important;
}

body.lab-agt-page .lab-agt-regions__foot {
    margin: 12px 0 0;
    font-size: 0.82rem;
}

body.lab-agt-page .lab-agt-regions__foot a {
    color: var(--lab-agt-accent);
    text-decoration: none;
    font-weight: 650;
    transition: opacity 160ms ease;
}

body.lab-agt-page .lab-agt-regions__foot a:hover {
    opacity: 0.8;
}

@media (max-width: 960px) {
    body.lab-agt-page .lab-agt-kpi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    body.lab-agt-page .lab-agt-kpi {
        grid-template-columns: 1fr;
    }
}

/* —— LAB Agent regions list —— */
body.lab-agt-regions-page .lab-agt-reg-lead {
    margin: 8px 0 0;
    font-size: 0.88rem;
    color: var(--lab-muted, #6b7280);
    line-height: 1.4;
}

body.lab-agt-regions-page .lab-agt-reg-lead strong {
    color: var(--lab-ink, #173b42);
    font-weight: 700;
}

body.lab-agt-regions-page .lab-agt-reg-connect-wrap {
    display: inline-flex;
}

body.lab-agt-regions-page .lab-agt-reg-connect-wrap .lab-svc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.lab-agt-regions-page .lab-agt-reg-toolbar {
    margin: 0 0 12px;
}

body.lab-agt-regions-page .lab-agt-reg-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 420px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--lab-line, #e4e8e1);
    border-radius: 12px;
    background: #fff;
    color: var(--lab-muted, #6b7280);
}

body.lab-agt-regions-page .lab-agt-reg-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    color: var(--lab-ink, #173b42);
}

body.lab-agt-regions-page .lab-agt-reg-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--lab-line, #e4e8e1);
    border-radius: 14px;
    background: #fff;
}

body.lab-agt-regions-page .lab-agt-reg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

body.lab-agt-regions-page .lab-agt-reg-table th,
body.lab-agt-regions-page .lab-agt-reg-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--lab-line, #e4e8e1);
    vertical-align: middle;
}

body.lab-agt-regions-page .lab-agt-reg-table th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--lab-muted, #6b7280);
    background: rgba(250, 251, 247, 0.9);
}

body.lab-agt-regions-page .lab-agt-reg-table tr:last-child td {
    border-bottom: 0;
}

body.lab-agt-regions-page .lab-agt-reg-name {
    font-weight: 650;
    color: var(--lab-ink, #173b42);
}

body.lab-agt-regions-page .lab-agt-reg-num {
    font-variant-numeric: tabular-nums;
}

body.lab-agt-regions-page .lab-agt-reg-empty {
    text-align: center !important;
    color: var(--lab-muted, #6b7280);
    padding: 28px 14px !important;
}

body.lab-agt-regions-page .lab-agt-reg-actions {
    white-space: nowrap;
}

body.lab-agt-regions-page .lab-svc-pager {
    margin-top: 14px;
}

/* Connect / confirm POP */
body.lab-agt-regions-page .lab-agt-reg-pop {
    position: fixed;
    inset: 0;
    z-index: 52000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(18, 32, 58, 0.42);
}

body.lab-agt-regions-page .lab-agt-reg-pop[hidden] {
    display: none !important;
}

body.lab-agt-regions-page .lab-agt-reg-pop__card {
    width: 100%;
    max-width: 440px;
    padding: 20px 20px 16px;
    border-radius: 16px;
    border: 1px solid rgba(23, 59, 66, 0.1);
    background: #fff;
    box-shadow: 0 16px 48px rgba(18, 32, 58, 0.18);
    color: var(--lab-ink, #173b42);
}

body.lab-agt-regions-page .lab-agt-reg-pop__card--sm {
    max-width: 380px;
}

body.lab-agt-regions-page .lab-agt-reg-pop__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

body.lab-agt-regions-page .lab-agt-reg-pop__head h2,
body.lab-agt-regions-page .lab-agt-reg-pop__card--sm > h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.lab-agt-regions-page .lab-agt-reg-pop__close {
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--lab-muted, #6b7280);
    cursor: pointer;
    padding: 0 4px;
}

body.lab-agt-regions-page .lab-agt-reg-pop__hint {
    margin: 0 0 14px;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--lab-muted, #6b7280);
}

body.lab-agt-regions-page .lab-agt-reg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--lab-ink, #173b42);
}

body.lab-agt-regions-page .lab-agt-reg-field select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(23, 59, 66, 0.16);
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    background: #fff;
    color: var(--lab-ink, #173b42);
}

body.lab-agt-regions-page .lab-agt-reg-stats {
    margin: 4px 0 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(250, 251, 247, 0.95);
    border: 1px solid var(--lab-line, #e4e8e1);
}

body.lab-agt-regions-page .lab-agt-reg-stats__intro {
    margin: 0 0 8px;
    font-size: 0.78rem;
    color: var(--lab-muted, #6b7280);
}

body.lab-agt-regions-page .lab-agt-reg-stats__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.86rem;
    padding: 4px 0;
}

body.lab-agt-regions-page .lab-agt-reg-pop__err {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid rgba(185, 28, 28, 0.22);
    color: #7f1d1d;
    font-size: 0.84rem;
}

body.lab-agt-regions-page .lab-agt-reg-pop__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}
/* —— LAB Agent companies —— */
body.lab-agt-companies-page .lab-agt-co-lead {
    margin: 8px 0 0;
    font-size: 0.88rem;
    color: var(--lab-muted, #6b7280);
    line-height: 1.4;
}
body.lab-agt-companies-page .lab-agt-co-toolbar { margin: 0 0 12px; }
body.lab-agt-companies-page .lab-agt-co-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 420px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--lab-line, #e4e8e1);
    border-radius: 12px;
    background: #fff;
    color: var(--lab-muted, #6b7280);
}
body.lab-agt-companies-page .lab-agt-co-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-companies-page .lab-agt-co-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--lab-line, #e4e8e1);
    border-radius: 14px;
    background: #fff;
}
body.lab-agt-companies-page .lab-agt-co-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
body.lab-agt-companies-page .lab-agt-co-table th,
body.lab-agt-companies-page .lab-agt-co-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--lab-line, #e4e8e1);
    vertical-align: top;
}
body.lab-agt-companies-page .lab-agt-co-table th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--lab-muted, #6b7280);
    background: rgba(250, 251, 247, 0.9);
}
body.lab-agt-companies-page .lab-agt-co-table tr:last-child td { border-bottom: 0; }
body.lab-agt-companies-page .lab-agt-co-name {
    font-weight: 650;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-companies-page .lab-agt-co-empty {
    text-align: center !important;
    color: var(--lab-muted, #6b7280);
    padding: 28px 14px !important;
}
body.lab-agt-companies-page .lab-agt-co-actions { white-space: nowrap; }
body.lab-agt-companies-page .lab-agt-co-limits {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-companies-page .lab-agt-co-limits span { color: var(--lab-muted, #6b7280); }
body.lab-agt-companies-page .lab-agt-co-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 650;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
}
body.lab-agt-companies-page .lab-agt-co-badge--ok {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #1b5e20;
}
body.lab-agt-companies-page .lab-agt-co-badge--off {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #6b7280;
}
body.lab-agt-companies-page .lab-svc-pager { margin-top: 14px; }

body.lab-agt-companies-page .lab-agt-co-pop {
    position: fixed;
    inset: 0;
    z-index: 52000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(18, 32, 58, 0.42);
}
body.lab-agt-companies-page .lab-agt-co-pop[hidden] { display: none !important; }
body.lab-agt-companies-page .lab-agt-co-pop__card {
    width: 100%;
    max-width: 440px;
    max-height: min(92vh, 900px);
    overflow: auto;
    padding: 20px 20px 16px;
    border-radius: 16px;
    border: 1px solid rgba(23, 59, 66, 0.1);
    background: #fff;
    box-shadow: 0 16px 48px rgba(18, 32, 58, 0.18);
    color: var(--lab-ink, #173b42);
}
body.lab-agt-companies-page .lab-agt-co-pop__card--wide { max-width: 640px; }
body.lab-agt-companies-page .lab-agt-co-pop__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
body.lab-agt-companies-page .lab-agt-co-pop__head h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
body.lab-agt-companies-page .lab-agt-co-pop__close {
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--lab-muted, #6b7280);
    cursor: pointer;
    padding: 0 4px;
}
body.lab-agt-companies-page .lab-agt-co-pop__hint {
    margin: 0 0 12px;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--lab-muted, #6b7280);
}
body.lab-agt-companies-page .lab-agt-co-pop__hint--tight { margin-bottom: 8px; }
body.lab-agt-companies-page .lab-agt-co-pop__err {
    margin: 8px 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid rgba(185, 28, 28, 0.22);
    color: #7f1d1d;
    font-size: 0.84rem;
}
body.lab-agt-companies-page .lab-agt-co-pop__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}
body.lab-agt-companies-page .lab-agt-co-pick-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 8px;
}
body.lab-agt-companies-page .lab-agt-co-pick-filters select,
body.lab-agt-companies-page .lab-agt-co-pick-search {
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(23, 59, 66, 0.16);
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    background: #fff;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-companies-page .lab-agt-co-pick-search { margin: 0 0 10px; }
body.lab-agt-companies-page .lab-agt-co-pick-list {
    max-height: 48vh;
    overflow: auto;
    margin: 4px 0 0;
}
body.lab-agt-companies-page .lab-agt-co-pick-empty {
    margin: 12px 0;
    font-size: 0.88rem;
    color: var(--lab-muted, #6b7280);
}
body.lab-agt-companies-page .lab-agt-co-pick-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    text-align: left;
    border: 1px solid var(--lab-line, #e4e8e1);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    margin: 0 0 8px;
    cursor: pointer;
    font: inherit;
    color: var(--lab-ink, #173b42);
    transition: background 160ms ease, border-color 160ms ease;
}
body.lab-agt-companies-page .lab-agt-co-pick-row:hover {
    background: rgba(250, 251, 247, 0.95);
    border-color: rgba(23, 59, 66, 0.22);
}
body.lab-agt-companies-page .lab-agt-co-pick-row.is-selected {
    border-color: var(--lab-ink, #173b42);
    background: rgba(23, 59, 66, 0.06);
}
body.lab-agt-companies-page .lab-agt-co-pick-row:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
body.lab-agt-companies-page .lab-agt-co-pick-logo,
body.lab-agt-companies-page .lab-agt-co-pick-logo-ph {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}
body.lab-agt-companies-page .lab-agt-co-pick-logo {
    object-fit: cover;
    background: #e8eef2;
}
body.lab-agt-companies-page .lab-agt-co-pick-logo-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d9e6ee;
    color: #5a6d78;
    font-size: 16px;
    font-weight: 600;
}
body.lab-agt-companies-page .lab-agt-co-pick-body { min-width: 0; flex: 1; }
body.lab-agt-companies-page .lab-agt-co-pick-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}
body.lab-agt-companies-page .lab-agt-co-pick-rating {
    font-size: 12px;
    color: #b45309;
    white-space: nowrap;
}
body.lab-agt-companies-page .lab-agt-co-pick-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
body.lab-agt-companies-page .lab-agt-co-pick-badge {
    display: inline-block;
    font-size: 11px;
    line-height: 1.3;
    padding: 2px 7px;
    border-radius: 8px;
    background: #eef2f0;
    color: #2d4a5c;
    border: 1px solid #d5ddd8;
}
body.lab-agt-companies-page .lab-agt-co-pick-badge.is-overlap {
    background: #e3f7ea;
    border-color: #a5d6a7;
    color: #1b5e20;
}
body.lab-agt-companies-page .lab-agt-co-pick-badge.is-slot {
    background: #fff8e1;
    border-color: #ffe082;
    color: #8d6e00;
}
body.lab-agt-companies-page .lab-agt-co-pick-badge.is-pool-ok {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}
body.lab-agt-companies-page .lab-agt-co-pick-badge.is-pool-tight {
    background: #fff3e0;
    border-color: #ffcc80;
    color: #e65100;
}
body.lab-agt-companies-page .lab-agt-co-pick-badge.is-pool-fail {
    background: #ffebee;
    border-color: #ef9a9a;
    color: #c62828;
}
body.lab-agt-companies-page .lab-agt-co-pick-badge.is-score {
    background: #eef2ff;
    border-color: #c5cae9;
    color: #3949ab;
}
body.lab-agt-companies-page .lab-agt-co-pick-meta {
    font-size: 12px;
    color: #5a6d78;
    margin-top: 4px;
    line-height: 1.4;
}
body.lab-agt-companies-page .lab-agt-co-pick-divider {
    margin: 14px 0 10px;
    border: 0;
    border-top: 1px solid var(--lab-line, #e4e8e1);
}
body.lab-agt-companies-page .lab-agt-co-lim-company {
    margin: 0 0 12px;
    font-size: 0.92rem;
    font-weight: 650;
}
body.lab-agt-companies-page .lab-agt-co-stepper__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--lab-line, #e4e8e1);
    font-size: 0.86rem;
}
body.lab-agt-companies-page .lab-agt-co-stepper__row:last-child { border-bottom: 0; }
body.lab-agt-companies-page .lab-agt-co-stepper__label { line-height: 1.35; }
body.lab-agt-companies-page .lab-agt-co-stepper__used {
    font-size: 0.75rem;
    color: var(--lab-muted, #6b7280);
    margin-top: 4px;
}
body.lab-agt-companies-page .lab-agt-co-stepper__ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
body.lab-agt-companies-page .lab-agt-co-step {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(23, 59, 66, 0.2);
    background: #fff;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--lab-ink, #173b42);
    padding: 0;
    transition: background 160ms ease;
}
body.lab-agt-companies-page .lab-agt-co-step:hover { background: rgba(23, 59, 66, 0.06); }
body.lab-agt-companies-page .lab-agt-co-step:disabled { opacity: 0.45; cursor: not-allowed; }
body.lab-agt-companies-page .lab-agt-co-stepper__ctrl input {
    width: 5ch;
    min-width: 5ch;
    padding: 6px 8px;
    text-align: center;
    font-size: 0.86rem;
    border-radius: 8px;
    border: 1px solid rgba(23, 59, 66, 0.16);
    -moz-appearance: textfield;
}
body.lab-agt-companies-page .lab-agt-co-stepper__ctrl input::-webkit-outer-spin-button,
body.lab-agt-companies-page .lab-agt-co-stepper__ctrl input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
@media (max-width: 560px) {
    body.lab-agt-companies-page .lab-agt-co-pick-filters { grid-template-columns: 1fr; }
}

/* LAB Agent settings
 * Не использовать --lab-soft для цвета текста: на LAB soft = фон (#f7…), не ink. */
body.lab-agt-settings-page .lab-agt-set-muted {
    margin: 0;
    font-size: 0.86rem;
    color: #3d565c;
    line-height: 1.45;
}
body.lab-agt-settings-page .lab-agt-set-muted.is-err { color: #b42318; }
body.lab-agt-settings-page .lab-agt-set-accent { color: var(--lab-ink, #173b42); font-weight: 600; }
body.lab-agt-settings-page .lab-agt-set-block { display: block; margin-top: 4px; font-weight: 400; }
body.lab-agt-settings-page .lab-agt-set-warn { color: #b45309; display: block; margin-bottom: 8px; }
body.lab-agt-settings-page .lab-agt-set-tariff-preview {
    margin: 4px 0 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(23, 59, 66, 0.04);
    border: 1px solid rgba(23, 59, 66, 0.08);
}
body.lab-agt-settings-page .lab-agt-set-preview strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-settings-page .lab-agt-set-preview p { margin: 0 0 6px; font-size: 0.88rem; }
body.lab-agt-settings-page .lab-agt-set-current { margin-top: 14px; }
body.lab-agt-settings-page .lab-agt-set-current__title {
    margin: 0 0 10px;
    font-size: 0.92rem;
    font-weight: 650;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-settings-page .lab-agt-set-current__line { margin-bottom: 8px; font-size: 0.9rem; }
body.lab-agt-settings-page .lab-agt-set-date-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.86rem;
    margin-bottom: 6px;
}
body.lab-agt-settings-page .lab-agt-set-current__desc {
    margin: 10px 0 0;
    font-size: 0.86rem;
    color: #3d565c;
    line-height: 1.45;
}
body.lab-agt-settings-page .lab-agt-set-table-wrap { overflow-x: auto; }
body.lab-agt-settings-page .lab-agt-set-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
body.lab-agt-settings-page .lab-agt-set-table th,
body.lab-agt-settings-page .lab-agt-set-table td {
    text-align: left;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(23, 59, 66, 0.1);
    vertical-align: top;
}
body.lab-agt-settings-page .lab-agt-set-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3d565c;
    font-weight: 650;
}
body.lab-agt-settings-page .lab-agt-set-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Usage | Payment under tariff cards */
body.lab-agt-settings-page .lab-agt-set-bill-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 14px;
}
body.lab-agt-settings-page .lab-svc-settings__card.lab-agt-set-usage,
body.lab-agt-settings-page .lab-svc-settings__card.lab-agt-set-pay {
    padding: 16px 18px 14px;
    overflow: visible;
    margin: 0;
}
body.lab-agt-settings-page .lab-agt-set-bill-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
body.lab-agt-settings-page .lab-agt-set-bill-card__head > div {
    min-width: 0;
    flex: 1 1 auto;
}
body.lab-agt-settings-page .lab-agt-set-bill-card__head .lab-agt-set-muted {
    margin: 0;
    line-height: 1.45;
    color: #3d565c;
}
body.lab-agt-settings-page .lab-agt-set-usage .lab-agt-set-muted,
body.lab-agt-settings-page .lab-agt-set-pay .lab-agt-set-muted,
body.lab-agt-settings-page .lab-agt-set-pay__k,
body.lab-agt-settings-page .lab-agt-set-pay__tip,
body.lab-agt-settings-page .lab-agt-set-usage__plan,
body.lab-agt-settings-page .lab-agt-set-usage__nums {
    color: #3d565c;
}
body.lab-agt-settings-page .lab-agt-set-bill-card__head .lab-agt-set-current__title {
    margin: 0 0 6px;
}
body.lab-agt-settings-page .lab-agt-set-usage__plan {
    margin: 0 0 12px;
    font-size: 0.84rem;
    color: #4a646b;
    line-height: 1.4;
}
body.lab-agt-settings-page .lab-agt-set-usage__plan strong {
    color: var(--lab-ink, #173b42);
    font-weight: 650;
}
body.lab-agt-settings-page .lab-agt-set-usage__ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
body.lab-agt-settings-page .lab-agt-set-usage__row-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
body.lab-agt-settings-page .lab-agt-set-usage__lab {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-settings-page .lab-agt-set-usage__nums {
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    color: #4a646b;
    white-space: nowrap;
}
body.lab-agt-settings-page .lab-agt-set-usage__bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(23, 59, 66, 0.08);
    overflow: hidden;
}
body.lab-agt-settings-page .lab-agt-set-usage__fill {
    height: 100%;
    border-radius: inherit;
    background: #173b42;
    transition: width 180ms ease;
}
body.lab-agt-settings-page .lab-agt-set-usage__row.is-near .lab-agt-set-usage__fill {
    background: #b45309;
}
body.lab-agt-settings-page .lab-agt-set-usage__row.is-over .lab-agt-set-usage__fill {
    background: #b91c1c;
}
body.lab-agt-settings-page .lab-agt-set-usage__row.is-near .lab-agt-set-usage__nums,
body.lab-agt-settings-page .lab-agt-set-usage__row.is-over .lab-agt-set-usage__nums {
    font-weight: 650;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-settings-page .lab-agt-set-usage__bridge {
    margin: 12px 0 0;
}
body.lab-agt-settings-page .lab-agt-set-usage__bridge-btn {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #0f766e;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 150ms ease, opacity 150ms ease;
}
body.lab-agt-settings-page .lab-agt-set-usage__bridge-btn:hover,
body.lab-agt-settings-page .lab-agt-set-usage__bridge-btn:focus-visible {
    color: #115e59;
    outline: none;
}
body.lab-agt-settings-page .lab-agt-set-pay__row--est .lab-agt-set-pay__v {
    font-weight: 650;
}
body.lab-agt-settings-page #labAgtTariffSteppers.is-flash {
    animation: labAgtDopFlash 1.4s ease;
}
@keyframes labAgtDopFlash {
    0%,
    100% {
        box-shadow: none;
        background: transparent;
    }
    35% {
        box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.28);
        background: rgba(15, 118, 110, 0.06);
    }
}
body.lab-agt-settings-page .lab-agt-set-pay__rows {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
body.lab-agt-settings-page .lab-agt-set-pay__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    font-size: 0.86rem;
    line-height: 1.4;
}
body.lab-agt-settings-page .lab-agt-set-pay__k {
    color: #4a646b;
}
body.lab-agt-settings-page .lab-agt-set-pay__v {
    color: var(--lab-ink, #173b42);
    font-weight: 600;
    text-align: right;
}
body.lab-agt-settings-page .lab-agt-set-pay__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
body.lab-agt-settings-page .lab-agt-set-pay__tip {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #4a646b;
    flex: 1 1 12rem;
}
@media (max-width: 820px) {
    body.lab-agt-settings-page .lab-agt-set-bill-grid {
        grid-template-columns: 1fr;
    }
}

/* Agent subscription invoices (platform billing) */
body.lab-agt-settings-page .lab-svc-settings__card.lab-agt-set-inv {
    padding: 16px 18px 14px;
    overflow: visible;
}
body.lab-agt-settings-page .lab-agt-set-inv .lab-agt-set-muted,
body.lab-agt-settings-page .lab-agt-set-inv .lab-agt-set-inv__meta {
    color: #4a646b;
}
body.lab-agt-settings-page .lab-agt-set-inv .lab-agt-set-current__title {
    margin: 0 0 6px;
}
body.lab-agt-settings-page .lab-agt-set-inv__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
body.lab-agt-settings-page .lab-agt-set-inv__head .lab-agt-set-muted {
    margin: 0 0 8px;
    line-height: 1.45;
}
body.lab-agt-settings-page .lab-agt-set-inv__badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(23, 59, 66, 0.08);
    color: #3d565c;
}
body.lab-agt-settings-page .lab-agt-set-inv__ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
body.lab-agt-settings-page .lab-agt-set-inv__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(23, 59, 66, 0.1);
}
body.lab-agt-settings-page .lab-agt-set-inv__row:last-child { border-bottom: none; }
body.lab-agt-settings-page .lab-agt-set-inv__main { min-width: 0; flex: 1 1 auto; }
body.lab-agt-settings-page .lab-agt-set-inv__idline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
body.lab-agt-settings-page .lab-agt-set-inv__id {
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--lab-ink, #173b42);
    word-break: break-all;
}
body.lab-agt-settings-page .lab-agt-set-inv__st {
    font-size: 0.7rem;
    font-weight: 650;
    padding: 2px 8px;
    border-radius: 999px;
}
body.lab-agt-settings-page .lab-agt-set-inv__st.is-open {
    background: #fef3c7;
    color: #92400e;
}
body.lab-agt-settings-page .lab-agt-set-inv__st.is-overdue {
    background: #fee2e2;
    color: #991b1b;
}
body.lab-agt-settings-page .lab-agt-set-inv__st.is-paid {
    background: #dcfce7;
    color: #166534;
}
body.lab-agt-settings-page .lab-agt-set-inv__st.is-void {
    background: #e8eef0;
    color: #3d565c;
    border: 1px solid rgba(23, 59, 66, 0.14);
}
body.lab-agt-settings-page .lab-agt-set-inv__row.is-cancelled {
    opacity: 0.78;
}
body.lab-agt-settings-page .lab-agt-set-inv__row.is-cancelled .lab-agt-set-inv__id,
body.lab-agt-settings-page .lab-agt-set-inv__row.is-cancelled .lab-agt-set-inv__meta,
body.lab-agt-settings-page .lab-agt-set-inv__row.is-cancelled .lab-agt-set-inv__amt {
    color: #3d565c;
}
body.lab-agt-settings-page .lab-agt-set-inv__meta {
    margin: 0;
    font-size: 0.82rem;
    color: #3d565c;
    line-height: 1.45;
}
body.lab-agt-settings-page .lab-agt-set-inv__side {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
body.lab-agt-settings-page .lab-agt-set-inv__amt {
    font-size: 0.92rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: var(--lab-ink, #173b42);
    min-width: 5.5rem;
    text-align: right;
}
body.lab-agt-settings-page .lab-agt-set-inv__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}
body.lab-agt-settings-page .lab-agt-set-inv__cancel {
    font-size: 0.78rem;
    padding: 4px 10px;
}
body.lab-agt-settings-page .lab-agt-set-inv__pay {
    padding: 6px 12px;
    font-size: 0.82rem;
}
/* Agent settings: fit tariff cards in panel width — no carousel scrollbar */
body.lab-agt-settings-page .lab-svc-tariff-strip {
    margin-bottom: 14px;
}
body.lab-agt-settings-page .lab-svc-tariff-strip__nav {
    display: none !important;
}
body.lab-agt-settings-page .lab-svc-tariff-strip.is-scrollable .lab-svc-tariff-grid,
body.lab-agt-settings-page .lab-svc-tariff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 12px;
    align-items: stretch;
    margin: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
}
body.lab-agt-settings-page .lab-svc-tcard {
    flex: none;
    width: auto;
    max-width: none;
    min-width: 0;
    scroll-snap-align: unset;
}
@media (max-width: 640px) {
    body.lab-agt-settings-page .lab-agt-set-inv__row {
        flex-direction: column;
        align-items: stretch;
    }
    body.lab-agt-settings-page .lab-agt-set-inv__side {
        justify-content: space-between;
    }
}

body.lab-agt-settings-page .lab-agt-set-tariff-warn:not([hidden]) {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 0.86rem;
    line-height: 1.4;
}
body.lab-agt-settings-page .lab-agt-set-inv__billing {
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    font-size: 0.88rem;
    color: var(--lab-ink, #173b42);
    line-height: 1.45;
}
body.lab-agt-settings-page .lab-agt-set-inv__billing strong { font-weight: 650; }
body.lab-agt-settings-page .lab-agt-set-inv__billing-sep {
    color: #3d565c;
}
body.lab-agt-settings-page .lab-agt-set-tcard-next {
    margin: 8px 0 0;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #3d565c;
    text-align: center;
}
body.lab-agt-settings-page .lab-agt-set-tcard-next.is-warn {
    color: #9a3412;
}
body.lab-agt-settings-page .lab-agt-set-switch-rule {
    margin: 0 0 12px;
    max-width: 52rem;
}
/* Interest %: * + ! tip — same as Service POP (lab-svc-act__req / lab-svc-staff-pop__warn) */
body.lab-agt-settings-page .lab-svc-settings__row-title-line .lab-svc-act__req {
    margin-left: 4px;
}
body.lab-agt-settings-page .lab-svc-settings__row-title-line .lab-svc-staff-pop__warn {
    margin-top: 1px;
    color: #b42318;
}
body.lab-agt-settings-page .lab-svc-settings__row-title-line .lab-svc-staff-pop__warn:hover,
body.lab-agt-settings-page .lab-svc-settings__row-title-line .lab-svc-staff-pop__warn:focus-visible,
body.lab-agt-settings-page .lab-svc-settings__row-title-line .lab-svc-staff-pop__warn.is-open {
    color: #912018;
    background: rgba(180, 35, 24, 0.1);
}
body.lab-agt-settings-page .lab-svc-settings__row-title-line:has(.lab-svc-staff-pop__warn:hover),
body.lab-agt-settings-page .lab-svc-settings__row-title-line:has(.lab-svc-staff-pop__warn:focus-visible),
body.lab-agt-settings-page .lab-svc-settings__row-title-line:has(.lab-svc-staff-pop__warn.is-open) {
    z-index: 12;
}
body.lab-agt-settings-page .lab-agt-set-interest-ctrl {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    width: 100%;
}
body.lab-agt-settings-page .lab-agt-set-interest-pending:not([hidden]) {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #3d565c;
}

/* Partner commission summary */
body.lab-agt-settings-page .lab-agt-set-comm-actions {
    margin-bottom: 12px;
}
body.lab-agt-settings-page .lab-agt-set-comm-summary {
    margin: 0 0 14px;
}
body.lab-agt-settings-page .lab-agt-set-comm-summary__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
body.lab-agt-settings-page .lab-agt-set-comm-tile {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(23, 59, 66, 0.12);
}
body.lab-agt-settings-page .lab-agt-set-comm-tile__lab {
    margin: 0 0 6px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #3d565c;
}
body.lab-agt-settings-page .lab-agt-set-comm-tile__val {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: var(--lab-ink, #173b42);
    line-height: 1.3;
}
body.lab-agt-settings-page .lab-agt-set-comm-tile__n {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: #3d565c;
}
body.lab-agt-settings-page .lab-agt-set-comm-tile--overdue {
    border-color: #fecaca;
    background: #fff7f7;
}
body.lab-agt-settings-page .lab-agt-set-comm-tile--payout {
    border-color: #bbf7d0;
    background: #f7fdf9;
}
body.lab-agt-settings-page .lab-svc-settings__card.lab-agt-set-comm-card {
    padding: 16px 18px 14px;
}
body.lab-agt-settings-page .lab-agt-set-comm-card .lab-agt-set-inv__head {
    margin-bottom: 10px;
}
body.lab-agt-settings-page .lab-agt-set-comm-card .lab-agt-set-muted {
    color: #3d565c;
}
@media (max-width: 900px) {
    body.lab-agt-settings-page .lab-agt-set-comm-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    body.lab-agt-settings-page .lab-agt-set-comm-summary__grid {
        grid-template-columns: 1fr;
    }
}
body.lab-agt-settings-page .lab-svc-tcard.is-current .lab-svc-tcard__cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

body.lab-agt-settings-page .lab-agt-set-tcard-dops {
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid rgba(23, 59, 66, 0.1);
}
/* Read-only overage: label | price on one row (not Service stepper column) */
body.lab-agt-settings-page .lab-svc-tcard__dop-row.lab-agt-set-tcard-dop {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    margin: 0;
}
body.lab-agt-settings-page .lab-agt-set-tcard-dop .lab-svc-tcard__dop-label {
    flex: 1 1 auto;
    min-width: 0;
}
body.lab-agt-settings-page .lab-agt-set-tcard-dop .lab-svc-tcard__dop-price {
    flex: 0 0 auto;
    color: var(--lab-ink, #173b42);
    font-weight: 650;
}
body.lab-agt-settings-page .lab-agt-set-tcard-dop .lab-svc-tcard__dop-ctrl { display: none; }

/* Draft dops + one «Докупить» (48.6b UX) */
body.lab-agt-settings-page .lab-svc-tcard__dop-val.is-draft {
    font-weight: 700;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-settings-page .lab-agt-set-dop-buy {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(23, 59, 66, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
}
body.lab-agt-settings-page .lab-agt-set-dop-buy__hint {
    margin: 0;
    flex: 1 1 200px;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--lab-soft, #5a7278);
}
body.lab-agt-settings-page .lab-agt-set-dop-buy__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    position: relative;
    z-index: 2;
}
body.lab-agt-settings-page .lab-agt-set-dop-buy__actions .lab-svc-btn {
    pointer-events: auto;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

/* LAB Agent · Staff list */
body.lab-agt-staff-page .lab-agt-co-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: center;
    margin: 0 0 14px;
}
body.lab-agt-staff-page .lab-agt-co-search {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--lab-line, #d7e0e3);
    border-radius: 10px;
    background: #fff;
}
body.lab-agt-staff-page .lab-agt-co-search input {
    border: 0;
    outline: none;
    width: 100%;
    font: inherit;
    background: transparent;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-staff-page .lab-agt-stf-status-filter {
    min-height: 40px;
    border: 1px solid var(--lab-line, #d7e0e3);
    border-radius: 10px;
    padding: 0 10px;
    background: #fff;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-staff-page .lab-agt-co-table-wrap {
    border: 1px solid var(--lab-line, #d7e0e3);
    border-radius: 12px;
    overflow: auto;
    background: #fff;
}
body.lab-agt-staff-page .lab-agt-co-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}
body.lab-agt-staff-page .lab-agt-co-table th,
body.lab-agt-staff-page .lab-agt-co-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(23, 59, 66, 0.08);
    vertical-align: middle;
}
body.lab-agt-staff-page .lab-agt-co-table th {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--lab-soft, #5a7278);
    background: #f7fafb;
}
body.lab-agt-staff-page .lab-agt-co-table tr:last-child td { border-bottom: 0; }
body.lab-agt-staff-page .lab-agt-co-empty {
    text-align: center;
    color: var(--lab-soft, #5a7278);
    padding: 28px 12px !important;
}
body.lab-agt-staff-page .lab-agt-stf-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
body.lab-agt-staff-page .lab-agt-stf-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e8eef0;
    color: var(--lab-ink, #173b42);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 650;
    overflow: hidden;
}
body.lab-agt-staff-page .lab-agt-stf-avatar.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
body.lab-agt-staff-page .lab-agt-stf-person__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
body.lab-agt-staff-page .lab-agt-stf-person__name {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    font: inherit;
    font-weight: 650;
    color: var(--lab-ink, #173b42);
    cursor: pointer;
    transition: opacity 160ms ease;
}
body.lab-agt-staff-page .lab-agt-stf-person__name:hover { opacity: 0.75; }
body.lab-agt-staff-page .lab-agt-stf-person__email {
    font-size: 0.82rem;
    color: var(--lab-soft, #5a7278);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.lab-agt-staff-page .lab-agt-stf-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 650;
}
body.lab-agt-staff-page .lab-agt-stf-chip.is-on {
    background: #e6f6ec;
    color: #1b5e20;
}
body.lab-agt-staff-page .lab-agt-stf-chip.is-off {
    background: #fdecea;
    color: #8a1f1a;
}
body.lab-agt-staff-page .lab-agt-stf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
/* Staff card POP: reuse Service layout; raise above agent chrome */
body.lab-agt-staff-page .lab-svc-staff-pop {
    z-index: 52000;
}
body.lab-agt-staff-page .lab-svc-staff-pop__dialog {
    width: min(960px, 100%);
}
body.lab-agt-staff-page .lab-svc-staff-pop__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid var(--lab-line, #d7e0e3);
}
body.lab-agt-staff-page .lab-agt-stf-edit {
    display: grid;
    grid-template-columns: minmax(120px, 150px) 1fr;
    gap: 16px;
}
@media (max-width: 640px) {
    body.lab-agt-staff-page .lab-agt-stf-edit { grid-template-columns: 1fr; }
}
body.lab-agt-staff-page .lab-agt-stf-edit__photo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}
body.lab-agt-staff-page .lab-agt-stf-edit__preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1px dashed #c5d2d6;
    background: #f4f8f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--lab-ink, #173b42);
    font-weight: 700;
    font-size: 1.4rem;
}
body.lab-agt-staff-page .lab-agt-stf-edit__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
body.lab-agt-staff-page .lab-agt-stf-edit__fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
body.lab-agt-staff-page .lab-agt-stf-edit__email {
    margin: 0;
    font-weight: 700;
    color: var(--lab-ink, #173b42);
}
body.lab-agt-staff-page .lab-agt-stf-edit__lab > .lab-svc-staff-pop__row-title-line,
body.lab-agt-staff-page .lab-agt-stf-edit__photo > .lab-svc-staff-pop__row-title-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
body.lab-agt-staff-page .lab-agt-stf-edit__status-hint {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--lab-soft, #5a7278);
}
body.lab-agt-staff-page .lab-agt-stf-edit__lab {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--lab-soft, #5a7278);
}
body.lab-agt-staff-page .lab-agt-stf-edit__lab input,
body.lab-agt-staff-page .lab-agt-stf-edit__lab select,
body.lab-agt-staff-page .lab-agt-stf-edit__lab textarea {
    border: 1px solid var(--lab-line, #d7e0e3);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    color: var(--lab-ink, #173b42);
    background: #f8fafb;
}
body.lab-agt-staff-page .lab-agt-stf-edit__lab textarea { min-height: 100px; resize: vertical; }
body.lab-agt-staff-page .lab-agt-co-table-wrap { overflow: visible; }
body.lab-agt-staff-page .lab-svc-staff__actions { width: 48px; text-align: right; }
body.lab-agt-staff-page .lab-svc-staff__more { display: inline-flex; justify-content: flex-end; }
body.lab-agt-staff-page .lab-svc-staff__more-menu { z-index: 40; }
body.lab-agt-staff-page .lab-svc-staff-tr__stale {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fef6e0;
    color: #7a5b12;
    font-size: 0.84rem;
}
