/* ==========================================================================
   在线协作编辑平台 · 全局设计系统
   组织顺序：设计令牌 → 基础重置 → 布局 → 顶栏 → 卡片 → 表单 → 按钮
             → 表格 → 徽标 → 弹窗 → Toast → 空状态 → 小组卡片 → 页签
             → 协作编辑器 → 预览 → 工具类 → 响应式
   注意：[hidden] 强制隐藏，避免被 flex/grid 布局覆盖导致页签切换失效
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 主色（靛蓝） */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #7c3aed 100%);

  /* 中性色 */
  --bg:     #f6f7fb;
  --card:   #ffffff;
  --text:   #1e293b;
  --text-2: #475569;
  --muted:  #7c8798;
  --border: #e6e9f0;
  --border-2:#eef1f6;
  --hover:  #f8fafc;

  /* 语义色 */
  --danger: #e11d48;
  --danger-bg:#ffe4e6;
  --ok:     #059669;
  --ok-bg:  #d1fae5;
  --warn:   #d97706;
  --warn-bg:#fef3c7;
  --info:   #0284c7;
  --info-bg:#e0f2fe;

  /* 尺寸 */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px; --r-full: 999px;

  /* 阴影 */
  --sh-xs: 0 1px 2px rgba(15,23,42,.05);
  --sh-sm: 0 1px 2px rgba(15,23,42,.04), 0 2px 8px rgba(15,23,42,.05);
  --sh:    0 2px 4px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --sh-lg: 0 12px 28px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.06);
  --sh-brand: 0 6px 18px rgba(79,70,229,.28);

  --ring: 0 0 0 3px rgba(99,102,241,.18);
  --t: .18s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px; line-height: 1.65; color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 420px at 12% -8%, rgba(99,102,241,.10), transparent 60%),
    radial-gradient(760px 380px at 92% 0%, rgba(124,58,237,.08), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-600); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--brand-700); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand-100); color: var(--brand-700); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #cbd5e1; border-radius: var(--r-full);
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

/* ---------- 3. 布局 ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: var(--sp-8) var(--sp-5) var(--sp-10); }
.container.narrow { max-width: 760px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5);
}
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-head .actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.row { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.row.tight { gap: var(--sp-2); }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-4); }
.grow { flex: 1 1 auto; min-width: 0; }
.divider { height: 1px; background: var(--border-2); margin: var(--sp-4) 0; border: 0; }

/* ---------- 4. 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: var(--sp-3);
  height: 60px; padding: 0 var(--sp-5);
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.topbar .brand:hover { color: var(--text); }
.brand-logo {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: var(--brand-grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(79,70,229,.32);
}
.brand-logo svg { width: 17px; height: 17px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text small { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.topbar .spacer { flex: 1; }
.topbar .crumb {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted);
  padding-left: var(--sp-3); margin-left: var(--sp-1); border-left: 1px solid var(--border);
}
.topbar .crumb b { color: var(--text); font-weight: 600; }

/* 用户胶囊 */
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 4px; border-radius: var(--r-full);
  background: #fff; border: 1px solid var(--border);
}
.user-chip .user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip .user-meta b { font-size: 13px; font-weight: 600; }
.user-chip .user-meta span { font-size: 11px; color: var(--muted); }

