/* ====== 基础重置 ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #E8833C;
  --primary-light: #FCEFE3;
  --primary-dark: #C75E26;
  --primary-soft: #FDF4EC;
  --accent: #2BA36B;
  --success: #2BA36B;
  --warning: #E0922A;
  --danger: #E5484D;
  --info: #2E8FB5;
  --gray-50: #FCFBF9;
  --gray-100: #F6F3EE;
  --gray-200: #ECE7DF;
  --gray-300: #DDD6CB;
  --gray-400: #A89F91;
  --gray-500: #6E685C;
  --gray-600: #514C42;
  --gray-700: #3B362E;
  --gray-800: #2A2620;
  --gray-900: #1C1813;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(40,30,20,.06);
  --shadow: 0 8px 24px rgba(40,30,20,.10);
  --sidebar-width: 240px;
  --font-sans: "PingFang SC","Microsoft YaHei","Hiragino Sans GB","Source Han Sans SC","Noto Sans CJK SC",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
body {
  font-family: var(--font-sans);
  background: var(--gray-100);
  color: var(--gray-800);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.weather-widget {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.35);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  vertical-align: middle;
}
.teacher-welcome-banner .weather-widget,
.welcome-banner .weather-widget {
  background: rgba(255,255,255,0.45);
}
.net-clock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.35);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
.teacher-welcome-banner .net-clock,
.welcome-banner .net-clock {
  background: rgba(255,255,255,0.45);
}

/* ====== 布局 ====== */
#app { display: flex; height: 100vh; overflow: hidden; }

/* ====== 侧边栏 ====== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-header .logo { font-size: 24px; }
.sidebar-header .title { font-size: 16px; font-weight: 700; }
.nav-menu { flex: 1; padding: 12px 8px; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  margin-bottom: 2px;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-item.active { color: #fff; background: var(--primary); }
.nav-item span:first-child { font-size: 18px; }
.sidebar-footer {
  padding: 16px;
  font-size: 12px;
  color: rgba(255,255,255,.4);
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ====== 主内容区 ====== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.top-bar {
  background: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 50;
}
.top-bar h1 { font-size: 20px; font-weight: 700; }
.top-bar-right { color: var(--gray-500); font-size: 13px; }
.page-content { padding: 24px; flex: 1; min-height: 0; overflow-y: auto; }

/* ====== 卡片/统计 ====== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: #dcfce7; color: var(--success); }
.stat-icon.orange { background: #fef3c7; color: var(--warning); }
.stat-icon.purple { background: #f3e8ff; color: #a855f7; }
.stat-icon.red { background: #fee2e2; color: var(--danger); }
.stat-icon.pink { background: #fce7f3; color: #db2777; }
.stat-icon.teal { background: #ccfbf1; color: #0d9488; }
.hidden { display: none !important; }
.stat-info .stat-value { font-size: 26px; font-weight: 700; }
.stat-info .stat-label { font-size: 13px; color: var(--gray-500); }

/* ====== 面板 ====== */
.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-header h2 { font-size: 16px; font-weight: 600; }
.panel-body { padding: 20px; }

/* ====== 月报 ====== */
.report-block {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 20px;
  padding: 18px 20px;
}
.report-block h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.report-summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 14px 16px;
  white-space: pre-line;
  line-height: 1.9;
  font-size: 13px;
  color: var(--gray-700);
  font-family: inherit;
  margin: 0;
}

/* ====== 表格 ====== */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--gray-100); }
th { font-weight: 600; color: var(--gray-600); font-size: 13px; background: var(--gray-50); }
tr:hover { background: var(--gray-50); }
td .row-actions { display: flex; gap: 8px; }

/* ====== 按钮 ====== */
.btn {
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #d63d3d; }
.btn-outline { background: #fff; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ====== 标签/徽章 ====== */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: var(--primary-light); color: var(--primary); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ====== 模态框 ====== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: #fff;
  border-radius: 12px;
  width: 520px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-close {
  border: none; background: none;
  font-size: 24px; cursor: pointer;
  color: var(--gray-400); line-height: 1;
}
.modal-close:hover { color: var(--gray-800); }
.modal-body { padding: 20px; overflow-y: auto; }

/* ====== 表单 ====== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 13px; color: var(--gray-700); }
.form-group label .req { color: var(--danger); }
.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color .2s;
  font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ====== 表单分节 + 标签选择器 ====== */
.form-section { background: var(--gray-50); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.form-section-title { font-weight: 600; font-size: 14px; color: var(--gray-800); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 16px;
  background: #fff;
  color: var(--gray-700);
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--gray-200);
  transition: all .15s ease;
  user-select: none;
}
.tag-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.tag-chip:active { transform: scale(.95); }

/* 学情标签分组 + 自定义快速输入 */
.tag-group { margin-bottom: 10px; }
.tag-group-label { font-size: 12px; color: var(--gray-500); margin-bottom: 6px; }
.custom-tag-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.custom-tag-row .custom-tag-input { flex: 1; max-width: 240px; }
.custom-tag-row .btn { white-space: nowrap; }

/* ====== 搜索/筛选栏 ====== */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar .search-input {
  flex: 1; min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
}
.toolbar .search-input:focus { outline: none; border-color: var(--primary); }
.toolbar select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}

/* ====== Toast ====== */
.toast {
  position: fixed;
  top: 24px; right: 24px;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  animation: slideIn .3s ease;
}
.toast.hidden { display: none; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ====== 空状态 ====== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 15px; }

/* ====== 评分星星 ====== */
.stars { color: #f59e0b; letter-spacing: 2px; }

/* ====== 趋势图 ====== */
.trend-chart { display: flex; gap: 12px; align-items: flex-end; height: 200px; padding: 16px 0; }
.trend-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.trend-bars { display: flex; gap: 2px; align-items: flex-end; height: 140px; width: 100%; justify-content: center; }
.trend-bar { width: 20px; border-radius: 4px 4px 0 0; transition: height .3s; min-height: 2px; }
.trend-bar.present { background: var(--success); }
.trend-bar.absent { background: var(--danger); }
.trend-bar.late { background: var(--warning); }
.trend-bar.leave { background: var(--gray-300); }
.trend-date { font-size: 12px; color: var(--gray-500); }

/* ====== 列表项 ====== */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.list-item:last-child { border-bottom: none; }
.list-item .item-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  flex-shrink: 0;
}
.list-item .item-content { flex: 1; min-width: 0; }
.list-item .item-title { font-weight: 500; }
.list-item .item-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ====== 功能预告卡片 ====== */
.announcement-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 12px;
  border-left: 4px solid var(--primary);
}
.announcement-card .ann-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.announcement-card .ann-content { color: var(--gray-600); line-height: 1.6; }
.announcement-card .ann-meta { font-size: 12px; color: var(--gray-400); margin-top: 8px; }

/* ====== 分页/加载 ====== */
.loading { text-align: center; padding: 40px; color: var(--gray-400); }

