/* ============================================================
   知芯云 · 校园心理安全预警与管理系统  —  PC 端原型样式
   设计语言：Ant Design 风格（中性色 / 8px 间距体系 / 克制圆角）
   全部组件自研，无任何第三方 UI 库依赖
   ============================================================ */

:root {
  /* 品牌主色 */
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-bg: #e6f0ff;

  /* 功能色 */
  --success: #52c41a;
  --success-bg: #f0fbe8;
  --warning: #faad14;
  --warning-bg: #fff7e6;
  --error: #ff4d4f;
  --error-bg: #fff1f0;
  --purple: #722ed1;
  --purple-bg: #f5effb;
  --cyan: #13c2c2;
  --cyan-bg: #e6fffb;

  /* 文本 */
  --text-1: rgba(0, 0, 0, 0.88);
  --text-2: rgba(0, 0, 0, 0.65);
  --text-3: rgba(0, 0, 0, 0.45);
  --text-4: rgba(0, 0, 0, 0.25);

  /* 边框 / 背景 */
  --border: #f0f0f0;
  --border-2: #d9d9d9;
  --border-3: #bfbfbf;
  --bg-layout: #f5f7fa;
  --bg-container: #ffffff;
  --bg-hover: #fafafa;
  --bg-mask: rgba(0, 0, 0, 0.45);

  /* 尺寸 */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-w: 232px;
  --sidebar-w-collapsed: 64px;
  --header-h: 56px;

  /* 侧边栏 */
  --sidebar-bg: #0f1b2d;
  --sidebar-bg-2: #14243c;
  --sidebar-text: rgba(255, 255, 255, 0.78);
  --sidebar-text-dim: rgba(255, 255, 255, 0.45);
  --sidebar-active: rgba(22, 119, 255, 0.22);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 6px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 6px 16px rgba(0, 0, 0, 0.08), 0 3px 6px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5715;
  color: var(--text-1);
  background: var(--bg-layout);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; cursor: pointer; }
a:hover { color: var(--primary-hover); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
button { font-family: inherit; }
::selection { background: var(--primary-bg); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.18); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.32); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 通用工具类 ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.ml-8 { margin-left: 8px; }
.ml-12 { margin-left: 12px; }
.mr-8 { margin-right: 8px; }
.mr-12 { margin-right: 12px; }
.text-muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 22px; }
.bold { font-weight: 600; }
.nowrap { white-space: nowrap; }
.ellipsis {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.full { width: 100%; }
.pointer { cursor: pointer; }
.relative { position: relative; }
.hidden { display: none !important; }

/* ============================================================
   布局
   ============================================================ */
.layout { display: flex; height: 100vh; overflow: hidden; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  overflow: hidden;
}
.layout.collapsed .sidebar { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); }

.sidebar-logo {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-logo .logo-mark {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-logo .logo-text { font-size: 16px; font-weight: 700; letter-spacing: 0.5px; }
.sidebar-logo .logo-sub { font-size: 11px; color: var(--sidebar-text-dim); font-weight: 400; }

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
}
.menu-group { }
.menu-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  padding: 12px 16px 8px;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.15s;
}
.menu-group-title:hover { color: #4096ff; }
.mg-arrow { font-size: 11px; line-height: 1; color: var(--sidebar-text-dim); flex: 0 0 auto; transition: transform 0.15s; }
.mg-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.menu-group.collapsed .mg-arrow { transform: rotate(-90deg); }
.layout.collapsed .menu-group-title {
  height: 1px; margin: 10px 14px; padding: 0; background: rgba(255,255,255,0.12);
  overflow: hidden; white-space: normal; cursor: default;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 20px;
  color: var(--sidebar-text);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: background 0.15s, color 0.15s;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.menu-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
}
.menu-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary);
}
.menu-item .mi-icon { width: 18px; height: 18px; flex: 0 0 18px; display: flex; align-items: center; justify-content: center; }
.menu-item .mi-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.layout.collapsed .menu-item { padding: 0; justify-content: center; }
.layout.collapsed .menu-item .mi-label { display: none; }

/* 侧边栏二级子菜单（可视化大屏 → 班级大屏/校级大屏…） */
.menu-parent { font-weight: 500; }
.menu-parent .ms-arrow { margin-left: auto; font-size: 11px; opacity: 0.7; transition: transform 0.15s; }
.menu-sub-items { overflow: hidden; }
.menu-child { padding-left: 46px; height: 38px; font-size: 13px; color: var(--sidebar-text); }
.menu-child .mi-icon { font-size: 14px; width: 16px; height: 16px; flex: 0 0 16px; }
.menu-child:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.menu-child.active { background: rgba(64, 150, 255, 0.18); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--primary); }
.menu-child.active::before { background: var(--primary); }
.mi-tag {
  flex: 0 0 auto; margin-left: 8px; font-size: 11px; line-height: 1;
  padding: 3px 6px; border-radius: 4px; background: rgba(64, 150, 255, 0.18);
  color: #8ec5ff; border: 1px solid rgba(64, 150, 255, 0.35);
}
.layout.collapsed .menu-parent .ms-arrow { display: none; }
.layout.collapsed .menu-child .mi-tag { display: none; }

/* ---------- 主区域 ---------- */
.layout-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.layout-header {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 8px;
  flex: 0 0 var(--header-h);
}
.header-left { display: flex; align-items: center; gap: 4px; min-width: 0; }
.collapse-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-2);
}
.collapse-btn:hover { background: var(--bg-hover); color: var(--text-1); }

/* 侧栏底部常驻收起/展开按钮 */
.sidebar-foot {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.collapse-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.15s;
}
.collapse-toggle:hover { background: rgba(255,255,255,0.16); }
.layout.collapsed .sidebar-foot { padding: 8px; }
.layout.collapsed .collapse-toggle {
  justify-content: center;
  padding: 0;
  font-size: 18px;
}
.layout.collapsed .collapse-toggle { width: 100%; }

/* 折叠态：悬浮菜单项显示完整名称气泡 */
.layout.collapsed .menu-item::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #1f1f1f;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 50;
}
.layout.collapsed .menu-item:hover::after { opacity: 1; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-3); }
.breadcrumb .sep { color: var(--text-4); }
.breadcrumb .cur { color: var(--text-1); font-weight: 500; }

.header-right { display: flex; align-items: center; gap: 8px; }
.header-icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2); position: relative;
}
.header-icon-btn:hover { background: var(--bg-hover); color: var(--text-1); }
.header-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--error); color: #fff; border-radius: 8px;
  font-size: 10px; line-height: 16px; text-align: center;
  border: 1px solid #fff;
}
.user-dropdown { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.user-dropdown:hover { background: var(--bg-hover); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex: 0 0 32px;
}
.avatar.sm { width: 24px; height: 24px; flex-basis: 24px; font-size: 11px; }

.layout-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 32px;
}

