/* =========================================================================
   教育数据工作台（合并页）统一样式
   - kanban 组件复用 /kanban/styles.css（已 Ant 化）
   - 本文件：统一外壳（顶栏 + 顶部横向导航 + 页签）+ school 组件全面 Ant 化（限定 #platformView）
   ========================================================================= */
:root{
  --w-primary:#1677ff; --w-primary-hover:#4096ff; --w-primary-active:#0958d9; --w-primary-bg:#e6f4ff;
  --w-success:#52c41a; --w-success-bg:#f6ffed; --w-success-border:#b7eb8f;
  --w-warning:#faad14; --w-warning-bg:#fffbe6; --w-warning-border:#ffe58f;
  --w-error:#ff4d4f; --w-error-bg:#fff2f0; --w-error-border:#ffccc7;
  --w-text:rgba(0,0,0,.88); --w-text-2:rgba(0,0,0,.65); --w-text-3:rgba(0,0,0,.45); --w-text-4:rgba(0,0,0,.25);
  --w-border:#f0f0f0; --w-border-2:#d9d9d9; --w-split:rgba(5,5,5,.06);
  --w-bg-layout:#f5f5f5; --w-bg:#fff; --w-fill-1:rgba(0,0,0,.02); --w-fill-2:rgba(0,0,0,.04);
  --w-radius:6px; --w-radius-lg:8px;
  --w-shadow:0 1px 2px rgba(0,0,0,.03),0 1px 6px -1px rgba(0,0,0,.02),0 2px 4px rgba(0,0,0,.02);
  --w-shadow-up:0 6px 16px 0 rgba(0,0,0,.08),0 3px 6px -4px rgba(0,0,0,.12),0 9px 28px 8px rgba(0,0,0,.05);
}
.ws-body{background:var(--w-bg-layout);margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color:var(--w-text);}

/* ---------- 顶栏（复用 kanban header，做轻量统一）---------- */
.ws-body .dashboard-header.dashboard-topbar{
  position:sticky;top:0;z-index:100;margin:0;border-radius:0;
  background:var(--w-bg);border-bottom:1px solid var(--w-split);box-shadow:none;
  padding:8px 24px;
}
.ws-body .dashboard-title{font-size:16px;}
.ws-body .page-version-inline,.ws-body .debug-bar{display:none;} /* 合并页隐藏调试版本条 */

/* ---------- 顶部横向一级导航 ---------- */
.ws-nav{
  position:sticky;top:57px;z-index:99;display:flex;align-items:stretch;gap:2px;
  /* padding 8px：8 + 导航项内距 16 = 24，使导航文字左缘与顶栏品牌、内容卡片对齐到同一 24px 栏沟 */
  height:46px;padding:0 8px;background:var(--w-bg);
  border-bottom:1px solid var(--w-split);
}
.ws-nav-item{
  position:relative;display:flex;align-items:center;padding:0 16px;border:0;background:none;
  font-size:14px;color:var(--w-text-2);white-space:nowrap;cursor:pointer;
}
.ws-nav-item:hover{color:var(--w-primary);}
.ws-nav-item.active{color:var(--w-primary);font-weight:600;}
.ws-nav-item.active::after{content:"";position:absolute;left:16px;right:16px;bottom:-1px;height:2px;background:var(--w-primary);border-radius:2px;}
.ws-nav-div{align-self:center;width:1px;height:18px;background:var(--w-split);margin:0 8px;}
.ws-nav-grow{flex:1;}
.ws-nav-admin{display:inline-flex;align-items:center;gap:2px;padding-left:8px;border-left:1px solid var(--w-split);}
.ws-nav-admin .ws-nav-item{color:var(--w-text-3);}

/* ---------- 内容容器与页面切换 ---------- */
.ws-main{padding:16px 24px 40px;}
.ws-page{display:none;}
.ws-page.active{display:block;animation:wsFade .18s ease;}
@keyframes wsFade{from{opacity:0;transform:translateY(2px)}to{opacity:1;transform:none}}
.ws-school-topbar-hidden{display:none;} /* 保留 school 顶栏 id 供 platform.js，但不展示 */

/* kanban 二级 Tab */
/* 二级视图切换：Spectrum 风格分段控件（与一级下划线 Tab 形成清晰层级，避免两排相同的 Tab 栈叠）*/
.ws-subtabs{display:inline-flex;gap:2px;padding:3px;margin:2px 0 16px;background:var(--w-fill-2);border-radius:8px;vertical-align:middle;}
.ws-subtabs button{position:static;height:30px;padding:0 14px;border:0;border-radius:6px;background:transparent;font-size:14px;color:var(--w-text-2);cursor:pointer;transition:background .15s,color .15s;}
.ws-subtabs button:hover{color:var(--w-text);}
.ws-subtabs button.active{background:var(--w-bg);color:var(--w-primary);font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.08);}
.ws-subtabs button.active::after{display:none;}

/* kanban 页面在合并页里取消其自身外边距/卡片重复，交给 styles.css 处理；这里只确保全宽 */
.ws-page .kanban-page{min-width:0;}

/* 子账号启动卡 */
.ws-account-launch{padding:24px;background:var(--w-bg);border:1px solid var(--w-split);border-radius:var(--w-radius-lg);box-shadow:var(--w-shadow);}
.ws-account-launch p{margin:0 0 12px;color:var(--w-text-2);}

/* =========================================================================
   重点校（school）组件全面 Ant 化 —— 全部限定 #platformView，避免影响 kanban
   ========================================================================= */