/* 头像 */
.avatar {
  width: 34px; height: 34px; border-radius: var(--r-full); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff; letter-spacing: .02em;
  background: var(--brand-grad); box-shadow: var(--sh-xs);
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar.gray { background: linear-gradient(135deg, #94a3b8, #64748b); }
.avatar.green { background: linear-gradient(135deg, #34d399, #059669); }
.avatar.amber { background: linear-gradient(135deg, #fbbf24, #d97706); }
.avatar.rose { background: linear-gradient(135deg, #fb7185, #e11d48); }
.avatar.violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.avatar.cyan { background: linear-gradient(135deg, #22d3ee, #0284c7); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid #fff; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- 5. 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  padding: var(--sp-5); margin-bottom: var(--sp-4);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4);
}
.card-head h2, .card h2 {
  font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 8px;
}
.card-head h2::before, .card > h2::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--brand-grad); flex: none;
}
.card-head .desc, .card .desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5); background: #fbfcfe; border-top: 1px solid var(--border-2);
  color: var(--muted); font-size: 12px;
}
.card.flush > .card-head { padding: var(--sp-5) var(--sp-5) 0; margin-bottom: 0; }
.card.flush > .card-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.card.disabled { opacity: .68; }

/* 统计块 */
.stat { display: flex; align-items: center; gap: var(--sp-3); }
.stat .stat-icon {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand-600); font-size: 17px;
}
.stat .stat-val { font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.stat .stat-label { font-size: 12px; color: var(--muted); }

/* ---------- 6. 表单 ---------- */
label, .label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=datetime-local], input[type=number],
input[type=file], select, textarea {
  width: 100%; padding: 9px 12px; font-size: 14px;
  background: #fff; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
input::placeholder, textarea::placeholder { color: #a9b3c1; }
input:hover, select:hover, textarea:hover { border-color: #d3d9e4; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand-500); box-shadow: var(--ring);
}
textarea { resize: vertical; min-height: 76px; line-height: 1.7; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c8798' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input[type=file] { padding: 7px 10px; color: var(--muted); cursor: pointer; }
input[type=file]::file-selector-button {
  margin-right: 10px; padding: 6px 12px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: #fff; color: var(--text-2); cursor: pointer; transition: var(--t);
}
input[type=file]::file-selector-button:hover { background: var(--hover); border-color: #d3d9e4; }
input[type=checkbox] { accent-color: var(--brand-600); width: 16px; height: 16px; cursor: pointer; }
input[type=number] { -moz-appearance: textfield; }

.field { margin-bottom: var(--sp-4); }
.field:last-child { margin-bottom: 0; }
.field .hint, .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* 带图标输入框 */
.input-icon { position: relative; }
.input-icon > svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #a9b3c1; pointer-events: none; transition: color var(--t);
}
.input-icon > input { padding-left: 38px; }
.input-icon:focus-within > svg { color: var(--brand-600); }

/* 拖拽上传区 */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: var(--sp-6); text-align: center; cursor: pointer;
  border: 1.5px dashed #cfd6e4; border-radius: var(--r);
  background: #fbfcfe; transition: var(--t);
}
.dropzone:hover { border-color: var(--brand-500); background: var(--brand-50); }
.dropzone .dz-icon { font-size: 22px; color: var(--brand-600); }
.dropzone .dz-main { font-size: 13.5px; font-weight: 600; }
.dropzone .dz-sub { font-size: 12px; color: var(--muted); }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; font-size: 14px; font-weight: 500; line-height: 1.2;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--brand-grad); color: #fff; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(79,70,229,.18);
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t);
}
.btn:hover { box-shadow: var(--sh-brand); transform: translateY(-1px); color: #fff; }
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(79,70,229,.2); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.secondary { background: #fff; color: var(--text-2); border-color: var(--border); box-shadow: var(--sh-xs); }
.btn.secondary:hover { background: var(--hover); border-color: #d3d9e4; color: var(--text); box-shadow: var(--sh-xs); }
.btn.ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn.ghost:hover { background: #eef1f6; color: var(--text); box-shadow: none; }
.btn.danger { background: var(--danger); box-shadow: 0 1px 2px rgba(225,29,72,.22); }
.btn.danger:hover { background: #be123c; box-shadow: 0 6px 18px rgba(225,29,72,.26); }
.btn.success { background: var(--ok); box-shadow: 0 1px 2px rgba(5,150,105,.22); }
.btn.success:hover { background: #047857; box-shadow: 0 6px 18px rgba(5,150,105,.26); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.btn.lg { padding: 11px 22px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.icon { padding: 8px; width: 34px; height: 34px; }
.btn.icon svg { width: 16px; height: 16px; }

/* 行内操作链接 */
.act { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; }
.act-links { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.act-links .sep { color: #cbd5e1; }
.link-danger { color: var(--danger) !important; }
.link-danger:hover { color: #be123c !important; }
.link-muted { color: var(--muted) !important; }

/* ---------- 8. 表格 ---------- */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: var(--r); background: #fff;
}
.card.flush .table-wrap { border: 0; border-radius: 0; border-top: 1px solid var(--border-2); }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; }
table.list th, table.list td {
  padding: 12px 14px; text-align: left; font-size: 13px;
  border-bottom: 1px solid var(--border-2); vertical-align: middle;
}
table.list th {
  background: #f8fafc; color: var(--text-2); font-weight: 600; font-size: 12px;
  letter-spacing: .03em; white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.list thead tr:first-child th:first-child { border-top-left-radius: var(--r); }
table.list thead tr:first-child th:last-child { border-top-right-radius: var(--r); }
table.list tbody tr { transition: background var(--t); }
table.list tbody tr:hover { background: #f9fbfe; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list td:first-child { font-weight: 500; }
table.list .cell-main { display: flex; align-items: center; gap: 9px; min-width: 0; }
table.list .cell-main > :first-child { flex: none; }
table.list .cell-main > .break { flex: 1 1 auto; min-width: 0; }
/* 窄屏时避免关键列被压缩到逐字换行（列内文本仍正常折行） */
table.list .num { font-variant-numeric: tabular-nums; }
table.list.compact th, table.list.compact td { padding: 9px 12px; }
table.list th[width], table.list td.center, table.list th.center { text-align: center; }

/* ---------- 9. 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: #f1f5f9; color: var(--text-2);
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.badge.blue   { background: var(--brand-50); color: var(--brand-700); }
.badge.green  { background: var(--ok-bg);     color: #047857; }
.badge.orange { background: var(--warn-bg);   color: #b45309; }
.badge.red    { background: var(--danger-bg); color: #be123c; }
.badge.gray   { background: #f1f5f9;          color: var(--muted); }
.badge.cyan   { background: var(--info-bg);   color: #0369a1; }
.badge.outline { background: #fff; border: 1px solid var(--border); color: var(--text-2); }

/* ---------- 10. 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 120; padding: var(--sp-4);
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.42);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: maskIn .16s ease-out;
}
.modal {
  width: 100%; max-width: 540px; max-height: 88vh; overflow: auto;
  background: #fff; border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(15,23,42,.24);
  animation: modalIn .2s cubic-bezier(.34,1.3,.64,1);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border-2);
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.modal-head h3 { font-size: 15px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px; flex: none; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--muted); font-size: 18px; line-height: 1;
  cursor: pointer; transition: var(--t);
}
.modal-close:hover { background: #eef1f6; color: var(--text); }
.modal-body { padding: var(--sp-5); }
.modal.wide { max-width: 760px; }
.modal .actions {
  display: flex; gap: var(--sp-2); justify-content: flex-end;
  margin-top: var(--sp-5); flex-wrap: wrap;
}
.modal .section-label {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  letter-spacing: .03em; margin-bottom: var(--sp-2);
}
.modal .card { box-shadow: none; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* 弹窗内可勾选学生行 */
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 6px;
  cursor: pointer; transition: var(--t); background: #fff;
}
.pick-row:hover { border-color: var(--brand-200); background: var(--brand-50); }
.pick-row .grow { font-size: 13.5px; }
.pick-list { max-height: 250px; overflow: auto; padding: 2px; }

/* ---------- 11. Toast ---------- */
#toast-box {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: var(--sp-2);
  align-items: center; pointer-events: none;
}
.toast {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: var(--r-full);
  background: #fff; color: var(--text); font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--border); box-shadow: var(--sh-lg);
  max-width: min(80vw, 520px);
  animation: toastIn .22s cubic-bezier(.34,1.3,.64,1);
}
.toast::before {
  content: ''; width: 16px; height: 16px; flex: none; border-radius: 50%;
  background: var(--brand-600) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M12 8v5'/%3E%3Cpath d='M12 16.5v.01'/%3E%3C/svg%3E") center/11px no-repeat;
}
.toast.ok { border-color: #a7f3d0; }
.toast.ok::before {
  background-color: var(--ok);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
.toast.err { border-color: #fecdd3; }
.toast.err::before {
  background-color: var(--danger);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- 12. 空状态 / 加载 ---------- */
.empty-tip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: var(--sp-8) var(--sp-4); text-align: center;
  color: var(--muted); font-size: 13px;
}
.empty-tip::before {
  content: ''; width: 44px; height: 44px; border-radius: var(--r-full);
  background: #f1f5f9 url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h9l4 4v12H4z'/%3E%3Cpath d='M13 4v5h4'/%3E%3C/svg%3E") center/22px no-repeat;
}
td .empty-tip, .empty-tip.inline { padding: var(--sp-6) var(--sp-4); }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 37%, #eef1f6 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; color: transparent; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 13. 小组卡片 ---------- */
/* 小组图标（卡片内与列表内通用） */
.gc-icon {
  width: 36px; height: 36px; flex: none; border-radius: 10px; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand-600);
}
.group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--sp-3); }
.group-card {
  position: relative; padding: var(--sp-5); cursor: pointer; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--sh-xs); transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.group-card::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand-grad); opacity: 0; transition: opacity var(--t);
}
.group-card:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--brand-200); }
.group-card:hover::after { opacity: 1; }
.group-card .gc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.group-card .name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.group-card .meta { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: var(--sp-3); }
.group-card .go { position: absolute; right: var(--sp-4); bottom: var(--sp-4); color: #c7d2fe; font-size: 16px; transition: var(--t); }
.group-card:hover .go { color: var(--brand-600); transform: translateX(3px); }

/* ---------- 14. 页签 ---------- */
.tabs {
  display: inline-flex; gap: 3px; padding: 4px; margin-bottom: var(--sp-5);
  background: #eceff5; border-radius: var(--r); position: relative;
}
.tabs .tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; font-size: 13.5px; font-weight: 500; color: var(--text-2);
  border-radius: 9px; cursor: pointer; user-select: none; transition: var(--t);
}
.tabs .tab:hover { color: var(--text); }
.tabs .tab.active { background: #fff; color: var(--brand-600); font-weight: 600; box-shadow: var(--sh-xs); }
.tabs .tab .tab-ico { font-size: 14px; opacity: .85; }

/* ---------- 15. 协作编辑器 ---------- */
.editor-shell { max-width: 940px; margin: 0 auto; padding: var(--sp-6) var(--sp-5) var(--sp-8); }
.editor-head {
  display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.editor-head .doc-title { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.online-list { display: flex; gap: 6px; flex-wrap: wrap; }
.online-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-2); background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-full); padding: 3px 11px 3px 8px;
  box-shadow: var(--sh-xs);
}
.online-dot i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  display: inline-block; flex: none; box-shadow: 0 0 0 3px rgba(5,150,105,.16);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(5,150,105,.16); }
  50% { box-shadow: 0 0 0 5px rgba(5,150,105,.06); }
}

.editor-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh); overflow: hidden;
}
.block-row { display: flex; align-items: stretch; border-bottom: 1px solid #f4f6fa; }
.block-row:last-child { border-bottom: none; }
.block-row:hover .block-gutter { background: #f1f5f9; color: var(--brand-600); }
.block-gutter {
  width: 52px; flex: none; position: relative;
  display: flex; align-items: center; justify-content: center;
  color: #a9b3c1; font-size: 11.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #fafbfd; border-right: 1px solid #f4f6fa; user-select: none;
  transition: background var(--t), color var(--t);
}
.block-gutter .lock-badge {
  position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  font-size: 9.5px; color: var(--warn); white-space: nowrap; font-weight: 600;
}
.block-content {
  flex: 1; min-width: 0; padding: 8px 18px; min-height: 38px;
  white-space: pre-wrap; word-break: break-word;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px; line-height: 1.75; color: var(--text);
  border-left: 3px solid transparent; transition: background .3s, border-color .2s;
}
.block-content:hover { background: #fcfdff; }
.block-content[contenteditable=true] {
  background: #fffdf5; border-left-color: var(--brand-500); outline: none;
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.14); cursor: text;
}
.block-content.locked-by-other {
  background: #fdf5f6; color: #a3aab5; cursor: not-allowed;
  background-image: repeating-linear-gradient(45deg, rgba(225,29,72,.035) 0 8px, transparent 8px 16px);
}
.block-content.remote-updating { background: var(--brand-50); border-left-color: var(--brand-200); }

.editor-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 11px var(--sp-5); background: #fbfcfe; border-top: 1px solid var(--border-2);
  color: var(--muted); font-size: 12px; flex-wrap: wrap;
}
.editor-foot .keys { display: inline-flex; gap: 6px; align-items: center; }
kbd {
  display: inline-block; padding: 1px 6px; font-size: 11px; font-family: inherit;
  color: var(--text-2); background: #fff; border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 5px;
}
#save-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text-2); }
#save-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none;
}

/* 冲突弹窗文本块 */
.conflict-text {
  padding: 11px 14px; margin-bottom: var(--sp-3); max-height: 150px; overflow: auto;
  background: #f8fafc; border: 1px solid var(--border); border-left: 3px solid var(--brand-200);
  border-radius: var(--r-sm); font-family: ui-monospace, Menlo, monospace;
  font-size: 13px; white-space: pre-wrap; word-break: break-word;
}

/* ---------- 16. 预览 ---------- */
.preview-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh); padding: var(--sp-5); text-align: center;
}
.preview-box img { max-width: 100%; margin: 0 auto; border-radius: var(--r); box-shadow: var(--sh-sm); }
.preview-box iframe { width: 100%; height: 74vh; border: 0; border-radius: var(--r); background: #f8fafc; }

/* ---------- 17. 作业 ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); }
.detail-item .dt-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.detail-item .dt-value { font-size: 14px; font-weight: 500; }
.prose { font-size: 13.5px; color: var(--text-2); line-height: 1.8; white-space: pre-wrap; }

/* ---------- 18. 登录页 ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-hero {
  position: relative; overflow: hidden; padding: var(--sp-10) 56px;
  display: flex; flex-direction: column; justify-content: space-between; color: #fff;
  background: var(--brand-grad);
}
.login-hero::before, .login-hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.login-hero::before {
  width: 420px; height: 420px; right: -140px; top: -120px;
  background: radial-gradient(circle, rgba(255,255,255,.24), transparent 68%);
}
.login-hero::after {
  width: 320px; height: 320px; left: -100px; bottom: -110px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 68%);
}
.login-hero > * { position: relative; z-index: 1; }
.login-hero .hero-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 700; }
.login-hero .hero-brand .brand-logo { background: rgba(255,255,255,.18); box-shadow: none; backdrop-filter: blur(4px); }
.login-hero h2 { font-size: 34px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; margin-bottom: var(--sp-3); }
.login-hero p.lead { font-size: 14px; color: rgba(255,255,255,.82); max-width: 400px; }
.hero-features { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: var(--sp-8); }
.hero-feature { display: flex; align-items: flex-start; gap: 12px; }
.hero-feature .hf-icon {
  width: 34px; height: 34px; flex: none; border-radius: 10px; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.16); backdrop-filter: blur(4px);
}
.hero-feature b { display: block; font-size: 13.5px; font-weight: 600; }
.hero-feature span { font-size: 12.5px; color: rgba(255,255,255,.76); }
.login-hero .hero-foot { font-size: 12px; color: rgba(255,255,255,.62); }

.login-panel { display: flex; align-items: center; justify-content: center; padding: var(--sp-8) var(--sp-5); background: #fff; }
.login-card { width: 100%; max-width: 372px; }
.login-card h1 { font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.login-card .sub { color: var(--muted); font-size: 13px; margin: 6px 0 var(--sp-8); }
.login-card .field { margin-bottom: var(--sp-4); }
.login-card .foot {
  margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px dashed var(--border);
  text-align: center; font-size: 12px; color: var(--muted); line-height: 1.8;
}
.login-card .mobile-brand { display: none; }

/* ---------- 19. 工具类 ---------- */
.muted { color: var(--muted); }
.muted-sm { color: var(--muted); font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.bold { font-weight: 600; }
.nowrap { white-space: nowrap; }
.break { word-break: break-word; overflow-wrap: anywhere; }
.text-sm { font-size: 12.5px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.tnum { font-variant-numeric: tabular-nums; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: var(--sp-2); } .mt16 { margin-top: var(--sp-4); }
.mb4 { margin-bottom: 4px; } .mb8 { margin-bottom: var(--sp-2); } .mb16 { margin-bottom: var(--sp-4); }
.ml8 { margin-left: var(--sp-2); }
.p0 { padding: 0 !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- 20. 响应式 ---------- */
@media (max-width: 1024px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { background: linear-gradient(180deg, #eef2ff 0%, #fff 42%); min-height: 100vh; }
  .login-card .mobile-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 15px; margin-bottom: var(--sp-6);
  }
}
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .container { padding: var(--sp-5) var(--sp-4) var(--sp-8); }
  .topbar { padding: 0 var(--sp-4); }
  .card { padding: var(--sp-4); }
}
@media (max-width: 640px) {
  .topbar { height: auto; padding: var(--sp-2) var(--sp-3); flex-wrap: wrap; gap: 6px; }
  .brand-text small { display: none; }
  .user-chip { padding: 3px; gap: 6px; }
  .user-chip .user-meta { display: flex; }
  .user-chip .user-meta span { display: none; }
  .jxd-chip { padding: 5px 9px 5px 7px; }
  .jxd-chip > span { display: none; }
  .page-head h1 { font-size: 19px; }
  .tabs { width: 100%; }
  .tabs .tab { flex: 1; justify-content: center; padding: 8px 10px; }
  table.list th, table.list td { padding: 10px 12px; }
  .modal { max-height: 92vh; }
  .editor-shell { padding: var(--sp-4) var(--sp-2) var(--sp-6); }
  .block-content { padding: 8px 12px; font-size: 13px; }
  .block-gutter { width: 38px; }
  .group-cards { grid-template-columns: 1fr; }
}

/* ---------- 21. 邀请码（班级码 / 小组码） ---------- */
.code-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em;
  color: var(--brand-700); background: var(--brand-50);
  border: 1px dashed var(--brand-200); cursor: pointer;
  transition: background var(--t), border-color var(--t), transform var(--t);
  user-select: all;
}
.code-chip:hover { background: var(--brand-100); border-color: var(--brand-500); }
.code-chip:active { transform: scale(.96); }
.code-chip.lg { font-size: 17px; padding: 8px 18px; letter-spacing: .22em; }
.code-chip .copy-ico { font-size: 11px; opacity: .5; letter-spacing: 0; user-select: none; }
.code-chip:hover .copy-ico { opacity: 1; }
.code-mini {
  display: inline-block; padding: 1px 7px; border-radius: var(--r-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em;
  color: var(--brand-600); background: var(--brand-50);
}
.code-empty { color: var(--muted); font-size: 12px; }

/* 邀请码输入框 */
.join-row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
input.code-input {
  width: 200px; text-align: center; text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .2em;
}

/* 四列统计 */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }

/* 名册条目 */
.roster-item {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 7px 10px; border-radius: var(--r-sm); background: var(--hover);
  border: 1px solid var(--border-2); font-size: 13px;
}
.roster-item .no {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; color: var(--muted); min-width: 62px;
}
.roster-item .nm { font-weight: 600; flex: 1; }
.roster-list { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
@media (max-width: 860px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-4 { grid-template-columns: 1fr; } input.code-input { width: 100%; } }

/* ================= 思维导图（mind-elixir 版） ================= */
.mm-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  margin: var(--sp-4) auto;
  max-width: 1240px;
}
.mm-bar {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 10px 14px; border-bottom: 1px solid var(--border-2); flex-wrap: wrap;
}
.mm-bar .mm-spacer { flex: 1; }
.mm-status { font-size: 12px; color: var(--muted); }
.mm-container {
  height: calc(100vh - 170px);
  min-height: 420px;
  background:
    radial-gradient(circle at 18px 18px, rgba(100, 116, 139, .14) 1px, transparent 0) 0 0 / 36px 36px,
    #fbfcfe;
}
/* mind-elixir 内部细节微调（贴合站内风格） */
.mm-container svg[class*='line'] path { stroke-width: 2; }

/* ================= 在线文档（石墨风富文本，rich- 前缀） ================= */
.rich-box {
  max-width: 960px; margin: var(--sp-4) auto; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); overflow: hidden;
  display: flex; flex-direction: column; min-height: calc(100vh - 150px);
}
.rich-toolbar {
  position: sticky; top: 60px; z-index: 10;
  border-bottom: 1px solid var(--border-2); background: var(--card);
  padding: 6px 10px;
}
.rich-toolbar .w-e-toolbar { background: transparent !important; padding: 0 !important; }
.rich-paper {
  flex: 1; padding: 34px 40px; display: flex; justify-content: center;
}
#rich-editor {
  width: 100%; max-width: 720px; min-height: 560px;
  background: #fff; border: 1px solid var(--border-2); border-radius: 12px;
  padding: 40px 48px; box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}
#rich-editor .w-e-text-container { background: transparent; }
#rich-editor [data-slate-editor] { padding: 0 !important; }
.rich-foot {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px 16px; border-top: 1px solid var(--border-2);
  font-size: 12.5px; color: var(--muted);
}
.rich-foot .spacer { flex: 1; }
.rich-lock-tip {
  color: #b45309; background: #fef3c7; border: 1px solid #fde68a;
  padding: 3px 10px; border-radius: 999px; font-size: 12px;
}
/* wangEditor 弹层在页面内的层级修正 */
.w-e-bar-item .w-e-panel-content-color { max-width: 260px; }

/* ==========================================================================
   v8 全局美化增强 + 个人中心 + 评分组件
   ========================================================================== */

/* ---------- 顶栏：毛玻璃 + 渐变光晕 ---------- */
.topbar {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border-2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 2px 16px rgba(15, 23, 42, .05);
}
.brand-logo {
  box-shadow: 0 4px 12px rgba(79, 70, 229, .35), 0 0 0 0 rgba(99, 102, 241, 0);
  transition: transform var(--t), box-shadow var(--t);
}
.brand:hover .brand-logo { transform: translateY(-1px) rotate(-3deg); box-shadow: 0 6px 18px rgba(79, 70, 229, .45); }
.user-chip.clickable { cursor: pointer; transition: background var(--t), border-color var(--t), transform var(--t); }
.user-chip.clickable:hover { background: var(--brand-50); border-color: var(--brand-200); transform: translateY(-1px); }
.user-chip.clickable:active { transform: translateY(0) scale(.98); }

/* ---------- 卡片：hover 轻浮起 ---------- */
.card { transition: box-shadow var(--t), border-color var(--t), transform var(--t); }
.card:hover { box-shadow: var(--sh); border-color: #dde3ee; }
.card-head h2 { position: relative; padding-left: 14px; }
.card-head h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 16px; border-radius: 4px; background: var(--brand-grad);
}

/* ---------- 按钮：渐变主按钮 + 按压反馈 ---------- */
.btn { transition: box-shadow var(--t), transform var(--t), background var(--t), border-color var(--t); }
.btn:not(.secondary):not(.danger):not(.link-danger) {
  background: var(--brand-grad); border: none; color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, .3);
}
.btn:not(.secondary):not(.danger):not(.link-danger):hover {
  box-shadow: 0 6px 20px rgba(79, 70, 229, .42); transform: translateY(-1px); filter: brightness(1.06);
}
.btn:not(.secondary):not(.danger):not(.link-danger):active { transform: translateY(0) scale(.98); box-shadow: 0 2px 8px rgba(79, 70, 229, .3); }
.btn.secondary { border: 1px solid var(--border); background: #fff; }
.btn.secondary:hover { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-700); }
.btn:disabled { opacity: .55; pointer-events: none; }

/* ---------- 表单：聚焦光环 ---------- */
input[type=text], input[type=password], input[type=number], input[type=email], textarea, select {
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand-500) !important; box-shadow: var(--ring); outline: none; background: #fff;
}
.field label { font-weight: 600; }

/* ---------- 表格：表头浅底 + 行 hover ---------- */
table.list thead th { background: #f8f9fd; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 12px; }
table.list tbody tr { transition: background var(--t); }
table.list tbody tr:hover { background: #f6f7ff; }
table.list tbody td { border-bottom: 1px solid var(--border-2); }

/* ---------- 弹窗：缩放进入动画 ---------- */
.modal-mask { animation: fadeIn .18s ease both; }
.modal { animation: popIn .22s cubic-bezier(.34, 1.4, .64, 1) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd3e0; border-radius: 8px; border: 2px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: #aab3c8; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 空状态与徽标微调 ---------- */
.empty-tip { color: var(--muted); text-align: center; padding: 28px 16px; font-size: 13px; }
.badge { transition: transform var(--t); }
.badge:hover { transform: translateY(-1px); }

/* ---------- 顶栏用户胶囊已可点击（个人中心入口） ---------- */

/* ---------- 个人中心：渐变横幅 ---------- */
.profile-hero { overflow: hidden; padding: 0; margin-bottom: var(--sp-5); }
.ph-band { height: 88px; background: var(--brand-grad); position: relative; }
.ph-band::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px 200px at 20% 0%, rgba(255, 255, 255, .28), transparent 60%),
              radial-gradient(400px 160px at 85% 100%, rgba(255, 255, 255, .16), transparent 60%);
}
.ph-body { display: flex; align-items: flex-end; gap: var(--sp-5); padding: 0 var(--sp-6) var(--sp-5); position: relative; }
.ph-avatar {
  width: 84px; height: 84px; border-radius: 24px; margin-top: -42px;
  background: var(--brand-grad); color: #fff; font-size: 34px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 4px solid #fff; box-shadow: var(--sh-lg); flex: none; position: relative; z-index: 1;
}
.ph-info { flex: 1; padding-top: var(--sp-3); }
.ph-name { display: flex; align-items: center; gap: var(--sp-3); font-size: 20px; }
.ph-name b { font-size: 22px; letter-spacing: .5px; }
.ph-meta { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.ph-meta b { color: var(--text); }
.ph-uid { text-align: right; padding-top: var(--sp-4); }
.ph-uid-num { font-size: 18px; font-weight: 700; color: var(--brand-600); font-family: ui-monospace, monospace; }

/* ---------- 个人中心：两栏布局 ---------- */
.profile-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--sp-5); align-items: start; margin-top: var(--sp-5); }
.profile-cols .card + .card { margin-top: var(--sp-5); }
@media (max-width: 860px) { .profile-cols { grid-template-columns: 1fr; } }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
@media (max-width: 860px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5); display: flex; align-items: center; gap: var(--sp-4);
  box-shadow: var(--sh-xs); transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: var(--brand-200); }