/* ---------- 页面 ---------- */
.page { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px; gap: 16px; flex-wrap: wrap;
}
.page-title { font-size: 20px; font-weight: 600; color: var(--text-1); }
.page-desc { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: var(--bg-container);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 15px;
}
.card-head .sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.card-body { padding: 20px; }
.card-body.tight { padding: 12px 16px; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1280px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* 统计卡 */
.stat-card { padding: 18px 20px; }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-title { color: var(--text-3); font-size: 13px; }
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.stat-value { font-size: 28px; font-weight: 700; margin-top: 10px; line-height: 1.1; }
.stat-value .unit { font-size: 14px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.stat-foot { margin-top: 8px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.trend-up { color: var(--error); }
.trend-down { color: var(--success); }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px;
  font-size: 14px; font-weight: 400;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: #fff; color: var(--text-1);
  cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
  user-select: none;
}
.btn:hover { color: var(--primary); border-color: var(--primary); }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { cursor: not-allowed; opacity: 0.5; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger { color: var(--error); border-color: var(--error); background: #fff; }
.btn-danger:hover { background: var(--error); border-color: var(--error); color: #fff; }
.btn-text { border-color: transparent; background: transparent; padding: 0 8px; height: 30px; }
.btn-danger-text { border-color: transparent; background: transparent; padding: 0 8px; height: 30px; color: var(--error); }
.btn-danger-text:hover { background: var(--error-bg); border-color: transparent; }
.btn-text:hover { background: var(--primary-bg); border-color: transparent; }
.btn-link { border: none; background: none; padding: 0; height: auto; color: var(--primary); }
.btn-link:hover { color: var(--primary-hover); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 40px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }

/* ============================================================
   标签 / 徽标
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 4px;
  font-size: 12px; line-height: 1; border: 1px solid transparent;
  white-space: nowrap;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-default { background: #fafafa; color: var(--text-2); border-color: var(--border-2); }
.tag-blue { background: var(--primary-bg); color: var(--primary); border-color: #b8d8ff; }
.tag-green { background: var(--success-bg); color: #389e0d; border-color: #c6f0a8; }
.tag-orange { background: var(--warning-bg); color: #d48806; border-color: #ffe09c; }
.tag-red { background: var(--error-bg); color: #cf1322; border-color: #ffb3b3; }
.tag-purple { background: var(--purple-bg); color: #722ed1; border-color: #ddc6f5; }
.tag-cyan { background: var(--cyan-bg); color: #08979c; border-color: #a6f0f0; }

/* 风险等级进度小条 */
.risk-meter { display: inline-flex; align-items: center; gap: 6px; }
.risk-bar { width: 60px; height: 6px; border-radius: 4px; background: #f0f0f0; overflow: hidden; }
.risk-bar > i { display: block; height: 100%; border-radius: 4px; }

/* ============================================================
   表格
   ============================================================ */
.table-wrap { width: 100%; overflow-x: auto; }
table.zt-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  background: #fff;
}
.zt-table thead th {
  background: #fafafa; color: var(--text-2);
  font-weight: 600; text-align: left;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.zt-table tbody td {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  color: var(--text-1); vertical-align: middle;
}
.zt-table tbody tr { transition: background 0.12s; cursor: pointer; }
.zt-table tbody tr:hover { background: var(--bg-hover); }
.zt-table tbody tr:last-child td { border-bottom: none; }
.zt-table .col-actions { white-space: nowrap; }

.row-actions { display: inline-flex; align-items: center; gap: 4px; }
.row-actions .btn-text { padding: 0 6px; height: 26px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 6px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; color: var(--text-1);
  display: inline-flex; align-items: center; justify-content: center;
}
.page-btn:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.page-btn.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.page-btn:disabled { cursor: not-allowed; opacity: 0.5; }

/* 审批批次：状态筛选 chip */
.apr-chips { display: flex; align-items: center; gap: 10px; }
.apr-chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 16px;
  border-radius: 16px; background: #f0f2f5; color: #1677ff; font-size: 13px;
  cursor: pointer; border: 1px solid transparent; user-select: none;
  transition: all .15s;
}
.apr-chip:hover { background: #e6f0ff; }
.apr-chip.active { background: #1677ff; color: #fff; border-color: #1677ff; }
.apr-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.apr-tab { height: 44px; line-height: 44px; font-size: 15px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; }
.apr-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* ============================================================
   表单控件
   ============================================================ */
.search-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; margin-bottom: 16px;
}
.form-item { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-item.inline { margin-bottom: 0; }
.form-label { font-size: 13px; color: var(--text-2); }
.form-label .req { color: var(--error); margin-right: 2px; }

.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 12px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-1); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s; outline: none;
}
.textarea { height: auto; padding: 8px 12px; resize: vertical; min-height: 84px; line-height: 1.6; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--primary-hover); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23999' fill='none' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-3); }
.form-err { font-size: 12px; color: var(--error); }

/* ============================================================
   抽屉 Drawer
   ============================================================ */
.drawer-mask {
  position: fixed; inset: 0; background: var(--bg-mask);
  z-index: 1000; opacity: 0; transition: opacity 0.25s;
  pointer-events: none; visibility: hidden;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 460px; max-width: 92vw; background: #fff;
  z-index: 1001; box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.25s ease;
}
.drawer.show { transform: translateX(0); }
.drawer.wide { width: 620px; }
/* 全屏组题：占满整个视口，树区 flex 撑满剩余高度 */
.drawer.fullscreen { width: 100vw; max-width: none; left: 0; }
.drawer.fullscreen .drawer-head { padding: 14px 24px; }
.drawer.fullscreen .drawer-body { padding: 18px 24px; }

/* 任务发布：左侧机构树多选 + 右侧表单 */
.tp-layout { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(380px, 1fr); gap: 16px; align-items: stretch; }
.tp-tree-card { min-height: 600px; display: flex; flex-direction: column; }
.tp-tree-card .card-body { flex: 1; min-height: 0; overflow: hidden; }
.tp-form-card { min-height: 600px; }
@media (max-width: 980px) { .tp-layout { grid-template-columns: 1fr; } }

/* OrgTreePicker：树形多选 */
.otp { display: flex; flex-direction: column; height: 100%; min-height: 540px; }
.otp-toolbar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border-2, #eef1f6); align-items: center; flex-wrap: wrap; }
.otp-tree { flex: 1; min-height: 0; overflow: auto; padding: 8px 0; }
.otpn { font-size: 13px; }
.otpn-row { display: flex; align-items: center; gap: 6px; padding: 4px 8px; line-height: 22px; cursor: pointer; user-select: none; border-radius: 4px; }
.otpn-row:hover { background: var(--bg-hover, #f5f7fb); }
.otpn-cb { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; font-size: 14px; color: #2b5fa8; }
.otpn-cb.partial { color: #fa8c16; }
.otpn-cb.checked { color: #1677ff; }
.otpn-radio { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; font-size: 15px; color: #b8bfc9; }
.otpn-radio.checked { color: #1677ff; }
.otpn-row-sel { background: #e8f1ff; }
.otpn-row-sel .otpn-name { color: #1677ff; font-weight: 600; }
.otpn-toggle { display: inline-block; width: 12px; color: #888; cursor: pointer; }
.otpn-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otpn-tag { font-size: 11px; padding: 0 6px; border-radius: 8px; background: #eef1f6; color: #666; }
.otpn-children { /* 缩进由内联 padding-left 实现 */ }
.drawer.fullscreen .drawer-footer { padding: 12px 24px; }
.drawer.fullscreen .tpl-tree {
  flex: 1; min-height: 0; overflow: auto;
  border: 1px solid var(--border-2, #eef1f6); border-radius: 10px;
  padding: 10px 12px; background: #fff;
}
.drawer-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 600;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}
.close-x { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-3); font-size: 18px; }
.close-x:hover { background: var(--bg-hover); color: var(--text-1); }

/* ============================================================
   弹窗 Modal
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; background: var(--bg-mask);
  z-index: 1100; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s; padding: 20px;
}
.modal-mask.show { opacity: 1; }
.modal {
  background: #fff; border-radius: var(--radius); width: 440px; max-width: 100%;
  box-shadow: var(--shadow-3); transform: translateY(-12px) scale(0.98); transition: transform 0.2s;
}
.modal.show { transform: none; }
.modal-head { padding: 16px 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; color: var(--text-2); }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ============================================================
   步骤条 Steps
   ============================================================ */
.steps { display: flex; align-items: flex-start; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px;
  background: var(--border-2); z-index: 0;
}
.step.done:not(:last-child)::after, .step.active:not(:last-child)::after { background: var(--primary); }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; border: 2px solid var(--border-2); color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; position: relative; z-index: 1;
  transition: all 0.2s;
}
.step.active .step-dot { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 4px rgba(22,119,255,0.1); }
.step.done .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-label { margin-top: 8px; font-size: 13px; color: var(--text-3); text-align: center; }
.step.active .step-label, .step.done .step-label { color: var(--text-1); font-weight: 500; }
.step-desc { font-size: 12px; color: var(--text-4); margin-top: 2px; text-align: center; }
.step.clickable { cursor: pointer; }

/* ============================================================
   标签页 Tabs
   ============================================================ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab {
  padding: 10px 16px; cursor: pointer; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px;
  transition: color 0.15s;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* ============================================================
   进度条
   ============================================================ */
.progress { width: 100%; height: 8px; background: #f0f0f0; border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 6px; transition: width 0.4s; }
.progress.green > i { background: var(--success); }
.progress.orange > i { background: var(--warning); }
.progress.red > i { background: var(--error); }

/* ============================================================
   空状态
   ============================================================ */
.empty { text-align: center; padding: 48px 0; color: var(--text-3); }
.empty .empty-icon { font-size: 40px; opacity: 0.5; margin-bottom: 12px; }
.empty .empty-text { font-size: 14px; }

/* ============================================================
   描述列表
   ============================================================ */
.desc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.desc-item { display: flex; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.desc-item .dl { width: 110px; flex: 0 0 110px; color: var(--text-3); font-size: 13px; }
.desc-item .dv { flex: 1; color: var(--text-1); font-weight: 500; }

/* ============================================================
   班级支持网络图
   ============================================================ */
.net-graph { width: 100%; }
.net-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.net-legend .lg { display: flex; align-items: center; gap: 6px; }
.net-legend .ln { width: 18px; height: 0; border-top: 3px solid; border-radius: 2px; }
.net-node-label { font-size: 11px; fill: var(--text-2); }
.net-node-circle { cursor: pointer; transition: r 0.15s; }

/* ============================================================
   智能助手 / 对话
   ============================================================ */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 120px); min-height: 420px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; background: #f7f9fc; }
.chat-msg { display: flex; gap: 10px; margin-bottom: 18px; max-width: 78%; }
.chat-msg.me { margin-left: auto; flex-direction: row-reverse; }
.chat-msg .msg-avatar {
  width: 34px; height: 34px; border-radius: 8px; flex: 0 0 34px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600;
}
.bubble {
  padding: 10px 14px; border-radius: 10px; font-size: 14px; line-height: 1.7;
  background: #fff; border: 1px solid var(--border); color: var(--text-1);
}
.chat-msg.me .bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.chat-msg.ai .msg-avatar { background: linear-gradient(135deg, #722ed1, #b37feb); }
.chat-msg.tree .msg-avatar { background: linear-gradient(135deg, #13c2c2, #5cdbd3); }
.chat-meta { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.chat-input-bar {
  display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); background: #fff;
  align-items: flex-end;
}
.chat-input-bar .textarea { min-height: 44px; max-height: 120px; }
.typing { display: inline-flex; gap: 3px; align-items: center; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

/* AI 助手三栏布局 */
.assistant-layout { display: flex; gap: 16px; align-items: stretch; }
.assistant-side { width: 220px; flex: 0 0 220px; }
.assistant-side .agent-card {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; cursor: pointer;
  background: #fff; transition: all 0.15s;
}
.assistant-side .agent-card:hover { border-color: var(--primary-hover); box-shadow: var(--shadow-1); }
.assistant-side .agent-card.active { border-color: var(--primary); background: var(--primary-bg); }
.assistant-side .agent-icon { width: 40px; height: 40px; border-radius: 10px; flex: 0 0 40px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
.assistant-main { flex: 1; min-width: 0; }

/* ============================================================
   登录页
   ============================================================ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f1b2d 0%, #16334f 50%, #1d4e7e 100%);
  position: relative; overflow: hidden; padding: 24px;
}
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; border-radius: 50%; opacity: 0.18;
  background: radial-gradient(circle, rgba(64,150,255,0.6), transparent 70%);
}
.login-wrap::before { width: 520px; height: 520px; top: -160px; right: -120px; }
.login-wrap::after { width: 460px; height: 460px; bottom: -180px; left: -120px; }
.login-card {
  width: 420px; max-width: 100%; background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3); padding: 36px 36px 32px; position: relative; z-index: 1;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-brand .logo-mark { width: 40px; height: 40px; }
.login-title { font-size: 22px; font-weight: 700; color: var(--text-1); }
.login-sub { color: var(--text-3); font-size: 13px; margin: 4px 0 24px; }
.captcha-box {
  height: 36px; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: #f0f4fb; border: 1px solid var(--border-2); letter-spacing: 4px;
  font-style: italic; font-weight: 700; color: #2b5fa8; user-select: none;
  font-family: "Courier New", monospace;
  white-space: nowrap;
}
.login-foot { margin-top: 18px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.8; }
.login-demo { margin-top: 14px; padding: 10px 12px; background: var(--primary-bg); border-radius: var(--radius-sm); font-size: 12px; color: #0958d9; }

/* ============================================================
   杂项组件
   ============================================================ */
.alert { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; align-items: flex-start; }
.alert-info { background: var(--primary-bg); color: #0958d9; border: 1px solid #b8d8ff; }
.alert-warning { background: var(--warning-bg); color: #ad6800; border: 1px solid #ffe09c; }
.alert-success { background: var(--success-bg); color: #389e0d; border: 1px solid #c6f0a8; }
.alert-red { background: var(--error-bg); color: #cf1322; border: 1px solid #ffb3b3; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }
.divider-v { width: 1px; align-self: stretch; background: var(--border); }

.kpi-inline { display: flex; align-items: baseline; gap: 6px; }
.kpi-num { font-size: 22px; font-weight: 700; }
.kpi-unit { font-size: 12px; color: var(--text-3); }

.mini-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mini-bar .mb-label { width: 84px; flex: 0 0 84px; color: var(--text-2); font-size: 13px; }
.mini-bar .mb-track { flex: 1; height: 10px; background: #f0f0f0; border-radius: 6px; overflow: hidden; }
.mini-bar .mb-fill { height: 100%; border-radius: 6px; }
.mini-bar .mb-val { width: 44px; flex: 0 0 44px; text-align: right; font-size: 13px; color: var(--text-2); }

/* 任务批次：模板整体进度条 */
.batch-progress { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-hover); border-bottom: 1px solid var(--border); }
.batch-progress .bp-label { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.batch-progress .bp-track { flex: 1; height: 10px; background: #e8edf3; border-radius: 6px; overflow: hidden; }
.batch-progress .bp-fill { display: block; height: 100%; border-radius: 6px; background: var(--primary); }

.avatar-list { display: flex; }
.avatar-list .avatar { margin-left: -8px; border: 2px solid #fff; }
.avatar-list .avatar:first-child { margin-left: 0; }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -24px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.tl-item.done .tl-dot { background: var(--primary); }
.tl-time { font-size: 12px; color: var(--text-3); }
.tl-title { font-weight: 600; font-size: 14px; margin: 2px 0; }
.tl-desc { font-size: 13px; color: var(--text-2); }

.check-line { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.check-box { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; }
.check-box.on { background: var(--primary); border-color: var(--primary); }

.doc-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: #fff; font-size: 13px; }
.doc-chip .doc-ic { color: var(--error); }

.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-row .input, .filter-row .select { width: auto; min-width: 150px; }

/* 区段标题 */
.section-title { font-size: 15px; font-weight: 600; margin: 4px 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }

/* 雷达 / 圆形进度 */
.gauge-wrap { display: flex; align-items: center; justify-content: center; }
.legend-list { display: flex; flex-direction: column; gap: 10px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-sq { width: 12px; height: 12px; border-radius: 3px; }

/* 过渡 */
.fade-enter-active, .fade-leave-active { transition: opacity 0.2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* ===== 机构树（无限层级） ===== */
.org-tree-wrap { display: flex; gap: 16px; align-items: flex-start; }
.org-tree { flex: 0 0 380px; max-width: 380px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 14px; max-height: calc(100vh - 200px); overflow: auto; }
.org-tree .tree-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tree-node { font-size: 14px; }
.tn-children { padding-left: 16px; border-left: 1px dashed var(--border); margin-left: 11px; }
.tn-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; position: relative; }
.tn-row:hover { background: #f5f8ff; }
.tn-row.sel { background: #e8f1ff; box-shadow: inset 2px 0 0 var(--primary); }
.tn-toggle { width: 16px; text-align: center; color: var(--text-3); font-size: 11px; flex: 0 0 16px; }
.tn-icon { width: 20px; text-align: center; }
.tn-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-tag { font-size: 11px; color: var(--text-3); background: #f0f2f5; padding: 1px 6px; border-radius: 10px; flex: 0 0 auto; }
.tn-actions { display: none; gap: 4px; flex: 0 0 auto; }
.tn-row:hover .tn-actions { display: flex; }
.tn-act { border: none; background: #eef2f7; color: #445; border-radius: 5px; padding: 2px 6px; cursor: pointer; font-size: 11px; }
.tn-act:hover { background: var(--primary); color: #fff; }
.org-detail { flex: 1; min-width: 0; }

/* ===== 组卷编辑器（超宽抽屉 + 双栏） ===== */
.drawer.xwide { width: 94%; max-width: none; }
.compose { display: flex; height: calc(100vh - 132px); }
.compose-left { flex: 0 0 44%; border-right: 1px solid var(--border); padding: 16px; overflow: auto; }
.compose-right { flex: 1; padding: 16px; overflow: auto; }
.pool-item { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: #fff; }
.pool-item .pi-main { flex: 1; min-width: 0; }
.pool-item .pi-content { font-size: 13px; line-height: 1.5; }
.pool-item .pi-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.section-block { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #fafbfc; border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.section-body { padding: 10px 12px; }
.q-chip { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 6px; font-size: 13px; background: #fff; }
.q-chip .q-remove { color: var(--error); cursor: pointer; flex: 0 0 auto; }

/* ===== 开关 / 多选组 / 选项行 ===== */
.switch { position: relative; width: 42px; height: 22px; background: #cfd4dc; border-radius: 20px; cursor: pointer; transition: .2s; flex: 0 0 42px; }
.switch.on { background: var(--primary); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .2s; }
.switch.on::after { left: 22px; }
.chk-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chk-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border-2); border-radius: 16px; font-size: 13px; cursor: pointer; background: #fff; user-select: none; }
.chk-pill.on { background: #e8f1ff; border-color: var(--primary); color: var(--primary); }
.opt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.opt-row .opt-idx { width: 22px; color: var(--text-3); font-size: 12px; }
.opt-row .input { flex: 1; }
.opt-row .opt-del { color: var(--error); cursor: pointer; flex: 0 0 auto; }
.form-hint { font-size: 12px; color: var(--text-3); background: #f6f8fb; border: 1px dashed var(--border-2); padding: 8px 10px; border-radius: 6px; margin-top: 6px; }

/* ===== 角色管理 / 权限管理 ===== */
.drawer-wide { width: 720px; max-width: 92%; }
.role-name { font-weight: 600; }
.btn-danger { color: var(--error); }
.btn-danger:hover { text-decoration: underline; }
.row-actions { display: flex; gap: 2px; flex-wrap: wrap; }
.perm-bar { display: inline-block; width: 64px; height: 6px; background: #eef0f3; border-radius: 4px; overflow: hidden; vertical-align: middle; }
.perm-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #1677ff, #4096ff); border-radius: 4px; }

/* 权限配置：分组勾选 */
.perm-list { display: flex; flex-direction: column; gap: 14px; }
.perm-group { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.perm-group-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: #fafbfc; border-bottom: 1px solid var(--border); }
.perm-group-title { font-weight: 600; font-size: 13px; }
.perm-mod-all { font-size: 12px; color: var(--primary); cursor: pointer; user-select: none; padding: 2px 8px; border: 1px solid #b8d8ff; border-radius: 12px; background: #fff; }
.perm-mod-all.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.perm-options { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
.perm-check { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--border-2); border-radius: 16px; font-size: 13px; cursor: pointer; background: #fff; user-select: none; transition: .15s; }
.perm-check:hover { border-color: var(--primary); }
.perm-check.on { background: #e8f1ff; border-color: var(--primary); color: var(--primary); }
.check-dot { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border-3); display: inline-block; position: relative; flex: 0 0 14px; }
.perm-check.on .check-dot { background: var(--primary); border-color: var(--primary); }
.perm-check.on .check-dot::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* 权限矩阵（角色 × 权限） */
.perm-matrix-wrap { overflow: auto; max-height: calc(100vh - 200px); }
table.perm-matrix { border-collapse: separate; border-spacing: 0; min-width: 760px; }
.perm-matrix th, .perm-matrix td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.perm-matrix thead th { position: sticky; top: 0; background: #fafbfc; z-index: 2; }
.perm-matrix .pm-fixed { position: sticky; left: 0; background: #fafbfc; z-index: 1; min-width: 220px; }
.perm-matrix thead .pm-fixed { z-index: 3; }
.pm-role { text-align: center; vertical-align: bottom; min-width: 110px; padding: 10px 8px !important; font-size: 13px; }
.pm-role-code { font-size: 11px; color: var(--text-3); font-weight: 400; margin-top: 2px; }
.pm-cell { text-align: center; cursor: pointer; transition: background .12s; padding: 0 !important; height: 38px; }
.pm-cell:hover { background: #f0f6ff; }
.pm-cell.on { background: #e8f1ff; }
.pm-box { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border-3); vertical-align: middle; }
.pm-box.on { background: var(--primary); border-color: var(--primary); position: relative; }
.pm-box.on::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pm-fixed .pm-module { display: block; font-weight: 600; font-size: 13px; }
.pm-fixed .pm-label { display: block; font-size: 12px; color: var(--text-3); }

/* 复选框（批量选择） */
.cb { width: 16px; height: 16px; border: 1px solid var(--border-3); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 16px; background: #fff; transition: .12s; }
.cb:hover { border-color: var(--primary); }
.cb.on { background: var(--primary); border-color: var(--primary); }
.cb.on::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px; }

/* 子页签（题库：题目 / 组卷批次） */
.sub-tabs { display: inline-flex; background: #f0f2f5; border-radius: 8px; padding: 3px; gap: 2px; }
.sub-tab { padding: 5px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--text-2); user-select: none; transition: .15s; }
.sub-tab:hover { color: var(--text-1); }
.sub-tab.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow-1); }

/* ============================================================
   PC 学生端（独立轻量布局，区别于 admin 侧边栏）
   ============================================================ */

/* 登录页模式切换 */
.login-tabs { display: flex; background: #f0f2f5; border-radius: 8px; padding: 3px; gap: 2px; margin: 4px 0 16px; }
.login-tab { flex: 1; text-align: center; padding: 8px 0; border-radius: 6px; font-size: 14px; cursor: pointer; color: var(--text-2); user-select: none; transition: .15s; }
.login-tab:hover { color: var(--text-1); }
.login-tab.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow-1); }

/* 学生端外壳 */
.stu-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: var(--bg-layout); }
.stu-topbar {
  height: var(--header-h); flex: 0 0 var(--header-h);
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.stu-brand { font-size: 16px; font-weight: 700; color: var(--text-1); letter-spacing: 0.3px; }
.stu-brand::before { content: "知"; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #1677ff, #4096ff); color: #fff; font-size: 13px; font-weight: 700; margin-right: 8px; vertical-align: -6px; }
.stu-user { display: flex; align-items: center; gap: 12px; }
.stu-name { font-size: 13px; color: var(--text-2); }

.stu-subnav { display: flex; gap: 4px; background: #fff; border-bottom: 1px solid var(--border); padding: 0 24px; }
.stu-nav-item { padding: 12px 16px; cursor: pointer; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; transition: color .15s; }
.stu-nav-item:hover { color: var(--primary); }
.stu-nav-item.on { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

.stu-content { flex: 1; overflow-y: auto; padding: 24px; }
.stu-page { max-width: none; margin: 0; width: 100%; }

/* 测评批次卡片 */
.stu-batch-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-1); padding: 18px 20px; margin-bottom: 14px; cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.stu-batch-card:hover { box-shadow: var(--shadow-2); border-color: #b8d8ff; }
.sbc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sbc-name { font-size: 15px; font-weight: 600; color: var(--text-1); }
.sbc-meta { font-size: 13px; color: var(--text-3); margin-top: 8px; }
.sbc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 12px; }
.sbc-deadline { font-size: 12px; color: var(--text-3); }
.sbc-deadline { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 作答页 */
.stu-run { max-width: none; margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; }
.stu-run-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 14px; }
.run-back { font-size: 24px; line-height: 1; cursor: pointer; color: var(--text-2); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.run-back:hover { background: var(--bg-hover); color: var(--text-1); }
.run-title { flex: 1; font-size: 16px; font-weight: 600; }
.run-prog { font-size: 13px; color: var(--text-3); }
.stu-run-bar { height: 8px; background: #f0f0f0; border-radius: 6px; overflow: hidden; }
.stu-run-bar-in { height: 100%; background: var(--primary); border-radius: 6px; transition: width .3s; }
.stu-run-body { flex: 1; padding: 20px 4px; overflow-y: auto; }
.stu-run-q { font-size: 18px; font-weight: 600; line-height: 1.6; margin-bottom: 20px; }
.stu-run-opts { display: flex; flex-direction: column; gap: 12px; }
.stu-run-opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--border-2); border-radius: var(--radius); background: #fff; cursor: pointer; transition: .15s; font-size: 14px;
}
.stu-run-opt:hover { border-color: var(--primary-hover); background: var(--bg-hover); }
.stu-run-opt.on { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-active); font-weight: 500; }
.ro-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border-3); flex: 0 0 16px; transition: .15s; }
.stu-run-opt.on .ro-dot { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px #fff; }
.stu-run-opt.missed { color: var(--text-3); }
.stu-run-opt.missed .ro-dot { border-color: var(--border-2); background: #fff; box-shadow: none; }
.stu-run-foot { display: flex; gap: 12px; padding: 14px 0; }
.stu-run-foot .btn { flex: 1; }

/* 大题 → 小题 分组问卷 */
.stu-run-form { display: flex; flex-direction: column; gap: 22px; }
.stu-sec { background: #fff; border: 1px solid var(--border-2); border-radius: var(--radius); overflow: hidden; }
/* StuReport 答卷回顾专用：去掉卡框 / 不截断 / 平铺题目 */
.stu-sec--report { background: transparent; border: none; box-shadow: none; overflow: visible; border-radius: 0; }
.stu-sec--report .stu-q { border-bottom: 1px solid var(--border-1); }
.stu-sec--report .stu-q:last-child { border-bottom: 1px solid var(--border-1); }
/* StuAssessRun 答题页专用：同款平铺风格，保证所有题在一屏内可见、可作答 */
.stu-sec--assess { background: transparent; border: none; box-shadow: none; overflow: visible; border-radius: 0; }
.stu-sec-title { font-size: 17px; font-weight: 700; color: var(--text-1); margin: 2px 0 10px; padding-left: 10px; border-left: 4px solid var(--primary); }
.stu-sec--assess .stu-q { padding: 18px 0; border-bottom: 1px solid var(--border-1); }
.stu-sec--assess .stu-q:first-child { padding-top: 4px; }
.stu-sec--assess .stu-q:last-child { border-bottom: 1px solid var(--border-1); }
/* 共享题干 + 横排选项（大题一页） */
.stu-sec-hero img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 14px; }
.stu-share-q { background: var(--bg-2); padding: 14px 18px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--text-1); line-height: 1.7; margin: 12px 0 18px; }
/* 小题纵向块：题干在上、选项在下（撑满分辨率） */
.stu-share-sub { padding: 16px 0; border-bottom: 1px solid var(--border-1); scroll-margin-top: 8px; }
.stu-share-sub:last-child { border-bottom: none; }
.stu-share-sub:hover { background: var(--bg-hover); }
.stu-share-sub-q { font-size: 15px; line-height: 1.65; color: var(--text-1); font-weight: 500; }
.stu-share-sub-no { color: var(--primary); font-weight: 700; }
.stu-share-sub-opts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.stu-share-opt {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; min-width: 92px;
  border: 1px solid var(--border-2); border-radius: var(--radius); background: #fff;
  cursor: pointer; transition: .15s; font-size: 14px;
}
.stu-share-opt:hover { border-color: var(--primary-hover); background: var(--bg-hover); }
.stu-share-opt.on { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-active); font-weight: 600; }
/* 正规圆形单选框（原生 radio，去掉默认外观后自定义圆形，选中内白点） */
.stu-share-opt input[type="radio"] {
  -webkit-appearance: none; appearance: none; margin: 0; flex: 0 0 18px;
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-3);
  background: #fff; cursor: pointer; transition: .12s; position: relative;
}
.stu-share-opt input[type="radio"]:checked { border-color: var(--primary); background: var(--primary); }
.stu-share-opt input[type="radio"]:checked::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px;
  border-radius: 50%; background: #fff; transform: translate(-50%, -50%);
}
.stu-share-opt input[type="radio"]:focus-visible { box-shadow: 0 0 0 3px rgba(22,119,255,.22); }
.stu-share-opt-cap { display: flex; align-items: center; gap: 8px; }
.stu-share-opt-label { font-size: 14px; color: var(--text-2); }
.stu-share-opt.on .stu-share-opt-label { color: var(--primary-active); font-weight: 600; }
/* 选项配图（如班级融合图 ABCDE 五幅图）：图在上、圆点+标签在下，放大到清晰可读 */
.stu-opt-img { width: 100%; max-width: 188px; height: auto; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--border-1); margin: 0 auto; display: block; }
.stu-share-opt.has-pic { flex-direction: column; align-items: stretch; min-width: 150px; padding: 12px 12px 14px; }
.stu-share-opt.has-pic .stu-opt-img { margin: 0 auto 10px; }
.stu-share-opt.has-pic .stu-share-opt-cap { justify-content: center; }
.stu-share-opt.on .stu-opt-img { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,119,255,.25); }

/* 多选题：方形 checkbox + 选中蓝勾 */
.stu-share-opt--check input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; margin: 0; flex: 0 0 18px;
  width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--border-3);
  background: #fff; cursor: pointer; transition: .12s; position: relative;
}
.stu-share-opt--check input[type="checkbox"]:checked { border-color: var(--primary); background: var(--primary); }
.stu-share-opt--check input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 4px; top: 0px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.stu-share-opt--check input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 3px rgba(22,119,255,.22); }

/* 填空 / 时间选择 / 下拉列表：单行输入区，宽度贴合内容 */
.stu-share-sub-input { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.stu-input {
  font: inherit; font-size: 15px; color: var(--text-1);
  padding: 10px 14px; min-width: 220px; max-width: 360px;
  border: 1px solid var(--border-2); border-radius: var(--radius);
  background: #fff; transition: .15s; outline: none;
}
.stu-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.18); }
.stu-input--time { min-width: 180px; }
.stu-input--num { min-width: 200px; }
.stu-input--select { min-width: 260px; padding-right: 32px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23777' d='M5 6L0 0h10z'/></svg>") no-repeat right 12px center; -webkit-appearance: none; appearance: none; }
.stu-input-hint { font-size: 12px; color: var(--text-3); }
.stu-input-empty { color: var(--text-3); font-style: normal; padding: 10px 14px; }

/* 人物网络题：5 个下拉框，选项为本班在校同学（含自己），框间去重 */
.stu-net { display: block; }
.stu-net-hint { font-size: 13px; color: var(--text-2); margin-bottom: 10px; line-height: 1.6; }
.stu-net-list { display: flex; flex-direction: column; gap: 10px; }
.stu-net-row { display: flex; align-items: center; gap: 12px; }
.stu-net-idx { flex: 0 0 64px; font-size: 14px; color: var(--text-2); font-weight: 500; }
.stu-net-sel { flex: 1 1 auto; min-width: 0; max-width: 420px; }
.stu-net-sel option:disabled { color: var(--text-3); }

.stu-run-stat { font-size: 13px; color: var(--text-2); }
.stu-run-foot--page { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; border-top: 1px solid var(--border-1); background: #fff; }
.stu-run-foot--page .btn { flex: 0 0 auto; padding: 0 32px; }
.stu-sec-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--bg-1); border-bottom: 1px solid var(--border-2); }
.stu-sec-idx { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.stu-sec-hd-text { display: flex; flex-direction: column; gap: 2px; }
.stu-sec-title { font-size: 16px; font-weight: 700; }
.stu-sec-sub { font-size: 12px; color: var(--text-3); }
.stu-sec-desc { padding: 12px 18px; font-size: 13px; color: var(--text-2); background: var(--bg-2); line-height: 1.6; border-bottom: 1px solid var(--border-2); }
.stu-q { display: flex; gap: 12px; padding: 18px; border-bottom: 1px solid var(--border-1); }
.stu-q:last-child { border-bottom: none; }
.stu-q-no { font-size: 15px; font-weight: 700; color: var(--primary); flex: 0 0 24px; padding-top: 1px; }
.stu-q-main { flex: 1; }
.stu-q-content { font-size: 15px; font-weight: 500; line-height: 1.6; margin-bottom: 14px; }

/* 提交结果 */
.stu-result { text-align: center; padding-top: 40px; }
.result-level { display: inline-block; font-size: 22px; font-weight: 700; padding: 10px 28px; border-radius: 999px; margin-bottom: 16px; }
.result-level.lv-green { background: var(--success-bg); color: #389e0d; }
.result-level.lv-orange { background: var(--warning-bg); color: #d48806; }
.result-level.lv-red { background: var(--error-bg); color: #cf1322; }
.result-desc { font-size: 15px; color: var(--text-2); max-width: 480px; margin: 0 auto 12px; line-height: 1.7; }
.result-tip { font-size: 13px; color: var(--text-3); margin-bottom: 24px; }

/* 报告详情 */
.stu-report-level { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-radius: var(--radius); }
.stu-report-level.lv-green { background: var(--success-bg); }
.stu-report-level.lv-orange { background: var(--warning-bg); }
.stu-report-level.lv-red { background: var(--error-bg); }
.srl-left { display: flex; flex-direction: column; gap: 4px; }
.srl-tag { font-size: 12px; color: var(--text-3); }
.srl-val { font-size: 24px; font-weight: 700; }
.stu-report-level.lv-green .srl-val { color: #389e0d; }
.stu-report-level.lv-orange .srl-val { color: #d48806; }
.stu-report-level.lv-red .srl-val { color: #cf1322; }
.srl-score { text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.srl-score b { font-size: 28px; color: var(--text-1); }
.dim { margin-bottom: 14px; }
.dim-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.dim-val { color: var(--text-3); }
.dim-bar { height: 10px; background: #f0f0f0; border-radius: 6px; overflow: hidden; }
.dim-bar-in { height: 100%; border-radius: 6px; background: var(--success); transition: width .4s; }
.dim-bar-in.lv-green { background: var(--success); }
.dim-bar-in.lv-orange { background: var(--warning); }
.dim-bar-in.lv-red { background: var(--error); }
.report-sum { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ============================================================
   PC 学生端 · 完整功能（镜像手机端，桌面布局）
   ============================================================ */

/* 外壳：左侧导航 + 顶部栏 + 内容（原 column 布局改为 row） */
.stu-shell { flex-direction: row; }
.stu-side {
  width: 220px; flex: 0 0 220px;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  color: var(--sidebar-text);
  display: flex; flex-direction: column; overflow: hidden;
}
.stu-side-brand {
  height: var(--header-h); display: flex; align-items: center; padding: 0 18px;
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); white-space: nowrap;
}
.stu-side-brand::before {
  content: "知"; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; margin-right: 8px;
  background: linear-gradient(135deg, #1677ff, #4096ff); color: #fff; font-size: 13px;
}
.stu-side-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.stu-side-item {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px;
  color: var(--sidebar-text); cursor: pointer; white-space: nowrap; position: relative;
  transition: background 0.15s, color 0.15s;
}
.stu-side-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.stu-side-item.on { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.stu-side-item.on::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary);
}
.ssi-ic { width: 18px; height: 18px; flex: 0 0 18px; display: flex; align-items: center; justify-content: center; }
.ssi-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.stu-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--error); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}
.stu-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.stu-hello { font-size: 14px; color: var(--text-2); }

/* 轻量 Toast */
.toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.82); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 2000; box-shadow: var(--shadow-2); animation: fadeIn 0.2s ease;
}

/* 首页 */
.stu-home-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.stu-greet { font-size: 20px; font-weight: 700; }
.stu-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.stu-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; flex: 0 0 44px;
}
.stu-sos {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-radius: var(--radius); background: linear-gradient(135deg, #fff1f0, #ffe7e0);
  border: 1px solid #ffccc7; cursor: pointer; margin-bottom: 20px;
}
.stu-sos-title { font-size: 16px; font-weight: 600; color: #cf1322; }
.stu-sos-desc { font-size: 13px; color: #ad2102; margin-top: 4px; }
.stu-sos-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--error); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: 0 0 44px;
}
.stu-sec-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 12px; }
.link-more { font-size: 13px; color: var(--primary); cursor: pointer; }
.link-more:hover { color: var(--primary-hover); }
.stu-quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.stu-quick {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
  transition: all 0.15s; position: relative; font-size: 13px;
}
.stu-quick:hover { box-shadow: var(--shadow-2); border-color: #b8d8ff; }
.sq-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.stu-badge-mini {
  position: absolute; top: 8px; right: 10px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--error); color: #fff; font-size: 10px; line-height: 16px; text-align: center;
}
.stu-tip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stu-tip { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stu-tip-ic { font-size: 22px; margin-bottom: 8px; }
.stu-tip-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.stu-tip-desc { font-size: 12px; color: var(--text-3); line-height: 1.6; }

/* 心理咨询 */
.stu-counselor {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1);
  padding: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 14px;
}
.co-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600;
  flex: 0 0 48px; position: relative;
}
.co-avatar.off { background: #d9d9d9; }
.co-dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 2px solid #fff; }
.co-main { flex: 1; min-width: 0; }
.co-top { display: flex; align-items: center; gap: 8px; }
.co-name { font-weight: 600; font-size: 15px; }
.co-title { font-size: 12px; color: var(--text-3); }
.co-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.co-slots { font-size: 12px; color: var(--text-2); }
.co-acts { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.btn-ghost { border: 1px solid var(--border-2); background: #fff; color: var(--text-2); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); background: #fff; }
.stu-appoint { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.ap-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ap-counselor { font-weight: 600; font-size: 14px; }
.ap-meta { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* 预约表单 */
.counsel-pick { display: flex; align-items: center; gap: 12px; }

/* 危机求助 */
.stu-banner {
  background: linear-gradient(135deg, #fff7e6, #fffbe6); border: 1px solid #ffe09c; color: #ad6800;
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; text-align: center;
}
.stu-hotline {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.hl-main { min-width: 0; }
.hl-name { font-weight: 600; font-size: 14px; }
.hl-desc { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.hl-call {
  border: 1px solid var(--primary); color: var(--primary); background: #fff; padding: 6px 16px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; flex: 0 0 auto;
}
.hl-call:hover { background: var(--primary); color: #fff; }
.stu-self-help {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.sh-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-bg); display: flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 40px; }
.sh-main { flex: 1; min-width: 0; }
.sh-title { font-weight: 600; font-size: 14px; }
.sh-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stu-arrow { color: var(--text-3); font-size: 18px; flex: 0 0 auto; }

/* 心理资源 */
.stu-res {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all 0.15s;
}
.stu-res:hover { box-shadow: var(--shadow-2); border-color: #b8d8ff; }
.stu-res-main { flex: 1; min-width: 0; }
.stu-res-title { font-weight: 600; font-size: 14px; }
.stu-res-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.stu-res-tag { font-size: 12px; color: var(--text-2); flex: 0 0 auto; }
.stu-res-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.stu-res-sum { font-size: 14px; color: var(--text-1); line-height: 1.7; margin-bottom: 12px; }
.stu-res-body { font-size: 13px; color: var(--text-2); line-height: 1.8; }

/* 通知 */
.stu-notice { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; cursor: pointer; }
.stu-notice.unread { border-color: #b8d8ff; background: #f5f9ff; }
.nt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nt-title { font-weight: 600; font-size: 14px; }
.nt-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 460px; }
.nt-time { font-size: 12px; color: var(--text-3); flex: 0 0 auto; }
.nt-desc { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.6; }
.nt-foot { font-size: 12px; color: var(--primary); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.nt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

/* 我的 */
.stu-me-head { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.me-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; flex: 0 0 52px;
}
.me-info { min-width: 0; }
.me-name { font-size: 18px; font-weight: 600; }
.me-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.stu-me-card { padding: 4px 18px; margin-bottom: 16px; }
.mc-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.mc-row:last-child { border-bottom: none; }
.mc-row > span:first-child { color: var(--text-3); }
.mc-row > span:last-child { font-weight: 500; }
.stu-me-menu { padding: 6px 18px; }
.mm-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--border); cursor: pointer; font-size: 14px; }
.mm-item:last-child { border-bottom: none; }
.mm-item.danger { color: var(--error); }
.mm-ic { width: 20px; text-align: center; }
.mm-label { flex: 1; }

/* ---------------- 可视化大屏 ---------------- */
.bs { padding: 0; background: #f0f2f5; min-height: 100%; }
.bs-banner { position: relative; padding: 28px 32px 18px; background: linear-gradient(180deg, #e6f4ff 0%, #f0f7ff 100%); border-bottom: 1px solid #d6e4ff; overflow: hidden; }
.bs-banner-bg { position: absolute; inset: 0; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'><path d='M0 60 Q300 20 600 50 T1200 40 V80 H0 Z' fill='%23bae0ff' opacity='.5'/><path d='M0 70 Q300 30 600 55 T1200 50 V80 H0 Z' fill='%2391caff' opacity='.4'/></svg>") no-repeat center bottom; background-size: cover; pointer-events: none; }
.bs-banner-title { position: relative; font-size: 26px; font-weight: 700; color: #1d39c4; letter-spacing: 2px; text-align: center; }
.bs-main { padding: 16px; display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 16px; }
.bs-col { display: flex; flex-direction: column; gap: 16px; }
.bs-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,21,41,.08); padding: 12px 14px; }
.bs-card-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #1677ff; padding-bottom: 6px; margin-bottom: 10px; font-size: 13px; }
.bs-card-head-red    { border-bottom-color: #f5222d; }
.bs-card-head-cyan   { border-bottom-color: #13c2c2; }
.bs-card-head-green  { border-bottom-color: #52c41a; }
.bs-card-head-2col   { border-bottom-color: #1677ff; gap: 8px; font-size: 12px; }
.bs-card-title { font-weight: 600; color: #1677ff; }
.bs-card-head-red .bs-card-title, .bs-card-head-red span:first-child { color: #f5222d; }
.bs-card-head-cyan .bs-card-title, .bs-card-head-cyan span:first-child { color: #13c2c2; }
.bs-card-head-green .bs-card-title, .bs-card-head-green span:first-child { color: #52c41a; }
.bs-card-sub { color: #8c8c8c; font-size: 12px; }
.bs-pill { background: #e6f4ff; color: #1677ff; padding: 1px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }

/* 雷达 */
.bs-radar { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 8px; align-items: center; }
.bs-radar-stats { display: flex; flex-direction: column; gap: 4px; }
.bs-radar-stats > div { display: flex; justify-content: space-between; padding: 3px 6px; background: #f6ffed; border-radius: 4px; font-size: 12px; }
.bs-radar-stats b { color: #389e0d; }

/* 班级对照大数 */
.bs-bigrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.bs-bigcell { background: #f6ffed; border-radius: 6px; padding: 8px 6px; text-align: center; }
.bs-bigcell-label { font-size: 11px; color: #595959; line-height: 1.4; margin-bottom: 4px; }
.bs-bigcell-num { font-size: 28px; font-weight: 700; line-height: 1; }
.bs-bigcell-num span { font-size: 12px; font-weight: 500; color: #595959; margin-left: 2px; }

/* mini 表格 */
.bs-mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bs-mini-table th, .bs-mini-table td { border: 1px solid #f0f0f0; padding: 5px 6px; text-align: center; }
.bs-mini-table th { background: #fafafa; color: #595959; font-weight: 500; }
.bs-mini-table td { color: #262626; }

/* 用户总览 */
.bs-userrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bs-usercell { text-align: center; padding: 6px 4px; border-right: 1px solid #f0f0f0; }
.bs-usercell:last-child { border-right: none; }
.bs-usercell-name { font-size: 12px; color: #8c8c8c; }
.bs-usercell-val { font-size: 32px; font-weight: 700; line-height: 1.2; }
.bs-usercell-rows { font-size: 11px; color: #595959; text-align: left; padding: 0 4px; }
.bs-usercell-rows > div { display: flex; align-items: center; gap: 4px; padding: 2px 0; border-bottom: 1px dashed #f0f0f0; }
.bs-usercell-rows > div:last-child { border-bottom: none; }
.bs-usercell-rows b { margin-left: auto; color: #262626; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

/* 三联 */
.bs-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* 环图 */
.bs-donut { display: flex; flex-direction: column; align-items: center; }
.bs-legend { font-size: 11px; color: #595959; padding: 4px 0; line-height: 1.8; }
.bs-legend > div { display: flex; align-items: center; gap: 4px; }
.bs-legend i { color: #262626; font-style: normal; margin-left: auto; font-weight: 600; }

/* 柱图 */
.bs-bars { display: flex; gap: 4px; height: 130px; align-items: flex-end; padding: 0 2px; }
.bs-baritem { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.bs-bar-num { font-size: 10px; color: #262626; font-weight: 600; }
.bs-bar-track { background: #f5f5f5; width: 10px; flex: 1; border-radius: 2px 2px 0 0; overflow: hidden; display: flex; align-items: flex-end; }
.bs-bar-fill { width: 100%; border-radius: 2px 2px 0 0; transition: height .5s; }
.bs-bar-label { font-size: 10px; color: #8c8c8c; }
.bs-baritem-mini .bs-bar-label { font-size: 9px; }

/* 流程柱图 */
.bs-flow { display: flex; align-items: stretch; height: 180px; position: relative; padding-left: 28px; }
.bs-flow-bars { display: flex; gap: 6px; flex: 1; align-items: flex-end; }
.bs-flow-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.bs-flow-num { font-size: 11px; color: #262626; font-weight: 600; }
.bs-flow-track { background: #fafafa; width: 22px; flex: 1; border: 1px solid #f0f0f0; border-radius: 2px 2px 0 0; overflow: hidden; display: flex; align-items: flex-end; }
.bs-flow-fill { width: 100%; border-radius: 2px 2px 0 0; transition: height .5s; }
.bs-flow-label { font-size: 10px; color: #8c8c8c; margin-top: 4px; }
.bs-flow-axis { position: absolute; left: 0; top: 0; bottom: 24px; display: flex; flex-direction: column; justify-content: space-between; font-size: 9px; color: #8c8c8c; }

/* 打榜榜 */
.bs-rank { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bs-rank-col { font-size: 12px; }
.bs-rank-head { background: #fafafa; padding: 4px 8px; color: #595959; font-weight: 600; border-bottom: 1px solid #f0f0f0; }
.bs-rank-row { display: flex; align-items: center; gap: 6px; padding: 4px 4px; border-bottom: 1px dashed #f5f5f5; }
.bs-rank-num { width: 18px; height: 18px; border-radius: 50%; background: #1677ff; color: #fff; text-align: center; line-height: 18px; font-size: 11px; font-weight: 600; }
.bs-rank-row:nth-child(n+3) .bs-rank-num { background: #8c8c8c; }
.bs-rank-name { flex: 1; color: #262626; }
.bs-rank-v { color: #8c8c8c; font-size: 11px; }

/* 干预进度 环 */
.bs-rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 0; }
.bs-ring { text-align: center; }
.bs-ring-name { font-size: 11px; padding: 2px 0; }
.bs-ring-name b { font-size: 13px; margin-left: 4px; }
.bs-ring-part { font-size: 10px; color: #8c8c8c; }

.bs-rings-detail { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 8px; padding: 6px 0 4px; border-top: 1px dashed #f0f0f0; font-size: 11px; color: #595959; }
.bs-rd-item { display: flex; align-items: center; gap: 4px; }
.bs-rd-step { color: #8c8c8c; }
.bs-rd-item b { margin-left: auto; color: #262626; }

/* 双因素模型框（测评模型与量表） */
.model-box { border: 1px solid #f0f0f0; border-radius: 10px; padding: 14px 16px; }
.model-box-title { font-weight: 600; margin-bottom: 10px; }
.model-protect { background: linear-gradient(180deg, #f6ffed, #fff); border-color: #b7eb8f; }
.model-risk { background: linear-gradient(180deg, #fff1f0, #fff); border-color: #ffccc7; }
.scale-core { border: 1px solid #f0f0f0; border-radius: 10px; padding: 12px 14px; background: #fff; }
/* 流程步骤（测评入口） */
.flow-steps { display: flex; flex-direction: column; gap: 10px; }
.flow-step { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.fs-no { width: 24px; height: 24px; border-radius: 50%; background: #1677ff; color: #fff; text-align: center; line-height: 24px; font-size: 12px; font-weight: 600; flex: none; }

/* ===== 老式每题一页答题（复刻 xinxianggang） ===== */
.stu-task-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.stu-task-main { min-width: 0; }
.stu-task-name { font-size: 16px; font-weight: 600; color: var(--text-1); }
.stu-task-meta { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.stu-task-side { display: flex; align-items: center; gap: 12px; flex: none; }
.stu-badge-tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--bg-1); color: var(--text-2); border: 1px solid var(--border-2); }
.stu-badge-tag.lb-A-running { background: #e6f4ff; color: #1677ff; border-color: #91caff; }
.stu-badge-tag.lb-B-submitted { background: #f6ffed; color: #52c41a; border-color: #b7eb8f; }
.stu-badge-tag.lb-C-overdue { background: #fff2e8; color: #fa8c16; border-color: #ffd591; }
.stu-badge-tag.lb-D-nostart { background: #fafafa; color: #8c8c8c; border-color: #d9d9d9; }

.stu-answer-run .stu-timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-2); background: var(--bg-1); padding: 4px 12px; border-radius: 999px; }
.stu-answer-run .stu-timer.warn { color: #cf1322; background: #fff1f0; }
.stu-progress { height: 6px; background: var(--bg-1); border-radius: 999px; overflow: hidden; margin: 0 0 16px; }
.stu-progress-in { height: 100%; background: linear-gradient(90deg, #1677ff, #69b1ff); transition: width .25s ease; }

.stu-q-card { padding: 22px 22px 16px; }
.stu-q-title { font-size: 16px; font-weight: 600; line-height: 1.6; color: var(--text-1); margin-bottom: 18px; }
.stu-q-idx { color: var(--primary); margin-right: 6px; }
.stu-opts { display: flex; flex-direction: column; gap: 12px; }
.stu-opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: var(--radius); cursor: pointer; transition: all .15s; background: #fff; font-size: 14px; }
.stu-opt:hover { border-color: var(--primary-hover); background: var(--bg-hover); }
.stu-opt.on { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-active); font-weight: 500; }
.stu-opt.on .ro-dot { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px #fff; }
.stu-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: var(--radius); font-size: 14px; margin-top: 14px; box-sizing: border-box; background: #fff; }
.stu-input:focus { outline: none; border-color: var(--primary); }

.stu-rel { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--border-2); }
.stu-rel-l { flex: 1; font-size: 14px; color: var(--text-1); }
.stu-rel .stu-input { width: 220px; margin-top: 0; }

.stu-child { border: 1px solid var(--border-2); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; background: var(--bg-1); }
.stu-child-q { font-size: 14px; font-weight: 500; color: var(--text-1); margin-bottom: 12px; }

.stu-run-bar { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-2); }
.stu-run-spacer { flex: 1; }

.stu-end { text-align: center; padding: 48px 20px; }
.stu-end-ic { font-size: 44px; }
.stu-end-title { font-size: 20px; font-weight: 700; margin: 12px 0 6px; color: var(--text-1); }
.stu-end-sub { color: var(--text-3); margin-bottom: 20px; }

/* ====== 题库管理：答案配图（图床缩略图） ====== */
.ans-pic-thumb {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--border-1, #e5e9f0);
  overflow: hidden;
  background: #f6f8fb;
  vertical-align: middle;
}
.ans-pic-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ans-pic-thumb--sm { width: 56px; height: 42px; }
.ans-pic-thumb .ans-pic-x {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  background: rgba(0,0,0,.65);
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  display: none;
}
.ans-pic-thumb:hover .ans-pic-x { display: block; }
.ans-pic-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  border: 1px dashed #b8c2d1;
  background: #fff;
  cursor: pointer;
  color: #5a6b85;
  border-radius: 4px;
}
.ans-pic-add:hover { border-color: #1677ff; color: #1677ff; background: #f0f7ff; }

/* ===== 校级完整报告页（SchoolReportFull） ===== */
.school-full .report-text p {
  font-size: 14px;
  line-height: 1.9;
  color: #333;
  margin: 6px 0;
}
.school-full .chunk-title {
  font-size: 13px;
  color: #5a6b85;
  margin-bottom: 4px;
}
.school-full .chunk-chart {
  width: 100%;
}

/* ===== 校级完整报告：论文式排版（对照示例 PDF），拉满整行 ===== */
.school-full .rpt-doc {
  max-width: none;
  width: 100%;
  margin: 0;
  background: #fff;
  padding: 32px 48px 48px;
  box-sizing: border-box;
}
.school-full .rpt-h1 {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin: 28px 0 14px;
}
.school-full .rpt-h2 {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin: 24px 0 10px;
}
.school-full .rpt-h3 {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin: 14px 0 8px;
}
.school-full .rpt-para {
  font-size: 14px;
  line-height: 2.0;
  color: #222;
  text-align: justify;
  text-indent: 2em;
  margin: 6px 0;
}
.school-full .rpt-red {
  color: #d81e06;
  text-decoration: underline;
}
.school-full .rpt-table-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 18px 0 10px;
}
.school-full .rpt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
}
.school-full .rpt-table th,
.school-full .rpt-table td {
  border: 1px solid #333;
  padding: 8px 10px;
  font-size: 13px;
  text-align: center;
  color: #222;
}
.school-full .rpt-table th {
  background: #f5f6f8;
  font-weight: 600;
}
.school-full .rpt-chart {
  width: 100%;
  margin: 10px 0 4px;
}
.school-full .rpt-fig-cap {
  text-align: center;
  font-size: 13px;
  color: #333;
  margin: 4px 0 18px;
}

/* ===== 校级/班级报告列表：表格拉满整行 + 列内容居中与表头对齐 ===== */
.sch-tbl { width: 100%; border-collapse: collapse; }
.sch-tbl th, .sch-tbl td { text-align: center; padding: 10px 12px; }
.sch-tbl thead th { font-weight: 600; color: #333; background: #fafbfc; }
.sch-tbl tbody tr { border-bottom: 1px solid #f0f0f0; }
.sch-tbl tbody tr:hover { background: #f8faff; }
.sch-tbl-wrap { width: 100%; max-width: none; overflow-x: auto; }

/* ===== 班级网络图图例 ===== */
.sna-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 10px 16px; border: 1px solid #eee; border-radius: 8px; margin: 8px 0 20px; }
.sna-lg { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #333; }
.sna-lg-img { width: 26px; height: 32px; object-fit: contain; }

/* 语音按钮录音红点动画 */
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.3); } }

/* ===== v50 历史轮只读查看模式：禁用表单控件与按钮交互，保留滚动与文本选择 ===== */
.history-ro input,
.history-ro textarea,
.history-ro select,
.history-ro button {
  pointer-events: none;
  opacity: 0.85;
}
.history-ro .btn { cursor: default; }
/* 豁免：历史横幅内的「返回」按钮必须可点（v50.1 修复点击无反应） */
.history-ro .history-banner,
.history-ro .history-banner button {
  pointer-events: auto !important;
}
