.demo-roles { display:flex; gap:8px; }
.demo-roles button { background:var(--theme-raised, #f5f7fb); color:var(--theme-muted, #8391a7); border:1px solid var(--theme-line, #e4eaf3); border-radius:9px; padding:8px 18px; }
.demo-roles button.active { background:var(--theme-blue-soft, #edf3ff); color:var(--theme-blue, #3c6aca); border-color:var(--theme-line, #b9cdee); }
.demo-roles small { display:block; margin-top:4px; font-size:10px; }
.viewport-app .topbar-inner { padding-top:14px; padding-bottom:14px; }
.overview-board { grid-template-columns:repeat(4,minmax(0,1fr)); }
.summary-number { padding:12px; color:var(--theme-muted, #526e96); font-size:28px; font-weight:650; }
.summary-number small { display:block; font-size:10px; color:var(--theme-muted, #99a4b5); margin-top:6px; font-weight:400; }
.live-summary-block { flex:1; margin:10px 12px 0; padding:15px; border:1px solid var(--theme-line, #e7edf6); border-radius:9px; background:var(--theme-surface, #fafcff); }
.live-summary-block h3 { font-size:12px; color:var(--theme-muted, #6a7e9c); }
.live-summary-values { display:grid; grid-template-columns:1fr 1fr; margin-top:16px; }
.live-summary-values b { display:block; font-size:30px; color:var(--theme-blue, #4e6b93); }
.live-summary-values small { display:block; margin-top:7px; color:var(--theme-muted, #98a3b4); font-size:10px; }
.overview-board #live-card .card-footer { margin-top:10px; }
.overview-board .learning-cards { grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; }
.knowledge-overview-assistant { grid-column:1/-1; display:flex; flex-direction:column; gap:10px; padding:20px; background:var(--theme-surface, white); border:1px solid var(--theme-line, #e4eaf4); border-radius:12px; }
.knowledge-overview-assistant small { font-size:10px; color:var(--theme-muted, #99a4b5); }
.knowledge-overview-assistant > span:last-child { font-size:11px; }
.overview-board .learning-card { padding:12px; }
.overview-board .learning-card small { white-space:normal; }
.operator-controls { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:8px; }
.operator-controls input { font-size:12px; width:220px; }
.operator-controls select { max-width:350px; }
.roster-page #data-source { margin:0 0 8px; }
.viewport-app.roster-page main.page > .roster-grid { flex:1; min-height:0; }
.roster-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:12px; }
.roster-panel { display:flex; flex-direction:column; min-height:0; min-width:0; border:1px solid var(--theme-line, #e2e9f3); border-radius:12px; background:var(--theme-surface, white); }
.roster-panel header { display:flex; align-items:center; gap:10px; padding:12px; }
.roster-panel h2 { font-size:14px; }
.roster-panel header b { margin-left:auto; color:var(--theme-muted, #8394ac); }
.roster-panel header button { color:var(--theme-blue, #557fc2); background:var(--theme-blue-soft, #eef3fc); border-radius:5px; padding:4px 8px; font-size:10px; }
.roster-list { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 10px 10px; scrollbar-width:thin; }
.roster-anchor { display:block; margin-bottom:8px; padding:10px; border:1px solid var(--theme-line, #e8edf5); border-radius:8px; color:var(--theme-muted, #54647e); }
.roster-anchor:hover { text-decoration:none; border-color:var(--theme-line, #b2c8ea); }
.roster-identity { display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:7px; font-size:11px; }
.roster-identity small { display:block; color:var(--theme-muted, #9aa5b6); font-size:9px; margin-bottom:4px; }
.roster-identity strong,.roster-identity span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.roster-flow { display:flex; align-items:center; gap:8px; margin-top:10px; padding-top:8px; border-top:1px solid var(--theme-line, #eef1f7); font-size:10px; }
.roster-flow b { margin-left:auto; color:var(--theme-blue, #5474a2); }
.roster-flow small { color:var(--theme-muted, #9ca8b9); }
.data-expand-dialog { width:min(1250px,95vw); height:88dvh; max-width:95vw; padding:0; }
.data-expand-dialog[open] { display:flex; flex-direction:column; }
.data-expand-dialog > header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid var(--theme-line, #e5eaf3); flex:none; }
.expanded-data { padding:16px; min-height:0; flex:1; overflow:auto; overscroll-behavior:contain; }
.expanded-rosters,.expanded-live { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:start; }
.channel-people { width:100%; border-collapse:collapse; font-size:11px; }
.channel-people th,.channel-people td { text-align:right; padding:10px 4px; border-bottom:1px solid var(--theme-line, #ecf0f6); }
.channel-people th:first-child { text-align:left; }
.knowledge-page .page-scroll { display:flex; flex-direction:column; gap:15px; }
.knowledge-assistant { min-height:260px; flex:1; display:flex; flex-direction:column; gap:12px; padding:20px; border:1px solid var(--theme-line, #e3eaf5); border-radius:12px; background:var(--theme-surface, white); }
.knowledge-answer { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; font-size:12px; }
.knowledge-page .knowledge-entries { grid-template-columns:repeat(2,minmax(0,1fr)); flex:none; }
.knowledge-page .knowledge-entry { padding:18px; }
.knowledge-page .entry-symbol { float:left; margin:0 14px 0 0; }
.knowledge-page .knowledge-entry p { margin:7px 0 12px; }
.knowledge-page .ask-box textarea { min-height:42px; }
@media(max-width:760px) {
 .demo-roles { gap:4px; } .demo-roles button { padding:6px 10px; font-size:11px; }
 .roster-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(3,minmax(0,1fr)); gap:7px; }
 .roster-panel header { padding:8px; gap:4px; } .roster-panel h2 { font-size:11px; }
 .operator-controls { gap:6px; } .operator-controls input { width:140px; } .operator-controls select { max-width:160px; }
 .roster-identity { grid-template-columns:1fr; } .roster-identity > div:not(:first-child) { display:none; }
 .roster-flow { flex-wrap:wrap; } .expanded-rosters,.expanded-live { grid-template-columns:1fr; }
 .knowledge-assistant { padding:12px; } .knowledge-page .ask-box { flex-direction:row; }
 .knowledge-page .knowledge-entry { padding:12px; } .knowledge-page .entry-symbol { display:none; }
}
/* 卡片和数据在当前页打开详情；弹窗只滚动内容区。 */
button.roster-anchor { width:100%; text-align:left; background:var(--theme-surface, white); font:inherit; }
.realtime-room[role=button] { cursor:pointer; }
.realtime-room[role=button]:hover { border-color:var(--theme-line, #b2c8ea); }
.detail-action { color:var(--primary,#2863df); }
.item-detail-dialog { width:min(1120px,95vw); }
.item-detail-dialog > header > div { min-width:0; }
.item-detail-dialog h2,.item-detail-dialog .subtitle { overflow-wrap:anywhere; }
.item-detail-dialog > header > button { flex:none; }
.item-detail-dialog .detail-layout > * { min-width:0; }
.item-detail-dialog .panel { padding:20px; }
.item-detail-dialog .field-value,.item-detail-dialog .record { overflow-wrap:anywhere; }
/* 使用真实网格和卡片尺寸承载骨架，避免数据仅占左上角。 */
.skeleton.loading-line { display:block; min-height:0; height:12px; border-radius:4px; margin:6px 0; }
.loading-identity-pending { grid-column:1/-1; min-width:0; padding:16px; align-self:start; }
.loading-roster { margin-bottom:8px; padding:10px; border:1px solid var(--theme-line, #e8edf5); border-radius:8px; }
.loading-room { padding:14px; margin-bottom:10px; border:1px solid var(--theme-line, #e6ebf3); border-radius:9px; }
.loading-room .realtime-room-head > div { width:45%; }
.loading-room .realtime-data .loading-line:first-child { height:21px; }
.loading-scope { display:block; width:160px; }
.loading-filter .skeleton { display:block; min-height:0; border-radius:3px; color:transparent; }
.demo-roles .loading-line { height:10px; margin:0; }
.roster-list .loading-line { height:11px; margin:4px 0; }
@media(max-width:760px) {
 .item-detail-dialog .detail-layout { grid-template-columns:1fr; }
 .item-detail-dialog > header { padding:12px; }
 .item-detail-dialog .expanded-data { padding:10px; }
 .item-detail-dialog .panel { padding:12px; }
 .loading-room { padding:9px; }
}
@media(prefers-reduced-motion:reduce) { .skeleton { animation:none; } }
/* 初版模块标题与红色待处理角标。 */
.task-dot { min-width:20px; height:20px; border-radius:10px; background:#e64d50; color:#fff; display:inline-grid; place-items:center; padding:0 6px; font-size:10px; line-height:20px; flex:none; }
.column-title { display:flex; align-items:center; justify-content:space-between; }
.knowledge-original { flex:1; min-height:0; display:flex; flex-direction:column; gap:12px; }
.knowledge-original > .card:first-child { flex:1; min-height:0; }
.knowledge-row-list { flex:1; min-height:0; overflow:auto; }
.knowledge-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:16px 12px; border-bottom:1px solid var(--theme-line, #edf0f6); font-size:12px; color:var(--theme-muted, #52617b); }
.knowledge-row small { display:block; margin-top:7px; color:var(--theme-muted, #8e9bb0); font-size:10px; }
.knowledge-skills { flex:none; }
.knowledge-skills h3 { font-size:13px; padding:12px 12px 0; }
.skill-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; padding:11px; }
.skill-link { display:flex; align-items:center; gap:8px; padding:12px 8px; border-radius:8px; background:var(--theme-blue-soft, #f4f7fc); font-size:12px; }
.skill-link i { font-style:normal; color:var(--theme-blue, #4e77c5); }
.knowledge-page .knowledge-entries { grid-template-columns:repeat(3,minmax(0,1fr)); }
.knowledge-page .knowledge-skills .skill-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
/* 密集单行数据：内部双向滚动，长诊断文本完整保留。 */
.data-table { width:100%; border-collapse:separate; border-spacing:0; font-size:12px; text-align:left; }
.data-table th { position:sticky; top:0; z-index:2; background:var(--theme-blue-soft, #f1f5fb); color:var(--theme-muted, #77869d); font-weight:500; }
.data-table td,.data-table th { padding:12px 14px; white-space:nowrap; border-bottom:1px solid var(--theme-line, #e9eef5); }
.data-table tr[role=button] { cursor:pointer; outline-offset:-2px; }
/* Paint every cell so opaque sticky columns share the same row hover. */
:is(.data-table,.team-management-table) tbody tr:hover > :is(td,th) { background:var(--theme-blue-soft, #f3f7ff); }
.data-expand-dialog { width:min(1600px,96vw); max-width:96vw; }
.item-detail-dialog { width:min(1200px,95vw); }
.item-detail-dialog .expanded-data { padding:16px; }
.item-detail-dialog .detail-layout { grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); }
.item-detail-dialog .issue-result { display:flex; flex-direction:column; }
.item-detail-dialog #records { max-height:190px; overflow:auto; margin-top:12px; }
.item-detail-dialog #followup-form { margin-top:16px; }
.issue-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; position:sticky; bottom:-16px; background:var(--theme-surface, white); padding:12px 0 2px; }
.material-file { display:block; margin-top:8px; overflow-wrap:anywhere; }
.channel-people input { width:100%; min-width:36px; padding:7px 3px; font-size:12px; text-align:right; }
.channel-people th:first-child { min-width:55px; }
/* 即时盯播：四个汇总框 + 多选标签 + 单行列表。 */
.viewport-app.live-table-page main.page > .live-data-panel { flex:1; min-height:0; }
.live-data-panel { display:flex; flex-direction:column; border:1px solid var(--theme-line, #e3e9f2); border-radius:12px; background:var(--theme-surface, white); overflow:hidden; }
.live-list-toolbar { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px; flex:none; }
.live-filter-tabs { display:flex; gap:6px; }
.live-filter-tabs button { padding:8px 10px; font-size:11px; color:var(--theme-muted, #7d8da4); border-radius:7px; background:var(--theme-raised, #f3f6fb); white-space:nowrap; }
.live-filter-tabs button.active { color:var(--theme-blue, #2d61c6); background:var(--theme-blue-soft, #eaf1ff); box-shadow:inset 0 0 0 1px #b6cff7; }
.table-scroll { min-height:0; flex:1; overflow:auto; overscroll-behavior:contain; }
.live-summary { margin:0 0 12px; gap:10px; }
.live-summary .kpi { padding:14px; min-height:100px; }
.live-composite > div { font-size:11px; margin:18px 0; }
.live-composite b { font-size:19px; }
.live-summary .kpi-value { font-size:27px; margin:10px 0; }
.loading-table-row td { min-width:90px; }
@media(max-width:760px) {
 .item-detail-dialog .detail-layout { grid-template-columns:1fr; }
 .knowledge-page .knowledge-entries { grid-template-columns:1fr; }
 .knowledge-page .knowledge-skills .skill-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .live-list-toolbar { flex-wrap:wrap; padding:8px; }
 .live-summary { gap:6px; }
 .live-summary .kpi { padding:9px; min-height:80px; }
 .live-summary .kpi-value { font-size:22px; }
 .live-composite > div { margin:10px 0; }
 .live-composite b { font-size:14px; }
 .data-table td,.data-table th { padding:10px; }
 .roster-page .page-head { flex-wrap:wrap; }
 .roster-page .page-head .toolbar { width:100%; }
 .roster-page #anchor-search { min-width:0; width:120px; flex:1; }
 .skill-link { padding:8px; }
}
@media(max-height:550px) {
 .live-summary .kpi { min-height:0; padding:6px 10px; }
 .live-summary .kpi-value { margin:4px 0; font-size:20px; }
 .live-composite > div { margin:5px 0; }
 .live-summary .kpi-note { display:none; }
 .live-list-toolbar { padding:6px; }
}
.overview-board .knowledge-original > .card { height:auto; margin:0; }
.overview-board .knowledge-original > .knowledge-skills { flex:none; }
.overview-page .page-scroll { display:flex; flex-direction:column; overflow:hidden; }
.overview-work { flex:1; min-height:0; }
.overview-board { height:100%; }
.overview-board > .column { min-height:0; display:flex; flex-direction:column; }
.overview-board > .column > .card { flex:1; min-height:0; height:auto; }
.overview-board .diagnosis-grid { overflow:auto; }
.overview-board .knowledge-original { min-height:0; }
.knowledge-row { padding:12px; }
@media(max-width:1050px) {
 .overview-board > .column { display:none; height:100%; }
 .overview-board > .column.is-selected { display:flex; }
}
.recruitment-page .page-scroll { display:flex; flex-direction:column; overflow:hidden; gap:8px; }
.recruitment-page #summary { flex:none; margin:0; }
.recruitment-page #summary .kpi { min-height:0; padding:12px 16px; }
.recruitment-page #summary .kpi-value { font-size:26px; margin:8px 0; }
.recruitment-page .list-toolbar { flex:none; margin:0; padding:8px 12px; }
.recruitment-page #funnel-explanation { flex:none; margin:0; padding:8px 12px; font-size:11px; }
.recruitment-page #funnel-form { display:flex; flex-direction:column; flex:1; min-height:0; }
.recruitment-page #recruitment-list { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; }
.recruitment-page #funnel-submit { flex:none; position:static; margin-top:8px; padding:10px 12px; }
.recruitment-page .channel-summary { padding:14px; }
.recruitment-page .channel-summary .funnel { margin:12px 0; }
.recruitment-page .channel-summary .funnel-step { padding:8px 4px; }
.recruitment-page .channel-summary .funnel-step b { font-size:18px; margin-top:5px; }
.recruitment-page .channel-summary .funnel { padding:0; margin:8px 0; }
.recruitment-page #summary .kpi-value { margin:4px 0; }
.recruitment-page #summary .kpi-note { display:block; }
@media(max-height:550px) {
 .viewport-app .topbar-inner { padding-top:6px; padding-bottom:6px; }
 .demo-roles small { display:none; }
 .demo-roles button { padding:6px 12px; }
 .live-table-page #data-source { display:none; }
 .live-table-page .scopebar { margin-bottom:4px; }
 .live-table-page .live-summary { margin-bottom:6px; }
 .live-table-page .data-table td,.live-table-page .data-table th { padding:7px 10px; }
 .recruitment-page #summary .kpi { padding:5px 10px; }
 .recruitment-page #funnel-explanation { display:none; }
 .recruitment-page #funnel-note { display:none; }
 .recruitment-page #funnel-submit { padding:6px; margin-top:5px; }
}
.overview-board > .column { height:100%; }
.skeleton.loading-copy { display:inline-block; min-height:0; border-radius:4px; color:transparent; }

/* 核心数据：今日主值与昨日、本月比较同屏展示。 */
.overview-main .kpi-comparison { display:flex; flex-wrap:wrap; gap:3px 12px; margin-top:7px; color:var(--theme-muted, #8490a3); font-size:11px; line-height:1.5; font-variant-numeric:tabular-nums; }
.overview-main .kpi-comparison > span { white-space:nowrap; }
.overview-main .kpi-comparison .skeleton { display:inline-block; width:28px; height:10px; margin:0; vertical-align:middle; }
@media (max-width:600px) { .overview-main .kpi-comparison { font-size:10px; gap:1px 8px; margin-top:4px; } }

/* 盯播来源与指标共享一组多选标签，超出时只滚动标签区域。 */
.live-table-page .live-list-toolbar { align-items:flex-start; }
.live-table-page .live-filter-tabs { flex:1; min-width:0; flex-wrap:wrap; max-height:84px; overflow:auto; overscroll-behavior:contain; padding:1px; }
.live-filter-tabs [data-filter-count] { margin-left:6px; font-size:10px; font-variant-numeric:tabular-nums; }
.live-table-page .live-list-toolbar > .toolbar { flex:none; padding-top:2px; }
@media(max-width:760px) { .live-table-page .live-filter-tabs { flex-basis:100%; } }
@media(max-height:550px) { .live-table-page .live-filter-tabs { flex-basis:auto; max-height:66px; } .live-table-page .live-filter-tabs button { padding:6px 8px; } }

/* v18: one viewport, scoped summaries and inline monthly editing. */
.live-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
.live-table { width:100%; min-width:0!important; table-layout:fixed; font-size:11px; }
.live-table th,.live-table td { min-width:0!important; max-width:none; padding:9px 5px!important; overflow:hidden; text-overflow:ellipsis; white-space:nowrap!important; }
.live-table th { white-space:normal!important; }
.live-table th:nth-child(11) { width:17%; }
.diagnosis-ellipsis { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:help; }
.diagnosis-tooltip { position:fixed; z-index:10000; max-width:min(480px,calc(100vw - 24px)); max-height:45vh; overflow:auto; padding:12px; white-space:pre-wrap; overflow-wrap:anywhere; background:var(--theme-surface,#fff); color:var(--theme-text,#24334a); border:1px solid var(--theme-line,#d5deeb); border-radius:8px; box-shadow:0 8px 30px #0003; font-size:13px; line-height:1.6; }
.channel-people input[readonly] { border-color:transparent; background:transparent; box-shadow:none; cursor:text; }
.channel-people input:not([readonly]) { outline:2px solid var(--theme-blue,#2863df); }
.knowledge-page .knowledge-entries { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-height:550px){
 .live-table-page .live-summary { margin-bottom:5px; }
 .live-table-page .live-summary .kpi { padding:4px 8px; min-height:0; }
 .live-table-page .live-summary .kpi-note { display:none; }
 .live-table-page .live-summary .kpi-value { font-size:18px; line-height:1.2; margin:3px 0; }
 .live-table-page .live-composite > div { font-size:10px; margin:3px 0; }
 .live-table-page .live-composite b { font-size:16px; }
 .live-table-page .live-list-toolbar { flex-wrap:nowrap; padding:5px; align-items:center; }
 .live-table-page .live-filter-tabs { flex-wrap:nowrap; flex-basis:auto; max-height:32px; }
 .live-table-page .live-list-toolbar > .toolbar { padding:0; }
 .live-table-page #live-row-count { display:none; }
 .live-table-page .page-head input { width:150px; }
}
@media(max-height:550px){
 .live-table-page .live-table th { white-space:nowrap!important; padding:6px 5px!important; }
}
@media(max-width:760px){ .live-table { min-width:1020px!important; } }

.material-upload-list { display:grid; gap:8px; margin:10px 0; }
.material-upload-row { display:flex; gap:10px; align-items:center; justify-content:space-between; padding:10px; border:1px solid var(--theme-line,#e3e9f2); border-radius:6px; }
.material-upload-row > span { flex:1; min-width:0; overflow-wrap:anywhere; }
.material-image-preview { width:64px; height:64px; flex:none; object-fit:contain; border:1px solid var(--theme-line,#e3e9f2); border-radius:4px; background:var(--theme-surface,#fff); }
.material-upload-row b,.material-upload-row small { display:block; }
.material-upload-row small { margin-top:4px; color:var(--theme-muted,#8490a3); }
.material-upload-row button { flex:none; }
.viewport-app dialog.recruitment-month-dialog { width:min(980px,calc(100vw - 24px)); }
.task-review-dialog .issue-actions { flex-wrap:wrap; }
.task-review-dialog section { max-height:45vh; overflow:auto; }

/* The chosen-file list is authoritative when selections are accumulated. */
#material-files { color:transparent; }
#material-files::file-selector-button { color:var(--theme-text,#24334a); }
.item-detail-dialog .issue-actions { bottom:0; padding-bottom:12px; }

/* Operators edit directly inside the four channel metric boxes. */
.recruitment-page .channel-summary .funnel-step { min-width:0; }
.recruitment-page [data-edit-metric] { cursor:text; }
.recruitment-page [data-edit-metric] input { display:block; width:100%; min-width:0; box-sizing:border-box; margin-top:5px; padding:4px 1px; border:1px solid transparent; background:transparent; color:var(--ink); font-size:18px; font-weight:600; text-align:center; appearance:textfield; }
.recruitment-page [data-edit-metric] input::-webkit-inner-spin-button,.recruitment-page [data-edit-metric] input::-webkit-outer-spin-button { appearance:none; margin:0; }
.recruitment-page [data-edit-metric] input:not([readonly]) { background:var(--surface); border-color:var(--blue); border-radius:5px; outline:2px solid var(--blue-soft); }
