:root{
  --navy:#12233d; --blue:#1f3b73; --acc:#2f6bff; --teal:#12a594; --amber:#e08a00;
  --rose:#e0455f; --ink:#1b2430; --grey:#5b6673; --line:#dfe5ee; --bg:#f3f6fb;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{font-family:"Microsoft YaHei","PingFang SC","Hiragino Sans GB",system-ui,sans-serif;
  background:var(--bg);color:var(--ink);font-size:16px}
.hidden{display:none !important}
.muted{color:var(--grey);font-size:13px}

/* ---------- 登录 ---------- */
.login{position:fixed;inset:0;background:linear-gradient(140deg,#12233d,#1f3b73 60%,#2f6bff);
  display:flex;align-items:center;justify-content:center;padding:20px;z-index:100}
.login-box{background:#fff;border-radius:18px;padding:30px 28px;width:100%;max-width:420px;
  box-shadow:0 30px 80px rgba(5,15,35,.45)}
.login-brand{display:flex;gap:14px;align-items:center;margin-bottom:24px}
.lb1{font-size:20px;font-weight:800;color:var(--navy)}
.lb2{font-size:12px;color:var(--grey);margin-top:4px}
.field{margin-bottom:14px}
.field label{display:block;font-size:12px;color:var(--grey);margin-bottom:6px}
.field input{width:100%}
.btn.full{width:100%;margin-top:6px}
.err{color:var(--rose);font-size:13px;min-height:18px;margin-bottom:6px}
.demo{margin-top:16px;font-size:11.5px;line-height:1.7;color:#8b96a6;background:#f6f8fc;
  border-radius:10px;padding:10px 12px}

/* ---------- 顶栏 ---------- */
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:22px;
  padding:10px 22px;background:var(--navy);color:#fff;box-shadow:0 2px 10px rgba(10,25,50,.18)}
.brand{display:flex;align-items:center;gap:12px;flex:0 0 auto}
.logo{width:38px;height:38px;border-radius:10px;background:var(--acc);display:flex;align-items:center;
  justify-content:center;font-weight:700;font-size:19px;color:#fff}
.t1{font-size:15px;font-weight:700}
.t2{font-size:11.5px;color:#a9bcd8;margin-top:2px}
.nav{display:flex;gap:6px;flex:1}
.nav-btn{background:transparent;border:0;color:#b9c9e3;font:inherit;font-size:14px;padding:9px 14px;
  border-radius:9px;cursor:pointer;min-height:40px}
.nav-btn:hover{background:rgba(255,255,255,.08);color:#fff}
.nav-btn.active{background:rgba(255,255,255,.14);color:#fff;font-weight:700}
.me{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.who{font-size:14px}
.role{font-size:11px;background:rgba(255,255,255,.14);padding:3px 9px;border-radius:20px;color:#d6e2f5}

/* ---------- 离线 / 一键同步 ---------- */
.sync-box{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.off-chip{font-size:11px;background:#ffcf5a;color:#3a2a00;padding:4px 10px;border-radius:20px;font-weight:700}
.sync-btn{display:inline-flex;align-items:center;gap:7px}
.sync-btn .badge{background:var(--rose);color:#fff;font-size:11px;font-style:normal;font-weight:700;
  border-radius:20px;padding:1px 7px;min-width:19px;text-align:center}
.sync-btn:disabled{opacity:.6}

/* ---------- 按钮 / 表单 ---------- */
.btn{border:1px solid var(--line);background:#fff;color:var(--blue);font:inherit;font-size:15px;
  padding:10px 16px;border-radius:10px;cursor:pointer;min-height:44px}
.btn:hover{border-color:var(--acc)}
.btn.ghost{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.28);color:#fff}
.btn.danger{background:var(--rose);border-color:var(--rose);color:#fff;font-weight:700}
.btn.ghost.sm{padding:6px 12px;min-height:34px;font-size:13px}
.btn.primary{background:var(--acc);border-color:var(--acc);color:#fff;font-weight:700}
.btn.primary:hover{background:#1c56e0}
.btn.big{font-size:17px;padding:13px 24px;min-height:54px}
.btn:disabled{opacity:.45;cursor:not-allowed}
select,input,textarea{font:inherit;font-size:15px;padding:10px 12px;border:1px solid var(--line);
  border-radius:10px;background:#fff;color:var(--ink);min-height:44px;width:auto}
textarea{width:100%;min-height:140px;font-size:14px;line-height:1.6}

/* ---------- 布局 ---------- */
#app{max-width:1180px;margin:0 auto;padding:22px 22px 70px}
.view{animation:fade .16s ease}
@keyframes fade{from{opacity:.25}to{opacity:1}}
.row-between{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
.row-gap{display:flex;gap:10px;align-items:center}
.sec-title{font-size:15px;color:var(--grey);font-weight:600;margin:26px 0 12px}
.page-title{font-size:24px;margin:0 0 6px}

/* ---------- 批次 / 班级 / 学生 ---------- */
.batch-card{background:#fff;border-radius:16px;padding:22px 24px;display:flex;justify-content:space-between;
  gap:24px;flex-wrap:wrap;box-shadow:0 6px 22px rgba(20,40,80,.07);border:1px solid #e8eef7}
.batch-title{font-size:22px;font-weight:700;color:var(--navy)}
.batch-pick{display:inline-flex;align-items:center;gap:10px;background:transparent;border:0;padding:0;
  font:inherit;cursor:pointer;border-radius:8px}
.batch-pick:hover .batch-title{color:var(--acc)}
.batch-pick .caret{font-size:13px;color:var(--acc);line-height:1;transition:transform .16s}
.batch-pick.open .caret{transform:rotate(180deg)}
.batch-menu{background:#fff;border:1px solid #e2e9f4;border-radius:14px;box-shadow:0 18px 44px rgba(15,35,70,.16);
  padding:8px;margin:-8px 0 18px;position:relative;z-index:50;max-width:760px}
.batch-menu .bm-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:10px;cursor:pointer}
.batch-menu .bm-item:hover{background:#f3f7ff}
.batch-menu .bm-item.on{background:#eaf1ff}
.batch-menu .bm-item .tick{width:16px;color:var(--acc);font-size:13px}
.batch-menu .bm-item .nm{font-size:15px;font-weight:600;color:var(--ink)}
.batch-menu .bm-item .nm.on{color:var(--acc)}
.batch-menu .bm-item .st{font-size:11px;border-radius:20px;padding:3px 9px}
.batch-menu .bm-item .st.EXECUTING{background:#e6f7ec;color:#15602f}
.batch-menu .bm-item .st.CLOSED{background:#eef2f8;color:#5b6673}
.batch-menu .bm-item .st.PLANNED{background:#fdf1d6;color:#8a5b00}
.batch-menu .bm-item .cnt{margin-left:auto;font-size:12px;color:var(--grey);font-weight:400}
.batch-sub{color:var(--grey);font-size:13px;margin-top:6px}
.kpis{display:flex;gap:26px;flex-wrap:wrap}
.kpis .k{min-width:84px}
.kpis .kv{font-size:26px;font-weight:800;color:var(--acc);line-height:1.1}
.kpis .kl{font-size:12px;color:var(--grey);margin-top:4px}
.kpis.big .kv{font-size:34px}
.class-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}

/* ---------- 学校切换（首页标题 → 学校名 + 小三角） ---------- */
.school-bar{display:flex;align-items:center;gap:14px;margin:26px 0 14px;flex-wrap:wrap}
.school-pick{position:relative}
.school-btn{display:inline-flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);
  border-radius:12px;padding:10px 16px;font:inherit;font-size:21px;font-weight:800;color:var(--navy);
  cursor:pointer;min-height:50px;box-shadow:0 3px 12px rgba(20,40,80,.05)}
.school-btn:hover{border-color:var(--acc)}
.school-btn .caret{font-size:13px;color:var(--acc);line-height:1;transition:transform .16s}
.school-pick.open .school-btn{border-color:var(--acc)}
.school-pick.open .school-btn .caret{transform:rotate(180deg)}
.school-menu{position:absolute;left:0;top:calc(100% + 8px);min-width:340px;max-width:90vw;background:#fff;
  border:1px solid #e2e9f4;border-radius:14px;box-shadow:0 18px 44px rgba(15,35,70,.18);padding:8px;z-index:60}
.school-menu .sm-item{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;
  cursor:pointer;font-size:15px;color:var(--ink)}
.school-menu .sm-item:hover{background:#f3f7ff}
.school-menu .sm-item.on{background:#eaf1ff;color:var(--acc);font-weight:700}
.school-menu .sm-item .tick{width:16px;flex:0 0 auto;color:var(--acc);font-size:13px}
.school-menu .sm-item .cnt{margin-left:auto;font-size:12px;color:var(--grey);font-weight:400;white-space:nowrap}
.school-menu .sm-item.on .cnt{color:var(--acc)}
.school-menu .sm-empty{padding:14px 12px;font-size:13px;color:var(--grey)}
.empty-tip{grid-column:1/-1;background:#fff;border:1px dashed #d7e0ee;border-radius:14px;padding:26px;
  text-align:center;color:var(--grey);font-size:14px}
.head-left{align-items:flex-start;gap:14px}

/* 按就诊码打开患儿 */
.code-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 18px}
.code-bar input{min-width:240px}
.code-bar .muted{font-size:12px}
.class-card{background:#fff;border:1px solid #e8eef7;border-radius:14px;padding:18px;cursor:pointer;
  transition:transform .12s, box-shadow .12s;box-shadow:0 3px 12px rgba(20,40,80,.05)}
.class-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(20,40,80,.12)}
.class-card .cn{font-size:19px;font-weight:700}
.class-card .cs{color:var(--grey);font-size:13px;margin:4px 0 12px}
.bar{height:8px;border-radius:6px;background:#eef2f8;overflow:hidden}
.bar > i{display:block;height:100%;background:linear-gradient(90deg,var(--acc),var(--teal));border-radius:6px}
.class-card .cf{display:flex;justify-content:space-between;font-size:12px;color:var(--grey);margin-top:8px}
.stu-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-top:18px}
.stu-card{background:#fff;border:1px solid #e8eef7;border-radius:12px;padding:14px 16px;cursor:pointer;position:relative}
.stu-card:hover{border-color:var(--acc)}
.stu-card .sn{font-size:18px;font-weight:700}
.stu-card .sm{font-size:12px;color:var(--grey);margin-top:4px}
.stu-card .tag{position:absolute;right:12px;top:12px;font-size:11px;padding:3px 8px;border-radius:20px;
  background:#eef2f8;color:var(--grey)}
.stu-card.done{border-color:#cfe9d8;background:#fbfefc}
.stu-card.done .tag{background:#e6f7ec;color:#15602f}
.stu-card.done::after{content:"✓";position:absolute;right:14px;bottom:12px;color:#2e9e4f;font-weight:700}
.stu-card.pending{border-color:#f6d08a;background:#fffdf5}
.stu-card.pending .tag{background:#fdf1d6;color:#8a5b00}
.sealcount{font-size:12px;color:var(--teal);margin-top:8px;font-weight:600}
.sealcount.drop{color:var(--rose)}

/* ---------- 采集：牙位单元 ---------- */
.cap-head{display:flex;align-items:center;gap:18px;margin-bottom:16px;flex-wrap:wrap}
.cap-stu{font-size:22px;font-weight:800;color:var(--navy);display:flex;align-items:baseline;gap:10px}
.cap-meta{font-size:14px;font-weight:500;color:var(--grey)}
.cap-prog{margin-left:auto;background:#fff;border:1px solid #e8eef7;border-radius:10px;padding:8px 14px;
  font-size:14px;color:var(--grey)}

/* 尺寸被 JS 钉成「全部牙面未处置 + 有龋坏」那一档：--unit-h 由 fitUnits() 写入 */
.units{--unit-h:0px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.unit{display:flex;flex-direction:column;min-height:var(--unit-h,0px);background:#fff;border:2px solid #e2e9f4;
  border-radius:16px;overflow:hidden;transition:border-color .15s}
.unit.treated{border-color:var(--acc);background:linear-gradient(180deg,#f7faff,#fff)}
.unit.untreated{border-color:#f6c9d1;background:linear-gradient(180deg,#fff8f9,#fff)}
.unit-top{display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer;flex:0 0 auto}
.unit .tnum{font-size:30px;font-weight:800;letter-spacing:1px;color:var(--acc);min-width:62px}
.unit.untreated .tnum{color:var(--rose)}
.unit .tmeta{display:flex;flex-direction:column;gap:4px}
.unit .tgroove{font-size:14px;color:var(--grey)}
.unit .tstate{font-size:13px;font-weight:700;color:var(--acc)}
.unit.untreated .tstate{color:var(--rose)}
.unit .flip{margin-left:auto;border:1px solid var(--line);background:#fff;color:var(--grey);
  font:inherit;font-size:12px;padding:7px 12px;border-radius:9px;cursor:pointer;min-height:36px;white-space:nowrap}
.unit.untreated .flip{color:var(--acc);border-color:#c9d8f5}

.unit-body{border-top:1px dashed #e8eef7;padding:4px 16px 12px}
/* “本次处置”时用两行实际信息把固定高度填满，不把留白堆在底部 */
.unit-body.sealed{flex:1 1 auto;display:flex;flex-direction:column;justify-content:flex-start;gap:2px;padding:8px 16px}
.unit-body.sealed .surf{padding:6px 0}
.unit-body.sealed .surf + .surf{border-top:0}
.pill{display:inline-flex;align-items:center;font-size:13px;font-weight:600;color:var(--teal);
  background:#e9f7f4;border:1px solid #c9ece4;border-radius:20px;padding:5px 12px}
/* 量尺：不可见，只用来量最坏情况的高度 */
.unit-ghost-wrap{position:fixed;left:-10000px;top:0;visibility:hidden;pointer-events:none;z-index:-1}
.surf{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 0}
.surf + .surf{border-top:1px dashed #f0f3f9}
.sname{width:46px;font-size:14px;font-weight:700;color:var(--blue);flex:0 0 auto}
.seg2{display:inline-flex;background:#eef2f8;border-radius:10px;padding:4px;gap:4px}
.seg2 button{border:0;background:transparent;font:inherit;font-size:13px;padding:7px 12px;border-radius:7px;
  cursor:pointer;color:var(--grey);min-height:34px}
.seg2 button.on{background:#fff;font-weight:700;box-shadow:0 2px 8px rgba(20,40,80,.1)}
.seg2 button[data-v="3"].on{color:var(--teal)}
.seg2 button[data-v="2"].on{color:var(--rose)}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{border:1px solid var(--line);background:#fff;border-radius:16px;padding:6px 10px;font-size:12px;
  cursor:pointer;color:var(--grey);min-height:32px;white-space:nowrap}
.chip.on{background:var(--rose);border-color:var(--rose);color:#fff;font-weight:700}
.chips.hidden{display:none}

.cap-foot{margin-top:22px;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.cap-last{font-size:12.5px;color:#93a0b1;margin-bottom:10px;min-height:18px}

/* ---------- 初封 / 复查 切换 ---------- */
.mode-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}
.mode-switch{display:inline-flex;background:#e9eef7;border-radius:12px;padding:4px;gap:4px}
.mode-switch button{border:0;background:transparent;font:inherit;font-size:14px;padding:8px 16px;
  border-radius:9px;cursor:pointer;color:var(--grey);min-height:38px}
.mode-switch button.on{background:#fff;font-weight:700;color:var(--acc);box-shadow:0 2px 8px rgba(20,40,80,.12)}
.mode-switch button[data-mode="recheck"].on{color:var(--amber)}
.visit-history{font-size:12px;color:#93a0b1}
.lock-tip{font-size:12px;font-weight:700;color:#8a5b00;background:#fdf1d6;border-radius:20px;padding:4px 12px}
.unit.locked{opacity:.92}
#units.locked .unit-top{cursor:default}
#units.locked .seg2 button,#units.locked .chip{cursor:not-allowed}
#units.locked .flip{opacity:.4;pointer-events:none}
#units.locked .seg2 button,#units.locked .chip{opacity:.75;pointer-events:none}

/* 审核页 */
.rv-toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:12px 16px;margin-bottom:12px}
.rv-all{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--navy)}
.rv-scroll{max-height:calc(100vh - 340px);min-height:220px;overflow-y:auto;background:#fff;
  border:1px solid #e8eef7;border-radius:12px;padding:6px 12px}
.rv-school{padding:10px 0 6px;border-bottom:1px solid #eef2f8}
.rv-class{padding:6px 0 4px 22px}
.rv-line{display:flex;align-items:center;gap:10px;cursor:pointer}
.rv-school-name{font-size:16px;font-weight:800;color:var(--navy)}
.rv-class-name{font-size:14px;font-weight:700;color:var(--blue)}
.rv-item{display:flex;align-items:center;gap:12px;padding:8px 8px 8px 46px;border-top:1px dashed #f2f5fa}
.rv-item:hover{background:#f8fbff}
.rv-name{min-width:140px;font-size:14px;font-weight:600}
.rv-name em{font-style:normal;color:#93a0b1;font-size:12px;font-weight:400;margin-left:6px}
.rv-type{color:var(--grey);font-size:13px;min-width:190px}
.rv-item-ops .mini{border:1px solid var(--line);background:#fff;border-radius:8px;padding:4px 10px;
  font-size:12px;cursor:pointer;color:var(--blue);margin-right:6px}
.rv-more{border:0;background:transparent;color:var(--acc);font-size:12px;cursor:pointer}
.rv-detail{padding:0 0 12px 46px}
.rv-st{font-size:11px;border-radius:20px;padding:3px 10px}
.rv-st.PENDING{background:#fdf1d6;color:#8a5b00}
.rv-st.APPROVED{background:#e6f7ec;color:#15602f}
.rv-st.REJECTED{background:#fff0f3;color:#b3364f}
.rv-teeth{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:8px 0}
.rv-tooth{background:#f8fafd;border:1px solid #eef2f8;border-radius:10px;padding:8px 10px}
.rv-tooth .n{font-weight:800;color:var(--acc);font-size:15px;margin-bottom:4px}
.rv-tooth .r{font-size:12px;color:var(--grey)}
.rv-tooth .r .ok{color:var(--teal)}
.rv-tooth .r .drop{color:var(--rose)}
.rv-tooth .r .none{color:#b9c2cf}
.rv-note{font-size:13px;color:#b3364f;background:#fff0f3;border-radius:8px;padding:8px 10px}
.mini2{min-height:38px;font-size:14px;padding:8px 14px}


/* 复查：每个面五个选项 */
.seg-row{display:flex;gap:8px;flex-wrap:wrap}
.seg-chip{border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px 12px;font-size:13px;
  cursor:pointer;color:var(--grey);min-height:36px}
.seg-chip.on{background:var(--teal);border-color:var(--teal);color:#fff;font-weight:700}
.seg-chip[data-r="PARTIAL"].on,.seg-chip[data-r="LOST"].on,.seg-chip[data-r="LOST_CARIES"].on{
  background:var(--rose);border-color:var(--rose)}
.seg-chip[data-r="NONE"].on{background:#8b96a6;border-color:#8b96a6}

/* 涂氟名单 */
.fluoro-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:10px}
.fluoro-head .kpis .kv{font-size:24px}
.fluoro-tip{margin-bottom:10px}
#fluoroTable td{vertical-align:middle}
#fluoroTable .done{color:var(--teal);font-weight:700}
#fluoroTable .undone{color:#b9c2cf}
#fluoroTable tr.is-done td{background:#fbfefc}
.batch-menu .bm-item .kind{font-size:11px;border-radius:20px;padding:3rpx 9px;background:#eef2f8;color:#5b6673;padding:3px 9px}
.batch-menu .bm-item .kind.FLUORIDE{background:#eaf6ff;color:#0b6fa4}

/* ---------- 统计筛选 ---------- */
.filter-bar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.filter-bar label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--grey)}
.filter-bar select,.filter-bar input{font-size:14px;padding:8px 10px;min-height:40px;min-width:130px}
.tbl.small{font-size:13px}
.tbl.small th,.tbl.small td{padding:8px 10px}
.tbl .num{text-align:right;font-variant-numeric:tabular-nums}
.rate-ok{color:var(--teal);font-weight:700}
.rate-bad{color:var(--rose);font-weight:700}
.hint{font-size:12px;color:#93a0b1}
.save-state{font-size:13px;color:var(--teal);font-weight:600;margin-right:8px}
.save-state.err{color:var(--rose)}
.save-state.warn{color:var(--amber)}

/* ---------- 统计 / 表格 ---------- */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}
.panel{background:#fff;border:1px solid #e8eef7;border-radius:14px;padding:18px 20px}
.panel h3{margin:0 0 14px;font-size:15px;color:var(--grey);font-weight:600}
.mini-bar{display:flex;align-items:center;gap:10px;margin-bottom:10px;font-size:14px}
.mini-bar .lb{width:96px;color:var(--grey)}
.mini-bar .tr{flex:1;height:10px;background:#eef2f8;border-radius:6px;overflow:hidden}
.mini-bar .tr > i{display:block;height:100%;background:var(--acc);border-radius:6px}
.mini-bar .vl{width:52px;text-align:right;font-weight:700;color:var(--blue)}
.tbl{width:100%;border-collapse:collapse;font-size:14px}
.tbl th,.tbl td{text-align:left;padding:10px 12px;border-bottom:1px solid #eef2f8}
.tbl th{font-size:12px;color:var(--grey);font-weight:600;background:#f8fafd}
.tbl tr:last-child td{border-bottom:0}
.tbl .ops{display:flex;gap:8px}
.tbl .mini{border:1px solid var(--line);background:#fff;border-radius:8px;padding:5px 10px;font-size:12px;
  cursor:pointer;color:var(--blue)}
.tbl .mini.danger{color:var(--rose);border-color:#f6c9d1}

/* 网页扫码 */
.scan-modal{position:fixed;inset:0;background:rgba(8,18,36,.72);display:flex;align-items:center;
  justify-content:center;z-index:300;padding:20px}
.scan-box{background:#fff;border-radius:16px;padding:14px;width:min(94vw,460px)}
.scan-head{display:flex;justify-content:space-between;align-items:center;font-size:15px;font-weight:700;
  color:var(--navy);margin-bottom:10px}
.scan-x{border:0;background:transparent;color:var(--grey);font:inherit;cursor:pointer}
.scan-box video{width:100%;border-radius:12px;background:#0b1424;aspect-ratio:1/1;object-fit:cover}
.scan-tip{font-size:12px;color:var(--grey);margin-top:8px;text-align:center;min-height:18px}

/* 同步冲突：逐条处置（复用 scan-modal 的遮罩，卡片更宽、可滚动） */
.cf-box{background:#fff;border-radius:16px;padding:16px;width:min(96vw,780px);max-height:86vh;
  display:flex;flex-direction:column}
.cf-box .scan-head{flex:0 0 auto}
.cf-count{font-weight:400;font-size:13px;color:var(--grey);margin-left:8px;flex:1}
.cf-tip{font-size:12px;color:var(--grey);background:#f6f8fc;border-left:3px solid var(--acc);
  padding:8px 10px;border-radius:8px;margin-bottom:10px}
.cf-list{overflow:auto;flex:1 1 auto;min-height:80px}
.cf-row{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:10px}
.cf-row .cf-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:15px;color:var(--ink)}
.cf-row .cf-who{font-weight:700}
.cf-tag{font-size:12px;padding:2px 8px;border-radius:999px;background:#eef2f9;color:var(--blue)}
.cf-tag.warn{background:#fdf3e0;color:var(--amber)}
.cf-row .cf-diff{font-size:13px;color:var(--grey);margin:6px 0 8px;line-height:1.6}
.cf-row .cf-acts{display:flex;gap:8px;flex-wrap:wrap}
.cf-row .cf-acts .btn{min-height:38px;padding:8px 14px;font-size:14px}
/* 白底卡片上不能用页头的 ghost 样式（白字看不见），这里单独给浅底描边款 */
.cf-row .cf-acts .btn.ghost{background:#fff;border:1px solid var(--line);color:var(--blue)}
.cf-row .cf-acts .btn.ghost:hover{background:#eef2f9;border-color:var(--acc);color:var(--acc)}
.cf-empty{text-align:center;color:var(--grey);font-size:14px;padding:26px 0}
.cf-done{font-size:13px;color:var(--teal)}

/* ---------- toast ---------- */
.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);background:var(--navy);color:#fff;
  padding:12px 22px;border-radius:12px;font-size:15px;opacity:0;pointer-events:none;transition:all .2s;
  box-shadow:0 10px 30px rgba(10,25,50,.25);z-index:200}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media (max-width:760px){
  .units{grid-template-columns:1fr}
  .two-col{grid-template-columns:1fr}
  #app{padding:16px 14px 60px}
  .unit .tnum{font-size:30px;min-width:66px}
  .cap-stu{font-size:19px}
  .nav-btn{padding:8px 10px;font-size:13px}
  .surf{gap:10px}
  .sname{width:56px}
  .school-btn{font-size:17px;padding:9px 13px;min-height:46px}
  .school-menu{min-width:min(88vw,340px)}
  .topbar{flex-wrap:wrap;gap:6px 8px;padding:8px 12px}
  .brand{flex:1 1 auto;gap:8px}
  .logo{width:32px;height:32px;font-size:16px;border-radius:9px}
  .t1{font-size:13.5px}
  .t2{font-size:10.5px}
  .nav{order:3;flex:1 1 100%;overflow-x:auto}
  .sync-box{order:2}
  .me{order:2;gap:8px}
  .role{display:none}
  .sync-btn{font-size:12px;padding:6px 9px}
  .who{font-size:13px}
}

.ai-card { border: 1px solid var(--line, #e2e8f0); border-radius: 12px; padding: 10px; background: #fff; }
.ai-q { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.ai-img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; background: #eef2f7; }
.ai-ai { font-size: 12px; color: #1668dc; margin-top: 6px; }
.ai-rv { font-size: 12px; color: #12a06b; margin-top: 2px; }
.ai-ops { display: flex; gap: 6px; margin-top: 8px; }
.ai-ops .btn { flex: 1; }