.st-icon {
  width: 44px; height: 44px; border-radius: 14px; background: var(--brand-50);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none;
}
.st-num { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.st-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 评分：分数胶囊 ---------- */
.score-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 4px 12px; border-radius: var(--r-full);
  font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
  background: var(--ok-bg); color: var(--ok);
}
.score-pill.blue { background: var(--info-bg); color: var(--info); }
.score-pill.warn { background: var(--warn-bg); color: var(--warn); }
.score-pill.bad  { background: var(--danger-bg); color: var(--danger); }

/* ---------- 评语气泡 ---------- */
.fb-bubble {
  position: relative; background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--text-2); max-width: 360px;
}
.fb-bubble::before {
  content: ''; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px;
  background: var(--brand-50); border-left: 1px solid var(--brand-100); border-bottom: 1px solid var(--brand-100);
  transform: rotate(45deg);
}

/* ---------- 批改弹窗 ---------- */
.grade-student { display: flex; align-items: center; gap: var(--sp-3); padding: 12px 14px; margin-bottom: var(--sp-4);
  background: var(--hover); border: 1px solid var(--border-2); border-radius: var(--r); }
.quick-grades { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); flex-wrap: wrap; }
.qg {
  border: 1px solid var(--border); background: #fff; border-radius: var(--r-full);
  padding: 4px 12px; font-size: 12.5px; color: var(--text-2); cursor: pointer;
  transition: all var(--t);
}
.qg:hover { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50); box-shadow: var(--ring); }
.act.strong { font-weight: 700; color: var(--brand-600); }

