/* One table: organization totals and expandable descendants share metric columns. */
.live-detail-heading { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; border-top:1px solid var(--theme-line,#e3e9f2); border-bottom:1px solid var(--theme-line,#e3e9f2); flex:none; }
.live-detail-heading h2 { font-size:13px; margin:0; }
.live-detail-heading .btn { padding:4px 8px; font-size:11px; }
.live-tree-table { font-size:12px; min-width:var(--live-table-min-width,1226px)!important; }
.live-tree-table th { width:auto!important; color:var(--theme-muted,#8490a3); font-weight:500; white-space:nowrap!important; overflow:visible; text-overflow:clip; }
.live-tree-table th,.live-tree-table td { text-align:right; }
.live-tree-table th:first-child,.live-tree-table td:first-child,.live-tree-table th:nth-child(10),.live-tree-table td:nth-child(10) { text-align:left; }
.live-tree-table td { height:39px; }
.live-tree-table .live-level-cell { padding-left:12px!important; }
.live-level-content { display:flex; gap:6px; align-items:center; min-width:0; padding-left:calc(var(--tree-depth)*16px); }
.live-level-content small { color:var(--theme-muted,#8490a3); font-weight:400; font-size:10px; }
.live-tree-toggle { display:flex; gap:6px; align-items:center; min-width:0; width:100%; padding:0; background:transparent; text-align:left; color:inherit; font-size:inherit; font-weight:inherit; }
.live-tree-toggle:focus-visible { outline:2px solid var(--theme-blue,#2863df); outline-offset:2px; }
.live-chevron { color:var(--theme-blue,#397dff); width:12px; flex:none; font-size:17px; line-height:1; }
.live-node-name,.live-leaf-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.live-leaf-name { padding-left:18px; }
.live-branch-row { background:var(--theme-surface,#fff); }
.live-level-company { font-weight:650; }
.live-level-group { font-weight:550; }
.live-tree-table .live-tree-hint { font-size:10px; color:var(--theme-muted,#8490a3); }

@media(max-height:550px){ .live-detail-heading { padding:3px 10px; } .live-detail-heading .btn { padding:2px 6px; } .live-tree-table td { height:33px; } }

.live-tree-table th:last-child,.live-tree-table td:last-child { padding-right:16px!important; }
.live-tree-toggle { flex:1; width:auto; gap:3px; }
.live-tree-toggle small { display:none; }
.live-level-content { gap:3px; padding-left:calc(var(--tree-depth)*8px); }
.live-scope-button,.live-remind-button { flex:none; white-space:nowrap; padding:3px 4px; font-size:11px; color:var(--theme-blue,#2863df); background:var(--theme-blue-soft,#edf4ff); border:1px solid var(--theme-line,#e3e9f2); border-radius:4px; }
.live-remind-button:disabled { opacity:.5; cursor:default; }
.live-reminder-dialog { width:min(640px,calc(100vw - 32px)); max-height:80vh; padding:20px; border:1px solid var(--theme-line,#e3e9f2); border-radius:12px; color:var(--theme-text,#24334a); background:var(--theme-surface,#fff); }
.live-reminder-dialog::backdrop { background:rgba(15,23,42,.4); }
.live-reminder-dialog h2 { margin:0 0 14px; font-size:18px; }
.live-reminder-list { max-height:55vh; overflow:auto; }
.live-reminder-list article { padding:12px 0; border-top:1px solid var(--theme-line,#e3e9f2); }
.live-reminder-list h3 { margin:0; font-size:14px; }
.live-reminder-list p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
.live-reminder-list small { color:var(--theme-muted,#8490a3); }
.live-reminder-dialog footer { display:flex; justify-content:flex-end; align-items:center; gap:12px; margin-top:16px; }

/* Manual popover stays above expanded tables without blocking interaction. */
.live-reminder-feedback { position:fixed; inset:20px 20px auto auto; margin:0; width:min(360px,calc(100vw - 32px)); box-sizing:border-box; display:flex; align-items:flex-start; gap:12px; padding:16px; border:1px solid var(--theme-line,#dce7df); border-radius:10px; background:var(--theme-surface,#fff); color:var(--theme-text,#24334a); box-shadow:0 8px 28px #12223b26; z-index:10000; }
.live-reminder-feedback strong { font-size:14px; }
.live-reminder-feedback p { margin:6px 0 0; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.live-feedback-icon { color:#15803d; font-size:20px; line-height:22px; }
.live-reminder-feedback[data-success="false"] .live-feedback-icon { color:#dc2626; }
.live-reminder-feedback button { margin-left:auto; flex:none; background:transparent; color:var(--theme-muted,#8490a3); padding:0 4px; font-size:18px; }
@media(max-width:480px){ .live-reminder-feedback { top:16px; right:16px; } }

.live-reminder-history-table { min-width:1050px; table-layout:fixed; }
.live-reminder-history-table th,.live-reminder-history-table td { white-space:normal!important; overflow-wrap:anywhere; text-align:left; vertical-align:top; padding:14px!important; }
.live-reminder-history-table th:nth-child(2),.live-reminder-history-table th:last-child { width:22%; }
.live-reminder-history-table th:nth-child(3),.live-reminder-history-table th:nth-child(5) { width:8%; }
.live-reminder-history-table small { display:block; color:var(--theme-muted,#8490a3); margin-top:6px; font-size:11px; }
.live-reminder-history-table p { white-space:pre-wrap; line-height:1.6; margin:8px 0; }
.live-reminder-history-table summary { cursor:pointer; color:var(--theme-blue,#2863df); margin-top:6px; }
.live-history-status { display:inline-block; border-radius:4px; padding:3px 6px; background:var(--theme-blue-soft,#edf4ff); }
.live-history-status[data-status="COMPLETED"] { color:#15803d; }
.live-history-status[data-status="CANCELLED"] { color:var(--theme-muted,#8490a3); }
.live-history-error:not(:empty) { padding:12px 20px; color:#dc2626; }
.anchors-manager-page #anchor-search { width:210px; font-size:12px; padding:7px 10px; }
.anchors-manager-page #anchor-category-filters b { margin-left:6px; font-size:10px; }
.anchor-manager-table th:nth-child(11),.anchor-manager-table td:nth-child(11) { text-align:left; }
@media(max-width:760px){ .anchors-manager-page #anchor-search { min-width:70px; width:100px; flex:1; } }
@media(max-height:550px){ .anchors-manager-page #anchor-row-count { display:none; } }

/* Keep the header and rows in the same scrollport and show complete cell text. */
.viewport-app .data-expand-dialog { overflow:hidden; }
.data-expand-dialog > .expanded-data { min-width:0; min-height:0; overflow:auto; padding:0; }
.data-expand-dialog .data-table { margin:0; }
.data-expand-dialog .data-table thead { position:sticky; top:0; z-index:3; }
.data-expand-dialog .data-table th { position:static; background:var(--theme-blue-soft,#eef4ff); }
.live-tree-table td { white-space:normal!important; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; vertical-align:top; line-height:1.6; }
.live-tree-table .diagnosis-ellipsis { white-space:pre-wrap; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
.live-tree-table .live-node-name,.live-tree-table .live-leaf-name { white-space:normal; overflow:visible; overflow-wrap:anywhere; text-overflow:clip; min-width:0; }
.live-level-content > small { flex:none; }
.live-tree-table .live-remind-button { box-sizing:border-box; width:68px; height:30px; padding:0 4px; }
.live-reminder-dialog { width:min(940px,calc(100vw - 32px)); padding:0; border:2px solid #f59e0b; background:var(--theme-surface,#fff); }
.live-reminder-dialog > header { padding:18px 22px; background:#b45309; color:white; }
.live-reminder-dialog h2 { margin:0 0 6px; }
.live-reminder-dialog .live-reminder-list { padding:0 22px; }
.live-reminder-list article { margin:12px 0; padding:14px; border:1px solid #f59e0b; border-left:5px solid #f59e0b; border-radius:6px; background:var(--theme-blue-soft,#fff7ed); }
.live-reminder-list .reminder-context { display:flex; flex-wrap:wrap; gap:8px 20px; margin-top:10px; }
.live-reminder-dialog footer { padding:12px 22px 18px; }
.operator-roster-table .roster-complete { width:100%; padding:6px 1px; white-space:normal; line-height:1.5; font-size:11px; }

/* Compact numeric headings leave more space for diagnosis and strategy prose. */
.anchor-manager-table th:nth-child(n+4):nth-child(-n+9) { font-size:11px; padding-left:3px!important; padding-right:3px!important; }

/* Status stays on one line in the main table and both expanded views. */
.live-tree-table .live-status-cell { white-space:nowrap!important; overflow-wrap:normal; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }
