/* ================= 基础主题 ================= */
:root {
  --el-color-primary: #2f5bd7;
  --el-color-primary-light-3: #6b8ce8;
  --el-color-primary-light-5: #97aff0;
  --el-color-primary-light-7: #c3d2f8;
  --el-color-primary-light-8: #dbe4fb;
  --el-color-primary-light-9: #eef3ff;
  --el-color-primary-dark-2: #2348ab;
  --app-bg: #f2f4fa;
  --sidebar-bg: #17264a;
  --sidebar-bg-2: #1d315c;
  --text-main: #1f2a44;
  --text-sub: #6c7a96;
  --card-radius: 12px;
  --card-shadow: 0 4px 18px rgba(31, 42, 68, 0.06);
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  background: var(--app-bg);
  color: var(--text-main);
  font-size: 14px;
}
.boot-loading {
  height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; color: var(--text-sub);
}
.boot-logo { font-size: 26px; font-weight: 700; color: var(--el-color-primary); letter-spacing: 2px; }

/* ================= 登录页 ================= */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #16264a 0%, #23408a 50%, #2f5bd7 100%);
  padding: 24px;
}
.login-card {
  width: 960px; max-width: 100%; min-height: 540px; display: flex;
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 22px 60px rgba(8, 18, 44, 0.35);
}
.login-brand {
  width: 45%; padding: 46px 38px; color: #fff;
  background: linear-gradient(160deg, #2f5bd7 0%, #1b3577 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand h1 { font-size: 32px; margin: 0 0 10px; letter-spacing: 2px; }
.login-brand .sub { opacity: 0.82; line-height: 1.9; font-size: 14px; }
.login-brand .brand-badge {
  display: inline-block; padding: 4px 12px; border: 1px solid rgba(255,255,255,0.45);
  border-radius: 20px; font-size: 12px; margin-bottom: 22px;
}
.login-brand ul { padding-left: 18px; margin: 18px 0 0; line-height: 2; font-size: 13px; opacity: 0.9; }
.login-form { flex: 1; padding: 54px 52px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { margin: 0 0 6px; font-size: 24px; }
.login-form .tip { color: var(--text-sub); font-size: 13px; margin-bottom: 26px; }
.login-form .el-input__wrapper { padding: 6px 12px; }
.login-form .el-form-item { margin-bottom: 22px; }
.login-demo {
  margin-top: 18px; background: #f6f8fe; border: 1px dashed #c9d6f5;
  border-radius: 10px; padding: 12px 14px; font-size: 12px; color: #59688a; line-height: 1.9;
}
.login-demo .demo-toggle { font-weight: 600; }
.login-demo .demo-list { margin-top: 8px; max-height: 200px; overflow-y: auto; }
.login-demo .demo-group { margin-bottom: 6px; }
.login-demo .demo-role { color: #2f5bd7; font-weight: 700; margin: 4px 0 2px; }
.login-demo .demo-item { display: block; padding: 1px 0; cursor: pointer; }
.login-demo .demo-item:hover { color: #2f5bd7; }
.login-demo .demo-item.disabled { color: #a5adc0; cursor: not-allowed; }
.login-demo .demo-warn { margin-top: 6px; color: #b26a00; }

/* ================= 主框架 ================= */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.app-sidebar {
  width: 232px; flex: 0 0 232px;
  background: linear-gradient(180deg, #22356f 0%, #1a2a5f 100%);
  display: flex; flex-direction: column; color: #c9d3ee;
  transition: width 0.22s ease, flex-basis 0.22s ease;
}
.app-logo {
  height: 72px; flex: 0 0 72px; display: flex; align-items: center; gap: 12px;
  padding: 0 14px 0 20px;
  background: rgba(255, 255, 255, 0.02); border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.app-logo .logo-text { flex: 1; min-width: 0; }
.app-logo .name { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: 0.5px; white-space: nowrap; }
.app-logo .desc { font-size: 10.5px; color: rgba(219, 228, 251, 0.55); margin-top: 3px; white-space: nowrap; letter-spacing: 0.4px; }
.app-menu {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0 16px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.app-menu::-webkit-scrollbar { width: 0; height: 0; display: none; }
.app-menu .el-menu { border: none; background: transparent; }
.app-menu .el-menu-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 52px; line-height: 52px; margin: 0; border-radius: 0; padding: 0 20px;
  color: #c2cdec; font-size: 14.5px;
  transition: background 0.18s ease, color 0.18s ease;
}
/* 选中项：整行蓝底 + 右侧青色高亮条（参照设计稿） */
.app-menu .el-menu-item::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 3px;
  background: #3fe0f2; opacity: 0; transition: opacity 0.18s ease;
}
.app-menu .el-menu-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.app-menu .el-menu-item.is-active { background: #3e57c9; color: #fff; font-weight: 600; }
.app-menu .el-menu-item.is-active::after { opacity: 1; }
.app-menu .el-menu-item .menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-icon {
  width: 18px; height: 18px; flex: 0 0 18px;
  display: inline-flex; align-items: center; justify-content: center; color: inherit;
}
.menu-icon svg { width: 18px; height: 18px; display: block; }

/* 栏目分组：分组标题与栏目同一行高，右侧三角指示展开/收起 */
.menu-group { margin: 2px 0; }
.menu-group-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 52px; height: auto; padding: 12px 20px;
  border: 0; border-radius: 0; background: transparent;
  color: #c2cdec; cursor: pointer; text-align: left;
  font-size: 14.5px; font-weight: 500; letter-spacing: 0;
  transition: background 0.18s ease, color 0.18s ease; position: relative;
}
.menu-group-head:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.menu-group-head[aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, 0.04); }
.menu-group-head.has-active { color: #fff; }
.menu-group-head .menu-group-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-group-head .menu-group-count {
  min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.14); color: #dbe4fb;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; flex: 0 0 auto;
}
.menu-group-head .menu-caret {
  flex: 0 0 auto; width: auto; height: auto; padding: 0;
  background: transparent; border-radius: 0; color: #fff;
  font-size: 9px; line-height: 1; opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.18s ease;
}
.menu-group-head:hover .menu-caret { background: transparent; opacity: 1; }
.menu-group-head .menu-caret.open { background: transparent; opacity: 0.9; transform: rotate(-90deg); }
.menu-group-body {
  padding: 0 0 6px; margin: 0; border-left: 0;
  background: rgba(0, 0, 0, 0.1);
}
.app-menu .menu-group-body .el-menu-item {
  height: 46px; line-height: 46px; margin: 0; padding-left: 46px; font-size: 14px;
}
.menu-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #f56c6c; color: #fff; font-size: 11px; line-height: 18px;
  text-align: center; font-weight: 600; flex: 0 0 auto;
}
.sidebar-footer {
  padding: 12px 20px 16px; font-size: 11px; color: rgba(255, 255, 255, 0.38);
  line-height: 1.7; border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-footer .sidebar-version { color: rgba(255, 255, 255, 0.55); }
.sidebar-footer .sidebar-version:hover { color: #fff; }
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-header {
  height: 64px; flex: 0 0 64px; background: #fff; border-bottom: 1px solid #e8ecf5;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-title { font-size: 17px; font-weight: 700; }
.header-date { color: var(--text-sub); font-size: 13px; }
.header-right { display: flex; align-items: center; gap: 18px; }
.notice-wrap { cursor: pointer; font-size: 18px; color: #64748b; position: relative; display: flex; align-items: center; }
.notice-wrap .el-badge__content { top: 4px; }
.user-chip { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--el-color-primary-light-9);
  color: var(--el-color-primary); display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.user-meta { line-height: 1.3; }
.user-meta .n { font-size: 14px; font-weight: 600; }
.user-meta .r { font-size: 11px; color: var(--text-sub); }
.app-content { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }

/* ================= 通用页面元素 ================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.page-head .sub { color: var(--text-sub); font-size: 12.5px; margin-top: 6px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.panel {
  background: #fff; border-radius: var(--card-radius); box-shadow: var(--card-shadow);
  padding: 18px 20px; margin-bottom: 18px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head .t { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-head .t::before { content: ""; width: 4px; height: 16px; background: var(--el-color-primary); border-radius: 2px; }
.panel-head .s { font-size: 12px; color: var(--text-sub); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card {
  background: #fff; border-radius: var(--card-radius); padding: 18px 20px;
  box-shadow: var(--card-shadow); position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stat-card .icon { transition: transform .2s ease; }
@media (hover: hover) {
  .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(31, 56, 102, .13);
    border-color: #dbe4f4;
  }
  .stat-card:hover .icon { transform: scale(1.08); }
}
.stat-card .label { color: var(--text-sub); font-size: 13px; }
.stat-card .value { font-size: 30px; font-weight: 800; margin-top: 8px; line-height: 1.1; }
.stat-card .sub { font-size: 12px; color: #93a0b8; margin-top: 6px; }
.stat-card .icon {
  position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.stat-card.blue .value { color: #2f5bd7; } .stat-card.blue .icon { background: #eef3ff; color: #2f5bd7; }
.stat-card.green .value { color: #14a06f; } .stat-card.green .icon { background: #e8f8f1; color: #14a06f; }
.stat-card.orange .value { color: #e9832a; } .stat-card.orange .icon { background: #fff3e6; color: #e9832a; }
.stat-card.red .value { color: #d9534f; } .stat-card.red .icon { background: #fdecec; color: #d9534f; }
.stat-card.purple .value { color: #7a51c9; } .stat-card.purple .icon { background: #f3edff; color: #7a51c9; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.analysis-charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 18px; }
.chart-box { height: 290px; width: 100%; }
.table-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.table-toolbar .spacer { flex: 1; }
.muted { color: var(--text-sub); font-size: 12.5px; }
.text-danger { color: #d9534f; }
.text-success { color: #14a06f; }
.text-primary { color: #2f5bd7; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }
.two-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.el-table .cell { line-height: 1.5; }
.mini-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #eef3ff; color: #2f5bd7;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; margin-right: 8px;
  font-weight: 600;
}
.student-cell { display: flex; align-items: center; }

/* ================= 宽表格横向滑动容器 ================= */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ================= 座位矩阵 ================= */
.seat-panel { width: 100%; overflow-x: auto; padding-bottom: 4px; }
.podium {
  margin: 0 auto 18px; width: 260px; max-width: 60%; text-align: center; padding: 9px 0;
  background: #1f2a44; color: #fff; border-radius: 8px; font-weight: 700; letter-spacing: 8px;
  font-size: 13px;
}
.seat-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(86px, 1fr)); gap: 10px; }
.seat {
  min-height: 78px; border-radius: 10px; border: 1px solid #cfdcf7; background: #eef3ff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 4px 6px; gap: 2px; transition: all .15s; position: relative; cursor: default;
}
.seat-avatar {
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(23, 38, 74, .12);
  background: #d6e4fb;
  font-size: 12px;
  font-weight: 600;
  color: #2a63d8;
  line-height: 1;
}
.seat-empty-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #f0f2f8; border: 1px dashed #d8deec;
}
.seat.empty { background: #f8f9fd; border-style: dashed; border-color: #d8deec; }
.seat.clickable { cursor: pointer; }
.seat.clickable:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(47, 91, 215, 0.16); }
.seat .nm { font-size: 13.5px; font-weight: 700; color: #22325a; line-height: 1.3; }
.seat .pos { font-size: 10.5px; color: #93a0b8; margin-top: 2px; }
.seat.empty .nm { color: #b6bfd2; font-weight: 500; }
.seat.highlight { background: var(--el-color-primary); border-color: var(--el-color-primary); }
.seat.highlight .nm, .seat.highlight .pos { color: #fff; }
.seat.leave-mark .nm::after { content: "假"; font-size: 9px; background: #e9832a; color: #fff; border-radius: 3px; padding: 0 3px; margin-left: 3px; vertical-align: top; }
.seat .seat-badge {
  position: absolute; top: 4px; right: 4px; font-size: 9px; color: #fff; background: #e9832a;
  border-radius: 4px; padding: 1px 4px;
}
.seat-legend { display: flex; gap: 18px; font-size: 12px; color: var(--text-sub); margin-top: 12px; flex-wrap: wrap; }
.seat-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }

/* ================= 宿舍分配 ================= */
.dorm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.dorm-card {
  border: 1px solid #e3e9f4; border-radius: 12px; padding: 14px 16px 12px;
  background: #fff; box-shadow: 0 2px 8px rgba(31, 42, 68, 0.04);
}
.dorm-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.dorm-no { font-size: 17px; font-weight: 700; color: #22325a; }
.dorm-meta { font-size: 12px; color: var(--text-sub); margin-top: 3px; }
.dorm-beds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dorm-bed {
  border: 1px dashed #d8deec; background: #f8f9fd; border-radius: 8px;
  padding: 7px 9px; display: flex; gap: 7px; transition: all .15s;
  align-items: center;
}
.dorm-bed-avatar {
  flex-shrink: 0;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(23, 38, 74, .12);
  background: #d6e4fb;
  font-size: 12px;
  font-weight: 600;
  color: #2a63d8;
}
.dorm-bed-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dorm-bed.occupied { border-style: solid; border-color: #cfdcf7; background: #eef3ff; }
.dorm-bed.clickable { cursor: pointer; }
.dorm-bed.clickable:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(47, 91, 215, 0.14); }
.dorm-bed-no { font-size: 10.5px; color: #93a0b8; }
.dorm-bed-name { font-size: 13px; font-weight: 600; color: #22325a; line-height: 1.35; }
.dorm-bed:not(.occupied) .dorm-bed-name { color: #b6bfd2; font-weight: 500; }
.dorm-bed-sub { font-size: 10.5px; color: #93a0b8; }
.dorm-remark { margin-top: 10px; font-size: 12px; color: var(--text-sub); }

/* ================= 等级量化（点名字多选 + 点项目直接添加） ================= */
.pick-section { border-top: 1px dashed #e6ebf5; padding-top: 12px; margin-top: 12px; }
.pick-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.pick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pick-head .t { font-size: 14px; font-weight: 700; color: #22325a; }
.pick-head .s { font-size: 12px; color: var(--text-sub); }
.stu-pick-grid { display: flex; flex-wrap: wrap; gap: 8px; max-height: 280px; overflow-y: auto; padding: 2px; }
.stu-chip {
  border: 1px solid #e0e6f2; background: #f7f9fd; border-radius: 8px; padding: 7px 13px;
  font-size: 13.5px; color: #33415c; cursor: pointer; user-select: none; transition: all .15s;
}
.stu-chip:hover { border-color: #b9cdf3; background: #f0f5ff; }
.stu-chip.active {
  border-color: #2f5bd7; background: #2f5bd7; color: #fff;
  box-shadow: 0 4px 10px rgba(47, 91, 215, 0.24);
}
.pick-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pick-item-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-item {
  border: 1px solid #e0e6f2; background: #fff; border-radius: 8px; padding: 9px 15px;
  font-size: 13.5px; color: #33415c; cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: all .15s; user-select: none;
}
.pick-item:hover { border-color: #b9cdf3; background: #f0f5ff; transform: translateY(-1px); }
.pick-item.adding { opacity: .55; cursor: default; }
.pick-item .val { font-weight: 700; font-size: 12.5px; }
.pick-item.plus .val { color: #14a06f; }
.pick-item.minus .val { color: #d9534f; }
.pick-group { margin-bottom: 14px; }
.pick-group-title {
  font-size: 12.5px; font-weight: 700; color: #5a6b8c; margin: 0 0 7px 2px; letter-spacing: .5px;
}
.pick-group-title::before {
  content: ""; display: inline-block; width: 3px; height: 12px; background: #2f5bd7;
  border-radius: 2px; margin-right: 6px; vertical-align: -1px;
}

/* ================= 大屏（匿名公示） ================= */
.screen-page {
  min-height: 100vh; background: radial-gradient(circle at 20% 0%, #1b3164 0%, #0a1226 55%, #070d1c 100%);
  color: #fff; padding: 26px 34px 34px; display: flex; flex-direction: column; gap: 20px;
}
.screen-head { display: flex; align-items: center; justify-content: space-between; }
.screen-title { display: flex; flex-direction: column; gap: 6px; }
.screen-title h1 { margin: 0; font-size: 30px; letter-spacing: 4px; }
.screen-title .sub { color: #7f93bd; font-size: 13px; letter-spacing: 2px; }
.screen-clock { text-align: right; }
.screen-clock .time { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.screen-clock .date { color: #8fa3cd; font-size: 13px; margin-top: 4px; }
.screen-body { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; flex: 1; min-height: 0; }
.screen-card {
  background: rgba(255,255,255,0.045); border: 1px solid rgba(120, 152, 220, 0.18);
  border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; min-height: 0;
}
.screen-card h2 { margin: 0 0 14px; font-size: 17px; letter-spacing: 2px; color: #c9d6f5; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.screen-card h2 .count { font-size: 12px; color: #7f93bd; letter-spacing: 0; }
.screen-page .podium { background: rgba(255,255,255,0.1); border: 1px solid rgba(120,152,220,0.3); color: #c9d6f5; }
.screen-page .seat { background: rgba(63, 97, 176, 0.22); border-color: rgba(120, 152, 220, 0.35); }
.screen-page .seat .nm { color: #eaf0ff; font-size: 17px; }
.screen-page .seat .pos { color: #7f93bd; }
.screen-page .seat.empty { background: rgba(255,255,255,0.02); border-color: rgba(120,152,220,0.14); }
.screen-page .seat.empty .nm { color: #465579; }
.screen-page .seat-grid { gap: 12px; }
.screen-page .seat { min-height: 66px; }
.screen-leave-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.screen-leave-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(120,152,220,0.16);
  padding: 13px 16px; border-radius: 10px;
}
.screen-leave-item .who { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.screen-leave-item .range { color: #9fb2d8; font-size: 13px; text-align: right; line-height: 1.6; }
.screen-leave-item .type { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: rgba(233,131,42,0.2); color: #ffb267; margin-left: 8px; }
.screen-leave-item .type.shi { background: rgba(47,91,215,0.25); color: #8fb1ff; }
.screen-leave-item .span { font-size: 12px; padding: 2px 8px; border-radius: 20px; background: rgba(120,152,220,0.16); color: #c6d4f2; margin-left: 8px; }
.screen-leave-item .lvst { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: rgba(86,179,128,0.18); color: #7be0a6; margin-left: 8px; font-weight: 700; }
.screen-leave-item .lvst.out { background: rgba(232,89,89,0.22); color: #ff9b9b; }
.screen-leave-item.out { border-color: rgba(232,89,89,0.45); background: rgba(232,89,89,0.06); }
.screen-empty { color: #56668c; text-align: center; padding: 40px 0; font-size: 14px; }
.screen-footer { display: flex; justify-content: space-between; color: #5d6f99; font-size: 12px; letter-spacing: 1px; }

/* 大屏 · 每周宿舍扣分公示 */
.screen-dorm { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; min-height: 0; }
.dorm-week-card, .dorm-rec-card { max-height: 300px; }
.dorm-week-list, .dorm-rec-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; min-height: 0; }
.dorm-week-item, .dorm-rec-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(120,152,220,0.16);
  padding: 11px 16px; border-radius: 10px;
}
.dorm-week-item .wl { font-size: 15px; font-weight: 700; letter-spacing: 1px; color: #c9d6f5; min-width: 110px; }
.dorm-week-item .wc { color: #7f93bd; font-size: 12.5px; }
.dorm-week-item .wa { font-size: 14px; font-weight: 700; color: #7ee2b0; }
.dorm-week-item .wa.bad { color: #ff9c8a; }
.dorm-week-item .wd { font-size: 13.5px; font-weight: 700; color: #8fb1ff; min-width: 86px; text-align: right; }
.dorm-week-item .wd.hot { color: #ffb267; }
.dorm-rec-item .dr { font-size: 15px; font-weight: 700; color: #c9d6f5; min-width: 90px; }
.dorm-rec-item .ds { font-size: 14px; font-weight: 700; color: #7ee2b0; min-width: 74px; }
.dorm-rec-item .ds.bad { color: #ff9c8a; }
.dorm-rec-item .di { flex: 1; color: #9fb2d8; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.dorm-rec-item .dd { color: #5d6f99; font-size: 12.5px; min-width: 52px; text-align: right; }
.screen-dorm .screen-empty { padding: 24px 0; }

/* 大屏 · 量化加减分公示 */
.screen-points { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; min-height: 0; }
.point-week-card, .point-today-card { max-height: 300px; }
.point-week-list, .point-today-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; min-height: 0; }
.point-week-item, .point-today-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(120,152,220,0.16);
  padding: 10px 16px; border-radius: 10px;
}
.point-week-item .pr { width: 22px; font-size: 13px; font-weight: 700; color: #7f93bd; text-align: center; }
.point-week-item .pr.top { color: #ffcf6b; }
.point-week-item .pn { flex: 1; font-size: 15px; font-weight: 700; letter-spacing: 1px; color: #eaf0ff; }
.point-week-item .pp { font-size: 13px; color: #7ee2b0; }
.point-week-item .pm { font-size: 13px; color: #ff9c8a; }
.point-week-item .pt { min-width: 58px; text-align: right; font-size: 15px; font-weight: 700; }
.point-week-item .pt.good { color: #7ee2b0; }
.point-week-item .pt.bad { color: #ff9c8a; }
.point-today-item .tn { min-width: 74px; font-size: 15px; font-weight: 700; color: #c9d6f5; }
.point-today-item .tv { min-width: 44px; font-size: 14px; font-weight: 700; color: #ff9c8a; }
.point-today-item .tc { font-size: 12px; color: #8fb1ff; background: rgba(47,91,215,0.22); border-radius: 12px; padding: 2px 8px; }
.point-today-item .ti { flex: 1; font-size: 13px; color: #9fb2d8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.point-today-item .tt { font-size: 12.5px; color: #5d6f99; }
.screen-points .screen-empty { padding: 24px 0; }

@media (max-width: 1280px) {
  .screen-body { grid-template-columns: 1.4fr 1fr; }
  .screen-page .seat .nm { font-size: 15px; }
}

/* ================= 其他 ================= */
.notice-item { padding: 10px 2px; border-bottom: 1px dashed #eef1f7; }
.notice-item:last-child { border-bottom: none; }
.notice-item .t { font-size: 13.5px; }
.notice-item .d { font-size: 12px; color: #93a0b8; margin-top: 3px; }
.empty-block { padding: 30px; text-align: center; color: #a3aec4; font-size: 13px; }
.link-btn { color: var(--el-color-primary); cursor: pointer; }
.link-btn.danger { color: #d9534f; }
.img-thumb { width: 46px; height: 46px; border-radius: 6px; }
.upload-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-tip { font-size: 12px; color: #93a0b8; line-height: 1.6; margin-top: 4px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.quick-card {
  border: 1px solid #e7ecf7; border-radius: 12px; padding: 20px; cursor: pointer;
  transition: all .15s; background: #fff;
}
.quick-card:hover { border-color: var(--el-color-primary-light-5); box-shadow: 0 8px 20px rgba(47,91,215,.1); transform: translateY(-2px); }
.quick-card .qi { font-size: 24px; margin-bottom: 10px; }
.quick-card .qt { font-weight: 700; font-size: 15px; }
.quick-card .qd { font-size: 12px; color: var(--text-sub); margin-top: 6px; line-height: 1.6; }
.big-screen-hint { font-size: 12px; color: var(--text-sub); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.rank-badge {
  display: inline-flex; width: 26px; height: 26px; border-radius: 50%;
  align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
  background: #eef1f7; color: #6c7a96;
}
.rank-badge.rank-top { background: #fff3e6; color: #e9832a; }
@media (max-width: 1200px) {
  .app-sidebar { width: 190px; flex-basis: 190px; }
  .grid-2, .grid-3, .analysis-charts { grid-template-columns: 1fr; }
}

/* ================= 平板与手机适配 ================= */
@media (max-width: 992px) {
  .app-header { height: 56px; flex-basis: 56px; padding: 0 14px; }
  .header-date { display: none; }
  .app-content { padding: 14px 12px 32px; }
  .panel { padding: 14px; }
  .page-head h2 { font-size: 18px; }
  .grid-2, .grid-3 { gap: 12px; }
}

@media (max-width: 768px) {
  .app-shell { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  .app-main { height: auto; overflow: visible; min-height: calc(100vh - 50px); }
  .app-content { overflow: visible; height: auto; }

  /* 侧栏变顶部横向滚动菜单 */
  .app-sidebar { position: sticky; top: 0; z-index: 30; width: 100%; flex: 0 0 auto; }
  .app-logo { height: 50px; flex-direction: row; align-items: center; padding: 0 14px; }
  .app-logo .desc { display: none; }
  .app-menu { padding: 0 0 6px; flex: 0 0 auto; overflow: hidden; }
  .app-menu .el-menu { display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 6px 8px; -webkit-overflow-scrolling: touch; }
  .app-menu .el-menu-item { height: 36px; line-height: 36px; margin: 0 4px; white-space: nowrap; flex: 0 0 auto; padding: 0 14px; }
  .sidebar-footer { display: none; }

  .app-header { height: 52px; flex-basis: 52px; padding: 0 12px; }
  .header-title { font-size: 15px; }
  .user-meta { display: none; }

  .stat-grid { gap: 10px; margin-bottom: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .stat-card { padding: 14px; }
  .stat-card .value { font-size: 22px; }
  .panel { padding: 12px; border-radius: 10px; }
  .chart-box { height: 220px; }
  .quick-links { grid-template-columns: 1fr; }
  .table-toolbar { gap: 8px; }
  .screen-page { padding: 16px 14px 20px; gap: 14px; }
  .screen-body { grid-template-columns: 1fr; }
  .screen-dorm { grid-template-columns: 1fr; }
  .screen-points { grid-template-columns: 1fr; }
  .dorm-week-card, .dorm-rec-card { max-height: 220px; }
  .point-week-card, .point-today-card { max-height: 220px; }
  .screen-clock .time { font-size: 24px; }

  /* 登录页纵排 */
  .login-card { flex-direction: column; min-height: 0; }
  .login-brand { width: 100%; padding: 24px 22px; }
  .login-brand h1 { font-size: 22px; }
  .login-form { padding: 26px 22px; }
  .login-demo { display: none; }

  /* 弹窗自适应 */
  .el-dialog { width: 94% !important; max-width: 94vw !important; margin-top: 5vh !important; }
  /* 确认框保持默认 420px 宽度，仅在极窄屏限制最大宽度，避免被拉成整行 */
  .el-message-box { max-width: 92vw !important; }
  .el-form-item__label { font-size: 13px; }
  .dialog-footer { flex-wrap: wrap; }
}

/* ================= 全局自适应补充 ================= */
/* 固定宽度弹窗（760/560/720px）在窄屏不溢出 */
.el-dialog { max-width: calc(100vw - 24px) !important; }
/* 确认框保持 Element Plus 默认 420px 宽度，避免在宽屏被拉伸成整行 */
.el-overlay-message-box .el-message-box { width: 420px !important; max-width: 92vw !important; }
.el-table { width: 100%; }
.page-head .actions { max-width: 100%; }
.chart-box { max-width: 100%; }
.pre-wrap, .form-tip { word-break: break-word; }

/* 笔记本 / 平板横屏 */
@media (max-width: 1100px) {
  .app-sidebar { width: 180px; flex-basis: 180px; }
  .app-content { padding: 18px 16px 32px; }
  .app-header { padding: 0 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .stat-grid { gap: 12px; }
  .el-table .cell { padding-left: 8px; padding-right: 8px; }
}

/* 侧栏收起/展开按钮：桌面用于「仅图标」模式，手机用于下拉菜单 */
.nav-toggle {
  display: inline-flex; border: 0; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 18px;
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; line-height: 1;
  align-items: center; justify-content: center; flex: 0 0 auto;
  transition: background 0.18s ease;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.16); }

/* 桌面端：侧栏收起为 76px 图标栏（参照设计稿） */
@media (min-width: 769px) {
  .app-sidebar.rail { width: 76px; flex-basis: 76px; }
  .app-sidebar.rail .logo-text { display: none; }
  .app-sidebar.rail .app-logo { padding: 0; justify-content: center; }
  .app-sidebar.rail .app-menu .el-menu-item,
  .app-sidebar.rail .menu-group-head { justify-content: center; gap: 0; padding: 0; }
  .app-sidebar.rail .menu-label,
  .app-sidebar.rail .menu-group-label,
  .app-sidebar.rail .menu-group-count,
  .app-sidebar.rail .menu-caret { display: none; }
  .app-sidebar.rail .menu-group-body { display: none !important; }
  .app-sidebar.rail .menu-group-head { position: relative; }
  .app-sidebar.rail .menu-group-head.has-active { background: #3e57c9; color: #fff; }
  .app-sidebar.rail .menu-group-head.has-active::after {
    content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 3px; background: #3fe0f2;
  }
  .app-sidebar.rail .menu-badge {
    position: absolute; top: 9px; right: 14px;
    min-width: 8px; height: 8px; padding: 0; border-radius: 50%;
    font-size: 0; line-height: 0;
  }
  .app-sidebar.rail .sidebar-footer { display: none; }
}

/* 手机 / 平板竖屏加固（≤768px） */
@media (max-width: 768px) {
  html, body, #app { max-width: 100%; overflow-x: hidden; }
  .app-shell, .app-main, .app-content { overflow-x: hidden; max-width: 100vw; }
  .app-sidebar {
    width: 100%; flex: 0 0 auto; max-width: 100vw; z-index: 60;
    position: sticky; top: 0;
  }
  .app-main { width: 100%; }
  .app-menu .el-menu { width: 100%; }

  /* 移动端导航：汉堡按钮 + 下拉面板 */
  .app-logo { flex-direction: row; align-items: center; justify-content: space-between; height: 52px; padding: 0 14px; }
  .nav-toggle { display: inline-flex; }
  .app-menu {
    display: none; position: absolute; left: 0; right: 0; top: 52px; z-index: 60;
    background: #16203a; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
    max-height: 72vh; overflow-y: auto; padding: 6px 8px 10px; -webkit-overflow-scrolling: touch;
  }
  .app-menu.open { display: block; }
  .app-menu .el-menu { display: block; overflow: visible; padding: 0; }
  .app-menu .el-menu-item {
    width: 100%; height: 42px; line-height: 42px; margin: 0 0 2px;
    border-radius: 8px; padding: 0 14px; white-space: nowrap;
  }
  /* 移动端下拉面板：分组标题与栏目保持可点击展开/收起 */
  .menu-group { margin: 6px 0 8px; }
  .menu-group-head { min-height: 44px; padding: 10px 14px; font-size: 15.5px; }
  .menu-group-body { margin-left: 4px; padding: 6px 0 2px; }
  .app-menu .menu-group-body .el-menu-item {
    height: 44px; line-height: 44px; margin: 0 0 2px 6px; padding-left: 18px; font-size: 15px;
  }
  .app-content { width: 100%; }

  .app-header { padding: 0 12px; gap: 8px; }
  .app-header .header-left { min-width: 0; flex: 1; }
  .header-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-right { gap: 10px; flex-shrink: 0; }

  .page-head { margin-bottom: 14px; }
  .page-head .actions { width: 100%; }
  .page-head .actions > .el-button { margin-left: 0; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 12px; }
  .stat-card .value { font-size: 22px; }

  /* 筛选控件占满整行，避免撑出横向滚动 */
  .table-toolbar { gap: 8px; }
  .table-toolbar > .el-input,
  .table-toolbar > .el-select,
  .table-toolbar > .el-date-editor { width: 100% !important; }
  .table-toolbar > .el-radio-group { width: 100%; display: flex; }
  .table-toolbar > .el-radio-group .el-radio-button { flex: 1 1 0; }
  .table-toolbar > .el-radio-group .el-radio-button__inner { width: 100%; padding: 8px 4px; }
  .table-toolbar .spacer { display: none; }

  /* 表格：压缩内边距，操作按钮不换行 */
  .el-table { font-size: 12px; }
  .el-table .cell { padding: 0 6px; line-height: 1.45; }
  .el-table .el-button.is-link { margin-left: 0; padding: 0 4px; }
  /* 宽表格在窄屏下横向滑动，避免列被挤压变形 */
  .table-scroll .el-table { min-width: 760px; }

  /* 弹窗：全宽 + 标签上置，彻底避免溢出与错位 */
  .el-dialog { width: 94vw !important; max-width: 94vw !important; margin: 4vh auto !important; }
  .el-dialog__header { padding: 14px 16px 8px; }
  .el-dialog__body { padding: 10px 14px !important; overflow-x: hidden; }
  .el-dialog__footer { padding: 10px 16px 14px; }
  .el-dialog__body .el-input,
  .el-dialog__body .el-input-number,
  .el-dialog__body .el-select,
  .el-dialog__body .el-date-editor,
  .el-dialog__body .el-textarea { width: 100% !important; }
  .el-dialog__body .el-form-item { display: block; margin-bottom: 14px; }
  .el-dialog__body .el-form-item__label {
    width: auto !important; text-align: left; display: block; padding: 0 0 4px; line-height: 1.4;
  }
  .el-message-box { width: 90vw !important; max-width: 90vw !important; }

  .dorm-grid { grid-template-columns: 1fr; }
  .quick-links { grid-template-columns: 1fr; }
  .chart-box { height: 200px; }
  .pick-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* 手机竖屏 */
@media (max-width: 480px) {
  .app-content { padding: 12px 10px 26px; }
  .page-head { gap: 10px; margin-bottom: 12px; }
  .page-head h2 { font-size: 17px; }
  .page-head .actions { width: 100%; gap: 8px; }
  .page-head .actions > .el-button { margin-left: 0; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 12px; }
  .stat-card .label { font-size: 12px; }
  .stat-card .value { font-size: 20px; margin-top: 6px; }
  .stat-card .sub { font-size: 11px; }
  .stat-card .icon { width: 30px; height: 30px; font-size: 13px; }

  .table-toolbar { gap: 8px; }
  .table-toolbar .el-select, .table-toolbar .el-input { width: 100% !important; }
  .table-toolbar .spacer { display: none; }

  .panel-head { flex-wrap: wrap; gap: 6px; }
  .panel-head .s { font-size: 11.5px; }
  .chart-box { height: 200px; }

  .dorm-grid { grid-template-columns: 1fr; }
  .dorm-beds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seat-grid { grid-template-columns: repeat(var(--cols), minmax(64px, 1fr)); }
  .seat .nm { font-size: 12px; }

  .el-table .cell { padding-left: 6px; padding-right: 6px; font-size: 12.5px; }
  .el-dialog { width: 96vw !important; max-width: 96vw !important; margin-top: 3vh !important; }
  .el-form-item__label { width: 82px !important; }

  .pick-item-grid .pick-item, .stu-chip { font-size: 13px; padding: 6px 11px; }
  .stu-pick-grid { max-height: 210px; }

  .screen-page { padding: 12px 10px 16px; }
  .screen-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .screen-clock { text-align: left; }
  .screen-clock .date { margin-top: 2px; }
  .screen-title h1 { font-size: 20px; letter-spacing: 2px; }
  .screen-title .sub { font-size: 11.5px; }
  .screen-clock .time { font-size: 22px; }
  .screen-page .seat .nm { font-size: 13px; }

  .login-form { padding: 20px 16px; }
  .login-card { border-radius: 10px; }
}

/* ===== 请假时长快捷按钮：两列网格，避免末尾按钮换行错位 ===== */
.leave-duration-group {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.leave-duration-group .el-radio-button { width: 100%; }
.leave-duration-group .el-radio-button__inner {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .leave-duration-group { grid-template-columns: 1fr; }
}

/* ===== 栏目配置：账号维度排序/分组 ===== */
.menu-config-hint { line-height: 1.9; font-size: 12.5px; color: #5a6474; }
.menu-config-tip { font-size: 12.5px; color: #5a6474; line-height: 1.7; margin-bottom: 10px; }
.menu-drag-list { display: flex; flex-direction: column; gap: 8px; }
.menu-drag-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid #e4e7ed; border-radius: 8px; background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: grab;
}
.menu-drag-row:hover { border-color: #b9cdf7; box-shadow: 0 2px 8px rgba(43, 91, 215, 0.08); }
.menu-drag-row.dragging { opacity: 0.5; }
.menu-drag-handle { color: #a8b0bd; font-size: 14px; letter-spacing: -2px; user-select: none; }
.menu-drag-index {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px;
  background: #ecf3ff; color: #2b5bd7; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.menu-drag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-drag-title { font-size: 13.5px; color: #303133; }
.menu-drag-sub { font-size: 12px; color: #909399; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-drag-spacer { flex: 1; }
@media (max-width: 768px) {
  .menu-drag-row { flex-wrap: wrap; }
  .menu-drag-spacer { display: none; }
}

/* ===== 家长中心孩子信息：卡片式展示 ===== */
.profile-info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 2px;
}
.profile-info-grid .stat-card {
  border: 1px solid #eef1f6;
  box-shadow: 0 2px 10px rgba(31, 56, 102, .05);
  padding: 16px 18px;
}
.profile-info-grid .stat-card .value.info-value {
  font-size: 21px;
  line-height: 1.35;
  word-break: break-all;
}
.profile-info-grid .stat-card .value.name-value { font-size: 24px; }
@media (max-width: 1100px) {
  .profile-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .profile-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-info-grid .stat-card .value.info-value { font-size: 19px; }
}
@media (max-width: 480px) {
  .profile-info-grid { grid-template-columns: 1fr; }
}
.parent-contact-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}
.parent-contact-actions .muted { color: #909399; }

/* ===== 家长咨询：实时即时对话窗口 ===== */
.chat-shell { display: flex; height: calc(100vh - 210px); min-height: 460px; background: #fff;
  border-radius: 12px; box-shadow: 0 2px 12px rgba(0, 0, 0, .06); overflow: hidden; }
.chat-side { width: 280px; flex: 0 0 280px; display: flex; flex-direction: column;
  border-right: 1px solid #f0f2f5; background: #fbfbfc; }
.chat-side-head { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; font-size: 14px; font-weight: 600; color: #303133; border-bottom: 1px solid #f0f2f5; }
.chat-side-sub { font-size: 12px; font-weight: 400; color: #909399; }
.chat-thread-list { flex: 1; overflow-y: auto; }
.chat-thread { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  cursor: pointer; border-bottom: 1px solid #f5f7fa; transition: background .15s; }
.chat-thread:hover { background: #f5f8ff; }
.chat-thread.active { background: #eef4ff; }
.chat-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #d9e7ff; color: #3a7afe; font-size: 14px; font-weight: 600; }
.chat-avatar-img { flex: 0 0 38px; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(23, 38, 74, .10); background: #d9e7ff; color: #3a7afe; font-size: 14px; font-weight: 600; }
.chat-thread-info { flex: 1; min-width: 0; }
.chat-thread-top { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; font-size: 13.5px; color: #303133; }
.chat-thread-top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-time { flex: 0 0 auto; font-size: 11.5px; color: #a8abb2; }
.chat-thread-preview { margin-top: 3px; font-size: 12.5px; color: #7a7e83;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-me-tag { color: #909399; }
.chat-thread-dorm { margin-top: 2px; font-size: 11.5px; color: #a8abb2; }
.chat-unread { flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #f56c6c; color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center; }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column;
  position: relative; background: #fff; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid #f0f2f5; }
.chat-head-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.chat-head-info b { font-size: 15px; color: #303133; }
.chat-head-info span { font-size: 12px; color: #909399; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; background: #f7f9fc; }
.chat-load-more { margin-bottom: 8px; text-align: center; }
.chat-empty { padding: 40px 0; text-align: center; font-size: 13px; color: #a8abb2; }
.chat-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.chat-row.me { flex-direction: row-reverse; }
.chat-row .chat-avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 12px;
  background: #e8f3e8; color: #529b52; }
.chat-row.me .chat-avatar { background: #dcecff; color: #3a7afe; }
.chat-bubble-wrap { display: flex; flex-direction: column; max-width: 72%; }
.chat-row.me .chat-bubble-wrap { align-items: flex-end; }
.chat-bubble { padding: 9px 12px; border: 1px solid #ebeef5; border-radius: 10px;
  background: #fff; color: #303133; font-size: 13.5px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 3px rgba(0, 0, 0, .03); }
.chat-row.me .chat-bubble { background: #eaf3ff; border-color: #d3e4ff; color: #1f4fbf; }
.chat-meta { margin-top: 4px; font-size: 11px; color: #a8abb2; }
.chat-state { margin-left: 6px; color: #909399; }
.chat-state.err { color: #f56c6c; }
.chat-back { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%);
  z-index: 2; padding: 6px 14px; border-radius: 14px; background: rgba(48, 49, 51, .82);
  color: #fff; font-size: 12px; cursor: pointer; }
.chat-input { padding: 10px 14px 12px; border-top: 1px solid #f0f2f5; background: #fff; }
.chat-input .el-textarea__inner { padding: 8px 10px; border-radius: 8px;
  box-shadow: none; font-size: 13.5px; }
.chat-input-bar { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.chat-input-hint { font-size: 11.5px; color: #a8abb2; }
.chat-input-btns { display: flex; gap: 8px; }
.chat-placeholder { align-items: center; justify-content: center; background: #f7f9fc; }
.chat-placeholder-box { text-align: center; font-size: 13px; color: #a8abb2; }

@media (max-width: 1100px) {
  .chat-side { width: 240px; flex-basis: 240px; }
}
@media (max-width: 900px) {
  .chat-shell { height: calc(100vh - 180px); min-height: 420px; }
  .chat-side { width: 100%; flex: 1 1 auto; border-right: none; }
  .chat-main { width: 100%; }
  .chat-bubble-wrap { max-width: 82%; }
}
@media (max-width: 480px) {
  .chat-shell { height: calc(100vh - 168px); border-radius: 8px; }
  .chat-head { padding: 10px; }
  .chat-body { padding: 12px 10px; }
  .chat-input { padding: 8px 10px 10px; }
  .chat-bubble { padding: 8px 10px; font-size: 13px; }
  .chat-input-hint { display: none; }
  .chat-input-btns { margin-left: auto; }
}

/* ===== 家长端：与生活老师实时沟通（单会话，无侧栏） ===== */
.chat-shell.single { height: 420px; min-height: 320px; }
.chat-shell.single .chat-body { border-radius: 0; }
@media (max-width: 900px) {
  .chat-shell.single { height: 380px; min-height: 300px; }
}
@media (max-width: 480px) {
  .chat-shell.single { height: 340px; min-height: 280px; }
}

/* ===== 家长端：与生活老师沟通（左侧菜单独立页面） ===== */
.chat-shell.single.standalone { height: calc(100vh - 232px); min-height: 440px; }
@media (max-width: 900px) {
  .chat-shell.single.standalone { height: calc(100vh - 200px); min-height: 400px; }
}
@media (max-width: 480px) {
  .chat-shell.single.standalone { height: calc(100vh - 188px); min-height: 360px; }
}

/* ===== 离线状态提示条 ===== */
.app-offline-tip {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fdf6ec;
  border: 1px solid #faecd8;
  color: #b88230;
  font-size: 13px;
  line-height: 1.5;
}

/* ===== 学生成绩：批量录入学生分数网格 ===== */
.batch-score-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; max-height: 340px; overflow-y: auto; padding: 10px 12px;
  border: 1px solid #e7ecf7; border-radius: 10px; background: #fafbfe;
}
.batch-score-item { display: flex; align-items: center; gap: 8px; }
.batch-score-item .nm {
  width: 64px; flex: 0 0 auto; font-size: 13px; font-weight: 600; color: #22325a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 768px) {
  .batch-score-grid { grid-template-columns: repeat(2, 1fr); max-height: 300px; }
}
@media (max-width: 480px) {
  .batch-score-grid { grid-template-columns: 1fr; }
  .batch-score-item .nm { width: 56px; }
}


/* 一键考勤：学生卡片选择区 */
.stu-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1280px) {
  .stu-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
  .stu-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .stu-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .stu-card-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}
.stu-card {
  text-align: left;
  font-family: inherit;
  background: linear-gradient(160deg, #eaf2fe 0%, #eaf2fe 100%);
  border: 1px solid #e6ebf5;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  outline: none;
  will-change: transform;
  transition: border-color .18s, box-shadow .18s, transform .12s, background .18s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stu-card-avatar {
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(23, 38, 74, .12);
  background: #d6e4fb;
  font-size: 16px;
  font-weight: 600;
  color: #2a63d8;
}
.stu-card-body {
  flex: 1;
  min-width: 0;
}
.stu-card:hover {
  border-color: #b9cdf3;
  background: linear-gradient(160deg, #ffffff 0%, #dfebfd 100%);
  box-shadow: 0 8px 18px rgba(23, 38, 74, .10);
  transform: translateY(-2px);
}
.stu-card:active {
  transform: translateY(0) scale(.97);
  box-shadow: 0 2px 6px rgba(23, 38, 74, .10);
}
.stu-card:focus-visible {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .18);
}
.stu-card.is-selected {
  border-color: #2a63d8;
  background: linear-gradient(135deg, #3d7bf7 0%, #2a63d8 100%);
  box-shadow: 0 8px 20px rgba(42, 99, 216, .30);
  animation: stuPop .24s ease-out;
}
.stu-card.is-selected .stu-card-name { color: #fff; }
.stu-card.is-selected .stu-card-label { color: rgba(255, 255, 255, .72); }
.stu-card.is-selected .stu-card-no { color: #fff; }
.stu-card.is-selected .stu-card-badge {
  background: rgba(255, 255, 255, .24);
  color: #fff;
}
.stu-card.is-selected .stu-card-avatar {
  background: rgba(255, 255, 255, .28);
  border-color: rgba(255, 255, 255, .6);
  color: #fff;
}
@keyframes stuPop {
  0% { transform: scale(.98); }
  60% { transform: scale(1.015); }
  100% { transform: scale(1); }
}
.stu-card.is-selected:hover {
  border-color: #2a63d8;
  box-shadow: 0 12px 26px rgba(42, 99, 216, .34);
  transform: translateY(-2px);
}
.stu-card.is-leave {
  background: #fafbfd;
  opacity: .75;
  cursor: not-allowed;
}
.stu-card.is-leave:hover {
  transform: none;
  box-shadow: none;
  border-color: #e6ebf5;
}
.stu-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.stu-card-name {
  font-size: 18px;
  font-weight: 700;
  color: #1f2b45;
  line-height: 1.3;
  word-break: break-all;
}
.stu-card-badge {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f9;
  color: #75839d;
  white-space: nowrap;
}
.stu-card-badge.is-on {
  background: #e7f0ff;
  color: #2f6fed;
}
.stu-card-badge.is-leave {
  background: #fdecec;
  color: #f56c6c;
}
.stu-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: #75839d;
}
.stu-card-no {
  font-size: 16px;
  color: #1f2b45;
  font-variant-numeric: tabular-nums;
}

/* ===== 学生成绩：考试卡片列表 ===== */
.exam-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.exam-search { width: 280px; max-width: 100%; }
.exam-chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.exam-chip {
  font-size: 12.5px; color: #6c7a96; background: #f5f7fa;
  border-radius: 999px; padding: 5px 12px; line-height: 1.2;
}
.exam-chip b { margin-left: 2px; color: #22325a; font-size: 13.5px; }
.exam-chip.done { background: #e8f8f1; color: #14a06f; }
.exam-chip.done b { color: #14a06f; }
.exam-chip.doing { background: #fff3e6; color: #e9832a; }
.exam-chip.doing b { color: #e9832a; }
.exam-chip.idle b { color: #75839d; }

.exam-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px;
}
.exam-card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(160deg, #eaf2fe 0%, #eaf2fe 100%);
  border: 1px solid #e6ebf5; border-radius: 14px; padding: 16px 18px;
  cursor: pointer; outline: none; will-change: transform;
  transition: border-color .18s, box-shadow .18s, transform .12s, background .18s;
}
.exam-card:hover {
  border-color: #b9cdf3;
  background: linear-gradient(160deg, #ffffff 0%, #dfebfd 100%);
  box-shadow: 0 8px 18px rgba(23, 38, 74, .10);
  transform: translateY(-2px);
}
.exam-card:active {
  transform: translateY(0) scale(.985);
  box-shadow: 0 2px 6px rgba(23, 38, 74, .10);
}
.exam-card:focus-visible {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .18);
}
.exam-card.is-completed { border-color: #cdeadd; }
.exam-card.is-in_progress { border-color: #f6dfc2; }
.exam-card.is-not_started { border-color: #e6ebf5; }

.exam-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.exam-type {
  display: inline-block; max-width: calc(100% - 84px); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: #2f5bd7;
  background: #e4edfd; border-radius: 6px; padding: 3px 8px;
}
.exam-status { flex: 0 0 auto; font-size: 12px; font-weight: 700; line-height: 1; border-radius: 999px; padding: 4px 10px; }
.exam-status.is-not_started { background: #eef2f9; color: #75839d; }
.exam-status.is-in_progress { background: #fff1e0; color: #e9832a; }
.exam-status.is-completed { background: #ddf5ea; color: #14a06f; }

.exam-name {
  font-size: 17px; font-weight: 700; color: #1f2b45; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.exam-date { margin-top: 6px; font-size: 12.5px; color: #75839d; font-variant-numeric: tabular-nums; }
.exam-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 12px; }
.exam-metric {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 10px; background: rgba(255, 255, 255, .82);
}
.exam-metric .num { font-size: 20px; font-weight: 800; color: #22325a; line-height: 1.1; font-variant-numeric: tabular-nums; }
.exam-metric .lbl { font-size: 11.5px; color: #8b98ad; }
.exam-metric.ok .num { color: #14a06f; }
.exam-metric.warn .num { color: #e9832a; }
.exam-progress { display: flex; align-items: center; gap: 8px; }
.exam-progress .bar { flex: 1; height: 6px; border-radius: 3px; background: #dfe8f6; overflow: hidden; }
.exam-progress .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #5b8bf5, #2a63d8); transition: width .3s ease; }
.exam-progress .pct { min-width: 34px; text-align: right; font-size: 11.5px; color: #75839d; font-variant-numeric: tabular-nums; }
.exam-card-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(120, 140, 175, .26);
}
.exam-sub { font-size: 11.5px; color: #8b98ad; }
.exam-go { font-size: 12.5px; font-weight: 600; color: #2f5bd7; white-space: nowrap; }
.exam-card.is-not_started .exam-progress .bar i { background: #c3ccdd; }
.exam-card.is-in_progress .exam-go { color: #e9832a; }
.exam-card.is-completed .exam-go { color: #14a06f; }

/* 骨架屏 */
.exam-card.is-skeleton { background: #f7f9fd; border-color: #eef1f7; cursor: default; }
.exam-card.is-skeleton:hover { transform: none; box-shadow: none; border-color: #eef1f7; }
.sk-row { display: flex; justify-content: space-between; gap: 10px; }
.sk {
  display: block; border-radius: 6px;
  background: linear-gradient(90deg, #eef1f7 25%, #f6f8fc 37%, #eef1f7 63%);
  background-size: 400% 100%; animation: skShine 1.2s ease infinite;
}
.sk-tag { width: 64px; height: 20px; }
.sk-badge { width: 56px; height: 20px; border-radius: 10px; }
.sk-title { width: 78%; height: 18px; margin: 14px 0 10px; border-radius: 8px; }
.sk-date { width: 42%; height: 13px; }
.sk-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 12px; }
.sk-num { height: 46px; border-radius: 10px; }
.sk-bar { width: 100%; height: 6px; border-radius: 3px; }
.sk-ft { width: 44%; height: 12px; margin-top: 14px; }
.sk-ft2 { width: 24%; height: 12px; margin-top: 14px; }
@keyframes skShine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ===== 学生成绩：单场考试管理 ===== */
.exam-detail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.exam-detail-top .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.exam-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 14px; margin-bottom: 16px;
  background: linear-gradient(135deg, #2f5bd7 0%, #22408a 100%);
  color: #fff; box-shadow: 0 10px 24px rgba(35, 72, 171, .22);
}
.exam-hero .hero-title { font-size: 21px; font-weight: 800; letter-spacing: .5px; word-break: break-word; }
.exam-hero .hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .82); }
.exam-hero .exam-type { background: rgba(255, 255, 255, .16); color: #fff; max-width: none; }
.exam-hero .hero-stats { display: grid; grid-template-columns: repeat(4, minmax(76px, 1fr)); gap: 10px; }
.exam-hero .hero-stat { min-width: 76px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .13); text-align: center; }
.exam-hero .hero-stat .num { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.exam-hero .hero-stat .lbl { font-size: 11.5px; color: rgba(255, 255, 255, .75); }
.exam-hero .hero-stat.ok .num { color: #8ff0c7; }
.exam-hero .hero-stat.warn .num { color: #ffd291; }
.exam-hero .hero-stat.purple .num { color: #e3d1ff; }
.exam-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

/* ===== 学生成绩：按学生分组的成绩明细卡片 ===== */
.score-detail-head { flex-wrap: wrap; gap: 10px; }
.score-detail-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.score-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.score-card {
  background: linear-gradient(160deg, #eaf2fe 0%, #eaf2fe 100%);
  border: 1px solid #e6ebf5; border-radius: 14px; padding: 14px 16px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.score-card:hover {
  border-color: #b9cdf3;
  background: linear-gradient(160deg, #ffffff 0%, #dfebfd 100%);
  box-shadow: 0 8px 18px rgba(23, 38, 74, .10);
}
.score-card.is-expanded {
  grid-column: 1 / -1;
  border-color: #b9cdf3;
  background: linear-gradient(160deg, #ffffff 0%, #eef4fe 100%);
  box-shadow: 0 8px 18px rgba(23, 38, 74, .08);
}
.score-card-hd { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.score-avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background: #dbe7fc; color: #2f5bd7;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.score-avatar-img {
  flex: 0 0 36px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(23, 38, 74, .12);
  background: #dbe7fc;
  color: #2f5bd7;
  font-weight: 700;
  font-size: 14px;
}
.mini-avatar-img {
  flex: 0 0 28px;
  margin-right: 8px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(23, 38, 74, .10);
  background: #eef3ff;
  color: #2f5bd7;
  font-size: 12px;
  font-weight: 600;
}
.score-id { min-width: 0; }
.score-name { font-size: 16px; font-weight: 700; color: #1f2b45; line-height: 1.3; }
.score-no { font-size: 12px; color: #8b98ad; font-variant-numeric: tabular-nums; }
.score-rate {
  margin-left: auto; flex: 0 0 auto; padding: 5px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 800; line-height: 1;
  background: #eef3ff; color: #2f5bd7;
}
.score-rate.text-success { background: #e2f7ee; }
.score-rate.text-danger { background: #fdecec; }
.score-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 10px; }
.score-metric {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 4px; border-radius: 10px; background: rgba(255, 255, 255, .85);
}
.score-metric .num { font-size: 18px; font-weight: 800; color: #22325a; line-height: 1.15; font-variant-numeric: tabular-nums; }
.score-metric .lbl { font-size: 11.5px; color: #8b98ad; }
.score-card-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 9px; border-top: 1px dashed rgba(120, 140, 175, .26);
}
.score-sub { font-size: 11.5px; color: #8b98ad; }
.score-expand {
  border: none; background: none; padding: 0; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; color: #2f5bd7;
}
.score-expand:hover { color: #1c479f; }
.score-expand .arrow { display: inline-block; font-size: 13px; transition: transform .18s ease; }
.score-expand .arrow.open { transform: rotate(180deg); }
.score-subject-list { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(120, 140, 175, .22); }
.score-subject-hd, .score-subject-row {
  display: grid; grid-template-columns: minmax(90px, 1fr) 120px 86px 112px;
  align-items: center; gap: 8px;
}
.score-subject-hd { padding: 0 4px 6px; font-size: 11.5px; color: #8b98ad; }
.score-subject-row {
  padding: 7px 4px; margin-bottom: 6px; border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}
.score-subject-row:hover { background: #fff; }
.score-subject-row .sub-name { font-size: 13px; font-weight: 600; color: #22325a; }
.score-subject-row .sub-score { font-size: 13px; color: #4a5a78; font-variant-numeric: tabular-nums; }
.score-subject-row .sub-rate { font-size: 12.5px; font-weight: 700; }
.score-subject-row .sub-ops { text-align: right; }
.score-card.is-skeleton { background: #f7f9fd; border-color: #eef1f7; }
.score-card.is-skeleton:hover { background: #f7f9fd; border-color: #eef1f7; box-shadow: none; }
.sk-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; }
.sk-line { width: 45%; height: 15px; margin-left: 10px; }

@media (max-width: 1200px) {
  .score-cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
}
@media (max-width: 900px) {
  .score-cards { grid-template-columns: 1fr; }
  .score-subject-hd, .score-subject-row { grid-template-columns: minmax(80px, 1fr) 110px 78px 104px; }
}
@media (max-width: 768px) {
  .score-detail-tools { width: 100%; }
  .score-detail-tools .el-input { flex: 1 1 100%; }
}
@media (max-width: 1200px) {
  .exam-grid { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
}
@media (max-width: 992px) {
  .exam-grid { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); }
  .exam-hero .hero-title { font-size: 18px; }
}
@media (max-width: 768px) {
  .exam-grid { grid-template-columns: 1fr; }
  .exam-toolbar { flex-direction: column; align-items: stretch; }
  .exam-search { width: 100%; }
  .exam-hero { padding: 16px; }
  .exam-hero .hero-stats { grid-template-columns: repeat(2, 1fr); width: 100%; }
  .exam-card .exam-name { font-size: 16px; }
}

/* ===== 成绩分析：学生姓名卡片 ===== */
.analysis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.analysis-card {
  position: relative; padding: 14px 16px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(160deg, #eaf2fe 0%, #eaf2fe 100%);
  border: 1px solid #e6ebf5;
  transition: border-color .18s, box-shadow .18s, background .18s, transform .12s;
  content-visibility: auto; contain-intrinsic-size: 190px;
}
.analysis-card:hover {
  border-color: #b9cdf3;
  background: linear-gradient(160deg, #ffffff 0%, #dfebfd 100%);
  box-shadow: 0 8px 18px rgba(23, 38, 74, .10);
  transform: translateY(-2px);
}
.analysis-card:active { transform: translateY(0) scale(.985); }
.analysis-card.is-marked { border-color: #f0c36d; }
.analysis-card.is-active {
  border-color: #3d7bf7;
  background: linear-gradient(160deg, #3d7bf7 0%, #2a63d8 100%);
  box-shadow: 0 10px 22px rgba(47, 91, 215, .30);
}
.analysis-card-hd { display: flex; align-items: center; gap: 10px; }
.ana-avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background: #dbe7fc; color: #2f5bd7;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.ana-id { min-width: 0; }
.ana-name { font-size: 16px; font-weight: 700; color: #1f2b45; line-height: 1.3; }
.ana-no { font-size: 12px; color: #8b98ad; font-variant-numeric: tabular-nums; }
.ana-ops { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ana-star {
  border: none; background: none; padding: 0; cursor: pointer;
  font-size: 17px; line-height: 1; color: #b6c2d8;
}
.ana-star:hover { color: #f0a020; }
.ana-star.on { color: #f0a020; }
.ana-metrics { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 8px; margin: 12px 0 10px; }
.ana-metric {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 4px; border-radius: 10px; background: rgba(255, 255, 255, .85);
}
.ana-metric .num { font-size: 17px; font-weight: 800; color: #22325a; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ana-metric.main .num { color: #2f5bd7; }
.ana-metric .lbl { font-size: 11px; color: #8b98ad; }
.ana-trend { display: flex; align-items: center; gap: 5px; min-height: 26px; }
.ana-trend .k { margin-right: 3px; font-size: 11.5px; color: #8b98ad; }
.trend-dot {
  width: 9px; border-radius: 3px; background: linear-gradient(180deg, #8db0f7, #3d7bf7);
  align-self: flex-end;
}
.trend-delta { margin-left: 4px; font-size: 12px; font-weight: 700; }
.trend-delta.up { color: #14a06f; }
.trend-delta.down { color: #d9534f; }
.ana-subjects { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ana-subj { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .85); }
.ana-subj.best { color: #14a06f; }
.ana-subj.worst { color: #e9832a; }
.ana-card-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding-top: 9px; border-top: 1px dashed rgba(120, 140, 175, .26);
}
.ana-exam { min-width: 0; font-size: 11.5px; color: #8b98ad; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ana-go { font-size: 12.5px; font-weight: 600; color: #2f5bd7; white-space: nowrap; }
/* 选中态配色 */
.analysis-card.is-active .ana-name,
.analysis-card.is-active .ana-go { color: #fff; }
.analysis-card.is-active .ana-no { color: rgba(255, 255, 255, .78); }
.analysis-card.is-active .ana-avatar { background: rgba(255, 255, 255, .22); color: #fff; }
.analysis-card.is-active .ana-metric { background: rgba(255, 255, 255, .16); }
.analysis-card.is-active .ana-metric .num,
.analysis-card.is-active .ana-metric.main .num { color: #fff; }
.analysis-card.is-active .ana-metric .lbl,
.analysis-card.is-active .ana-trend .k,
.analysis-card.is-active .ana-exam { color: rgba(255, 255, 255, .76); }
.analysis-card.is-active .ana-subj { background: rgba(255, 255, 255, .18); color: #fff; }
.analysis-card.is-active .trend-dot { background: linear-gradient(180deg, #fff, #cfe0ff); }
.analysis-card.is-active .ana-star { color: rgba(255, 255, 255, .55); }
.analysis-card.is-active .ana-star.on { color: #ffd75e; }
.analysis-card.is-active .ana-card-ft { border-top-color: rgba(255, 255, 255, .35); }
.analysis-card.is-skeleton { background: #f7f9fd; border-color: #eef1f7; cursor: default; }
.analysis-card.is-skeleton:hover { transform: none; box-shadow: none; background: #f7f9fd; border-color: #eef1f7; }
.compare-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px; border-radius: 10px;
  background: #eef3ff; border: 1px dashed #b9cdf3; color: #2f5bd7; font-size: 13px;
}
.compare-bar .actions { display: flex; gap: 8px; }
.analysis-student-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 14px; border-radius: 10px;
  background: #eef3ff; border: 1px solid #dbe4fb;
}
.ana-mark { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #e08a00; }

@media (max-width: 1200px) {
  .analysis-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
}
@media (max-width: 900px) {
  .analysis-grid { grid-template-columns: 1fr; }
  .analysis-card { content-visibility: visible; }
}

/* ================= 家长端：子女在校表现 ================= */
.pq-child { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pq-child-avatar {
  width: 54px; height: 54px; border-radius: 50%; flex: 0 0 auto;
  background: var(--el-color-primary-light-9); color: var(--el-color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800;
}
.pq-child-avatar-img {
  flex: 0 0 54px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(23, 38, 74, .14);
  background: var(--el-color-primary-light-9);
  color: var(--el-color-primary);
  font-size: 20px;
  font-weight: 800;
}
.pq-child-info { min-width: 120px; }
.pq-child-name { font-size: 18px; font-weight: 800; }
.pq-child-no { font-size: 12.5px; color: var(--text-sub); margin-top: 4px; }
.pq-kpis { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(96px, 1fr)); gap: 12px; }
.pq-kpi {
  background: #f6f8fe; border: 1px solid #e8edf9; border-radius: 10px;
  padding: 10px 12px; text-align: center;
}
.pq-kpi b { font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pq-kpi span { display: block; font-size: 11.5px; color: var(--text-sub); margin-top: 4px; }
.pq-kpi-sub { font-style: normal; font-size: 12px; color: #93a0b8; font-weight: 500; margin-left: 2px; }

.pq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pq-cat, .pq-vio {
  border: 1px solid #e3e9f4; border-radius: 12px; background: #fff;
  padding: 14px 16px; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  content-visibility: auto; contain-intrinsic-size: 120px;
}
@media (hover: hover) {
  .pq-cat:hover, .pq-vio:hover {
    transform: translateY(-2px); background: #fdfefe;
    border-color: #cfe0fb; box-shadow: 0 8px 20px rgba(47, 91, 215, .10);
  }
}
.pq-cat.open, .pq-vio.open { border-color: #b9cef7; box-shadow: 0 6px 18px rgba(47, 91, 215, .10); }
.pq-cat.is-skeleton, .pq-vio.is-skeleton {
  height: 118px; cursor: default;
  background: linear-gradient(90deg, #f3f5fa 25%, #eaedf5 37%, #f3f5fa 63%);
  background-size: 400% 100%; animation: pq-shimmer 1.3s ease infinite;
}
@keyframes pq-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.pq-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pq-cat-name { font-size: 15.5px; font-weight: 700; }
.pq-cat-score { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pq-cat-meta { font-size: 11.5px; color: #93a0b8; margin-top: 6px; }
.pq-changes { margin-top: 12px; border-top: 1px dashed #e3e9f4; padding-top: 10px; cursor: default; }
.pq-change { padding: 8px 0; border-bottom: 1px dashed #edf1f9; }
.pq-change:last-child { border-bottom: none; padding-bottom: 0; }
.pq-change-line1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pq-change-item { font-size: 13.5px; font-weight: 600; }
.pq-change-score { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pq-change-line2 { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: #8a97b0; margin-top: 3px; align-items: center; }
.pq-status { padding: 1px 7px; border-radius: 20px; font-size: 11px; }
.pq-status.ok { background: #e8f8f1; color: #14a06f; }
.pq-status.pending { background: #fff3e6; color: #e9832a; }
.pq-change-reason { font-size: 12.5px; color: #5a6884; margin-top: 4px; line-height: 1.55; }

.pq-vio-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pq-vio-type { font-size: 15.5px; font-weight: 700; }
.pq-vio-time { font-size: 11.5px; color: #93a0b8; margin-top: 4px; }
.pq-level { flex: 0 0 auto; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; background: #eef3ff; color: #2f5bd7; }
.pq-level.is-warn { background: #fff3e6; color: #e9832a; }
.pq-level.is-danger { background: #fdecec; color: #d9534f; }
.pq-vio-summary { font-size: 13px; color: #4a5a78; line-height: 1.6; margin-top: 9px; }
.pq-vio-more { font-size: 12px; color: #2f5bd7; font-weight: 600; margin-top: 8px; }
.pq-vio-detail { margin-top: 10px; border-top: 1px dashed #e3e9f4; padding-top: 8px; cursor: default; }
.pq-detail-row { display: flex; gap: 10px; padding: 5px 0; font-size: 12.5px; line-height: 1.6; border-bottom: 1px dashed #f0f3fa; }
.pq-detail-row:last-child { border-bottom: none; }
.pq-detail-row .k { flex: 0 0 64px; color: #8a97b0; }
.pq-detail-row .v { flex: 1; color: #2f3a52; word-break: break-word; }
.pq-detail-row .v a { color: #2f5bd7; }

@media (max-width: 900px) {
  .pq-kpis { grid-template-columns: repeat(2, 1fr); }
  .pq-grid { grid-template-columns: 1fr; }
}

/* ================= 侧边栏版本入口 / 版本说明页 ================= */
.sidebar-footer { display: flex; flex-direction: column; gap: 6px; }
.sidebar-footer span { display: block; }
.sidebar-version {
  display: block; color: rgba(255, 255, 255, 0.62); font-size: 11.5px; cursor: pointer;
  text-decoration: none; transition: color .16s ease;
}
.sidebar-version:hover { color: #fff; }

.ver-current {
  display: inline-block; padding: 5px 12px; border-radius: 20px; font-size: 12.5px;
  background: #eef3ff; color: #2f5bd7; font-weight: 600;
}
.ver-list { display: flex; flex-direction: column; gap: 14px; }
.ver-card {
  background: #fff; border-radius: 12px; box-shadow: var(--card-shadow);
  border-left: 4px solid #c9d6f5; padding: 16px 20px;
}
.ver-card.kind-major { border-left-color: #d9534f; }
.ver-card.kind-minor { border-left-color: #2f5bd7; }
.ver-card.kind-patch { border-left-color: #14a06f; }
.ver-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ver-card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ver-no { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
.ver-tag { padding: 1px 8px; border-radius: 20px; font-size: 11px; background: #eef3ff; color: #2f5bd7; }
.kind-major .ver-tag { background: #fdecec; color: #d9534f; }
.kind-patch .ver-tag { background: #e8f8f1; color: #14a06f; }
.ver-kind { font-size: 11.5px; color: #93a0b8; }
.ver-date { font-size: 12.5px; color: var(--text-sub); }
.ver-name { font-size: 14.5px; font-weight: 700; margin: 8px 0 6px; }
.ver-changes { margin: 0; padding-left: 18px; color: #4a5a78; font-size: 13px; line-height: 1.9; }
.ver-changes li { margin: 0; }

@media (max-width: 900px) {
  .ver-card { padding: 14px 16px; }
}

/* ===== 量化考核：按学生分组的量化明细卡片 ===== */
.point-card .score-rate { font-variant-numeric: tabular-nums; }
.point-metrics { grid-template-columns: repeat(4, 1fr); }
.point-metrics .num { font-size: 16px; }
.point-pending { color: #e9832a; }
.point-rec-hd, .point-rec-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 58px 74px 126px 176px;
  align-items: center; gap: 10px;
}
.point-rec-hd { padding: 0 6px 6px; font-size: 11.5px; color: #8b98ad; }
.point-rec-hd .rec-ops { text-align: right; }
.point-rec-row {
  padding: 8px 6px; margin-bottom: 6px; border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}
.point-rec-row:hover { background: #fff; }
.rec-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rec-reason {
  font-size: 12.5px; color: #4a5a78; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rec-photo { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 6px; cursor: zoom-in; }
.rec-score { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-meta { font-size: 11.5px; color: #8b98ad; line-height: 1.55; }
.rec-ops { text-align: right; white-space: nowrap; }
@media (max-width: 1200px) {
  .point-rec-hd, .point-rec-row { grid-template-columns: minmax(0, 1fr) 54px 70px 118px 168px; }
}
@media (max-width: 900px) {
  .point-metrics { grid-template-columns: repeat(2, 1fr); }
  .point-rec-hd { display: none; }
  .point-rec-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .point-rec-row .rec-meta { grid-column: 1 / -1; }
  .point-rec-row .rec-ops { grid-column: 1 / -1; text-align: left; }
}

/* ===== 学生基础档案：学生卡片 ===== */
.sk-metrics-4 { grid-template-columns: repeat(4, 1fr); }
.stu-gender { font-variant-numeric: tabular-nums; }
.stu-gender.is-girl { background: #fdebf4; color: #d1518d; }
.stu-info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stu-info {
  display: block; min-width: 0;
  padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .78);
}
.stu-info .k { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .3px; color: #9aa7bd; }
.stu-info .v { display: block; font-size: 14px; line-height: 1.45; font-weight: 600; color: #1f2f52; word-break: break-all; }
.stu-info-full { margin-top: 8px; }
.stu-card-ops { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
@media (max-width: 1200px) {
  .stu-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .stu-info-grid { gap: 6px; }
  .stu-info { padding: 7px 8px; }
}

/* ===== 账号管理：角色权限分类 ===== */
.role-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.role-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid #e3e9f5;
  background: #fff; color: #4a5a75; font-size: 13px; cursor: pointer;
  transition: all .18s ease;
}
.role-tab:hover { border-color: #bfd3ff; color: #2f6bff; }
.role-tab.active {
  background: linear-gradient(135deg, #2f6bff, #5b93ff);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(47, 107, 255, .22);
}
.role-tab-count {
  min-width: 20px; height: 18px; line-height: 18px; padding: 0 6px;
  border-radius: 9px; background: #eef3ff; color: #5b76a8;
  font-size: 11px; text-align: center;
}
.role-tab.active .role-tab-count { background: rgba(255, 255, 255, .24); color: #fff; }
.role-desc { margin-bottom: 10px; font-size: 12.5px; color: #8b98ad; }

/* ===== 权限管理 ===== */
.perm-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }
.perm-roles { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.perm-roles-title { font-size: 13px; font-weight: 700; color: #2b3a55; margin-bottom: 2px; }
.perm-role {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border: 1px solid #e6ecf7; border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 13px; color: #4a5a75;
  transition: all .18s ease;
}
.perm-role:hover { border-color: #bfd3ff; color: #2f6bff; }
.perm-role.active {
  background: linear-gradient(135deg, #2f6bff, #5b93ff);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(47, 107, 255, .2);
}
.perm-role-count { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #eef3ff; color: #5b76a8; }
.perm-role.active .perm-role-count { background: rgba(255, 255, 255, .24); color: #fff; }
.perm-role-note { margin-top: 6px; font-size: 11.5px; line-height: 1.6; color: #98a3b8; }
.perm-main { padding: 16px; }
.perm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.perm-head-title { font-size: 15px; font-weight: 700; color: #22325a; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.perm-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px; border: 1px solid #e6ecf7; border-radius: 10px;
  background: #fbfcff; transition: all .18s ease;
}
.perm-item.on { background: #f1f6ff; border-color: #cddefc; }
.perm-item-title { font-size: 13.5px; font-weight: 600; color: #22325a; }
.perm-item-sub { margin-top: 2px; font-size: 11.5px; color: #98a3b8; }
.perm-tip {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: #f7f9fd; font-size: 12px; line-height: 1.7; color: #8b98ad;
}
@media (max-width: 900px) {
  .perm-layout { grid-template-columns: 1fr; }
}

/* ===== 操作权限（CRUD）配置 ===== */
.crud-io { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.crud-io .el-button { width: 100%; margin-left: 0; }
.crud-logs { margin-top: 18px; border-top: 1px solid #eef2f9; padding-top: 14px; }
.crud-logs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.crud-logs-title { font-size: 13.5px; font-weight: 700; color: #2b3a55; }
.crud-log {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 9px 11px; border: 1px solid #eef2f9; border-radius: 9px;
  background: #fbfcff; margin-bottom: 6px; font-size: 12.5px;
}
.crud-log-main { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.crud-log-role { font-weight: 600; color: #22325a; }
.crud-log-action {
  display: inline-block; padding: 1px 7px; border-radius: 8px;
  background: #eef3ff; color: #3b62b8; font-size: 11px;
}
.crud-log-summary { color: #4a5a75; }
.crud-log-meta { flex: 0 0 auto; color: #98a3b8; font-size: 11.5px; white-space: nowrap; }
.crud-log-more { text-align: center; margin-top: 4px; }
@media (max-width: 900px) {
  .crud-log { flex-direction: column; gap: 4px; }
}

/* 操作权限矩阵：功能模块 × 四类操作 */
.crud-matrix { border: 1px solid #eef2f9; border-radius: 12px; overflow: hidden; background: #fff; }
.crud-matrix-head,
.crud-matrix-row { display: grid; grid-template-columns: minmax(140px, 1fr) repeat(4, 84px); align-items: center; }
.crud-matrix-head { background: #f6f8fd; color: #7a869c; font-size: 12px; font-weight: 600; }
.crud-matrix-head > div,
.crud-matrix-row > div { padding: 10px 12px; }
.crud-matrix-row { border-top: 1px solid #f0f3f9; font-size: 13px; }
.crud-matrix-row:hover { background: #fafcff; }
.crud-matrix-row .crud-col { display: flex; justify-content: center; }
.crud-matrix-head .crud-col { text-align: center; }
.crud-col-name { color: #22325a; font-weight: 600; }
.crud-log-module { color: #5a6b8c; }
@media (max-width: 900px) {
  .crud-matrix-head,
  .crud-matrix-row { grid-template-columns: minmax(110px, 1fr) repeat(4, 58px); }
  .crud-matrix-head > div,
  .crud-matrix-row > div { padding: 9px 8px; }
}

/* 顶部头像下拉菜单：统一入口 + 平滑展开 */
.user-menu-popper.el-popper {
  padding: 6px; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 35, 70, .16);
}
.user-menu-popper .el-dropdown-menu { padding: 0; min-width: 150px; }
.user-menu-popper .el-dropdown-menu {
  animation: userMenuIn .2s cubic-bezier(.2, .8, .3, 1);
}
.user-menu-popper .el-dropdown-menu__item {
  padding: 9px 14px; font-size: 14px; line-height: 1.4; border-radius: 6px;
  transition: background-color .18s ease, color .18s ease;
}
.user-menu-popper .el-dropdown-menu__item:not(.is-disabled):focus {
  background: #eef4ff; color: #1f4fd8;
}
@keyframes userMenuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 头像区域：hover / 键盘焦点提示 */
.user-chip {
  position: relative; border-radius: 10px; outline: none;
}
.user-chip::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 8px); right: 0;
  padding: 6px 10px; border-radius: 6px;
  background: rgba(23, 38, 74, .94); color: #fff;
  font-size: 12px; font-weight: 400; line-height: 1.4; white-space: nowrap;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 20;
}
.user-chip:hover::after,
.user-chip:focus-visible::after { opacity: 1; transform: translateY(0); }
.user-chip.is-open::after { opacity: 0; }
.user-chip:focus-visible { box-shadow: 0 0 0 2px rgba(31, 79, 216, .45); }

/* 消息提醒面板：待处理 / 归档 */
.notice-panel { margin: -4px -2px; }
.notice-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; }
.notice-title { font-size: 14px; font-weight: 600; color: #1f2f52; }
.notice-act {
  border: 0; background: #eef4ff; color: #1f4fd8; font-size: 12px;
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
  transition: background-color .18s ease;
}
.notice-act:hover { background: #e0ebff; }
.notice-act:disabled { opacity: .45; cursor: not-allowed; }
.notice-act.danger { background: #fef0f0; color: #d64545; }
.notice-tabs { display: flex; gap: 6px; padding: 0 4px 8px; border-bottom: 1px solid #eef1f6; }
.notice-tab {
  border: 0; background: #f1f5fb; color: #5b6b85; font-size: 13px;
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.notice-tab.on { background: #1f4fd8; color: #fff; }
.notice-tab-num { margin-left: 4px; font-size: 11px; opacity: .9; }
.notice-list { max-height: 360px; overflow-y: auto; padding-top: 4px; }
.notice-item { padding: 8px 6px; border-bottom: 1px dashed #eef1f6; }
.notice-item .t { font-size: 13px; color: #25324d; font-weight: 500; }
.notice-item .d { font-size: 12px; color: #7b889c; margin-top: 2px; }
.notice-item-btn {
  display: block; width: 100%; text-align: left; border: 0; background: #fff;
  position: relative; padding-right: 24px; border-radius: 8px; font: inherit; cursor: pointer;
  transition: background-color .18s ease;
}
.notice-item-btn:hover { background: #f5f8ff; }
.notice-item-btn:hover .t { color: #1f4fd8; }
.notice-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #9aa7bd; font-size: 16px; }
.notice-readat { margin-top: 3px; font-size: 11px; color: #9aa7bd; }
.notice-archive-foot { display: flex; justify-content: flex-end; padding: 8px 4px 2px; }

/* ================= 德育老师联系卡（家长/学生工作台共用） ================= */
.moral-card .moral-card-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.moral-card-avatar {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, #eef3ff 0%, #dbe4fb 100%);
  color: var(--el-color-primary); font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.moral-card-info { flex: 1 1 200px; min-width: 0; }
.moral-card-name {
  font-size: 16px; font-weight: 700; color: var(--text-main);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.moral-card-sub { margin-top: 3px; font-size: 12px; color: var(--text-sub); }
.moral-card-phone {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 15px; font-weight: 600; color: var(--el-color-primary);
  text-decoration: none; transition: color .16s ease;
}
.moral-card-phone .icon {
  width: 20px; height: 20px; border-radius: 6px; background: #eef3ff;
  color: var(--el-color-primary); font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.moral-card-phone:hover { color: var(--el-color-primary-dark-2); }
.moral-card-phone.disabled { font-size: 13px; font-weight: 500; color: #9aa7bd; }
.moral-card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.moral-card-actions .el-button + .el-button { margin-left: 0; }

@media (max-width: 768px) {
  .moral-card .moral-card-body { gap: 12px; }
  .moral-card-avatar { flex-basis: 42px; width: 42px; height: 42px; border-radius: 12px; font-size: 17px; }
  .moral-card-actions { width: 100%; margin-left: 0; }
  .moral-card-actions .el-button { flex: 1 1 0; }
}

/* ================= 栏目配置：权重排序与可视化预览 ================= */
.menu-sort-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px; align-items: start;
}
.menu-sort-editor { min-width: 0; }
.menu-weight-head {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px 6px; color: #93a0b8; font-size: 12px;
}
.menu-weight-col-name { flex: 1; min-width: 0; }
.menu-weight-col-sort { flex: 0 0 120px; text-align: center; }
.menu-weight-col-group { flex: 0 0 76px; text-align: center; }
.menu-weight-input { flex: 0 0 120px; width: 120px; }
/* 预览面板：与左侧导航（深蓝侧栏）保持同一视觉语言 */
.menu-preview {
  position: sticky; top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
  background: linear-gradient(180deg, #22356f 0%, #1a2a5f 100%);
  color: #c9d3ee; overflow: hidden;
  box-shadow: 0 8px 22px rgba(21, 34, 74, 0.22);
}
.menu-preview-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 0.4px;
}
.menu-preview-head .s {
  font-size: 11px; font-weight: 600; color: #3fe0f2;
  background: rgba(63, 224, 242, 0.14); border: 1px solid rgba(63, 224, 242, 0.32);
  border-radius: 10px; padding: 1px 9px; line-height: 16px;
}
.menu-preview-body { padding: 8px 0 10px; max-height: 560px; overflow-y: auto; }
.menu-preview-body::-webkit-scrollbar { width: 6px; }
.menu-preview-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18); border-radius: 3px;
}
.menu-preview-body::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }
.menu-preview-body::-webkit-scrollbar-track { background: transparent; }
.preview-group { margin: 2px 0; }
.preview-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; color: #c2cdec; font-size: 13.5px; font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
}
.preview-group-head:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.preview-group-icon {
  width: 16px; height: 16px; flex: 0 0 16px;
  display: inline-flex; align-items: center; justify-content: center; color: inherit;
}
.preview-group-icon svg { width: 16px; height: 16px; display: block; }
.preview-group-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-group-count {
  min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.14); color: #dbe4fb;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 600;
}
.preview-caret {
  flex: 0 0 auto; font-size: 9px; line-height: 1; color: #fff; opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.18s ease;
}
.preview-caret.open { transform: rotate(-90deg); opacity: 0.9; }
.preview-group-order {
  flex: 0 0 auto; padding: 1px 7px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.12); color: #dbe4fb;
  font-size: 11px; font-weight: 600;
}
.preview-group-body { background: rgba(0, 0, 0, 0.1); padding: 4px 0 6px; }
.preview-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 38px;
  font-size: 13px; color: #c2cdec;
  transition: background 0.18s ease, color 0.18s ease;
}
.preview-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.preview-group-body .preview-item { padding-left: 34px; }
.preview-item-root { margin: 0; }
.preview-item-icon {
  width: 16px; height: 16px; flex: 0 0 16px;
  display: inline-flex; align-items: center; justify-content: center; color: inherit;
  opacity: 0.92;
}
.preview-item-icon svg { width: 16px; height: 16px; display: block; }
.preview-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-item-order {
  flex: 0 0 auto; padding: 1px 7px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.12); color: #dbe4fb;
  font-size: 11px; font-weight: 600;
}
.preview-empty {
  padding: 22px 14px; text-align: center;
  font-size: 12.5px; color: rgba(219, 228, 251, 0.45);
}
.menu-preview-tip {
  padding: 9px 14px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px; color: rgba(219, 228, 251, 0.5); line-height: 1.7;
}
@media (max-width: 1100px) {
  .menu-sort-layout { grid-template-columns: 1fr; }
  .menu-preview { position: static; }
  .menu-weight-col-group { display: none; }
}
@media (max-width: 640px) {
  .menu-weight-head { display: none; }
  .menu-weight-input { flex: 0 0 96px; width: 96px; }
}

/* ================= 维修申报 ================= */
.repair-thumb { width: 44px; height: 44px; border-radius: 6px; display: block; }
.repair-detail-img { width: 100%; max-width: 320px; border-radius: 10px; display: block; }
.repair-finish-summary {
  background: #f6f8fe; border: 1px solid #e6ecf8; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px; line-height: 1.9;
}

/* ===== 保卫离校返校管理 ===== */
.guard-page .guard-tabs { background: #fff; border-radius: 12px; padding: 6px 14px 14px; }
.guard-count { display:inline-block; min-width:20px; padding:0 6px; margin-left:4px; border-radius:10px; background:#eef2ff; color:#3b5bdb; font-size:12px; text-align:center; }
.guard-toolbar { display:flex; align-items:center; gap:14px; margin: 4px 0 12px; }
.guard-tip { color:#909399; font-size:13px; }
.guard-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.guard-card { display:flex; gap:12px; background:#fff; border:1px solid #edf0f7; border-radius:12px; padding:14px; align-items:flex-start; }
.guard-photo { width:74px; height:96px; border-radius:8px; overflow:hidden; background:#f4f6fb; flex:0 0 auto; cursor:pointer; }
.guard-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.guard-photo-empty { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#b6bdcf; font-size:12px; }
.guard-info { flex:1; min-width:0; font-size:13px; color:#5b6478; line-height:1.7; }
.guard-name { font-size:16px; font-weight:600; color:#1f2d3d; margin-bottom:2px; }
.guard-no { font-size:12px; color:#9aa2b5; font-weight:400; margin-left:6px; }
.guard-line { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.guard-actions { display:flex; flex-direction:column; gap:8px; align-items:flex-end; }
.guard-overdue-row td { background: #fff1f0 !important; }
.guard-detail-head { display:flex; gap:14px; margin-bottom:16px; }
.guard-block { margin-bottom:18px; }
.guard-block-title { font-weight:600; color:#1f2d3d; margin-bottom:8px; border-left:3px solid #3b5bdb; padding-left:8px; }
.guard-log-note { color:#909399; font-size:12px; }
.guard-msg { padding:10px 0; border-bottom:1px solid #f0f2f7; }
.guard-msg-title { font-weight:600; display:flex; justify-content:space-between; gap:8px; }
.guard-msg-content { color:#5b6478; font-size:13px; margin:4px 0; }
.guard-msg-time { color:#a8afc0; font-size:12px; }
.guard-mask { position:fixed; inset:0; background:rgba(15,23,42,.35); z-index:3000; display:flex; align-items:center; justify-content:center; }
.guard-mask-box { background:#fff; padding:16px 28px; border-radius:10px; font-size:14px; color:#1f2d3d; box-shadow:0 10px 30px rgba(15,23,42,.2); }

/* 移动端保卫页 */
.m-guard-photo-box { position:relative; width:100%; display:flex; align-items:center; gap:12px; padding:10px; margin:8px 0; background:#f7f9fc; border:1px dashed #d7deee; border-radius:10px; }
.m-guard-photo-box img { width:64px; height:84px; object-fit:cover; border-radius:8px; }
.m-guard-photo-empty { width:64px; height:84px; display:flex; align-items:center; justify-content:center; background:#eef1f8; border-radius:8px; color:#a7b0c4; font-size:12px; }
.m-guard-photo-note { color:#9aa2b5; font-size:12px; }
.m-guard-hint { text-align:center; color:#8a93a6; font-size:13px; padding:8px 0; }
.m-guard-detail-photo { display:flex; justify-content:center; margin-bottom:12px; }
.m-guard-detail-photo img { width:110px; height:145px; object-fit:cover; border-radius:10px; }
.m-guard-log { padding:8px 0; border-bottom:1px solid #f0f2f7; font-size:13px; color:#3d4757; }
.m-guard-mask { position:fixed; inset:0; background:rgba(15,23,42,.4); z-index:4000; display:flex; align-items:center; justify-content:center; color:#fff; font-size:15px; }

/* 保卫数据大屏 */
.gs-wrap { min-height:100vh; background:radial-gradient(circle at 50% 0%, #12203f 0%, #070c18 60%); color:#e8eefc; padding:28px 40px 20px; box-sizing:border-box; display:flex; flex-direction:column; }
.gs-head { display:flex; justify-content:space-between; align-items:center; }
.gs-title { font-size:34px; font-weight:700; letter-spacing:2px; background:linear-gradient(90deg,#7fb1ff,#d8e6ff); -webkit-background-clip:text; background-clip:text; color:transparent; }
.gs-clock { font-size:20px; color:#9fb4dd; font-variant-numeric:tabular-nums; }
.gs-tabs { display:flex; gap:18px; margin:26px 0 18px; }
.gs-tab { padding:12px 30px; border-radius:12px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); font-size:22px; cursor:default; color:#c6d4f0; }
.gs-tab b { margin-left:10px; font-size:26px; }
.gs-tab.active { background:linear-gradient(135deg,#2e5bff,#5c8cff); border-color:#7ea6ff; color:#fff; box-shadow:0 8px 26px rgba(46,91,255,.4); }
.gs-body { flex:1; }
.gs-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.gs-card { background:rgba(255,255,255,.055); border:1px solid rgba(255,255,255,.1); border-radius:14px; padding:18px 20px; }
.gs-name { font-size:26px; font-weight:700; margin-bottom:10px; }
.gs-line { font-size:18px; color:#b9c8e6; margin-bottom:6px; display:flex; gap:10px; }
.gs-line span { color:#7f90b3; flex:0 0 auto; }
.gs-status { display:inline-block; margin-top:8px; padding:4px 14px; border-radius:20px; font-size:16px; }
.gs-status.st-pending { background:rgba(250,204,21,.16); color:#facc15; border:1px solid rgba(250,204,21,.45); }
.gs-status.st-out { background:rgba(34,197,94,.16); color:#4ade80; border:1px solid rgba(34,197,94,.45); }
.gs-status.st-returning { background:rgba(147,197,253,.16); color:#93c5fd; border:1px solid rgba(147,197,253,.45); }
.gs-empty { text-align:center; color:#6f80a3; font-size:24px; padding-top:80px; }
.gs-foot { margin-top:20px; text-align:center; color:#5f6f92; font-size:15px; }
@media (max-width: 768px) {
  .gs-wrap { padding:16px; }
  .gs-title { font-size:22px; }
  .gs-clock { font-size:14px; }
  .gs-tab { padding:8px 14px; font-size:16px; }
  .gs-tab b { font-size:18px; }
  .gs-name { font-size:20px; }
  .gs-line { font-size:15px; }
}

.role-parent { margin-top: 2px; font-size: 11px; color: #94a3b8; line-height: 1.2; }