/* ---------- 头像 md 尺寸 ---------- */
.avatar.md { width: 40px; height: 40px; font-size: 15px; border-radius: 13px; }

/* ---------- 表格防错位：操作/人员列禁止折行 ---------- */
.act-links { white-space: nowrap; display: inline-flex; align-items: center; }
td.nowrap, th.nowrap { white-space: nowrap; }
td .cell-main { white-space: nowrap; }

/* ---------- 22. 移动端专属布局（≤640px：卡片流 + App 式顶栏，与桌面形态不同） ---------- */
@media (max-width: 640px) {
  body { background: #f1f2f8; }

  /* 顶栏：吸顶 App 导航，两行紧凑排列 */
  .topbar {
    position: sticky; top: 0; z-index: 60;
    padding: 9px 12px; row-gap: 7px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 6px 18px rgba(79,70,229,.12);
  }
  .topbar .btn { padding: 6px 12px; font-size: 12px; border-radius: 999px; }
  .brand-logo { width: 30px; height: 30px; }
  .brand-text { font-size: 14.5px; }
  .container { padding: 14px 12px 28px; }

  /* 统计卡：2×2 宫格（App 风格） */
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 9px; }
  .grid-4 > .card { padding: 13px 12px; border-radius: 15px; box-shadow: 0 1px 5px rgba(17,24,39,.05); }

  /* 列表表格 → 卡片流（隐藏表头，td 变 label/value 行） */
  table.list, table.list tbody { display: block; }
  table.list thead { display: none; }
  table.list tr {
    display: block; margin: 0 0 10px; padding: 2px 0;
    background: #fff; border: 1px solid var(--border-2);
    border-radius: 15px; box-shadow: 0 1px 5px rgba(17,24,39,.05);
    overflow: hidden;
  }
  table.list td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 13px; border-bottom: 1px dashed var(--border-2);
    text-align: right; white-space: normal;
  }
  table.list td:last-child { border-bottom: 0; padding-bottom: 11px; }
  table.list td[data-label]::before {
    content: attr(data-label);
    flex: none; text-align: left;
    font-size: 12px; font-weight: 600; color: var(--muted);
  }
  table.list td[data-label="作业标题"],
  table.list td[data-label="文件名"] {
    justify-content: flex-start; font-weight: 600; font-size: 14px;
  }
  table.list td[colspan] { display: block; text-align: center; border-bottom: 0; }

  /* 卡片圆角统一放大 */
  .card { border-radius: 16px; }

  /* 弹窗 → 底部抽屉 */
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%; max-height: 90vh;
    border-radius: 20px 20px 0 0;
    animation: sheetUp .24s cubic-bezier(.34,1.2,.64,1);
  }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

  /* 弹窗内表单全宽 */
  .modal input[type="text"], .modal input[type="password"], .modal input[type="datetime-local"], .modal select, .modal textarea { width: 100%; }
  .modal .btn { min-height: 38px; }
}