#platformView{display:block;}
#platformView .panel{
  background:var(--w-bg);border:1px solid var(--w-split);border-radius:var(--w-radius-lg);
  box-shadow:var(--w-shadow);padding:16px 20px;margin-bottom:16px;
}
#platformView .panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;}
#platformView .panel-header.compact{margin-bottom:12px;}
#platformView .panel-header h2{font-size:16px;font-weight:600;margin:0;}
#platformView .panel-meta{font-size:13px;color:var(--w-text-3);}
#platformView .panel-header p{font-size:13px;color:var(--w-text-3);margin:2px 0 0;}

/* 概览四卡 */
#platformView .summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:16px;}
#platformView .summary-card{
  background:var(--w-bg);border:1px solid var(--w-split);border-radius:var(--w-radius-lg);
  box-shadow:var(--w-shadow);padding:18px 20px;display:flex;flex-direction:column;gap:8px;cursor:pointer;transition:.2s;
}
#platformView .summary-card:hover{border-color:#91caff;box-shadow:var(--w-shadow-up);}
#platformView .summary-card span{font-size:14px;color:var(--w-text-3);}
#platformView .summary-card strong{font-size:28px;font-weight:600;font-variant-numeric:tabular-nums;}
#platformView .summary-card.paid strong{color:var(--w-primary);}
#platformView .summary-card.trial strong{color:var(--w-success);}

/* 本周洞察 */
#platformView .weekly-insights-list{display:flex;flex-direction:column;gap:10px;}
#platformView .weekly-insights-list>*{
  padding:12px 16px;border:1px solid var(--w-split);border-radius:var(--w-radius);background:var(--w-fill-1);font-size:14px;
}

/* 工作区：左列表 + 右详情。minmax(0,..)+min-width:0 让宽表在列内横向滚动，不撑破页面（保持单页）*/
#platformView .workspace-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:16px;align-items:start;}
#platformView .workspace-grid>*{min-width:0;}
#platformView .school-search-actions{display:flex;align-items:center;gap:8px;}
#platformView .school-list-panel .table-wrap{overflow:auto;}
#platformView .detail-panel{min-width:0;overflow:hidden;}
#platformView .detail-panel .mini-table-wrap{overflow-x:auto;}

/* 状态分段（用 Ant segmented 观感） */
#platformView .tabs{display:inline-flex;gap:2px;padding:2px;background:var(--w-fill-2);border-radius:var(--w-radius);margin-bottom:12px;flex-wrap:wrap;}
#platformView .tabs .tab{
  height:28px;padding:0 14px;border:0;background:none;border-radius:4px;font-size:14px;color:var(--w-text-2);cursor:pointer;
}
#platformView .tabs .tab.active{background:var(--w-bg);color:var(--w-text);font-weight:500;box-shadow:0 1px 2px rgba(0,0,0,.06);}

/* drill-tabs / role-toggle 用下划线 Tab */
#platformView .drill-tabs,#platformView .role-toggle{display:flex;gap:0;border-bottom:1px solid var(--w-split);margin-bottom:12px;}
#platformView .drill-tabs .tab,#platformView .role-toggle .tab{
  position:relative;padding:8px 14px;border:0;background:none;font-size:14px;color:var(--w-text-2);cursor:pointer;
}
#platformView .drill-tabs .tab.active,#platformView .role-toggle .tab.active{color:var(--w-primary);font-weight:600;}
#platformView .drill-tabs .tab.active::after,#platformView .role-toggle .tab.active::after{
  content:"";position:absolute;left:14px;right:14px;bottom:-1px;height:2px;background:var(--w-primary);
}

/* 筛选条 */
#platformView .filter-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:12px;}
#platformView .filter-strip select,#platformView .filter-strip input,#platformView .search-input{
  height:32px;padding:0 11px;border:1px solid var(--w-border-2);border-radius:var(--w-radius);font-size:14px;background:var(--w-bg);color:var(--w-text);width:100%;
}
#platformView .filter-strip select{appearance:none;padding-right:28px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;}
#platformView .search-input:focus,#platformView .filter-strip select:focus,#platformView .filter-strip input:focus{
  outline:none;border-color:var(--w-primary);box-shadow:0 0 0 2px var(--w-primary-bg);}

/* 表格 */
#platformView .table-wrap{overflow:auto;border:1px solid var(--w-split);border-radius:var(--w-radius);max-height:62vh;}
#platformView table{border-collapse:collapse;width:100%;font-size:14px;}
#platformView thead th{
  position:sticky;top:0;z-index:2;background:#fafafa;color:var(--w-text-2);font-weight:600;text-align:left;
  padding:11px 14px;border-bottom:1px solid var(--w-split);white-space:nowrap;
}
#platformView tbody td{padding:11px 14px;border-bottom:1px solid var(--w-split);white-space:nowrap;}
#platformView tbody tr{cursor:pointer;transition:background .15s;}
#platformView tbody tr:hover{background:var(--w-primary-bg);}
#platformView tbody tr.selected{background:var(--w-primary-bg);}
#platformView .school-name-cell{font-weight:600;}

/* 详情面板 */
#platformView .detail-panel{position:sticky;top:120px;}
#platformView .empty-detail{padding:48px 16px;text-align:center;color:var(--w-text-3);}
#platformView .detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px;}
#platformView .detail-head h2{font-size:18px;margin:0;}
#platformView .detail-head p{font-size:13px;color:var(--w-text-3);margin:2px 0 0;}
#platformView .badge{display:inline-flex;align-items:center;height:22px;padding:0 8px;font-size:12px;border-radius:4px;
  background:var(--w-primary-bg);color:var(--w-primary);border:1px solid #91caff;}
