/* Shared table presentation. Layout, frozen positions and semantic cell colors
   remain owned by each screen. Important rules override legacy per-screen themes. */
#workspace table{font-size:13px;color:#334155}
#workspace table th{
 background:#334e68!important;color:#fff!important;
 font-size:13px!important;font-weight:600!important;line-height:1.5!important;
 text-align:center!important;vertical-align:middle;
 border-color:#486078!important;
}
#workspace table th button,#workspace table th a{
 color:inherit!important;font-size:inherit!important;font-weight:inherit!important;
}
#workspace table td{
 font-size:13px!important;line-height:1.55!important;
 color:#334155;border-color:#e2e8f0!important;vertical-align:middle;
}
#workspace table tbody tr{background:#fff!important}
#workspace table tbody tr:nth-child(even){background:#f8fafc!important}
#workspace table tbody tr:hover{background:#eff6ff!important}
/* Opaque backgrounds on frozen identity cells prevent scrolled text showing through. */
#workspace .table-wrap tbody tr>td:first-child:not([colspan]){background:#fff!important}
#workspace .table-wrap tbody tr:nth-child(even)>td:first-child:not([colspan]){background:#f8fafc!important}
#workspace .table-wrap tbody tr:hover>td:first-child:not([colspan]){background:#eff6ff!important}
#workspace #recording-storage .storage-table-scroll tbody tr>td:nth-child(2){background:#fff!important}
#workspace #recording-storage .storage-table-scroll tbody tr:nth-child(even)>td:nth-child(2){background:#f8fafc!important}
#workspace #recording-storage .storage-table-scroll tbody tr:hover>td:nth-child(2){background:#eff6ff!important}
#workspace table th button:focus-visible,#workspace table th a:focus-visible{outline:2px solid #fff;outline-offset:2px}

/* Monitoring detail: the corner heading must paint above frozen body cells. */
#workspace #monitor .parity-detail .table-wrap thead th{position:sticky;top:0;z-index:3}
#workspace #monitor .parity-detail .table-wrap thead th:first-child{left:0;z-index:5}
#workspace #monitor .parity-detail .table-wrap tbody td:first-child:not([colspan]){position:sticky;left:0;z-index:1}

/* Compact monitoring rows with details in a separate dialog column. */
#workspace #monitor .monitor-member-table table{min-width:960px;table-layout:fixed;width:100%}
#workspace #monitor .monitor-member-table tr>:nth-child(1){width:9%}
#workspace #monitor .monitor-member-table tr>:nth-child(2){width:14%}
#workspace #monitor .monitor-member-table tr>:nth-child(3){width:17%}
#workspace #monitor .monitor-member-table tr>:nth-child(4){width:28%}
#workspace #monitor .monitor-member-table tr>:nth-child(5){width:10%;text-align:center}
#workspace #monitor .monitor-member-table tr>:nth-child(6){width:22%;white-space:nowrap}
#workspace #monitor .monitor-member-table td{padding:6px 10px;height:36px;line-height:1.4!important}
#workspace #monitor .monitor-member-table .monitor-connection{flex-wrap:nowrap;gap:8px;min-height:0}
#workspace #monitor .monitor-member-table td button{min-height:28px;padding:3px 8px;white-space:nowrap}
/* Details are visible in their own column without opening a popup. */
#workspace #monitor .monitor-member-table tr>:nth-child(1){width:8%}
#workspace #monitor .monitor-member-table tr>:nth-child(2){width:12%}
#workspace #monitor .monitor-member-table tr>:nth-child(3){width:15%}
#workspace #monitor .monitor-member-table tr>:nth-child(4){width:20%}
#workspace #monitor .monitor-member-table tr>:nth-child(5){width:27%;text-align:left}
#workspace #monitor .monitor-member-table tr>:nth-child(6){width:18%}
#workspace #monitor .monitor-device-detail{display:flex;flex-wrap:wrap;align-items:center;gap:2px 12px;min-width:0}
#workspace #monitor .monitor-device-detail p{margin:0;font-size:12px;line-height:1.45;overflow-wrap:anywhere}

/* Center the compact monitoring list, including nested status and detail groups. */
#workspace #monitor .monitor-member-table tbody tr>td:nth-child(n){text-align:center;vertical-align:middle}
#workspace #monitor .monitor-member-table .monitor-connection,#workspace #monitor .monitor-member-table .monitor-device-detail{justify-content:center;text-align:center}
#workspace #monitor .monitor-member-table th .monitor-column-filter{text-align:center}

