/* ============================================================
 * prototype.css  数据中心成绩监控 · 原型公共样式
 * 设计语言沿用管理后台：浅灰底 #F5F6FA + 白色圆角卡片 + 品牌蓝
 * ============================================================ */
:root{
  --brand:#3B6FD4; --brand-d:#3559A8; --brand-l:#F1F5FC;
  --ink:#1E293B; --ink2:#475569; --ink3:#64748B; --ink4:#9AA5B5;
  --line:#E8ECF1; --bg:#F4F6F9;
  --green:#4D8F6B; --amber:#B8813B; --red:#C06B6B; --purple:#7C71B8; --cyan:#4A90B8;
  --green-bg:#F2F7F4; --amber-bg:#FAF5EC; --red-bg:#F9F1F1; --purple-bg:#F4F3F9;
  --radius:12px;
  --shadow:0 1px 2px rgba(30,41,59,.04), 0 4px 14px rgba(30,41,59,.04);
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;
  background:var(--bg); color:var(--ink); font-size:14px; line-height:1.55;
}
.layout{display:flex; min-height:100vh;}
/* ---------- 侧边栏 ---------- */
/* 业务外壳使用 .sidebar.sidebar-admin/teacher/student（固定 240px，见 main.css）；
   此处只匹配原型独立页里不带业务修饰类的 .sidebar，避免覆盖业务布局造成内容右移空白 */