#platformView .metric-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;background:var(--w-split);
  border:1px solid var(--w-split);border-radius:var(--w-radius);overflow:hidden;margin-bottom:14px;}
#platformView .metric-grid>*{background:var(--w-bg);padding:10px 14px;}
#platformView .mini-table-wrap{overflow:auto;}

/* 时间线（跟进/动态） */
#platformView .timeline{position:relative;padding-left:18px;}
#platformView .timeline::before{content:"";position:absolute;left:4px;top:4px;bottom:4px;width:2px;background:var(--w-split);}
#platformView .timeline>*{position:relative;padding:0 0 16px 14px;}
#platformView .timeline>*::before{content:"";position:absolute;left:-18px;top:5px;width:9px;height:9px;border-radius:50%;
  background:var(--w-primary);box-shadow:0 0 0 3px var(--w-primary-bg);}
#platformView .activity-editor textarea,#platformView textarea{
  width:100%;min-height:84px;padding:8px 11px;border:1px solid var(--w-border-2);border-radius:var(--w-radius);font:inherit;resize:vertical;}
#platformView textarea:focus{outline:none;border-color:var(--w-primary);box-shadow:0 0 0 2px var(--w-primary-bg);}
#platformView .activity-global-grid{margin-top:16px;}
#platformView .activity-subpanel{border-top:1px solid var(--w-split);padding-top:14px;}

/* 数据入口（上传） */
#platformView .upload-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
#platformView .upload-btn{
  display:inline-flex;align-items:center;height:32px;padding:0 15px;border-radius:var(--w-radius);
  background:var(--w-primary);color:#fff;font-size:14px;cursor:pointer;border:1px solid var(--w-primary);
}
#platformView .upload-btn:hover{background:var(--w-primary-hover);border-color:var(--w-primary-hover);}
#platformView .upload-btn.secondary-upload{background:var(--w-bg);color:var(--w-text);border-color:var(--w-border-2);}
#platformView .upload-btn.secondary-upload:hover{color:var(--w-primary);border-color:var(--w-primary);}
#platformView .data-entry-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px;}
#platformView .entry-column-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px;}
#platformView .entry-column-head h3{font-size:15px;margin:0;}
#platformView .entry-column-head span{font-size:12px;color:var(--w-text-3);}
#platformView .import-list>*{padding:8px 0;border-bottom:1px solid var(--w-split);font-size:13px;}

/* 通用按钮（school） */
#platformView .ghost-btn{
  height:32px;padding:0 15px;border-radius:var(--w-radius);border:1px solid var(--w-border-2);
  background:var(--w-bg);color:var(--w-text);font-size:14px;cursor:pointer;
}
#platformView .ghost-btn:hover{color:var(--w-primary);border-color:var(--w-primary);}
#platformView .primary-btn{
  height:32px;padding:0 15px;border-radius:var(--w-radius);border:1px solid var(--w-primary);
  background:var(--w-primary);color:#fff;font-size:14px;cursor:pointer;
}
#platformView .primary-btn:hover{background:var(--w-primary-hover);border-color:var(--w-primary-hover);}

/* 弹窗：合并页 DOM 巨大，backdrop-filter:blur 会让整页背景实时高斯模糊 → 打开账号权限面板时极卡。
   改用纯色遮罩，零 GPU 模糊开销。 */
.ws-body .modal-shell{backdrop-filter:none;background:rgba(15,23,42,.45);}

/* ===== 学校看板列表紧凑化：小字号紧间距，尽量单页内展示（#3）===== */
/* 右栏详情定宽 320px，把宽度让给左侧列表 */
#platformView .workspace-grid{grid-template-columns:minmax(0,1fr) 320px;}
#platformView .school-list-panel{padding:12px 14px;}
#platformView .school-list-panel table{font-size:12px;}
#platformView .school-list-panel thead th{padding:8px 6px;font-size:11px;white-space:normal;line-height:1.3;}
#platformView .school-list-panel tbody td{padding:7px 6px;}

/* table-layout:fixed + 按列定宽：消除 auto 布局按 487 行最长内容撑宽城市/区县造成的“空隙列”。
   学校列吃剩余宽度、单行省略（按钮自带 title 悬停看全名）。 */
#platformView .school-board-table{table-layout:fixed;width:100%;min-width:960px;}
#platformView .school-board-table th.owner-col{width:56px;}
#platformView .school-board-table th.city-col{width:74px;}
#platformView .school-board-table th.district-col{width:86px;}
#platformView .school-board-table th.status-col{width:66px;}
#platformView .school-board-table th.charge-grade-col{width:88px;}
#platformView .school-board-table th.grade-count-col{width:46px;}
#platformView .school-board-table th.class-count-col{width:50px;}
#platformView .school-board-table th.student-col{width:64px;}
#platformView .school-board-table th.paid-col{width:68px;}
#platformView .school-board-table th.trial-col{width:68px;}
#platformView .school-board-table th.pay-rate-col{width:58px;}
#platformView .school-board-table th.change-col{width:88px;}
#platformView .school-board-table th.week-change-col{width:110px;}
#platformView .school-board-table th.action-col{width:96px;}
#platformView .school-board-table th.favorite-col{width:38px;}
#platformView .school-board-table th.follow-time-col{width:96px;}
#platformView .school-board-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#platformView .school-board-table td.follow-time-cell{white-space:normal;font-size:11px;line-height:1.3;}
#platformView .school-board-table td.action-cell{overflow:visible;}
#platformView .school-list-panel .school-button{border:0;background:none;padding:0;cursor:pointer;
  color:var(--w-primary);font-size:12px;font-weight:600;text-align:left;
  display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4;}
