/* ══════════════════════════════════════════════════════════════════
   teacher/focus_board.css · 督学面板（B4 批）
   双色锁定：亮=粉金 / 暗=Mercury（token 全部取自 css/xms-theme-dual.css）。
   骨架：指挥台式——上排左待处理队列 + 右每生实时卡；无卡顶细色条。
   ══════════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; }

/* [hidden] 兜底：.fb-alert/.fb-stats/.fb-grid 自带 display:flex/grid，会盖掉 UA 的 [hidden]{display:none}
   → JS 置 hidden 后仍渲染（空告警带/空骨架）。统一在此压住，新增组件不再各自踩坑。 */
[hidden] { display: none !important; }

.fb-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  min-height: 100vh;
}

/* ── 顶栏 ── */
.fb-top {
  height: var(--bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: var(--side);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.fb-brand { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; }

.fb-mark {
  width: 28px; height: 28px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
  background: var(--primary-btn);
}

.fb-top-r { display: flex; align-items: center; gap: 10px; }
.fb-lab { font-size: 13px; color: var(--mute); }

.fb-select {
  height: 34px; padding: 0 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--pill); color: var(--ink);
  font-size: 13.5px; font-family: var(--font-ui); max-width: 240px;
}

.fb-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--pill);
  color: var(--mute); font-size: 12.5px; white-space: nowrap;
}
.fb-chip.is-warn { color: var(--gold); border-color: var(--gold); }
.fb-chip.is-lock { color: var(--warn); border-color: var(--warn); }
.fb-chip.is-soft { background: var(--soft); color: var(--accent-2); border-color: transparent; }
[data-theme="dark"] .fb-chip.is-soft { color: var(--accent-2); }

.fb-switch {
  display: inline-flex; border: 1px solid var(--line);
  border-radius: var(--radius-pill); overflow: hidden; background: var(--pill);
}
.fb-switch button {
  border: 0; background: transparent; color: var(--mute);
  padding: 6px 13px; font-size: 13px; cursor: pointer; font-family: var(--font-ui);
}
.fb-switch button[aria-pressed="true"] { background: var(--soft); color: var(--accent-2); font-weight: 700; }

.fb-back { color: var(--accent-2); text-decoration: none; font-size: 13.5px; font-weight: 600; }

/* ── 主区 ── */
.fb-desk { padding: 18px 22px 60px; max-width: 1480px; margin: 0 auto; }

.fb-fatal {
  margin: 60px auto; max-width: 520px; text-align: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 34px 28px; box-shadow: var(--shadow);
}
.fb-fatal h2 { margin: 0 0 10px; font-size: 19px; }
.fb-fatal p { color: var(--mute); font-size: 14px; line-height: 1.8; margin: 6px 0; }

.fb-state { color: var(--mute); font-size: 14px; padding: 20px 2px; }

/* ── 告警带 ── */
.fb-alert {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding: 11px 16px;
  border-radius: var(--radius-ctrl);
  border: 1px solid var(--warn);
  background: color-mix(in srgb, var(--warn) 8%, var(--card));
  color: var(--warn); font-size: 13.5px; font-weight: 600;
}
.fb-alert-ico { font-size: 15px; }

/* ── 概览条 ── */
.fb-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }

.fb-stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-ctrl); padding: 10px 16px;
  font-size: 13px; color: var(--mute); box-shadow: var(--shadow);
}
.fb-stat b { font-size: 18px; color: var(--ink); margin-right: 5px; }
.fb-stat.is-ok b { color: var(--ok); }
.fb-stat.is-away b { color: #f97316; }
.fb-stat.is-lock b { color: var(--warn); }
.fb-stat.is-warn b { color: var(--gold); }

/* ── 主栅格：左待办 + 右每生 ── */
.fb-grid { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 14px; align-items: start; }

.fb-col {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 14px 14px 16px; box-shadow: var(--shadow);
}

.fb-col-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fb-col-head h2 { margin: 0; font-size: 15.5px; font-weight: 700; }
.fb-hint { color: var(--dim); font-size: 12px; }

/* ── 卡壳待办 ── */
.fb-queue { display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow: auto; }

.fb-que {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-ctrl); padding: 12px 13px;
}
.fb-que-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.fb-que-who { font-size: 13px; font-weight: 700; color: var(--ink); }
.fb-que-t { margin-left: auto; font-size: 11.5px; color: var(--dim); }
.fb-que-t1 { font-size: 13.5px; font-weight: 600; line-height: 1.55; margin-bottom: 4px; }
.fb-que-d { font-size: 12.5px; color: var(--mute); line-height: 1.6; word-break: break-all; }
.fb-que-f { margin-top: 9px; display: flex; justify-content: flex-end; }

.fb-empty {
  color: var(--dim); font-size: 13px; line-height: 1.9;
  border: 1px dashed var(--line); border-radius: var(--radius-ctrl);
  padding: 22px 16px; text-align: center;
}

/* ── 每生实时卡 ── */
.fb-students {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}

.fb-stu {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-ctrl); padding: 12px 13px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.fb-stu.is-alert { border-color: #f97316; box-shadow: 0 0 0 1px rgba(249, 115, 22, .35); }
.fb-stu.is-locked { border-color: var(--warn); box-shadow: 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }

.fb-stu-h { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.fb-stu-n { font-size: 14.5px; font-weight: 700; }

.fb-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fb-dot.is-ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.fb-dot.is-idle { background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.fb-dot.is-away { background: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, .22); }
.fb-dot.is-offline { background: var(--dim); }
.fb-dot.is-locked { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent); }

.fb-stu-m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.fb-phase { font-size: 13px; font-weight: 600; color: var(--accent-2); }

.fb-stu-hint { font-size: 12px; color: var(--dim); margin-bottom: 9px; }
.fb-stu-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.fb-stu-acts a { text-decoration: none; }
.fb-progress { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--mute); font-size: 12px; margin: 10px 0; }
.fb-trace { width: min(720px, calc(100vw - 32px)); max-height: 85vh; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--card); color: var(--ink); padding: 24px; box-shadow: var(--shadow); }
.fb-trace::backdrop { background: rgba(15, 15, 23, .55); }
.fb-trace-head { display: flex; justify-content: space-between; align-items: center; }
.fb-trace-head h2 { margin: 0; font-size: 18px; }
.fb-trace form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.fb-trace label { display: grid; gap: 6px; font-size: 13px; color: var(--mute); }
.fb-trace input { background: var(--pill); border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius-ctrl); padding: 8px; }
.fb-trace-state { font-size: 13px; color: var(--mute); }
.fb-trace-list { list-style: none; padding: 0; margin: 12px 0; }
.fb-trace-list li { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fb-trace-list time, .fb-trace-list span { color: var(--mute); }

/* ── 按钮 ── */
.fb-btn {
  border: 1px solid var(--line); background: var(--pill); color: var(--ink);
  border-radius: var(--radius-pill); padding: 6px 15px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: var(--font-ui);
}
.fb-btn:hover { border-color: var(--accent); color: var(--accent-2); }
.fb-btn.is-primary { border: 0; background: var(--primary-btn); color: #fff; box-shadow: var(--primary-shadow); }
.fb-btn.is-danger { border-color: var(--warn); color: var(--warn); }
.fb-btn:disabled { opacity: .5; cursor: default; }

/* ── 提示条 ── */
.fb-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 11px 20px; border-radius: var(--radius-pill);
  font-size: 13.5px; z-index: 60; box-shadow: var(--shadow);
}
.fb-toast.is-err { background: var(--warn); color: #fff; }

/* ── 窄屏：单列 ── */
@media (max-width: 980px) {
  .fb-grid { grid-template-columns: 1fr; }
  .fb-queue { max-height: none; }
}