.sidebar:not(.sidebar-admin):not(.sidebar-teacher):not(.sidebar-student){
  width:232px; flex:0 0 232px; background:#1E293B; color:#CBD5E1;
  display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow:hidden;
}
.sb-brand{display:flex; align-items:center; gap:10px; padding:18px 20px; color:#fff; font-weight:700; font-size:15px;}
.sb-brand .logo{width:30px;height:30px;border-radius:8px;background:linear-gradient(135deg,#3B82F6,#2563EB);display:flex;align-items:center;justify-content:center;}
.sb-nav{flex:1; overflow-y:auto; padding:6px 12px 20px;}
.sb-group{font-size:11px; color:#64748B; letter-spacing:.08em; padding:14px 10px 6px;}
.sb-item{display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:9px; color:#CBD5E1; text-decoration:none; font-size:13.5px; margin-bottom:2px; cursor:pointer;}
.sb-item:hover{background:rgba(148,163,184,.12); color:#fff;}
.sb-item.active{background:var(--brand); color:#fff; box-shadow:0 2px 8px rgba(37,99,235,.35);}
.sb-item svg{width:17px;height:17px;flex:0 0 17px;}
.sb-sub{display:flex; align-items:center; gap:10px; padding:8px 12px 8px 38px; border-radius:9px; color:#94A3B8; text-decoration:none; font-size:13px; margin-bottom:2px; cursor:pointer;}
.sb-sub:hover{color:#fff; background:rgba(148,163,184,.1);}
.sb-sub.active{color:#fff; background:rgba(37,99,235,.22);}
/* ---------- 主区 ---------- */
.main{flex:1; min-width:0; display:flex; flex-direction:column;}
.topbar{
  height:60px; background:#fff; border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between; padding:0 26px; position:sticky; top:0; z-index:30;
}
.topbar .crumb{font-size:13px; color:var(--ink3);}
.topbar .crumb b{color:var(--ink); font-size:15px; font-weight:600; margin-left:8px;}
.topbar-right{display:flex; align-items:center; gap:14px; color:var(--ink3);}
.tb-role{display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink2);}
.avatar{width:32px;height:32px;border-radius:50%;background:#DBEAFE;color:#1D4ED8;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;}
.content{padding:22px 26px 40px;}
/* ---------- 页面头 ---------- */
.page-head{display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:18px; flex-wrap:wrap; gap:12px;}
.page-title{font-size:20px; font-weight:700; margin:0 0 4px;}
.page-desc{font-size:13px; color:var(--ink3); margin:0;}
/* ---------- 卡片 ---------- */
.card{background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); border:1px solid rgba(226,232,240,.7);}
.card-pad{padding:18px 20px;}
.card-head{display:flex; align-items:center; justify-content:space-between; padding:15px 20px 0;}
.card-title{font-size:14.5px; font-weight:650; color:var(--ink); display:flex; align-items:center; gap:8px;}
.card-sub{font-size:12px; color:var(--ink3); margin-top:2px;}
.card-body{padding:14px 20px 18px;}
/* ---------- 筛选条 ---------- */
.filter-bar{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.fg.grow{flex:1; min-width:180px;}
.fg.grow .input{flex:1; min-width:0;}
.filter-spacer{flex:1; min-width:12px;}
.filter-chip{display:flex; align-items:center; gap:6px; margin-left:auto; font-size:11.5px; color:#64748B;
  background:#F8FAFC; border:1px solid var(--line); border-radius:999px; padding:5px 12px; white-space:nowrap;}
.filter-chip b{color:var(--brand); font-weight:600;}
.fg{display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--ink3);}
.select,.input{
  height:34px; border:1px solid var(--line); border-radius:8px; padding:0 10px; font-size:13px;
  background:#fff; color:var(--ink2); outline:none; cursor:pointer;
}
.input{cursor:text; min-width:180px;}
.select:focus,.input:focus{border-color:var(--brand); box-shadow:0 0 0 3px rgba(37,99,235,.12);}
/* ---------- 按钮 ---------- */
.btn{display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 14px; border-radius:8px; font-size:13px; font-weight:600; border:1px solid transparent; cursor:pointer; text-decoration:none; white-space:nowrap;}
.btn-primary{background:var(--brand); color:#fff;}
.btn-primary:hover{background:var(--brand-d);}
.btn-outline{background:#fff; border-color:var(--line); color:var(--ink2);}
.btn-outline:hover{border-color:#CBD5E1; background:#F8FAFC;}
.btn-sm{height:28px; padding:0 10px; font-size:12px;}
/* ---------- segmented ---------- */
.seg{display:inline-flex; background:#F1F5F9; border-radius:9px; padding:3px; gap:2px;}
.seg-item{padding:5px 13px; font-size:12.5px; border-radius:7px; color:var(--ink3); cursor:pointer; font-weight:550; border:none; background:none;}
.seg-item.on{background:#fff; color:var(--brand); box-shadow:0 1px 3px rgba(15,23,42,.12);}
/* ---------- KPI ---------- */
.kpi-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:16px;}
.kpi-card{background:#fff;border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow);border:1px solid rgba(226,232,240,.7);display:flex;gap:12px;align-items:flex-start;}
.kpi-card .kpi-body{flex:1;min-width:0;}
.kpi-card .kpi-hint{font-size:11.5px;margin-top:7px;color:var(--ink3);}
.kpi-card .kpi-num{font-size:25px;font-weight:700;line-height:1.1;color:var(--ink);}
.kpi-card .kpi-unit{font-size:13px;font-weight:500;color:var(--ink3);margin-left:2px;}
.empty-inline{padding:26px 10px;text-align:center;color:var(--ink3);font-size:13px;}
.kpi-card .kpi-ico-em{font-size:18px;line-height:1;}
.kpi{background:#fff; border-radius:var(--radius); padding:16px 18px; box-shadow:var(--shadow); border:1px solid rgba(226,232,240,.7); display:flex; justify-content:space-between; gap:10px;}
.kpi-clickable{cursor:pointer; transition:border-color .15s, box-shadow .15s, transform .15s;}
.kpi-clickable:hover{border-color:#BFDBFE; box-shadow:0 6px 18px rgba(37,99,235,.12); transform:translateY(-2px);}
.kpi-label{font-size:12.5px; color:var(--ink3); margin-bottom:7px;}
.kpi-value{font-size:26px; font-weight:700; line-height:1.1; color:var(--ink);}
.kpi-unit{font-size:13px; font-weight:500; color:var(--ink3); margin-left:2px;}
.kpi-foot{font-size:11.5px; margin-top:7px; color:var(--ink3); display:flex; align-items:center; gap:4px;}
.kpi-ico{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:0 0 40px;}
.kpi-ico svg{width:20px;height:20px;}
.ico-blue{background:#EFF6FF;color:#2563EB;} .ico-green{background:#F0FDF4;color:#16A34A;}
.ico-amber{background:#FFFBEB;color:#D97706;} .ico-red{background:#FEF2F2;color:#DC2626;}
.ico-purple{background:#F5F3FF;color:#7C3AED;} .ico-cyan{background:#ECFEFF;color:#0284C7;}
/* ---------- 网格 ---------- */
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:16px;}
.grid-trend-band{display:grid; grid-template-columns:1.55fr 1fr; gap:14px; margin-bottom:16px; align-items:stretch;}
@media (max-width:980px){.grid-trend-band{grid-template-columns:1fr;}}
.grid-32{display:grid; grid-template-columns:3fr 2fr; gap:14px; margin-bottom:16px;}
.grid-23{display:grid; grid-template-columns:3fr 2fr; gap:14px; margin-bottom:16px;}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:16px;}
.grid-12{display:grid; grid-template-columns:1fr 2fr; gap:14px; margin-bottom:16px;}
/* ---------- 表格 ---------- */
.table-wrap{overflow-x:auto;}
.data-table{width:100%; border-collapse:collapse; font-size:13px;}
.data-table th{
  text-align:left; padding:10px 14px; background:#F8FAFC; color:var(--ink3);
  font-weight:600; font-size:12px; white-space:nowrap; border-bottom:1px solid var(--line);
}
.data-table td{padding:11px 14px; border-bottom:1px solid #F1F5F9; color:var(--ink2); white-space:nowrap;}
.data-table tbody tr:hover{background:#F8FAFC;}
.data-table tbody tr:last-child td{border-bottom:none;}
.name-cell{display:flex; align-items:center; gap:9px; color:var(--ink); font-weight:550;}
.mini-avatar{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11.5px;font-weight:600;flex:0 0 28px;}
.t-num{font-variant-numeric:tabular-nums; font-weight:600; color:var(--ink);}
.up{color:var(--green); font-weight:600;}
.down{color:var(--red); font-weight:600;}
.flat{color:var(--ink3);}
/* ---------- 徽章 ---------- */
.badge{display:inline-flex; align-items:center; padding:2px 9px; border-radius:999px; font-size:11.5px; font-weight:600;}
.badge-green{background:#DCFCE7;color:#15803D;} .badge-blue{background:#DBEAFE;color:#1D4ED8;}
.badge-amber{background:#FEF3C7;color:#B45309;} .badge-red{background:#FEE2E2;color:#B91C1C;}
.badge-gray{background:#F1F5F9;color:#64748B;} .badge-purple{background:#EDE9FE;color:#6D28D9;}
.tag{display:inline-block;padding:1px 7px;border-radius:5px;font-size:11px;font-weight:600;background:#F1F5F9;color:var(--ink3);}
/* ---------- 预警条 ---------- */
.alert-strip{display:flex; align-items:center; gap:10px; border-radius:10px; padding:11px 15px; font-size:13px; margin-bottom:16px;}
.alert-strip svg{width:17px;height:17px;flex:0 0 17px;}
.alert-red{background:#FEF2F2; color:#991B1B; border:1px solid #FECACA;}
.alert-amber{background:#FFFBEB; color:#92400E; border:1px solid #FDE68A;}
.alert-blue{background:#EFF6FF; color:#1E40AF; border:1px solid #BFDBFE;}
/* ---------- 排行榜小卡 ---------- */
.rank-pair{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
.rank-list{list-style:none; margin:0; padding:0;}
.rank-list li{display:flex; align-items:center; gap:10px; padding:8px 4px; font-size:13px; border-bottom:1px dashed #F1F5F9;}
.rank-list li:last-child{border-bottom:none;}
.rank-no{width:20px;height:20px;border-radius:6px;background:#F1F5F9;color:var(--ink3);font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex:0 0 20px;}
.rank-no.top{background:#DCFCE7;color:#15803D;}
.rank-no.bot{background:#FEE2E2;color:#B91C1C;}
.rank-name{flex:1; color:var(--ink2);}
.rank-val{font-weight:700; font-variant-numeric:tabular-nums;}
/* ---------- 空状态 / 其他 ---------- */
.empty-tip{padding:34px; text-align:center; color:var(--ink4); font-size:13px;}
.legend{display:flex; gap:14px; flex-wrap:wrap; font-size:11.5px; color:var(--ink3); align-items:center;}
.legend i{width:9px;height:9px;border-radius:3px;display:inline-block;margin-right:5px;}
.divider{height:1px;background:#F1F5F9;margin:12px 0;}
.dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px;}
.text-muted{color:var(--ink3);} .text-sm2{font-size:12px;}
.section-cap{font-size:13.5px;font-weight:650;margin:0 0 10px;color:var(--ink);display:flex;align-items:center;gap:7px;}
.section-cap::before{content:"";width:3px;height:13px;background:var(--brand);border-radius:2px;}
.link-like{color:var(--brand); cursor:pointer; font-weight:550;}
.link-like:hover{text-decoration:underline;}
.link-danger{color:var(--red);cursor:pointer;}
.spark-cell{display:flex;align-items:center;gap:8px;}
.progress{height:7px;border-radius:99px;background:#F1F5F9;overflow:hidden;min-width:70px;}
.progress>i{display:block;height:100%;border-radius:99px;background:var(--brand);}
/* ---------- 工具提示信息 ---------- */
.info-note{display:flex;gap:9px;background:#F8FAFC;border:1px solid var(--line);border-radius:9px;padding:10px 13px;font-size:12px;color:var(--ink3);line-height:1.6;}
.info-note svg{width:15px;height:15px;flex:0 0 15px;margin-top:2px;color:var(--brand);}
/* ---------- 学生详情抽屉（原型示意） ---------- */
.drawer-mask{position:fixed;inset:0;background:rgba(15,23,42,.4);z-index:99;display:none;}
.drawer{position:fixed;top:0;right:0;bottom:0;width:720px;max-width:92vw;background:#fff;z-index:100;transform:translateX(100%);transition:transform .25s ease;display:flex;flex-direction:column;}
.drawer.open{transform:translateX(0);}
.drawer-mask.open{display:block;}
.drawer-head{padding:18px 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;}
.drawer-body{flex:1;overflow-y:auto;padding:18px 22px;}
.drawer-x{cursor:pointer;color:var(--ink3);}
.drawer-x svg{width:20px;height:20px;}
/* ---------- 得分段分布条 ---------- */
.band-rows{display:flex;flex-direction:column;gap:13px;padding:4px 2px;}
.band-row{display:flex;align-items:center;gap:11px;font-size:12.5px;color:var(--ink3);}
.band-meta{width:118px;flex:0 0 118px;display:flex;align-items:center;gap:6px;}
.band-meta b{margin-left:auto;color:var(--ink);font-weight:650;}
.band-dot{width:8px;height:8px;border-radius:50%;flex:0 0 8px;}
.band-track{flex:1;height:9px;border-radius:99px;background:#F1F5F9;overflow:hidden;}
.band-fill{height:100%;border-radius:99px;transition:width .3s ease;}
.band-pct{width:42px;flex:0 0 42px;text-align:right;font-weight:650;color:var(--ink2);font-variant-numeric:tabular-nums;}
/* ---------- 红黑榜（div 版） ---------- */
.rank-line{display:flex;align-items:center;gap:10px;padding:8px 2px;font-size:13px;border-bottom:1px dashed #F1F5F9;}
.rank-line:last-child{border-bottom:none;}
.rank-line.good .rank-no{background:#DCFCE7;color:#15803D;}
.rank-line.bad .rank-no{background:#FEE2E2;color:#B91C1C;}
.rank-line .rank-name{flex:1;color:var(--ink2);}
.rank-line b{font-weight:700;font-variant-numeric:tabular-nums;}
.rank-add{width:58px;text-align:right;}
/* ---------- 运营关注异常 ---------- */
.ops-mini-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;}
.ops-mini{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:10px;padding:11px 12px;background:#FCFDFE;}
.ops-mini-ico{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex:0 0 34px;}
.ops-mini-ico svg{width:17px;height:17px;}
.ops-mini-n{font-size:19px;font-weight:750;line-height:1.1;font-variant-numeric:tabular-nums;}
.ops-mini-l{font-size:11.5px;color:var(--ink3);}
.ops-divider{height:1px;background:var(--line);margin:14px 0;}
.ops-row2{display:flex;align-items:flex-start;gap:11px;padding:9px 0;border-bottom:1px dashed #F1F5F9;}
.ops-row2:last-child{border-bottom:none;}
.ops-row2-main{flex:1;display:flex;flex-direction:column;gap:2px;font-size:12.5px;}
.ops-row2-main span{color:var(--ink3);font-size:12px;}
.ops-date{font-size:11.5px;color:var(--ink4);white-space:nowrap;}
/* ---------- 响应式（原型兼顾） ---------- */
@media (max-width:1200px){
 .kpi-grid{grid-template-columns:repeat(2,1fr);}
 .grid-32,.grid-23,.grid-12{grid-template-columns:1fr;}
 .grid-3{grid-template-columns:1fr 1fr;}
 .ops-mini-grid{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:900px){
 .sidebar:not(.sidebar-admin):not(.sidebar-teacher):not(.sidebar-student){display:none;}
 .grid-2,.grid-3{grid-template-columns:1fr;}
}

/* ---------- 通用模态弹层 ---------- */
.modal-root { position: fixed; inset: 0; z-index: 90; opacity: 0; transition: opacity .2s ease; }
.modal-root.show { opacity: 1; }
.modal-mask { position: absolute; inset: 0; background: rgba(15,23,42,.45); }
.modal-box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.98); z-index: 1;
  width: min(760px, calc(100vw - 48px)); height: min(620px, calc(100vh - 64px));
  background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(15,23,42,.25);
  transition: transform .22s ease; display: flex; flex-direction: column; overflow: hidden;
}
.modal-root.show .modal-box { transform: translate(-50%, -50%) scale(1); }
.modal-xl { width: min(1080px, calc(100vw - 40px)); height: min(700px, calc(100vh - 48px)); }
.modal-content { padding: 22px 24px 24px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-close {
  position: absolute; right: 14px; top: 12px; z-index: 2; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center; border-radius: 8px;
  color: #64748B; cursor: pointer;
}
.modal-close:hover { background: #F1F5F9; color: #0F172A; }

/* ---------- 下钻引擎 ---------- */
.drill-head { margin-bottom: 14px; padding-right: 30px; }
.drill-crumbs { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 13px; }
.crumb { color: #2563EB; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.crumb:hover { background: #EFF6FF; }
.crumb-sep { color: #CBD5E1; margin: 0 2px; }
.drill-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.drill-kpi-card {
  background: #F8FAFC; border: 1px solid #EEF2F7; border-radius: 10px; padding: 12px 14px;
}
.drill-kpi-card.danger { background: #FEF2F2; border-color: #FECACA; }
.drill-kpi-card.success { background: #F0FDF4; border-color: #BBF7D0; }
.dk-label { font-size: 12px; color: #64748B; margin-bottom: 4px; }
.dk-value { font-size: 21px; font-weight: 750; color: #0F172A; line-height: 1.2; }
.drill-kpi-card.danger .dk-value { color: #DC2626; }
.drill-kpi-card.success .dk-value { color: #16A34A; }
.dk-sub { font-size: 11.5px; color: #94A3B8; margin-top: 2px; }
.drill-hint { font-size: 12.5px; color: #64748B; background: #EFF6FF; border: 1px solid #DBEAFE; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.drill-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.drill-table th { text-align: left; font-size: 12px; color: #64748B; font-weight: 600; padding: 9px 10px; background: #F8FAFC; border-bottom: 1px solid #EEF2F7; white-space: nowrap; }
.drill-table td { padding: 10px; border-bottom: 1px solid #F1F5F9; }
.drill-row { cursor: pointer; transition: background .15s; }
.drill-row:hover { background: #F8FAFC; }
.ta-r { text-align: right; }
.drill-chart-card { margin-top: 18px; border: 1px solid #EEF2F7; border-radius: 10px; padding: 14px 16px 8px; }
.drill-chart-title { font-size: 13px; font-weight: 650; color: #334155; margin-bottom: 6px; }
.text-link { color: #2563EB; cursor: pointer; }
.text-link:hover { text-decoration: underline; }
.badge.neutral { background: #F1F5F9; color: #475569; }

@media (max-width: 900px) {
  .drill-kpi { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 运营关注 ---------- */
.ops-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ops-col { background: #F8FAFC; border: 1px solid #EEF2F7; border-radius: 10px; padding: 10px 12px; }
.ops-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: #334155; margin-bottom: 8px; }
.ops-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11.5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ops-count.ok { background: #DCFCE7; color: #15803D; }
.ops-count.warn { background: #FEF3C7; color: #B45309; }
.ops-count.danger { background: #FEE2E2; color: #B91C1C; }
.ops-empty { font-size: 12px; color: #94A3B8; padding: 6px 0 10px; }
.ops-item { border-radius: 8px; padding: 7px 9px; margin-bottom: 6px; }
.ops-item.danger { background: #FEF2F2; }
.ops-item.warning { background: #FFFBEB; }
.ops-title { font-size: 12.5px; font-weight: 600; }
.ops-item.danger .ops-title { color: #B91C1C; }
.ops-item.warning .ops-title { color: #B45309; }
.ops-desc { font-size: 11.5px; color: #64748B; margin-top: 2px; line-height: 1.45; }

/* ---------- 红黑榜 ---------- */
.rank-cap { font-size: 12px; font-weight: 700; margin: 4px 0 8px; padding-left: 8px; border-left: 3px solid; }
.rank-cap.top { color: #15803D; border-color: #16A34A; }
.rank-cap.bot { color: #B91C1C; border-color: #DC2626; }
.rank-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.rank-row:hover { background: #F8FAFC; }
.rank-name { flex: 1; color: #334155; }
.rank-val { font-weight: 700; color: #0F172A; min-width: 34px; text-align: right; }
.rank-delta { font-size: 11.5px; font-weight: 700; }
.rank-delta.up { color: #16A34A; }
.rank-delta.down { color: #DC2626; }

/* ---------- KPI 图标色 ---------- */
.ico-purple { background: #F3E8FF; color: #7C3AED; }
.ico-red { background: #FEE2E2; color: #DC2626; }
.ico-green { background: #DCFCE7; color: #16A34A; }
.ico-blue { background: #DBEAFE; color: #2563EB; }
.crumb-text { color: #0F172A; font-weight: 650; padding: 2px 6px; }

/* ---------- 月度热力矩阵 ---------- */
.mmatrix { font-size: 12.5px; }
.mm-head, .mm-row { display: flex; align-items: stretch; }
.mm-head { position: sticky; top: 0; z-index: 3; background: #fff; }
.mm-corner, .mm-label {
  flex: 0 0 auto; position: sticky; left: 0; z-index: 2;
  background: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: 6px 10px; border-bottom: 1px solid #EEF2F7;
}
.mm-corner { background: #F8FAFC; }
.mm-head .mm-col {
  flex: 1 1 0; min-width: 52px; text-align: center; font-size: 12px; font-weight: 650;
  color: #64748B; background: #F8FAFC; padding: 8px 4px; border-bottom: 1px solid #EEF2F7;
}
.mm-name { font-weight: 600; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.mm-sub { font-size: 10.5px; color: #94A3B8; margin-top: 1px; white-space: nowrap; }
.mm-cell {
  flex: 1 1 0; min-width: 52px; text-align: center; padding: 9px 4px; margin: 2px 1px;
  border-radius: 6px; font-weight: 650; font-size: 12px; transition: transform .12s, box-shadow .12s;
}
.mm-cell.is-null { background: transparent !important; }
.mm-cell:not(.is-null):hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(15,23,42,.12); }
.mm-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 11.5px; color: #64748B; }
.mm-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.mm-tip { color: #94A3B8; margin-left: auto; }

/* 矩阵滚动容器（行数/列数多时） */
.mm-scroll { max-height: 420px; overflow: auto; border: 1px solid #EEF2F7; border-radius: 10px; }
.mm-scroll .mmatrix .mm-corner, .mm-scroll .mm-label { box-shadow: 2px 0 4px -2px rgba(15,23,42,.06); }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pager-info { font-size: 12px; color: #94A3B8; margin-right: auto; }
.page-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #E2E8F0; background: #fff;
  border-radius: 7px; font-size: 12.5px; color: #475569; cursor: pointer;
}
.page-btn:hover:not(:disabled):not(.active) { border-color: #93C5FD; color: #2563EB; }
.page-btn.active { background: #2563EB; border-color: #2563EB; color: #fff; font-weight: 650; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-size { height: 30px; border: 1px solid #E2E8F0; border-radius: 7px; font-size: 12px; color: #475569; background: #fff; padding: 0 4px; }

/* ---------- KPI 明细解释弹层 ---------- */
.explain-head { margin-bottom: 14px; }
.explain-title { font-size: 16px; font-weight: 700; color: #0F172A; }
.explain-summary { margin-top: 6px; font-size: 13px; color: #2563EB; background: #EFF6FF; border: 1px solid #DBEAFE; border-radius: 8px; padding: 8px 12px; }
.explain-note { margin-top: 8px; font-size: 12px; color: #64748B; }
.score-chip { display: inline-block; min-width: 34px; text-align: center; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.score-chip.sc-a { background: #DCFCE7; color: #15803D; }
.score-chip.sc-b { background: #DBEAFE; color: #1D4ED8; }
.score-chip.sc-c { background: #FEF3C7; color: #B45309; }
.score-chip.sc-d { background: #FEE2E2; color: #B91C1C; }

/* KPI 卡片可下钻态 */
.kpi-card.drillable { cursor: pointer; }
.kpi-card.drillable:hover { border-color: #BFDBFE; box-shadow: 0 6px 18px rgba(37,99,235,.12); transform: translateY(-2px); }
.kpi-card.drillable .kpi-drill-hint { font-size: 10.5px; color: #93C5FD; margin-top: 4px; opacity: 0; transition: opacity .15s; }
.kpi-card.drillable:hover .kpi-drill-hint { opacity: 1; }

/* ---------- 学科页布局（趋势 + 右侧双卡，避免大面积留白） ---------- */
.grid-23 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: stretch; margin-bottom: 16px; }
.stack-cards { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stack-cards .card { flex: 1; min-height: 0; }

/* 均衡度排行 */
.bal-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; cursor: pointer; border-radius: 8px; }
.bal-row:hover { background: #F8FAFC; }
.bal-name { flex: 0 0 38px; font-size: 12.5px; font-weight: 650; color: #334155; }
.bal-track { flex: 1; height: 10px; background: #F1F5F9; border-radius: 5px; overflow: hidden; }
.bal-fill { height: 100%; border-radius: 5px; min-width: 4px; transition: width .3s ease; }
.bal-val { flex: 0 0 30px; text-align: right; font-size: 12.5px; font-weight: 750; color: #0F172A; }

/* 学科及格率速览（迷你单段进度条） */
.sbm-row { padding: 7px 2px; display:flex; align-items:center; gap:8px; cursor: pointer; border-radius: 8px; }
.sbm-row:hover { background: #F8FAFC; }
.sbm-name { flex:0 0 38px; font-size: 12.5px; font-weight: 650; color: #334155; }
.sbm-bars { flex:1; display:flex; height:10px; border-radius:5px; overflow:hidden; background:#F1F5F9; }
.sbm-bars .sbm-pass { display:block; height:100%; background:#3B6FD4; border-radius:5px; min-width:3px; }
.sbm-score { flex:0 0 34px; text-align:right; font-size:12.5px; font-weight:750; color:#0F172A; }

@media (max-width: 1100px) {
  .grid-23 { grid-template-columns: 1fr; }
}

/* ============================================================
 * acrud209 分层下钻 / 严重程度 / 学生画像行
 * ============================================================ */

/* segmented tabs（视图切换） */
.seg-tabs { display: inline-flex; gap: 4px; background: #F1F5F9; padding: 4px; border-radius: 9px; }
.seg-tab {
  padding: 6px 14px; border-radius: 7px; font-size: 13px; color: #64748B;
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
/* 弹层顶部 KPI：一行 4 个 */
#hi-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin-bottom: 14px;
}
#hi-kpis .kpi {
  background: #F8FAFC; border: 1px solid #EDF1F7; border-radius: 10px;
  padding: 12px 14px; min-width: 0;
}
#hi-kpis .kpi-label { font-size: 12px; color: #64748B; margin-bottom: 4px; }
#hi-kpis .kpi-value { font-size: 22px; font-weight: 700; color: #1E293B; line-height: 1.15; }
#hi-kpis .kpi-unit { font-size: 12px; font-weight: 500; color: #64748B; margin-left: 2px; }
@media (max-width: 600px) {
  #hi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.seg-tab:hover { color: #334155; }
.seg-tab.active { background: #2563EB; color: #fff; font-weight: 600;
  box-shadow: 0 2px 6px rgba(37,99,235,.28); }

/* 严重程度徽章 */
.sev {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.sev-high { background: #FEE2E2; color: #B91C1C; }
.sev-mid  { background: #FEF3C7; color: #B45309; }
.sev-low  { background: #DBEAFE; color: #1D4ED8; }
.sev-meta { font-size: 11px; color: #94A3B8; margin-top: 3px; font-weight: 400; }

/* 面包屑（层级弹层内） */
.drill-crumbs { font-size: 13px; color: #64748B; }
.drill-crumbs .crumb { cursor: pointer; }
.drill-crumbs .crumb:hover { color: #2563EB; }
.drill-crumbs .crumb.cur { color: #0F172A; font-weight: 600; cursor: default; }
.drill-crumbs .crumb-sep { margin: 0 7px; color: #CBD5E1; }

/* 学生画像行：表格布局（列严格对齐） */
.ptable-wrap { width: 100%; overflow-x: auto; }
.profile-table {
  width: 100%; table-layout: fixed; border-collapse: collapse;
}
.profile-table .pt-id { width: 168px; }
.profile-table .pt-trend { width: auto; min-width: 150px; }
.profile-table .pt-mo { width: 52px; }
.profile-table .pt-sev { width: 120px; }
.profile-table thead th {
  text-align: center; font-size: 12px; color: #64748B; font-weight: 600;
  padding: 8px 4px; border-bottom: 1px solid #EDF1F7; background: #F8FAFC;
  position: sticky; top: 0; z-index: 1;
}
.profile-table thead th.pt-id,
.profile-table thead th.pt-trend { text-align: left; }
.profile-table tbody td {
  padding: 10px 4px; border-bottom: 1px solid #EDF1F7; vertical-align: middle;
}
.profile-table tbody tr:hover { background: #F8FAFC; }
.profile-table .pt-id .profile-sub {
  font-size: 11.5px; color: #94A3B8; margin-top: 3px; line-height: 1.4;
}
.pt-spark .chart-svg { display: block; width: 100%; }
.profile-table .pt-mo { text-align: center; }
.pm-cell {
  display: inline-block; width: 100%; text-align: center; font-size: 12px;
  padding: 5px 0; border-radius: 5px; font-weight: 600; box-sizing: border-box;
}
.pm-a { background: #DCFCE7; color: #15803D; }
.pm-b { background: #DBEAFE; color: #1D4ED8; }
.pm-c { background: #FEF3C7; color: #B45309; }
.pm-d { background: #FEE2E2; color: #B91C1C; }
.pm-na { background: #F8FAFC; color: #CBD5E1; }
.profile-table .pt-sev { text-align: center; }
.profile-table .sev-meta { font-size: 11px; color: #94A3B8; margin-top: 4px; }

/* 预警整行卡（学生页） */
.alert-card-row { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.alert-card {
  display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 18px;
  background: #fff; border: 1px solid #EDF1F7; border-radius: 12px; padding: 16px 20px;
}
.alert-card-label { font-size: 13px; color: #64748B; }
.alert-card-val { font-size: 30px; font-weight: 700; color: #0F172A; line-height: 1.15; margin-top: 2px; }
.alert-card-val span { font-size: 14px; font-weight: 400; color: #94A3B8; margin-left: 3px; }
.alert-card-note { font-size: 11.5px; color: #94A3B8; margin-top: 4px; }
.alert-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.alert-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #F8FAFC; border-radius: 7px; padding: 5px 10px; font-size: 12.5px;
}
.alert-chip .name-cell { color: #0F172A; font-weight: 600; cursor: pointer; }
.alert-chip .name-cell:hover { color: #2563EB; }
.alert-chip-meta { color: #94A3B8; font-size: 11.5px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* 层级矩阵表 */
.hi-table .hi-name { min-width: 150px; position: sticky; left: 0; background: #fff; z-index: 2; }
.hi-table .dim-name { font-weight: 600; }
.hi-table .dim-sub { font-size: 11.5px; color: #94A3B8; margin-top: 2px; font-weight: 400; }
.hi-table td.hi-cell { text-align: center; padding: 7px 6px; cursor: pointer; }
.hi-v { display: inline-block; min-width: 42px; padding: 4px 0; border-radius: 5px;
  font-size: 12px; font-weight: 600; }
.hi-table .rank-no { display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  background: #EFF4FF; color: #2563EB; font-size: 12px; align-items: center; justify-content: center;
  font-weight: 700; margin-right: 8px; }

/* 排名行（教师/班级排名，可点） */
.rank-row.rank-drill { cursor: pointer; }
.rank-row.rank-drill:hover { background: #F8FAFC; }
.rank-row .sev { margin-left: auto; margin-right: 12px; }

/* 班级 A/B/C/D 双列网格 */
.class-band-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.cb-row { display: grid; grid-template-columns: 78px 1fr; align-items: center;
  gap: 10px; padding: 7px 2px; border-bottom: 1px solid #EDF1F7; cursor: pointer; }
.cb-row:hover { background: #F6F8FA; }
.cb-name { font-size: 12.5px; color: #0F172A; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.cb-bars { display: flex; height: 14px; border-radius: 5px; overflow: hidden; background: #F1F4F8; }
.cb-bars i { display: block; height: 100%; }
.cb-bars .sbm-a { background: #6FA887; }
.cb-bars .sbm-b { background: #7095CC; }
.cb-bars .sbm-c { background: #D3A55E; }
.cb-bars .sbm-d { background: #CC8383; }
.cb-n { font-size: 12px; color: #9AA5B5; text-align: right; }

/* 得分段图例 */
.band-legend { display:flex; flex-wrap:wrap; gap:8px 14px; margin-bottom:12px; }
.band-legend span { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#475569; }
.band-legend i { width:12px; height:12px; border-radius:3px; display:inline-block; }
.band-legend .lg-a { background:#6FA887; }
.band-legend .lg-b { background:#7095CC; }
.band-legend .lg-c { background:#D3A55E; }
.band-legend .lg-d { background:#CC8383; }

@media (max-width: 1100px) {
  .alert-card { grid-template-columns: 1fr; gap: 12px; }
  .class-band-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * acrud210 弹框固定高度 / 输入选择下拉 / KPI 一行 / 月份表头
 * ============================================================ */

/* 弹层内 KPI 一律一行 */
.modal-content .kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.modal-content .kpi { padding: 13px 15px; }

/* 输入选择下拉 combobox */
.combobox { position: relative; flex: 1; }
.combobox-input { width: 100%; padding-right: 32px; }
.combobox-caret { position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  color: #94A3B8; pointer-events: none; display: flex; }
.combobox-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 200;
  background: #fff; border: 1px solid #E2E8F0; border-radius: 9px;
  box-shadow: 0 12px 30px rgba(15,23,42,.14); max-height: 240px; overflow-y: auto; margin: 0; padding: 4px 0;
}
.combobox-item { padding: 8px 12px; font-size: 13px; cursor: pointer; color: #334155;
  display: flex; flex-direction: column; gap: 1px; }
.combobox-item .cb-item-sub { font-size: 11px; color: #94A3B8; }
.combobox-item:hover, .combobox-item.active { background: #EFF4FF; color: #1D4ED8; }
.combobox-empty { padding: 10px 12px; font-size: 12.5px; color: #94A3B8; }

/* 进步榜（恢复的底部图表卡） */
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.progress-list .rank-row { padding: 8px 6px; }
.rank-delta { font-size: 12.5px; font-weight: 700; min-width: 52px; }
.rank-delta.up { color: #16A34A; }
.rank-delta.down { color: #DC2626; }

/* 班级 A/B/C/D 条（修复空条问题：显式高度） */
.cb-bars i { height: 18px; }

@media (max-width: 1100px) {
  .modal-content .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