#platformView .school-list-panel .school-button:hover{text-decoration:underline;}
#platformView .school-list-panel .mini-action-btn{font-size:11px;padding:2px 6px;border:1px solid var(--w-border-2);
  border-radius:4px;background:var(--w-bg);color:var(--w-text-2);cursor:pointer;}
#platformView .school-list-panel .mini-action-btn:hover{color:var(--w-primary);border-color:var(--w-primary);}
#platformView .school-list-panel .filter-strip select,
#platformView .school-list-panel .filter-strip input{height:30px;font-size:12px;}
#platformView .school-list-panel .tabs .tab{height:26px;padding:0 10px;font-size:13px;}

/* ===== #5 单校概览（详情面板）信息密度压缩：小字号、紧间距，尽量免横向滚动 ===== */
#platformView .detail-panel{padding:12px 14px;font-size:13px;}
#platformView .detail-head h2{font-size:15px;}
#platformView .detail-head p{font-size:12px;}
#platformView .badge{height:20px;font-size:11px;padding:0 6px;}
#platformView .metric-grid>*{padding:7px 10px;}
#platformView .metric-grid{font-size:12px;margin-bottom:10px;}
#platformView .detail-panel table{font-size:12px;}
#platformView .detail-panel thead th{padding:7px 8px;font-size:11px;}
#platformView .detail-panel tbody td{padding:7px 8px;}
#platformView .detail-panel .drill-tabs .tab{padding:6px 10px;font-size:13px;}
#platformView .detail-panel h3,#platformView .detail-panel h4{font-size:13px;margin:8px 0 6px;}
#platformView .detail-panel .timeline-item{font-size:12px;}

/* ===== #4.1 单校概览标题：防溢出（小字号 + 允许换行）===== */
.detail-panel .detail-head{flex-wrap:wrap;}
.detail-panel #detailName{font-size:14px;line-height:1.3;word-break:break-all;max-width:100%;}
.detail-panel #detailMeta{font-size:12px;word-break:break-all;}
.detail-panel #detailStatus{flex:0 0 auto;}

/* ===== #4.2 / #4.3 年级/班级对比表：压缩 + 冻结左列（横向滚动时保持）=====
   作用域用 类/ID（非 #platformView），使看板与跟进动态抽屉内的详情都生效。 */
.grade-comparison-table, #classTable{font-size:11px;border-collapse:separate;border-spacing:0;width:100%;}
.grade-comparison-table th, #classTable th{padding:5px 6px;font-size:11px;white-space:nowrap;background:#fafafa;color:var(--w-text-2);}
.grade-comparison-table td, #classTable td{padding:5px 6px;white-space:nowrap;background:#fff;}
.grade-comparison-table thead th, #classTable thead th{position:sticky;top:0;z-index:3;}

/* 年级列冻结（两表第一列）*/
.grade-comparison-table .grade-col, .grade-comparison-table tbody td:first-child,
#classTable .grade-col, #classTable tbody td:first-child{
  position:sticky;left:0;z-index:2;width:42px;min-width:42px;max-width:42px;
  box-shadow:1px 0 0 rgba(15,23,42,.10);
}
.grade-comparison-table thead .grade-col, #classTable thead .grade-col{z-index:4;}

/* 班级表：老师列也冻结（第二列，left = 年级列宽 42px）*/
#classTable .teacher-col, #classTable tbody td:nth-child(2){
  position:sticky;left:42px;z-index:2;width:54px;min-width:54px;max-width:54px;
  overflow:hidden;text-overflow:ellipsis;box-shadow:1px 0 0 rgba(15,23,42,.10);
}
#classTable thead .teacher-col{z-index:4;}

/* ===== #5 零布置试用校：感叹号红徽标 + 学校定义框标红，直观预警 =====
   .zero-assignment-flag 的红色样式原在 platform.css（合并页不加载）→ 这里补回。 */
.zero-assignment-flag{
  display:inline-grid;place-items:center;width:15px;height:15px;border-radius:999px;
  background:var(--w-error);color:#fff;font-size:10px;line-height:1;font-weight:900;margin-left:4px;
}
#platformView .status-cell .badge:has(.zero-assignment-flag){
  background:var(--w-error-bg);color:#cf1322;border:1px solid var(--w-error-border);
}
#platformView .school-board-table tr:has(.zero-assignment-flag) .school-button{color:#cf1322;}

/* ===== #6a 跟进动态：按日分组卡片（Ant 活动流样式）===== */
.ws-day-group{background:var(--w-bg);border:1px solid var(--w-split);border-radius:var(--w-radius-lg);
  box-shadow:var(--w-shadow);margin-bottom:14px;overflow:hidden;}
.ws-day-head{display:flex;align-items:baseline;gap:10px;padding:10px 16px;
  background:var(--w-fill-1);border-bottom:1px solid var(--w-split);}