/* ====== 工作台 ====== */
.welcome-banner {
  background: linear-gradient(135deg, #FF8F43 0%, #E07A3F 25%, #A55EEA 60%, #4F8CFF 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(79,110,247,.22);
}
.welcome-banner h2 { font-size: 22px; margin-bottom: 6px; }
.welcome-banner p { opacity: .9; font-size: 14px; }
.welcome-banner p b { color: #ffe08a; }
.welcome-emoji { font-size: 48px; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.quick-action {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all .2s;
  font-size: 13px;
  color: var(--gray-700);
}
.quick-action:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(79,110,247,.15);
}
.qa-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.qa-icon.green { background: #dcfce7; }
.qa-icon.blue { background: #dbeafe; }
.qa-icon.orange { background: #ffedd5; }
.qa-icon.purple { background: #ede9fe; }
.qa-icon.red { background: #fee2e2; }
.qa-icon.teal { background: #ccfbf1; }

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--gray-50);
  border-left: 4px solid var(--gray-300);
}
.todo-item.danger { border-left-color: var(--danger); background: #fef2f2; }
.todo-item.warning { border-left-color: var(--warning); background: #fffbeb; }
.todo-item.info { border-left-color: var(--info); background: #ecfeff; }
.todo-icon { font-size: 16px; }
.todo-text { font-size: 13px; color: var(--gray-700); }

@media (max-width: 900px) {
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
}

/* ====== 登录页 ====== */
.login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF8F43 0%, #E07A3F 20%, #A55EEA 65%, #4F8CFF 100%);
  padding: 20px;
}
.login-screen.hidden { display: none; }
.login-card {
  width: 100%; max-width: 360px; background: #fff; border-radius: 16px;
  padding: 36px 32px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  text-align: center;
}
.login-logo { font-size: 44px; margin-bottom: 8px; }
.login-card h2 { font-size: 24px; margin: 0 0 4px; color: var(--gray-900); }
.login-sub { color: var(--gray-400); font-size: 13px; margin: 0 0 24px; }
.login-field { margin-bottom: 14px; }
.login-field input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--gray-200);
  border-radius: 10px; font-size: 14px; box-sizing: border-box; outline: none;
}
.login-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.login-btn {
  width: 100%; padding: 12px; background: var(--primary); color: #fff;
  border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
  margin-top: 6px;
}
.login-btn:hover { background: var(--primary-dark); }
.login-error { color: #dc2626; font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.login-hint { color: var(--gray-400); font-size: 12px; margin: 14px 0 0; }
.top-user { display: inline-flex; align-items: center; gap: 8px; margin-left: 16px; }
.top-user .btn { margin-left: 4px; }

/* ====== 日历 ====== */
.calendar-wrap { min-width: 0; }
.calendar-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.calendar-head h3 { font-size: 15px; margin: 0; }
.calendar-nav { display: flex; gap: 6px; align-items: center; }
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.calendar-dow {
  text-align: center; font-size: 11px; color: var(--gray-400); padding: 4px 0;
  font-weight: 600;
}
.calendar-day {
  min-height: 52px; border: 1px solid var(--gray-100); border-radius: 8px;
  padding: 3px; font-size: 12px; position: relative; background: #fff;
}
.calendar-day.other-month { background: var(--gray-50); color: var(--gray-300); }
.calendar-day.today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.calendar-day .day-num { font-weight: 600; font-size: 12px; }
.calendar-day .day-tags { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.cal-tag {
  display: inline-block; font-size: 10px; line-height: 1.4; padding: 0 4px;
  border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.cal-tag.birthday { background: #fce7f3; color: #db2777; }
.cal-tag.billing { background: #fee2e2; color: #dc2626; }
.cal-tag.announcement { background: var(--primary-light); color: var(--primary); }
.cal-tag.custom { background: #d1fae5; color: #059669; }
.cal-tag.more { background: var(--gray-100); color: var(--gray-500); }
.calendar-day { cursor: pointer; transition: box-shadow .15s; }
.calendar-day:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.day-lunar {
  font-size: 9px; color: var(--gray-400); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 12px;
}
.day-lunar.festival { color: #e11d48; font-weight: 600; }
.cal-day-detail { margin-top: 10px; font-size: 13px; color: var(--gray-600); }
.cal-day-detail .detail-row { padding: 4px 0; border-bottom: 1px dashed var(--gray-100); }

/* ====== 当日事项弹窗 ====== */
.day-ev-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff; border: 1px solid var(--gray-100); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 6px;
}
.day-ev-item.custom { border-color: #a7f3d0; background: #ecfdf5; }
.day-ev-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.day-ev-icon { font-size: 14px; flex-shrink: 0; }
.day-ev-title { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.day-ev-note { font-size: 12px; color: var(--gray-500); margin-top: 1px; word-break: break-all; }
.day-ev-item .row-actions { flex-shrink: 0; }

/* ====== 家长消息生成 ====== */
.msg-generator textarea {
  width: 100%; min-height: 120px; box-sizing: border-box; resize: vertical;
  border: 1px solid var(--gray-200); border-radius: 8px; padding: 10px;
  font-size: 13px; font-family: inherit; background: var(--gray-50);
}
.msg-generator .form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.msg-generator .form-row .form-group { flex: 1; min-width: 140px; }

/* ====== 老师端（手机优先） ====== */
.teacher-greeting {
  background: linear-gradient(135deg, #4f6ef7, #7c5cf7); color: #fff;
  border-radius: 12px; padding: 18px; margin-bottom: 16px;
}
.teacher-greeting h2 { margin: 0 0 4px; font-size: 18px; }
.teacher-greeting p { margin: 0; font-size: 13px; opacity: 0.9; }
.teacher-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.teacher-quick-btn {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 14px 8px; text-align: center; cursor: pointer; transition: all .15s;
}
.teacher-quick-btn:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(79,110,247,.15); }
.teacher-quick-btn .tq-icon { font-size: 24px; display: block; margin-bottom: 6px; }
.teacher-quick-btn .tq-label { font-size: 13px; color: var(--gray-700); font-weight: 600; }
.student-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
}
.student-card .sc-info { min-width: 0; }
.student-card .sc-name { font-weight: 600; font-size: 15px; color: var(--gray-900); }
.student-card .sc-meta { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.student-card .sc-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 480px) {
  .student-card .sc-actions { flex-direction: column; }
}
.record-item {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px;
}
.record-item .ri-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.record-item .ri-title { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.record-item .ri-meta { font-size: 12px; color: var(--gray-400); }
.record-item .ri-content { font-size: 13px; color: var(--gray-600); }
.record-item.clickable { cursor: pointer; transition: border-color .15s, background .15s; }
.record-item.clickable:hover { border-color: var(--gray-300); background: var(--gray-50); }

/* ====== 老师录入表单 ====== */
.form-section {
  border: 1px solid var(--gray-200); border-radius: 10px; padding: 12px; margin-bottom: 14px;
  background: var(--gray-50);
}
.form-section-title {
  font-size: 13px; font-weight: 700; color: var(--gray-700); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.rating-stars { font-size: 22px; cursor: pointer; letter-spacing: 4px; }
.rating-stars span { color: var(--gray-300); }
.rating-stars span.active { color: #f59e0b; }

/* ====== 标签式表现勾选 ====== */
.tag-group { margin-bottom: 10px; }
.tag-group-title { font-size: 12px; color: var(--gray-500); margin-bottom: 6px; font-weight: 600; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
  display: inline-block; padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--gray-200); background: #fff; color: var(--gray-600);
  font-size: 13px; cursor: pointer; transition: all .15s; user-select: none;
}
.tag-chip:hover { border-color: var(--primary); color: var(--primary); }
.tag-chip.active {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
}
.tag-chip.tag-positive { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.tag-chip.tag-positive:hover { background: #d1fae5; border-color: #34d399; color: #047857; }
.tag-chip.tag-positive.active { background: #d1fae5; border-color: #34d399; color: #047857; }
.tag-chip.tag-negative { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.tag-chip.tag-negative:hover { background: #fee2e2; border-color: #f87171; color: #b91c1c; }
.tag-chip.tag-negative.active { background: #fee2e2; border-color: #f87171; color: #b91c1c; }
.tag-chip.tag-single { border-color: #ddd6fe; background: #f5f3ff; color: #6d28d9; }
.tag-chip.tag-single:hover { background: #ede9fe; border-color: #a78bfa; color: #6d28d9; }
.tag-chip.tag-single.active { background: #ede9fe; border-color: #a78bfa; color: #6d28d9; }

/* 两级表现标签组 */
.tag-hint {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  background: #dcfce7; color: #166534; font-size: 11px;
  border-radius: 10px; font-weight: 500; vertical-align: middle;
}
.tag-subgroup { margin-bottom: 10px; }
.tag-subgroup-title {
  font-size: 13px; color: var(--gray-600); margin-bottom: 6px; font-weight: 500;
}
.custom-tags-input {
  margin-top: 8px; font-size: 13px; resize: vertical;
}

/* 反馈记录表格中的标签展示 */
.fb-tag-line { font-size: 12px; color: var(--gray-600); line-height: 1.7; }
.fb-tag-line b { color: var(--gray-500); font-weight: 600; }
.fb-note { font-size: 12px; color: var(--gray-400); margin-top: 4px; line-height: 1.6; }
.fb-group-section { margin-bottom: 10px; }
.fb-group-section:last-child { margin-bottom: 0; }
.fb-group-title { font-size: 12px; font-weight: 700; color: var(--gray-700); margin-bottom: 4px; }

/* ====== 多行作业登记 ====== */
.hw-row {
  border: 1px solid var(--gray-200); background: #fff; border-radius: 8px;
  padding: 10px; margin-bottom: 8px;
}
.hw-row-top { display: flex; gap: 8px; margin-bottom: 8px; }
.hw-row-top select[name="hw_subject"] { flex: 1; min-width: 0; }
.hw-row-top input[name="hw_custom"] { flex: 1; min-width: 0; }
.hw-row-del { flex-shrink: 0; }
.hw-row-bottom { display: flex; gap: 8px; margin-bottom: 8px; }
.hw-row-bottom input[name="hw_content"] { flex: 1; min-width: 0; }
.hw-row-bottom select[name="hw_status"] { width: 110px; flex-shrink: 0; }
.hw-row input[name="hw_feedback"] { width: 100%; box-sizing: border-box; }

/* 消息生成文本域（通用） */
.msg-textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  border: 1px solid var(--gray-200); border-radius: 8px; padding: 10px;
  font-size: 13px; font-family: inherit; background: var(--gray-50);
}

/* 反馈记录 → 发给家长弹窗 */
.fb-msg-tags {
  border: 1px dashed var(--gray-200); border-radius: 8px;
  background: #fff; padding: 10px 12px; margin-bottom: 12px;
  font-size: 13px; line-height: 1.8;
}
.fb-msg-tags .fb-tag-line { font-size: 13px; }
.fb-msg-actions { display: flex; gap: 8px; margin: 12px 0; }
.fb-msg-actions .btn { flex: 1; }
.fb-msg-hint { font-size: 12px; color: var(--gray-400); margin-top: 8px; text-align: center; }
.fb-loadmore { padding: 14px; text-align: center; }

/* 家长链接弹窗 */
.parent-link-modal { padding: 4px 2px; }
.parent-link-desc { font-size: 14px; color: var(--gray-600); line-height: 1.7; margin-bottom: 12px; }
.parent-link-box { margin-bottom: 4px; }
.parent-link-box .form-control {
  font-size: 14px; color: var(--primary); background: #f0f6ff;
  word-break: break-all; cursor: text;
}
.parent-link-tip { font-size: 12px; color: var(--gray-400); line-height: 1.7; margin-top: 8px; }


/* 表单下方实时家长消息预览 */
.fb-preview-wrap {
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
}
.fb-preview-wrap .form-section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--primary, #2563eb);
  margin-bottom: 10px;
}
.fb-preview-wrap .msg-textarea { background: #fff; }

@media (max-width: 768px) {
  .teacher-quick { grid-template-columns: repeat(2, 1fr); }
  .hw-row-bottom { flex-direction: column; }
  .hw-row-bottom select[name="hw_status"] { width: 100%; }
  .top-user { margin-left: 8px; }
  .top-user span#today-date { display: none; }
}

/* ====== 老师管理：班级分工总览 ====== */
.class-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.class-chip {
  border: 1px solid var(--gray-200); border-radius: 10px; padding: 10px 12px;
  background: var(--gray-50); text-align: center;
}
.class-chip b { display: block; font-size: 15px; color: #333; }
.class-chip span { display: block; font-size: 12px; color: var(--gray-400); margin: 2px 0; }
.class-chip small { display: block; font-size: 12px; color: var(--warning); font-weight: 600; }
.class-chip.ok { background: #f0f7ff; border-color: #cfe4ff; }

/* 老师负责班级多选 chips */
.cls-checks { display: flex; flex-wrap: wrap; gap: 6px; max-width: 420px; }
.cls-chk {
  display: inline-block; padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--gray-200); background: #fff; color: var(--gray-600);
  font-size: 13px; cursor: pointer; transition: all .15s; user-select: none;
}
.cls-chk:hover { border-color: var(--primary); color: var(--primary); }
.cls-chk.active {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
}
.class-chip.ok small { color: var(--primary); }

/* ====== 移动端汉堡按钮（手机才显示） ====== */
.sidebar-toggle {
  display: none;
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--gray-700); padding: 4px 8px; margin-right: 8px; line-height: 1;
}
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 99; opacity: 0; transition: opacity .25s;
}
.sidebar-backdrop.show { display: block; opacity: 1; }

/* ====== 移动端全面适配 (≤768px) ====== */
@media (max-width: 768px) {
  /* 汉堡按钮显示 */
  .sidebar-toggle { display: inline-block; }

  /* 侧边栏：默认隐藏，点击滑出 */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,.2);
  }
  .sidebar.open { transform: translateX(0); }

  /* 主内容区：全宽 */
  .main-content { margin-left: 0; }

  /* 顶部栏：紧凑布局 */
  .top-bar { padding: 10px 12px; }
  .top-bar h1 { font-size: 17px; }
  .top-bar-right { display: flex; align-items: center; gap: 6px; font-size: 12px; }
  .top-user { margin-left: 0; }
  .top-user #user-name { display: none; }
  .top-user .btn { padding: 4px 10px; font-size: 12px; }

  /* 页面内容缩减 padding */
  .page-content { padding: 12px; }

  /* 统计卡片：单列 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* 快捷操作：2列 */
  .quick-actions { grid-template-columns: repeat(2, 1fr); }

  /* 日历：缩小格子 */
  .calendar-day { min-height: 40px; padding: 2px; font-size: 11px; }
  .calendar-day .day-num { font-size: 11px; }
  .day-lunar { font-size: 8px; }
  .cal-tag { font-size: 9px; padding: 0 3px; }

  /* 模态框：全屏化 */
  .modal { width: 95%; max-width: none; margin: 0 auto; }
  .modal-body { max-height: 70vh; }

  /* 表格：横向滚动 */
  .table-wrap, .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }

  /* 老板端工作台双栏变单栏 */
  .wb-main-grid { grid-template-columns: 1fr; }

  /* 老师端快捷按钮 2 列 */
  .teacher-quick { grid-template-columns: repeat(2, 1fr); }

  /* 班级统计单列 */
  .class-summary { grid-template-columns: repeat(2, 1fr); }

  /* 登录卡片适配 */
  .login-card { padding: 28px 20px; }

  /* 消息生成器表单堆叠 */
  .msg-generator .form-row { flex-direction: column; }
  .msg-generator .form-row .form-group { min-width: 100%; }

  /* 手机端弹性缩放：随屏幕宽度自动放大/缩小 */
  html { font-size: clamp(13px, 3.2vw, 16px); }
  body { font-size: clamp(13px, 3.5vw, 15px); }
  .btn { font-size: clamp(13px, 3.4vw, 15px); padding: clamp(8px, 2.5vw, 12px) clamp(12px, 3vw, 16px); }
  .form-control { font-size: clamp(13px, 3.5vw, 15px); padding: clamp(8px, 2.2vw, 11px) clamp(10px, 2.5vw, 12px); }
  .panel { border-radius: clamp(8px, 2vw, 12px); }
  .page-content { padding: clamp(10px, 3vw, 16px); }
  .top-bar { padding: clamp(10px, 3vw, 14px) clamp(12px, 3vw, 16px); }
  .top-bar h1 { font-size: clamp(16px, 4.5vw, 20px); }

  /* ====== 手机端老板工作台：微信小程序风格入口 ====== */
  .mobile-workbench {
    margin: -12px;
    min-height: calc(100vh - 56px);
    background: #f5f7fa;
    padding-bottom: 20px;
  }
  .wb-header {
    background: linear-gradient(135deg, #4facfe 0%, #00c6fb 100%);
    color: #fff;
    text-align: center;
    padding: 18px 0 22px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 0 0 20px 20px;
  }
  .wb-banner {
    padding: 16px 12px 12px;
  }
  .wb-welcome {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
  }
  .wb-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
  }
  .m-hero-date { font-size: 13px; opacity: 0.85; margin-bottom: 6px; color: inherit; }
  .wb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px 20px;
  }
  .wb-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    position: relative;
  }
  .wb-card:active { transform: scale(.96); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
  /* ====== 手机端老板工作台：卡片数字角标（v7.10，0 时不显示） ====== */
  .wb-card-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff5a5f, #e31d2b);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 10px;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(227,29,43,0.42);
    z-index: 2;
    pointer-events: none;
  }
  .wb-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  .wb-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #4facfe 0%, #00c6fb 100%);
    font-size: 22px;
    box-shadow: 0 3px 10px rgba(79,172,254,0.3);
  }
  .wb-card-tag {
    font-size: 11px;
    color: #00a8e6;
    background: rgba(0,168,230,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
  }
  .wb-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-top: 10px;
  }
  .wb-card-desc {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
    line-height: 1.4;
  }
  .wb-card-action {
    font-size: 12px;
    color: #4facfe;
    margin-top: 10px;
    font-weight: 600;
  }

  /* ====== 手机端各页面：返回工作台顶部栏 ====== */
  .mobile-page-header {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #4facfe 0%, #00c6fb 100%);
    color: #fff;
    padding: 12px 16px;
    margin: -12px -12px 12px;
    border-radius: 0 0 20px 20px;
    min-height: 48px;
    box-sizing: border-box;
  }
  .mobile-back-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
  }
  .mobile-back-btn:active { background: rgba(255,255,255,0.35); }
  .mobile-page-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    padding-right: 68px;
  }

  /* ====== 手机端各内页基础适配 ====== */
  .toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    align-items: center;
  }
  .toolbar .search-input,
  .toolbar select,
  .toolbar input[type="date"],
  .toolbar input[type="month"] {
    flex: 1 1 auto;
    min-width: 80px;
    width: auto;
    margin: 0;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    height: 34px;
  }
  .toolbar .search-input {
    flex: 1 1 100%;
    min-width: 0;
  }
  .toolbar .btn {
    flex: 1 1 auto;
    font-size: 12px;
    padding: 6px 10px;
    height: 34px;
    min-width: 72px;
  }
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .panel-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }
  table { min-width: 600px; }
  th, td { padding: 10px 8px; font-size: 13px; }
  td .row-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  .row-actions .btn {
    padding: 5px 8px;
    font-size: 12px;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  /* 手机端统计卡片改紧凑 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
  }
  .stat-card {
    padding: 8px;
    gap: 6px;
    border-radius: 10px;
  }
  .stat-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
    border-radius: 8px;
  }
  .stat-info .stat-value {
    font-size: 15px;
    font-weight: 700;
  }
  .stat-info .stat-label {
    font-size: 10px;
    color: var(--gray-500);
  }
  .form-row .form-group { width: 100%; }
  .form-actions {
    flex-direction: column;
    gap: 10px;
  }
  .form-actions .btn { width: 100%; }
}

/* ====== 超小屏 (≤480px) 进一步优化 ====== */
@media (max-width: 480px) {
  .top-bar h1 { font-size: 15px; }
  .page-content { padding: 10px; }
  .quick-actions { grid-template-columns: 1fr; }
  .teacher-quick { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .btn { padding: 8px 12px; font-size: 13px; }
  .modal { width: 100%; border-radius: 0; }
  .modal-body { max-height: 75vh; }
  .calendar-day { min-height: 36px; }
  .login-card { padding: 24px 16px; }
  .login-logo { font-size: 36px; }
  .login-card h2 { font-size: 20px; }
}

/* ====== 反馈图片：上传/预览/表格展示 ====== */
.img-uploader {
  margin-top: 8px;
  padding: 10px;
  background: #f8f9fa;
  border: 1px dashed #cfd6e4;
  border-radius: 10px;
}
.img-upload-input {
  font-size: 12px;
  color: var(--gray-600, #666);
  cursor: pointer;
  max-width: 100%;
}
.img-upload-tip { font-size: 11px; color: #98a2b3; margin-top: 4px; }
.img-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.img-thumb-wrap {
  position: relative;
  width: 66px;
  height: 66px;
}
.img-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  cursor: zoom-in;
  display: block;
  background: #fff;
}
.img-del {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  line-height: 18px;
  text-align: center;
  background: #e5484d;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
  user-select: none;
  font-style: normal;
}
/* 表格内反馈图片缩略组 */
.fb-images {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.fb-img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  cursor: zoom-in;
  display: block;
}
.fb-img-more {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 5px;
  padding: 2px 6px;
}
@media (max-width: 768px) {
  .img-uploader { padding: 8px; }
  .img-thumb-wrap { width: 58px; height: 58px; }
  .fb-img { width: 32px; height: 32px; }
}

/* ====== 反馈图片灯箱（连续查看） ====== */
.img-lightbox {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.img-lightbox img {
  max-width: 94vw; max-height: 86vh;
  border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.img-lb-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff;
  font-size: 24px; line-height: 40px; text-align: center;
  cursor: pointer;
}
.img-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff;
  font-size: 34px; line-height: 1; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none; z-index: 2;
  transition: background .15s, opacity .15s;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.img-lb-nav:hover:not(.disabled) { background: rgba(0,0,0,.75); }
.img-lb-nav.img-lb-prev { left: 12px; }
.img-lb-nav.img-lb-next { right: 12px; }
.img-lb-nav.disabled { opacity: .25; cursor: default; }
.img-lb-counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 13px; background: rgba(0,0,0,.4);
  padding: 4px 12px; border-radius: 20px;
}

/* ====== 多科目作业表格（作业反馈窗口） ====== */
.hw-subj-table {
  border: 1px solid #e5e9f2;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}
.hw-subj-head {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: #f1f5f9;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.hw-subj-row {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #eef1f6;
  align-items: flex-start;
}
.hw-subj-col-subj { width: 130px; flex: none; }
.hw-subj-col-content { flex: 1; min-width: 0; }
.hw-subj-col-status { width: 112px; flex: none; }
.hw-subj-col-op { width: 40px; flex: none; text-align: right; }
.hw-subj-table .form-control { width: 100%; }
@media (max-width: 768px) {
  .hw-subj-head { display: none; }
  .hw-subj-row { flex-direction: column; }
  .hw-subj-col-subj,
  .hw-subj-col-content,
  .hw-subj-col-status,
  .hw-subj-col-op { width: 100%; text-align: left; }
}

/* ====== v7.6 考勤日历视图 ====== */
.att-month-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  min-width: 110px;
  text-align: center;
}
.att-calendar {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.att-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.att-week-head {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  padding: 4px 0;
}
.att-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.att-cell {
  min-height: 64px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 4px 6px;
  cursor: pointer;
  background: #fff;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.att-cell:hover { border-color: var(--primary); background: var(--primary-light); }
.att-cell.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.att-cell.selected { background: var(--primary-light); border-color: var(--primary); }
.att-cell.att-empty { background: var(--gray-50); border-color: transparent; cursor: default; }
.att-day-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  align-self: flex-start;
}
.att-cell.today .att-day-num { color: var(--primary); }
.att-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
  margin-top: 4px;
}
.att-dot {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 9px;
  font-size: 11px;
  color: #fff;
  text-align: center;
  padding: 0 4px;
}
.dot-present { background: var(--success); }
.dot-late { background: var(--warning); }
.dot-leave { background: var(--gray-400); }
.dot-absent { background: var(--danger); }
.att-no-data { width: 4px; height: 4px; border-radius: 50%; background: var(--gray-200); display: inline-block; margin-top: 6px; }
.att-legend {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray-500);
  flex-wrap: wrap;
}
.att-legend span { display: inline-flex; align-items: center; gap: 4px; }
.att-day-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}

/* ====== v7.6 学生风采相册 ====== */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.moment-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.moment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}
.moment-imgs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px;
}
.moment-img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  cursor: zoom-in;
  flex: 1 1 96px;
  max-width: 130px;
}
.moment-more {
  position: absolute;
  right: 12px;
  bottom: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}
.moment-note {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}
.moment-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--gray-100);
  font-size: 12px;
  color: var(--gray-500);
}

/* ====== 老板端按班级相册（QQ 相册风格） ====== */
.album-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  display: flex;
  flex-direction: column;
}
.album-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.album-cover {
  position: relative;
  width: 100%;
  height: 160px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-empty-cover {
  font-size: 48px;
  color: var(--gray-300);
}
.album-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  line-height: 1.4;
}
.album-name {
  padding: 10px 12px 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
}
.album-meta {
  padding: 0 12px 12px;
  font-size: 12px;
  color: var(--gray-500);
}

/* 相册选择模式 + 单张删除 */
.album-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.album-tip { font-size: 12px; color: var(--gray-500); }
.moment-img.selected { outline: 3px solid var(--primary); outline-offset: -3px; box-shadow: 0 0 0 2px #fff; }
.selectable-photo {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
}
.selectable-photo .moment-img { cursor: pointer; }
.selectable-photo.selected .moment-img { opacity: .72; }
.select-overlay {
  position: absolute; inset: 0;
  background: rgba(59, 130, 246, .22);
  pointer-events: none;
}
.select-badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
  font-size: 13px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  pointer-events: none;
}
.selectable-photo.selected .select-badge {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
#album-del-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ====== v7.10 学情随手记 + 周总结 ====== */
.list-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.note-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.note-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.note-head strong { flex: 1; font-size: 15px; color: var(--gray-800); }
.note-date { font-size: 12px; color: var(--gray-500); }
.note-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.note-content { font-size: 14px; color: var(--gray-700); line-height: 1.6; margin-bottom: 10px; white-space: pre-wrap; }
.note-content.pre-wrap { white-space: pre-wrap; }
.note-imgs { display: flex; gap: 6px; position: relative; margin-bottom: 10px; }
.note-imgs img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.note-more {
  position: absolute;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}
.note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-500);
}
.note-foot > div { display: flex; gap: 8px; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: all .12s;
}
.tag-chip.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ====== v7.6 学生档案详情 ====== */
.student-profile { display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow-y: auto; }
.profile-sec {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}
.profile-sec-title {
  background: var(--gray-50);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
}
.profile-row {
  display: flex;
  padding: 8px 12px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  gap: 12px;
}
.profile-row:last-child { border-bottom: none; }
.profile-label {
  flex: none;
  width: 110px;
  color: var(--gray-500);
}
.profile-value { flex: 1; color: var(--gray-800); word-break: break-all; }
.profile-danger { color: var(--danger); font-weight: 600; }

@media (max-width: 768px) {
  .att-cell { min-height: 52px; }
  .att-dot { min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; }
  .moments-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .moment-img { width: 100%; height: auto; aspect-ratio: 1; flex: none; max-width: none; }
  .moment-imgs { flex-direction: column; }
  .profile-label { width: 84px; }
}

/* ====== v7.8 收支账目 ====== */
.fin-day-header td {
  background: #f3f5f9;
  padding: 8px 12px !important;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-200);
}
.fin-day-header .badge { margin-right: 8px; vertical-align: middle; }
.fin-day-header strong { margin-right: 10px; }

/* ====== v7.9 老师端小程序式布局 / 日历 / 反馈详情 ====== */
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #0891b2; }

/* 老师端移动端底部导航栏（小程序式） */
.teacher-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 58px;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  display: flex;
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.teacher-tabbar.hidden { display: none; }
.tt-tab {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--gray-500);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 0;
}
.tt-tab .tt-icon { font-size: 22px; line-height: 1; }
.tt-tab.active { color: var(--primary); }
.tt-tab.active .tt-icon { transform: translateY(-1px); }
/* 内容区底部留白，避免被固定导航栏遮挡 */
.page-content.has-tabbar { padding-bottom: 72px; }

.teacher-cal-tip {
  font-size: 13px;
  color: var(--gray-500);
  margin: 12px 2px 0;
  line-height: 1.6;
}

/* 反馈记录：内容单元格可点击查看详情 */
.fb-content-cell { color: var(--gray-700); }
.fb-expand-hint {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  border-bottom: 1px dashed var(--primary);
  line-height: 1.4;
}
.fb-expand-hint:hover { color: var(--primary-dark); border-bottom-style: solid; }
.hw-tags-cell { cursor: pointer; }
.hw-tags-cell:hover { background: var(--gray-50); }

/* 老师反馈记录：已提交锁定提示 */
.fb-locked-note {
  display: inline-block; font-size: 12px; color: var(--gray-400);
  border: 1px dashed var(--gray-300); border-radius: 6px; padding: 2px 8px;
}
/* 系统设置：开关标签 */
.switch-label {
  display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500;
  cursor: pointer; margin-bottom: 6px;
}
.switch-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

/* 反馈详情弹窗 */
.fb-detail { font-size: 14px; line-height: 1.7; }
.fb-detail .detail-row { padding: 4px 0; border-bottom: 1px dashed var(--gray-200); }
.fb-detail .detail-section { margin-top: 12px; }
.fb-detail .detail-section > b { display: block; margin-bottom: 6px; color: var(--gray-700); }
.fb-detail .fb-images { margin-top: 8px; }

/* ====== 教材库（人教版小学数学） ====== */
.tb-wrap { padding: 4px 0; }
.tb-toolbar { margin-bottom: 16px; }
.tb-grade-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tb-grade { cursor: pointer; }
.tb-volume { margin-bottom: 22px; }
.tb-volume-title { font-size: 17px; font-weight: 600; color: var(--gray-800); margin: 0 0 12px; padding-left: 10px; border-left: 4px solid var(--primary); }
.tb-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tb-unit { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.tb-unit-name { font-size: 14px; font-weight: 600; color: var(--gray-800); margin-bottom: 8px; }
.tb-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-topic { font-size: 12px; color: var(--primary-dark); background: var(--primary-light); border-radius: 20px; padding: 3px 10px; }
@media (max-width: 768px) {
  .tb-units { grid-template-columns: 1fr; }
}
  .hw-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .hw-form-actions .btn { flex: 1 1 calc(50% - 8px); margin: 0; }
  .teacher-greeting { text-align: center; padding: 18px 12px; }
}


/* ====== 成绩分析（v7.15） ====== */
.exam-analysis { margin-top: 6px; }
.exam-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.exam-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.exam-card-title { font-size: 15px; font-weight: 600; color: var(--gray-800); margin-bottom: 12px; }
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { width: 56px; flex: 0 0 56px; font-size: 13px; color: var(--gray-600); text-align: right; }
.bar-track { flex: 1; height: 14px; background: var(--gray-100); border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); border-radius: 8px; transition: width .4s ease; }
.bar-fill.bar-subj { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.bar-val { width: 52px; flex: 0 0 52px; font-size: 13px; font-weight: 600; color: var(--gray-700); }
.rank-badge { display: inline-block; min-width: 22px; text-align: center; border-radius: 6px; padding: 2px 6px; font-weight: 700; font-size: 13px; color: #fff; background: var(--gray-400); }
.rank-badge.rank-1 { background: #f59e0b; }
.rank-badge.rank-2 { background: #94a3b8; }
.rank-badge.rank-3 { background: #d97706; }
.trend-up { color: #16a34a; font-weight: 600; }
.trend-down { color: #dc2626; font-weight: 600; }
.trend-flat { color: var(--gray-400); }

/* ====== 从班级相册选择照片（v7.15） ====== */
.album-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; max-height: 56vh; overflow-y: auto; padding: 4px; }
.album-pick { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--gray-100); }
.album-pick img { width: 100%; height: 100%; object-fit: cover; }
.album-pick.picked { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.album-pick-check { position: absolute; right: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }

/* ====== 教材库资源链接（v7.15） ====== */
.tb-topic { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.tb-res { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.tb-res-btn { font-size: 11px; color: #fff; background: var(--primary); border-radius: 14px; padding: 2px 8px; text-decoration: none; }
.tb-res-btn:hover { background: var(--primary-dark); }
.tb-res-edit { font-size: 11px; line-height: 1; border: 1px solid var(--gray-300); background: #fff; color: var(--gray-600); border-radius: 12px; padding: 2px 7px; cursor: pointer; }
.tb-res-edit:hover { background: var(--gray-100); }

@media (max-width: 768px) {
  .exam-cards { grid-template-columns: 1fr; }
}


/* ====== 多彩现代主题（redesign） ====== */
:root {
  /* 扩展色彩系统：在主色基础上增加一组饱和度适中的功能色，避免单一暖橙疲劳 */
  --accent-blue: #4F8CFF;
  --accent-blue-light: #E8F1FF;
  --accent-cyan: #2BBFD8;
  --accent-cyan-light: #E3F8FB;
  --accent-green: #34C759;
  --accent-green-light: #E4F8EA;
  --accent-orange: #FF9F43;
  --accent-orange-light: #FFF2E0;
  --accent-purple: #A55EEA;
  --accent-purple-light: #F4EAFF;
  --accent-pink: #FF6B8A;
  --accent-pink-light: #FFEBEF;
  --accent-teal: #20B2AA;
  --accent-teal-light: #E2F5F4;
  --accent-indigo: #5B6FF0;
  --accent-indigo-light: #E9EBFF;
  --accent-lime: #A3CB38;
  --accent-lime-light: #F3F8E0;
}
.sidebar {
  background: #fff;
  color: var(--gray-700);
  border-right: 1px solid var(--gray-200);
  box-shadow: 2px 0 18px rgba(40,30,20,.05);
}
.sidebar-header { border-bottom: 1px solid var(--gray-200); color: var(--gray-800); padding: 18px 16px; }
.sidebar-header .logo { color: var(--primary); }
.sidebar-header .title { color: var(--gray-800); letter-spacing: .5px; }
.nav-group { margin: 8px 6px; }
.nav-group-title { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--gray-400); padding: 12px 14px 4px; text-transform: uppercase; }
.nav-item { color: #5c5c5c; border-radius: 10px; margin: 2px 0; padding: 10px 12px; transition: all .15s ease; }
.nav-item:hover { color: var(--gray-900); background: var(--gray-100); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); box-shadow: 0 6px 16px rgba(232,131,60,.32); font-weight: 600; }
.nav-ico { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; margin-right: 10px; color: #fff; transition: all .15s ease; }
.nav-item:hover .nav-ico { transform: scale(1.05); }
.nav-item.active .nav-ico { color: #fff; background: rgba(255,255,255,.25) !important; }
.nav-item span:first-child { font-size: 18px; }

/* 侧边栏图标：每组内按顺序分配不同彩色，增加区分度 */
.nav-group .nav-item:nth-of-type(1) .nav-ico { background: linear-gradient(135deg, var(--accent-orange), var(--primary)); }
.nav-group .nav-item:nth-of-type(2) .nav-ico { background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo)); }
.nav-group .nav-item:nth-of-type(3) .nav-ico { background: linear-gradient(135deg, var(--accent-green), var(--accent-teal)); }
.nav-group .nav-item:nth-of-type(4) .nav-ico { background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink)); }
.nav-group .nav-item:nth-of-type(5) .nav-ico { background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)); }
.nav-group .nav-item:nth-of-type(6) .nav-ico { background: linear-gradient(135deg, var(--accent-lime), var(--accent-green)); }
.nav-group .nav-item:nth-of-type(7) .nav-ico { background: linear-gradient(135deg, var(--accent-pink), var(--accent-orange)); }
.sidebar-footer { color: #b3a48f; border-top: 1px solid var(--gray-200); }
.login-logo { color: #fff; }

/* 内联 SVG 图标：继承 currentColor */
.ic-svg { width: 1.25em; height: 1.25em; vertical-align: -0.22em; display: inline-block; }
.nav-ico .ic-svg { width: 19px; height: 19px; vertical-align: middle; }
.nav-label { font-size: 14px; }
.stat-icon .ic-svg { width: 22px; height: 22px; }
.qa-icon .ic-svg { width: 20px; height: 20px; }
.todo-icon .ic-svg { width: 18px; height: 18px; }
.wb-card-icon .ic-svg { width: 24px; height: 24px; color: #fff; }
.tt-icon .ic-svg, .tq-icon .ic-svg { width: 22px; height: 22px; }
/* Emoji→SVG 替换后的上下文尺寸 */
.login-logo .ic-svg { width: 40px; height: 40px; }
.sidebar-header .logo .ic-svg { width: 22px; height: 22px; vertical-align: middle; }
.sidebar-toggle .ic-svg { width: 22px; height: 22px; }
.empty-icon .ic-svg { width: 40px; height: 40px; }
.panel-header h2 .ic-svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.btn .ic-svg { width: 16px; height: 16px; vertical-align: -2px; margin-right: 3px; }
.day-ev-icon .ic-svg { width: 16px; height: 16px; }
.welcome-emoji .ic-svg { width: 56px; height: 56px; }
.weather-widget .ic-svg { width: 18px; height: 18px; vertical-align: -3px; }
@media (max-width: 768px) {
  .login-logo .ic-svg { width: 32px; height: 32px; }
}

/* 手机端工作台 Banner：多彩渐变底 + 半透明蒙层 */
.wb-banner {
  background: linear-gradient(135deg, #FF8F43 0%, #E07A3F 25%, #A55EEA 70%, #4F8CFF 100%);
  color: #fff;
  border-radius: 0 0 22px 22px;
  padding: 22px 16px 18px;
  margin-bottom: 4px;
}
.wb-welcome { color: #fff; }
.wb-subtitle { color: rgba(255,255,255,.9); }
.m-hero-clock { font-size: 40px; font-weight: 800; letter-spacing: 1px; line-height: 1.1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; color: inherit; }
.m-hero-clock--boss { font-size: 34px; color: #fff; }

/* 工作台功能卡片：多彩图标，降低暖橙疲劳 */
.wb-card-icon {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  box-shadow: 0 3px 10px rgba(79,140,255,.30);
  color: #fff;
}
.wb-card:nth-child(1) .wb-card-icon { background: linear-gradient(135deg, var(--accent-orange), var(--primary)); box-shadow: 0 3px 10px rgba(224,122,63,.32); }
.wb-card:nth-child(2) .wb-card-icon { background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo)); box-shadow: 0 3px 10px rgba(79,140,255,.30); }
.wb-card:nth-child(3) .wb-card-icon { background: linear-gradient(135deg, var(--accent-green), var(--accent-teal)); box-shadow: 0 3px 10px rgba(52,199,89,.30); }
.wb-card:nth-child(4) .wb-card-icon { background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink)); box-shadow: 0 3px 10px rgba(165,94,234,.30); }
.wb-card:nth-child(5) .wb-card-icon { background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)); box-shadow: 0 3px 10px rgba(43,191,216,.30); }
.wb-card:nth-child(6) .wb-card-icon { background: linear-gradient(135deg, var(--accent-lime), var(--accent-green)); box-shadow: 0 3px 10px rgba(163,203,56,.30); }
.wb-card:nth-child(7) .wb-card-icon { background: linear-gradient(135deg, var(--accent-pink), var(--accent-orange)); box-shadow: 0 3px 10px rgba(255,107,138,.30); }
.wb-card:nth-child(8) .wb-card-icon { background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan)); box-shadow: 0 3px 10px rgba(32,178,170,.30); }
.wb-card:nth-child(9) .wb-card-icon { background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple)); box-shadow: 0 3px 10px rgba(91,111,240,.30); }
.wb-card:nth-child(10) .wb-card-icon { background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan)); box-shadow: 0 3px 10px rgba(79,140,255,.30); }
.wb-card:nth-child(11) .wb-card-icon { background: linear-gradient(135deg, var(--accent-green), var(--accent-lime)); box-shadow: 0 3px 10px rgba(52,199,89,.30); }
.wb-card-tag { color: #C25E2E; background: rgba(224,122,63,.12); }
.wb-card-action { color: var(--primary); }

/* 老师端快捷按钮：彩色圆形图标 */
.teacher-quick-btn { border-color: transparent; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.teacher-quick-btn .tq-icon {
  width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  box-shadow: 0 3px 10px rgba(79,140,255,.22);
}
.teacher-quick-btn:nth-child(1) .tq-icon { background: linear-gradient(135deg, var(--accent-orange), var(--primary)); box-shadow: 0 3px 10px rgba(224,122,63,.22); }
.teacher-quick-btn:nth-child(2) .tq-icon { background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo)); box-shadow: 0 3px 10px rgba(79,140,255,.22); }
.teacher-quick-btn:nth-child(3) .tq-icon { background: linear-gradient(135deg, var(--accent-green), var(--accent-teal)); box-shadow: 0 3px 10px rgba(52,199,89,.22); }
.teacher-quick-btn:nth-child(4) .tq-icon { background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink)); box-shadow: 0 3px 10px rgba(165,94,234,.22); }

/* 老师端快捷按钮：数字徽章（如「学生名单」后的数字） */
.teacher-quick-btn .tq-count {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  min-width: 22px;
  height: 18px;
  line-height: 18px;
  background: var(--brand-green, #00A651);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  vertical-align: middle;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,166,81,.3);
}
.teacher-quick-btn .tq-count:empty { display: none; }
/* 数字 0 时变灰，避免显示「学生名单 0」造成误解 */
.teacher-quick-btn .tq-count[data-zero="1"] { background: var(--gray-400, #aaa); box-shadow: none; }

/* 老师端：学生风采模板卡片选中态 */
.sc-tpl { transition: all .15s ease; }
.sc-tpl:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* 老师端首页 Hero：与老板端一致的多彩渐变底 + 左右布局 */
.teacher-welcome-banner {
  background: linear-gradient(135deg, #FF8F43 0%, #E07A3F 25%, #A55EEA 70%, #4F8CFF 100%);
  color: #fff;
  border-radius: 0 0 20px 20px;
  padding: 22px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -24px -24px 20px;
}
.teacher-welcome-banner h2 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.teacher-welcome-banner p { color: rgba(255,255,255,.92); font-size: 14px; margin: 4px 0 0; }
.teacher-welcome-banner p b { color: #ffe08a; }
.teacher-welcome-banner .welcome-emoji .ic-svg { color: #fff; }
.badge-light { background: rgba(255,255,255,.22); color: #fff; border: 1px solid rgba(255,255,255,.35); }

/* 桌面端概览统计卡片：彩色渐变图标，降低单一颜色疲劳 */
.stat-icon.blue { background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo)); color: #fff; }
.stat-icon.green { background: linear-gradient(135deg, var(--accent-green), var(--accent-teal)); color: #fff; }
.stat-icon.orange { background: linear-gradient(135deg, #fbbf24, var(--accent-orange)); color: #fff; }
.stat-icon.purple { background: linear-gradient(135deg, var(--accent-purple), #c084fc); color: #fff; }
.stat-icon.red { background: linear-gradient(135deg, #f87171, var(--danger)); color: #fff; }
.stat-icon.pink { background: linear-gradient(135deg, var(--accent-pink), #db2777); color: #fff; }
.stat-icon.teal { background: linear-gradient(135deg, var(--accent-teal), #2dd4bf); color: #fff; }

/* 快捷操作图标：彩色渐变 */
.qa-icon { color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.qa-icon.green { background: linear-gradient(135deg, var(--accent-green), var(--accent-teal)); }
.qa-icon.blue { background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo)); }
.qa-icon.orange { background: linear-gradient(135deg, #fbbf24, var(--accent-orange)); }
.qa-icon.purple { background: linear-gradient(135deg, var(--accent-purple), #c084fc); }
.qa-icon.red { background: linear-gradient(135deg, #f87171, var(--danger)); }
.qa-icon.teal { background: linear-gradient(135deg, var(--accent-teal), #2dd4bf); }

@media (max-width: 768px) {
  .teacher-welcome-banner {
    margin: -12px -12px 12px;
    padding: 18px 14px 16px;
    gap: 10px;
  }
  .teacher-welcome-banner h2 { font-size: 18px; }
  .teacher-welcome-banner .m-hero-clock--boss { font-size: 30px; }
  .teacher-welcome-banner p { font-size: 12px; }
  .teacher-welcome-banner .welcome-emoji .ic-svg { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .teacher-welcome-banner { flex-wrap: wrap; text-align: center; justify-content: center; margin: -10px -10px 12px; padding: 16px 12px 14px; }
  .teacher-welcome-banner > div:first-child { width: 100%; }
  .teacher-welcome-banner .welcome-emoji { display: none; }
  .teacher-welcome-banner .m-hero-clock--boss { font-size: 26px; }
}

/* ====== 校历设置（月历编辑器） ====== */
.sc-cell { cursor: pointer; transition: background 0.15s; }
.sc-cell:hover { background: rgba(0,0,0,0.04); }
.sc-cell.sc-school { background: #E6F1FB; }
.sc-cell.sc-school .att-day-num { color: #185FA5; font-weight: 500; }
.sc-cell.sc-rest { background: var(--color-background-secondary); color: var(--color-text-tertiary); }
.sc-cell.sc-rest .att-day-num { color: var(--color-text-tertiary); }
.sc-cell.sc-holiday { background: #FCEBEB; }
.sc-cell.sc-holiday .att-day-num { color: #A32D2D; font-weight: 500; }
.sc-cell.sc-workday { background: #EAF3DE; }
.sc-cell.sc-workday .att-day-num { color: #27500A; font-weight: 500; }
.sc-cell.sc-custom { box-shadow: inset 0 0 0 2px #FAEEDA; }

.sc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.sc-dot-school { background: #E6F1FB; border: 1px solid #185FA5; }
.sc-dot-rest { background: var(--color-background-secondary); border: 1px solid var(--color-border-tertiary); }
.sc-dot-holiday { background: #FCEBEB; border: 1px solid #A32D2D; }
.sc-dot-workday { background: #EAF3DE; border: 1px solid #3B6D11; }

/* ====== 考勤月历：农历显示 ====== */
.att-day-lunar {
  font-size: 10px;
  line-height: 1.15;
  color: var(--gray-400);
  align-self: flex-start;
  margin-top: 1px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-day-lunar.festival { color: #e11d48; font-weight: 500; }

@media (max-width: 768px) {
  .att-day-lunar { font-size: 8px; }
}

/* ====== 教材知识点详解（v7.16 教材升级） ====== */
.tb-topic-name{font:inherit;color:inherit;background:none;border:none;padding:0;margin:0;line-height:1.6;}
.tb-topic-name.clickable{cursor:pointer;}
.tb-topic-name.clickable:hover{color:var(--primary-dark);text-decoration:underline;}
.tb-topic-name.clickable.on{font-weight:700;text-decoration:underline;}
.tb-detail{margin-top:12px;padding-top:10px;border-top:1px solid var(--gray-200);animation:tbFade .18s ease;}
@keyframes tbFade{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.tb-detail-title{font-size:12.5px;font-weight:700;color:var(--primary-dark);margin-bottom:7px;}
.tb-points{margin:0 0 10px;padding-left:18px;}
.tb-points li{font-size:12.5px;color:var(--gray-700);line-height:1.85;}
.tb-dlist{display:flex;flex-direction:column;gap:7px;}
.tb-ditem{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;line-height:1.8;}
.tb-dtag{flex:none;font-size:11px;font-weight:700;color:#fff;background:var(--primary);border-radius:6px;padding:1px 7px;margin-top:2px;}
.tb-dtext{color:var(--gray-700);}
@media (max-width:768px){
  .tb-topic-name{min-height:30px;display:inline-flex;align-items:center;}
  .tb-ditem,.tb-points li{font-size:13px;}
}
/* ==========================================================================
   照片查看器：转方向 / 放大拖动（2026-09-16 重做）
   为什么加在文件最后：上面的老规则不动，只靠「后面盖前面」覆盖，
   万一新版哪里有问题，把这一段整块删掉就回到老样子。
   ========================================================================== */

/* 弹窗里的那张大图：加转方向、加放大，手指拖的时候别让页面跟着滚 */
.img-lightbox img.img-lb-photo {
  max-width: 94vw;
  max-height: 86vh;
  transform-origin: center center;
  will-change: transform;
  touch-action: none;
  cursor: zoom-in;
}
/* 转过 90 度/270 度之后宽高反过来，可用范围也要换过来，否则会顶出屏幕 */
.img-lightbox img.img-lb-photo.sideways {
  max-width: 86vh;
  max-height: 94vw;
}

/* 左上角两个按钮：转方向 / 放大 */
.img-lb-tools {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.img-lb-btn {
  height: 34px;
  line-height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .22);
}
.img-lb-btn:hover { background: rgba(255, 255, 255, .32); }
.img-lb-btn:active { background: rgba(255, 255, 255, .42); }

/* 底部那句操作提示 */
/* 注意别写成 left:50% + translateX(-50%)：那样「可用的宽度」只剩屏幕的一半，
   一行字会被硬挤成两行。改成左右各留 16px，整行都能用。 */
.img-lb-tip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  text-align: center;
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
}
/* 「第几张 / 共几张」往上挪一点，给下面的提示让位 */
.img-lightbox .img-lb-counter { bottom: 46px; }

/* ==========================================================================
   学情随手记：列表小图改成完整显示
   原来是 70×70 裁成正方形（object-fit:cover），竖着拍的照片只露中间一块。
   现在按高度统一、宽度按比例自动，整张都看得见。
   ========================================================================== */
.note-imgs {
  flex-wrap: wrap;
  align-items: flex-start;
}
.note-imgs img {
  width: auto;
  height: 84px;
  max-width: 100%;
  object-fit: contain;
  background: #f1f5f9;
}
.note-more { cursor: pointer; }

/* 随手记详情弹窗里的照片，同上一并改 */
.note-detail-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.note-detail-imgs img {
  width: auto;
  height: 104px;
  max-width: 100%;
  object-fit: contain;
  background: #f1f5f9;
  border-radius: 8px;
  cursor: zoom-in;
}

/* ===== 成绩分析：试卷照片（2026092302） ===== */
.exam-photo-cell { display: inline-flex; align-items: center; gap: 6px; }
.exam-photo-cell img { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--gray-200); cursor: zoom-in; display: block; }
.exam-photo-more { font-size: 12px; color: var(--gray-500); white-space: nowrap; }
.exam-photo-empty { font-size: 12px; color: var(--gray-400); }
.exam-photo-hint { font-size: 12px; color: var(--gray-400); margin-top: 6px; }
.exam-photo-block .img-upload-input { margin-bottom: 2px; }
/* ====== 成绩分析：试卷分析（2026092303）====== */
.exam-note-chip {
  display: flex; align-items: flex-start; gap: 7px;
  width: 100%; max-width: 272px; min-width: 148px;
  text-align: left; cursor: pointer; font-family: inherit;
  background: var(--accent-indigo-light); border: 1px solid #D8DDFF;
  border-radius: 10px; padding: 7px 10px;
  font-size: 12.5px; line-height: 1.55; color: #3A44A6;
  transition: all .18s ease;
}
.exam-note-chip:hover {
  background: #E0E4FF; border-color: #B7BFFF;
  transform: translateY(-1px); box-shadow: 0 3px 10px rgba(91,111,240,.16);
}
.exam-note-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-indigo); flex: 0 0 6px; margin-top: 6px;
}
.exam-note-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.exam-note-add {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: transparent; border: 1px dashed var(--gray-300);
  color: var(--gray-400); border-radius: 10px; padding: 5px 11px;
  font-size: 12.5px; cursor: pointer; font-family: inherit; transition: all .18s ease;
}
.exam-note-add:hover {
  border-style: solid; border-color: var(--accent-indigo);
  color: var(--accent-indigo); background: var(--accent-indigo-light);
}

/* 录入弹窗里的试卷分析输入区 */
.exam-note-tip { font-weight: 400; font-size: 12px; color: var(--gray-400); }
.exam-note-input { line-height: 1.75; resize: vertical; min-height: 108px; }
.exam-note-count { text-align: right; font-size: 12px; color: var(--gray-400); margin-top: 5px; }
.exam-note-count.on { color: var(--accent-indigo); font-weight: 500; }

/* 试卷分析详情 */
.exam-note-detail { display: flex; flex-direction: column; gap: 16px; }
.exam-note-hero {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #F3F5FF 0%, #FBFCFE 100%);
  border: 1px solid #E2E6FF; border-radius: var(--radius); padding: 14px 16px;
}
.exam-note-avatar {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-indigo), #7C86FF);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600;
}
.exam-note-who { flex: 1; min-width: 0; }
.exam-note-name { font-size: 17px; font-weight: 700; color: var(--gray-800); }
.exam-note-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.exam-note-meta .badge { font-size: 11.5px; padding: 2px 9px; }
.badge-indigo { background: var(--accent-indigo-light); color: var(--accent-indigo); }
.exam-note-date { font-size: 12px; color: var(--gray-400); margin-top: 7px; }
.exam-note-score { flex: 0 0 auto; text-align: center; }
.exam-note-raw { font-size: 12px; color: var(--gray-500); margin-top: 5px; }
.exam-note-raw span { color: var(--gray-400); }

.score-ring { position: relative; display: inline-block; }
.score-ring svg { display: block; }
.score-ring-track { color: var(--gray-200); }
.score-ring-bar { transition: stroke-dashoffset .6s ease; }
.score-ring-good .score-ring-bar { color: var(--success); }
.score-ring-mid  .score-ring-bar { color: var(--primary); }
.score-ring-low  .score-ring-bar { color: var(--danger); }
.score-ring-none .score-ring-bar { color: var(--gray-300); }
.score-ring-txt {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.score-ring-txt b { font-size: 21px; font-weight: 700; color: var(--gray-800); }
.score-ring-txt i { font-size: 12px; font-style: normal; color: var(--gray-400); }

.exam-note-block { border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.exam-note-block-title {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
  font-size: 13px; font-weight: 600; color: var(--gray-700);
}
.exam-note-block-title .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-indigo); }
.exam-note-body { padding: 15px; max-height: 40vh; overflow-y: auto; }
.exam-note-p { margin: 0 0 11px; font-size: 14px; line-height: 1.9; color: var(--gray-700); }
.exam-note-p:last-child { margin-bottom: 0; }
.exam-note-empty { color: var(--gray-400); font-size: 13px; }
.exam-note-actions { display: flex; gap: 10px; justify-content: flex-end; }
.exam-note-foot {
  display: flex; flex-direction: column; gap: 3px; text-align: right;
  font-size: 12px; line-height: 1.6; color: var(--gray-400); margin-top: -4px;
}
.exam-note-foot b { color: var(--gray-600); font-weight: 600; }

@media (max-width: 720px) {
  .exam-note-chip { max-width: none; }
  .exam-note-hero { flex-wrap: wrap; }
  .exam-note-score { margin-left: auto; }
  .exam-note-actions { flex-direction: column-reverse; }
  .exam-note-actions .btn { width: 100%; justify-content: center; }
  .exam-note-foot { text-align: left; }
}

/* ====== 成绩分析改造（2026092701）：批量录入 / 考试台账 / 四率 / 学情诊断 ====== */
.exam-panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.exam-panel-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
.exam-sub { font-size: 12.5px; color: var(--gray-500); }
.exam-tip { font-weight: 400; font-size: 12px; color: var(--gray-400); }

.exam-entry .panel-body { padding: 18px 20px; }
.exam-entry-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}
.exam-entry-grid .form-group { margin-bottom: 0; }
.exam-entry-wide { grid-column: 1 / span 4; }
.exam-entry-acts {
  grid-column: 5 / span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  align-self: end;
}
.exam-entry-acts .btn { width: 100%; }
#exb-scores { min-height: 132px; line-height: 1.75; }

.exb-preview {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-green-light);
  border: 1px solid rgba(43,163,107,.22);
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.85;
}
.exb-preview b { color: var(--accent); font-weight: 600; }
.exb-preview .exb-warn { color: var(--danger); }
.exb-preview .exb-note { color: var(--warning); }

.exam-ledger-panel, .exam-diag-panel { margin-top: 14px; }
.exam-ledger-panel .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.exam-ledger-panel table { min-width: 780px; }
.exam-ledger-row { cursor: pointer; transition: background .12s ease; }
.exam-ledger-row:hover { background: var(--gray-50); }
.exam-ledger-row.active { background: var(--primary-soft); }
.exam-ledger-row.active td { border-top-color: var(--primary-light); }
.exam-ledger-row td.num, .exam-ledger-panel th.num { text-align: right; white-space: nowrap; }
.exam-ledger-row td.num.is-alert { color: var(--danger); font-weight: 600; }

.exam-rate-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 0;
}
.exam-rate-card { border-radius: var(--radius-sm); padding: 14px 16px; }
.exam-rate-card .t { font-size: 12.5px; margin-bottom: 4px; }
.exam-rate-card .v { font-size: 25px; font-weight: 600; line-height: 1.25; letter-spacing: -.4px; }
.exam-rate-card.blue { background: var(--accent-blue-light); color: #33569E; }
.exam-rate-card.blue .t { color: #4A6FB5; }
.exam-rate-card.green { background: var(--accent-green-light); color: #1E7B44; }
.exam-rate-card.green .t { color: #2E8F55; }
.exam-rate-card.orange { background: var(--accent-orange-light); color: #9A5A14; }
.exam-rate-card.orange .t { color: #B0701F; }
.exam-rate-card.pink { background: var(--accent-pink-light); color: #B3374F; }
.exam-rate-card.pink .t { color: #C2485F; }

.exam-diag-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px 0;
}
.exam-diag-grid textarea { min-height: 118px; line-height: 1.75; }
.exam-diag-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px 18px;
}

@media (max-width: 980px) {
  .exam-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exam-entry-wide { grid-column: 1 / -1; }
  .exam-entry-acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .exam-entry-acts .btn { width: auto; flex: 1; min-width: 118px; }
}
@media (max-width: 640px) {
  .exam-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-rate-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-rate-card .v { font-size: 22px; }
  .exam-panel-head { padding: 14px; }
  .exam-entry .panel-body { padding: 14px; }
  .exam-rate-cards { padding: 14px 14px 0; }
  .exam-diag-grid { grid-template-columns: 1fr; padding: 14px 14px 0; }
  .exam-diag-foot { padding: 12px 14px 16px; }
  .exam-diag-foot .row-actions { width: 100%; }
  .exam-diag-foot .row-actions .btn { flex: 1; }
}
