:root {
  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-2: #fafcfa;
  --ink: #242a24;
  --ink-soft: #6b726a;
  --ink-faint: #a3aaa0;
  --line: #e5eae3;
  --accent: #388a46;
  --accent-soft: #e9f6eb;
  --ok: #2e8b78;
  --shadow: 0 1px 2px rgba(28, 38, 28, 0.04), 0 8px 24px rgba(28, 38, 28, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 阻止部分手机浏览器把字号强制放大（放大后版面会被挤成竖排） */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.hidden { display: none !important; }
body.modal-open { overflow: hidden; }   /* 弹窗打开时锁住背景滚动 */

button { font-family: inherit; cursor: pointer; }

/* ---------- 登录 ---------- */
.login-mask {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f6f8f5 0%, #e8efe7 100%);
  z-index: 50;
}
.login-card {
  width: 360px; max-width: 90vw;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px 34px 30px;
  box-shadow: var(--shadow);
  text-align: center;
}
/* 登录页品牌 logo（圆形透明 PNG，抠掉背景后正圆无白边） */
.login-logo {
  width: 72px; height: 72px; margin: 0 auto 16px;
  display: block; user-select: none; -webkit-user-drag: none;
}
.login-card h1 { font-size: 19px; margin: 0 0 6px; letter-spacing: 1px; }
.login-sub { color: var(--ink-soft); font-size: 13px; margin: 0 0 24px; }
.login-card input,
.login-card select {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); outline: none; transition: border .2s;
  font-family: inherit; color: var(--ink);
}
.login-card select { margin-bottom: 10px; }
.login-card input:focus,
.login-card select:focus { border-color: var(--accent); }
.login-card button {
  width: 100%; margin-top: 14px; padding: 12px;
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  font-size: 15px; letter-spacing: 4px; transition: opacity .2s;
}
.login-card button:hover { opacity: .92; }
.login-err { color: #c0492f; font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.login-hint { color: var(--ink-faint); font-size: 12px; margin: 14px 0 0; }

/* ---------- 顶栏 ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; }
/* 顶栏品牌 logo */
.brand-logo {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: block; user-select: none; -webkit-user-drag: none;
}
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: .5px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
/* 身份牌：只读展示，页面上不存在切换身份的入口 */
.me-chip {
  font-size: 13px; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.me-chip::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-faint); flex: 0 0 auto;
}
.me-chip.is-admin { color: var(--accent); background: var(--accent-soft); border-color: #cfe6d2; }
/* 顶栏身份牌里的圆形头像（有头像时隐藏原来的小圆点） */
.me-chip .me-avatar { width: 21px; height: 21px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: block; }
.me-chip.has-avatar::before { display: none; }
.me-name { white-space: nowrap; }
.me-chip.is-admin::before { background: var(--accent); }

.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  padding: 7px 12px; border-radius: 8px; font-size: 13px; transition: all .2s;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); }
.ghost.danger { color: #c0492f; }
.ghost.danger:hover { border-color: #c0492f; background: #fdf1ee; }

/* 顶栏「更多」折叠（桌面端直接平铺，手机端收进菜单） */
.top-more { display: flex; align-items: center; gap: 12px; }
.top-more-list { display: flex; align-items: center; gap: 12px; }
.more-toggle { display: none; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 6px; padding: 18px 28px 0;
  position: sticky; top: var(--topbar-h, 72px); z-index: 9;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 14px rgba(28, 38, 28, 0.08);
}
.tab {
  background: transparent; border: none; color: var(--ink-soft);
  padding: 10px 18px; font-size: 15px; border-radius: 10px 10px 0 0;
  border-bottom: 2px solid transparent; transition: all .2s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- Content ---------- */
.content { padding: 22px 28px 60px; flex: 1; }
.panel { display: none; animation: fade .25s ease; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.primary {
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 10px 18px; font-size: 14px; letter-spacing: 1px; transition: opacity .2s;
}
.primary:hover { opacity: .92; }

/* ---------- 头脑风暴 ---------- */
.composer {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.composer textarea {
  width: 100%; min-height: 70px; resize: vertical; border: none; outline: none;
  font-family: inherit; font-size: 15px; background: transparent; color: var(--ink);
}
.composer textarea::placeholder { color: var(--ink-faint); }
.composer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 12px; }
.composer-right { display: flex; align-items: center; gap: 12px; }
.bs-count { font-size: 12px; color: var(--ink-faint); }
.bs-count.over { color: #b1553a; font-weight: 600; }
.composer-fields { display: flex; gap: 10px; }
.composer-row select {
  font-family: inherit; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink);
}
/* ---------- 头脑风暴：按老师分组的条状列表 ---------- */
.bs-list { display: flex; flex-direction: column; gap: 22px; }
.bs-group-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; padding-left: 2px; }
.bs-group-head::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.bs-group-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--accent-soft); }
.bs-group-avatar.placeholder { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--accent); }
.bs-group-name { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .3px; }
.bs-group-count { font-size: 12px; color: var(--ink-faint); }
.bs-rows {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.bs-row { transition: background .15s; }
.bs-row:hover { background: var(--surface-2); }
.bs-row + .bs-row { border-top: 1px solid var(--line); }
.bs-row-main { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.bs-row-text {
  flex: 1; min-width: 0; font-size: 14px; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; line-height: 1.55;
}
.bs-row-acts { display: flex; align-items: center; gap: 14px; flex-shrink: 0; margin-left: auto; }
.badge {
  font-size: 12px; padding: 2px 10px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.badge.dim {
  background: #e7ebe6; color: var(--ink-soft);
}
.badge.auto {
  background: #e7eee6; color: #5f6f60;
}
.badge.warn {
  background: #f7e6df; color: #b1553a;
}
.badge.finished {
  background: #3a8a2e; color: #ffffff;
}
.badge.done {  background: #e3eef0; color: #2e7d8f;
}

/* 自动流转提示条 */
.flow-tip {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 9px 14px;
}
.flow-tip b { color: var(--accent); }
.modal-tip {
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 8px 12px;
  margin: -4px 0 14px;
  line-height: 1.6;
}

/* ---------- 工作分工待办提醒弹窗 ---------- */
.rm-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.rm-icon { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.rm-head-text { min-width: 0; }
.rm-title-h { margin: 2px 0 4px !important; font-size: 16.5px; }
.rm-sub { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.rm-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: min(420px, 55vh); overflow-y: auto; }
.rm-item { display: flex; align-items: flex-start; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.rm-text { min-width: 0; flex: 1; }
.rm-title { font-size: 14px; font-weight: 600; color: var(--ink); white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.rm-content { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.rm-deadline { display: inline-block; margin-top: 5px; font-size: 12px; color: #b1553a; }
/* 点「去处理」后高亮对应任务条 */
.task-row.rm-flash { animation: rmFlash 2.4s ease; }
@keyframes rmFlash {
  0% { box-shadow: 0 0 0 0 rgba(46, 125, 143, 0.0); background: var(--surface); }
  15% { box-shadow: 0 0 0 3px rgba(46, 125, 143, 0.45); background: #eaf4f6; }
  100% { box-shadow: 0 0 0 0 rgba(46, 125, 143, 0.0); background: var(--surface); }
}

/* 个人完成进度：发起人/参与者里谁完成了自己的部分 */
.task-doneby { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 12.5px; margin-top: 5px; }
.task-doneby .tb-done { color: var(--ok); }
.task-doneby .tb-todo { color: #b1553a; }
.task-ops .mine-done {
  font-size: 12px; padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--ok); background: #e9f5f0; color: var(--ok); font-weight: 600;
}
.task-ops .mine-done:hover { background: #d9efe7; }
.task-ops .mine-done.undo { border-color: var(--line); background: var(--surface-2); color: var(--ink-soft); font-weight: 400; }
.task-ops .mine-done.undo:hover { border-color: var(--ink-soft); }
/* 提醒弹窗里的「别人已完成」提示 */
.rm-doneby { display: inline-block; margin-left: 10px; font-size: 12px; color: var(--ok); }

/* ---------- 操作日志 ---------- */
.log-cap { font-size: 12px; font-weight: 400; color: var(--ink-faint); margin-left: 6px; }
.log-list { max-height: 52vh; overflow-y: auto; margin-bottom: 14px; }
.log-row {
  padding: 9px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  margin-bottom: 7px;
  display: flex; align-items: flex-start; gap: 10px;
}
.log-main { flex: 1 1 auto; min-width: 0; }
.log-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; margin-top: 1px; background: var(--accent-soft); }
.log-avatar.placeholder { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--accent); }
.log-row.act-delete { background: #fdf1ee; border-color: #f0d8cf; }
.log-line { display: flex; align-items: baseline; gap: 8px; }
.log-line b { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.log-act { font-size: 12px; color: var(--ink-soft); }
.log-row.act-create .log-act { color: var(--ok); }
.log-row.act-delete .log-act { color: #c0492f; }
.log-row.act-update .log-act { color: var(--accent); }
.log-col { font-size: 11.5px; color: var(--ink-faint); }
.log-sub { margin-top: 3px; }
.log-label { font-size: 12.5px; color: var(--ink-soft); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-time { font-size: 11.5px; color: var(--ink-faint); flex: 0 0 auto; }
.log-empty { font-size: 13px; color: var(--ink-faint); text-align: center; padding: 18px 0; }
.bs-act { background: none; border: none; color: var(--ink-soft); font-size: 13px; padding: 0; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.bs-act:hover { color: var(--accent); }
.bs-act.voted { color: var(--accent); font-weight: 600; }
.bs-act.danger:hover { color: #c0492f; }
.bs-comments { display: none; border-top: 1px dashed var(--line); margin: 0 14px; padding: 10px 0 12px; }
.bs-comments.show { display: block; }
.cm { font-size: 13px; color: var(--ink-soft); margin: 4px 0; }
.cm b { color: var(--ink); font-weight: 600; }
.cm-add { display: flex; gap: 8px; margin-top: 8px; }
.cm-add input { flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 13px; background: var(--surface-2); outline: none; }
.cm-add input:focus { border-color: var(--accent); }
.bs-links { margin-top: 10px; }
.bs-links-title { font-size: 12px; color: var(--ink-faint); margin-bottom: 5px; }
.bs-link-item { font-size: 13px; color: var(--accent); cursor: pointer; }
.bs-link-item:hover { text-decoration: underline; }

/* ---------- 工作分工（按发起人分组的条状版式） ---------- */
/* 板块标题行（标题 + 录入按钮）：吸顶钉在导航/二级菜单下方，按钮随时可点 */
.board-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: -8px 0 10px; padding: 8px 0;
  position: sticky; top: calc(var(--topbar-h, 72px) + var(--tabs-h, 52px)); z-index: 7;
  background: var(--bg);
}
/* 有二级菜单的页签：标题行钉在二级菜单下方 */
#tab-teachers .board-head, #tab-opening .board-head, #tab-research .board-head, #tab-finance .board-head {
  top: calc(var(--topbar-h, 72px) + var(--tabs-h, 52px) + var(--subtabs-h, 42px));
}
.board-head h2 { font-size: 17px; margin: 0; font-weight: 600; }
.task-list { display: flex; flex-direction: column; gap: 22px; }
.task-group { }
.task-group-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; padding-left: 2px; }
.task-group-head::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.task-group-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--accent-soft); }
.task-group-avatar.placeholder { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--accent); }
.task-group-name { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .3px; }
.task-group-count { font-size: 12px; color: var(--ink-faint); }
.task-rows {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.task-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; transition: background .15s; }
.task-row:hover { background: var(--surface-2); }
.task-row + .task-row,
.task-done-wrap .task-row { border-top: 1px solid var(--line); }
.task-row-main { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.task-row-text { flex: 1; min-width: 0; }
.task-title { font-size: 14.5px; font-weight: 600; margin-bottom: 6px; line-height: 1.45; }
.task-meta { font-size: 12.5px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 6px; }
.task-meta .participants { color: var(--ink); }
.task-content { font-size: 13px; color: var(--ink-soft); margin: 6px 0 8px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.task-note { font-size: 12.5px; color: var(--ink-faint); margin: 4px 0 8px; white-space: pre-wrap; word-break: break-word; }
.task-ops { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.task-ops button { font-size: 12px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); white-space: nowrap; }
.task-ops button:hover { border-color: var(--accent); color: var(--accent); }
.task-ops .del:hover { border-color: #c0492f; color: #c0492f; }
.task-ops .spacer { flex: 1; }
/* 已完成折叠区 */
.task-done-wrap { }
.task-done-toggle { width: 100%; border: none; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); font-size: 12.5px; padding: 9px 0; cursor: pointer; font-family: inherit; }
.task-done-toggle:hover { color: var(--accent); background: var(--accent-soft); }

/* ---------- 课程打磨 ---------- */
.course-grid { display: flex; flex-direction: column; gap: 14px; }
.course-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); width: 100%; box-sizing: border-box;
}
/* 课程标题：更大更醒目，无边框、可换行、自适应高度 */
.course-name {
  display: block; width: 100%; font-size: 18px; font-weight: 800; font-family: inherit;
  color: var(--ink); line-height: 1.4; margin: 0 0 6px; padding: 2px 0;
  border: none; border-bottom: 1px dashed transparent; background: transparent;
  outline: none; resize: none; overflow: hidden; white-space: pre-wrap; word-break: break-word;
}
.course-name:focus { border-bottom-color: var(--accent); }
.course-name-ro { font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 6px; line-height: 1.4; }
.course-owner { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
/* 课程核心信息高亮区 */
.course-core { background: var(--accent-soft); border-radius: 10px; padding: 14px 14px 8px; margin-bottom: 14px; }
.course-core b { display: block; font-size: 11.5px; color: var(--accent); text-transform: uppercase; margin-bottom: 3px; }
.course-core .cc-tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); background: #fff; border: 1px solid var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; }
.course-core .cc-selling { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.course-core .cc-audience,
.course-core .cc-goal { font-size: 14px; color: var(--ink); margin-bottom: 8px; }
/* 课程分组 */
.course-section { margin-bottom: 16px; }
.cs-title { font-size: 13px; font-weight: 800; color: var(--accent); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--accent-soft); }
.cf { margin-bottom: 12px; }
.cf label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
.cf .val { font-size: 14px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.cf .val.empty { color: var(--ink-faint); }
.cf textarea, .cf input, .cf select {
  width: 100%; font-family: inherit; font-size: 13.5px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); outline: none; resize: vertical;
}
.cf select { resize: none; }
.cf textarea:focus, .cf input:focus, .cf select:focus { border-color: var(--accent); }
.course-ops { display: flex; gap: 8px; margin-top: 6px; }
.course-ops button { font-size: 12.5px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); }
.course-ops .save { background: var(--accent); color: #fff; border-color: var(--accent); }
.course-ops button:hover { opacity: .9; }

/* ---------- 研发课程（开课信息子标签） ---------- */
.research-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.research-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.research-head { margin-bottom: 12px; }
.research-title { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.research-owner { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.research-core { background: var(--accent-soft); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.research-core .rc-item { margin-bottom: 8px; }
.research-core .rc-item:last-child { margin-bottom: 0; }
.research-core b { display: block; font-size: 11.5px; color: var(--accent); margin-bottom: 2px; }
.research-tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-soft); padding: 3px 10px; border-radius: 999px; }

/* ---------- 资源录入 ---------- */
.resource-grid { display: block; }
.resource-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.resource-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.resource-meta { font-size: 12.5px; color: var(--accent); margin-bottom: 10px; }
.resource-row { font-size: 13px; color: var(--ink-soft); margin: 5px 0; }
.resource-row b { color: var(--ink); font-weight: 600; }
.resource-desc { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; word-break: break-word; margin: 10px 0; line-height: 1.55; }
.resource-helpers { margin: 8px 0; }
.resource-helpers .list { font-size: 12.5px; color: var(--ink-soft); }
.resource-ops { display: flex; gap: 8px; margin-top: 10px; }
.resource-ops button { font-size: 12px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); }
.resource-ops button.help { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.resource-ops button:hover { opacity: .9; }

/* ---------- 老师介绍 ---------- */
.panel-tip { font-size: 12.5px; color: var(--ink-faint); margin: -6px 0 16px; }
.teacher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
/* 名片底子调浅灰，内部各分区（头像行/标签行/各板块）做成白色圆角小块+阴影，块间留缝隔开 */
.teacher-card {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
.teacher-card.empty { align-items: center; justify-content: center; min-height: 140px; border-style: dashed; background: var(--surface); gap: 0; }
.teacher-head { display: flex; align-items: center; gap: 13px; background: var(--surface); border-radius: 10px; box-shadow: 0 2px 8px rgba(28, 38, 28, .07); padding: 12px 14px; }
.mini-avatar { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; vertical-align: -4px; margin-right: 4px; display: inline-block; background: var(--accent-soft); }
.mini-avatar.mini-ph { display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
/* 学员性别符号：男=蓝 ♂，女=粉 ♀（不用圆圈底） */
.gender-sym { font-style: normal; font-size: 15px; font-weight: 700; margin-right: 5px; vertical-align: -1px; line-height: 1; }
.gender-sym.g-boy { color: #2f7bff; }
.gender-sym.g-girl { color: #ff5ca8; }
.person { white-space: nowrap; }
.teacher-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--accent-soft); }
.teacher-avatar.placeholder { display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--accent); }
.teacher-id { flex: 1 1 auto; min-width: 0; }
.teacher-name { font-size: 16px; font-weight: 700; }
.teacher-tagline { font-size: 12.5px; color: var(--accent); margin-top: 2px; }
.teacher-meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.teacher-ops { display: flex; gap: 6px; flex: 0 0 auto; }
.teacher-ops button { font-size: 12px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); }
.teacher-ops .teacher-edit { color: var(--accent); border-color: var(--accent-soft); }
.teacher-ops .del { color: #c0492f; border-color: #eccc0c; }
/* 擅长领域标签行：同样做成白色小块与各板块一致 */
.teacher-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0; background: var(--surface); border-radius: 10px; box-shadow: 0 2px 8px rgba(28, 38, 28, .07); padding: 10px 14px; }
.teacher-tags .tag { font-size: 11.5px; padding: 3px 9px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); }
/* 板块分区：白色圆角小块+阴影，替代原来的分隔线，块间留缝 */
.teacher-section { border-top: none; background: var(--surface); border-radius: 10px; box-shadow: 0 2px 8px rgba(28, 38, 28, .07); padding: 2px 14px 12px; }
.teacher-section:last-child { padding-bottom: 12px; }
/* 板块级标题（个人信息/课程系统等）：淡绿色调条，居中，突出层级 */
.ts-title { font-size: 14px; font-weight: 800; color: var(--accent); letter-spacing: 1px; text-align: center; margin: 12px 0 10px; padding: 6px 0; background: var(--accent-soft); border-radius: 8px; }
/* 字段组（小标题+内容为一体）：整组下面画一条细灰线，组间留缝；小标题前加黑色粗圆点 */
.tf { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tf:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
/* 字段级小标题（一句话定位/老师资质等）：加粗红色突出，前面黑色粗圆点；灰线改画在整组内容下方 */
.tf-label { font-size: 13.5px; font-weight: 800; color: #c0492f; margin: 0 0 5px; }
.tf-label::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1f241f; margin-right: 6px; vertical-align: 1px; }
.tf-val { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.teacher-card.empty .teacher-meta { color: var(--ink-faint); }
.teacher-card.empty .teacher-ops { margin-top: 4px; }

/* ---------- 权限只读提示 ---------- */
.ro-note { font-size: 11.5px; color: var(--ink-faint); margin-left: auto; }

/* ---------- 资料卡上的「最后编辑」日期（全模块统一） ---------- */
.card-stamp {
  font-size: 11.5px; color: var(--ink-faint); line-height: 1.4;
  margin-top: 8px; letter-spacing: .2px;
}
/* 头脑风暴是紧凑行：日期跟操作按钮排同一行，不要额外占高度 */
.bs-row-acts .card-stamp { margin-top: 0; margin-right: 2px; flex: 0 0 auto; }
/* 老师名片底部收口，避免最后一个区块的留白叠在一起 */
.teacher-card .card-stamp { margin-top: 10px; }

/* ---------- 疑似重复资料标记 ---------- */
.dup-flag {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: inherit; font-size: 11.5px; line-height: 1;
  padding: 5px 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid #e6c4b6; background: #f7e6df; color: #b1553a;
  margin-top: 8px; white-space: nowrap;
}
.dup-flag:hover { background: #f2d8cd; }
/* 头脑风暴是紧凑行：标记不额外占高度，跟操作按钮同排 */
.bs-row-acts .dup-flag { margin-top: 0; }
/* 老师名片：紧跟头部，最显眼 */
.teacher-card .dup-flag { margin-top: 2px; }
.dup-list { display: flex; flex-direction: column; gap: 9px; margin: 4px 0 2px; }
.dup-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.dup-item-main { flex: 1; min-width: 0; }
.dup-item-title { font-size: 13.5px; color: var(--ink); line-height: 1.5; word-break: break-word; }
.dup-keep { margin-left: 6px; font-size: 11px; color: #388a46; white-space: nowrap; }
.dup-item-meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 3px; line-height: 1.5; }
.dup-del {
  font-family: inherit; font-size: 12.5px; padding: 7px 13px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: #c0492f; cursor: pointer; flex: 0 0 auto;
}
.dup-del:hover { border-color: #c0492f; }
.dup-del:disabled { opacity: .55; cursor: default; }

/* ---------- 子选项卡（二级菜单，吸顶钉在一级导航下方） ---------- */
.subtabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: -8px 0 10px; padding: 8px 0;
  position: sticky; top: calc(var(--topbar-h, 72px) + var(--tabs-h, 52px)); z-index: 7;
  background: var(--bg);
}
.subtab {
  font-size: 13px; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft);
}
.subtab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.subpanel { display: none; }
.subpanel.active { display: block; }
/* ---------- 三级页签（开支明细的六个分类，不吸顶） ---------- */
.exptabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.exptab {
  font-size: 13px; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); cursor: pointer;
}
.exptab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.exppanel { display: none; }
.exppanel.active { display: block; }

/* ---------- 开课信息卡片 ---------- */
.lib-grid { display: flex; flex-direction: column; gap: 14px; }
.lib-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.lib-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.lib-fee { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); }
.lib-name { font-size: 15.5px; font-weight: 700; margin-bottom: 4px; }
.stu-age { font-size: 12.5px; font-weight: 400; color: var(--ink-faint); }
.lib-intro { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
.lib-fields { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.lib-fields .lf { font-size: 12.5px; color: var(--ink); }
.lib-fields .lf span { color: var(--ink-faint); margin-right: 5px; }
.lib-block { font-size: 13px; color: var(--ink); white-space: pre-wrap; word-break: break-word; margin-top: 8px; line-height: 1.55; }
.lib-block b { display: block; font-size: 11.5px; color: var(--ink-faint); font-weight: 600; margin-bottom: 2px; }
.lib-ops { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.lib-ops button { font-size: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); }
.lib-ops button.edit { color: var(--accent); border-color: var(--accent-soft); }
.lib-ops button.del { color: #c0492f; border-color: #eccc0c; }
.lib-ops button:hover { opacity: .9; }

/* ---------- 学员信息大表格 ---------- */
.student-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.student-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 13px; }
.student-table thead { position: sticky; top: 0; z-index: 2; }
.student-table th {
  background: var(--surface-2); color: var(--ink-soft); font-weight: 600;
  text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.student-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  color: var(--ink); vertical-align: top; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
}
.student-table tbody tr:last-child td { border-bottom: none; }
.student-table tbody tr:nth-child(even) { background: rgba(89,195,69,.04); }
.student-table tbody tr:hover { background: var(--surface-2); }
.student-table .stu-no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; color: var(--accent); white-space: nowrap; }
.student-table .stu-name { font-weight: 700; white-space: nowrap; }
.student-table .stu-ops { white-space: nowrap; }
.student-table .stu-ops button { font-size: 12px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); margin-right: 6px; }
.student-table .stu-ops button:last-child { margin-right: 0; }
.student-table .stu-ops .edit { color: var(--accent); border-color: var(--accent-soft); }
.student-table .stu-ops .del { color: #c0492f; border-color: #eccc0c; }
.student-table .stu-empty td { padding: 32px 12px; text-align: center; color: var(--ink-faint); }
.student-table .badge-pill,
.data-table .badge-pill { display: inline-block; font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.student-table .badge-warn { background: #f7e6df; color: #b1553a; }
.student-table .fee { font-weight: 600; white-space: nowrap; }

/* 通用大表格（资源池等复用） */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.data-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 13px; }
/* 弹窗里的表格列数少，去掉 980px 最小宽，避免出现难拖的横向滚动条 */
.modal-card .data-table { min-width: 0; }
.data-table thead { position: sticky; top: 0; z-index: 2; }
.data-table th { background: var(--surface-2); color: var(--ink-soft); font-weight: 600; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }

/* 浮动表头：表格上滚碰到导航时，钉在导航正下方的表头副本（JS 生成） */
#floatHead {
  position: fixed; z-index: 8; display: none;
  overflow: hidden; pointer-events: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 14px rgba(28, 38, 28, 0.10);
}
#floatHead table { border-collapse: collapse; table-layout: fixed; }
#floatHead th { background: var(--surface-2); color: var(--ink-soft); font-weight: 600; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: top; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background: rgba(89,195,69,.04); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .res-title { font-weight: 700; min-width: 160px; }
.data-table .res-desc { color: var(--ink-soft); font-size: 12.5px; max-width: 260px; }
.data-table .res-ops { white-space: nowrap; }
.data-table .res-ops button { font-size: 12px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); margin-right: 6px; }
.data-table .res-ops button:last-child { margin-right: 0; }
.data-table .badge-info { background: #e6f0fb; color: #2a6fc7; }
.data-table .badge-success { background: #e3f5e0; color: #3a8a2e; }
.data-table .badge-done { background: var(--surface-2); color: var(--ink-faint); }
.data-table .fmt-online { background: #e6f0fb; color: #2a6fc7; }
.data-table .fmt-offline { background: #fdeede; color: #b8761a; }
.data-table .fee { font-weight: 600; white-space: nowrap; }
.data-table .cell-sub { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.like-btn, .comment-btn { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); }
.like-btn.voted { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.help-btn { font-size: 12px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); }
.help-btn.helped { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.person-mini { display: inline-block; font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); margin: 0 4px 4px 0; }

/* 资源评论弹窗 */
.rc-list { max-height: 320px; overflow: auto; margin-bottom: 12px; }
.rc-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rc-item:last-child { border-bottom: none; }
.rc-meta { font-size: 12px; color: var(--ink-faint); margin-bottom: 4px; }
.rc-text { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.rc-empty { color: var(--ink-faint); font-size: 13px; text-align: center; padding: 16px 0; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(24, 32, 24, .35); display: flex; align-items: center; justify-content: center; z-index: 60; }
.modal-card { width: auto; min-width: 460px; max-width: 720px; max-height: 88vh; overflow: auto; background: var(--surface); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.modal-card h3 { margin: 0 0 18px; font-size: 17px; }
.modal-section { margin-bottom: 16px; }
.modal-sec-title { font-size: 13px; font-weight: 800; color: var(--accent); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--accent-soft); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 5px; }
.field label .req { color: #c0492f; margin-left: 2px; }
.field input, .field textarea, .field select, .field .checkbox-group {
  width: 100%; font-family: inherit; font-size: 14px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); outline: none;
}
.field textarea { min-height: 64px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
/* 锁定为本人（不能替别人填写）的只读字段：虚线框 + 灰底，一眼看出改不了 */
.field input[readonly] { border-style: dashed; color: var(--ink-soft); cursor: default; }
.field input[readonly]:focus { border-color: var(--line); }
.field-tip { font-size: 12px; color: var(--ink-faint); margin-top: 6px; line-height: 1.6; }
.modal-ops { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* 加宽弹窗：含表格的弹窗自动加宽到屏幕最大可用宽度 */
.modal-card.wide-table { width: auto; min-width: 960px; max-width: 96vw; }.modal-card.wide-table .table-wrap { overflow: visible; border: none; background: transparent; box-shadow: none; }
.modal-card.wide-table .data-table { table-layout: auto; min-width: 0; width: 100%; }
.modal-card.wide-table .data-table th,
.modal-card.wide-table .data-table td { white-space: nowrap; }
.modal-card.wide-table .data-table .res-title,
.modal-card.wide-table .data-table .cell-needs,
.modal-card.wide-table .data-table .cell-note { white-space: normal; min-width: 160px; max-width: 320px; vertical-align: top; line-height: 1.55; }
.modal-card.wide-table .data-table .cell-needs,
.modal-card.wide-table .data-table .cell-note { font-size: 12.5px; color: var(--ink-soft); }
/* 小屏幕下宽弹窗也撑满 */
@media (max-width: 1000px) {
  .modal-card.wide-table { min-width: 0; width: 96vw; }
}

/* ---------- 单课结算表 ---------- */
.modal-card.settle-card { min-width: 720px; max-width: 96vw; }
.settle-date { font-size: 12.5px; font-weight: 500; color: var(--ink-faint); margin-left: 10px; }
.settle-banner { font-size: 13px; line-height: 1.7; padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; }
.settle-banner.warn { background: #faf3e0; color: #8a6d2a; border: 1px solid #ecd9a8; }
.settle-banner.ok { background: #e9f5e3; color: #3a7a2c; border: 1px solid #c4e2b6; }
.settle-table th, .settle-table td { font-size: 12.5px; padding: 7px 10px; }
.settle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.settle-grid > div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.settle-grid > div b { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.settle-grid > div span { font-size: 15px; font-weight: 800; }
.settle-grid > div.hl { background: var(--accent-soft); }
@media (max-width: 760px) {
  .modal-card.settle-card { min-width: 0; width: 100%; }
  .settle-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 学员付款明细弹窗：总缴费金额摘要行 */
.student-pay-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; margin-bottom: 12px; background: var(--surface-2, #f5f7f5); border: 1px solid var(--line, #e0e5e0); border-radius: 10px; font-size: 13px; color: var(--ink-soft, #667); }
.student-pay-total-amount { color: var(--ink, #222); }
.student-pay-total-amount b { font-size: 18px; color: var(--profit, #1d9e57); margin-left: 4px; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 10px 11px; }
.checkbox-group label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink); cursor: pointer; margin-bottom: 0; }
.checkbox-group input { width: auto; }

/* 导航栏 12 项换行 */
.tabs { flex-wrap: wrap; }


/* 学员信息行可点击查看付款明细 */
.student-table tbody tr.student-row { cursor: pointer; }
.student-table tbody tr.student-row:hover { background: var(--surface-2); }
.data-table .cell-needs { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 账目公开摘要 */
.finance-summary { margin-bottom: 18px; }
.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
}
/* 宽屏：第一行固定 9 个方块等宽平均分布，第 10 个（周转金）起落到第二行 */
@media (min-width: 1400px) {
  .finance-summary-grid { grid-template-columns: repeat(9, 1fr); }
  .finance-summary-grid > div:nth-child(13) b { font-size: 11px; letter-spacing: -0.2px; padding-left: 8px; padding-right: 8px; }
}
.finance-summary-grid > div {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
}
.finance-summary-grid b {
  font-size: 12px; color: var(--ink-soft); font-weight: 500;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  padding: 10px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.finance-summary-grid span {
  font-size: 15px; font-weight: 700; color: var(--ink);
  padding: 12px 14px; flex: 1; display: flex; align-items: center;
}
.finance-summary-grid span.c-blue { color: #1e66d0; }
.finance-summary-grid span.c-red { color: #c0392b; }
.finance-summary-grid span.c-big { font-size: 17px; }
.finance-summary-grid > div.clickable { cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.finance-summary-grid > div.clickable:hover { background: #e6f7e6; border-color: var(--accent); box-shadow: 0 2px 10px rgba(89, 195, 69, 0.18); }
.mat-expense-group { margin-bottom: 16px; }
.mat-expense-group h4 { margin: 0 0 6px; font-size: 14px; }
.mat-expense-group h4 small { color: var(--ink-soft); font-weight: 400; margin-left: 6px; }
.mat-expense-group .group-subtotal td { font-weight: 700; border-top: 1px solid var(--line); }

/* 开支明细 */
.expense-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.expense-empty { font-size: 13px; color: var(--ink-soft); margin: 4px 0; }
.expense-row {
  display: grid; grid-template-columns: 1fr 110px 34px; gap: 8px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.expense-row input { width: 100%; box-sizing: border-box; }
.expense-row .expense-amount { text-align: right; }
.expense-row .expense-del { padding: 0; height: 30px; width: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.expense-row .expense-del:hover { background: #f7e6df; color: #c0492f; border-color: #e8c9bd; }
.finance-summary-grid .c-profit { color: var(--accent); }

/* 摘要卡：固定一行铺满、压扁高度（报课清单3卡 / 收入明细3卡 / 付款记录3卡 / 优秀学员奖金3卡 / 周转金5卡；不影响收支明细9卡与收益明细） */
#enrollSummary .finance-summary-grid,
#incomeSummary .finance-summary-grid,
#paymentSummary .finance-summary-grid,
#studentBonusSummary .finance-summary-grid { grid-template-columns: repeat(3, 1fr); }
#reserveSummary .finance-summary-grid { grid-template-columns: repeat(5, 1fr); }
#enrollSummary .finance-summary-grid b,
#incomeSummary .finance-summary-grid b,
#paymentSummary .finance-summary-grid b,
#studentBonusSummary .finance-summary-grid b,
#reserveSummary .finance-summary-grid b { padding: 7px 12px; }
#enrollSummary .finance-summary-grid span,
#incomeSummary .finance-summary-grid span,
#paymentSummary .finance-summary-grid span,
#studentBonusSummary .finance-summary-grid span,
#reserveSummary .finance-summary-grid span { padding: 8px 14px; }
@media (max-width: 760px) {
  #enrollSummary .finance-summary-grid,
  #incomeSummary .finance-summary-grid,
  #paymentSummary .finance-summary-grid,
  #studentBonusSummary .finance-summary-grid { gap: 8px; }
  #enrollSummary .finance-summary-grid b,
  #incomeSummary .finance-summary-grid b,
  #paymentSummary .finance-summary-grid b,
  #studentBonusSummary .finance-summary-grid b { font-size: 11px; padding: 6px 8px; }
  #enrollSummary .finance-summary-grid span,
  #incomeSummary .finance-summary-grid span,
  #paymentSummary .finance-summary-grid span,
  #studentBonusSummary .finance-summary-grid span { padding: 6px 8px; font-size: 13px; }
  /* 周转金 5 卡在手机上太挤，允许换成两行（3+2） */
  #reserveSummary .finance-summary-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  #reserveSummary .finance-summary-grid b { font-size: 11px; padding: 6px 8px; }
  #reserveSummary .finance-summary-grid span { padding: 6px 8px; font-size: 13px; }
}
.c-profit { color: #2e8b57; font-weight: 700; }

/* 收入明细：按课程报名 */
.student-row { grid-template-columns: 1fr 34px; }
.student-row .expense-del { grid-column: 2; }
.income-preview {
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 12px; font-size: 14px; color: var(--ink);
}
.income-preview b { color: #2e8b57; font-size: 16px; }
.names-btn { padding: 2px 10px; font-size: 12px; margin-left: 6px; }

/* 老师收益明细 */
.payout-section { margin-top: 28px; }
.payout-section h3 { font-size: 17px; margin-bottom: 8px; }
.payout-section h4 { font-size: 15px; margin: 18px 0 10px; }
.payout-table td, .payout-table th { text-align: center; }
.payout-table td:first-child, .payout-table th:first-child { text-align: left; }
.payout-table td:nth-child(2), .payout-table th:nth-child(2) { text-align: left; }
.payout-table .payout-total { font-weight: 700; color: var(--ink); }
.payout-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.payout-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow);
}
.payout-card > b { display: block; margin-bottom: 10px; font-size: 14px; }
.payout-card-grid {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 13px; color: var(--ink-soft);
}
.payout-card-grid span:nth-child(2n) { color: var(--ink); font-weight: 600; text-align: right; }
.payout-card-grid .total { color: #2e8b57; font-weight: 700; border-top: 1px solid var(--line); padding-top: 4px; margin-top: 2px; }
.payout-grand {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font-size: 15px; font-weight: 700; display: inline-flex; gap: 10px;
}
.payout-grand b { color: var(--ink-soft); font-weight: 500; }

/* 周转金台账 */
.reserve-summary-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 14px; }
.reserve-table td, .reserve-table th { text-align: center; }
.reserve-table td:first-child, .reserve-table th:first-child,
.reserve-table td:nth-child(3), .reserve-table th:nth-child(3),
.reserve-table td:nth-child(6), .reserve-table th:nth-child(6) { text-align: left; }
.reserve-in { color: #2e8b57; font-weight: 700; }
.reserve-out { color: #c45c4a; font-weight: 700; }

/* 学习园地 / 运营动态卡片 */
.garden-list, .ops-list { display: flex; flex-direction: column; gap: 14px; }
.garden-card, .ops-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.garden-head, .ops-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.garden-head h4, .ops-head h4 { margin: 0; font-size: 15px; font-weight: 700; }
.garden-meta, .ops-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); white-space: nowrap; flex-shrink: 0; }
.garden-body, .ops-body { color: var(--ink); font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.garden-link { display: inline-block; margin-top: 10px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.garden-link:hover { filter: brightness(.96); }
.garden-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.garden-tags .tag { background: var(--surface-2); }
.ops-data { margin-top: 10px; font-size: 13px; color: var(--ink-soft); background: var(--surface-2); padding: 8px 10px; border-radius: 8px; }
.garden-ops, .ops-ops { margin-top: 12px; display: flex; gap: 8px; justify-content: flex-end; }
.garden-ops button, .ops-ops button { font-size: 12px; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); }
.garden-ops button:last-child, .ops-ops button:last-child { color: #c0492f; }

.date-input {
  appearance: none; -webkit-appearance: none;
}

.empty { color: var(--ink-faint); font-size: 13.5px; text-align: center; padding: 30px 0; }

/* =========================================================
   手机端适配（≤ 760px）—— 只改版式，不动数据与功能
   ========================================================= */
@media (max-width: 760px) {
  /* 基础：禁止整页横向滚动 + 去掉点击闪蓝 */
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; -webkit-tap-highlight-color: transparent; }

  /* 【关键】输入框字号必须 ≥16px，否则 iOS / 微信内置浏览器
     会在聚焦时把整页放大，页面会“跳一下”且很难缩回去 */
  .login-card input, .login-card select,
  .composer textarea, .composer-row select,
  .cm-add input,
  .field input, .field textarea, .field select,
  .cf input, .cf textarea, .cf select { font-size: 16px; }

  /* 【防竖排】手机上禁止任何按钮/标签文字被压成一字一行 */
  .ghost, .primary, .tab, .subtab, .badge, .brand-name, .me-chip,
  .bs-count, .task-ops button, .course-ops button, .resource-ops button,
  .lib-ops button, .teacher-ops button, .bs-act { white-space: nowrap; }

  /* ---------------- 顶栏：第一行只放站点名，第二行放操作 ---------------- */
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    position: static;              /* 手机上不吸顶，把竖向空间让给内容 */
  }
  .top-actions { display: contents; }   /* 让子项直接参与顶栏换行 */
  /* 第一行：站点名 + 退出；第二行：我是 + 更多（::after 负责强制换行） */
  .topbar::after { content: ''; order: 3; flex: 0 0 100%; height: 0; }
  .brand { order: 1; flex: 1 1 auto; min-width: 0; gap: 8px; }
  .brand-logo { width: 28px; height: 28px; flex: 0 0 auto; }
  .login-logo { width: 64px; height: 64px; margin-bottom: 14px; }
  .brand-name { font-size: 14px; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  #logoutBtn { order: 2; flex: 0 0 auto; }
  .me-chip { order: 4; flex: 1 1 auto; min-width: 0; justify-content: center; padding: 7px 10px; }
  .top-more { order: 5; position: relative; flex: 0 0 auto; }
  .more-toggle { display: inline-block; }
  .top-more-list {
    display: none;
    position: absolute; right: 0; top: calc(100% + 8px);
    flex-direction: column; gap: 8px; padding: 10px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; box-shadow: var(--shadow);
    min-width: 134px; z-index: 30;
  }
  .top-more.open .top-more-list { display: flex; }
  .top-more-list .ghost { width: 100%; text-align: center; padding: 10px 12px; }

  /* ---------------- 主菜单：单行横滑，贴顶吸住不挡内容 ---------------- */
  .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 7px;
    padding: 9px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(28, 38, 28, 0.08);
    position: sticky;
    top: 0;
    z-index: 9;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: 0 0 auto;
    padding: 10px 15px;
    font-size: 13.5px;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    /* 「若隐若现」：半透明底 + 极淡描边，未选中时几乎融进背景 */
    background: rgba(255, 255, 255, .45);
    color: var(--ink-soft);
    transition: background .18s, color .18s, border-color .18s, transform .12s;
  }
  .tab:hover { color: var(--ink-soft); }   /* 触摸屏上避免 hover 色粘住 */
  .tab:active { transform: scale(.97); }
  .tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(56, 138, 70, .22);
  }

  /* ---------------- 内容区 ---------------- */
  .content { padding: 14px 14px calc(48px + env(safe-area-inset-bottom)); }
  .panel-tip { margin: -4px 0 14px; }
  /* 手机端：标题行不吸顶，跟随页面正常滚动（电脑端吸顶偏移在手机上会悬在半空挡内容） */
  .board-head { flex-wrap: wrap; gap: 10px; margin-bottom: 14px; position: static; top: auto; background: transparent; }
  .board-head h2 { font-size: 16px; }

  /* 卡片网格：除老师名片外统一单列横条 */
  .course-grid, .lib-grid { display: flex; flex-direction: column; gap: 12px; }
  .course-card, .lib-card { padding: 15px; }
  .teacher-card.empty { min-height: 104px; }

  /* ---------------- 头脑风暴 ---------------- */
  .composer { padding: 13px; margin-bottom: 16px; }
  .composer textarea { min-height: 84px; }
  .composer-row { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 12px; }
  .composer-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .composer-row select { width: 100%; padding: 9px 10px; }
  .composer-right { justify-content: space-between; }
  .composer-right .primary { flex: 1 1 auto; padding: 11px 16px; }

  .bs-list { gap: 18px; }
  .bs-row-main { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .bs-row-text {
    flex: 1 1 100%; order: 3; margin-top: 2px;
    white-space: normal; font-size: 14.5px; line-height: 1.55;
  }
  .bs-row-acts { gap: 13px; margin-left: auto; flex-wrap: wrap; }
  .bs-act { padding: 6px 1px; font-size: 12.5px; }
  .badge { font-size: 11px; padding: 2px 9px; }
  .bs-comments { margin: 0 12px; }
  .bs-group-head { margin-bottom: 7px; }
  .bs-group-name { font-size: 13.5px; }

  /* ---------------- 工作分工看板：三列改纵向堆叠 ---------------- */
  .board { grid-template-columns: 1fr; gap: 12px; }
  .col { padding: 12px; min-height: 0; }
  .col-head { margin-bottom: 10px; font-size: 13.5px; }
  .task-card { padding: 13px; }
  .task-title { font-size: 14px; }
  .task-ops { flex-wrap: wrap; gap: 7px; }
  .task-ops button { padding: 7px 11px; }
  .task-ops .spacer { display: none; }

  /* ---------------- 资源 / 课程 / 老师卡片 ---------------- */
  .resource-ops, .course-ops, .lib-ops { flex-wrap: wrap; gap: 7px; }
  .resource-ops button, .course-ops button, .lib-ops button { padding: 8px 12px; font-size: 12.5px; }
  .teacher-head { gap: 11px; }
  .teacher-avatar { width: 46px; height: 46px; }
  .teacher-avatar.placeholder { font-size: 19px; }
  .me-chip .me-avatar { width: 19px; height: 19px; }
  .log-avatar { width: 24px; height: 24px; }
  .bs-group-avatar { width: 24px; height: 24px; }
  .teacher-ops { gap: 6px; }
  .teacher-ops button { padding: 7px 10px; }
  .teacher-name { font-size: 15px; }
  .lib-fee { font-size: 12.5px; }

  /* ---------------- 子选项卡（开课信息）：横向滑动，吸顶钉在一级导航下方 ---------------- */
  .subtabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    margin: -6px 0 10px;
    padding: 6px 0 2px;
    position: sticky;
    top: 52px;   /* 一级导航单行横滑吸顶后的实际高度（9px*2 + 34px 按钮 ≈ 52px） */
    z-index: 7;
    background: var(--bg);
  }
  .subtabs::-webkit-scrollbar { display: none; }
  .subtab { flex: 0 0 auto; padding: 8px 15px; }

  /* ---------------- 弹窗 → 底部抽屉，表单更好填 ---------------- */
  .modal-mask { align-items: flex-end; }
  .modal-card {
    width: 100%; max-width: 100%;
    max-height: 92vh; max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    padding: 20px 16px 0;              /* 底部留白交给吸底的操作条 */
    box-shadow: 0 -10px 34px rgba(24, 32, 24, .16);
  }
  .modal-card h3 { font-size: 16px; margin-bottom: 14px; }
  .modal-card h3::before {
    content: ''; display: block;
    width: 40px; height: 4px; border-radius: 2px;
    background: var(--line); margin: -6px auto 14px;
  }
  .field { margin-bottom: 13px; }
  .field textarea { min-height: 76px; }
  .field label .req { margin-left: 1px; }
  /* 操作按钮吸在抽屉底部：内容再长也不用滚到底才找到「保存」 */
  .modal-ops {
    position: sticky; bottom: 0; z-index: 2;
    flex-direction: column; gap: 9px;
    background: var(--surface);
    margin: 4px 0 0;
    padding: 12px 0 calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 16px -12px rgba(24, 32, 24, .18);
  }
  .modal-ops button { width: 100%; padding: 12px; font-size: 15px; }
  /* 多选框加大，手指好点 */
  .checkbox-group { gap: 10px 16px; }
  .checkbox-group label { font-size: 14.5px; }
  .checkbox-group input { width: 19px; height: 19px; }

  /* ---------------- 登录页 ---------------- */
  .login-mask { padding: 0 14px; }
  .login-card {
    width: 100%; max-width: 360px; min-width: 0;
    padding: 30px 22px 22px; border-radius: 18px;
  }
  .login-card h1 { font-size: 17.5px; }
  .login-sub { font-size: 12.5px; margin-bottom: 20px; line-height: 1.7; }

  /* ---------------- 触摸目标统一放大 ---------------- */
  .primary { padding: 11px 17px; }
  .ghost { padding: 9px 13px; }
}

/* ---------- 小屏细分（≤ 400px，如 iPhone SE / 安卓小屏） ---------- */
@media (max-width: 400px) {
  .brand-name { font-size: 13px; }
  .composer-fields { grid-template-columns: 1fr; }
  .bs-row-acts { gap: 11px; }
  .content { padding-left: 12px; padding-right: 12px; }
  .tabs { padding-left: 10px; padding-right: 10px; gap: 6px; }
  .tab { font-size: 12.5px; padding: 10px 1px; border-radius: 11px; }
  .topbar { padding-left: 10px; padding-right: 10px; }
}

/* ---------- 极窄屏（≤ 340px，或手机浏览器放大过字号） ---------- */
@media (max-width: 340px) {
  .brand-name { font-size: 12px; }
  .brand-logo { width: 26px; height: 26px; }
  .login-logo { width: 58px; height: 58px; }
  .tabs { gap: 5px; padding-left: 8px; padding-right: 8px; }
  .tab { font-size: 12px; padding: 9px 1px; border-radius: 10px; }
  .me-chip { font-size: 12px; padding: 6px 8px; }
  .content { padding-left: 10px; padding-right: 10px; }
}

/* ---------- 账目图表（ECharts） ---------- */
.finance-charts { margin-top: 26px; }
.charts-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.charts-head h3 { margin: 0; font-size: 15px; color: var(--ink); }
.charts-head span { font-size: 12px; color: var(--ink-faint); }
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); min-width: 0; }
.chart-title { font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 4px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart-title small { font-weight: 400; font-size: 11px; color: var(--ink-faint); }
.chart-box { height: 300px; width: 100%; }
@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
  .chart-box { height: 260px; }
}

/* ---------- 弹窗内两列紧凑布局 ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-col .field { margin-bottom: 0; }

/* ---------- 打印样式：只打印当前页签的正文，隐藏操作按钮与顶栏 ---------- */
@media print {
  .topbar, .tabs, .modal-mask, .composer, .composer-row, .panel-tip, #floatHead, .finance-charts,
  .board-head button, .res-ops, .stu-ops, .dup-flag, .like-btn, .comment-btn, .help-btn { display: none !important; }
  .panel { display: none !important; }
  .panel.active { display: block !important; }
  body { background: #fff !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .table-wrap { overflow: visible !important; border: 1px solid #ccc !important; box-shadow: none !important; }
  .data-table { min-width: 0 !important; font-size: 11px !important; }
  .data-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .data-table td { white-space: nowrap; }
  .finance-summary-grid, .payout-card-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* ---------- 学员级别：黄色五角星（颗数=级别，一星~六星） ---------- */
.level-badge { display: inline-block; color: #f5b301; font-size: 15px; letter-spacing: 2px; white-space: nowrap; vertical-align: middle; }

/* ============ 课包资源：横条列表 + 详情弹窗 + 课程表图片（2026-09-27） ============ */
#libGrid.lib-grid { display: flex; flex-direction: column; gap: 10px; }
.lib-bar { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: box-shadow .15s; }
.lib-bar:hover { box-shadow: var(--shadow); }
.lib-bar-main { flex: 1; min-width: 0; }
.lib-bar-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lib-bar-name { font-weight: 700; font-size: 15px; }
.lib-bar-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; font-size: 12.5px; color: var(--ink-soft); }
.lib-bar-meta b { font-weight: 600; opacity: .75; margin-right: 2px; }
.lib-bar-ops { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lib-bar-teacher { display: flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; padding-right: 12px; border-right: 1px solid var(--line); }
.lib-teacher-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); }
.lib-teacher-avatar.placeholder { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); font-size: 16px; }
.lib-teacher-name { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
.sched-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.sched-thumb { position: relative; width: 92px; height: 92px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.sched-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.sched-del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.sched-view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }
.sched-view { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.sched-view img { width: 100%; height: 120px; object-fit: cover; display: block; }
@media (max-width: 760px) {
  .lib-bar { flex-wrap: wrap; }
  .lib-bar-ops { width: 100%; justify-content: flex-end; }
  .sched-view img { height: 100px; }
}