.ws-day-date{font-size:14px;font-weight:600;}
.ws-day-count{font-size:12px;color:var(--w-text-3);}
.ws-day-body{padding:4px 16px;}
.ws-day-body .timeline-item{padding:10px 0;border-bottom:1px solid var(--w-split);}
.ws-day-body .timeline-item:last-child{border-bottom:none;}
.ws-day-body .timeline-item strong{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-weight:500;}
.ws-day-body .timeline-date{font-size:12px;color:var(--w-text-3);}
.ws-day-body .timeline-school-link{border:0;background:none;padding:0;cursor:pointer;
  color:var(--w-primary);font-size:14px;font-weight:600;}
.ws-day-body .timeline-school-link:hover{color:var(--w-primary-hover);text-decoration:underline;}
.ws-day-body .timeline-owner{font-size:12px;color:var(--w-text-3);background:var(--w-fill-2);
  border-radius:4px;padding:0 6px;line-height:18px;}
.ws-day-body .timeline-item>div{margin-top:4px;color:var(--w-text-2);font-size:13px;}
#globalProgressTimeline{padding-left:0;}
#globalProgressTimeline::before{display:none;}
#globalProgressTimeline .ws-day-group::before,
#globalProgressTimeline .timeline-item::before{display:none;}

/* ===== #6b 右侧详情抽屉（承载既有 .detail-panel 节点）===== */
.ws-drawer-mask{position:fixed;inset:0;background:rgba(15,23,42,.45);opacity:0;visibility:hidden;
  transition:.2s;z-index:240;}
.ws-drawer-mask.open{opacity:1;visibility:visible;}
.ws-drawer{position:fixed;top:0;right:0;height:100%;width:640px;max-width:94vw;background:var(--w-bg);
  box-shadow:var(--w-shadow-up);transform:translateX(100%);transition:transform .25s cubic-bezier(.7,.3,.1,1);
  z-index:241;display:flex;flex-direction:column;}