/* Folder index tabs: attached to the content, with a raised selected tab. */
#workspace #monitor .monitor-view-tabs{display:flex;align-items:flex-end;gap:6px;padding:0 10px;margin:16px 0 0;background:transparent;border:0;border-bottom:1px solid #b8c7da;border-radius:0}
#workspace #monitor .monitor-view-tabs [data-view=agents]{--tab-color:#2563eb;--tab-tint:#e4edff}
#workspace #monitor .monitor-view-tabs [data-view=stats]{--tab-color:#0f766e;--tab-tint:#dff3ee}
#workspace #monitor .monitor-view-tabs [data-view=recent]{--tab-color:#7c3aed;--tab-tint:#eee5ff}
#workspace #monitor .monitor-view-tabs button{position:relative;flex:0 1 210px;min-width:160px;min-height:46px;margin:6px 0 -1px;padding:12px 22px;border:1px solid #b8c7da;border-top:4px solid var(--tab-color);border-bottom:1px solid #b8c7da;border-radius:12px 12px 0 0;background:var(--tab-tint);color:var(--tab-color);font-size:14px;font-weight:600;box-shadow:none;line-height:1.4}
#workspace #monitor .monitor-view-tabs button:hover{background:#fff;color:var(--tab-color)}
#workspace #monitor .monitor-view-tabs [aria-selected=true]{z-index:2;min-height:52px;margin-top:0;background:#fff;color:var(--tab-color);font-weight:800;border-bottom-color:#fff;box-shadow:0 -2px 5px #334e6808}
#workspace #monitor .monitor-view-tabs button:focus-visible{outline:2px solid var(--tab-color);outline-offset:2px}
#workspace #monitor [role=tabpanel]{margin-top:0;padding:12px;background:#fff;border:1px solid #b8c7da;border-top:0;border-radius:0 0 10px 10px}
#workspace #monitor [role=tabpanel][hidden],#workspace #monitor .monitor-extra-summary[hidden],#workspace #monitor .monitor-column-filters[hidden]{display:none!important}
@media(max-width:600px){#workspace #monitor .monitor-view-tabs{gap:4px;padding:0 4px}#workspace #monitor .monitor-view-tabs button{flex:1;min-width:0;padding:10px 5px;font-size:12px}#workspace #monitor [role=tabpanel]{padding:8px}}

/* Assignment and call results: readable colored text without badge decoration. */
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td .reference-status{display:inline;background:transparent;border:0;border-radius:0;box-shadow:none;padding:0;font-size:inherit;font-weight:600;color:#64748b}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td .reference-status--green{color:#15803d}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td .reference-status--red{color:#b91c1c}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td .reference-status--yellow{color:#a16207}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td .reference-status--blue{color:#1d4ed8}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td .reference-status--dark{color:#475569}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td .reference-status[data-status="REJECTED_AFTER_ANSWER"],:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td .reference-status[data-status="REJECTED_BEFORE_ANSWER"]{color:#b45309}

/* Soft full-cell backgrounds, not pill badges. */
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td:has(> .reference-status){background:#f1f5f9}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td:has(> .reference-status--green){background:#e8f5ec}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td:has(> .reference-status--red){background:#fcebec}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td:has(> .reference-status--yellow){background:#fff7df}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td:has(> .reference-status--blue){background:#eaf1ff}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td:has(> .reference-status--dark){background:#e9edf2}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td:has(> .reference-status[data-status="REJECTED_AFTER_ANSWER"]),:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td:has(> .reference-status[data-status="REJECTED_BEFORE_ANSWER"]){background:#fff1e4}
:is(#reports .stats-section, #monitor .monitor-recent-panel, #recordings, #manual-recordings) table td:has(> .reference-status[data-status=""]){background:transparent}

/* Folder index tabs: attached to the content, with a raised selected tab. */
#workspace #reports .report-view-tabs{display:flex;align-items:flex-end;gap:6px;padding:0 10px;margin:16px 0 0;background:transparent;border:0;border-bottom:1px solid #b8c7da;border-radius:0}
#workspace #reports .report-view-tabs [data-view=summary]{--tab-color:#2563eb;--tab-tint:#e4edff}
#workspace #reports .report-view-tabs [data-view=groups]{--tab-color:#0f766e;--tab-tint:#dff3ee}
#workspace #reports .report-view-tabs [data-view=calls]{--tab-color:#7c3aed;--tab-tint:#eee5ff}
#workspace #reports .report-view-tabs button{position:relative;flex:0 1 210px;min-width:160px;min-height:46px;margin:6px 0 -1px;padding:12px 22px;border:1px solid #b8c7da;border-top:4px solid var(--tab-color);border-bottom:1px solid #b8c7da;border-radius:12px 12px 0 0;background:var(--tab-tint);color:var(--tab-color);font-size:14px;font-weight:600;box-shadow:none;line-height:1.4}
#workspace #reports .report-view-tabs button:hover{background:#fff;color:var(--tab-color)}
#workspace #reports .report-view-tabs [aria-selected=true]{z-index:2;min-height:52px;margin-top:0;background:#fff;color:var(--tab-color);font-weight:800;border-bottom-color:#fff;box-shadow:0 -2px 5px #334e6808}
#workspace #reports .report-view-tabs button:focus-visible{outline:2px solid var(--tab-color);outline-offset:2px}
#workspace #reports [role=tabpanel]{margin-top:0;padding:12px;background:#fff;border:1px solid #b8c7da;border-top:0;border-radius:0 0 10px 10px}
#workspace #reports [role=tabpanel][hidden],#workspace #reports .monitor-extra-summary[hidden],#workspace #reports .monitor-column-filters[hidden]{display:none!important}
@media(max-width:600px){#workspace #reports .report-view-tabs{gap:4px;padding:0 4px}#workspace #reports .report-view-tabs button{flex:1;min-width:0;padding:10px 5px;font-size:12px}#workspace #reports [role=tabpanel]{padding:8px}}


#workspace #agent-list [data-force-logout]{white-space:nowrap;text-align:center}
/* Administrator completion of ended calls. */
dialog.admin-pending-results{width:min(620px,calc(100vw - 32px));max-height:85vh;overflow:auto;padding:24px;border:1px solid #d8e0ed;border-radius:14px;box-sizing:border-box}
.admin-pending-results::backdrop{background:rgba(24,37,59,.45)}
.admin-pending-results h2{margin:0 0 12px;font-size:20px}
.admin-pending-results .card{padding:16px;margin:12px 0;border:1px solid #d8e0ed;border-radius:8px}
.admin-pending-results h3{margin:0 0 8px}.admin-pending-results .card p{margin:8px 0 12px}
.admin-pending-results select{margin:0 8px 8px 0;max-width:100%;min-height:36px}
.admin-pending-results button{min-height:36px}
