/* 圣枫教育科技 · 网页版管理端样式（暖橙主题，与小程序一致） */
:root {
  --primary: #FF7A2E;
  --primary-light: #FFF0E4;
  --text-main: #4A3B32;
  --text-sub: #9B8C82;
  --placeholder: #C2B4AA;
  --page-bg: #FFF7F0;
  --danger: #E5484D;
  --shadow: 0 2px 10px rgba(255, 122, 46, 0.08);
  /* 油画画布：象牙底 / 赭石框 / 熟褐墨；纹理只提供质感，不压低文字对比 */
  --oil-canvas: #FFFCF7;
  --oil-canvas-deep: #F8EDDF;
  --oil-frame: #E6D3BB;
  --oil-ink: #46352B;
  --oil-ink-sub: #806E5E;
  --oil-stroke: rgba(122, 82, 46, .035);
  --oil-shadow: rgba(94, 62, 34, .14);
}
* { box-sizing: border-box; }

/* ===== 自定义滚动条（统一暖橙主题，替代系统默认样式） ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #EAD9CC;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #D9BFAE;
}
::-webkit-scrollbar-corner {
  background: transparent;
}
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #EAD9CC transparent;
}
/* 表格横向滚动 / 弹窗纵向滚动：悬停区域加深一点，更易察觉可滚动 */
.view, .modal-card {
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-main);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}
.hidden { display: none !important; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card {
  width: 380px; padding: 40px 36px; background: #fff; border-radius: 18px;
  box-shadow: 0 8px 32px rgba(255, 122, 46, 0.12);
}
.login-logo { font-size: 40px; text-align: center; }
.login-title { font-size: 22px; font-weight: 700; text-align: center; margin-top: 8px; }
.login-sub { font-size: 13px; color: var(--text-sub); text-align: center; margin: 6px 0 20px; }
.login-tip { font-size: 12px; color: var(--text-sub); text-align: center; margin-top: 16px; }
.err { color: var(--danger); font-size: 13px; min-height: 20px; margin-top: 8px; text-align: center; }

.input {
  display: block; width: 100%; margin-bottom: 14px; padding: 12px 14px;
  border: 1px solid #F0E2D8; border-radius: 10px; font-size: 14px; background: #fff;
  color: var(--text-main); outline: none;
}
.input:focus { border-color: var(--primary); }
.input.inline { display: inline-block; width: auto; margin: 0 10px 0 0; min-width: 200px; }
/* 营销管理：占位提示统一调浅，避免示例数字被误认为已输入值 */
[id^="view-mkt"] input::placeholder,
[id^="view-mkt"] textarea::placeholder { color: var(--placeholder); opacity: 1; }
[id^="view-mkt"] input::-webkit-input-placeholder,
[id^="view-mkt"] textarea::-webkit-input-placeholder { color: var(--placeholder); }
/* 托管考勤月报：孩子姓名搜索占位提示同样调浅 */
#careRptFilter .care-name-search::placeholder { color: var(--placeholder); opacity: 1; }
#careRptFilter .care-name-search::-webkit-input-placeholder { color: var(--placeholder); }

.btn-primary, .btn-ghost {
  border: none; border-radius: 24px; cursor: pointer; font-size: 15px; font-weight: 600;
  padding: 12px 20px;
}
.btn-primary { width: 100%; background: linear-gradient(135deg, #FF9A56, #FF7A2E); color: #fff; }
.btn-ghost { background: var(--primary-light); color: var(--primary); }
.btn-primary.sm, .btn-ghost.sm { width: auto; padding: 8px 18px; font-size: 13px; }
.btn-primary:disabled, .btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; gap: 24px; padding: 14px 28px;
  background: #fff; box-shadow: 0 2px 12px rgba(255, 122, 46, 0.08);
}
.brand { font-size: 17px; font-weight: 700; white-space: nowrap; }
.tabs { display: flex; gap: 8px; flex: 1; }
.tab {
  border: none; background: transparent; color: var(--text-sub);
  font-size: 14px; padding: 8px 16px; border-radius: 20px; cursor: pointer;
}
.tab.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
/* 二级菜单（营销管理有 11 个入口）：文字一律不折行，放不下时整条横向滑动。
   之前 .subtab 没有 flex:none / white-space:nowrap，flex 子项被压扁后中文竖着换行，
   11 个入口看着参差不齐；这里同时给按钮统一高度和细滚动条，保持一行整齐。 */
.subtabs {
  display: flex; align-items: center; gap: 6px; margin-bottom: 14px;
  background: #fff; border-radius: 12px; padding: 6px 6px 8px;
  box-shadow: var(--shadow); width: fit-content; max-width: 100%;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.subtabs::-webkit-scrollbar { height: 4px; }
.subtabs::-webkit-scrollbar-thumb { background: #EADFD4; border-radius: 4px; }
.subtab {
  flex: none; white-space: nowrap; line-height: 1.2;
  border: none; background: transparent; color: var(--text-sub);
  font-size: 13px; padding: 8px 14px; border-radius: 16px; cursor: pointer;
  transition: background .15s, color .15s;
}
.subtab:hover { background: #FFF6EF; color: var(--primary); }
.subtab.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.user { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-sub); }
.link {
  border: none; background: none; color: var(--primary); cursor: pointer;
  font-size: 13px; padding: 0 6px;
}
.link:disabled { color: #C7B8AE; cursor: default; }

.content { padding: 24px 28px 60px; max-width: 1200px; margin: 0 auto; }

/* 看板 */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.stat {
  background: #fff; border-radius: 16px; padding: 20px;
  box-shadow: 0 4px 16px rgba(255, 122, 46, 0.08);
}
.stat-value { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-name { font-size: 13px; color: var(--text-sub); margin-top: 4px; }

.panel {
  background: #fff; border-radius: 16px; padding: 20px; margin-top: 20px;
  box-shadow: 0 4px 16px rgba(255, 122, 46, 0.08);
}
.panel-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

/* 可折叠面板（新建菜品默认收起，点标题展开） */
.rcp-form-head {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; margin-bottom: 14px;
}
.panel.collapsed .rcp-form-head { margin-bottom: 0; }
.panel.collapsed .train-form { display: none; }
/* 菜谱库 / 贡献记录也用同一套折叠：收起时只留标题行 */
.panel.collapsed.rcp-fold > :not(.panel-title) { display: none; }
.rcp-form-toggle {
  font-size: 12.5px; font-weight: 400; color: #FF7A2E;
  background: rgba(255, 122, 46, .09); border-radius: 999px; padding: 3px 12px;
}
.rcp-form-head:hover .rcp-form-toggle { background: rgba(255, 122, 46, .16); }

/* ---------- 通讯录 · 内部组织 ---------- */
.org-wrap {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.org-side {
  background: #fff; border-radius: 16px; padding: 14px;
  box-shadow: 0 4px 16px rgba(255, 122, 46, .08);
  position: sticky; top: 12px;
}
.org-switch {
  display: flex; background: #F4F1EE; border-radius: 10px; padding: 3px; margin-bottom: 14px;
}
.org-sw {
  flex: 1; border: 0; background: transparent; border-radius: 8px;
  padding: 7px 0; font-size: 13.5px; color: #8A7666; cursor: pointer; font-family: inherit;
}
.org-sw.on { background: #fff; color: #FF7A2E; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.org-side-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #B0A093; margin: 14px 4px 8px; letter-spacing: .5px;
}
.org-side-label:first-of-type { margin-top: 0; }
.org-plus {
  border: 1px solid #F0E2D5; background: #fff; color: #FF7A2E;
  width: 22px; height: 22px; border-radius: 7px; cursor: pointer; line-height: 1;
  font-size: 14px; padding: 0;
}
.org-plus:hover { background: #FFF4EC; }
.org-entry {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 0; background: transparent; border-radius: 9px;
  padding: 8px 10px; font-size: 13.5px; color: #5A4A3F; cursor: pointer;
  font-family: inherit; text-align: left;
}
.org-entry:hover { background: #FFF7F1; }
.org-entry.on { background: #FFF1E6; color: #C2410C; font-weight: 600; }
.org-entry i { margin-left: auto; font-style: normal; font-size: 11.5px; color: #B0A093; }
.org-search { width: 100%; height: 34px; font-size: 13px; border-radius: 9px; }
.org-tree { max-height: 46vh; overflow: auto; margin-bottom: 4px; }
.org-addbtn {
  width: 100%; margin-top: 6px; padding: 8px 0; border-radius: 9px;
  border: 1px dashed #E8D9CC; background: #FFFCF9; color: #A98A73;
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.org-addbtn:hover { border-color: #FF9A5A; color: #FF7A2E; background: #FFF6F0; }

.org-node {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 8px; border-radius: 9px; cursor: pointer;
  font-size: 13.5px; color: #5A4A3F; user-select: none;
}
.org-node:hover { background: #FFF7F1; }
.org-node.on { background: #FFF1E6; color: #C2410C; font-weight: 600; }
.org-node .org-caret {
  width: 14px; text-align: center; font-size: 10px; color: #B9A99C; flex: 0 0 auto;
}
.org-node .org-ico { flex: 0 0 auto; font-size: 13px; }
.org-node .org-nm {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.org-node .org-more {
  flex: 0 0 auto; border: 0; background: transparent; color: #C0B2A6;
  width: 20px; height: 20px; border-radius: 6px; cursor: pointer; display: none;
  line-height: 1; font-size: 14px; padding: 0;
}
.org-node:hover .org-more { display: block; }
.org-node .org-more:hover { background: #F5E9DD; color: #8A6A50; }
.org-kids { margin-left: 14px; border-left: 1px dashed #F0E4DA; padding-left: 6px; }

.org-main {
  background: #fff; border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(255, 122, 46, .08); min-width: 0;
}
.org-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.org-head h3 { margin: 0; font-size: 16px; color: #32261C; }
.org-head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.org-search-r { width: 200px; height: 34px; font-size: 13px; }
.org-bulk {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #FFF7F1; border: 1px solid #F6E3D4; border-radius: 10px;
  padding: 8px 12px; margin-bottom: 10px; font-size: 13px; color: #8A6A50;
}
.org-table th.org-ck, .org-table td.org-ck { width: 38px; }
.org-table td { font-size: 13.5px; }
.org-role-chip {
  display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px;
  border-radius: 999px; background: #EEF5FB; color: #2F6C99; font-size: 12px;
}
.org-muted { color: #B9A99C; }
.org-empty { padding: 26px 0; text-align: center; color: #B9A99C; font-size: 13px; }

/* 节点 / 角色组上的浮层菜单 */
.org-menu {
  position: fixed; z-index: 400; min-width: 132px;
  background: #fff; border: 1px solid #F0E4D7; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(90, 60, 30, .16); padding: 5px; display: none;
}
.org-menu.show { display: block; }
.org-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 7px; font-size: 13px; color: #5A4A3F;
  cursor: pointer; font-family: inherit;
}
.org-menu button:hover { background: #FFF4EC; }
.org-menu button.danger { color: #E5484D; }

.org-invite-list { max-height: min(320px, 40vh); overflow: auto; margin-top: 10px; }
.org-invite-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 6px;
  border-bottom: 1px solid #FAF3EC; font-size: 13.5px; cursor: pointer;
}
.org-invite-row:hover { background: #FFFAF6; }
.org-invite-row .org-invite-sub { margin-left: auto; color: #B0A093; font-size: 12px; }

/* 添加成员弹层：卡片纵向弹性布局 —— 标题与「确定/取消」固定，
   中间名单区自己滚动，名单再长也不会把按钮顶出可视区 */
.modal-card:has(.org-invite) {
  display: flex; flex-direction: column;
  max-height: 86vh; overflow: hidden;
}
.modal-card:has(.org-invite) #modalBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.modal-card:has(.org-invite) .modal-btns { flex: 0 0 auto; }

/* 关联账号弹层 */
.org-link .train-row { margin-top: 8px; }
.org-linked { margin-top: 10px; }

/* 角色节点上的「已配置 N 项权限」小角标 */
.org-permdot {
  flex: 0 0 auto; margin-left: 2px; padding: 0 5px;
  border-radius: 999px; background: #EEF5FB; color: #2F6C99;
  font-size: 10.5px; font-style: normal; line-height: 15px;
}

/* ---------- 角色权限树 ---------- */
/* 布局：标题 / 按钮固定，中间「左：权限树 + 已选」「右：报名数据范围」两栏。
   以前 #modalBody 是横向 flex，权限区 / 范围标题 / 范围面板三块挤在一行：
   范围标题被压成竖排、权限树只剩一百多像素，功能名又被 ellipsis 截成一两个字。
   现在显式分栏、加宽弹窗，名称列给足宽度并允许换行，配置才看得清。 */
.modal-card:has(.pt-wrap) {
  width: min(1240px, 96vw); max-width: 96vw;
  display: flex; flex-direction: column;
  max-height: 90vh; overflow: hidden;
}
.modal-card:has(.pt-wrap) #modalBody {
  flex: 1 1 auto; min-height: 0; display: block; overflow: auto;
}
.modal-card:has(.pt-wrap) .modal-btns { flex: 0 0 auto; }

.pt-wrap { display: flex; flex-direction: column; gap: 10px; }
.pt-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-top .f-label { margin: 0; white-space: nowrap; }
.pt-top #ptRole { width: 220px; }
.pt-hint { flex: 1 1 320px; min-width: 0; font-size: 12px; color: #B0A093; line-height: 1.5; }

.pt-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  gap: 14px; align-items: start;
}
.pt-left {
  min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 12px;
}
/* 右栏不设 overflow：范围配置里的下拉多选面板是 absolute，不能被容器裁掉 */
.pt-right { min-width: 0; }
.pt-right-title {
  font-size: 13px; font-weight: 700; color: #3F3128;
  margin: 0 0 10px; padding-bottom: 8px;
  border-bottom: 1px solid #F6EDE7; white-space: nowrap;
}
.pt-tree {
  max-height: 62vh; overflow: auto; min-height: 240px;
  border: 1px solid #EFE3D9; border-radius: 10px;
  padding: 8px; background: #fff;
}
.pt-side {
  max-height: 62vh; overflow: auto; border: 1px solid #EFE3D9; border-radius: 10px;
  padding: 10px; background: #FFFDFB;
}
.pt-side-title { font-size: 12.5px; color: #8A7666; margin-bottom: 8px; }
.pt-side-title b { color: var(--primary); margin: 0 2px; }
.pt-none { font-size: 12px; color: #B9A99C; padding: 6px 2px; }
.pt-chip {
  display: flex; align-items: flex-start; gap: 5px;
  font-size: 12px; color: #5A4A3F; padding: 5px 8px; margin-bottom: 4px;
  background: #FFF7F1; border-radius: 7px;
}
.pt-chip span { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.pt-chip i { font-style: normal; font-size: 11px; color: #C2410C; white-space: nowrap; }

.pt-plat {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 10px 4px 4px; font-size: 12.5px; font-weight: 700; color: #3F3128;
}
.pt-plat:first-child { margin-top: 2px; }
.pt-plat small { font-weight: 400; color: #B0A093; font-size: 11.5px; }
.pt-tag {
  font-size: 10.5px; font-weight: 400; padding: 1px 7px; border-radius: 6px;
  background: #EEF5FB; color: #2F6C99;
}
.pt-tag.mp { background: #EAF7EF; color: #2F7D4F; }

.pt-row {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 6px; border-radius: 6px; font-size: 13px; line-height: 1.6;
}
.pt-row:hover { background: #FFF7F1; }
.pt-row .pt-caret {
  width: 14px; flex: 0 0 auto; text-align: center;
  font-size: 10px; color: #B9A99C; cursor: pointer;
}
.pt-row .pt-name {
  flex: 1 1 auto; min-width: 120px;
  overflow-wrap: anywhere; white-space: normal;
}
.pt-head .pt-name { font-weight: 600; color: #3F3128; }
.pt-leaf .pt-name { color: #5A4A3F; }
.pt-row input[type="checkbox"] { flex: 0 0 auto; cursor: pointer; }
.pt-ck {
  display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto;
  font-size: 12px; color: #8A7666; cursor: pointer; white-space: nowrap;
}
.pt-ck.off { opacity: .35; cursor: default; }

/* 窄屏：两栏改上下堆叠，顶部角色选择器占满一行 */
@media (max-width: 1100px) {
  .pt-body, .pt-left { display: block; }
  .pt-tree { max-height: 46vh; }
  .pt-side { max-height: 26vh; margin-top: 10px; }
  .pt-right { margin-top: 14px; }
}
@media (max-width: 820px) {
  .pt-top #ptRole { width: 100%; }
  .pt-hint { flex-basis: 100%; }
}

@media (max-width: 980px) {
  .org-wrap { grid-template-columns: 1fr; }
  .org-side { position: static; }
  .org-search-r { width: 100%; }
}

.trend { display: flex; align-items: flex-end; gap: 10px; height: 160px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.bar-val { font-size: 11px; color: var(--text-sub); }
.bar { width: 60%; background: linear-gradient(180deg, #FF9A56, #FF7A2E); border-radius: 4px 4px 0 0; }
.bar-date { font-size: 11px; color: var(--text-sub); margin-top: 6px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid #F6EDE7; text-align: left; font-size: 13px; white-space: nowrap; }
.table th { background: var(--primary-light); color: var(--text-main); font-weight: 600; }
.table td.right { text-align: right; }
/* 长文本列（如工作地址）：限宽省略，悬停看全文 */
.table td.addr { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
/* 员工档案：操作列吸右固定，列多也不会被截断（sticky 需要祖先不裁剪） */
#empTable { overflow: visible; }
#empTable th:last-child, #empTable td:last-child {
  position: sticky; right: 0; z-index: 2; background: #fff;
  box-shadow: -1px 0 0 #F6EDE7;
}
#empTable th:last-child { background: var(--primary-light); z-index: 3; }
/* 姓名列吸左 + 地址收窄：窄屏电脑横滑时姓名/操作始终可见 */
#empTable th:first-child, #empTable td:first-child {
  position: sticky; left: 0; z-index: 2; background: #fff;
  box-shadow: 1px 0 0 #F6EDE7;
}
#empTable th:first-child { background: var(--primary-light); z-index: 3; }
#empTable td.addr { max-width: 150px; }
#empTable th, #empTable td { padding: 12px 10px; }
/* 宽表格窄屏横向滚动，避免挤压换行 */
.view { overflow-x: auto; }
.rk { width: 40px; color: var(--text-sub); }
.sub { color: var(--text-sub); font-size: 12px; }
.empty { text-align: center; color: var(--text-sub); padding: 24px; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  background: var(--primary-light); color: var(--primary);
}
.tag.ok { background: #E8F5E9; color: #2E7D32; }
.tag.danger { background: #FDEBEC; color: var(--danger); }
.tag.warn { background: #FFF6E5; color: #A56A00; }
.tag.muted { background: #F3EFEC; color: #8B7E74; }

/* 发券对象选择：未选为浅色虚线框，已选为橙色实线框 + 勾选标记 + 文字状态 */
.tag.pick-status { padding: 5px 10px; font-size: 12px; border: 1px solid transparent; }
.tag.pick-status.is-empty { background: #F7F3F0; color: #8B7E74; border-style: dashed; border-color: #E3D7CE; }
.tag.pick-status.is-selected { background: #FFE9D8; color: #A33D00; border-color: #FF9A56; font-weight: 600; }
.stu-pick-chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 4px 6px 0 0;
  padding: 7px 11px; border: 1px dashed #E0D2C8; border-radius: 10px;
  background: #fff; color: var(--text-main); font-size: 12px; line-height: 1.2;
  cursor: pointer; transition: background-color .18s, border-color .18s, box-shadow .18s, color .18s;
}
.stu-pick-chip:hover { background: #FFF7F2; border-color: #FFB27A; }
.stu-pick-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.stu-pick-chip.selected {
  background: #FFF1E7; border: 1px solid #FF7A2E; color: #9A4A16;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 46, .16);
}
.stu-pick-chip .pick-mark {
  width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%;
  border: 1px solid #D8C3B4; background: #fff; position: relative;
}
.stu-pick-chip.selected .pick-mark { background: #FF7A2E; border-color: #FF7A2E; }
.stu-pick-chip.selected .pick-mark::after {
  content: ''; position: absolute; left: 4px; top: 2px; width: 4px; height: 6px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}
.stu-pick-chip .pick-label { flex: 0 0 auto; font-size: 11px; color: #9A8C82; }
.stu-pick-chip.selected .pick-label { color: #A33D00; font-weight: 700; }
.stu-pick-chip .pick-name { font-weight: 600; }
.stu-pick-chip .pick-phone { color: var(--text-sub); }
@media (prefers-reduced-motion: reduce) { .stu-pick-chip { transition: none; } }

/* 学员身份统计条 */
.stu-stat { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; font-size: 13px; color: var(--text-sub); }
.stu-stat .ss-item b { font-size: 16px; color: var(--text); margin-right: 4px; }
.acct-owe { color: #C0392B; }
.row-act { white-space: nowrap; }
.row-act .link { margin-right: 8px; }

/* 学员账户弹窗 */
.acct-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
/* 学员头像：图片覆盖在首字占位之上；临时链接失效时 img 隐藏，首字自动露出 */
.ava { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; background: var(--primary-light); color: var(--primary); font-weight: 700; flex: none; }
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stu-avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.acct-avatar { width: 52px; height: 52px; font-size: 20px; }
.stu-name-cell { display: flex; align-items: center; gap: 8px; }
.stu-name-line { line-height: 1.35; }
.acct-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.acct-hd-main { min-width: 0; }
.acct-hd-name { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.3; }
/* 学员档案编辑弹窗：头像预览 + 选图/清除 */
.stu-ava-edit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 0; }
.stu-ava-btns { display: inline-flex; gap: 6px; }
.stu-ava-edit .sub { flex-basis: 100%; line-height: 1.4; }
.acct-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.acct-kpis > div { background: #FAF6F2; border-radius: 10px; padding: 10px 12px; }
.acct-kpis span { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 4px; }
.acct-kpis b { font-size: 17px; }
.acct-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.acct-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #F0E6DE; border-radius: 10px; background: #fff; }
.acct-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acct-row-main .acct-item { font-size: 14px; font-weight: 600; }
.acct-row-act { white-space: nowrap; }
.acct-row-act .link { margin-left: 8px; }
.acct-empty { padding: 10px 0; }
.acct-form { border: 1px dashed #E8D9CC; border-radius: 12px; padding: 14px; background: #FFFDFB; }
.acct-form-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.acct-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 12px; }
.acct-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acct-f span { font-size: 12px; color: var(--text-sub); }
.acct-logs { margin-top: 16px; border-top: 1px solid #F3EAE2; padding-top: 12px; }
.acct-log { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; }
/* 账单流水：对账提示条 + 增减数字配色 */
.acct-tip { padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.acct-tip.ok { background: #EEF7EF; color: #2F6B3C; border: 1px solid #CFE7D3; }
.acct-tip.warn { background: #FFF6E8; color: #8A5A15; border: 1px solid #F3DDB6; }
.acct-tip.bad { background: #FDECEC; color: #A32B2B; border: 1px solid #F5C9C9; }
.acct-in { color: #2F6B3C; }
/* 账户弹层操作条：合并入口常驻，不藏在提示里 */
.acct-tools { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; flex-wrap: wrap; }
.acct-tools .sub { font-size: 12px; }
/* 消课规则区（报名单上写死规则，之后扣课/顺延都按这套执行） */
.acct-rules { margin-top: 14px; border: 1px dashed #E8D9CC; border-radius: 10px; padding: 10px 12px; background: #FFFCF9; }
/* 日期时间框 + 快捷按钮：原生弹层万一不弹，快捷按钮也能把值填进去 */
.dt-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dt-quick input { flex: 1 1 auto; min-width: 0; }
.dt-quick .link { font-size: 12px; white-space: nowrap; padding: 0 2px; }

/* ---------- 自绘日期时间选择器（替代浏览器原生弹层） ---------- */
.dtp {
  position: fixed; z-index: 300; display: none; box-sizing: border-box;
  width: 442px; max-width: calc(100vw - 24px); padding: 14px 16px;
  background: #fff; border: 1px solid #F0E2D8; border-radius: 16px;
  box-shadow: 0 16px 40px rgba(90, 55, 30, .18);
  font-size: 13px; color: var(--text-main); user-select: none;
}
/* 左日历、右时间，底部按钮横跨：面板不会很高，一眼看完 */
.dtp.on {
  display: grid; grid-template-columns: 1fr 172px;
  grid-template-areas: "cal time" "foot foot";
  gap: 8px 14px;
}
.dtp-cal { grid-area: cal; }
.dtp-time {
  grid-area: time; margin-top: 0; border-top: none; padding-top: 0;
  border-left: 1px dashed #F0E2D8; padding-left: 12px;
}
/* 当前选择的时间：大号强调，省得三列数字分不清 */
.dtp-prev {
  text-align: center; font-size: 19px; font-weight: 700; letter-spacing: 1px;
  color: var(--primary); padding: 0 0 8px; font-variant-numeric: tabular-nums;
}
/* 列头：时 / 分 / 秒，窄列里必须标明含义 */
.dtp-heads {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  font-size: 11px; color: var(--text-sub); text-align: center; margin-bottom: 4px;
}
.dtp-foot { grid-area: foot; }
.dtp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 2px 10px; font-weight: 700; font-size: 14px;
}
.dtp-nav {
  width: 28px; height: 28px; border: none; border-radius: 8px; padding: 0;
  background: #FAF3ED; color: #8B7E74; font-size: 16px; line-height: 1; cursor: pointer;
}
.dtp-nav:hover { background: var(--primary-light); color: var(--primary); }
.dtp-week, .dtp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dtp-week span { text-align: center; font-size: 11px; color: var(--text-sub); padding: 3px 0 5px; }
.dtp-grid { gap: 2px; }
.dtp-day { text-align: center; padding: 7px 0; border-radius: 8px; cursor: pointer; }
.dtp-day:hover { background: #FAF3ED; }
.dtp-day.out { color: #D5C9BF; }
.dtp-day.now { color: var(--primary); font-weight: 700; }
.dtp-day.on { background: var(--primary); color: #fff; font-weight: 700; }
.dtp-time { margin-top: 10px; border-top: 1px dashed #F0E2D8; padding-top: 10px; }
/* 固定高度：跟着日历拉伸会把这一列拉成细长条，一眼看不到重点 */
.dtp-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 176px; }
.dtp-col {
  position: relative;   /* 让子项的 offsetTop 相对本列，滚动定位才准 */
  overflow-y: auto; border: 1px solid #F3E7DD; border-radius: 10px; background: #FFFDFB;
  scrollbar-width: thin;
}
.dtp-col::-webkit-scrollbar { width: 6px; }
.dtp-col::-webkit-scrollbar-thumb { background: #EBDCD0; border-radius: 3px; }
.dtp-num {
  display: block; text-align: center; padding: 5px 0; margin: 2px 4px; border-radius: 6px;
  cursor: pointer; font-variant-numeric: tabular-nums;   /* 数字等宽，滚动时不左右跳 */
}
.dtp-num:hover { background: #FAF3ED; }
.dtp-num.on { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.dtp-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  margin-top: 10px; border-top: 1px dashed #F0E2D8; padding-top: 10px;
}
.dtp-foot .link:first-child { margin-right: auto; }
/* ---------- 线上活动 · 大转盘（后台配置） ---------- */
/* 左表单、右预览：预览用 sticky 吸住，滚动改奖品时也能一直看到转盘 */
.act-editor { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.act-col { min-width: 0; }
.act-editor .sec-line { margin: 14px 0 8px; }
.act-preview {
  position: sticky; top: 12px;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px; border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, #4A2A16 0%, #26140A 62%, #150B05 100%);
  box-shadow: 0 10px 28px rgba(60, 35, 15, .22);
}
.act-preview .web-label { color: #FFD8B0; font-size: 12px; }
.act-preview #actWheelCanvas { display: block; }
.act-preview .sub { color: #E8CDB2; }
/* 九宫格预览：3×3，中间一格是开始按钮 */
.act-grid-preview {
  width: 320px; max-width: 100%;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.ag-cell {
  position: relative; aspect-ratio: 1 / 1; border-radius: 12px; padding: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; overflow: hidden; text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .32), inset 0 -2px 4px rgba(0, 0, 0, .16);
}
.ag-emoji { font-size: 22px; line-height: 1; }
.ag-name {
  font-size: 11px; font-weight: 700; color: #fff; line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55); word-break: break-all;
}
.ag-go {
  background: radial-gradient(circle at 34% 28%, #FFE9C7 0%, #FFD166 42%, #F4791F 78%, #E4571B 100%);
  color: #7A2E00; font-weight: 900; font-size: 13px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .4), inset 0 -3px 6px rgba(150, 60, 0, .35);
}
.ag-empty {
  background: rgba(255, 255, 255, .07); color: #CBB49A; font-size: 12px;
  border: 1px dashed rgba(255, 255, 255, .24); box-shadow: none;
}
.act-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; width: 100%; }
.act-btns .btn-ghost.sm { background: rgba(255, 255, 255, .16); color: #fff; }
#actPrizeTable input.web-input, #actPrizeTable select.web-input { padding: 6px 8px; font-size: 13px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
@media (max-width: 1180px) {
  .act-editor { grid-template-columns: 1fr; }
  .act-preview { position: static; }
}
.acct-compliance { margin-top: 6px; border-top: 1px dashed #F0E2D8; padding-top: 8px; }
.acct-leaves { margin: 12px 0; border: 1px solid #F3DDB6; background: #FFF8EC; border-radius: 10px; padding: 10px 12px; }
.acct-leave { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; padding: 5px 0; }
.acct-leave-act { white-space: nowrap; }
.acct-leave-act .link { margin-left: 8px; }
/* 经营看板 KPI 卡 */
.biz-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.biz-kpi { background: #FFFDFB; border: 1px solid #EEE0D6; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.biz-kpi > span:first-child { font-size: 12px; color: var(--text-sub); }
.biz-kpi b { font-size: 20px; }
.biz-kpi.bad { border-color: #F5C9C9; background: #FDF3F3; }
.biz-kpi.warn { border-color: #F3DDB6; background: #FFF8EC; }
.acct-rule-row .sub { font-size: 12px; }
.acct-inline { flex-direction: row; align-items: center; gap: 6px; }
.acct-inline .web-input { width: 110px; }
.acct-rule-tag { color: #8A5A15; background: #FFF6E8; border: 1px solid #F3DDB6; border-radius: 8px; padding: 0 6px; }

/* --- 托管考勤表 --- */
.care-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.care-table th, .care-table td { padding: 4px 8px; border-bottom: 1px dashed #F0E2D8; }
.care-cell {
  display: inline-block; width: 36px; height: 28px; line-height: 26px; text-align: center;
  border: 1px solid #EFE3DA; border-radius: 6px; cursor: pointer; user-select: none;
  background: #FFFDFB; font-weight: 600;
}
.care-cell:hover { border-color: var(--primary); }
.care-p { background: #E8F5EC; color: #1F7A3D; border-color: #BFE3C8; }
.care-a { background: #FDECEC; color: #C0392B; border-color: #F3C1C1; }

/* 单人考勤表弹窗的格子（纵向日期列表，每行午/晚两格） */
.care-cell {
  display: inline-block; width: 36px; height: 28px; line-height: 26px; text-align: center;
  border: 1px solid #EFE3DA; border-radius: 6px; cursor: pointer; user-select: none;
  background: #FFFDFB; font-weight: 600;
}
.care-cell:hover { border-color: var(--primary); }

/* 托管考勤月度报表：学员 × 日期日历矩阵（每天一格、格内午/晚两行），固定布局铺满一屏不滚动 */
.care-rpt { width: 100%; table-layout: fixed; font-size: 11px; border-collapse: collapse; }
.care-rpt th, .care-rpt td { padding: 2px 1px; border: 1px solid #F0E2D8; text-align: center; overflow: hidden; }
.care-rpt thead th {
  background: #FBF5F0; font-weight: 600; line-height: 1.15; word-break: break-all;
}
.care-rpt thead th i { display: block; font-style: normal; font-weight: 400; color: #9B8C82; }
.care-rpt thead th.care-we { background: #F6EDE7; }
.care-rpt th.cr-name { width: 84px; text-align: left; padding-left: 6px; }
.care-rpt th.cr-tch { width: 54px; }
.care-rpt th.cr-sum { width: 28px; }
.care-rpt td.cr-name { text-align: left; padding-left: 6px; line-height: 1.2; }
.care-rpt td.cr-name b { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.care-rpt td.cr-name i { display: block; font-style: normal; font-size: 10px; color: #9B8C82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.care-rpt td.cr-tch { font-size: 10px; color: #6B5B52; }
.care-rpt td.cr-day { padding: 1px; }
.care-rpt td.cr-rate b { color: #1F7A3D; }
/* 格内午/晚小格：可点击循环状态 */
.care-rpt .cr-m {
  display: block; line-height: 13px; font-size: 11px; border-radius: 3px;
  margin: 1px 0; cursor: pointer; background: #FFFDFB; border: 1px solid transparent;
}
.care-rpt .cr-m span { opacity: .5; margin-right: 1px; }
.care-rpt .cr-m:hover { border-color: var(--primary); }
.care-rpt .cr-m.none { color: #D8CEC7; background: #FBF9F7; cursor: default; }
.care-rpt td.care-off { color: #9B8C82; background: #F4F1EE; }
/* 状态配色（与图例一致） */
.care-s-present, .care-rpt .cr-m.st-present { background: #E8F5EC; color: #1F7A3D; }
.care-s-late, .care-rpt .cr-m.st-late { background: #FFF6E5; color: #B4762A; }
.care-s-early, .care-rpt .cr-m.st-early { background: #FFF1E0; color: #C2701A; }
.care-s-sick, .care-rpt .cr-m.st-sick { background: #F3EAFB; color: #7A4FA3; }
.care-s-personal, .care-rpt .cr-m.st-personal { background: #ECF1FA; color: #3F5C99; }
.care-s-absent, .care-rpt .cr-m.st-absent { background: #FDECEC; color: #C0392B; }
.care-legend {
  display: inline-block; min-width: 18px; padding: 0 3px; margin-right: 2px;
  border-radius: 4px; text-align: center;
}


.toolbar { margin-bottom: 14px; }
.pager { margin-top: 14px; }

/* 分页条：左「每页条数」/ 中「共 N 条」/ 右「‹ 页码 / 总页数 ›」
   用 grid 三段而不是 flex，中间那段才是真正居中（flex 下会被左右宽度带偏） */
.pager-bar {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
  padding: 8px 12px;
  background: #FFFDFB; border: 1px solid #F3E7DD; border-radius: 10px;
  font-size: 13px; color: var(--text-sub);
}
.pb-left { justify-self: start; }
.pb-mid { justify-self: center; white-space: nowrap; }
.pb-mid b { color: var(--text-main); font-weight: 600; margin: 0 2px; }
.pb-right { justify-self: end; display: flex; align-items: center; gap: 6px; }
.pb-size {
  height: 30px; padding: 0 8px; cursor: pointer;
  border: 1px solid #EFE3D9; border-radius: 8px;
  background: #fff; color: var(--text-main); font-size: 13px;
}
.pb-size:focus { outline: none; border-color: var(--primary); }
.pb-btn {
  width: 28px; height: 28px; padding: 0; line-height: 1;
  border: 1px solid #EFE3D9; border-radius: 8px; background: #fff;
  color: #8B7E74; font-size: 15px; cursor: pointer;
}
.pb-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pb-btn:disabled { opacity: .4; cursor: not-allowed; }
.pb-jump {
  width: 42px; height: 28px; text-align: center;
  border: 1px solid #EFE3D9; border-radius: 8px;
  color: var(--text-main); font-size: 13px;
}
.pb-jump:focus { outline: none; border-color: var(--primary); }
.pb-sep { color: #C9B8A8; }
.pb-pages { min-width: 20px; color: var(--text-main); }

/* 自定义日期/月份选择弹层：替代浏览器原生小日历 */
/* 关键：隐藏原生小日历图标（点它会弹浏览器原生日历，与自定义弹层重复出现） */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator { display: none !important; -webkit-appearance: none; }
input[type="date"], input[type="month"] { cursor: pointer; }
.sf-cal {
  position: fixed; z-index: 3000; width: 262px; padding: 10px;
  background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  user-select: none;
}
.sf-cal.hidden { display: none; }
.sf-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sf-cal-head b { font-size: 14px; color: #2B2320; }
.sf-cal-nav {
  width: 32px; height: 32px; line-height: 30px; text-align: center; border-radius: 9px;
  cursor: pointer; color: var(--primary); font-size: 17px; background: #FFF6EF;
}
.sf-cal-nav:hover { background: #FFEBDC; }
.sf-cal-wk {
  display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;
  font-size: 11px; color: #9B8C82; margin-bottom: 3px;
}
.sf-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.sf-cal-d {
  height: 34px; line-height: 32px; text-align: center; border-radius: 9px; cursor: pointer;
  font-size: 13px; border: 1px solid transparent;
}
.sf-cal-d:hover { background: #FFF1E5; border-color: #FFD9B8; }
.sf-cal-d.out { color: #D8CEC7; }
.sf-cal-d.today { border-color: var(--primary); }
.sf-cal-d.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.sf-cal-mon { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sf-cal-m {
  height: 46px; line-height: 44px; text-align: center; border-radius: 10px; cursor: pointer;
  border: 1px solid #F0E2D8; font-size: 14px;
}
.sf-cal-m:hover { background: #FFF1E5; border-color: #FFD9B8; }
.sf-cal-m.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.sf-cal-foot { display: flex; justify-content: space-between; margin-top: 6px; }
.sf-cal-link { color: var(--primary); font-size: 12px; cursor: pointer; padding: 3px 8px; border-radius: 6px; }
.sf-cal-link:hover { background: #FFF1E5; }

/* 打卡 */
.ck-list { display: grid; gap: 14px; }
.ck-item {
  background: #fff; border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 4px 16px rgba(255, 122, 46, 0.08);
}
.ck-head { font-size: 13px; color: var(--text-sub); margin-bottom: 8px; }
.ck-content { font-size: 14px; margin-bottom: 10px; white-space: pre-wrap; }
.ck-reject { font-size: 13px; color: var(--danger); background: #FDEBEC; padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; }
.ck-media { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.media {
  max-width: 240px; max-height: 260px; border-radius: 10px;
  border: 1px solid #F6EDE7; object-fit: cover; cursor: zoom-in;
}

/* 核销 */
.rd-result { margin: 10px 0; }
.rd-item { padding: 8px 0; border-bottom: 1px solid #F6EDE7; }
.rd-sel { background: var(--primary-light); padding: 10px 14px; border-radius: 10px; }

/* 弹层 */
.modal {
  position: fixed; inset: 0; background: rgba(60, 40, 25, .45);
  display: flex; align-items: center; justify-content: center; z-index: 99;
}
.modal-card { background: #fff; border-radius: 16px; padding: 24px; width: 420px; max-width: 92vw; }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.modal-btns { display: flex; gap: 12px; margin-top: 16px; }
.modal-btns .btn-primary, .modal-btns .btn-ghost { flex: 1; }

/* 邮件模板编辑：默认展示可视化预览，源码用等宽字体并自动换行，避免长 HTML 看起来像乱码 */
.modal-card:has(.mail-tpl-editor) {
  width: min(980px, 96vw); max-width: 96vw; max-height: 92vh;
  overflow: hidden; display: flex; flex-direction: column;
}
.modal-card:has(.mail-tpl-editor) #modalBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.mail-tpl-editor { margin-top: 12px; border: 1px solid #F2E8E0; border-radius: 12px; padding: 12px; background: #FFFCFA; }
.mail-tpl-editor-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.mail-tpl-tabs { display: inline-flex; gap: 6px; padding: 3px; border-radius: 10px; background: #F7EFE8; }
.mail-tpl-tab {
  border: none; border-radius: 8px; padding: 6px 14px; cursor: pointer;
  background: transparent; color: #8A7666; font-size: 13px; font-family: inherit;
  transition: background .18s ease, color .18s ease;
}
.mail-tpl-tab:hover { background: #F0E2D5; color: #5A4A3F; }
.mail-tpl-tab.active { background: var(--primary); color: #fff; font-weight: 600; }
.mail-tpl-tab:focus-visible, .mail-tpl-preview:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mail-tpl-pane { min-width: 0; }
.mail-tpl-note { font-size: 12px; color: #9B8C82; margin-bottom: 8px; }
.mail-tpl-preview {
  min-height: 320px; max-height: 480px; overflow: auto;
  padding: 16px; border: 1px solid #EBDDD2; border-radius: 10px; background: #fff;
  font-size: 13px; line-height: 1.7;
}
.mail-tpl-preview table { border-collapse: collapse; max-width: 100%; }
.mail-tpl-preview th, .mail-tpl-preview td { border: 1px solid #EAD9CC; padding: 6px 9px; text-align: left; }
.mail-tpl-preview th { background: #FFF8F2; font-weight: 600; }
.mail-tpl-code {
  width: 100%; min-height: 340px; resize: vertical;
  font-family: "Fira Code", "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 12.5px; line-height: 1.7; tab-size: 2;
  white-space: pre-wrap; word-break: break-word;
  background: #FFFDFB; color: #4A382A;
}
.mail-tpl-code:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
@media (max-width: 760px) {
  .modal-card:has(.mail-tpl-editor) { width: 100%; max-width: 100%; padding: 16px; }
  .mail-tpl-code { min-height: 260px; font-size: 12px; }
  .mail-tpl-preview { min-height: 240px; padding: 12px; }
}

/* 提示 */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  padding: 12px 24px; border-radius: 24px; color: #fff; font-size: 14px; z-index: 200;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}
.toast.ok { background: #2E7D32; }
.toast.err { background: var(--danger); }

/* 学员招生字段与跟进 */
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-sub); margin-right: 10px; }

/* ---------- 学员列表：11 列挤进一屏 ---------- */
/* table-layout 必须是 fixed：否则列宽完全由内容决定，openid / 账户这种长文本
   会把右边几列直接顶出屏幕。之前用 colgroup 的 col 百分比设宽，实测不生效
   （col 的宽度在这种表格上会被忽略，退回按内容自适应），所以改成在 th/td 上直接写。 */
#stuTable { table-layout: fixed !important; width: 100%; }
/* 列宽按「这一列内容值多少」分配，不做平均：
   1 勾选 2 姓名 3 身份 4 校区 5 微信 6 账户 7 家长 8 年级 9 托管 10 归属 11 顾问 12 操作
   加了校区列之后，把身份/微信/账户/托管/归属各让 1% 出来，总宽仍控制在 104% 左右 */
#stuTable th:nth-child(1), #stuTable td:nth-child(1) { width: 30px; }
#stuTable th:nth-child(2), #stuTable td:nth-child(2) { width: 13%; }
#stuTable th:nth-child(3), #stuTable td:nth-child(3) { width: 5%; }
#stuTable th:nth-child(4), #stuTable td:nth-child(4) { width: 7%; }
#stuTable th:nth-child(5), #stuTable td:nth-child(5) { width: 11%; }
#stuTable th:nth-child(6), #stuTable td:nth-child(6) { width: 12%; }
#stuTable th:nth-child(7), #stuTable td:nth-child(7) { width: 10%; }
#stuTable th:nth-child(8), #stuTable td:nth-child(8) { width: 5%; }
#stuTable th:nth-child(9), #stuTable td:nth-child(9) { width: 8%; }
#stuTable th:nth-child(10), #stuTable td:nth-child(10) { width: 13%; }
#stuTable th:nth-child(11), #stuTable td:nth-child(11) { width: 9%; }
#stuTable th:nth-child(12), #stuTable td:nth-child(12) { width: 11%; }
/* 校区小标签：诺德 / 绣源河，两个字的短标签不占地方，扫一眼就知道是哪边的人 */
#stuTable .campus-tag {
  display: inline-block; padding: 1px 6px; border-radius: 6px;
  background: rgba(255, 122, 46, .12); color: var(--primary, #FF7A2E);
  font-size: 11.5px; line-height: 16px;
}
#stuTable th, #stuTable td {
  padding: 8px; font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 固定布局下 td 里的 div 会被裁掉但不出省略号，单独补一条 */
#stuTable td > div.sub { overflow: hidden; text-overflow: ellipsis; }
/* 勾选列：原来 15px 的白底小方块在浅色表头里几乎看不见，用户以为没有选择框，
   加大到 16px 并染成主题橙，勾没勾一眼能分辨 */
#stuTable .stu-check-col { width: 36px; text-align: center; padding-left: 4px !important; padding-right: 0 !important; }
#stuTable .stu-check-col input {
  width: 16px; height: 16px; cursor: pointer; vertical-align: middle;
  accent-color: var(--primary, #FF7A2E);
}
/* 操作列固定 2×2：挤成一行会折成「档案 账户 跟进 / 调分」，末行一个按钮看着像漏了 */
#stuTable td.row-act { white-space: normal; overflow: visible; padding: 6px 4px; }
#stuTable td.row-act .act-grid { display: grid; grid-template-columns: 1fr 1fr; row-gap: 2px; }
#stuTable td.row-act .link { padding: 0; font-size: 12px; line-height: 17px; text-align: left; }

.stu-batch-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 0; padding: 10px 14px;
  background: #FFF7F0; border: 1px solid #FFE0C9; border-radius: 10px;
}
.stu-batch-bar .sbb-count { font-size: 13px; color: #A0522D; }
.stu-batch-bar .sbb-count b { font-size: 17px; color: var(--primary); margin: 0 2px; }
.stu-batch-bar .sbb-tip { font-size: 12px; color: #B9A899; }
/* 批量条里的「日期 + 排除当日考勤」：内联成一组，输入和按钮同高，别塌下去 */
.stu-batch-bar .sbb-excl { display: inline-flex; align-items: center; gap: 6px; }
.stu-batch-bar .sbb-excl .input.inline { width: 150px; padding: 5px 8px; }
/* 归属列 2×2 排布：竖排 4 行会把行高撑到 76px，一屏看不了几条。
   字号和前缀宽度都收到最小：「班 李良帅2」这种四字名字要在半列宽里放得下 */
.stu-owner-cell .ow-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; }
.stu-owner-cell .ow {
  font-size: 11px; line-height: 16px; color: #3D2E25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stu-owner-cell .ow i {
  font-style: normal; display: inline-block; width: 12px; margin-right: 1px;
  color: #B9A899; font-size: 10.5px;
}
/* 微信列：上面微信名、下面 openid 缩写 + 复制。合列之后两块都有地方放，
   不会再出现「微信名被截成两个字 + openid 被截成半截」 */
.stu-wx .wx-name { font-size: 12px; color: #3D2E25; overflow: hidden; text-overflow: ellipsis; }
.stu-wx .wx-oid {
  display: flex; align-items: center; margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px; color: #8B7E74;
}
.stu-wx .wx-oid .oid-val { overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.2px; }
.stu-wx .wx-oid .oid-copy { flex: none; margin-left: 2px; padding: 0 2px; font-size: 10.5px; color: var(--primary); }
.stu-wx .wx-oid .oid-copy:hover { text-decoration: underline; }
/* openid 下面的小程序绑定状态（与编辑弹窗「小程序」行同口径） */
.stu-wx .wx-bind { margin-top: 2px; font-size: 10.5px; }
/* 窄屏再压就糊了，保留横向滚动兜底 */
@media (max-width: 1180px) {
  #stuTable { min-width: 980px; }
}

/* ===== 多选下拉（意向课程 / 特色课类型） ===== */
.msel {
  position: relative; display: flex; align-items: center;
  min-height: 38px; padding: 5px 28px 5px 10px;
  border: 1px solid #EFE3DA; border-radius: 10px; background: #fff; cursor: pointer;
}
.msel:hover { border-color: #E8C9B4; }
.msel-chips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; min-width: 0; }
.msel-ph { color: #B9A99C; font-size: 13px; line-height: 26px; }
.msel-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--primary-light); color: #B4571C;
  font-size: 12px; line-height: 20px;
}
.msel-chip i { font-style: normal; cursor: pointer; color: #C08A63; font-size: 13px; }
.msel-chip i:hover { color: var(--primary); }
/* 真值藏在隐藏 input 里，保存逻辑照旧读 el.value */
.msel-input { position: absolute; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; }
.msel-arrow {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: #B9A99C; font-size: 11px; pointer-events: none;
}
.msel-panel {
  position: fixed; z-index: 9999; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid #EFE3DA; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(90, 60, 40, .14); padding: 6px;
}
.msel-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.msel-opt:hover { background: var(--primary-light); }
.msel-opt.on { color: #B4571C; font-weight: 600; }
.msel-box {
  width: 15px; height: 15px; flex: 0 0 15px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #D9C6B8; border-radius: 4px;
  font-size: 11px; font-style: normal; color: #fff;
}
.msel-opt.on .msel-box { background: var(--primary); border-color: var(--primary); }
.msel-tip { padding: 10px; font-size: 12px; color: var(--text-sub); }
/* 只读字段（没有「编辑归属」权限）：看起来就得是不能改的样子 */
.web-input.web-ro { background: #F7F2EE; color: #8B7E74; cursor: not-allowed; }
.web-ro-hint { margin-left: 8px; font-size: 11px; font-weight: 400; color: #C08A63; }
table td.due { color: var(--danger); font-weight: 600; }
.web-input textarea, textarea.web-input { width: 100%; resize: vertical; font-family: inherit; }
select.web-input { height: 44px; }
.tl { margin-top: 16px; border-left: 2px solid #F2EAE4; padding-left: 14px; }
.tl-item { margin-bottom: 16px; }
.tl-top { display: flex; justify-content: space-between; font-size: 13px; }
.tl-content { font-size: 13px; margin: 6px 0; line-height: 1.6; white-space: pre-wrap; }
.follow-add { border-bottom: 1px solid #F6EDE7; padding-bottom: 14px; }

.sec-line { margin: 18px 0 10px; font-size: 14px; font-weight: 700; color: var(--text-main); border-left: 4px solid var(--primary); padding-left: 8px; }
.calc-preview { margin-top: 16px; padding: 12px 16px; border-radius: 10px; background: var(--primary-light); color: var(--primary); font-size: 14px; }
.pay-sum { padding: 12px 0; font-size: 14px; color: var(--text-sub); }
button.link.danger { color: var(--danger); }

/* ===== 弹层表单：分组 + 两列网格 ===== */
.modal-card { width: 640px; max-height: 86vh; overflow-y: auto; padding: 26px 28px; }
.modal-title { font-size: 17px; padding-bottom: 12px; border-bottom: 1px solid #F6EDE7; margin-bottom: 16px; }
.web-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.web-group {
  grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--text-main);
  padding-left: 8px; border-left: 3px solid var(--primary); margin: 8px 0 0;
}
.web-field { display: flex; flex-direction: column; min-width: 0; }
.web-field.web-span2 { grid-column: 1 / -1; }
.web-label { font-size: 12px; color: var(--text-sub); margin-bottom: 5px; }
.web-input {
  width: 100%; padding: 10px 12px; border: 1px solid #F0E2D8; border-radius: 10px;
  font-size: 14px; background: #FFFBF8; color: var(--text-main); outline: none; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.web-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(255,122,46,.12); }
/* 只读字段聚焦后不能变成"可编辑"的白底橙框：:focus 的背景会盖住 .web-ro，
   看起来像能改，实际保存时被云函数整列丢弃 —— 白改一场。
   这里的特异性（0,3,0）高于 .web-input:focus（0,2,0），一定压得住。 */
.web-input.web-ro:focus {
  background: #F7F2EE;
  border-color: #E8DED6;
  box-shadow: none;
  color: #8B7E74;
}
select.web-input { height: 41px; cursor: pointer; }
.req { color: var(--danger); font-style: normal; margin-right: 2px; }
.modal-btns { justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid #F6EDE7; }
.modal-btns .btn-primary, .modal-btns .btn-ghost { flex: 0 0 auto; min-width: 110px; }
@media (max-width: 640px) { .web-grid { grid-template-columns: 1fr; } }

/* 学员档案弹窗：紧凑两列，一屏放下少滚动 */
.stu-grid { gap: 6px 12px; }
.stu-grid .web-label { margin-bottom: 2px; font-size: 11px; }
.stu-grid .web-input { padding: 5px 10px; font-size: 13px; }
.stu-grid select.web-input { height: 30px; }
.stu-grid .web-group { margin: 1px 0 0; font-size: 12px; }

/* 学员编辑弹窗：基本信息左侧表单 + 右侧优惠券卡 */
.stu-basic-wrap {
  grid-column: 1 / -1; display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 14px; align-items: start;
}
.stu-basic-main { min-width: 0; }
.stu-coupon-side {
  position: sticky; top: 0; min-width: 0;
  padding: 12px; border: 1px solid #F3E4D9; border-radius: 12px;
  background: #FFFCF9;
}
.stu-cp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 9px;
  background: linear-gradient(135deg, #FF9A56, #FF7A2E); color: #fff;
}
.stu-cp-head b { font-size: 13px; }
.stu-cp-head span { font-size: 11px; opacity: .92; }
.stu-cp-item {
  display: flex; margin-top: 10px; overflow: hidden;
  border: 1px solid #F1DFD2; border-radius: 9px; background: #fff;
}
.stu-cp-amount {
  width: 78px; flex: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-right: 1px dashed #F0D9C9; color: var(--primary);
}
.stu-cp-cny { font-size: 11px; }
.stu-cp-cny b { font-size: 22px; margin-left: 1px; }
.stu-cp-min { margin-top: 1px; font-size: 10px; color: #B58A70; white-space: nowrap; }
.stu-cp-info { flex: 1; min-width: 0; padding: 8px 9px; }
.stu-cp-name {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 12px; font-weight: 700; color: #3D2E25;
}
.stu-cp-name span {
  flex: none; padding: 1px 6px; border-radius: 999px;
  background: var(--primary-light); color: var(--primary); font-size: 10px; font-weight: 600;
}
.stu-cp-line { margin-top: 4px; font-size: 11px; color: #8A7666; }
.stu-cp-code {
  margin-top: 4px; font-size: 11px; color: #6E5A4C;
  font-family: Consolas, Menlo, monospace; letter-spacing: .3px;
}
.stu-cp-empty {
  margin-top: 10px; padding: 18px 8px; text-align: center;
  border: 1px dashed #E8D6C8; border-radius: 9px;
  font-size: 11px; color: var(--text-sub);
}
.stu-cp-tip { margin-top: 8px; font-size: 10px; color: #B09C8E; line-height: 1.5; }
@media (max-width: 960px) {
  .stu-basic-wrap { grid-template-columns: 1fr; }
  .stu-coupon-side { position: static; }
}
.modal-card:has(.stu-grid) { width: 880px; max-width: 96vw; padding: 18px 24px; max-height: 92vh; }
.modal-card:has(.stu-grid) .modal-title { padding-bottom: 8px; margin-bottom: 10px; font-size: 16px; }
.modal-card:has(.stu-grid) .modal-btns { margin-top: 12px; padding-top: 10px; }
.modal-card:has(.stu-grid) .modal-btns .btn-primary, .modal-card:has(.stu-grid) .modal-btns .btn-ghost { min-width: 90px; }

/* ===== 工资单弹窗：一行两列 ===== */
.modal-card:has(.pay-form) { width: 780px; max-width: 96vw; padding: 22px 26px; }
.modal-card:has(.pay-detail) { width: 720px; max-width: 96vw; }
.pay-grid { gap: 10px 16px; }
.pay-grid .web-label { margin-bottom: 4px; font-size: 11.5px; }
.pay-grid .web-input { padding: 8px 11px; font-size: 13.5px; height: 38px; }
.pay-grid select.web-input { height: 38px; }
.pay-grid textarea.web-input { height: auto; min-height: 38px; }
.pay-grid .web-group {
  margin: 10px 0 2px; padding: 5px 0 5px 9px;
  border-left: 3px solid var(--primary); border-radius: 0 6px 6px 0;
  background: linear-gradient(90deg, #FFF6EE, rgba(255, 246, 238, 0) 72%);
  font-size: 12.5px;
}
.web-input:disabled { background: #F7F2EE; color: #8B7E74; cursor: not-allowed; }
.pay-alert {
  margin-bottom: 14px; padding: 10px 12px; border-radius: 10px;
  background: #FFF3E8; color: #8A6A50; font-size: 12.5px; line-height: 1.6;
}
.calc-preview {
  margin-top: 16px; padding: 12px 16px;
  border: 1px solid #FADFC8; border-radius: 10px;
  background: var(--primary-light); color: #8A5A34;
  font-size: 13px; line-height: 1.6;
}
.calc-preview b { color: var(--primary); font-size: 15px; }
.calc-preview b.strong { font-size: 18px; }

/* 发放详情：一行两组「字段 / 值」 */
.pay-detail .web-group { margin: 14px 0 6px; }
.pay-detail > .web-group:first-child { margin-top: 0; }
.pd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.pd-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-width: 0; padding: 8px 2px; border-bottom: 1px dashed #F0E4DA;
}
.pd-key { flex: none; font-size: 12px; color: var(--text-sub); }
.pd-val {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--text-main); text-align: right;
}
.pd-val.is-strong { color: var(--primary); }

/* 签字详情：签名图 + 工资明细同屏查看 */
.modal-card:has(.pay-sign-detail) {
  width: min(920px, 96vw); max-width: 96vw; max-height: 92vh;
  overflow: hidden; display: flex; flex-direction: column;
}
.modal-card:has(.pay-sign-detail) #modalBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.pay-sign-box {
  padding: 14px; border: 1px solid #F0E2D7; border-radius: 12px;
  background: #FFFDFB; margin-bottom: 14px;
}
.pay-sign-box .web-group { margin-top: 0; }
.pay-sign-img {
  display: block; max-width: 100%; max-height: 260px; object-fit: contain;
  border: 1px dashed #E4D3C4; border-radius: 8px; background: #fff;
}
.pay-file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pay-file-item {
  display: flex; align-items: center; gap: 8px; min-width: 190px; max-width: 100%;
  padding: 6px 8px; border: 1px solid #F0E2D7; border-radius: 8px; background: #fff;
}
.pay-file-item img { width: 38px; height: 38px; object-fit: cover; border-radius: 6px; }
.pay-file-pdf {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 6px; background: #FFF1E8; color: #D54941; font-weight: 700; font-size: 11px; text-decoration: none;
}
.pay-file-name { flex: 1; font-size: 12px; color: #6F5C4E; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-file-del { border: none; background: transparent; color: #C25555; font-size: 18px; line-height: 1; padding: 0 4px; cursor: pointer; }
@media (max-width: 720px) {
  .pay-sign-img { max-height: 180px; }
}

@media (max-width: 720px) {
  .modal-card:has(.pay-form), .modal-card:has(.pay-detail) {
    width: 100%; max-width: 100%; padding: 16px;
  }
  .pay-grid, .pd-grid { grid-template-columns: 1fr; }
  .pay-grid .web-field.web-span2 { grid-column: auto; }
}

/* 弹窗右上角关闭按钮 */
.modal-card { position: relative; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border: none; border-radius: 50%; background: #F6EDE7; color: #9B8C82;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
}
.modal-close:hover { background: #F0E2D8; color: #6B5B51; }

/* ===== 月度结算：9 列宽表，弹窗放宽 + 表格横向滚动 ===== */
/* 640px 的默认弹窗放不下 9 列，右侧「退费 / 差额」会被裁掉 */
.modal-card:has(.mb-wrap) { width: 1080px; max-width: 96vw; }
.mb-scroll { overflow-x: auto; }
/* 给表格兜个最小宽度，列不被挤扁；放不下时出现横向滚动条 */
.mb-scroll .table { min-width: 840px; }
.mb-scroll .table th, .mb-scroll .table td { white-space: nowrap; }
/* 窄屏（手机 / 平板）走全宽抽屉，表格自己横向滑动 */
@media (max-width: 900px) {
  .modal-card:has(.mb-wrap) { width: 100%; max-width: 100%; }
}

/* ===== 集合预览：宽弹窗 + 卡片/表格双视图 =====
   旧版用窄表格塞 admins 这类十几列集合，_id / _openid 会把右侧字段挤出屏幕。
   现在弹窗放宽并改成响应式卡片，长字段自动换行；表格视图保留横向滚动。 */
.modal-card:has(.bk-preview-wrap) {
  width: min(1240px, 96vw); max-width: 96vw;
  max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
}
.modal-card:has(.bk-preview-wrap) #modalBody {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
}
.bk-preview-wrap { display: flex; flex-direction: column; gap: 14px; }
.bk-preview-toolbar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px solid #F0E4D9; border-radius: 12px;
  background: linear-gradient(180deg, #FFFDFB 0%, #FFF8F2 100%);
}
.bk-preview-field { display: flex; flex-direction: column; gap: 5px; min-width: 200px; }
.bk-preview-field label { font-size: 12px; font-weight: 600; color: #8A7666; }
.bk-preview-field select { min-width: 200px; }
.bk-preview-actions { display: flex; gap: 8px; margin-left: auto; }
.bk-preview-result { min-height: 120px; }
.bk-preview-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px; border-radius: 10px;
  background: #FBF6F1; color: #6B5B51; font-size: 12.5px;
}
.bk-preview-summary code {
  padding: 2px 7px; border-radius: 6px; background: #F0E2D5; color: #8A5A35; font-weight: 600;
}
.bk-preview-count { margin-left: auto; color: #2E7D32; font-weight: 600; }
.bk-doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.bk-doc-card {
  border: 1px solid #F0E4D9; border-radius: 12px; background: #fff; overflow: hidden;
  box-shadow: 0 2px 10px rgba(90, 60, 35, .04);
}
.bk-doc-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #FBF6F1; border-bottom: 1px solid #F3E7DD;
}
.bk-doc-index {
  flex: none; min-width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 700;
}
.bk-doc-title { min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--text-main); word-break: break-word; }
.bk-doc-sub { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: #A49386; text-align: right; word-break: break-all; }
.bk-kv { display: grid; grid-template-columns: minmax(92px, 130px) minmax(0, 1fr); gap: 0; padding: 4px 12px 10px; }
.bk-kv-row { display: contents; }
.bk-k, .bk-v { padding: 6px 4px; border-bottom: 1px dashed #F4ECE5; font-size: 12px; }
.bk-k { color: #9B8C82; word-break: break-all; }
.bk-v { color: var(--text-main); white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 110px; overflow: auto; }
.bk-doc-card:hover { border-color: #E5CEB9; }
.bk-preview-table-wrap {
  overflow: auto; max-height: 56vh; border: 1px solid #F0E4D9; border-radius: 12px; background: #fff;
}
.bk-preview-table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 12px; }
.bk-preview-table th, .bk-preview-table td {
  padding: 8px 10px; border-bottom: 1px solid #F3E7DD; text-align: left;
  white-space: normal; word-break: break-word; vertical-align: top; max-width: 280px;
}
.bk-preview-table th {
  position: sticky; top: 0; z-index: 1; background: #FBF6F1; color: #8B7D72; font-weight: 600;
}
.bk-preview-table tr:hover td { background: #FFFBF7; }
@media (max-width: 720px) {
  .modal-card:has(.bk-preview-wrap) { width: 100%; max-width: 100%; padding: 18px; }
  .bk-preview-actions { width: 100%; margin-left: 0; }
  .bk-preview-actions .btn { flex: 1; }
  .bk-doc-grid { grid-template-columns: 1fr; }
}

/* ===== 员工档案履历附件 ===== */
.rec-atts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.rec-att {
  width: 88px; height: 88px; object-fit: cover; border-radius: 10px;
  border: 1px solid #F6EDE7; cursor: zoom-in; background: #FFFBF8;
}

/* ===== 日期选择器美化 ===== */
.input.date-input {
  padding: 10px 14px; background: #fff; color: var(--text-main);
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.input.date-input:hover { border-color: #E8C9B4; }
.input.date-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 122, 46, .12); outline: none; }
.input.date-input::-webkit-calendar-picker-indicator {
  opacity: .5; cursor: pointer; transition: opacity .15s;
}
.input.date-input::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* ===== 图片灯箱（点击放大查看） ===== */
.lightbox {
  position: fixed; inset: 0; background: rgba(40, 26, 16, .8);
  display: flex; align-items: center; justify-content: center; z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity .18s; cursor: zoom-out;
}
.lightbox.on { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw; max-height: 88vh; border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .45);
}

/* ===== 履历上传控件 ===== */
.upload-row { display: flex; align-items: center; gap: 12px; min-height: 34px; }
.up-thumb { position: relative; width: 72px; height: 72px; }
.up-thumb img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
  border: 1px solid #F6EDE7; background: #FFFBF8;
}
.up-del {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
  border-radius: 50%; background: #E5484D; color: #fff; font-size: 13px;
  line-height: 20px; text-align: center; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2); user-select: none;
}
.pdf-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px dashed #F0E4DA; font-size: 13px;
}
.pdf-item .link { margin-left: auto; }

/* ===== 系统设置 · 学员表单动态选项 ===== */
.sys-opt-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; align-items: stretch;
}
@media (max-width: 1100px) { .sys-opt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .sys-opt-grid { grid-template-columns: 1fr; } }

.sys-opt {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid #F1E4D9; border-radius: 14px; background: #fff;
  padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(120, 80, 50, .04);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.sys-opt:hover { border-color: #F3C9A8; box-shadow: 0 6px 20px rgba(255, 122, 46, .09); }
.sys-opt-title { font-weight: 600; color: #3A2C24; margin-bottom: 10px; font-size: 14px; }

/* 卡片头：色条 + 标题 + 数量，和下方内容用一条细线分开 */
.sys-opt-head {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid #F6EDE7;
}
.sys-opt-dot {
  width: 5px; height: 16px; border-radius: 3px; flex: none;
  background: linear-gradient(180deg, #FFA668, #FF7A2E);
}
.sys-opt-head .sys-opt-title { margin: 0; font-size: 14px; }
.sys-opt-count {
  margin-left: auto; flex: none; font-size: 11.5px; font-weight: 600;
  color: #B4571C; background: var(--primary-light);
  padding: 2px 9px; border-radius: 999px;
}

.opt-chips {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 7px;
  flex: 1; min-height: 56px; margin-bottom: 14px;
}
.opt-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  padding: 4px 5px 4px 10px;
  border: 1px solid #F2E2D4; border-radius: 8px;
  background: #FFF8F2; color: #7B5B45; font-size: 12.5px; line-height: 1.5;
  transition: border-color .18s ease, background .18s ease;
}
.opt-chip:hover { border-color: #EFC9AA; background: #FFF1E4; }
.opt-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; padding: 0; flex: none;
  border: 0; border-radius: 5px; background: transparent;
  color: #C39A7C; cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.opt-del svg { width: 11px; height: 11px; }
.opt-del:hover { color: #D64545; background: #FFE4DE; }
.opt-del:disabled { opacity: .45; cursor: not-allowed; }
.opt-empty {
  width: 100%; display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 8px;
  border: 1px dashed #EFDDCD; border-radius: 9px;
  color: #B3A095; font-size: 12px; text-align: center;
}

/* 输入框与「+ 添加」拼成一体：窄卡片里按钮也不会被挤成竖排圆球 */
.opt-add {
  display: flex; align-items: stretch; overflow: hidden;
  border: 1px solid #F0E2D8; border-radius: 10px; background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.opt-add:focus-within {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 122, 46, .12);
}
.opt-add-input {
  flex: 1 1 auto; min-width: 0; width: 0;
  border: 0; outline: 0; background: transparent;
  padding: 9px 12px; font: inherit; font-size: 13px; color: var(--text-main);
}
.opt-add-input::placeholder { color: #B6A69B; }
.opt-add-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 0 14px; border: 0; border-left: 1px solid #FBE6D5;
  background: linear-gradient(135deg, #FF9A56, #FF7A2E); color: #fff;
  font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap;
  cursor: pointer; transition: filter .2s ease;
}
.opt-add-btn .ico { width: 15px; height: 15px; }
.opt-add-btn:hover:not(:disabled) { filter: brightness(1.07); }
.opt-add-btn:active:not(:disabled) { filter: brightness(.94); }
.opt-add-btn:disabled { opacity: .55; cursor: not-allowed; }
.opt-del:focus-visible, .opt-add-btn:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .sys-opt, .opt-chip, .opt-del, .opt-add, .opt-add-btn { transition: none; }
}

/* ===== 系统设置 · 托管考勤特殊日期 ===== */
.cal-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cal-list { display: flex; flex-direction: column; gap: 6px; }
/* 放假用红调、调休用绿调：一眼分清"这天不上课"和"这天要上课" */
.cal-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px; border: 1px solid #F3E7DD;
  background: #FFFDFB; font-size: 13px;
}
.cal-row.holi { background: #FDF3F3; border-color: #F6DCDC; }
.cal-row.work { background: #F1F8F3; border-color: #D8EDDF; }
.cal-row .cal-date { font-weight: 600; color: var(--text-main); min-width: 132px; }
.cal-row .cal-date i { font-style: normal; color: #9C8C82; font-weight: 400; margin-left: 4px; }
.cal-row .cal-tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.cal-row.holi .cal-tag { background: #FBE3E3; color: #C0392B; }
.cal-row.work .cal-tag { background: #DDEFE3; color: #2E7D32; }
.cal-row .cal-note { flex: 1; color: #6B5B52; }
.cal-apply {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed #F0E2D8;
}
/* 区间导入：放在单条添加下面，用虚线框标出来，和「加一天」区分开 */
.cal-range {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px; padding: 10px 12px;
  border: 1px dashed #E8D9CC; border-radius: 10px; background: #FFFDFA;
}
.cal-range .cal-range-tag { font-size: 12.5px; font-weight: 600; color: #C2703A; }

/* 自绘候选下拉（学员表单 学校/来源/级别） */
.opt-sug {
  position: fixed; z-index: 200;
  background: #fff; border: 1px solid #F0E2D8; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(90, 60, 40, .18);
  max-height: 240px; overflow-y: auto; padding: 4px;
}
.opt-sug-item {
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  color: #3A2C24; cursor: pointer;
}
.opt-sug-item:hover { background: #FFEFDF; color: #E56A1F; }
.opt-sug-tip {
  padding: 8px 12px; font-size: 12px; color: #A08F84; cursor: default;
}

/* ---------- 海报模板 ---------- */
.poster-form { max-width: 560px; }
.poster-form .input { margin: 8px 0 16px; }
.poster-label { display: block; font-size: 13px; color: var(--text-sub, #888); }
.poster-preview-row { display: flex; align-items: center; gap: 16px; margin: 12px 0; }
.poster-bg-preview {
  max-width: 180px; max-height: 280px;
  border: 1px solid #eee; border-radius: 8px;
  object-fit: contain; background: #fafafa;
}
.poster-updated { font-size: 12px; color: #999; margin: 8px 0 16px; }

/* ---------- 培训管理 ---------- */
.train-form { display: flex; flex-direction: column; gap: 14px; }
.train-row { display: flex; gap: 14px; flex-wrap: wrap; }
.train-field { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.train-field.grow { flex: 1; }
.train-content { resize: vertical; font-family: inherit; line-height: 1.6; }
.train-actions { display: flex; gap: 10px; }
.train-file-info { font-size: 12px; color: var(--text-sub, #888); }
.train-rec-bar { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; }
.train-rec-bar select { max-width: 320px; }
.ok-tag, .warn-tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px;
}
.ok-tag { background: #E8F5E9; color: #2E7D32; }
.warn-tag { background: #FFF3E0; color: #E65100; }
.train-sub-title { font-size: 13px; font-weight: 600; margin: 6px 0 8px; color: #555; }
.train-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .train-report-grid { grid-template-columns: 1fr; } }
.quiz-row { border: 1px solid #EEE; border-radius: 8px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; background: #FCFCFD; }
.quiz-head { display: flex; gap: 8px; align-items: center; }
.quiz-head .quiz-q { flex: 1; }
.quiz-del { color: #C0392B; white-space: nowrap; }
.pos-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 13px;
  background: #FFF1E6; color: #B4632A; border: 1px solid #F5D3B8;
}
.pos-chip-del { border: none; background: none; color: #C0392B; font-size: 14px; cursor: pointer; padding: 0; line-height: 1; }
.pos-check {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: #FAFAFA; border: 1px solid #E5E5E5; user-select: none;
}
.pos-check:has(input:checked) { background: #FFF1E6; border-color: #F0B27A; color: #B4632A; }

/* 学习管控（仅视频课） */
.train-rule-box {
  border: 1px solid #F1E4DA; border-radius: 12px; background: #FFFDFB;
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
}
.train-rule-box .train-row { gap: 12px; }
.train-rule-box .train-field { flex: 1 1 180px; min-width: 160px; }
.train-check {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text-sub); cursor: pointer; user-select: none;
}
.train-check input { width: 15px; height: 15px; margin: 0; accent-color: #FF7A2E; }
.train-rule-tip { font-size: 12px; line-height: 1.7; color: #9B8575; }
.train-rule-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; color: #B4632A; background: #FFF1E6; border: 1px solid #F5D3B8;
}
.train-rule-switches { display: flex; flex-direction: column; gap: 8px; }
.popup-row .quiz-head { display: flex; align-items: center; gap: 10px; }
.popup-row .popup-at { max-width: 200px; }
.train-bad-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; color: #C2410C; background: #FFEDE3; border: 1px solid #F3C6A8;
}
.train-ok-tag { font-size: 11px; color: #6E8B6F; }

/* ---------- 后厨菜谱 ---------- */
.rcp-row {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 0.9fr 56px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.rcp-row[data-row="season"] { grid-template-columns: 1.6fr 1.2fr 56px; }
.rcp-row-step { grid-template-columns: 30px 1fr 0.7fr 56px; align-items: start; }
.rcp-row-step textarea { resize: vertical; font-family: inherit; line-height: 1.5; }
.rcp-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; margin-top: 8px;
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 600;
}
.rcp-del { width: 100%; padding: 8px 0 !important; }
.rcp-thumb { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; flex: none; background: #F3EDE7; }
.rcp-thumb-empty {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: #B4A79C;
}
.rcp-name-cell { display: flex; align-items: center; gap: 9px; }
.rcp-ops { white-space: nowrap; }
.rcp-ops .link { margin-right: 6px; }
.link.danger { color: #C0392B; }
.rcp-dishes { font-size: 12px; color: var(--text-sub); max-width: 320px; }

/* 菜谱编辑：已有成品图 / 视频预览 */
.rcp-prev { margin-top: 8px; }
.rcp-prev-img {
  display: block; max-width: 220px; max-height: 160px;
  border-radius: 8px; border: 1px solid #EFE6DC; cursor: zoom-in; background: #fff;
}
.rcp-prev-video {
  display: block; width: 260px; max-width: 100%;
  border-radius: 8px; border: 1px solid #EFE6DC; background: #000;
}
.rcp-prev-cap { margin-top: 4px; font-size: 11px; color: var(--text-sub); }
.rcp-prev-cap.warn { color: #B45309; }

/* 培训课程：附件预览（新选文件未保存也能看） */
.tr-prev { margin-top: 10px; }
.tr-prev-img {
  display: block; max-width: 320px; max-height: 240px;
  border-radius: 8px; border: 1px solid #EFE6DC; background: #fff;
}
.tr-prev-pdf {
  display: block; width: 100%; max-width: 640px; height: 440px;
  border: 1px solid #EFE6DC; border-radius: 8px; background: #fff;
}
.tr-prev-video {
  display: block; width: 320px; max-width: 100%;
  border-radius: 8px; border: 1px solid #EFE6DC; background: #000;
}
.tr-prev-cap { margin-top: 4px; font-size: 11px; color: var(--text-sub); }
.tr-prev-cap.warn { color: #B45309; }

/* ---------- 配色（主色选择 / 色带 / 分析面板） ---------- */
.rcp-color-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px; }
.rcp-color {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 12px; color: var(--text-sub); background: #fff; border: 1px solid #E7DACB;
}
.rcp-color i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.rcp-color.on { border-color: var(--primary); color: var(--primary); background: var(--primary-light); font-weight: 600; }

.color-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle; border: 1px solid rgba(0,0,0,.08);
}
.color-auto { font-size: 10px; color: #B4A79C; margin-left: 5px; }

/* 排期卡片里的色带 */
.wk-colorline { display: flex; align-items: center; gap: 3px; margin: 2px 0 6px; flex-wrap: wrap; }
.wk-cdot {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
  border: 1px solid rgba(0,0,0,.10);
}
.wk-cscore { margin-left: 6px; font-size: 10px; padding: 1px 6px; border-radius: 8px; }
.wk-cscore.good { background: #EAF3DE; color: #3B6D11; }
.wk-cscore.ok { background: #FBF3DF; color: #8A6A32; }
.wk-cscore.bad { background: #FCEBEB; color: #A32D2D; }
.wk-ctip { font-size: 11px; color: #B45309; margin-bottom: 4px; }

/* 配色分析面板 */
.color-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-sub); margin: 4px 0 8px; }
.color-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.color-legend-item i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.color-overview { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.color-ov-item {
  flex: 1; min-width: 130px; padding: 10px 14px; border-radius: 10px;
  background: #FCFAF8; border: 1px solid #F0E7DD;
}
.color-ov-item b { display: block; font-size: 20px; color: var(--text-main); }
.color-ov-item span { font-size: 11px; color: var(--text-sub); }
.color-dots { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.color-pill {
  font-size: 10px; color: #fff; padding: 1px 7px; border-radius: 8px;
  text-shadow: 0 1px 1px rgba(0,0,0,.18);
}
.color-pill[style*="#E6DFD4"] { color: #6B5F52; text-shadow: none; }
.color-meta { font-size: 11px; color: var(--text-sub); margin-left: 6px; }
.color-score { font-size: 15px; }
.color-score.good { color: #3B6D11; }
.color-score.ok { color: #8A6A32; }
.color-score.bad { color: #A32D2D; }
.color-none { font-size: 12px; color: #B4A79C; }
.color-tips { font-size: 12px; color: var(--text-sub); max-width: 320px; }

/* ---------- 周菜单排期（按天卡片 + 自动归类） ---------- */
.wk-legend {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  font-size: 12px; color: var(--text-sub); margin: 10px 0 8px;
}
.wk-legend .wk-legend-hint { color: #B4A79C; }
/* 就餐人数：校区 × 午/晚 四格 + 自动合计 */
.wk-heads-grid {
  display: grid; grid-template-columns: auto 74px 74px;
  gap: 4px 8px; align-items: center; padding: 4px 10px 4px 0;
}
.wk-heads-hd { font-size: 11px; color: #B4A79C; text-align: center; }
.wk-heads-hd:first-child { text-align: left; }
.wk-heads-row { font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.wk-heads-in { max-width: 74px; padding: 4px 6px; font-size: 12px; text-align: center; }
.wk-heads-total { color: #8A7666; font-weight: 600; }
.wk-heads-sum { font-size: 12px; font-weight: 600; color: var(--primary); text-align: center; }
.wk-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px; margin-top: 4px;
}
.wk-day {
  border: 1px solid #EFE6DC; border-radius: 10px; background: #fff; overflow: hidden;
}
.wk-day-today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
/* 历史日期：只读视觉（灰底 + 灰字 + 虚线框），与今天/未来日明确区分 */
.wk-day-past { border-color: #E9E2DC; border-style: dashed; background: #FAF8F6; }
.wk-day-past .wk-day-head { background: #F3EFEB; color: #A89B90; }
.wk-badge-past { background: #B6A99E; color: #fff; }
.wk-day-head {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; font-size: 13px; font-weight: 600;
  background: #FCFAF8; border-bottom: 1px solid #F3EBE2;
}
.wk-day-today .wk-day-head { background: var(--primary-light); color: var(--primary); }
.wk-badge {
  font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 8px;
  background: var(--primary); color: #fff;
}
.wk-meal { padding: 8px 10px 10px; border-bottom: 1px dashed #F3EBE2; }
.wk-meal:last-child { border-bottom: none; }
.wk-meal-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.wk-meal-head b { font-size: 12px; color: var(--text-main); }
.wk-meal-stat { font-size: 11px; color: #B4A79C; }
.wk-meal-stat.ok { color: #2E7D32; }
.wk-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.wk-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 6px 3px 5px; border-radius: 6px; font-size: 12px;
  background: #F7F3EE; border: 1px solid #EDE3D8; color: var(--text-main);
}
.wk-chip i { font-style: normal; font-size: 10px; color: #8A7666; }
.wk-del { font-style: normal; cursor: pointer; color: #C9BCAF; padding: 0 1px; }
.wk-del:hover { color: #C0392B; }
.wk-chip.cat-meat { background: #FDF1EF; border-color: #F6DAD5; }
.wk-chip.cat-meat i { color: #B4442F; }
.wk-chip.cat-halfmeat { background: #FEF6EC; border-color: #F6E3C9; }
.wk-chip.cat-halfmeat i { color: #A66A1E; }
.wk-chip.cat-veg { background: #F1F8F0; border-color: #D9EBD5; }
.wk-chip.cat-veg i { color: #3F7A38; }
.wk-chip.cat-soup { background: #EEF5FB; border-color: #D6E6F4; }
.wk-chip.cat-soup i { color: #2F6C99; }
.wk-chip.cat-staple { background: #F8F4EC; border-color: #EDE2CE; }
.wk-chip.cat-staple i { color: #8A6A32; }
.wk-chip.cat-fruit { background: #FBF0F8; border-color: #F2D8EA; }
.wk-chip.cat-fruit i { color: #A33C82; }
.wk-add {
  padding: 3px 8px; border-radius: 6px; font-size: 12px; cursor: pointer;
  background: #fff; border: 1px dashed #DCCDBD; color: #8A7666; font-family: inherit;
}
.wk-add:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.wk-miss { margin-top: 5px; font-size: 11px; color: #B45309; }
.wk-date { font-size: 11px; color: #B4A79C; font-weight: 400; }

/* 选菜弹层 */
.wk-pick-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.wk-pick-cat {
  padding: 4px 10px; border-radius: 14px; font-size: 12px; cursor: pointer;
  background: #fff; border: 1px solid #E7DACB; color: var(--text-sub); font-family: inherit;
}
.wk-pick-cat.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.wk-pick-list { max-height: 52vh; overflow-y: auto; border-top: 1px solid #F3EBE2; }
.wk-pick-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px; border-bottom: 1px solid #F7F1EA; cursor: pointer; font-size: 13px;
}
.wk-pick-item:hover { background: #FCFAF8; }
.wk-pick-tag {
  font-size: 10px; padding: 1px 5px; border-radius: 4px;
  background: #F4EEE7; color: #8A7666; flex: none;
}
.wk-pick-item.cat-meat .wk-pick-tag { background: #FDF1EF; color: #B4442F; }
.wk-pick-item.cat-halfmeat .wk-pick-tag { background: #FEF6EC; color: #A66A1E; }
.wk-pick-item.cat-veg .wk-pick-tag { background: #F1F8F0; color: #3F7A38; }
.wk-pick-item.cat-soup .wk-pick-tag { background: #EEF5FB; color: #2F6C99; }
.wk-pick-item.cat-staple .wk-pick-tag { background: #F8F4EC; color: #8A6A32; }
.wk-pick-item.cat-fruit .wk-pick-tag { background: #FBF0F8; color: #A33C82; }
.wk-pick-title { flex: 1; color: var(--text-main); }
.wk-pick-meta { font-size: 11px; color: #B4A79C; }

/* 选菜弹层：午餐 / 晚餐两栏同屏，按分类分组紧凑排布（一屏放得下） */
.wk-pick-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 60vh; overflow-y: auto; }
.wk-pick-meal { min-width: 0; border: 1px solid #F1E4D9; border-radius: 10px; padding: 8px; }
.wk-pick-meal-hd {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--text-main);
  padding: 2px 2px 7px; margin-bottom: 5px; border-bottom: 1px solid #F7F1EA;
}
.wk-pick-meal-hd span { font-size: 11px; font-weight: 400; color: #8A7666; }
.wk-pick-group { margin-bottom: 5px; }
.wk-pick-group-hd { font-size: 11px; color: #8A7666; margin: 5px 0 3px; }
.wk-pick-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.wk-pick-chip {
  display: inline-flex; align-items: center; gap: 3px; cursor: pointer;
  font-size: 11.5px; padding: 3px 6px; border-radius: 6px;
  border: 1px solid #EDE3D8; background: #FFFDFB; color: var(--text-main);
}
.wk-pick-chip input { margin: 0; width: 12px; height: 12px; }
.wk-pick-chip.on { border-color: var(--primary); background: #FFF3EA; }
.wk-pick-empty { font-size: 11px; color: #B4A79C; padding: 4px 0; }
/* 选菜弹层：标签筛选（与小程序一致，横向 chip，再点一次取消） */
.wk-pick-tagbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.wk-pick-tagchip {
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; cursor: pointer;
  background: #FFF8F2; border: 1px solid #F0DFD0; color: #8A7666; font-family: inherit;
  white-space: nowrap;
}
.wk-pick-tagchip:hover { border-color: #C08A34; color: #A66A1E; }
.wk-pick-tagchip.on { background: #C08A34; border-color: #C08A34; color: #fff; font-weight: 600; }
.wk-pick-filter {
  display: none; margin-bottom: 8px; padding: 6px 10px;
  border-radius: 6px; background: #FFF4E0; color: #8A5A16; font-size: 11.5px;
}
/* 选菜软提醒：同一天出现相关菜系时给一句提示，不阻断勾选 */
.wk-pick-warn {
  display: none; margin-bottom: 8px; padding: 8px 10px;
  border: 1px solid #F6D9A8; border-radius: 8px;
  background: #FFF8E9; color: #9A6710; font-size: 11.5px; line-height: 1.6;
}
.wk-pick-warn.on { display: block; }
.wk-pick-warn b { color: #C4701E; }
/* 菜谱多标签（可新建、可多选） */
.rcp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px;
  border: 1px solid #EDE3D8; background: #FFFDFB; color: #8A7666;
}
.tag-pill.on { border-color: var(--primary); background: #FFF3EA; color: #B4762A; font-weight: 600; }
.tag-pill .tag-x { color: #C4701E; font-weight: 700; }
.tag-mini {
  display: inline-block; margin: 1px 3px 1px 0; padding: 1px 6px;
  border-radius: 999px; background: #FFF3E8; color: #B4762A; font-size: 10.5px;
}
.rcp-by { font-size: 11px; color: #8A7666; line-height: 1.5; }
.rcp-by small { color: #B4A79C; }
@media (max-width: 720px) { .wk-pick-two { grid-template-columns: 1fr; } }
/* 日卡片：已选菜按分类成组，组名只显示一次，卡片更紧凑 */
.wk-chip-group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.wk-chip-group > b { font-size: 10px; font-weight: 600; color: #8A7666; margin-right: 1px; }
.wk-chip-group .wk-chip i { display: none; }
/* 选菜弹层放宽：午餐 / 晚餐两栏同屏，同时限高不把确定按钮顶出屏幕 */
.modal-card:has(.wk-pick-two) {
  width: 860px; max-width: 96vw; max-height: 86vh; overflow: hidden;
  display: flex; flex-direction: column;
}
.modal-card:has(.wk-pick-two) #modalBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* ---------- 排课表（周视图） ---------- */
.f-label { display: block; font-size: 13px; color: var(--text-sub); margin: 12px 0 6px; }
.sch-grid { border: 1px solid #F3E7DD; border-radius: 12px; overflow: hidden; background: #FFFDFB; }
.sch-head { display: grid; grid-template-columns: 56px repeat(7, 1fr); border-bottom: 1px solid #F3E7DD; background: #FBF6F1; }
.sch-head-cell { padding: 8px 4px; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-main); }
.sch-head-cell.sch-today { background: var(--primary-light); color: var(--primary); }
.sch-body { display: grid; grid-template-columns: 56px repeat(7, 1fr); position: relative; }
.sch-col { position: relative; height: 572px; border-left: 1px dashed #F3E7DD; cursor: pointer; }
.sch-col:hover { background: #FDF9F4; }
.sch-col-time { cursor: default; border-left: none; background: #FBF6F1; }
.sch-col-time:hover { background: #FBF6F1; }
.sch-hour { position: absolute; right: 6px; transform: translateY(-6px); font-size: 11px; color: #B4A79C; }
.sch-block { position: absolute; border-radius: 8px; padding: 5px 7px; color: #fff; overflow: hidden; cursor: pointer; box-shadow: 0 2px 6px rgba(90, 70, 50, 0.18); }
.sch-block:hover { filter: brightness(1.08); }
.sch-b-course { font-size: 12px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; padding-right: 56px; }
.sch-b-info, .sch-b-time { font-size: 11px; opacity: 0.92; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
/* 课程块右上角签到角标：老师端小程序签到后显示 已签 x/y */
.sch-b-att { position: absolute; top: 4px; right: 6px; font-size: 10px; line-height: 15px; padding: 0 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.92); color: #B4762A; font-weight: 600; white-space: nowrap; }
.sch-b-att.sch-att-full { background: #2E9E5B; color: #fff; }

/* ---------- 排课：日视图 + 拖拽反馈（日视图渲染层只输出一列，这里只调列宽） ---------- */
.sch-grid.sch-day-mode .sch-head { grid-template-columns: 56px 1fr; }
.sch-grid.sch-day-mode .sch-body { grid-template-columns: 56px 1fr; }
.sch-block[draggable="true"] { cursor: grab; }
.sch-block.sch-dragging { opacity: 0.45; }
.sch-col-over { background: #FBEEDD; outline: 2px dashed var(--primary); outline-offset: -2px; }

/* 续费预警清单 */
/* 操作条：内容一多必须能换行；文字禁止逐字折行，否则「结算月份」会被压成竖排 */
.alrt-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; font-size: 13px; color: var(--text-sub);
  white-space: nowrap;
}
/* 子项不参与压缩：否则 select / 按钮会被挤到只剩几个字宽，文字就竖起来了 */
.alrt-bar > * { flex: 0 0 auto; }
/* 说明性长文字例外：允许换行、允许占满剩余宽度，否则窄屏会把整条撑出屏幕 */
.alrt-bar > .sub { flex: 1 1 auto; min-width: 0; white-space: normal; }
.alrt-group { margin-bottom: 16px; }
.alrt-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid #F3EAE2; margin-bottom: 4px; }
.alrt-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #F6EDE7; font-size: 13px; }
.alrt-row .alrt-extra { margin-left: auto; color: #A56A00; white-space: nowrap; }

/* 预警推送设置 */
.nt-sec { padding: 12px 0; border-top: 1px dashed #F3EAE2; }
.nt-sec:first-child { border-top: none; padding-top: 0; }
.nt-sec-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.nt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.nt-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nt-grid .web-input { width: 100%; box-sizing: border-box; }
@media (max-width: 620px) { .nt-grid, .nt-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===================== 手机端自适应（≤820px：手机浏览器 / 微信内打开后台） ===================== */
/* 手机卡片版列表（员工档案/工资单）：桌面隐藏走表格，≤820px 切换为卡片 */
.m-cards { display: none; }
.m-card { background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(120, 90, 60, 0.08); }
.mc-top { display: flex; align-items: center; gap: 8px; }
.mc-flex { flex: 1; }
.mc-top .tag { flex-shrink: 0; }
.mc-avatar { position: relative; overflow: hidden; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
/* 员工头像：图片盖在首字占位上；临时链接失效时 img 隐藏，首字自动露出 */
.mc-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mc-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; word-break: break-all; }
.mc-name-col { flex: 1; min-width: 0; }
.mc-sub { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.mc-tel { color: var(--text-sub); text-decoration: none; }
.mc-tel:active { color: var(--primary); }
.mc-chip { font-size: 10px; border-radius: 5px; padding: 2px 6px; background: #F1EAE1; color: #8A7666; flex-shrink: 0; white-space: nowrap; }
.mc-chip.on { background: #E8F5E9; color: #2E7D32; }
.mc-rows { margin-top: 8px; display: grid; gap: 4px; }
.mc-row { display: flex; font-size: 13px; line-height: 1.5; }
.mc-row .k { color: var(--text-sub); width: 76px; flex-shrink: 0; }
.mc-row .v { flex: 1; min-width: 0; word-break: break-all; }
.mc-money { display: flex; margin-top: 9px; background: #FFFBF6; border: 1px solid #F0E4D7; border-radius: 10px; padding: 8px 0; }
.mc-money .m { flex: 1; text-align: center; min-width: 0; }
.mc-money .m + .m { border-left: 1px dashed #F0E4D7; }
.mc-money .n { font-size: 17px; font-weight: 700; color: var(--primary); word-break: break-all; }
.mc-money .l { font-size: 11px; color: var(--text-sub); margin-top: 1px; }
.mc-ops { display: flex; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed #F0E4D7; flex-wrap: wrap; }
.op { font-size: 12px; color: var(--primary); background: var(--primary-light); border: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-family: inherit; }
.op:active { filter: brightness(0.95); }
.op.danger { color: var(--danger); background: #FDEBEC; }
.mc-empty { text-align: center; color: var(--text-sub); }

@media (max-width: 820px) {
  /* --- 登录页 --- */
  .login-wrap { min-height: 100vh; min-height: 100dvh; padding: 18px; }
  .login-card { width: 100%; max-width: 420px; padding: 30px 22px; border-radius: 16px; }
  .login-logo { font-size: 34px; }
  .login-title { font-size: 20px; }

  /* --- 顶栏：品牌 + 账号占第一行，页签铺满第二行（可换行，不隐藏入口） --- */
  .topbar {
    position: sticky; top: 0; z-index: 60;
    flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px 6px;
    box-shadow: 0 2px 10px rgba(255, 122, 46, .1);
  }
  .brand { order: 1; font-size: 15px; }
  .user { order: 2; margin-left: auto; gap: 8px; font-size: 12px; }
  .user #who { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabs { order: 3; flex: 0 0 100%; width: 100%; flex-wrap: wrap; gap: 6px; }
  .tab { flex: none; padding: 6px 12px; font-size: 13px; border-radius: 16px; }

  /* --- 内容区 --- */
  .content { padding: 14px 12px 48px; }
  .panel { padding: 14px; border-radius: 14px; margin-top: 12px; }
  .panel-title { font-size: 14px; margin-bottom: 10px; }

  /* --- 二级菜单：一行内横向滑动，文字不折行（与桌面同一口径） --- */
  .subtabs { width: 100%; max-width: 100%; overflow-x: auto; padding: 5px 5px 7px; gap: 6px; }
  .subtab { flex: none; white-space: nowrap; padding: 6px 14px; }

  /* --- 工具栏：筛选框两列铺满，按钮单独成行 --- */
  .toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .toolbar .input,
  .toolbar .input.inline { flex: 1 1 calc(50% - 8px); width: auto; min-width: 0 !important; margin: 0; }
  .toolbar .btn-primary,
  .toolbar .btn-ghost { flex: 0 0 auto; padding: 9px 14px; }
  .toolbar .chk { flex: 0 0 auto; margin-right: 0; }
  .alrt-bar { flex-wrap: wrap; gap: 8px; }
  .train-rec-bar { flex-wrap: wrap; }
  .train-rec-bar select { max-width: 100%; }

  /* --- 表格：整表横向滑动，首列吸左（滚动时仍能看到姓名） --- */
  .view { -webkit-overflow-scrolling: touch; }
  .table { overflow: visible; border-radius: 0; }
  .table th, .table td { padding: 9px 12px; }
  .table th:first-child, .table td:first-child {
    position: sticky; left: 0; z-index: 2; background: #fff;
    box-shadow: 1px 0 0 #F6EDE7;
  }
  .table th:first-child { background: var(--primary-light); z-index: 3; }
  .table td.addr { max-width: 180px; }

  /* --- 员工档案 / 工资单：表格换卡片，不用左右拖拽 --- */
  .m-cards { display: block; }
  #empTable, #payTable { display: none; }

  /* --- 指标卡 / 趋势图 --- */
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; border-radius: 14px; }
  .stat-value { font-size: 22px; }
  .stat-name { font-size: 12px; }
  .trend { height: 130px; gap: 6px; }

  /* --- 弹层改成底部抽屉，按钮等宽铺满 --- */
  .modal { align-items: flex-end; }
  .modal-card {
    width: 100%; max-width: 100%; max-height: 92vh;
    border-radius: 18px 18px 0 0; padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .modal-title { font-size: 16px; padding-right: 34px; }
  .modal-close { top: 12px; right: 12px; }
  .modal-btns { margin-top: 14px; }
  .modal-btns .btn-primary,
  .modal-btns .btn-ghost { flex: 1 1 0; min-width: 0; }
  .web-grid { grid-template-columns: 1fr; }

  /* --- 学员账户弹窗 --- */
  .acct-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acct-row { flex-direction: column; align-items: flex-start; }
  .acct-row-act { display: flex; flex-wrap: wrap; gap: 8px; }
  .acct-row-act .link { margin-left: 0; }
  .acct-log { flex-wrap: wrap; }

  /* --- 排课表：整表横向滑动，日视图不受影响 --- */
  .sch-grid { min-width: 720px; }
  .sch-grid.sch-day-mode { min-width: 0; }
  .sch-col { height: 480px; }
  .f-label { margin: 10px 0 5px; }

  /* --- 后厨 / 培训 / 菜谱等网格改单列 --- */
  .rcp-row,
  .rcp-row[data-row="season"],
  .rcp-row-step { grid-template-columns: 1fr; }
  .rcp-del { width: auto; padding: 8px 12px !important; }
  .rcp-dishes { max-width: none; }
  .tr-prev-pdf { height: 300px; }
  .wk-heads-grid { grid-template-columns: auto 64px 64px; }
  .wk-grid { grid-template-columns: 1fr; }
  .color-tips { max-width: none; }

  /* --- 打卡图片 / 附件自适应 --- */
  .media { max-width: 100%; max-height: 300px; }
  .poster-preview-row { flex-wrap: wrap; }
  .poster-bg-preview { max-width: 140px; }

  /* --- 预警清单 --- */
  .alrt-row { flex-wrap: wrap; }
  .alrt-row .alrt-extra { margin-left: 0; }

  /* --- 输入框统一 16px：避免 iOS 聚焦页面自动放大 --- */
  .input,
  .input.inline,
  .web-input,
  select.web-input,
  textarea.web-input { font-size: 16px; }
  .input.inline { padding: 10px 12px; }
}

/* 超窄屏（iPhone SE 等 360px 以下）再收一档 */
@media (max-width: 380px) {
  .brand { font-size: 14px; }
  .tab { padding: 6px 9px; font-size: 12px; }
  .content { padding: 12px 10px 40px; }
  .toolbar .input,
  .toolbar .input.inline { flex: 1 1 100%; }
}

/* ---------- 家长 / 联系人群组 ---------- */
.ct-list { display: flex; flex-direction: column; gap: 8px; }
/* 姓名 / 号码 / 删除 三列：号码列宽一点，11 位数字挤窄了看不全 */
.ct-row { display: grid; grid-template-columns: 1fr 1.2fr 32px; gap: 8px; align-items: center; }
.ct-row .web-input { min-width: 0; width: 100%; }
.ct-del {
  width: 32px; height: 32px; line-height: 1; border-radius: 8px;
  border: 1px solid #EADFD6; background: #fff; color: #9B8C82;
  font-size: 16px; cursor: pointer;
}
.ct-del:hover { color: #E5484D; border-color: #F3B7B4; }

/* ---------- 学员高级筛选 ---------- */
/* 已应用条件的标签条：浅橙底一整条，避免和上方工具栏的输入框混在一起看不清 */
.stu-fchips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 8px 0 2px; padding: 6px 10px; border-radius: 8px;
  background: rgba(255, 122, 46, .07);
}
.flt-chip {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 3px 2px 8px; border-radius: 6px;
  background: #fff; border: 1px solid rgba(255, 122, 46, .35);
  color: #C2410C; font-size: 12px; line-height: 18px;
}
.flt-chip a { color: #C2410C; text-decoration: none; padding: 0 4px; font-size: 13px; }
.flt-chip a:hover { color: #E5484D; }
/* 按钮右上角的条件数：收起弹层后也知道筛了几条 */
.flt-count {
  display: inline-block; min-width: 15px; padding: 0 4px; margin-left: 5px;
  border-radius: 8px; background: var(--primary, #FF7A2E); color: #fff;
  font-size: 10.5px; line-height: 15px; text-align: center; font-style: normal;
}
.flt-head { font-size: 13px; color: #4E3A2E; margin-bottom: 12px; }
/* 640px 的默认弹窗放四列太窄，字段名会被截断；筛选是重度操作，放宽到 780 */
.modal-card:has(.flt-wrap) { width: 780px; max-width: 96vw; }
/* 字段 / 操作符 / 值 / 删除 四列：值那列最宽，长文本筛选要看全 */
.flt-row {
  display: grid; grid-template-columns: 1.15fr .95fr 1.5fr 40px;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.flt-row .input { min-width: 0; width: 100%; }
.flt-del { color: #E5484D; font-size: 12px; text-decoration: none; text-align: center; }
.flt-del:hover { text-decoration: underline; }
.flt-noval { line-height: 32px; color: #A08A7C; }
@media (max-width: 720px) {
  .flt-row { grid-template-columns: 1fr 1fr; }
  .flt-del { text-align: left; }
}

/* ---------- 批量报名 ---------- */
/* 左边选人、右边定钱：两块并排看，勾了谁、收多少一眼对得上 */
.eb-wrap { display: grid; grid-template-columns: 1fr 400px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .eb-wrap { grid-template-columns: 1fr; } }
.eb-left { min-width: 0; }
.eb-right {
  background: #fff; border: 1px solid #F0E6DE; border-radius: 12px;
  padding: 14px 16px; position: sticky; top: 12px;
}
.eb-title { font-size: 14px; font-weight: 700; color: #3D2E25; margin-bottom: 10px; }
.eb-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; background: #FDF8F4; border: 1px solid #F3E7DD;
  border-radius: 10px; margin-bottom: 10px;
}
.eb-count { font-size: 13px; color: #6B5A4E; }
.eb-count b { color: #E8722A; font-size: 15px; }
.eb-list { max-height: 62vh; overflow-y: auto; border: 1px solid #F3E7DD; border-radius: 10px; }
.eb-row {
  display: grid; grid-template-columns: 30px 1fr 150px 90px 130px;
  gap: 10px; align-items: center; padding: 9px 12px;
  border-bottom: 1px solid #F8F0E9; font-size: 13px;
}
.eb-row:last-child { border-bottom: none; }
.eb-row:hover { background: #FFFCF9; }
.eb-row.on { background: #FFF7F0; }
.eb-name { font-weight: 600; color: #3D2E25; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-name .sub { font-weight: 400; }
.eb-meta { color: #7A6A5E; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-dup { color: #C2410C; font-size: 12px; }
.eb-hint { font-size: 11px; color: #9B8C82; font-weight: 400; margin-left: 4px; }
.eb-preview {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: #FFF7F0; border: 1px solid #FFE0C7; font-size: 13px; color: #6B4A32; line-height: 1.7;
}
.eb-preview b { color: #E8722A; font-size: 15px; }
.eb-preview .warn { color: #C2410C; }
.eb-submit { width: 100%; margin-top: 12px; }

/* ---------- 批量收款 ---------- */
/* 复用批量报名那套左右分栏，只把行改成 5 列（多一列欠费金额） */
.eb-row.ep-row { grid-template-columns: 30px 1fr 1.2fr 110px 110px; }
.ep-owed { color: #C2410C; font-weight: 700; text-align: right; font-size: 13px; }
.ep-sum { font-size: 13px; color: #6B5A4E; }
.ep-sum b { color: #C2410C; font-size: 15px; }
.ep-free { color: #9B8C82; text-align: right; font-size: 12px; }

/* ---------- 报名名单 ---------- */
.r-sums { display: flex; background: #fff; border: 1px solid #F0E4D7; border-radius: 12px; padding: 14px 0; margin-bottom: 14px; }
.r-sum { flex: 1; text-align: center; min-width: 0; }
.r-sum + .r-sum { border-left: 1px dashed #F0E4D7; }
.r-sum .n { font-size: 20px; font-weight: 700; color: var(--primary); word-break: break-all; }
.r-sum .n.warn { color: #C2410C; }
.r-sum .l { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.r-table-wrap { background: #fff; border-radius: 12px; overflow: auto; }
.table th.right { text-align: right; }
.r-empty { padding: 40px; text-align: center; color: #9B8C82; font-size: 13px; }
/* ---------- 报名名单分组 ---------- */
.r-groups { background: #fff; border: 1px solid #F0E4D7; border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.r-grow { display: grid; grid-template-columns: 1.6fr .7fr 1fr 1fr 1fr .7fr; align-items: center;
  padding: 9px 16px; font-size: 13px; border-bottom: 1px dashed #F6EDE7; cursor: pointer; }
.r-grow:last-child { border-bottom: none; }
.r-grow:not(.r-ghead):hover { background: #FFFBF6; }
.r-ghead { background: var(--primary-light); font-weight: 600; cursor: default; font-size: 12px; color: var(--text-sub); }
.r-grow .g-num { text-align: right; }
.r-grow .g-owe { color: #C2410C; font-weight: 600; text-align: right; }
.r-gfilter { padding: 8px 16px; background: #FFF7EF; border-bottom: 1px solid #F0E4D7;
  font-size: 13px; display: flex; align-items: center; gap: 10px; }
/* ---------- 报名登记 ---------- */
.rec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rec-head b { font-size: 15px; }
.rec-card { background: #fff; border: 1px solid #F0E4D7; border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.rec-card-t { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.rec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.rec-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rec-f2 { grid-column: 1 / -1; }
.rec-f label { font-size: 13px; color: var(--text-sub); }
.rec-f label i { color: #E0453A; font-style: normal; }
.rec-tip { font-size: 11px; color: #A8988D; font-style: normal; margin-left: 6px; }
.rec-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rec-chip { padding: 6px 12px; border: 1px solid #EDE0D5; border-radius: 16px; background: #fff;
  font-size: 13px; color: var(--text-sub); cursor: pointer; user-select: none; }
.rec-chip.on { background: var(--primary-light); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.rec-stu-wrap { position: relative; }
.rec-stu-tip { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff;
  border: 1px solid #F0E4D7; border-radius: 10px; box-shadow: 0 8px 24px rgba(90, 60, 30, .12);
  max-height: 240px; overflow: auto; margin-top: 4px; }
.rec-stu-item { padding: 9px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #FBF5F0; }
.rec-stu-item:last-child { border-bottom: none; }
.rec-stu-item:hover { background: #FFF7EF; }
.rec-stu-item .sub { color: #A8988D; font-size: 12px; margin-left: 6px; }
.rec-up { display: flex; align-items: center; gap: 12px; }
.rec-file { font-size: 13px; max-width: 240px; }
.rec-thumb { max-height: 80px; max-width: 160px; border-radius: 8px; border: 1px solid #F0E4D7; object-fit: cover; }
.rec-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 4px 0 26px; }
.rc-empty { padding: 40px; text-align: center; color: #9B8C82; font-size: 13px; }
@media (max-width: 720px) { .rec-grid { grid-template-columns: 1fr; } }
.tab-btn { font-size: 13px; color: #8A6A50; background: #fff; border: 1px solid #EBDDD2; padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.tab-btn.active { background: #FF7A2E; color: #fff; border-color: #FF7A2E; font-weight: 600; }
.rec-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.rec-img-item { position: relative; width: 72px; height: 72px; }
.rec-img { width: 72px; height: 72px; border-radius: 8px; border: 1px solid #F0E4D7; object-fit: cover; cursor: zoom-in; background: #FDF8F3; }
.rec-img-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; line-height: 18px; text-align: center; border-radius: 50%; background: #E5484D; color: #fff; font-size: 14px; cursor: pointer; }
.rec-img-add { width: 72px; height: 72px; border-radius: 8px; border: 1px dashed #E8D5C2; color: #C4A88E; font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rec-img-add:hover { border-color: #FF7A2E; color: #FF7A2E; }
.rec-img-empty { font-size: 12px; color: #B9ABA1; }

/* ---------- 系统设置：小程序入口开关 ---------- */
.mini-switch-list { display: flex; flex-direction: column; gap: 10px; }
.mini-switch-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #FAF8F6; border: 1px solid #ECE7E2; border-radius: 10px; cursor: pointer; }
.mini-switch-label { font-size: 14px; color: #3A322C; }
.mini-switch { -webkit-appearance: none; appearance: none; width: 46px; height: 26px; border-radius: 999px; background: #D8CCC2; position: relative; cursor: pointer; flex: none; transition: background .2s; outline: none; }
.mini-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; }
.mini-switch:checked { background: #FF7A2E; }
.mini-switch:checked::after { left: 23px; }

/* ---------- 排课表工具栏：分组 / 主次 / 统一线性图标 ---------- */
.sch-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sch-ic {
  width: 16px; height: 16px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* 第一行：筛选 + 周切换 */
.sch-topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 14px; padding: 10px 12px; margin-bottom: 10px;
  background: #FFFDFB; border: 1px solid #F3E7DD; border-radius: 12px;
}
.sch-filters, .sch-actions-main, .sch-actions-sub {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.sch-select { position: relative; display: inline-flex; align-items: center; }
.sch-select .sch-ic { position: absolute; pointer-events: none; color: #B49A87; }
.sch-select .sch-ic-left { left: 10px; width: 15px; height: 15px; }
.sch-select .sch-ic-right { right: 9px; width: 13px; height: 13px; }
.sch-select .input.inline {
  width: auto; min-width: 132px; margin: 0; padding: 8px 28px 8px 31px;
  border: 1px solid #EADFD5; border-radius: 9px; background: #fff;
  font-size: 13px; color: var(--text-main); height: 36px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.sch-select .input.inline:hover { border-color: #F3C7A8; }
.sch-select .input.inline:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 122, 46, .10); }

/* 周切换：连体分段控件，左右箭头与「今天」成一组 */
.sch-weeknav { display: inline-flex; align-items: center; }
.sch-weeknav .sch-nav-btn, .sch-weeknav .sch-nav-today {
  height: 34px; border: 1px solid #EADFD5; background: #fff; color: #7A6656;
  font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .18s, color .18s, border-color .18s;
}
.sch-weeknav .sch-nav-btn { width: 34px; border-right: none; }
.sch-weeknav .sch-nav-btn:first-child { border-radius: 9px 0 0 9px; }
.sch-weeknav .sch-nav-next { border-right: 1px solid #EADFD5; border-radius: 0 9px 9px 0; }
.sch-weeknav .sch-nav-today { padding: 0 14px; font-weight: 600; border-right: none; }
.sch-weeknav .sch-nav-btn:hover, .sch-weeknav .sch-nav-today:hover {
  background: var(--primary-light); color: var(--primary);
}
.sch-week-ic { margin-left: 12px; color: #B49A87; width: 15px; height: 15px; }
.sch-week-label { margin-left: 6px; font-size: 12.5px; color: var(--text-sub); white-space: nowrap; }

/* 第二行：常用操作，主按钮突出、其余为白底描边 */
.sch-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-bottom: 12px; position: relative; z-index: 5;
}
.sch-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px;
  border: 1px solid #EADFD5; border-radius: 9px; background: #fff;
  color: #6E5A4C; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: border-color .18s, background-color .18s, color .18s, box-shadow .18s;
}
.sch-btn .sch-ic { width: 15px; height: 15px; color: #B49A87; transition: color .18s; }
.sch-btn:hover { border-color: #F6B98F; background: #FFF7F1; color: var(--primary); }
.sch-btn:hover .sch-ic { color: var(--primary); }
.sch-btn:active { background: var(--primary-light); }
.sch-btn:focus-visible, .sch-nav-btn:focus-visible, .sch-nav-today:focus-visible,
.sch-menu-item:focus-visible, .sch-select .input.inline:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.sch-add.btn-primary.sm {
  width: auto; height: 34px; padding: 0 16px; border-radius: 9px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #FF9A56, #FF7A2E); color: #fff;
  box-shadow: 0 2px 8px rgba(255, 122, 46, .26);
  transition: box-shadow .18s, filter .18s;
}
.sch-add.btn-primary.sm .sch-ic { width: 15px; height: 15px; color: #fff; stroke-width: 2.2; }
.sch-add.btn-primary.sm:hover { filter: brightness(1.04); box-shadow: 0 4px 12px rgba(255, 122, 46, .34); }
.sch-divider { width: 1px; height: 22px; background: #EFE3D9; flex: 0 0 auto; }
.sch-actions-sub { margin-left: auto; }

/* 「更多」下拉：低频设置收起，减少视觉噪音 */
.sch-more { position: relative; }
.sch-more-btn.on { border-color: #F6B98F; background: #FFF7F1; color: var(--primary); }
.sch-ic-caret { width: 12px; height: 12px; margin-left: -2px; transition: transform .18s; }
.sch-more-btn.on .sch-ic-caret { transform: rotate(180deg); }
.sch-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  min-width: 186px; padding: 6px;
  background: #fff; border: 1px solid #F0E2D8; border-radius: 11px;
  box-shadow: 0 10px 28px rgba(90, 70, 50, .16);
}
.sch-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 36px; padding: 0 10px;
  border: none; border-radius: 7px; background: transparent;
  color: #5A4A3F; font-size: 13px; text-align: left; cursor: pointer;
  transition: background-color .18s, color .18s;
}
.sch-menu-item .sch-ic { width: 15px; height: 15px; color: #B49A87; transition: color .18s; }
.sch-menu-item:hover { background: #FFF7F1; color: var(--primary); }
.sch-menu-item:hover .sch-ic { color: var(--primary); }
.sch-menu-sep { height: 1px; margin: 5px 4px; background: #F3E7DD; }

/* 底部提示条 */
.sch-tip {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 10px;
  padding: 9px 12px; border-radius: 9px; background: #FBF6F1;
  font-size: 12.5px; line-height: 1.7; color: var(--text-sub);
}
.sch-tip .sch-ic { width: 15px; height: 15px; margin-top: 3px; color: #C39A7B; }
.sch-tip b { color: var(--text-main); }

@media (max-width: 900px) {
  .sch-topbar { flex-direction: column; align-items: stretch; }
  .sch-filters .sch-select { flex: 1 1 calc(50% - 8px); }
  .sch-filters .sch-select .input.inline { width: 100%; min-width: 0; }
  .sch-weeknav { flex-wrap: wrap; }
  .sch-actions-sub { margin-left: 0; }
  .sch-divider { display: none; }
}
@media (max-width: 520px) {
  .sch-filters .sch-select { flex: 1 1 100%; }
  .sch-select .input.inline { font-size: 16px; }
  .sch-week-label { white-space: normal; }
  .sch-menu { right: auto; left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sch-btn, .sch-add.btn-primary.sm, .sch-nav-btn, .sch-nav-today,
  .sch-menu-item, .sch-select .input.inline, .sch-ic-caret { transition: none; }
}

/* ---------- 排课配置弹层（教室 / 请假 / 班级 / 操作记录） ----------
   统一：两个分区卡片、列表卡片行、表单带标签、状态用徽章。
   所有 id / data-* / class="input" 保持原样，只换视觉。 */
.modal-card:has(.cfg-wrap) { width: 760px; max-width: 96vw; padding: 22px 24px; }
.modal-card:has(.cfg-wrap) .modal-title { margin-bottom: 14px; }
/* 这几个弹层都是即时保存，底部按钮只作「关闭」用（文案由 modal() 按 .cfg-wrap 切换）：
   收敛成右下角弱化白底按钮；取消与右上角 × 功能重复也一并隐藏（元素与绑定仍在） */
.modal-card:has(.cfg-wrap) .modal-btns { justify-content: flex-end; margin-top: 14px; padding-top: 12px; }
/* .is-form = 需要点「确定」提交的表单弹层：保留取消按钮和高亮主按钮 */
.modal-card:has(.cfg-wrap:not(.is-form)) #modalCancel { display: none; }
.modal-card:has(.cfg-wrap:not(.is-form)) #modalOk {
  width: auto; min-width: 104px; padding: 9px 22px; border-radius: 9px;
  background: #fff; border: 1px solid #EADFD5; color: #6E5A4C; box-shadow: none;
}
.modal-card:has(.cfg-wrap:not(.is-form)) #modalOk:hover { border-color: #F6B98F; background: #FFF7F1; color: var(--primary); }
.modal-card:has(.cfg-wrap.is-form) #modalOk { width: auto; min-width: 110px; padding: 10px 22px; border-radius: 9px; }

.cfg-wrap { font-size: 13px; }
.cfg-sec {
  background: #FFFDFB; border: 1px solid #F3E7DD; border-radius: 12px;
  padding: 14px; margin-bottom: 12px;
}
.cfg-sec:last-child { margin-bottom: 0; }
.cfg-sec-hd {
  display: flex; align-items: center; gap: 7px; margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid #F3E7DD;
  font-size: 13.5px; font-weight: 700; color: var(--text-main);
}
.cfg-sec-hd .sch-ic { width: 15px; height: 15px; color: var(--primary); }
.cfg-sec-hd .cfg-count {
  margin-left: auto; font-size: 12px; font-weight: 500; color: var(--text-sub);
  background: #F6EFE9; border-radius: 999px; padding: 1px 9px;
}
.cfg-count { margin: 0 0 8px 2px; font-size: 12px; color: var(--text-sub); }
.cfg-count b { color: var(--text-main); }
.cfg-subhd {
  margin: 14px 0 8px; padding-left: 8px; border-left: 3px solid var(--primary);
  font-size: 12px; font-weight: 600; color: #7A6656;
}

/* 表单：字段带小标签，底部对齐；输入框统一 36px */
.cfg-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cfg-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 158px; min-width: 138px; }
.cfg-field > span { font-size: 12px; color: var(--text-sub); }
.cfg-field-sm { flex: 0 1 122px; min-width: 108px; }
.cfg-field:has(.cfg-slot) { flex: 1.4 1 210px; }
.cfg-field:has(.cfg-to) { flex: 2 1 290px; }
.cfg-wrap .input {
  display: block; width: 100%; height: 36px; margin: 0; padding: 7px 11px;
  border: 1px solid #EADFD5; border-radius: 9px; background: #fff;
  color: var(--text-main); font-size: 13px; font-family: inherit; line-height: 1.4;
  transition: border-color .18s, box-shadow .18s;
}
.cfg-wrap .input:hover { border-color: #F3C7A8; }
.cfg-wrap .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 122, 46, .10); outline: none; }
.cfg-slot { display: flex; align-items: center; gap: 6px; }
.cfg-slot > .input { flex: 1 1 0; min-width: 0; }
.cfg-to { flex: 0 0 auto; color: var(--text-sub); font-size: 12px; }
.cfg-btn-primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, #FF9A56, #FF7A2E);
  box-shadow: 0 2px 8px rgba(255, 122, 46, .24);
}
.cfg-btn-primary .sch-ic { color: #fff; }
.cfg-btn-primary:hover, .cfg-btn-primary:hover .sch-ic { color: #fff; }
.cfg-btn-primary:hover { border-color: transparent; background: linear-gradient(135deg, #FF8E42, #F56C1C); }
.cfg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #F3E7DD; }

/* 筛选行 */
.cfg-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cfg-filters > select.input { flex: 1 1 148px; }
.cfg-search { position: relative; flex: 2 1 210px; min-width: 150px; }
.cfg-search > .sch-ic {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: #B49A87; pointer-events: none;
}
.cfg-search > .input { padding-left: 31px; }
.cfg-search-grow { flex: 3 1 260px; }

/* 列表卡片行：操作按钮默认中性色，hover 才显色，避免满屏橙红 */
.cfg-list { display: flex; flex-direction: column; gap: 6px; }
.cfg-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid #F1E6DC; border-radius: 9px; background: #fff;
  transition: border-color .18s, background-color .18s;
}
.cfg-row:hover { border-color: #F6C9A6; background: #FFFCF9; }
.cfg-row-main { flex: 1; min-width: 0; }
.cfg-row-title { font-size: 13.5px; font-weight: 600; color: var(--text-main); }
.cfg-row-meta { margin-top: 2px; font-size: 12px; color: var(--text-sub); }
.cfg-row-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.cfg-act {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px;
  border: 1px solid #EADFD5; border-radius: 8px; background: #fff;
  color: #7A6656; font-size: 12px; white-space: nowrap; cursor: pointer;
  transition: border-color .18s, background-color .18s, color .18s;
}
.cfg-act .sch-ic { width: 13px; height: 13px; }
.cfg-act:hover { border-color: #F6B98F; background: #FFF7F1; color: var(--primary); }
.cfg-act-danger:hover { border-color: #F3B7B4; background: #FFF5F5; color: #D34046; }

/* 徽章 / 空态 / 提示 */
.cfg-badge {
  display: inline-flex; align-items: center; vertical-align: middle;
  padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: #F2ECE6; color: #8A7666;
}
.cfg-badge-ok { background: #E9F6EE; color: #2F7D4F; }
.cfg-badge-warn { background: #FFF3E4; color: #B4762A; }
.cfg-badge-info { background: #EAF1FB; color: #3A6EA5; }
.cfg-badge-danger { background: #FDECEC; color: #C0392B; }
.cfg-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 16px; border: 1px dashed #EADFD5; border-radius: 10px;
  background: #FFFDFB; color: #A8988D; font-size: 13px; text-align: center;
}
.cfg-empty .sch-ic { width: 24px; height: 24px; color: #D8C6B6; }
.cfg-empty-sm { flex-direction: row; justify-content: center; padding: 13px; gap: 7px; }
.cfg-empty-sm .sch-ic { width: 16px; height: 16px; }
.cfg-tip {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; padding: 9px 11px;
  border-radius: 9px; background: #FBF6F1; color: var(--text-sub);
  font-size: 12px; line-height: 1.7;
}
.cfg-tip b { color: var(--primary); }
.cfg-tip > .sch-ic { width: 14px; height: 14px; margin-top: 3px; flex: 0 0 auto; color: #C39A7B; }
.cfg-tip-warn { background: #FFF6E8; color: #9A6A20; }
.cfg-tip-warn > .sch-ic { color: #D97706; }

/* 学员 chips */
.cfg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cfg-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px;
  border: 1px solid #EADFD5; border-radius: 8px; background: #fff;
  font-size: 12.5px; color: var(--text-main);
}
.cfg-chip.is-off { opacity: .55; }
.cfg-chip.is-on { background: var(--primary-light); border-color: #F6D3B8; color: var(--primary); font-weight: 600; }
.cfg-chip-name { font-weight: 600; }
.cfg-chip-meta { color: var(--text-sub); font-size: 11.5px; font-weight: 400; }
.cfg-chip-done { display: inline-flex; align-items: center; gap: 2px; color: #2F8F5B; font-size: 11.5px; }
.cfg-chip-done .sch-ic, .cfg-chip-add .sch-ic, .cfg-chip-rm .sch-ic { width: 13px; height: 13px; }
.cfg-chip-add, .cfg-chip-rm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; border: 1px solid #EADFD5;
  border-radius: 6px; background: #fff; color: var(--primary); cursor: pointer;
  transition: border-color .18s, background-color .18s, color .18s;
}
.cfg-chip-add:hover { border-color: var(--primary); background: #FFF1E6; }
.cfg-chip-rm { border: none; background: transparent; color: #B49A87; }
.cfg-chip-rm:hover { color: #D34046; background: #FFF1F1; }
.cfg-picked-list { display: flex; flex-direction: column; gap: 6px; }
.cfg-picked-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cfg-picked-row > select.input { flex: 1 1 200px; height: 32px; padding: 5px 9px; border-radius: 8px; }

/* 操作记录 */
.cfg-log { padding: 10px 2px; border-bottom: 1px solid #F6EFE9; }
.cfg-log:last-child { border-bottom: none; }
.cfg-log-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 13px; line-height: 1.6; color: var(--text-main); }
.cfg-log-text { flex: 1 1 200px; }
.cfg-log-meta { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11.5px; color: var(--text-sub); }
.cfg-log-meta .sch-ic { width: 12px; height: 12px; color: #C0AF9F; }
.cfg-wrap .pager { margin-top: 12px; }

/* 学员积分变动记录：余额宝式两列布局（左=操作信息，右=变动积分+剩余） */
.plog { border-top: 1px solid #F3EAE2; }
.plog-row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  align-items: center; padding: 14px 4px;
  border-bottom: 1px solid #F6EFE9;
}
.plog-row:last-child { border-bottom: none; }
.plog-row:hover { background: #FFFBF7; }
.plog-main { min-width: 0; }
.plog-desc { font-size: 14px; font-weight: 600; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plog-meta { margin-top: 4px; font-size: 12px; color: #9C8C7E;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plog-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plog-img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px;
  border: 1px solid #F0E2D8; background: #FFF7F0; cursor: zoom-in; }
.plog-side { text-align: right; min-width: 96px; }
.plog-amt { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.plog-pos { color: #2E9E5B; }
.plog-neg { color: var(--danger); }
.plog-zero { color: var(--text-sub); }

/* 报表单：清晰分段切换 + 标签化筛选 + 汇总 */
.rp-page-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 16px;
}
.rp-page-head h2 { font-size: 20px; font-weight: 700; color: var(--text-main); margin: 0; }
.rp-page-head p { margin: 5px 0 0; font-size: 12px; color: var(--text-sub); }
.rp-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rp-btn {
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px solid #E7D6C9; background: #fff; color: var(--text-main);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color .18s, border-color .18s, box-shadow .18s, filter .18s;
}
.rp-btn:hover { background: #FFF8F2; border-color: #FFB27A; }
.rp-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rp-btn-primary {
  background: linear-gradient(135deg, #FF9A56, #FF7A2E);
  border-color: #FF7A2E; color: #fff;
  box-shadow: 0 3px 10px rgba(255, 122, 46, .22);
}
.rp-btn-primary:hover {
  background: linear-gradient(135deg, #FF9A56, #FF7A2E);
  border-color: #FF7A2E; color: #fff;
  filter: brightness(1.04); box-shadow: 0 5px 14px rgba(255, 122, 46, .3);
}

.rp-switch-bar {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 14px;
  background: #FFFBF7; border: 1px solid #F3E5DA; border-radius: 12px;
}
.rp-seg-group { display: flex; align-items: center; gap: 10px; }
.rp-seg-label { font-size: 12px; color: var(--text-sub); }
.rp-seg {
  display: inline-flex; gap: 3px; padding: 3px;
  background: #F6F1ED; border-radius: 10px;
}
.rp-seg-btn {
  border: 0; background: transparent; color: var(--text-sub);
  padding: 7px 16px; border-radius: 8px; font-size: 13px; cursor: pointer;
  transition: background-color .18s, color .18s, box-shadow .18s;
}
.rp-seg-btn:hover { background: #FFF4EC; color: var(--primary); }
.rp-seg-btn.active {
  background: linear-gradient(135deg, #FF9A56, #FF7A2E);
  color: #fff; font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 122, 46, .24);
}

.rp-filter-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px; padding: 14px 16px;
  background: #fff; border: 1px solid #F3E5DA; border-radius: 12px;
}
.rp-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rp-field > span { font-size: 11px; color: var(--text-sub); }
.rp-field .input.inline { width: 100%; min-width: 0; margin: 0; }
.rp-field-wide { grid-column: span 2; }
.rp-filter-actions { display: flex; align-items: center; gap: 12px; margin: 12px 0 14px; }
.rp-hint { font-size: 12px; color: var(--text-sub); }
.rp-summary {
  padding: 11px 16px; margin-bottom: 12px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary);
  font-size: 13px; font-weight: 600;
}
.rp-table-wrap {
  overflow-x: auto; border: 1px solid #F3E5DA; border-radius: 12px;
}
.rp-table { min-width: 1180px; margin: 0; }
.rp-table th {
  background: #FFF4EC; color: #8A5A3A; font-size: 12px; white-space: nowrap;
}
.rp-table td { font-size: 12px; }
.rp-amount { color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.rp-empty { text-align: center; padding: 32px 0; color: var(--text-sub); font-size: 13px; }
.rp-group td {
  background: var(--primary-light); color: var(--primary);
  font-weight: 700; font-size: 13px; padding: 8px 10px;
}
.rp-sub td {
  background: #FAF7F4; color: var(--text-sub);
  font-size: 12px; padding: 6px 10px;
}
.rp-ops { white-space: nowrap; }
.rp-ops button { margin-right: 6px; }
.rp-stu-wrap { position: relative; }
.rp-stu-tip { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff;
  border: 1px solid #F0E4D7; border-radius: 10px; box-shadow: 0 8px 24px rgba(90, 60, 30, .12);
  max-height: 240px; overflow: auto; margin-top: 4px; }
.rp-stu-item { padding: 9px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #FBF5F0; }
.rp-stu-item:last-child { border-bottom: none; }
.rp-stu-item:hover { background: #FFF7EF; }
.rp-stu-item .sub { color: #A8988D; font-size: 12px; margin-left: 6px; }
.rp-stu-empty { padding: 10px 12px; color: #A8988D; font-size: 12px; }
@media (max-width: 1100px) {
  .rp-page-head { flex-direction: column; }
  .rp-actions { justify-content: flex-start; }
  .rp-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-switch-bar { gap: 14px; }
}
@media (max-width: 700px) {
  .rp-filter-grid { grid-template-columns: 1fr; }
  .rp-field-wide { grid-column: span 1; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-btn, .rp-seg-btn { transition: none; }
}
.plog-left { margin-top: 4px; font-size: 12px; color: #9C8C7E; font-variant-numeric: tabular-nums; }

/* 快捷筛选胶囊（全部 / 加分 / 扣分） */
.plog-kind {
  border: 1px solid #E7DACE; background: #fff; color: #6B5B4D;
  border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.plog-kind:hover { border-color: #D8C3AE; }
.plog-kind.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.cfg-wrap .input:focus-visible,
.cfg-act:focus-visible, .cfg-chip-add:focus-visible, .cfg-chip-rm:focus-visible,
.cfg-btn-primary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 720px) {
  .modal-card:has(.cfg-wrap) { padding: 16px; }
  .cfg-field, .cfg-field-sm, .cfg-field:has(.cfg-slot), .cfg-field:has(.cfg-to) { flex: 1 1 100%; }
  .cfg-form .cfg-btn-primary { flex: 1 1 100%; justify-content: center; }
  .cfg-filters > select.input, .cfg-search { flex: 1 1 100%; }
  .cfg-row { flex-wrap: wrap; }
  .cfg-row-acts { width: 100%; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .cfg-row, .cfg-act, .cfg-chip-add, .cfg-chip-rm, .cfg-wrap .input { transition: none; }
}

/* ---------- 排课操作弹层（排课 / 查看 / 空闲匹配 / 批量停课 / 统计 / 冲突） ----------
   复用上面的 .cfg-* 组件；.is-form 表示需要点「确定」提交，保留取消与高亮主按钮。 */
.cfg-form .cfg-field-full { flex: 1 1 100%; min-width: 0; }
.cfg-form > .cfg-tip, .cfg-form > .cfg-hints { margin-top: 0; }
.cfg-form .sch-btn { height: 36px; }
.cfg-hints {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 12px; line-height: 1.6; color: var(--text-sub);
}
.cfg-hints #mCapHint:empty { display: none; }
.cfg-subbox { margin-top: 10px; }
.cfg-subbox:empty { display: none; }
.cfg-sub-list { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.cfg-sub-list:empty { display: none; }
.cfg-link { color: var(--primary); font-size: 12px; text-decoration: none; white-space: nowrap; }
.cfg-link:hover { text-decoration: underline; }
.cfg-table th, .cfg-table td { padding: 8px 10px; font-size: 12.5px; }
.cfg-table th { background: #FBF6F1; color: var(--text-sub); }
.cfg-link:focus-visible, .cfg-form .sch-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 721px) {
  .cfg-slot > .cfg-search { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 720px) {
  .cfg-slot { flex-wrap: wrap; }
  .cfg-slot > .cfg-search { flex: 1 1 100%; }
  .cfg-row-acts, .cfg-sub-list { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cfg-link, .cfg-form .sch-btn { transition: none; }
}

/* ---------- Enroll data scope config (role default / personal extra) ---------- */
.sc-box { border: 1px solid #F0E2D8; border-radius: 10px; padding: 10px 12px; background: #FFFCF9; }
.sc-line { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; }
.sc-line > span { flex: none; width: 44px; padding-top: 6px; color: #8A7666; font-size: 12px; }
.sc-line > div { flex: 1; min-width: 0; }
.sc-box select[multiple] { height: auto; padding: 4px; }
.sc-extra { border-top: 1px dashed #F0E2D8; margin-top: 10px; padding-top: 8px; }
.sc-extra.hidden { display: none; }
/* 下拉多选（员工 / 收费方案项目）：chips 触发条 + checkbox 面板 */
.sc-ms { position: relative; min-width: 200px; max-width: 420px; }
.sc-ms-btn { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  min-height: 34px; padding: 5px 26px 5px 8px; border: 1px solid #EADFD5;
  border-radius: 8px; background: #fff; cursor: pointer; }
.sc-ms-btn:hover { border-color: #E8C9B4; }
.sc-ph { color: #B9A99C; font-size: 13px; line-height: 24px; }
.sc-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 12px;
  background: #FBEEE5; color: #9A4B1B; font-size: 12px; }
.sc-chip i { margin-left: 6px; font-style: normal; font-size: 14px; line-height: 1;
  color: #C08A6B; cursor: pointer; }
.sc-chip i:hover { color: #B4571C; }
.sc-count { padding: 2px 8px; border-radius: 10px; background: #B4762A;
  color: #fff; font-size: 11px; }
.sc-arrow { position: absolute; right: 8px; top: 7px; font-style: normal; color: #B9A99C; }
/* 面板内嵌在触发条下方、占文档流：绝对定位浮层会盖住下面的项目 /
   显示报表 / 屏蔽金额等控件，两个面板同开时连另一个触发条都点不到。
   内嵌展开只会把下方内容往下推，配合 JS 的互斥展开，任何控件都不会被遮住。 */
.sc-ms-panel {
  margin-top: 4px; max-height: min(200px, 36vh); overflow-y: auto;
  overscroll-behavior: contain; padding: 4px;
  background: #fff; border: 1px solid #EADFD5; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(80, 50, 30, .08);
}
.sc-ms-panel.hidden { display: none; }
.sc-ms.open .sc-ms-btn { border-color: #E8C9B4; box-shadow: 0 0 0 3px rgba(255, 122, 46, .10); }
.sc-ms.open .sc-arrow { transform: rotate(180deg); }
.sc-opt { display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  border-radius: 6px; font-size: 13px; cursor: pointer; }
.sc-opt:hover { background: #FBF3EE; }
.sc-opt.on { color: #B4571C; font-weight: 600; }
.sc-opt input { margin: 0; }
/* 系统设置：意向课程与特色课类型同源的说明文字 */
.opt-note { margin-top: 8px; font-size: 12px; color: #B0A093; line-height: 1.5; }

/* ---------- 图片库（学员管理 → 图片库） ---------- */
/* 分类标签：选中=橙底白字，未选中=浅底橙字，状态一眼可辨（不复用 btn-ghost，避免两个都像激活） */
.gal-tab { padding: 8px 22px; border: 1px solid #F5D9C4; border-radius: 18px; background: #FFF7F0;
  color: var(--primary); font-size: 13px; cursor: pointer; transition: all .15s; }
.gal-tab:hover { border-color: var(--primary); }
.gal-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
/* ---------- 周末精品考勤 · 油画画布卡片 ---------- */
.wa-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-top: 10px; }
.wa-card {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(120% 90% at 8% 4%, rgba(255, 240, 218, .72), transparent 62%),
    radial-gradient(110% 80% at 94% 96%, rgba(233, 200, 164, .32), transparent 66%),
    linear-gradient(152deg, var(--oil-canvas) 0%, var(--oil-canvas-deep) 100%);
  border: 1px solid var(--oil-frame); border-radius: 14px; padding: 14px 16px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .72),
    inset 0 0 0 1px rgba(255, 255, 255, .26),
    0 2px 4px rgba(94, 62, 34, .05),
    0 10px 22px -10px var(--oil-shadow);
  transition: box-shadow .22s ease, border-color .22s ease;
}
/* 画布纤维与斜向笔触：透明度极低，只给质感，不干扰文字可读性 */
.wa-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    repeating-linear-gradient(118deg, var(--oil-stroke) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(28deg, rgba(255, 255, 255, .14) 0 1px, transparent 1px 11px);
}
.wa-card:hover {
  border-color: #D6B48C;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 4px 8px rgba(94, 62, 34, .09),
    0 16px 30px -12px var(--oil-shadow);
}
.wa-card-head {
  position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  border-bottom: 1px solid rgba(198, 163, 124, .34); padding-bottom: 9px; margin-bottom: 6px;
}
.wa-card-head b { font-size: 15px; font-weight: 700; color: var(--oil-ink); letter-spacing: .3px; }
.wa-meta { font-size: 11.5px; color: var(--oil-ink-sub); text-align: right; white-space: nowrap; }
.wa-body { position: relative; padding: 4px 0 8px; font-size: 13px; color: var(--text-main); line-height: 1.7; }
.wa-body > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 3px 0; }
.wa-body span { min-width: 74px; flex: 0 0 auto; color: var(--oil-ink-sub); font-size: 12px; }
.wa-thumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.wa-thumb { width: 58px; height: 58px; object-fit: cover; border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, .82); box-shadow: 0 2px 7px rgba(94, 62, 34, .18); }
.wa-remark { white-space: pre-wrap; word-break: break-all; margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed rgba(198, 163, 124, .32); }
.wa-ops { position: relative; text-align: right; border-top: 1px solid rgba(198, 163, 124, .34);
  padding-top: 9px; margin-top: 2px; }
.wa-ops .btn-ghost.sm { border: 1px solid rgba(198, 163, 124, .58); border-radius: 9px;
  background: rgba(255, 251, 246, .72); transition: background .2s, border-color .2s, color .2s; }
.wa-ops .btn-ghost.sm:hover { background: rgba(255, 238, 220, .96); border-color: var(--primary); }
.wa-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wa-file { position: relative; }
.wa-file img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--oil-frame); }
.wa-file button { position: absolute; right: -4px; top: -4px; font-size: 11px; padding: 1px 4px;
  border: none; border-radius: 8px; background: var(--primary); color: #fff; cursor: pointer; }
/* 深色模式：整套主题变量一起切换，卡片与页面处于同一油画语境 */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #F2A06A;
    --primary-light: #3A2B22;
    --text-main: #F4E9DC;
    --text-sub: #C2AC98;
    --placeholder: #8E7A68;
    --page-bg: #1D1815;
    --shadow: 0 2px 10px rgba(0, 0, 0, .32);
    --oil-canvas: #2C241F;
    --oil-canvas-deep: #221C18;
    --oil-frame: #4B3B30;
    --oil-ink: #F8EFE4;
    --oil-ink-sub: #CBB6A2;
    --oil-stroke: rgba(255, 230, 200, .04);
    --oil-shadow: rgba(0, 0, 0, .48);
  }
  .wa-card::before { background-image:
    repeating-linear-gradient(118deg, var(--oil-stroke) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(28deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 11px); }
  .wa-card:hover { border-color: #7A5C44; }
  .wa-thumb { border-color: rgba(255, 255, 255, .16); box-shadow: 0 2px 7px rgba(0, 0, 0, .4); }
  .wa-ops .btn-ghost.sm { background: rgba(58, 43, 34, .85); border-color: rgba(198, 163, 124, .42); }
  .wa-ops .btn-ghost.sm:hover { background: rgba(92, 64, 45, .92); }
}
@media (prefers-reduced-motion: reduce) { .wa-card { transition: none; } }
@media (max-width: 560px) {
  .wa-list { grid-template-columns: 1fr; gap: 12px; }
  .wa-card { padding: 12px 13px 10px; }
  .wa-card-head { flex-wrap: wrap; }
  .wa-meta { text-align: left; white-space: normal; }
}
.gal-empty { padding: 28px; text-align: center; color: var(--text-sub); font-size: 13px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 8px; }
.gal-card { background: #fff; border: 1px solid #F0E4D7; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.gal-thumb { width: 100%; height: 130px; background: #FBF5EF; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gal-name { padding: 8px 10px 2px; font-size: 13px; font-weight: 600; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-meta { padding: 0 10px 8px; font-size: 11px; color: var(--text-sub);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-ops { padding: 8px 10px; border-top: 1px solid #F6EFE9; display: flex; flex-wrap: wrap; gap: 6px; }
.gal-ops .btn-ghost.sm { padding: 5px 9px; font-size: 12px; }

/* ---------- 面试记录档案 / 人才储备档案 ---------- */
.arc-sec { font-size: 13px; font-weight: 700; color: var(--primary); margin: 18px 0 10px;
  padding-left: 9px; border-left: 3px solid var(--primary); }
.arc-sec:first-child { margin-top: 0; }
.arc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.arc-row3 { grid-template-columns: 1fr 1fr 1fr; }
.arc-field { margin-bottom: 12px; }
.arc-field label { display: block; font-size: 12px; color: #8A7565; margin-bottom: 5px; font-weight: 600; }
.arc-photos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.arc-photo { position: relative; aspect-ratio: 1; border: 1px dashed #F0CDB2; border-radius: 10px;
  background: #FFF8F2; overflow: hidden; display: flex; align-items: center; justify-content: center;
  color: #C99A72; font-size: 12px; cursor: pointer; }
.arc-photo img { width: 100%; height: 100%; object-fit: cover; }
.arc-photo-del { position: absolute; top: 3px; right: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(74,59,50,.72); color: #fff; font-size: 13px; line-height: 18px; text-align: center; z-index: 2; }
.arc-photo-type { position: absolute; bottom: 0; left: 0; right: 0; width: 100%; border: none;
  background: rgba(255,255,255,.94); color: #8A7565; font-size: 10px; padding: 2px 0; text-align: center; z-index: 2; }
.arc-add { flex-direction: column; font-size: 24px; line-height: 1.1; cursor: pointer; }
.arc-add span { font-size: 11px; }
.arc-tip { font-size: 12px; color: var(--text-sub); margin-top: 8px; }
.arc-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.slot-chip { border: 1px solid #F0E2D8; border-radius: 18px; padding: 6px 14px; font-size: 13px;
  color: #8A7565; background: #fff; cursor: pointer; user-select: none; }
.slot-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
@media(max-width:700px){ .arc-row, .arc-row3 { grid-template-columns: 1fr; } .arc-photos { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 内部资料：默认 / 悬停 / 选中 三态 ----------
 * 层级：默认（浅底细框）→ 悬停（加深深浅 + 轻微上浮，仅提示可点）→ 选中（实心主色 + 阴影，明确当前）。
 * 三者靠背景、边框、阴影、字重四重差异区分，不只靠颜色，色弱与深浅色主题下同样可辨。
 */
:root {
  --idoc-idle-bg: #FFF7F0;
  --idoc-idle-bd: #F0E0D2;
  --idoc-hover-bg: #FFEBD8;
  --idoc-hover-bd: #F2B98E;
  --idoc-hover-sh: 0 3px 10px rgba(255, 122, 46, .16);
  --idoc-sel-bg: linear-gradient(135deg, #FF9A56, #FF7A2E);
  --idoc-sel-bd: #E86A1E;
  --idoc-sel-sh: 0 4px 14px rgba(255, 122, 46, .30);
  --idoc-row-hover: #FFF5ED;
  --idoc-row-sel: #FFE9DA;
  --idoc-row-sel-bd: #FF7A2E;
}
.idoc-state {
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
/* 分类标签：复用 gal-tab 的尺寸，三态在本块内覆盖 */
.idoc-tab { border: 1px solid var(--idoc-idle-bd); background: var(--idoc-idle-bg); color: var(--primary);
  box-shadow: none; }
.idoc-tab:hover { background: var(--idoc-hover-bg); border-color: var(--idoc-hover-bd);
  box-shadow: var(--idoc-hover-sh); }
.idoc-tab.sel { background: var(--idoc-sel-bg); border-color: var(--idoc-sel-bd); color: #fff;
  font-weight: 700; box-shadow: var(--idoc-sel-sh); }
.idoc-tab.sel:hover { filter: brightness(1.04); box-shadow: var(--idoc-sel-sh); }
/* 文件夹按钮：默认与「重命名/删除」次级操作明确区分 */
.idoc-folder { border: 1px solid var(--idoc-idle-bd); background: var(--idoc-idle-bg); color: var(--text-main);
  font-weight: 600; }
.idoc-folder:hover { background: var(--idoc-hover-bg); border-color: var(--idoc-hover-bd);
  box-shadow: var(--idoc-hover-sh); }
.idoc-folder.sel { background: var(--idoc-sel-bg); border-color: var(--idoc-sel-bd); color: #fff;
  font-weight: 700; box-shadow: var(--idoc-sel-sh); }
.idoc-folder.sel:hover { filter: brightness(1.04); box-shadow: var(--idoc-sel-sh); }
.idoc-folder-op { border: 1px solid transparent; background: transparent; color: var(--text-sub); font-size: 12px; }
.idoc-folder-op:hover { background: var(--idoc-hover-bg); border-color: var(--idoc-hover-bd); color: var(--primary); }
.idoc-folder-op.danger:hover { color: var(--danger); border-color: rgba(229, 72, 77, .4); background: rgba(229, 72, 77, .08); }
/* 表格行：悬停整行浅色，选中整行更深的橙底 + 左侧色条，与悬停形成层级 */
.idoc-table tbody tr { transition: background .14s ease; }
.idoc-table tbody tr:hover { background: var(--idoc-row-hover); }
.idoc-table tbody tr.idoc-row-sel { background: var(--idoc-row-sel); }
.idoc-table tbody tr.idoc-row-sel td:first-child { box-shadow: inset 3px 0 0 var(--idoc-row-sel-bd); }
.idoc-table tbody tr.idoc-row-sel:hover { background: #FFDFC9; }
@media (prefers-color-scheme: dark) {
  :root {
    --idoc-idle-bg: #2A211B;
    --idoc-idle-bd: #4A3B30;
    --idoc-hover-bg: #3A2B21;
    --idoc-hover-bd: #7A5C44;
    --idoc-hover-sh: 0 3px 10px rgba(0, 0, 0, .34);
    --idoc-sel-bg: linear-gradient(135deg, #D98245, #B5622E);
    --idoc-sel-bd: #E89A62;
    --idoc-sel-sh: 0 4px 14px rgba(0, 0, 0, .45);
    --idoc-row-hover: #2E251F;
    --idoc-row-sel: #3C2B20;
    --idoc-row-sel-bd: #F2A06A;
  }
  .idoc-tab.sel, .idoc-folder.sel { color: #FFF6EC; }
  .idoc-table tbody tr.idoc-row-sel:hover { background: #473225; }
}
@media (prefers-reduced-motion: reduce) { .idoc-state, .idoc-table tbody tr { transition: none; } }

/* ---------- 内部资料顶部工具栏按钮：默认 / 悬停 / 按下(选中) 三态 ----------
 * 范围：仅 #view-internalDoc .toolbar 内的主按钮、次按钮与标签下拉，
 * 覆盖「新建文件夹 / 管理标签 / 上传文件 / 上传文件夹 / 筛选 / 重置 / 全部标签」，
 * 不影响其它页面的导航按钮或通用 .btn-* 。
 */
#view-internalDoc .toolbar .btn-primary,
#view-internalDoc .toolbar .btn-ghost,
#view-internalDoc .toolbar select.input {
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease,
              color .16s ease, transform .1s ease;
}
/* 默认：主按钮实心渐变；次按钮浅底橙字；下拉白底细框 */
#view-internalDoc .toolbar .btn-primary { background: linear-gradient(135deg, #FF9A56, #FF7A2E);
  color: #fff; border: 1px solid #E86A1E; box-shadow: 0 2px 6px rgba(255, 122, 46, .18); }
#view-internalDoc .toolbar .btn-ghost { background: #FFF0E4; color: var(--primary);
  border: 1px solid #F0D8C6; box-shadow: none; }
#view-internalDoc .toolbar select.input { background: #fff; color: var(--text-main);
  border: 1px solid #E6D5C6; box-shadow: none; }
/* 悬停：提亮 + 边框加深 + 淡阴影，提示可点但不像已选中 */
#view-internalDoc .toolbar .btn-primary:hover { background: linear-gradient(135deg, #FFA868, #FF8B45);
  border-color: #D85E12; box-shadow: 0 4px 12px rgba(255, 122, 46, .28); }
#view-internalDoc .toolbar .btn-ghost:hover { background: #FFE4D0; border-color: #F2B98E;
  box-shadow: 0 3px 9px rgba(255, 122, 46, .14); }
#view-internalDoc .toolbar select.input:hover { border-color: #F2B98E;
  box-shadow: 0 2px 8px rgba(255, 122, 46, .10); }
/* 按下：轻微下沉 + 阴影收缩，给即时物理反馈 */
#view-internalDoc .toolbar .btn-primary:active { transform: translateY(1px);
  background: linear-gradient(135deg, #F5893F, #E86A1E); box-shadow: 0 1px 3px rgba(255, 122, 46, .24); }
#view-internalDoc .toolbar .btn-ghost:active { transform: translateY(1px);
  background: #FFD8BE; box-shadow: none; }
#view-internalDoc .toolbar select.input:active { border-color: var(--primary); }
/* 选中/激活：筛选按钮在有标签筛选时保持实心，与一次性 hover 明确区分 */
#view-internalDoc .toolbar .btn-ghost.sel { background: var(--primary); color: #fff;
  border-color: #E86A1E; font-weight: 700; box-shadow: 0 3px 10px rgba(255, 122, 46, .26); }
#view-internalDoc .toolbar .btn-ghost.sel:hover { background: #F5873B; color: #fff; }
#view-internalDoc .toolbar select.input:focus { outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 122, 46, .16); }
@media (prefers-color-scheme: dark) {
  #view-internalDoc .toolbar .btn-primary { background: linear-gradient(135deg, #D98245, #B5622E);
    color: #FFF6EC; border-color: #E89A62; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
  #view-internalDoc .toolbar .btn-primary:hover { background: linear-gradient(135deg, #E8955A, #C67438);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
  #view-internalDoc .toolbar .btn-ghost { background: #3A2B22; color: #F2A06A; border-color: #5A4638; }
  #view-internalDoc .toolbar .btn-ghost:hover { background: #4A3628; border-color: #8A6A50;
    box-shadow: 0 3px 9px rgba(0, 0, 0, .35); }
  #view-internalDoc .toolbar select.input { background: #2A211B; color: #F4E9DC; border-color: #4A3B30; }
  #view-internalDoc .toolbar select.input:hover { border-color: #8A6A50; }
  #view-internalDoc .toolbar .btn-ghost:active { background: #523A2B; }
  #view-internalDoc .toolbar .btn-ghost.sel { background: #B5622E; color: #FFF6EC; border-color: #E89A62; }
  #view-internalDoc .toolbar select.input:focus { box-shadow: 0 0 0 3px rgba(242, 160, 106, .2); }
}
@media (max-width: 560px) {
  #view-internalDoc .toolbar { flex-wrap: wrap; }
  #view-internalDoc .toolbar .btn-primary,
  #view-internalDoc .toolbar .btn-ghost { flex: 0 0 auto; min-height: 38px; }
  #view-internalDoc .toolbar select.input { width: 100% !important; }
}
@media (prefers-reduced-motion: reduce) {
  #view-internalDoc .toolbar .btn-primary,
  #view-internalDoc .toolbar .btn-ghost,
  #view-internalDoc .toolbar select.input { transition: none; }
}

/* ---------- 内部资料文档打印：只打印文档 iframe，不打印后台页面 ----------
 * 点打印时给 body 加 .idoc-printing，打印结束由 afterprint 移除。
 * 用 visibility 而非 display 隐藏，避免 iframe 被移出渲染树导致内容丢失。
 */
@media print {
  body.idoc-printing * { visibility: hidden !important; }
  body.idoc-printing #idocFrame {
    visibility: visible !important;
    position: fixed !important;
    left: 0 !important; top: 0 !important;
    width: 100vw !important; height: 100vh !important;
    border: none !important; border-radius: 0 !important;
    margin: 0 !important; padding: 0 !important;
    box-shadow: none !important;
  }
}

/* ---------- 报表单：项目模板宽表与项目名称字段显示 ----------
 * 6 列模板表在默认 640px 弹层里会把「操作」挤成一个字，放宽并允许横向滚动。
 * 表格文字给足字号与行高，长项目名不换行截断；窄屏走全宽抽屉 + 表格横滑。
 */
.modal-card:has(.rp-tpl-wrap) { width: min(1000px, 96vw); max-width: 96vw; }
.rp-tpl-scroll { overflow-x: auto; }
.rp-tpl-scroll .table { min-width: 800px; }
.rp-tpl-scroll .table th,
.rp-tpl-scroll .table td {
  white-space: nowrap; padding: 9px 12px;
  font-size: 13px; line-height: 1.5; vertical-align: middle;
}
.rp-tpl-scroll .table .link { font-size: 13px; white-space: nowrap; }

/* 项目名称等筛选控件：字号与高度给足，长文本不挤断 */
.rp-field { min-width: 0; }
.rp-field select.input.inline,
.rp-field input.input.inline {
  min-height: 36px; padding: 6px 10px;
  font-size: 13px; line-height: 1.5;
}
#rpProject { min-width: 170px; }

@media (max-width: 900px) {
  .modal-card:has(.rp-tpl-wrap) { width: 100%; max-width: 100%; padding: 18px; }
  .rp-tpl-scroll .table { min-width: 760px; }
}
