/*
 * MonitorSphere 4.4.0.14
 * Production readability and accessible hit-target layer.
 * Loaded after site.css so existing layouts and colours are preserved.
 */

:root {
    --ms-font-xs: .75rem;
    --ms-font-sm: .82rem;
    --ms-font-md: .92rem;
    --ms-font-body: 1rem;
    --ms-control-height: 44px;
    --ms-compact-control-height: 38px;
}

html {
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-size: var(--ms-font-body);
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

small {
    font-size: .8rem !important;
    line-height: 1.45;
}

button,
input,
select,
textarea {
    font-size: var(--ms-font-md);
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

:where(button, a, input, select, textarea):focus-visible {
    outline: 3px solid rgba(110, 168, 255, .62);
    outline-offset: 2px;
}

/* Shared navigation and shell */
.nav-link {
    min-height: 58px;
    padding: 13px 15px;
}

.nav-section-label {
    font-size: .76rem;
    line-height: 1.35;
}

.nav-copy strong {
    font-size: .96rem;
    line-height: 1.25;
}

.nav-copy small {
    font-size: .78rem;
    line-height: 1.35;
}

.brand-subtitle,
.page-kicker,
.eyebrow,
.small-muted,
.live-indicator,
.clock {
    font-size: .8rem;
}

.page-title {
    line-height: 1.15;
}

/* Shared controls: text and hit area are intentionally not compact. */
.btn,
.btn-small,
.ux44-btn {
    min-height: var(--ms-control-height) !important;
    padding: 0 15px !important;
    font-size: .86rem !important;
    line-height: 1.2 !important;
}

.btn-small {
    border-radius: 11px !important;
}

.badge {
    min-height: 30px;
    padding: 0 11px;
    font-size: .78rem;
}

.input,
select.input,
textarea.input {
    min-height: var(--ms-control-height);
    font-size: .94rem;
}

.field label {
    font-size: .86rem;
}

/* Generic table families used across dashboard, health, security and reports. */
:is(.table-modern, .health-table, .data-table, .executive-table,
    .oi-operator-table, .oi-daily-table, .report-pro-table,
    .pci-operator-table, .pci-call-table,
    .ops-daily-leader-table, .ops-operator-table, .ops-unanswered-table,
    .audit-log-table) th {
    padding: 13px 12px;
    font-size: .75rem !important;
    line-height: 1.35;
}

:is(.table-modern, .health-table, .data-table, .executive-table,
    .oi-operator-table, .oi-daily-table, .report-pro-table,
    .pci-operator-table, .pci-call-table,
    .ops-daily-leader-table, .ops-operator-table, .ops-unanswered-table,
    .audit-log-table) td {
    padding: 13px 12px;
    font-size: .84rem !important;
    line-height: 1.45;
}

:is(.table-modern, .health-table, .data-table, .executive-table,
    .oi-operator-table, .oi-daily-table, .report-pro-table,
    .pci-operator-table, .pci-call-table,
    .ops-daily-leader-table, .ops-operator-table, .ops-unanswered-table,
    .audit-log-table) td small {
    margin-top: 5px;
    font-size: .76rem !important;
    line-height: 1.4;
}

.table-secondary,
.transcript-meta,
.transcript-time,
.audit-detail-cell > span,
.audit-log-table code,
.call-review-audit span,
.call-review-audit strong {
    font-size: .78rem;
}

/* 4.4 operator/call/report surface */
.ux44-pagebar p {
    font-size: .96rem;
    line-height: 1.45;
}

.ux44-kicker {
    font-size: .8rem;
}

.ux44-btn {
    border-radius: 12px;
}

.ux44-count {
    min-width: 23px;
    height: 23px;
    font-size: .75rem;
}

.ux44-chip {
    min-height: 38px;
    padding: 0 13px;
    font-size: .8rem;
}

.ux44-search-field,
.ux44-date-pair,
.ux44-filterbar select,
.ux44-filterbar input,
.ux44-field select,
.ux44-field input {
    min-height: var(--ms-control-height);
    font-size: .88rem;
}

.ux44-search-field input {
    min-height: 42px;
}

.ux44-field label,
.ux44-input-suffix span,
.ux44-clear-link {
    font-size: .78rem;
}

.ux44-kpi-card > span {
    font-size: .78rem;
}

.ux44-kpi-card > small {
    font-size: .75rem;
    line-height: 1.45;
}

.ux44-tabs button {
    min-height: 42px;
    padding: 0 16px;
    font-size: .84rem;
}

.ux44-tabs button span {
    font-size: .72rem;
}

.ux44-card {
    padding: 19px;
}

.ux44-card-head span {
    font-size: .76rem;
}

.ux44-card-head h3 {
    font-size: 1.12rem;
}

.ux44-card-head > small,
.ux44-card-head > a,
.ux44-operator-summary-meta small,
.ux44-operator-summary-meta a {
    font-size: .78rem;
}

.ux44-chart-labels,
.ux44-hour-bar span {
    font-size: .68rem;
}

.ux44-mini-stats span {
    font-size: .72rem;
}

.ux44-mini-stats strong {
    font-size: .9rem;
}

.ux44-person-line strong {
    font-size: .94rem;
    line-height: 1.25;
}

.ux44-person-line small {
    margin-top: 4px;
    font-size: .76rem;
    line-height: 1.35;
}

.ux44-avatar {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    font-size: .82rem;
}

.ux44-person-line.compact .ux44-avatar {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
}

.ux44-presence,
.ux44-health,
.ux44-pill {
    min-height: 29px;
    padding: 0 10px;
    font-size: .73rem;
}

.ux44-snapshot-metrics span {
    font-size: .72rem;
}

.ux44-snapshot-metrics strong {
    font-size: .9rem;
}

.ux44-card-footer {
    font-size: .76rem;
}

.ux44-card-footer a {
    min-height: var(--ms-compact-control-height);
    padding: 0 12px;
    border: 1px solid rgba(110, 168, 255, .18);
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    font-size: .8rem;
}

.ux44-table {
    font-size: .84rem;
}

.ux44-table th {
    padding: 13px 14px;
    font-size: .75rem;
    line-height: 1.35;
}

.ux44-table td {
    padding: 14px;
    font-size: .84rem;
    line-height: 1.45;
}

.ux44-table td > strong,
.ux44-table td > a > strong {
    font-size: .88rem;
    line-height: 1.35;
}

.ux44-table td > small,
.ux44-table td > a > small,
.ux44-table-subline {
    margin-top: 5px;
    font-size: .76rem;
    line-height: 1.4;
}

.ux44-icon-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
}

.ux44-result-chips a {
    min-height: 35px;
    padding: 0 11px;
    font-size: .76rem;
}

.ux44-pagination,
.operator-call-pagination-bar {
    font-size: .78rem;
}

.ux44-pagination a,
.operator-call-pagination a {
    min-width: 38px;
    height: 38px;
    font-size: .8rem;
}

.ux44-action-item strong,
.ux44-leader-grid span,
.ux44-leader-grid small,
.ux44-status-cards span,
.ux44-status-cards small,
.ux44-distribution-list > div,
.ux44-export-menu small,
.ux44-donut-legend > div,
.ux44-metric-list > div,
.ux44-empty,
.ux44-no-results {
    font-size: .76rem;
    line-height: 1.45;
}

.ux44-action-item small,
.ux44-export-menu strong {
    font-size: .8rem;
}

.ux44-row-actions {
    gap: 8px;
}

.ux44-row-actions a {
    min-height: var(--ms-compact-control-height);
    padding: 0 12px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
}

.ux44-score {
    min-width: 40px;
    height: 34px;
    font-size: .78rem;
}

.ux44-view-toggle button {
    min-height: 40px;
    padding: 0 14px;
    font-size: .82rem;
}

/* Operator cards shown in the supplied screenshot. */
.ux44-operator-card-grid {
    gap: 16px;
}

.ux44-operator-card {
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
}

/* Author display rules otherwise override the browser's hidden attribute. */
[data-ux44-operator-item][hidden],
[data-ux44-operator-empty][hidden] { display: none !important; }

.ux44-operator-card.is-offline::before { background: #71839b; }
.ux44-operator-card > header { flex-wrap: wrap; }
.ux44-operator-badges { flex-wrap: wrap; }
.ux44-operator-card .ux44-person-line { min-width: 0; }
.ux44-operator-card .ux44-person-line > div { min-width: 0; overflow-wrap: anywhere; }
.ux44-operator-metrics span { white-space: normal; overflow-wrap: anywhere; }
.ux44-shift-line { flex-wrap: wrap; }

.ux44-operator-card > header,
.ux44-operator-card > footer {
    gap: 14px;
}

.ux44-operator-badges {
    gap: 7px;
}

.ux44-operator-scoreline {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
}

.ux44-score-ring {
    width: 60px;
    height: 60px;
}

.ux44-score-ring::before {
    width: 46px;
    height: 46px;
}

.ux44-score-ring span {
    font-size: .88rem;
}

.ux44-operator-scoreline > div:last-child span {
    font-size: .76rem;
}

.ux44-operator-scoreline > div:last-child strong {
    margin-top: 5px;
    font-size: .94rem;
    line-height: 1.3;
}

.ux44-operator-scoreline > div:last-child small {
    margin-top: 5px;
    font-size: .76rem;
}

.ux44-operator-metrics {
    gap: 9px;
}

.ux44-operator-metrics > div {
    min-height: 65px;
    padding: 11px 12px;
}

.ux44-operator-metrics span {
    font-size: .72rem;
}

.ux44-operator-metrics strong {
    margin-top: 6px;
    font-size: .92rem;
    line-height: 1.3;
}

.ux44-shift-line,
.ux44-device-readiness {
    gap: 9px 16px;
    font-size: .76rem;
    line-height: 1.45;
}

.ux44-operator-card footer {
    padding-top: 14px;
    font-size: .76rem;
    line-height: 1.4;
}

.ux44-operator-card footer > div {
    gap: 8px;
}

.ux44-operator-card footer a {
    min-height: 40px;
    padding: 0 13px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
}

/* Earlier analytics/report surfaces retained by the application. */
:is(.oi-flow-head span, .oi-flow-row span, .oi-flow-row em,
    .oi-outcome-row b, .oi-outcome-row small, .oi-outcome-row strong,
    .oi-trend-row time, .oi-trend-row > strong, .oi-trend-row > small,
    .oi-chart-legend, .oi-duration-row span b, .oi-duration-row span small,
    .oi-duration-row > strong, .oi-leader-badge span, .oi-leader-badge small,
    .oi-recording-row span b, .oi-recording-row span small, .oi-recording-row em,
    .oi-coverage-summary span, .oi-table-note, .oi-export-card p) {
    font-size: .76rem;
    line-height: 1.45;
}

:is(.report-pro-hero-tags span, .report-pro-story-card > span,
    .report-pro-story-card > p, .report-pro-story-metrics span,
    .report-pro-filter-form label, .report-pro-quick-ranges a,
    .report-pro-export-bar > div:first-child span, .report-pro-kpi > span,
    .report-pro-kpi > small, .report-pro-bar-label strong,
    .report-pro-bar-label small, .report-pro-bar-value span,
    .report-pro-duration-row strong, .report-pro-duration-row small,
    .report-pro-trend-column > span, .report-pro-trend-column > small,
    .report-pro-legend, .report-pro-hour strong, .report-pro-hour span,
    .report-pro-recording-row strong, .report-pro-recording-row small,
    .report-pro-operator-name strong, .report-pro-operator-name small,
    .report-pro-decision-reason, .report-pro-daily-row span,
    .report-pro-daily-row small, .report-pro-action-row strong,
    .report-pro-action-row small, .report-pro-governance span,
    .report-pro-governance p) {
    font-size: .76rem;
    line-height: 1.45;
}

:is(.pci-hero-summary > span, .pci-hero-summary > small, .pci-hero-mini,
    .pci-kpi > span, .pci-kpi > small, .pci-funnel-step > span,
    .pci-funnel-step > small, .pci-funnel-split span,
    .pci-period-card > span, .pci-period-card > small,
    .pci-filter-chip, .pci-call-facts span, .pci-call-facts small,
    .pci-no-recording-expected p, .pci-recording-wait-state p,
    .pci-not-applicable-state p, .pci-no-audio-note,
    .pci-neutral-explanation, .pci-technical-grid span,
    .pci-technical-grid strong) {
    font-size: .76rem;
    line-height: 1.45;
}

:is(.ops-date-preset span, .ops-date-preset small, .ops-current-range,
    .ops-filter-meta span, .ops-control-card > span, .ops-control-card > small,
    .ops-table-note, .ops-heat-legend, .ops-heatmap-header > span,
    .ops-heat-date strong, .ops-heat-date small, .ops-heat-cell,
    .ops-heat-total, .ops-heat-total small, .ops-heatmap-foot,
    .ops-trend-row > strong, .ops-trend-row > span, .ops-trend-row > small,
    .ops-rank, .ops-daily-row > span, .ops-daily-row > small,
    .ops-daily-row > strong) {
    font-size: .76rem;
    line-height: 1.45;
}

/* Audit and operator archive actions */
.audit-action-pill {
    min-height: 32px;
    padding: 0 10px;
    font-size: .75rem;
}

.operator-call-archive-head small,
.operator-server-pill,
.operator-call-filter-actions > span,
.operator-call-pagination-bar,
.operator-call-archive-locked .ux44-empty span {
    font-size: .76rem;
}

/* Responsive: preserve comfortable type while reducing only layout density. */
@media (max-width: 900px) {
    html {
        font-size: 16px;
    }

    .ux44-operator-card-grid {
        grid-template-columns: 1fr;
    }

    .ux44-operator-card footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .ux44-operator-card footer > div {
        width: 100%;
        flex-wrap: wrap;
    }

    .ux44-operator-card footer a {
        flex: 1 1 110px;
    }
}

@media (max-width: 620px) {
    .btn,
    .btn-small,
    .ux44-btn {
        min-height: 46px !important;
    }

    .ux44-row-actions a,
    .ux44-operator-card footer a {
        min-height: 44px;
    }

    .ux44-operator-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Primary operator action is visually discoverable and easy to press. */
.ux44-operator-card footer a:first-child {
    min-width: 86px;
    color: #f7fbff;
    border-color: rgba(110, 168, 255, .38);
    background: linear-gradient(135deg, rgba(63, 143, 245, .88), rgba(117, 107, 244, .84));
    box-shadow: 0 7px 18px rgba(70, 105, 220, .18);
}

.ux44-operator-card footer a:first-child:hover {
    border-color: rgba(135, 190, 255, .62);
    background: linear-gradient(135deg, rgba(76, 155, 255, .96), rgba(128, 116, 255, .94));
}

.health-table .health-reason, .health-error { max-width: 320px; white-space: normal; text-transform: none; overflow-wrap: anywhere; font-size: .85rem; line-height: 1.5; }
.health-error summary { cursor: pointer; }
.health-error p { max-height: 12rem; overflow: auto; }

.ux44-preset-row { scrollbar-width: thin; scrollbar-color: #42516b transparent; }
