/* ============ 智慧校园 · 校园风格 / 简洁清爽（浅色主题） ============ */
:root {
  --primary: #185fa5;
  --primary-600: #185fa5;
  --primary-100: #e6f1fb;
  --teal: #0f6e56;
  --teal-100: #e1f5ee;
  --amber: #854f0b;
  --amber-100: #faeeda;
  --red: #a32d2d;
  --red-100: #fcebeb;
  --text: #1f2733;
  --text-2: #5b6472;
  --text-3: #8a93a2;
  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #e5e9f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06);
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.6; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e6f1fb 0%, #e1f5ee 100%); padding: 20px; }
.login-card { background: #fff; border-radius: 16px; box-shadow: 0 8px 30px rgba(16,24,40,.10); padding: 36px 32px; width: 100%; max-width: 400px; text-align: center; }
.login-logo { font-size: 44px; }
.login-card h1 { font-size: 20px; margin: 8px 0 4px; font-weight: 600; }
.login-sub { color: var(--text-3); margin: 0 0 20px; font-size: 13px; }
.login-card form { text-align: left; }
.login-card label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--text-2); }
.login-card input { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.login-card input:focus { outline: none; border-color: var(--primary); }
.btn-primary { width: 100%; padding: 11px; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; margin-top: 6px; }
.btn-primary:hover { background: #0f4a85; }
.login-tip { color: var(--text-3); font-size: 12px; text-align: center; margin-top: 14px; }
.login-error { color: var(--red); font-size: 13px; text-align: center; margin-top: 8px; }
.login-divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; margin: 16px 0 10px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-dingtalk { display: flex; flex-direction: column; gap: 8px; }
.btn-dingtalk { width: 100%; padding: 11px; background: #1677ff; color: #fff; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; }
.btn-dingtalk:hover { background: #0f5fd7; }
.btn-ghost { width: 100%; padding: 10px; background: transparent; color: var(--text-2); border: 1px solid var(--border); border-radius: 8px; font-size: 14px; cursor: pointer; }
.btn-ghost:hover { background: var(--bg); }

/* ---------- 顶栏 ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 16px; z-index: 50; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; }
.brand-logo { font-size: 22px; }
.menu-toggle { display: none; }
.icon-btn { background: none; border: none; font-size: 18px; cursor: pointer; padding: 6px 8px; border-radius: 8px; color: var(--text-2); }
.icon-btn:hover { background: var(--bg); }
.global-search { flex: 1; max-width: 480px; position: relative; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin: 0 auto; }
.global-search input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; }
.global-search kbd { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 11px; color: var(--text-3); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.user-chip { font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; position: relative; }
.user-chip:hover { background: var(--bg-hover, #f3f4f6); color: var(--text-1, #1f2733); }
.user-chip .uc-arrow { font-size: 10px; opacity: .6; transition: transform .15s; }
.user-chip.open .uc-arrow { transform: rotate(180deg); }
/* 用户名下拉菜单 */
.user-menu { position: absolute; top: 100%; right: 0; margin-top: 6px; min-width: 200px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(16,24,40,.14); z-index: 120; padding: 6px; text-align: left; }
.user-menu .um-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-menu .um-name { font-weight: 600; color: var(--text-1, #1f2733); font-size: 14px; }
.user-menu .um-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; word-break: break-all; }
.user-menu .um-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: none; background: none; font-size: 13px; color: var(--text-1, #1f2733); border-radius: 8px; cursor: pointer; text-align: left; }
.user-menu .um-item:hover { background: var(--bg-hover, #f3f4f6); }
.user-menu .um-item.danger { color: #d92d20; }
.user-menu .um-item.danger:hover { background: #fef3f2; }
.bell-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 11px; line-height: 16px; font-style: normal; }
/* ---------- 侧边栏 ---------- */
.sidebar { position: fixed; top: 56px; left: 0; bottom: 0; width: 224px; background: #fff; border-right: 1px solid var(--border); overflow-y: auto; padding: 12px 8px; z-index: 40; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 14px; margin-bottom: 2px; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--primary-100); color: var(--primary); font-weight: 500; }
/* 排课相关功能组：淡蓝色背景标注（active 态优先级更高） */
.nav-item.nav-hl { background: #eaf2ff; position: relative; }
.nav-item.nav-hl:hover { background: #dde9ff; }
.nav-item.nav-hl.active { background: var(--primary-100); }
.nav-item.nav-hl::before { content: ''; position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 3px; height: 60%; border-radius: 2px; background: var(--primary); opacity: .5; }
.nav-item.nav-hl .nav-name { color: #1d4ed8; }
.nav-icon { width: 20px; text-align: center; flex: none; }
.nav-name { flex: 1; }
/* 模块编号 + 小节号徽标 */
.nav-sec { flex: none; font-size: 10px; line-height: 1; color: var(--text-3); background: #eef1f5; border-radius: 4px; padding: 3px 5px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .3px; }
/* 待开发占位菜单项：灰色 + 橙色角标 */
.nav-item.is-todo { color: var(--text-3); background: #fafbfc; }
.nav-item.is-todo .nav-icon { opacity: .5; }
.nav-todo { flex: none; font-size: 10px; line-height: 1; color: var(--amber); background: var(--amber-100); border-radius: 4px; padding: 3px 5px; white-space: nowrap; }
.sidebar-mask { display: none; }

/* ---------- 侧边栏：按模块分组合并（手风琴） ---------- */
.nav-group { margin-bottom: 4px; }
.nav-group-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: none; background: transparent; border-radius: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; font-family: inherit; }
.nav-group-head:hover { background: var(--bg); }
.nav-group-icon { width: 20px; text-align: center; flex: none; font-size: 14px; }
.nav-group-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-group-count { flex: none; font-size: 11px; line-height: 1; color: var(--text-3); background: #eef1f5; border-radius: 10px; padding: 3px 7px; }
.nav-group-arrow { flex: none; font-size: 12px; color: var(--text-3); transition: transform .18s ease; }
.nav-group.open .nav-group-arrow { transform: rotate(180deg); }
.nav-group-body { display: none; padding-left: 12px; }
.nav-group.open .nav-group-body { display: block; }
.nav-group.open > .nav-group-head { color: var(--text); }
.nav-group-body .nav-item { padding-left: 24px; }

/* ---------- 主内容 ---------- */
.main { margin-left: 224px; margin-top: 56px; padding: 24px; min-height: calc(100vh - 56px); }
.page-head { margin-bottom: 16px; }
.page-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.page-desc { color: var(--text-3); margin: 4px 0 0; font-size: 13px; }

/* ---------- 公开班级中心页（/m/class/{token}）：只显示内容，隐藏顶栏/任务栏/侧边栏 ---------- */
body.public-class .topbar { display: none; }
body.public-class .task-bar { display: none; }
body.public-class .sidebar { display: none; }
body.public-class .sidebar-mask { display: none !important; }
body.public-class .main { margin-left: 0; margin-top: 0; padding: 0; min-height: 100vh; }
body.public-class #main-content { width: 100%; }

/* ---------- 通用组件 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.swb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.swb-grid .card { margin-bottom: 0; }
@media (max-width: 768px) { .swb-grid { grid-template-columns: 1fr; } }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat .num { font-size: 26px; font-weight: 600; color: var(--primary); }
.stat .label { color: var(--text-3); font-size: 13px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--primary); }
.btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; color: var(--text); }
.btn:hover { background: var(--bg); }
.btn.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-primary-sm { padding: 8px 14px; border: none; border-radius: 8px; background: var(--primary); color: #fff; cursor: pointer; font-size: 13px; }
.btn-primary-sm:hover { background: #0f4a85; }
.btn-danger { color: var(--red); border-color: var(--red-100); background: var(--red-100); }
/* 复选框组（星期/节次多选） */
.chk-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; cursor: pointer; user-select: none; }
.chk input { margin: 0; }
.chk:has(input:checked) { background: var(--primary-50, #eff6ff); border-color: var(--primary); color: var(--primary); }
/* 开关（mock 开关等） */
.switch { position: relative; display: inline-block; width: 46px; height: 24px; background: #cbd5e1; border-radius: 12px; transition: background .2s; flex: none; }
.switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--primary); }
.switch.on i { left: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-3); font-weight: 500; background: #fafbfc; }
tr:hover td { background: #fafbfc; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; background: var(--primary-100); color: var(--primary); }
.tag.teal { background: var(--teal-100); color: var(--teal); }
.tag.amber { background: var(--amber-100); color: var(--amber); }
.tag.red { background: var(--red-100); color: var(--red); }
.tag.purple { background: #f0e9fb; color: #7c3aed; }
.tag.blue { background: #e6f0ff; color: #2563eb; }
.empty { text-align: center; color: var(--text-3); padding: 40px 0; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.muted { color: var(--text-3); font-size: 12px; }
/* ============ M2 统计报表（第 12 点） ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-cell { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.stat-val { font-size: 22px; font-weight: 600; color: var(--text-1); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.sub-sec { margin-bottom: 16px; }
.sub-sec h4 { font-size: 13px; color: var(--text-2); margin: 0 0 8px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
/* 走班课年级勾选：网格对齐，固定 3 列，勾选框与文字垂直居中 */
.grade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
.grade-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.grade-item input { width: auto; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
/* 例外矩阵禁排格点阵：横向=星期（周一~周五），纵向=节次，红点禁排/绿点可排 */
.slot-dot-grid { display: inline-grid; grid-template-columns: 34px repeat(5, 18px); gap: 2px 3px; align-items: center; font-size: 11px; color: var(--text-2); white-space: nowrap; }
.slot-dot-grid .dg-head { text-align: center; font-weight: 600; }
.slot-dot-grid .dg-row-label { text-align: right; padding-right: 3px; }
.slot-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; justify-self: center; }
.slot-dot.banned { background: #d92d20; }
.slot-dot.allowed { background: #1570ef; }
/* 可搜索教师选择器 */
.teacher-picker { position: relative; }
.teacher-picker .tp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.teacher-picker .tp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary-100, #e6f1fb); color: var(--primary); font-size: 13px; }
.teacher-picker .tp-chip b { cursor: pointer; font-weight: 700; padding: 0 2px; }
.teacher-picker .tp-check { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; color: #fff; flex: none; }
.teacher-picker .tp-item.checked .tp-check { background: var(--primary); border-color: var(--primary); }
.teacher-picker .tp-item.checked { background: var(--primary-100, #e6f1fb); }
.teacher-picker .tp-input-wrap { position: relative; }
.teacher-picker .tp-input { width: 100%; padding: 9px 26px 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.teacher-picker .tp-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--text-2); font-size: 16px; line-height: 1; }
.teacher-picker .tp-clear:hover { color: var(--red, #a32d2d); }
.teacher-picker .tp-drop { position: absolute; z-index: 50; left: 0; right: 0; top: 100%; margin-top: 2px; max-height: 240px; overflow-y: auto; background: var(--card, #fff); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.teacher-picker .tp-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: 13px; cursor: pointer; }
.teacher-picker .tp-item:hover { background: var(--primary-100, #e6f1fb); }
.teacher-picker .tp-item .tp-name { font-weight: 500; color: var(--text); }
.teacher-picker .tp-item .tp-name b { color: var(--primary); }
.teacher-picker .tp-item .tp-meta { color: var(--text-2); font-size: 12px; }
.teacher-picker .tp-empty { padding: 12px; text-align: center; color: var(--text-2); font-size: 13px; }
.modal-mask { position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 12px; padding: 20px; width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; }
.modal h3 { margin: 0 0 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ---------- 搜索下拉 ---------- */
.search-pop { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); width: min(480px, 92vw); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(16,24,40,.14); z-index: 100; max-height: 70vh; overflow-y: auto; }
.sp-group { padding: 6px; }
.sp-title { padding: 6px 10px; font-size: 12px; color: var(--text-3); }
.sp-item { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.sp-item:hover { background: var(--primary-100); }
.sp-item .sp-ic { flex: none; width: 20px; text-align: center; }
.sp-item .sp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-item .sp-sub { color: var(--text-3); margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.sp-item small { color: var(--text-3); margin-left: 6px; }
.sp-empty { padding: 20px; text-align: center; color: var(--text-3); }
.sp-all { padding: 8px 12px; text-align: center; font-size: 12px; color: var(--primary); cursor: pointer; border-top: 1px solid var(--border); }
.sp-all:hover { background: var(--primary-100); }
.sr-list { display: flex; flex-direction: column; }
.sr-item { padding: 8px 10px; border-bottom: 1px solid var(--border); cursor: pointer; }
.sr-item:hover { background: var(--bg); }
.sr-item .sp-item { padding: 2px 0; }
.sr-item .sp-item:hover { background: transparent; }

/* ---------- 响应式断点：1280 / 992 / 768 / 480 ---------- */
@media (max-width: 1280px) {
  .main { padding: 20px; }
}
@media (max-width: 992px) {
  .brand-name { display: none; }
  .global-search { max-width: 320px; }
}
@media (max-width: 768px) {
  .menu-toggle { display: inline-block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask { display: none; position: fixed; inset: 56px 0 0 0; background: rgba(16,24,40,.3); z-index: 35; }
  .sidebar-mask.show { display: block; }
  .main { margin-left: 0; padding: 14px; }
  .global-search { max-width: none; }
  .global-search kbd { display: none; }
  /* 表格改卡片流 */
  .table-wrap { overflow-x: auto; }
  table { min-width: 480px; }
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0 10px; gap: 8px; }
  .user-chip span { display: none; }
}
@media (max-width: 480px) {
  .main { padding: 10px; }
  .grid-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 12px; }
  .stat .num { font-size: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
}

/* ============ C3 公共组件（附 C） ============ */
/* 响应式列表容器：桌面宽表 / 手机卡片流 */
.list-cards { display: none; }
.list-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.lc-main { font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.lc-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: 12px; }
.lc-sub span::before { content: '·'; margin-right: 6px; color: var(--text-3); }
.lc-foot { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

/* 只读降级提示条 */
.degrade-banner { display: none; align-items: center; gap: 8px; background: var(--amber-100); color: var(--amber); border: 1px solid #f0d9b0; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.degrade-banner .db-icon { font-size: 16px; }

/* 底部固定操作栏（避让安全区） */
.bottom-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding: 10px 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; z-index: 60; }
.bb-primary { flex: 1; min-height: 44px; }
.bb-secondary { min-height: 44px; }

/* 折叠分组 */
.fold-group { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.fold-group summary { padding: 12px 14px; font-weight: 500; font-size: 14px; cursor: pointer; background: #fafbfc; list-style: none; }
.fold-group summary::-webkit-details-marker { display: none; }
.fold-body { padding: 12px 14px; border-top: 1px solid var(--border); }

/* 面包屑 */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
.breadcrumb .cur { color: var(--text); font-weight: 500; }

/* ============ 待开发功能静态演示页 ============ */
.demo-banner { display: flex; align-items: flex-start; gap: 8px; background: #fff7e6; color: #b25e00; border: 1px solid #f0d9b0; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.demo-banner .db-icon { font-size: 16px; flex: none; line-height: 1.5; }
.demo-banner .db-text { flex: 1; min-width: 0; }
.demo-banner b { font-weight: 600; white-space: nowrap; }
.demo-banner code { background: #f7ead0; padding: 0 5px; border-radius: 4px; font-size: 12px; }

/* ---------- 演示模式切换开关（顶栏） ---------- */
.demo-toggle { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; cursor: pointer; font-size: 12px; color: var(--text-2); transition: all .15s; }
.demo-toggle:hover { border-color: var(--primary); }
.demo-toggle.active { background: var(--amber-100); border-color: var(--amber); color: var(--amber); }
.demo-toggle .dt-icon { font-size: 14px; line-height: 1; }
.demo-toggle .dt-switch { display: inline-block; min-width: 34px; text-align: center; padding: 2px 6px; border-radius: 999px; background: #cbd2dc; color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .5px; }
.demo-toggle .dt-switch.on { background: #e08a00; }
/* 演示模式下的菜单项标记 */
.nav-demo { display: inline-block; margin-left: auto; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: #faeeda; color: #854f0b; font-weight: 600; white-space: nowrap; }
.nav-item.is-demo .nav-name { color: #854f0b; }
@media (max-width: 768px) {
  .demo-toggle { padding: 5px 8px; }
  .demo-toggle .dt-label { display: none; }
}
.demo-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.df-step { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-100); color: var(--primary); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.df-step i { font-style: normal; width: 18px; height: 18px; line-height: 18px; text-align: center; background: var(--primary); color: #fff; border-radius: 50%; font-size: 11px; flex: none; }
.df-arrow { color: var(--text-3); }
.demo-points { margin: 0; padding-left: 18px; }
.demo-points li { margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.breadcrumb .sep { color: var(--text-3); }

/* 上传控件 */
.upload-box { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1.5px dashed var(--border); border-radius: 10px; padding: 18px; cursor: pointer; color: var(--text-2); text-align: center; }
.upload-box input { display: none; }
.upload-box .up-icon { font-size: 24px; }

/* 触控目标 ≥44px（移动端） */
@media (max-width: 768px) {
  .list-table { display: none; }
  .list-cards { display: block; }
  .degrade-banner { display: flex; }
  .bottom-bar { display: flex; }
  .main { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .btn, .btn-primary-sm, .nav-item, .icon-btn, .field input, .field select, .toolbar input, .toolbar select { min-height: 44px; }
  .toolbar input, .toolbar select { font-size: 16px; }
}
@media (min-width: 769px) {
  .degrade-banner, .bottom-bar { display: none; }
}

/* ---------- 移动端全屏搜索浮层（Ctrl+K 移动端等价入口） ---------- */
.search-btn { display: none; }
.search-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 120; display: flex; flex-direction: column; }
.so-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid var(--border); }
.so-head .icon-btn, .so-head .btn { min-height: 44px; flex: none; }
.so-input-wrap { flex: 1; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; min-height: 44px; }
.so-input-wrap input { flex: 1; border: none; background: transparent; outline: none; font-size: 16px; }
.so-body { flex: 1; overflow-y: auto; padding: 10px 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.so-body .sp-item { min-height: 44px; }
.so-body .sp-title { font-size: 13px; font-weight: 600; color: var(--text-2); }
@media (max-width: 768px) {
  .search-btn { display: inline-block; }
  .global-search { display: none; }
}

/* ---------- 图表容器（附 C3：移动端点击全屏横屏） ---------- */
.chart-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 14px; }
.cb-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.cb-title .muted { font-weight: 400; }
.cb-expand { margin-left: auto; cursor: pointer; font-size: 16px; color: var(--text-3); min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.cb-expand:hover { background: var(--bg); color: var(--primary); }
.cb-body { min-height: 120px; }
.chart-fullscreen { position: fixed; inset: 0; background: #fff; z-index: 150; display: flex; flex-direction: column; }
.cf-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; }
.cf-head .icon-btn { min-height: 44px; min-width: 44px; }
.cf-body { flex: 1; padding: 16px; overflow: auto; display: flex; align-items: center; justify-content: center; }
@media (max-width: 768px) {
  .chart-fullscreen { flex-direction: row; }
  .cf-head { position: absolute; top: 0; left: 0; right: 0; flex-direction: row; z-index: 1; background: #fff; }
  .cf-body { padding-top: 60px; }
}

/* ---------- 日期时间选择器（触控 ≥44px） ---------- */
@media (max-width: 768px) {
  .date-field input { min-height: 44px; font-size: 16px; }
}

/* ============ M2 任务条（顶部常驻） ============ */
.task-bar { position: fixed; top: 56px; left: 0; right: 0; height: 34px; background: #fff; border-bottom: 1px solid var(--border); z-index: 45; display: flex; align-items: center; padding: 0 16px; gap: 8px; overflow: visible; }
.taskbar-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--primary); text-decoration: none; padding: 3px 8px; border-radius: 6px; background: var(--bg); max-width: 300px; flex: 0 1 auto; min-width: 0; position: relative; }
.taskbar-item.overdue { border-left: 3px solid var(--red); }
.taskbar-item.muted { color: var(--text-3); }
.taskbar-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taskbar-src { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.taskbar-due { color: var(--amber); font-size: 11px; white-space: nowrap; }
.taskbar-btn { border: none; background: var(--primary); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 5px; cursor: pointer; min-height: 22px; white-space: nowrap; }
.taskbar-btn.ok { background: var(--teal, #0f9d6e); }
.taskbar-btn:hover { opacity: .85; }
.taskbar-more { color: var(--text-3); margin-left: 4px; font-size: 12px; white-space: nowrap; }
/* 任务条条目 hover 详情浮层 */
.taskbar-tip { display: none; position: absolute; top: 100%; left: 0; margin-top: 6px; min-width: 260px; max-width: 360px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(16,24,40,.16); padding: 10px 12px; z-index: 120; }
.taskbar-item:hover .taskbar-tip { display: block; }
.taskbar-tip-title { font-weight: 600; font-size: 14px; line-height: 1.35; margin-bottom: 8px; color: var(--text); }
.taskbar-tip-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 3px 0; color: var(--text-2); }
.taskbar-tip-row span { color: var(--text-3); }
.taskbar-tip-row b { font-weight: 500; color: var(--text); text-align: right; }
.taskbar-tip-summary { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--text-2); line-height: 1.5; white-space: normal; }
.sidebar { top: 90px; }
.main { margin-top: 90px; }
@media (max-width: 768px) {
  .task-bar { top: 56px; height: 34px; }
  .sidebar { top: 90px; }
  .main { margin-top: 90px; }
  .sidebar-mask { top: 90px; }
}

/* ============ M11 数据与门户（看板 / 工作台 / 大屏） ============ */
.m11-toolbar { flex-wrap: wrap; gap: 8px; }
.m11-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.m11-filters select, .m11-filters .btn-sm { height: 30px; }
.m11-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.m11-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.m11-card:hover { box-shadow: 0 2px 10px rgba(16,24,40,.08); border-color: var(--primary); }
.m11-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.m11-card-t { font-weight: 600; font-size: 14px; line-height: 1.35; }
.m11-card-body { min-height: 44px; }
.m11-card-f { font-size: 11px; line-height: 1.4; }
.m11-num { font-size: 26px; font-weight: 700; color: var(--primary); letter-spacing: -.5px; }
.m11-unit { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 3px; }
.m11-bar { display: flex; align-items: center; gap: 8px; margin: 5px 0; font-size: 12px; }
.m11-bar-l { width: 84px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m11-bar-t { flex: 1; background: var(--bg); border-radius: 4px; height: 14px; overflow: hidden; }
.m11-bar-f { height: 14px; background: var(--primary); border-radius: 4px; }
.m11-bar-v { width: 46px; text-align: right; flex: none; color: var(--text-2); }
.m11-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 4px; }
.m11-group { margin-top: 18px; }
.m11-group-t { font-weight: 600; font-size: 14px; padding-left: 8px; border-left: 3px solid var(--primary); margin-bottom: 4px; }
.m11-ov-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.m11-ov .num { font-size: 22px; }
.m11-foot { text-align: center; font-size: 12px; margin-top: 14px; }
.m11-sec-h { display: flex; align-items: baseline; gap: 8px; }
.m11-sec-h h4 { margin: 0; }
.m11-li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.m11-li:last-child { border-bottom: none; }
.m11-li a { color: var(--primary); text-decoration: none; }
.m11-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.m11-chips .chip, .m11-keycharts .chip { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.m11-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.m11-tab { border: 1px solid var(--border); background: #fff; border-radius: 7px; padding: 6px 14px; font-size: 13px; cursor: pointer; min-height: 32px; color: var(--text-2); }
.m11-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.m11-form { display: grid; gap: 12px; margin-top: 12px; }
.m11-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.m11-form input, .m11-form textarea { border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font-size: 14px; font-family: inherit; }
.m11-actions { margin-top: 14px; display: flex; gap: 10px; }
/* 校长室大屏（1920×1080 适配，桌面为主） */
.m11-screen { background: #0d1b2a; color: #e8eef7; border-radius: 12px; padding: 18px; min-height: 560px; }
.m11-screen-h { display: flex; justify-content: space-between; align-items: center; font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.m11-screen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.m11-screen-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 14px; }
.m11-sc-t { font-size: 13px; color: #9fb3c8; margin-bottom: 8px; }
.m11-sc-b .m11-num { color: #4cc9f0; }
.m11-sc-b .m11-bar-t { background: rgba(255,255,255,.12); }
.m11-sc-b .m11-bar-f { background: #4cc9f0; }
.m11-sc-b .m11-bar-v, .m11-sc-b .m11-bar-l { color: #cfe3f7; }
.m11-sc-b table th, .m11-sc-b table td { color: #cfe3f7; border-color: rgba(255,255,255,.12); }
.m11-screen-f { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.m11-screen-f .muted { color: #8ea3b8; }
.m11-screen-f .chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #dcebfa; }
/* 校长室大屏补强：深色投屏、全屏/轮播工具、维度触屏按钮、翻页圆点、数字滚动、待上线占位 */
.m11-screen-dark { background: linear-gradient(160deg, #0b1424 0%, #0d1b2a 45%, #12283f 100%); }
.m11-sc-title { font-size: 26px; letter-spacing: 1px; }
.m11-sc-brand { display: flex; align-items: baseline; gap: 14px; }
.m11-sc-motto { font-size: 15px; color: #8fb6d9; letter-spacing: 2px; }
.m11-sc-clock { font-size: 15px; color: #9fb3c8; font-variant-numeric: tabular-nums; }
.m11-sc-tools { display: flex; gap: 8px; }
.m11-sc-btn { background: rgba(255,255,255,.08); color: #cfe3f7; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 6px 14px; font-size: 14px; cursor: pointer; min-height: 34px; }
.m11-sc-btn:hover { background: rgba(255,255,255,.14); }
.m11-sc-btn.on { background: #4cc9f0; border-color: #4cc9f0; color: #06283d; font-weight: 700; }
.m11-sc-dims { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.m11-sc-dim { display: flex; align-items: center; gap: 10px; }
.m11-sc-dimlabel { flex: none; font-size: 13px; color: #9fb3c8; width: 40px; }
.m11-sc-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.m11-sc-chip { flex: none; background: rgba(255,255,255,.06); color: #cfe3f7; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 6px 16px; font-size: 14px; cursor: pointer; min-height: 34px; }
.m11-sc-chip.on { background: #4cc9f0; border-color: #4cc9f0; color: #06283d; font-weight: 700; }
.m11-sc-dots { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.m11-sc-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.16); border: none; cursor: pointer; padding: 0; }
.m11-sc-dot.on { background: #4cc9f0; transform: scale(1.25); }
.m11-sc-num { font-size: 40px; color: #4cc9f0; }
.m11-sc-wait { color: #5c7288; font-size: 15px; padding: 18px 4px; text-align: center; }
/* 三校区对比（第 1 点：横向条形 + 最优标 teal + 趋势按钮） */
.cc-filter { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.cc-filter select, .cc-filter input { border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px; font-size: 13px; min-height: 32px; }
.cc-bar-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 13px; }
.cc-bar-name { flex: none; width: 64px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-bar-track { flex: 1; background: var(--bg); border-radius: 4px; height: 15px; overflow: hidden; }
.cc-bar-fill { height: 15px; background: var(--primary); border-radius: 4px; }
.cc-bar-fill.best { background: #14b8a6; }
.cc-bar-val { flex: none; width: 56px; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cc-bar-val.best { color: #14b8a6; font-weight: 700; }
.cc-best { flex: none; font-size: 11px; color: #fff; background: #14b8a6; border-radius: 999px; padding: 1px 8px; }
.cc-trend { margin-left: auto; }
.cc-legend-row { display: flex; gap: 14px; margin-bottom: 8px; font-size: 13px; flex-wrap: wrap; }
.cc-legend { font-weight: 600; }
@media (max-width: 992px) {
  .m11-grid, .m11-screen-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 768px) {
  .m11-grid, .m11-screen-grid { grid-template-columns: 1fr; }
  .m11-card { padding: 12px; }
  .m11-num { font-size: 22px; }
  .m11-filters { width: 100%; }
  .m11-filters select, .m11-filters .btn-sm { flex: 1 1 auto; min-height: 40px; }
  .m11-screen { padding: 12px; min-height: auto; }
  .m11-screen-h { font-size: 16px; }
  .m11-tab { min-height: 40px; }
}

/* ============ M3 照片采集区（人事档案，底片由 M1 唯一持有） ============ */
.m03-photo { display: flex; gap: 16px; align-items: flex-start; padding: 12px; background: var(--bg); border-radius: 10px; margin: 10px 0; flex-wrap: wrap; }
.m03-photo-box { width: 96px; height: 128px; background: #fff; border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.m03-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.m03-photo-empty { color: var(--text-3); font-size: 13px; }
.m03-photo-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.m03-photo-title { font-weight: 600; font-size: 14px; }
.m03-photo-status { font-size: 13px; }
.m03-photo-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.m03-photo-hint { font-size: 12px; min-height: 16px; }
.m03-photo-actions button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 768px) {
  .m03-photo-box { width: 72px; height: 96px; }
}

/* ============ M3 人事统计（多维度拖拽配置 + 联动图表） ============ */
.m03-dims { margin-top: 10px; }
.m03-dims-t { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.m03-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.m03-chip { display: inline-flex; align-items: center; padding: 6px 14px; border: 1px solid var(--border); background: #fff; border-radius: 999px; font-size: 13px; cursor: grab; user-select: none; transition: border-color .15s, box-shadow .15s; }
.m03-chip:hover { border-color: var(--primary); box-shadow: 0 1px 6px rgba(24,95,165,.12); }
.m03-chip:active { cursor: grabbing; }
.m03-slots { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.m03-slot-box { flex: 1; min-width: 200px; border: 1px dashed var(--border); border-radius: 10px; padding: 8px 12px; background: var(--bg); display: flex; align-items: center; gap: 10px; min-height: 44px; }
.m03-slot { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 8px; font-size: 13px; }
.m03-slot.filled { background: var(--primary); color: #fff; }
.m03-slot.filled b { cursor: pointer; font-weight: 400; opacity: .85; }
.m03-slot.empty { color: var(--text-3); }
.m03-bar { display: flex; align-items: center; gap: 8px; margin: 5px 0; font-size: 12px; }
.m03-bar-l { width: 110px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m03-bar-t { flex: 1; background: var(--bg); border-radius: 4px; height: 14px; overflow: hidden; }
.m03-bar-f { height: 14px; background: var(--primary); border-radius: 4px; }
.m03-bar-v { width: 40px; text-align: right; flex: none; color: var(--text-2); }
.m03-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.m03-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.m03-legend-item i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.m03-group-bars { display: flex; gap: 8px; align-items: flex-end; overflow-x: auto; padding-top: 6px; min-height: 180px; }
.m03-col { flex: 0 0 auto; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.m03-col-bar { width: 48px; height: 150px; display: flex; flex-direction: column-reverse; border-radius: 4px; overflow: hidden; background: var(--bg); }
.m03-stack { width: 100%; }
.m03-col-label { font-size: 11px; text-align: center; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 768px) {
  .m03-col { width: 60px; }
  .m03-col-bar { width: 40px; }
  .m03-bar-l { width: 84px; }
}

/* ============ M3 资料收集进度（第 6 点） ============ */
.m03-collect { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.m03-collect:last-child { border-bottom: none; }
.m03-collect-h { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.m03-collect-prog { font-weight: 600; color: var(--primary); }
.m03-collect-bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.m03-collect-bar > div { height: 8px; background: var(--primary); border-radius: 4px; transition: width .3s; }

/* ============ M4 财务汇总（月度/学期对比图例） ============ */
.m4-legend { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; font-size: 12px; color: var(--text-2); }
.m4-legend-i { display: inline-flex; align-items: center; gap: 5px; }
.m4-legend-i i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ============ M7 作息时间表 ============ */
.tt-cards { display: flex; flex-direction: column; gap: 12px; }
.tt-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg-card, #fff); }
.tt-card-head { display: flex; align-items: center; gap: 8px; }
.tt-name { font-size: 15px; }
.tt-meta { margin: 6px 0 4px; font-size: 12px; }
.tt-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tt-editor { margin-top: 4px; }
.tt-editor table { width: 100%; font-size: 12px; }
.tt-editor input, .tt-editor select { padding: 3px 5px; font-size: 12px; }
/* PDF 风格查看表 */
.ttv-wrap { padding: 4px 2px; }
.ttv-title { text-align: center; font-size: 18px; font-weight: 700; margin: 8px 0 14px; }
.ttv-table { width: 100%; border-collapse: collapse; }
.ttv-table th, .ttv-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: middle; }
.ttv-table thead th { background: var(--bg-soft, #f5f7fa); font-weight: 600; }
.ttv-half { text-align: center !important; font-weight: 700; font-size: 15px; width: 70px; background: var(--bg-soft, #f5f7fa); }
.ttv-period { font-weight: 600; color: var(--text-1); white-space: nowrap; }
.ttv-name { font-weight: 600; }
.ttv-time { white-space: nowrap; }
.ttv-note { color: var(--text-2); font-size: 12px; }

/* ============ M7 作息时间表：宽弹窗 + 全屏查看 ============ */
.modal-wide { max-width: 1060px; width: 96%; }
.modal-wide .modal-body { overflow-x: auto; }
.tt-editor .table-wrap { overflow-x: auto; }
.tt-editor table { min-width: 760px; }
.tt-fullscreen-mask { position: fixed; inset: 0; background: var(--bg-body, #f5f7fa); z-index: 100; overflow-y: auto; padding: 20px; }
.tt-fullscreen-mask .tt-fullscreen-inner { max-width: 980px; margin: 0 auto; background: var(--bg-card, #fff); border: 1px solid var(--border); border-radius: 12px; padding: 24px 28px; }

/* ============ M7 人员动向看板（三视图响应式 + 移动端） ============ */
.mv-office-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.mv-campus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 10px; }
@media (max-width: 992px) {
  .mv-office-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .mv-campus-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 768px) {
  .mv-office-grid, .mv-campus-grid { grid-template-columns: 1fr; }
  .mv-office-grid .card h4 { font-size: 14px; }
}

/* ============ M7 统计汇总：CSS 柱状图 + 响应式 ============ */
.bar-chart { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 56px; align-items: center; gap: 8px; }
.bar-label { font-size: 12px; color: var(--muted, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.bar-track { background: var(--bg-soft, #f3f4f6); border-radius: 4px; height: 16px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary, #2563eb); border-radius: 4px; transition: width .3s; }
.bar-val { font-size: 12px; color: var(--text, #111827); white-space: nowrap; }
@media (max-width: 768px) {
  .bar-row { grid-template-columns: 80px 1fr 48px; gap: 4px; }
}

/* ============ M7 校历：月视图 + 每周一行 + 农历节气 ============ */
.cal-wrap { display: flex; flex-wrap: wrap; gap: 16px; }
.cal-month { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; overflow: hidden; min-width: 280px; flex: 1 1 300px; }
.cal-month-title { background: var(--bg-soft, #f3f4f6); padding: 6px 10px; font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--border, #e5e7eb); }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-grid th { font-size: 12px; color: var(--muted, #6b7280); padding: 4px 0; font-weight: 500; background: var(--bg-soft, #f9fafb); }
.cal-grid th.cd-weekend-h { color: #c2410c; }
.cal-grid th.cd-week-h { color: var(--muted, #6b7280); width: 44px; }
.cal-grid th.cd-week { border: 1px solid var(--border, #f0f0f0); font-size: 11px; font-weight: 600; color: var(--primary, #2563eb); padding: 3px 2px; text-align: center; vertical-align: middle; background: #eef4ff; white-space: nowrap; }
.cal-grid td.cd { border: 1px solid var(--border, #f0f0f0); padding: 3px 2px; text-align: center; cursor: pointer; vertical-align: top; }
.cal-grid td.cd:hover { background: #eef4ff; }
.cd-d { font-size: 14px; font-weight: 600; line-height: 1.2; }
.cd-sub { font-size: 10px; color: var(--muted, #9ca3af); line-height: 1.3; }
.cd-out .cd-d { color: #d1d5db; }
.cd-out .cd-sub { color: #e5e7eb; }
.cd-today { outline: 2px solid var(--primary, #2563eb); outline-offset: -2px; }
.cd-sel { background: #dbeafe !important; outline: 2px solid var(--primary, #2563eb); outline-offset: -2px; }
.cd-weekend .cd-d { color: #c2410c; }
.cal-grid td.teal { background: #ecfdf5; }
.cal-grid td.red { background: #fef2f2; }
.cal-grid td.amber { background: #fffbeb; }
.cal-grid td.teal .cd-d { color: #059669; }
.cal-grid td.red .cd-d { color: #dc2626; }
.cal-grid td.amber .cd-d { color: #b45309; }
/* 校历放假/补课放大加粗标记 */
.cd-mark { font-size: 22px; font-weight: 900; line-height: 1; margin-bottom: 1px; }
.cd-mark-holiday { color: #dc2626; }
.cd-mark-makeup { color: #b45309; }
.cd-mark .cd-mark-dow { font-size: 10px; font-weight: 700; line-height: 1.1; }
/* 校历格子事件：外出标红 / 代课已确认标绿 / 代课教师+状态 */
.cal-grid td.cd-outing { background: #fee2e2 !important; }
.cal-grid td.cd-outing .cd-d { color: #b91c1c; font-weight: 700; }
.cal-grid td.cd-sub-ok { background: #d1fae5 !important; }
.cal-grid td.cd-sub-ok .cd-d { color: #047857; font-weight: 700; }
.cd-ev { font-size: 10px; line-height: 1.35; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-ev-outing { color: #b91c1c; font-weight: 600; }
.cd-ev-subok { color: #047857; font-weight: 600; }
.cd-ev-subpend { color: #b45309; }
.cd-ev-status { color: #9ca3af; }
@media (max-width: 768px) { .cal-month { flex: 1 1 100%; } }