.ws-drawer.open{transform:none;}
.ws-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 20px;border-bottom:1px solid var(--w-split);font-size:15px;}
.ws-drawer-close{width:30px;height:30px;border:0;background:none;border-radius:var(--w-radius);
  color:var(--w-text-3);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.ws-drawer-close:hover{background:var(--w-fill-2);color:var(--w-text);}
.ws-drawer-body{flex:1;overflow:auto;padding:16px 20px;}
.ws-drawer-body .detail-panel{position:static;box-shadow:none;border:0;padding:0;margin:0;}

/* toast */
.ws-body .toast{
  position:fixed;left:50%;bottom:32px;transform:translateX(-50%);z-index:300;
  padding:10px 16px;border-radius:var(--w-radius);background:rgba(0,0,0,.85);color:#fff;font-size:14px;box-shadow:var(--w-shadow-up);
}

/* 子账号通用按钮（kanban accountPanel 复用 styles.css，已 Ant；此处不重复） */

@media(max-width:1280px){
  #platformView .summary-grid{grid-template-columns:repeat(2,1fr);}
  #platformView .workspace-grid{grid-template-columns:1fr;}
  #platformView .filter-strip{grid-template-columns:repeat(3,minmax(0,1fr));}
  #platformView .detail-panel{position:static;}
}

/* =========================================================================
   Spectrum 设计语言统一调整（合并页全局，scoped 到 .ws-body，不影响独立 /kanban /school）
   ========================================================================= */

/* 1) 去除装饰性 emoji 图标：Spectrum 用统一图标系统，emoji 跨平台渲染不一致、不符合语言。
   仅隐藏装饰图标（标签/区块标题/按钮前缀/指标卡），保留功能性符号（收藏★、零布置!徽标）。 */
.ws-body .label-icon,
.ws-body .section-icon,
.ws-body .btn-icon,
.ws-body .metric-icon{display:none;}
.ws-body .section-title{gap:0;}
.ws-body .filter-label{gap:0;}

/* 2) 导出按钮去强饱和绿，改 Spectrum 中性次要按钮（强调色只保留蓝） */
.ws-body .btn-export{
  background:var(--w-bg)!important;color:var(--w-text)!important;
  border:1px solid var(--w-border-2)!important;box-shadow:none!important;
  background-image:none!important;
}
.ws-body .btn-export:hover{color:var(--w-primary)!important;border-color:var(--w-primary)!important;}

/* 3) 收敛圆角到 Spectrum 刻度（卡片/控件更克制） */
.ws-body .filter-select,
.ws-body .search-input,
.ws-body .input,
.ws-body .multi-select-trigger,
.ws-body .searchable-select-input{border-radius:6px;}
.ws-body .btn{border-radius:6px;}

/* 4) 模式切换/条件按钮（条件筛选/快速搜索）统一为 Spectrum 分段控件观感 */
.ws-body .search-mode-toggle{background:var(--w-fill-2);border:0;padding:3px;border-radius:8px;}
.ws-body .mode-btn{border-radius:6px;height:30px;}
.ws-body .mode-btn.active{background:var(--w-bg);color:var(--w-primary);box-shadow:0 1px 2px rgba(0,0,0,.08);}

/* 5) 顶栏品牌字重/字号与状态条更克制 */
.ws-body .dashboard-title{font-weight:600;letter-spacing:0;}

/* 6) 一级导航 hover 用淡底（Spectrum quiet tab 观感），选中下划线对齐文字 */
.ws-nav-item{border-radius:6px 6px 0 0;}
.ws-nav-item:hover{background:var(--w-fill-1);}

/* =========================================================================
   手机端适配（React Spectrum 移动范式）—— 全部 @media 门控，桌面零影响
   窄屏 TableView 横向滚动+冻结首列 · Tray 底部抽屉 · 可横向滚动 Tab 条 · ≥44px 触控 · 单列堆叠
   kanban 组件（.filter-grid/.topbar-* 等）由 /kanban/styles.css 自带 768 断点处理；
   本段负责合并页外壳、#platformView、结果表冻结首列、抽屉转 Tray、弹窗全屏。
   ========================================================================= */
@media (max-width:768px){
  /* ---- App 式头部：精简标题栏吸顶；同步状态收成可横滑的胶囊条 ---- */
  .ws-body .dashboard-header.dashboard-topbar{position:sticky;top:0;padding:10px 16px 8px;}
  .ws-body .topbar-main{display:flex;flex-direction:column;align-items:stretch;gap:8px;}
  .ws-body .dashboard-title{font-size:17px;}
  .ws-body .topbar-actions,.ws-body .topbar-actions-compact{
    display:flex;flex-wrap:nowrap;align-items:center;gap:6px;width:100%;
    overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px;
  }
  .ws-body .topbar-actions::-webkit-scrollbar{display:none;}
  .ws-body .topbar-statuses{display:flex;flex-wrap:nowrap;gap:6px;width:auto;}
  .ws-body .status-strip-item{
    flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:5px 10px;
    background:var(--w-fill-1);border:1px solid var(--w-split);border-radius:999px;white-space:nowrap;
  }
  .ws-body .status-strip-item span{font-size:11px;color:var(--w-text-3);}
  .ws-body .status-strip-item strong{font-size:11px;}
  .ws-body .topbar-login-actions{flex:0 0 auto;display:inline-flex;gap:6px;width:auto;}
  .ws-body .kanban-auth-btn{flex:0 0 auto;min-height:30px;border-radius:999px;}
  /* 桌面 flex-end + overflow 会把首个胶囊裁出可滚动区左侧 → 移动端强制左对齐 */
  .ws-body .topbar-actions,.ws-body .topbar-actions-compact,.ws-body .topbar-statuses{justify-content:flex-start;}

  /* ---- 防字体溢出（#修复）：按钮/页签一律禁逐字断行；过窄容器改横滑 ---- */
  .ws-body .btn,.ws-body .mode-btn,.ws-body .tab,.ws-body .ghost-btn,.ws-body .primary-btn,
  .ws-body .upload-btn,.ws-body .kanban-auth-btn,.ws-body .mini-action-btn,
  .ws-body .collapse-toggle-btn,.ws-body .trend-toggle-btn,.ws-body .ws-subtabs button,
  .ws-body .filter-label,.ws-body .section-title{white-space:nowrap;}
  /* 条件筛选/快速搜索：分段控件独占整行、两段等分（修复被“展开”按钮挤成竖排逐字换行） */
  .ws-body .filter-toolbar-header{display:flex;flex-wrap:wrap;gap:8px;}
  .ws-body .search-mode-toggle{display:flex;width:100%;}
  .ws-body .search-mode-toggle .mode-btn{flex:1;min-width:0;justify-content:center;}
  /* 自定义重点校页签/状态页签/钻取页签：容器横滑不挤压 */
  .ws-body .custom-school-tabs,#platformView .tabs,#platformView .drill-tabs,#platformView .role-toggle{
    flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;max-width:100%;
  }
  .ws-body .custom-school-tabs::-webkit-scrollbar,#platformView .tabs::-webkit-scrollbar,
  #platformView .drill-tabs::-webkit-scrollbar{display:none;}
  #platformView .tabs .tab,#platformView .drill-tabs .tab,#platformView .role-toggle .tab{flex:0 0 auto;}
  /* 区块头：标题与按钮挤不下时换行而非逐字断行 */
  .ws-body .section-header{flex-wrap:wrap;gap:8px;}

  /* ---- 一级导航 → 底部 Tab 栏（App 范式：图标 + 短标签，毛玻璃，安全区适配）---- */
  .ws-nav{
    position:fixed;top:auto;bottom:0;left:0;right:0;z-index:210;height:auto;
    display:flex;align-items:stretch;gap:0;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));
    background:rgba(255,255,255,.95);
    -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
    border-top:1px solid var(--w-split);border-bottom:0;
    box-shadow:0 -2px 10px rgba(0,0,0,.04);
  }
  .ws-nav-div,.ws-nav-grow{display:none;}
  .ws-nav-admin{display:contents;}
  .ws-nav-admin[hidden]{display:none;}
  .ws-nav-item{
    flex:1 1 0;flex-direction:column;justify-content:center;align-items:center;gap:3px;
    min-height:50px;padding:4px 2px;font-size:0;color:var(--w-text-3);
    border-radius:10px;transition:color .15s;
  }
  .ws-nav-item:hover{background:none;}
  .ws-nav-item.active{color:var(--w-primary);background:none;font-weight:600;}
  /* 图标：currentColor + mask，激活自动变主色 */
  .ws-nav-item::before{
    content:"";width:22px;height:22px;background:currentColor;
    -webkit-mask:var(--ws-icon) center/contain no-repeat;mask:var(--ws-icon) center/contain no-repeat;
  }
  /* 短标签（data-short 由 workspace.js 标注）；同时覆盖桌面 active 下划线样式 */
  .ws-nav-item::after,.ws-nav-item.active::after{
    content:attr(data-short);position:static;left:auto;right:auto;bottom:auto;
    height:auto;background:none;border-radius:0;font-size:10px;line-height:1;
  }
  .ws-nav-item[data-page="ws-filter"]{--ws-icon:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16l-6 7v5l-4 3v-8L4 5z"/></svg>');}
  .ws-nav-item[data-page="ws-highvalue"]{--ws-icon:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3l2.7 5.8 6.3.7-4.7 4.3 1.3 6.2-5.6-3.2-5.6 3.2 1.3-6.2L3 9.5l6.3-.7L12 3z"/></svg>');}
  .ws-nav-item[data-page="ws-board"]{--ws-icon:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="7" height="7" rx="1"/><rect x="13" y="4" width="7" height="7" rx="1"/><rect x="4" y="13" width="7" height="7" rx="1"/><rect x="13" y="13" width="7" height="7" rx="1"/></svg>');}
  .ws-nav-item[data-page="ws-follow"]{--ws-icon:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12h4l3-7 4 14 3-7h4"/></svg>');}
  .ws-nav-item[data-page="ws-import"]{--ws-icon:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16V5M7 9l5-5 5 5M5 19h14"/></svg>');}
  .ws-nav-item[data-page="ws-account"]{--ws-icon:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="4"/><path d="M4 20c1.5-3.5 4.5-5 8-5s6.5 1.5 8 5"/></svg>');}

  /* 内容区为底部 Tab 栏让位 */
  .ws-main{padding:12px 12px calc(78px + env(safe-area-inset-bottom,0px));}

  /* 二级分段控件占满宽，每段等分 */
  .ws-subtabs{display:flex;width:100%;margin:2px 0 12px;}
  .ws-subtabs button{flex:1;padding:0 8px;}

  /* ---- 结果表：横向滚动 + 冻结首列（保留全部列，列宽逐字不变）---- */
  /* 滚动容器：右缘内阴影常驻，作为“可右滑查看更多列”的提示 affordance（is-scrollable-x 由 JS 标记）*/
  .ws-body .table-wrap,
  .ws-body .table-wrapper,
  .ws-body .high-value-table-wrapper,
  #platformView .school-list-panel .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .ws-body .is-scrollable-x{box-shadow:inset -13px 0 9px -9px rgba(0,0,0,.16);}

  /* 通用结果表（kanban 明细/高价值/收藏/自定义）冻结首列 */
  .ws-body .data-table thead th:first-child,
  .ws-body .hv-data-table thead th:first-child{
    position:sticky;left:0;z-index:11;background:#f4f6fb;
    box-shadow:1px 0 0 var(--w-split);
  }
  .ws-body .data-table tbody td:first-child,
  .ws-body .hv-data-table tbody td:first-child{
    position:sticky;left:0;z-index:1;background:#fff;
    box-shadow:1px 0 0 var(--w-split);
  }
  .ws-body .data-table tbody tr:hover td:first-child,
  .ws-body .hv-data-table tbody tr:hover td:first-child{background:#f5f8ff;}

  /* 看板宽表（首列＝负责人 owner-col 56px）冻结 */
  #platformView .school-board-table thead th:first-child{
    position:sticky;left:0;z-index:5;background:#fafafa;box-shadow:1px 0 0 var(--w-split);
  }
  #platformView .school-board-table tbody td:first-child{
    position:sticky;left:0;z-index:1;background:#fff;box-shadow:1px 0 0 var(--w-split);
  }
  #platformView .school-board-table tbody tr:hover td:first-child,
  #platformView .school-board-table tbody tr.selected td:first-child{background:var(--w-primary-bg);}

  /* 分页换行居中、触控尺寸 */
  .ws-body .pagination-wrapper{flex-wrap:wrap;justify-content:center;gap:8px;padding:12px;}
  .ws-body .pagination-btn{min-height:36px;}
  .ws-body .pagination-jump input{min-height:36px;}

  /* ---- 列表结果 → 卡片流（App 列表观感）----
     workspace.js 读取表头给每格标 data-label 并加 .ws-cardify；这里把行重排成卡片。
     字段一个不少（仅换排版），矩阵对比表（年级/班级周对比、单校明细弹窗）不卡片化、保留横滑。 */
  .ws-body table.ws-cardify{display:block;width:100%;min-width:0!important;border:0;}
  .ws-body .ws-cardify thead{display:none;}
  .ws-body .ws-cardify tbody{display:flex;flex-direction:column;gap:10px;}
  .ws-body .ws-cardify tbody tr{
    position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 12px;
    padding:12px 14px;background:#fff;border:1px solid var(--w-split);border-radius:12px;box-shadow:var(--w-shadow);
  }
  .ws-body .ws-cardify tbody tr.selected{border-color:var(--w-primary);}
  .ws-body .ws-cardify tbody td{
    display:flex;flex-direction:column;gap:1px;padding:4px 0!important;border:0!important;
    position:static!important;width:auto!important;min-width:0!important;max-width:none!important;
    white-space:normal!important;overflow:visible!important;
    background:none!important;box-shadow:none!important;font-size:13px!important;line-height:1.4;
  }
  .ws-body .ws-cardify tbody td::before{content:attr(data-label);font-size:10px;color:var(--w-text-3);line-height:1.2;}
  /* 学校 = 卡片标题：整行置顶、大号、可换行（右侧给收藏星留位） */
  .ws-body .ws-cardify td[data-label="学校"],.ws-body .ws-cardify td.school-name-cell{
    grid-column:1/-1;order:-10;padding:0 26px 2px 0!important;font-size:15px!important;font-weight:600;
  }
  .ws-body .ws-cardify td[data-label="学校"]::before,.ws-body .ws-cardify td.school-name-cell::before{display:none;}
  /* !important：压过桌面 #platformView .school-list-panel .school-button 的 12px/单行省略 */
  .ws-body .ws-cardify td.school-name-cell .school-button{
    font-size:15px!important;white-space:normal!important;overflow:visible!important;
    text-overflow:clip!important;line-height:1.35!important;
  }
  /* 学校定义徽标紧贴标题下 */
  .ws-body .ws-cardify td.status-cell,.ws-body .ws-cardify td[data-label="学校定义"]{
    grid-column:1/-1;order:-9;flex-direction:row;padding:0 0 4px!important;
  }
  .ws-body .ws-cardify td.status-cell::before,.ws-body .ws-cardify td[data-label="学校定义"]::before{display:none;}
  /* 操作按钮 → 卡片底部整行触控按钮 */
  .ws-body .ws-cardify td.action-cell{grid-column:1/-1;order:10;flex-direction:row;gap:8px;padding:6px 0 0!important;}
  .ws-body .ws-cardify td.action-cell::before{display:none;}
  .ws-body .ws-cardify .mini-action-btn{flex:1;min-height:34px;font-size:13px;border-radius:8px;}
  /* 收藏星固定卡片右上角 */
  .ws-body .ws-cardify td.favorite-cell,.ws-body .ws-cardify td[data-label="收藏"]{
    position:absolute!important;top:10px;right:12px;padding:0!important;
  }
  .ws-body .ws-cardify td.favorite-cell::before,.ws-body .ws-cardify td[data-label="收藏"]::before{display:none;}
  .ws-body .ws-cardify .favorite-btn{font-size:18px;border:0;background:none;padding:2px;}
  /* 跟进时间整行 */
  .ws-body .ws-cardify td.follow-time-cell{grid-column:1/-1;}
  /* 容器卸壳：卡片流直接铺在页面上，不再是带边框的滚动表壳 */
  .ws-body .table-wrapper:has(.ws-cardify),
  .ws-body .high-value-table-wrapper:has(.ws-cardify),
  #platformView .table-wrap:has(.ws-cardify){
    overflow:visible;border:0;box-shadow:none;background:transparent;max-height:none;
  }
  .ws-body .is-scrollable-x:has(.ws-cardify){box-shadow:none;}

  /* ---- 卡片 / 栅格堆叠 ---- */
  #platformView .summary-grid{grid-template-columns:repeat(2,1fr);gap:10px;}
  #platformView .summary-card{padding:12px 14px;}
  #platformView .summary-card strong{font-size:22px;}
  #platformView .filter-strip{grid-template-columns:1fr;}
  #platformView .data-entry-grid{grid-template-columns:1fr;}
  .ws-body .metrics-grid{grid-template-columns:1fr;}
  .ws-body .high-value-filters .filter-row{grid-template-columns:1fr;}
  .ws-body .custom-school-filter-grid{grid-template-columns:1fr;}
  .ws-body .search-mode-grid{grid-template-columns:1fr;}
  .ws-body .chart-container{width:100%;min-height:260px;}

  /* ---- App 化质感：面板大圆角、主操作全宽触控 ---- */
  #platformView .panel{border-radius:14px;padding:14px;}
  #platformView .summary-card{border-radius:14px;}
  .ws-body .filter-section,.ws-body .table-section,.ws-body .metrics-section,
  .ws-body .charts-section,.ws-body .high-value-section,.ws-body .custom-school-section{border-radius:14px;}
  .ws-body .filter-actions-bar{display:flex;flex-wrap:wrap;gap:8px;}
  .ws-body .filter-actions-bar .btn{flex:1 1 40%;min-height:40px;}
  .ws-body .filter-actions-bar .filter-status{flex-basis:100%;}
  .ws-body .filter-actions .btn{min-height:40px;}
  .ws-body .custom-school-actions .btn{flex:1;min-height:40px;}

  /* 收起/展开按钮在移动端做成整宽“筛选”summon 按钮（复用既有 collapse 机制）*/
  .ws-body .filter-toolbar-header .collapse-toggle-btn,
  .ws-body .section-header .collapse-toggle-btn{width:100%;min-height:40px;justify-content:center;}

  /* ---- 单校详情抽屉 → 底部上拉 Tray（Spectrum Tray）---- */
  /* 看板内联详情面板在移动端隐藏（详情改由 Tray 承载）；抽屉内副本在 #platformView 之外，不受此规则影响 */
  #platformView .detail-panel{display:none;}
  .ws-drawer{
    top:auto;bottom:0;left:0;right:0;width:100%;max-width:100%;height:auto;max-height:90vh;
    border-radius:16px 16px 0 0;transform:translateY(100%);
  }
  .ws-drawer.open{transform:none;}
  /* 顶部抓手条 */
  .ws-drawer::before{content:"";position:absolute;top:6px;left:50%;transform:translateX(-50%);
    width:36px;height:4px;border-radius:2px;background:var(--w-border-2);}
  .ws-drawer-head{padding-top:16px;}

  /* ---- 弹窗全屏化（账号权限 / 单校明细）---- */
  .ws-body .modal-card{width:100%;height:100%;max-width:none;max-height:none;border-radius:0;}
  .ws-body .account-layout{grid-template-columns:1fr;}
  .ws-body .school-detail-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
  .ws-body .school-detail-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;}
}

@media (max-width:480px){
  .ws-body .school-detail-metrics{grid-template-columns:1fr;}
  #platformView .summary-grid{gap:8px;}
}