/* 移动端登录页：隐藏品牌侧栏，单卡片居中（App 登录形态） */
@media (max-width: 640px) {
  .login-wrap { min-height: 100dvh; display: block; padding: 0; background: #f1f2f8; }
  .login-hero { display: none; }
  .login-wrap > .card, .login-wrap > form, .login-wrap > div:not(.login-hero):not(.toast) {
    margin: 26px 14px; padding: 22px 18px; border-radius: 18px;
    box-shadow: 0 8px 28px rgba(17,24,39,.08);
  }
  .login-wrap input:not([type=checkbox]) { width: 100%; min-height: 42px; }
  .login-wrap .btn { width: 100%; min-height: 44px; }
}
/* v11 marker */


/* ===== 景行豆徽章（顶栏黑金胶囊）===== */
.jxd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2e2618 0%, #4a3b1d 55%, #6b541f 100%);
    border: 1px solid rgba(212, 175, 90, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 236, 180, 0.25), 0 2px 6px rgba(74, 59, 29, 0.28);
    color: #f5d67b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: box-shadow .2s ease, transform .2s ease;
}

.jxd-chip:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 236, 180, 0.35), 0 4px 12px rgba(74, 59, 29, 0.4);
}

.jxd-chip img {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 0 3px rgba(255, 224, 130, 0.55));
}

.jxd-chip b {
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #ffe9a8, #f0c24b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
