/* Shared light theme. Keep component structure and permission-controlled actions intact. */
:root, .app-body, .auth-body, .app-body .ux44-page {
    color-scheme: light;
    --bg: #f6f7fb; --bg-soft: #f0f2f8; --panel: #fff; --panel-strong: #fff;
    --text: #273248; --muted: #647087; --line: #e5e8f0;
    --primary: #6554c0; --primary-2: #7b68d6; --success: #237861; --danger: #b23f56; --warning: #94601f;
    --shadow: 0 3px 16px rgba(35, 43, 73, .035); --radius: 18px;
    --text-muted: #647087;
    --ux44-surface: #fff; --ux44-surface-2: #f7f8fb; --ux44-violet: #7b68bd; --ux44-bg: #f6f7fb; --ux44-panel: #fff; --ux44-border: #e5e8f0;
    --ux44-text: #273248; --ux44-muted: #647087; --ux44-blue: #7465cb;
    --ux44-cyan: #386994; --ux44-green: #25806b; --ux44-red: #b23f56; --ux44-yellow: #94601f;
    --ai-bg: #f6f7fb; --ai-panel: #fff; --ai-panel2: #f1f0fa; --ai-line: #e5e8f0;
    --ai-text: #273248; --ai-muted: #647087; --ai-blue: #6554c0; --ai-purple: #7b68d6;
    --ai-green: #237861; --ai-red: #b23f56; --ai-amber: #94601f;
}
html { font-size: 16px; background: var(--bg); }
body.app-body, body.auth-body { background: var(--bg); color: var(--text); }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.ms-icon { width: 21px; height: 21px; flex-shrink: 0; vertical-align: middle; }
.skip-link { position: fixed; top: -100px; left: 18px; z-index: 200; padding: 12px 20px; background: white; color: var(--primary); border: 2px solid var(--primary); border-radius: 10px; }
.skip-link:focus { top: 12px; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #8a7bd1; outline-offset: 3px; }
.app-body .shell { grid-template-columns: 246px minmax(0, 1fr); }
.app-body .sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 28px 18px 18px; gap: 30px; background: #fff; backdrop-filter: none; border-right: 1px solid var(--line); }
.brand { gap: 10px; }
.app-body .brand { padding: 0 8px; }
.brand-mark { width: 40px; height: 40px; border-radius: 13px; background: #7563c7; box-shadow: none; flex-shrink: 0; font-size: .85rem; }
.brand-title { font-size: 1rem; letter-spacing: -.035em; color: var(--text); }
.brand-subtitle { font-size: .72rem; margin-top: 3px; color: var(--muted); }
.app-body .nav { gap: 24px; }
.app-body .nav-section { display: grid; gap: 4px; }
.app-body .nav-section-label { padding: 0 12px; margin-bottom: 8px; color: #778195; font-size: .66rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.app-body .nav-link { min-height: 43px; padding: 10px 12px; border: 0; border-radius: 9px; color: #667088; gap: 12px; }
.app-body .nav-link:hover { background: #f6f5fb; color: var(--primary); transform: none; }
.app-body .nav-link.active { background: #eeebfa; box-shadow: none; color: #6554b5; }
.app-body .nav-link::before { display: none; }
.app-body .nav-copy strong { font-size: .82rem; font-weight: 550; color: inherit; }
.app-body .nav-copy small { display: none; }
.app-body .nav-icon { width: 21px; height: 22px; padding: 0; color: inherit; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.app-body details.nav-settings { display: block; }
.app-body .nav-settings summary { display: flex; justify-content: space-between; cursor: pointer; padding-block: 9px; list-style: none; }
.nav-settings summary::-webkit-details-marker { display: none; }
.nav-settings[open] summary { margin-bottom: 8px; }
.nav-settings .nav-link { margin-top: 4px; }
.app-body .sidebar-footer { margin-top: auto; background: #f8f9fc; padding: 13px; border: 1px solid #eceef4; border-radius: 13px; }
.app-body .sidebar-user { gap: 10px; }
.app-body .profile-name { margin: 3px 0 0; font-size: .77rem; overflow-wrap: anywhere; color: var(--text); }
.app-body .sidebar-pills { display: none; }
.app-body .user-avatar { width: 32px; height: 32px; border-radius: 50%; background: #e9e5f7; color: #6554b5; }
.app-body .sidebar-footer .small-muted { font-size: .65rem; letter-spacing: 0; text-transform: none; }
.app-body .logout-form { margin-top: 9px; }
.app-body .logout-form .btn { min-height: 34px !important; font-size: .72rem !important; }
.app-body .main { min-width: 0; padding: 0; }
.app-body .topbar { min-height: 76px; padding: 18px 36px; margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.app-body .page-kicker { margin: 0 0 4px; color: #7b8394; font-size: .63rem; font-weight: 500; text-transform: none; letter-spacing: .015em; }
.app-body .page-title { color: var(--text); font-size: 1rem; letter-spacing: -.015em; }
.topbar-meta { gap: 20px; }
.topbar-workspace { display: inline-flex; align-items: center; gap: 7px; color: #606c80; font-size: .77rem; }
.workspace-dot { width: 7px; height: 7px; border-radius: 50%; background: #75b99f; }
.app-body .clock { border: 0; background: #f6f7fb; color: #737d91; border-radius: 8px; padding: 8px 11px; font-size: .72rem; font-variant-numeric: tabular-nums; }
.app-body .content { max-width: 1580px; margin: 0 auto; padding: 32px 36px 48px; }
.app-body .page-context-nav { padding: 14px 36px 0; margin: 0; background: transparent; border: 0; }
.app-body .context-back { background: #fff; border: 1px solid var(--line); color: #657088; }
.app-body .context-crumbs, .app-body .context-crumbs a, .app-body .context-crumbs [aria-current] { color: #68748a; font-size: .72rem; }
.app-body .content :is(h1, h2, h3, h4, h5, strong, .stat-value, .stat-label, .profile-name) { color: var(--text); }
.app-body .content :is(p, small, .small-muted, .ux44-kicker, .eyebrow, .ux44-card-head span, .stat-meta, .ux44-table-subline, .ux44-chart-labels, .ux44-hour-bar span, .ux44-field label, .ux44-mini-stats span, .ux44-metric-list span, .ux44-leader-grid span, .device-meta, .ux44-table td > small, .ux44-person-line small, .operator-data-note, .operator-phase-note summary) { color: var(--muted); }
.app-body .content :is(h2, h3, h4) { letter-spacing: -.025em; }
.app-body :is(.panel, .stat-card, .device-card, .auth-panel, .ux44-card, .ux44-filterbar, .ux44-kpi-card, .ux44-operator-card, .ux44-operator-snapshot, .ux44-leader-grid article, .workforce-summary-grid article, .operator-workforce-card, .call-review-audit, .operator-call-archive, .operator-call-archive-toolbar) { border-color: var(--line); background: #fff; box-shadow: var(--shadow); }
.app-body :is(.hero, .workforce-hero, .ai-hero, .ai-call-head) { background: #f0edf9; color: var(--text); border-color: #e8e3f5; box-shadow: none; }
.app-body .hero::before, .app-body .hero::after { display: none; }
.app-body .ux44-page { gap: 24px; }
.app-body .ux44-pagebar { padding: 0; margin: 0; align-items: center; }
.app-body .ux44-pagebar h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 650; letter-spacing: -.045em; margin: 5px 0 8px; }
.app-body .ux44-pagebar p { font-size: .8rem; margin-bottom: 0; }
.app-body .ux44-kicker, .ms-overline { color: #7d719f; font-size: .66rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.app-body .ux44-filterbar { padding: 16px; gap: 14px; border-radius: 14px; box-shadow: none; }
.app-body .ux44-preset-row { gap: 5px; }
.app-body :is(.ux44-chip, .ux44-result-chips a, .operator-call-page-size select) { color: #626e83; background: #fff; border-color: #e5e8ef; border-radius: 8px; }
.app-body .ux44-chip { min-height: 35px !important; font-size: .75rem !important; padding: 0 13px !important; }
.app-body :is(.ux44-chip.is-active, .ux44-chip:hover, .ux44-result-chips a.is-active, .ux44-result-chips a:hover, .operator-call-page-number.is-active) { color: #6554b5; border-color: #ddd7f3; background: #eeebfa; }
.app-body .ux44-result-chips b { color: #6554b5; }
.app-body :is(input, select, textarea, .ux44-search-field, .ux44-date-pair, .workforce-link-form select) { color: var(--text); background-color: #fff; border-color: #dfe3ed; color-scheme: light; }
.app-body :is(input, textarea)::placeholder { color: #758096; }
.app-body .ux44-search-field input, .app-body .ux44-date-pair input { background: transparent; }
.app-body :is(.btn, .ux44-btn, .ai-btn) { border-radius: 9px; box-shadow: none; font-weight: 550; }
.app-body :is(.btn-primary, .ux44-btn-primary, .ai-btn-primary), .auth-body .btn-primary { background: #6958bc; border-color: #6958bc; color: #fff; box-shadow: 0 3px 6px #6554b51a; }
.app-body :is(.btn-primary, .ux44-btn-primary, .ai-btn-primary):hover { background: #5745a7; border-color: #5745a7; }
.app-body :is(.btn-secondary, .btn-ghost, .ux44-btn-secondary, .ai-btn-ghost, .ux44-icon-btn, .sidebar-toggle, .sidebar-close) { color: #536077; background: #fff; border-color: #dfe3ed; }
.app-body :is(.btn-secondary, .btn-ghost, .ux44-btn-secondary, .ux44-icon-btn):hover { color: #6554b5; background: #f1eefb; border-color: #dad3ee; }
.app-body :is(.btn-danger, .danger-button) { color: #a9354d; background: #fbe9ed; border-color: #f1c9d3; }
.app-body :is(.btn, .ux44-btn):disabled { opacity: .55; box-shadow: none; cursor: not-allowed; }
.app-body .ux44-filter-advanced { border-top-color: var(--line); }
.app-body .ux44-clear-link { color: #6554b5; }
.app-body .ux44-tabs { padding: 4px; gap: 5px; background: #edeff5; border: 0; border-radius: 10px; box-shadow: none; width: fit-content; max-width: 100%; }
.app-body .ux44-tabs button { color: #66718a; background: transparent; border: 0; border-radius: 7px; min-height: 40px !important; font-size: .79rem !important; padding: 0 17px !important; }
.app-body .ux44-tabs button.is-active { color: #6554b5; background: #fff; box-shadow: 0 2px 5px #2732480b; }
.app-body .ux44-tabs button span, .app-body .ux44-count { color: #695b97; background: #edeaf6; }
.app-body .ux44-card { padding: 22px; border-radius: 16px; }
.app-body .ux44-card-head { margin-bottom: 20px; }
.app-body .ux44-card-head h3 { font-size: .95rem; font-weight: 650; }
.app-body .ux44-card-head > a, .app-body .ux44-operator-summary-meta a, .app-body .ux44-card-footer a { color: #6554b5; font-size: .75rem; }
.app-body .ux44-grid { gap: 20px; }
.app-body .ux44-grid-2-1 { grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr); }
.app-body :is(.ux44-table, .workforce-table, .operator-activity-days, .table) { color: var(--text); }
.app-body :is(.ux44-table, .workforce-table, .operator-activity-days, .table) th { background: #f7f8fb; color: #627087; border-color: var(--line); text-transform: none; font-weight: 600; font-size: .72rem; letter-spacing: 0; }
.app-body :is(.ux44-table, .workforce-table, .operator-activity-days, .table) td { color: #526076; border-color: #edf0f5; padding-top: 16px; padding-bottom: 16px; }
.app-body .ux44-table td > strong, .app-body .ux44-table td > a > strong { font-size: .8rem; font-weight: 600; }
.app-body :is(.ux44-table, .workforce-table, .table) tbody tr:hover { background: #faf9fd; }
.app-body :is(.ux44-pill, .badge, .chip, .ux44-presence, .audit-action-pill) { border: 0; background: #edf0f5; color: #637087; font-weight: 550; }
.app-body :is(.ux44-pill.is-success, .ux44-pill.is-qualified, .ux44-pill.is-effective, .badge-online, .ux44-presence.is-online, .audit-action-pill.is-success) { color: #27745c; background: #e7f4ed; }
.app-body :is(.ux44-pill.is-danger, .ux44-pill.is-unanswered, .badge-danger, .audit-action-pill.is-danger) { color: #a23d53; background: #fbe9ed; }
.app-body :is(.ux44-pill.is-warning, .ux44-pill.is-short, .badge-warning, .audit-action-pill.is-warning) { color: #885d21; background: #faf0dc; }
.app-body :is(.ux44-pill.is-info, .badge-live, .audit-action-pill.is-info) { color: #396a93; background: #eaf1fa; }
.app-body :is(.ux44-pill.is-muted, .ux44-pill.is-neutral, .badge-offline, .badge-soft, .ux44-presence.is-offline) { color: #626d80; background: #f0f2f6; }
.app-body :is(.ux44-avatar, .ux44-priority) { background: #eeeaf9; color: #6b58b5; border: 0; box-shadow: none; }
.app-body :is(.ux44-mini-stats > div, .ux44-snapshot-metrics > div, .ux44-action-item, .ux44-status-list > div, .ux44-status-cards article, .ux44-metric-list > div) { background: #f9fafc; border-color: #e9edf3; }
.app-body :is(.ux44-card-footer, .ux44-operator-card footer, .ux44-shift-line, .ux44-device-readiness, .ux44-operator-scoreline) { color: #647087; border-color: var(--line); background: transparent; }
.app-body .ux44-operator-card::before { display: none; }
.app-body .ux44-kpi-card::after { opacity: .035; }
.app-body .ux44-pagination { color: #647087; }
.app-body .ux44-pagination a { background: #fff; color: #6554b5; border-color: #e5e8f0; }
.app-body .ux44-chart-line { stroke: #9b8cdb; filter: none; stroke-width: 3; }
.app-body .ux44-chart-dot { fill: #fff; stroke: #9b8cdb; stroke-width: 2; }
.app-body .ux44-chart-grid { stroke: #e7eaf1; stroke-dasharray: 4 5; }
.app-body .ux44-chart-axis { stroke: #e1e5ee; }
.app-body .ux44-hour-bar i { background: #bbb1e5; box-shadow: none; border-radius: 5px 5px 0 0; }
.app-body .ux44-hour-bar.is-peak i { background: #85bca8; }
.app-body .ux44-hour-bars { border-bottom-color: var(--line); }
.app-body .ux44-donut { background: conic-gradient(#8dc6af calc(var(--ux44-donut) * 1%), #f2d7dc 0); box-shadow: none; }
.app-body .ux44-donut::before { background: #fff; box-shadow: none; }
.app-body .ux44-donut-legend i.is-success { background: #8dc6af; }
.app-body .ux44-donut-legend i.is-danger { background: #f2d7dc; }
.app-body .ux44-donut-legend span { color: #647087; }
.app-body .ux44-heatmap .heat-0, .app-body .heat-0 { background: #f4f3f9; color: #697189; }
.app-body .heat-1 { background: #eeebfa; color: #605383; }
.app-body .heat-2 { background: #ddd6f4; color: #554774; }
.app-body .heat-3 { background: #c8bce9; color: #45395f; }
.app-body .heat-4 { background: #ac9bd7; color: #332647; }
.app-body .heat-5 { background: #7a64ae; color: #fff; }
.app-body .ux44-export-menu > div { background: white; border-color: var(--line); box-shadow: 0 12px 35px #27324815; }
.app-body .ux44-leader-grid { margin-bottom: 20px; }
.app-body .ux44-leader-grid article { background: #fff; }
.app-body .ux44-operator-view-toggle { background: #eeeff5; border-color: var(--line); }
.app-body .ux44-operator-view-toggle button { color: #647087; }
.app-body .ux44-operator-view-toggle button.is-active { background: #fff; color: #6554b5; }
.app-body .device-preview, .app-body .empty-preview { background: #f1f3f8; color: #66738b; }
.app-body .device-note { background: #f7f8fb; color: #66738b; border-color: var(--line); }
.app-body .workforce-privacy, .app-body .workforce-not-linked { background: #f9f2e5; color: #7b602b; border-color: #eddfbf; }
.app-body .workforce-table td span, .app-body .operator-workforce-list span { color: #647087; }
.app-body .workforce-table td a { color: #6554b5; }
.app-body .state-warn { color: #885d21 !important; }
.app-body .ai-prompt-editor, .app-body .ai-prompt-note, .app-body .ai-savebar { background: #f0edf8; color: #536078; border-color: #ded8ee; box-shadow: none; }
.app-body .ai-prompt-editor textarea { background: #faf9fd; color: #34405a; }
.app-body .ai-prompt-toolbar { color: #647087; }
.app-body .toast { margin: 16px 36px 0; }
.app-body .toast-success { background: #e5f5ec; color: #23664c; border-color: #c7e5d5; }
.app-body .toast-error { background: #fbe8ed; color: #9e374f; border-color: #f0c7d2; }
.auth-body .auth-panel { background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 70px #6554b515; }
.auth-body input { background: #fafbfe; color: var(--text); border-color: var(--line); }
.auth-body :is(h1, h2, label, .brand-title) { color: var(--text); }
.auth-body :is(p, .auth-subtitle, .small-muted) { color: var(--muted); }
/* Clear summary hierarchy shared by the home, calls and report pages. */
.ms-welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 4px 0 32px; }
.ms-welcome h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); font-weight: 650; letter-spacing: -.045em; margin: 9px 0; }
.ms-welcome p { font-size: .88rem; margin: 0; }
.ms-welcome .btn { gap: 12px; }
.ms-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 28px 0 16px; }
.ms-section-heading h3 { font-size: .94rem; margin: 0; font-weight: 650; }
.ms-section-heading > :is(span, a) { font-size: .75rem; color: #727d91; }
.ms-section-heading > a { color: #6554b5; }
.ms-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ms-metric { border-radius: 16px; padding: 22px; min-width: 0; border: 1px solid #00000003; }
.ms-lavender { background: #eeebfa; color: #7766b6; }
.ms-mint { background: #e8f3ee; color: #4e8c73; }
.ms-peach { background: #faf0e7; color: #b38660; }
.ms-blue { background: #eaf1fb; color: #688bbc; }
.ms-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .76rem; }
.ms-metric-top > span { color: #586177; font-weight: 500; }
.ms-metric-top .ms-icon { width: 19px; height: 19px; opacity: .9; }
.ms-metric > strong { display: block; font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 650; letter-spacing: -.045em; line-height: 1.2; margin: 20px 0 10px; font-variant-numeric: tabular-nums; }
.ms-metric > small { display: block; font-size: .7rem !important; line-height: 1.5; }
.ms-insights { display: grid; grid-template-columns: .65fr 1.1fr 1.25fr; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; gap: 20px; }
.content > .ms-insights, .content > .ms-insight-empty { margin-top: 20px; }
.ms-insight-intro h3 { margin: 5px 0 3px; font-size: .92rem; font-weight: 600; }
.ms-insight-intro p { margin: 0; font-size: .7rem; }
.ms-insight { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px; border-radius: 10px; }
.ms-insight:hover { background: #f8f7fc; }
.ms-insight > div { flex: 1; }
.ms-insight strong { display: block; font-size: .76rem; font-weight: 600; line-height: 1.5; }
.ms-insight div > span { display: block; margin-top: 5px; font-size: .7rem; line-height: 1.5; color: #6e798d; }
.ms-insight > span:last-child { color: #7a6caa; }
.ms-insight-dot { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; }
.ms-insight-empty { display: grid; gap: 6px; padding: 20px; border: 1px dashed #dad4ec; border-radius: 12px; background: #f4f1fa; color: #66718a; font-size: .85rem; }
.ms-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0 32px; }
.ms-shortcut { padding: 20px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center; gap: 12px; transition: border-color .2s, box-shadow .2s; }
.ms-shortcut:hover { border-color: #c8bee6; box-shadow: 0 4px 15px #6554b50a; }
.ms-shortcut-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; }
.ms-shortcut > div { flex: 1; min-width: 0; }
.ms-shortcut strong { display: block; font-size: .8rem; font-weight: 600; }
.ms-shortcut div > span { display: block; font-size: .72rem; color: #707c90; margin-top: 5px; line-height: 1.5; }
.ms-shortcut > span:last-child { color: #8b80ab; }
.app-body .ms-desktop-stats { gap: 16px; margin-bottom: 22px; }
.app-body .ms-desktop-stats .stat-card { padding: 20px; border-radius: 14px; min-height: 0; }
.app-body .ms-desktop-stats .stat-value { font-size: 1.6rem; margin: 10px 0 5px; }
.app-body .ms-desktop-stats .stat-label { font-size: .76rem; }
.app-body .ms-desktop-stats .stat-meta { font-size: .71rem; }
.app-body details.ms-detail-section { padding: 0; overflow: hidden; }
.ms-detail-section > summary { padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; }
.ms-detail-section > summary::-webkit-details-marker { display: none; }
.ms-detail-section > summary strong { font-size: .86rem; font-weight: 600; }
.ms-detail-section > summary small { display: block; margin-top: 5px; font-size: .72rem !important; }
.ms-detail-section > summary > span:last-child { color: #897eaa; transition: transform .15s; }
.ms-detail-section[open] > summary > span:last-child { transform: rotate(45deg); }
.ms-detail-section[open] > summary { border-bottom: 1px solid var(--line); }
.ms-detail-section > :not(summary) { margin: 20px; }
.ms-chart-note { font-size: .7rem; line-height: 1.65; padding-top: 10px; border-top: 1px solid var(--line); margin: 4px 0 0; }
@media (min-width: 1101px) { .app-body .sidebar-scrim { display: none; } }
@media (max-width: 1250px) {
    .app-body .shell { grid-template-columns: 222px minmax(0, 1fr); }
    .app-body .content { padding: 28px 24px; }
    .app-body .topbar { padding-inline: 24px; }
    .app-body .page-context-nav { padding-inline: 24px; }
    .ms-summary-grid { gap: 12px; }
    .ms-metric { padding: 18px; }
    .ms-insights { grid-template-columns: 1fr 1fr; }
    .ms-insight-intro { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
    .ms-insight-intro .ms-overline { display: none; }
    .ms-insight-intro h3 { margin: 0; }
    .ms-shortcuts { gap: 12px; }
    .ms-shortcut { align-items: flex-start; }
    .app-body .ux44-reports-page .ux44-filter-main { grid-template-columns: minmax(200px, 1fr) minmax(180px, 1fr) auto auto; }
    .app-body .ux44-reports-page .ux44-date-pair { grid-row: 2; grid-column: 1 / 3; }
}
@media (max-width: 1100px) {
    .app-body .shell { grid-template-columns: minmax(0, 1fr); }
    .app-body .sidebar { position: fixed; width: 246px; height: 100dvh; z-index: 60; left: 0; top: 0; transform: translateX(-105%); transition: transform .2s ease; }
    .app-body.sidebar-open .sidebar { transform: translateX(0); }
    .app-body .sidebar-toggle, .app-body .sidebar-close { display: inline-flex; }
    .app-body .sidebar-scrim { background: #29314b55; backdrop-filter: blur(2px); }
    .app-body .ux44-grid-2-1 { grid-template-columns: minmax(0, 1fr); }
    .app-body .ux44-filter-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; }
}
@media (max-width: 760px) {
    .app-body .content { padding: 24px 18px 36px; }
    .app-body .topbar { padding: 14px 18px; min-height: 68px; }
    .app-body .page-context-nav { padding: 12px 18px 0; }
    .topbar-workspace { display: none; }
    .app-body .clock { font-size: .65rem; padding: 6px; }
    .app-body .ux44-pagebar, .ms-welcome { align-items: flex-start; flex-direction: column; gap: 18px; }
    .ms-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ms-metric { padding: 17px; }
    .ms-metric > strong { font-size: 1.6rem; }
    .ms-insights { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 14px; }
    .ms-insight-intro { padding: 0 10px 5px; flex-wrap: wrap; }
    .ms-shortcuts { grid-template-columns: minmax(0, 1fr); }
    .ms-shortcut { align-items: center; padding: 16px; }
    .app-body .ms-desktop-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-body .ux44-filter-main, .app-body .ux44-reports-page .ux44-filter-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-body .ux44-search-field { grid-column: 1 / -1; }
    .app-body .ux44-reports-page .ux44-date-pair { grid-row: auto; grid-column: 1 / -1; }
    .app-body .ux44-filterbar { padding: 12px; }
    .app-body .ux44-tabs { width: 100%; overflow-x: auto; }
    .app-body .ux44-tabs button { flex-shrink: 0; padding: 0 12px !important; }
    .app-body .ux44-card { padding: 18px; }
    .app-body .ux44-page { gap: 20px; }
    .app-body .ux44-page-actions { justify-content: flex-start; flex-wrap: wrap; }
    .app-body .ux44-export-menu > div { right: auto; left: 0; width: min(290px, 80vw); }
    .app-body .toast { margin-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; } }
@media print {
    html, body.app-body { background: white; }
    .app-body .shell { display: block; }
    .app-body :is(.sidebar, .topbar, .page-context-nav, .ux44-filterbar, .ux44-page-actions, .ux44-tabs, .skip-link) { display: none !important; }
    .app-body .content { padding: 0; }
    .ms-summary-grid { grid-template-columns: repeat(4, 1fr); }
    .app-body :is(.ms-metric, .ux44-card, .ms-insights) { break-inside: avoid; box-shadow: none; print-color-adjust: exact; }
}
/* Secondary screens use the same neutral surfaces and legible status colors. */
.app-body { --cyan: #6554b5; --violet: #8071c1; --green: #237861; --amber: #94601f; --red: #b23f56; --border: #e5e8f0; }
.app-body .nav-link.active::after { display: none; }
.app-body .nav-link.active .nav-icon, .app-body .nav-link:hover .nav-icon { color: inherit; background: transparent; }
.app-body .brand-subtitle { text-transform: none; letter-spacing: 0; font-size: .71rem; }
.app-body :is(.fleet-alert, .workforce-warning, .call-quality-alert, .governance-warning-card, .danger-zone-card) { background: #fff3e8; border-color: #f0dcc3; color: #845923; }
.app-body .content :is(.fleet-alert, .workforce-warning, .call-quality-alert) :is(strong, p) { color: #845923; }
.app-body :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 { background: #f6f7fb; color: #647087; border-color: var(--line); }
.app-body :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 { color: #526076; border-color: var(--line); }
.app-body :is(.executive-hero, .operator-profile-hero, .oi-hero, .report-pro-hero, .pci-hero, .ux44-detail-hero) { background: #f0edf9; color: var(--text); border-color: #e4dff1; box-shadow: none; }
.app-body :is(.hero-command-card, .policy-version-card, .report-volume-card, .period-card, .kpi-tile, .operator-fleet-card, .fleet-queue-line div, .operator-score-card, .decision-banner-metrics div, .report-card, .oi-kpi-card, .oi-export-card.featured, .report-pro-story-card, .report-pro-kpi, .pci-kpi, .pci-call-facts article, .ops-story-card, .ops-filter-panel, .ops-control-card, .operator-call-table-wrap, .device-whatsapp-today) { background: #fff; border-color: var(--line); box-shadow: var(--shadow); }
.app-body :is(.range-switcher, .oi-definition-strip span, .ops-heatmap-header, .ops-heat-date, .ux44-heatmap-header, .confirmation-code) { background: #f3f2f9; color: #655883; border-color: var(--line); }
.app-body :is(.fleet-health-ring, .score-ring, .ux44-score-ring)::before { background: #fff; }
.app-body :is(.hero-pill, .quality-badge, .pci-outcome-badge, .status-badge) { background: #f1eef9; border-color: #e0dbed; color: #655883; }
.app-body :is(.quality-valid, .risk-low, .ux44-health.is-healthy) { background: #e7f4ed; color: #27745c; border-color: #d5e9dc; }
.app-body :is(.quality-warning, .risk-medium, .ux44-health.is-warning) { background: #faf0dc; color: #885d21; border-color: #ecdfc2; }
.app-body :is(.quality-danger, .risk-high, .ux44-health.is-critical) { background: #fbe9ed; color: #a23d53; border-color: #efd2da; }
.app-body :is(.table-secondary, .transcript-meta, .transcript-time, .ux44-operator-metrics span, .hero-command-card span, .pci-call-facts span, .metadata-list dt, .operator-device-meta, .call-identity-line, .device-whatsapp-copy, .ux44-heatmap > span) { color: #647087; }
.app-body .ux44-view-toggle { background: #edeff5; border-color: #e5e8f0; }
.app-body .ux44-view-toggle button { color: #647087; }
.app-body .ux44-view-toggle button.is-active { background: #fff; color: #6554b5; box-shadow: 0 2px 5px #2732480b; }
.app-body .ux44-operator-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-body .ux44-operator-metrics > div { background: #f8f9fc; border-color: var(--line); }
.ms-download-options { position: relative; }
.ms-download-options > summary { list-style: none; }
.ms-download-options > summary::-webkit-details-marker { display: none; }
.ms-download-options .operator-report-download { position: absolute; right: 0; z-index: 20; top: calc(100% + 8px); width: 275px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 35px #27324815; padding: 16px; border-radius: 12px; }
.ms-download-options label, .ms-download-options button { width: 100%; }
.app-body .ux44-operators-page .ux44-page-actions { flex: 0 1 auto; }
.ms-operator-detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ms-operator-detail summary { cursor: pointer; color: #6a6282; font-size: .74rem; }
.ms-device-management { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding-top: .75rem; font-size: .74rem; }
@media (min-width: 1251px) { .app-body .ux44-reports-page .ux44-filter-main { grid-template-columns: minmax(150px, 1fr) minmax(150px, .8fr) minmax(260px, auto) auto auto; } }
@media (max-width: 1100px) {
    .app-body.sidebar-open { overflow: hidden; }
    .app-body .sidebar-scrim { position: fixed; inset: 0; z-index: 50; border: 0; opacity: 0; pointer-events: none; }
    .app-body.sidebar-open .sidebar-scrim { display: block; opacity: 1; pointer-events: auto; }
}
@media (max-width: 760px) { .ms-download-options .operator-report-download { right: auto; left: 0; } }
.app-body .topbar { flex-direction: row; }
.app-body .ux44-donut.is-empty { background: #edf0f5; }
.app-body .ux44-hour-bar i { min-height: 0; }
.ms-dashboard > .ms-insights, .ms-dashboard > .ms-insight-empty { margin-top: 20px; }
.ms-dashboard .ms-welcome { margin-bottom: 24px; }
/* Keep the recording status and open action visible on a standard laptop. */
.app-body .ux44-calls-page .ux44-call-table { min-width: 880px; width: 100%; table-layout: fixed; }
.app-body .ux44-calls-page .ux44-call-table :is(th, td) { padding: 13px 9px; overflow-wrap: anywhere; }
.app-body .ux44-calls-page .ux44-call-table th:nth-child(1) { width: 12%; }
.app-body .ux44-calls-page .ux44-call-table th:nth-child(2) { width: 15%; }
.app-body .ux44-calls-page .ux44-call-table th:nth-child(3) { width: 19%; }
.app-body .ux44-calls-page .ux44-call-table th:nth-child(4) { width: 15%; }
.app-body .ux44-calls-page .ux44-call-table th:nth-child(5) { width: 10%; }
.app-body .ux44-calls-page .ux44-call-table th:nth-child(6) { width: 14%; }
.app-body .ux44-calls-page .ux44-call-table th:nth-child(7) { width: 10%; }
.app-body .ux44-calls-page .ux44-call-table th:nth-child(8) { width: 5%; }
.app-body .ux44-calls-page .ux44-call-table .ux44-pill { white-space: normal; line-height: 1.4; }
.app-body .ux44-calls-page .ux44-call-table .ux44-route { max-width: 100%; }
