/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 文本截断样式 */
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.content-wrapper {
  max-width: 300px;
}

.content-preview {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;
  --primary: #3b82f6;
  --primary-hover: #1d4ed8;
  --row-alt: #fafafa;
}

:root[data-theme="dark"] {
  --bg: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --card: #111827;
  --border: #374151;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --row-alt: #0b1220;
}

body {
  padding: 8px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  max-width: 100vw;
  overflow-x: hidden;
}

/* 夜间模式 */
:root[data-theme="dark"] body {
  background: #0f172a;
  color: #e5e7eb;
}

:root[data-theme="dark"] .selected {
  background-color: #1f2937;
  color: #e5e7eb;
  border-color: #374151;
}

/* 表格交替行样式 */
.alternate-row {
  background-color: var(--row-alt);
}
:root[data-theme="dark"] .options {
  background-color: #1f2937;
  color: #e5e7eb;
  border-color: #374151;
  box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}
:root[data-theme="dark"] .option {
  background-color: #1f2937;
  color: #e5e7eb;
}
:root[data-theme="dark"] .option:hover {
  background-color: #374151;
}
:root[data-theme="dark"] .arrow {
  fill: #9ca3af;
}

:root[data-theme="dark"] .table-data {
  background-color: #111827;
}
:root[data-theme="dark"] .table-data thead {
  background-color: #1f2937;
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 11;
}
:root[data-theme="dark"] .table-data th {
  color: #e5e7eb;
  border-bottom-color: #374151;
  background-color: #1f2937; /* 深色背景下吸顶背景 */
  box-shadow: 0 2px 0 rgba(255,255,255,0.06);
  text-align: center !important;
}
:root[data-theme="dark"] .table-data td {
  color: #d1d5db;
  border-bottom-color: #374151;
}
:root[data-theme="dark"] .table-data tbody tr:hover {
  background-color: #1f2937;
}

:root[data-theme="dark"] .button-primary {
  background-color: #2563eb;
}
:root[data-theme="dark"] .button-primary:hover {
  background-color: #1d4ed8;
}
:root[data-theme="dark"] .button-secondary {
  background-color: #4b5563;
}
:root[data-theme="dark"] .button-tertiary {
  background-color: #374151;
  color: #e5e7eb;
}
:root[data-theme="dark"] .button-tertiary:hover {
  background-color: #4b5563;
}

.select {
  margin: 0 auto;
  width: fit-content;
  cursor: pointer;
  position: relative;
  transition: 300ms;
  color: white;
  overflow: visible; /* 修改为visible，确保下拉选项可以显示 */
  /* font-size: 22px; */
}

.selected {
  background-color: #fff;
  padding: 6px 36px 6px 12px; /* 右侧为箭头预留空间，避免与居中文本重叠 */
  margin-bottom: 0; /* 移除底部边距 */
  border-radius: 5px;
  position: relative;
  z-index: 100000;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 320px;
  height: 50px;
  font-size: 22px;
  color: #111;
  border: 1px solid #e5e7eb;
}

.arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  height: 10px;
  transform: translateY(-50%) rotate(-90deg);
  width: 25px;
  fill: #6b7280;
  z-index: 100000;
  transition: 300ms;
}

.options {
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  padding: 5px;
  background-color: #fff;
  position: absolute; /* 改为绝对定位，覆盖在页面上 */
  top: 100%; /* 定位在selected元素下方 */
  left: 0;
  width: 100%; /* 与selected元素同宽 */
  max-height: 200px; /* 限制最大高度 */
  overflow-y: auto; /* 内容过多时显示滚动条 */
  opacity: 0;
  visibility: hidden; /* 使用visibility替代opacity，实现真正的隐藏 */
  transition: opacity 0.3s, visibility 0.3s; /* 添加visibility过渡 */
  z-index: 99999; /* 确保下拉选项显示在其他内容之上 */
  margin-top: 5px; /* 与selected元素保持一点间距 */
  transform-origin: top center; /* 设置变换原点 */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
  color: #111;
  border: 1px solid #e5e7eb;
}

/* 仅在 .select.open 时展开 */
/* 移除 hover/focus 自动展开，避免一直保持下拉状态 */

/* 确保下拉选项在点击时也能显示 */
.select.open > .options {
  opacity: 1;
  visibility: visible;
}

.select.open > .selected .arrow {
  transform: translateY(-50%) rotate(0deg);
}

.option {
  border-radius: 5px;
  padding: 5px;
  transition: 300ms;
  background-color: #fff;
  width: 100%;

  font-size: 15px;
  text-align: center;
  color: #111;
}
.option:hover {
  background-color: #f3f4f6;
}

.options input[type="radio"] {
  display: none;
}

.options label {
  display: block;
  width: 100%;
  text-align: center;
  color: #111;
}

.options input[type="radio"]:checked + label {
  display: none;
}

.options input[type="radio"]#all:checked + label {
  display: none;
}

/* 统一选中文本居中显示 */
.selected-text {
  flex: 1 1 auto;
  width: 100%;
  text-align: center;
}

/* 表格容器样式 */
.table-container {
  width: 100%;
  margin: 0 auto;
  margin-top: 2vh;
  overflow-x: auto; /* 水平滚动支持 */
  /* 让页面滚动，而不是容器内部滚动，便于表头相对窗口吸顶 */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  position: relative; /* 使粘性定位的参考容器明确 */
  background: var(--card);
}

/* 表格基础样式 */
.table-data {
  width: 100%;
  min-width: 600px; /* 设置最小宽度，确保表格内容不被过度压缩 */
  border-collapse: separate; /* 避免部分浏览器下 sticky 失效 */
  border-spacing: 0; /* 还原无间距效果 */
  table-layout: auto; /* 列宽自适应 */
  background-color: var(--card);
}

/* 表头样式 */
.table-data thead {
  background-color: #f3f4f6; /* 浅灰色背景 */
  position: sticky;
  position: -webkit-sticky; /* Safari/iOS */
  top: 0;
  z-index: 11;
}

/* 表头单元格样式 */
.table-data th {
  padding: 12px 15px;
  text-align: center !important;
  font-weight: 600;
  color: #374151; /* 深灰色文字 */
  border-bottom: 2px solid #e5e7eb; /* 底部分隔线 */
  white-space: nowrap; /* 防止文字换行 */
  position: sticky;
  position: -webkit-sticky; /* Safari/iOS 兼容 */
  top: 0;
  z-index: 10; /* 避免被内容覆盖 */
  background-color: #f3f4f6; /* 与thead背景一致，确保粘滞时遮盖内容 */
  box-shadow: 0 2px 0 rgba(0,0,0,0.03);
}

/* 表格内容样式 */
.table-data td {
  padding: 12px 15px;
  border-bottom: 1px solid #e5e7eb; /* 底部分隔线 */
  max-width: none;
  color: #4b5563; /* 中灰���文字 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* 表格列宽限制 */
.table-data td:nth-child(1) { width: 50px; } /* 复选框列 */
.table-data td:nth-child(2) { max-width: 300px; text-align: left; } /* 内容列 */
.table-data td:nth-child(3) { max-width: 120px; } /* 老师列 */
.table-data td:nth-child(4) { max-width: 100px; } /* 群组ID列 */
.table-data td:nth-child(5) { max-width: 150px; } /* 时间列 */
.table-data td:nth-child(6) { width: auto; min-width: 280px; } /* 操作列 */

/* 条纹行与悬停优化 */
.table-data tbody tr:nth-child(even) {
  background: var(--row-alt);
}
:root[data-theme="dark"] .table-data tbody tr:nth-child(even) {
  background: var(--row-alt);
}
.table-data tbody tr:hover {
  background-color: rgba(59, 130, 246, 0.08); /* primary 淡色 */
}
:root[data-theme="dark"] .table-data tbody tr:hover {
  background-color: rgba(37, 99, 235, 0.15);
}

/* 隐藏第1列(ID)和第2列(发送者) */

/* 空状态样式 */
.empty-row td {
  padding: 24px 12px;
}
.empty-text {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
/* 确保空状态单元格不被前两列隐藏规则影响 */
.table-data tr.empty-row td { display: table-cell !important; }

/* batchBar中的老师选择器样式 */
#batchBar {
  position: relative;
  z-index: 100; /* 高于表头，但低于下拉选项 */
  isolation: isolate; /* 创建新的层叠上下文 */
}

#batchBar .select {
  margin: 0;
  width: 120px; /* 调小默认宽度 */
  min-width: 100px; /* 调小最小宽度 */
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

#batchBar .select.open {
  width: 160px; /* 打开时适当放宽 */
}

#batchBar > :not(.select) {
  position: relative;
  z-index: 5;
}

#batchBar .select .selected {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 8px 30px 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 36px;
  display: flex;
  align-items: center;
}

#batchBar .select .selected:hover {
  border-color: var(--primary);
}

#batchBar .select .selected .arrow {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
}

#batchBar .select .options {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: 4px;
  position: absolute;
  top: 100%;
  left: 50%; /* 居中对齐 */
  transform: translateX(-80px); /* 向左偏移80px（下拉框宽度160px的一半），实现居中 */
  width: 160px; /* 与打开时的选择器宽度匹配 */
  min-width: 160px;
  display: none; /* 默认隐藏 */
}

#batchBar .select .options .option {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  border-radius: 4px;
  margin: 2px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#batchBar .select .options .option:hover {
  background: var(--primary);
  color: white;
}

#batchBar .select.open {
  z-index: 1000;
  position: relative; /* 确保定位上下文正确 */
}

#batchBar .select.open > .options {
  display: flex;
  flex-direction: column;
  z-index: 99999; /* 远高于表头的z-index 10 */
  position: absolute;
  top: 100%;
  left: 50%; /* 从选择器中心开始 */
  transform: translateX(-80px); /* 向左偏移80px（下拉框宽度160px的一半），实现居中 */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); /* 增强阴影效果 */
  width: 160px; /* 与选择器打开时的宽度匹配 */
  min-width: 160px;
}

/* 深色主题适配 */
:root[data-theme="dark"] #batchBar .select .selected {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

:root[data-theme="dark"] #batchBar .select .selected:hover {
  border-color: var(--primary);
}

:root[data-theme="dark"] #batchBar .select .options {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] #batchBar .select .options .option {
  color: var(--text);
}

:root[data-theme="dark"] #batchBar .select .options .option:hover {
  background: var(--primary);
  color: white;
}

/* 表头中的老师选择器样式 */
.table-header-select {
  position: relative;
  display: inline-block;
  width: 100%;
  cursor: pointer;
  z-index: 15; /* 确保在表头之上 */
  pointer-events: auto; /* 确保可以点击 */
}

.table-header-select .selected {
  background: transparent;
  border: none;
  padding: 4px 20px 4px 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  position: relative;
  z-index: 20; /* 确保在表头之上 */
  pointer-events: auto; /* 确保可以点击 */
}

.table-header-select .selected:hover {
  background: var(--primary);
  color: white;
}

.table-header-select .selected .arrow {
  right: 0;
  width: 12px;
  height: 12px;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
  color: var(--text);
}

.table-header-select .selected:hover .arrow {
  color: white;
}

.table-header-select.open .selected .arrow {
  transform: translateY(-50%) rotate(180deg);
}

.table-header-select .options {
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 160px;
  min-width: 160px;
  display: none;
  /* 这些样式现在由JavaScript控制 */
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
}

.table-header-select.open .options {
  display: flex !important;
  flex-direction: column;
}

.table-header-select .options .option {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  border-radius: 4px;
  margin: 2px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.table-header-select .options .option:hover {
  background: var(--primary);
  color: white;
}

/* 深色主题适配 */
:root[data-theme="dark"] .table-header-select .selected {
  color: var(--text);
}

:root[data-theme="dark"] .table-header-select .selected:hover {
  background: var(--primary);
  color: white;
}

:root[data-theme="dark"] .table-header-select .options {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .table-header-select .options .option {
  color: var(--text);
}


/* 超时消息老师选择器专用样式 */
/* 首先确保表头单元格有足够空间 */
#timeoutMessagesContent th:nth-child(2) {
  position: relative;
  width: 150px;
  text-align: right;
  padding-right: 8px;
}

#timeoutTeacherSelect {
  width: auto !important;
  min-width: 80px;
  max-width: 120px;
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

#timeoutTeacherSelect .selected {
  background: transparent;
  border: none;
  padding: 4px 20px 4px 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  width: 100%;
  text-align: right;
}

#timeoutTeacherSelect .selected:hover {
  background: var(--primary);
  color: white;
}

#timeoutTeacherSelect .selected svg {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

#timeoutTeacherSelect.open .selected svg {
  transform: translateY(-50%) rotate(180deg);
}

#timeoutTeacherSelect .dropdown {
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 150px;
  min-width: 150px;
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

#timeoutTeacherSelect.open .dropdown {
  display: block !important;
}

#timeoutTeacherSelect .dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  border-radius: 4px;
  margin: 2px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

#timeoutTeacherSelect .dropdown-item:hover {
  background: var(--primary);
  color: white;
}

/* 深色主题适配 */
:root[data-theme="dark"] #timeoutTeacherSelect .selected {
  color: var(--text);
}

:root[data-theme="dark"] #timeoutTeacherSelect .selected:hover {
  background: var(--primary);
  color: white;
}

:root[data-theme="dark"] #timeoutTeacherSelect .dropdown {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] #timeoutTeacherSelect .dropdown-item {
  color: var(--text);
}

/* 手机模式下深色主题的batchBar样式 */
@media (max-width: 480px) {
  :root[data-theme="dark"] #batchBar .select .selected {
    background: var(--card);
    border-color: var(--border);
    color: var(--text);
  }

  :root[data-theme="dark"] #batchBar .select .options {
    background: var(--card);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

/* 响应式表格 - 小屏幕设备 */
@media (max-width: 768px) {
  .table-container {
    border-radius: 0;
    width: 100%;
  }

  .table-data {
    font-size: 14px; /* 减小字体大小 */
  }

  .table-data th,
  .table-data td {
    padding: 10px 12px; /* 减小内边距 */
  }

  /* 小屏幕列宽调整 */
  .table-data td:nth-child(1) { width: 40px; }
  .table-data td:nth-child(2) { max-width: 150px; }
  .table-data td:nth-child(3) { max-width: 80px; }
  .table-data td:nth-child(4) { max-width: 60px; }
  .table-data td:nth-child(5) { max-width: 100px; }
  .table-data td:nth-child(6) { min-width: 200px; }

  /* 下拉在手机上占满一行，文本居中，箭头缩小固定右侧 */
  .select {
    width: 100%;
    max-width: 100%;
    position: sticky; /* 置顶 */
    top: 8px;
    z-index: 9000; /* 高于表格等内容 */
  }
  .selected {
    width: 100%;
    height: 44px;
    font-size: 18px;
    padding: 6px 36px 6px 12px; /* 右侧为箭头预留空间 */
    background-color: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-radius: 10px;
  }
  .selected-text {
    width: 100%;
    text-align: center;
  }
  .arrow {
    right: 12px;
    width: 20px;
    height: 10px;
    fill: #6b7280;
  }
  .options {
    width: 100%;
    background-color: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
  }
  .option {
    font-size: 16px;
    padding: 10px;
    background-color: #fff;
    color: #111;
  }
  body {
    padding: 12px;
  }

  /* 主题按钮与下拉不重叠：把按钮下移并调小尺寸 */
  .icon-button {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    z-index: 10000;
  }

  /* 分页在手机上垂直堆叠并居中 */
  #pagination {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px !important;
    width: 100%;
  }
  #pagination .pager-controls,
  #pagination .pager-meta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  #pagination .pager-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  #pagination .pager-jump input[type="number"] {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
  }
  #pagination button { min-width: 80px; height: 32px; font-size: 12px; }

  /* 主题切换按钮在小屏幕上的适配 */
  .icon-button {
    width: 36px;
    height: 36px;
    right: 8px;
    top: 8px;
  }

  /* 退出按钮响应式 */
  #logoutBtn {
    right: 50px !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  /* 标签按钮响应式 */
  .tab-button {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* batchBar在中等屏幕尺寸上的优化 */
  #batchBar {
    flex-wrap: wrap;
    gap: 8px !important;
    padding: 10px !important;
  }

  #batchBar .button-primary,
  #batchBar .button-secondary,
  #batchBar .button-tertiary {
    height: 38px;
    padding: 8px 14px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  #batchBar .select {
    width: 120px; /* 中等屏幕模式下也调小 */
    min-width: 100px;
    height: 38px;
  }

  #batchBar .select .selected {
    height: 38px;
    padding: 8px 30px 8px 12px;
    font-size: 14px;
    line-height: 1.2;
  }

  #batchBar .select .selected .arrow {
    right: 8px;
    width: 16px;
    height: 16px;
  }

  #batchBar select {
    height: 38px;
    padding: 7px 10px;
    font-size: 14px;
  }

  #batchBar #selectedCount {
    font-size: 13px;
    padding: 8px 0;
    white-space: nowrap;
  }
}

/* 响应式表格 - 更小屏幕设备 */
@media (max-width: 480px) {
  body {
    padding: 4px;
  }

  .table-container {
    border: none;
    margin-top: 1vh;
  }

  .table-data th,
  .table-data td {
    padding: 6px 8px; /* 进一步减小内边距 */
    font-size: 12px;
  }

  /* 表头单元格在小屏幕上可能需要换行 */
  .table-data th {
    white-space: normal;
    font-weight: 700;
    font-size: 11px;
  }

  /* 超小屏幕列宽调整 */
  .table-data td:nth-child(1) { width: 30px; }
  .table-data td:nth-child(2) { max-width: 100px; }
  .table-data td:nth-child(3) { max-width: 60px; }
  .table-data td:nth-child(4) { max-width: 50px; }
  .table-data td:nth-child(5) { max-width: 80px; }
  .table-data td:nth-child(6) { min-width: 150px; }

  .selected {
    height: 40px;
    font-size: 14px;
    padding: 6px 30px 6px 8px;
    background-color: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
  }
  .arrow {
    right: 8px;
    width: 16px;
    fill: #6b7280;
  }
  .option {
    font-size: 15px;
    padding: 9px;
    background-color: #fff;
    color: #111;
  }
  .button-primary,
  .button-secondary,
  .button-tertiary {
    padding: 4px 8px;
    font-size: 13px;
  }

  /* batchBar中的元素在手机模式下统一高度 */
  #batchBar {
    flex-wrap: wrap;
    gap: 6px !important;
    padding: 8px !important;
  }

  #batchBar .button-primary,
  #batchBar .button-secondary,
  #batchBar .button-tertiary {
    height: 36px;
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  #batchBar .select {
    width: 110px; /* 手机模式下也调小 */
    min-width: 90px;
    height: 36px;
  }

  #batchBar .select .selected {
    height: 36px;
    padding: 8px 28px 8px 10px;
    font-size: 13px;
    line-height: 1.2;
  }

  #batchBar .select .selected .arrow {
    right: 6px;
    width: 14px;
    height: 14px;
  }

  #batchBar select {
    height: 36px;
    padding: 6px 8px;
    font-size: 13px;
  }

  #batchBar #selectedCount {
    font-size: 12px;
    padding: 8px 0;
    white-space: nowrap;
  }

  /* 主题按钮进一步微调位置以免遮挡 */
  .icon-button {
    top: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
  }
}

/* 按钮美化 */
.button-primary,
.button-secondary,
.button-tertiary {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.05s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.button-primary:active,
.button-secondary:active,
.button-tertiary:active {
  transform: translateY(1px);
}
.button-primary {
  background-color: var(--primary);
  color: white;
}
.button-primary:hover { background-color: var(--primary-hover); }

.button-secondary {
  background-color: #6b7280;
  color: white;
}
.button-secondary:hover { background-color: #4b5563; }

.button-tertiary {
  background-color: #e5e7eb;
  color: #374151;
}
.button-tertiary:hover { background-color: #d1d5db; }
:root[data-theme="dark"] .button-tertiary { background-color: #374151; color: #e5e7eb; }
:root[data-theme="dark"] .button-tertiary:hover { background-color: #4b5563; }

/* 分页样式（通用） */
#pagination {
  color: #374151;
}
#pagination span {
  color: inherit;
}
#pagination select {
  background-color: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px 8px;
}

/* 夜间模式下分页颜色覆盖 */
:root[data-theme="dark"] #pagination,
:root[data-theme="dark"] #pagination span {
  color: #e5e7eb !important;
}
:root[data-theme="dark"] #pagination select {
  background-color: #111827;
  color: #e5e7eb;
  border-color: #374151;
}

/* 顶部主题按钮增强 */
.icon-button {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 10000;
}
.icon-button:hover { filter: brightness(0.97); }
.icon-button svg { fill: currentColor; }
:root[data-theme="dark"] .icon-button { color: #f9fafb; }

/* 内容点击弹窗 */
.content-popover {
  position: absolute;
  max-width: min(80vw, 600px);
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 1000000;
  word-break: break-word;
  white-space: normal;
}
.content-popover .actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.content-popover .content-text {
  max-height: 50vh;
  overflow: auto;
  line-height: 1.5;
}
.content-popover .icon-only {
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4b5563;
}
.content-popover .icon-only:hover {
  background: #f3f4f6;
}
:root[data-theme="dark"] .content-popover .icon-only {
  background: #2d3748; /* 更亮一些以与弹窗背景区分 */
  border-color: #9ca3af; /* 边框对比更强 */
  color: #f9fafb; /* 图标更亮 */
  box-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
:root[data-theme="dark"] .content-popover .icon-only:hover {
  background: #4b5563;
}
.content-popover .icon-only svg { fill: currentColor; width: 16px; height: 16px; }
:root[data-theme="dark"] .content-popover {
  background: #1f2937;
  color: #e5e7eb;
  border-color: #374151;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

/* 下拉选优化：过渡更顺滑 */
.options {
  transition: opacity 0.25s ease, visibility 0.25s ease;
  border: 1px solid var(--border);
}
.selected { border: 1px solid var(--border); border-radius: 10px; }
.option { border-radius: 8px; }

/* 项目选择器样式 */
.project-select {
  margin: 0 auto 15px auto;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
  position: relative;
  transition: 300ms;
  color: white;
  overflow: visible;
}

.project-select .selected {
  background-color: var(--card);
  padding: 6px 36px 6px 12px;
  margin-bottom: 0;
  border-radius: 10px;
  position: relative;
  z-index: 100000;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 44px;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.project-select .options {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  padding: 6px;
  background-color: var(--card);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 99998;
  margin-top: 5px;
  transform-origin: top center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: var(--text);
  border: 1px solid var(--border);
}

.project-select.open > .options {
  opacity: 1;
  visibility: visible;
}

.project-select.open > .selected .arrow {
  transform: translateY(-50%) rotate(0deg);
}

.project-select .option {
  border-radius: 6px;
  padding: 8px;
  transition: 200ms;
  background-color: var(--card);
  width: 100%;
  font-size: 15px;
  text-align: center;
  color: var(--text);
}

.project-select .option:hover {
  background-color: var(--row-alt);
}

/* 功能标签页样式 */
.function-tabs {
  background-color: var(--card);
  padding: 0 16px;
}

.tab-button {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-button:hover {
  color: var(--text);
  background-color: rgba(0,0,0,0.02);
}

.tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

:root[data-theme="dark"] .tab-button:hover {
  background-color: rgba(255,255,255,0.05);
}

.tab-content {
  display: none;
}

.tab-content:first-child,
.tab-content#messagesTab {
  display: block;
}


/* 用户管理样式 - 修复隐藏问题 */
.users-sub-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.users-sub-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.users-sub-tab:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb, 59, 130, 246), 0.1);
}

.users-sub-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(var(--primary-rgb, 59, 130, 246), 0.1);
}

.users-sub-content {
  display: none;
}

.users-sub-content.active {
  display: block;
}

/* 用户状态徽章 */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.active {
  background-color: #dcfce7;
  color: #166534;
}

.status-badge.inactive {
  background-color: #fee2e2;
  color: #991b1b;
}

:root[data-theme="dark"] .status-badge.active {
  background-color: #166534;
  color: #dcfce7;
}

:root[data-theme="dark"] .status-badge.inactive {
  background-color: #991b1b;
  color: #fee2e2;
}

/* 项目选择器在移动端的适配 */
@media (max-width: 768px) {
  .project-select {
    width: 100%;
    max-width: 100%;
    position: sticky;
    top: 8px;
    z-index: 8990;
  }

  .project-select .selected {
    width: 100%;
    height: 40px;
    font-size: 15px;
  }

  .function-tabs {
    padding: 0 12px;
  }

  .tab-button {
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* 分页区域微调 */
#pagination { gap: 8px; }
#pagination select {
  background-color: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
}
:root[data-theme="dark"] #pagination select {
  background-color: #111827;
}

/* 选择框尺寸与可见性优化 */
.row-select {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}
:root[data-theme="dark"] .row-select {
  accent-color: var(--primary);
}

/* 用户选择器样式 */
.user-select {
  position: relative;
  width: 80px;
  z-index: 1000;
}

.user-select .selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.user-select .selected:hover {
  background: var(--bg);
}

.user-select .arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 4px;
}

.user-select.open > .selected .arrow {
  transform: rotate(180deg);
}

.user-select .options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  z-index: 1001;
}

.user-select.open > .options {
  display: block;
}

.user-select .user-option {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 12px;
}

.user-select .user-option:hover {
  background: var(--bg);
}

.user-select .option-icon {
  margin-right: 8px;
  font-size: 14px;
}

.user-select .option-text {
  flex: 1;
}

/* 深色主题下的用户选择器 */
:root[data-theme="dark"] .user-select .selected {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

:root[data-theme="dark"] .user-select .options {
  background: var(--card);
  border-color: var(--border);
}

:root[data-theme="dark"] .user-select .user-option {
  color: var(--text);
}

:root[data-theme="dark"] .user-select .user-option:hover {
  background: var(--bg);
}

/* 综合选择器样式 */
.combined-select {
  position: relative;
  width: 300px;
}

.combined-select .selected {
  background: var(--card);
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 10px 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  color: var(--text);
  transition: all 0.3s ease;
}

.combined-select .selected:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.combined-select .selected .arrow {
  transition: transform 0.3s ease;
  color: var(--primary);
}

.combined-select.open > .selected .arrow {
  transform: rotate(180deg);
}

.combined-select .options {
  background: var(--card);
  border: 1px solid var(--primary);
  border-radius: 10px;
  margin-top: 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.combined-select.open > .options {
  display: block;
}

.combined-section {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.combined-section:last-child {
  border-bottom: none;
}

.section-title {
  padding: 8px 15px;
  font-weight: 600;
  color: var(--primary);
  font-size: 14px;
  background: var(--bg);
  margin: 0;
  border-radius: 6px;
  margin: 4px 8px;
}

.combined-option {
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  color: var(--text);
  border-radius: 6px;
  margin: 2px 8px;
}

.combined-option:hover {
  background: var(--primary);
  color: white;
}

.combined-option.active {
  background: var(--accent);
  color: white;
  font-weight: 500;
}

.combined-option.selected::after {
  content: '✓';
  margin-left: auto;
  font-weight: bold;
}

/* 深色主题适配 */
:root[data-theme="dark"] .combined-select .selected {
  background: var(--card);
  color: var(--text);
  border-color: var(--primary);
}

:root[data-theme="dark"] .combined-select .options {
  background: var(--card);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .combined-section {
  border-bottom-color: var(--border);
}

:root[data-theme="dark"] .section-title {
  background: var(--bg);
  color: var(--primary);
}

:root[data-theme="dark"] .combined-option {
  color: var(--text);
}

:root[data-theme="dark"] .combined-option:hover {
  background: var(--primary);
  color: white;
}

:root[data-theme="dark"] .combined-option.active {
  background: var(--accent);
  color: white;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .combined-select {
    width: 100%;
    max-width: 300px;
  }

  .combined-select .options {
    max-height: 300px;
  }
}

@media (max-width: 480px) {
  .combined-select {
    width: 100%;
  }

  .combined-select .selected {
    padding: 12px;
    font-size: 14px;
  }

  .combined-select .options {
    max-height: 250px;
  }

  .section-title {
    padding: 10px 12px;
    font-size: 13px;
  }

  .combined-option {
    padding: 12px;
    font-size: 14px;
  }
}

/* 弹窗样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  position: relative;
}

.modal-content h3 {
  margin-bottom: 20px;
  text-align: center;
  color: var(--text);
}

/* 中等屏幕适配 */
@media (min-width: 481px) and (max-width: 768px) {
  .table-container {
    margin-top: 1.5vh;
  }

  .table-data th,
  .table-data td {
    padding: 9px 11px;
    font-size: 13px;
  }

  .table-data th {
    font-size: 12px;
  }

  .selected {
    height: 42px;
    font-size: 15px;
  }

  /* 标签按钮中等屏幕适配 */
  .tab-button {
    font-size: 13px;
    padding: 9px 15px;
  }
}

/* Desktop pagination layout */
@media (min-width: 769px) {
  #pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px !important;
    gap: 16px;
  }
  #pagination > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  #pagination > div:last-child {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  #pagination button {
    min-width: 94px;
    height: 34px;
  }
  #pagination #pageInfo {
    margin: 0 8px;
    color: var(--muted) !important;
    font-size: 14px;
  }
}

/* 超时消息子标签样式 */
.timeout-sub-tabs {
  border-bottom: 1px solid var(--border) !important;
}

.timeout-sub-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.timeout-sub-tab:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb, 59, 130, 246), 0.1);
}

.timeout-sub-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(var(--primary-rgb, 59, 130, 246), 0.1);
}

.timeout-sub-content {
  display: none;
}

.timeout-sub-content.active {
  display: block;
}

/* 筛选区域样式 */
.filter-section {
  border-bottom: 1px solid var(--border) !important;
}

.filter-section input[type="date"] {
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  padding: 4px 8px !important;
}

.filter-section input[type="date"] {
  border: none !important;
  background: transparent !important;
  color: var(--text) !important;
  padding: 0 !important;
  font-size: 14px !important;
  outline: none !important;
  cursor: pointer !important;
}

.filter-section input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: none;
}

.filter-section input[type="date"]::-webkit-inner-spin-button {
  cursor: pointer;
  filter: none;
}

.filter-section input[type="date"]::-webkit-outer-spin-button {
  cursor: pointer;
  filter: none;
}

/* 日期选择器容器样式 */
.filter-section div[onclick]:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 59, 130, 246), 0.1);
}

.filter-section input[type="date"]:focus {
  outline: none !important;
}

/* 超时消息详情弹窗样式 */
.timeout-detail-modal {
  display: flex;
  flex-direction: column;
  max-width: 95vw;
  max-height: 95vh;
  width: 1400px;
  height: 800px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.modal-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: var(--border);
  color: var(--text);
}

.modal-body {
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  flex: 1;
  overflow: hidden;
}

.table-container {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 20px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.detail-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  border-bottom: 2px solid var(--border);
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.detail-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.detail-table .col-question {
  width: 25%;
  text-align: left;
  max-width: 300px;
}

.detail-table .col-teacher,
.detail-table .col-group {
  width: 10%;
  text-align: center;
}

.detail-table .col-time {
  width: 15%;
  text-align: center;
  white-space: nowrap;
}

.detail-table .col-duration {
  width: 10%;
  text-align: center;
  white-space: nowrap;
  font-weight: bold;
  color: #ef4444;
}

/* 分页控件样式 */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.pagination-info {
  color: var(--muted);
  font-size: 14px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pagination {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-pagination:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-pagination:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-input {
  width: 50px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
}

.page-total {
  color: var(--muted);
  font-size: 13px;
}

.page-size-select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

/* 夜间模式下的弹窗样式 */
:root[data-theme="dark"] .modal-close-btn:hover {
  background: #374151;
}

:root[data-theme="dark"] .btn-pagination:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .timeout-detail-modal {
    width: 95vw;
    height: 90vh;
    max-width: none;
    max-height: none;
  }

  .modal-header,
  .modal-body {
    padding: 16px;
  }

  .detail-table {
    font-size: 12px;
  }

  .detail-table th,
  .detail-table td {
    padding: 8px 4px;
  }

  .pagination-container {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .pagination-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* 用户管理子标签样式 */
.user-management-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  background: var(--card);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.user-tab-button {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.user-tab-button:hover {
  background: var(--border);
  color: var(--text);
}

.user-tab-button.active {
  background: var(--card);
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}


/* 用户管理基本样式 */
#usersTab {
  width: 100%;
  padding: 0;
}


/* 用户管理表格样式 */
.table-container {
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.table-container .table-data {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.table-container .table-data th {
  background: var(--border);
  padding: 12px 16px;
  text-align: center !important;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--border);
}

.table-container .table-data td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table-container .table-data tr:hover {
  background: var(--row-alt);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .user-management-tabs {
    flex-direction: column;
    border-bottom: none;
    border-radius: 8px;
  }

  .user-tab-button {
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .user-tab-button.active {
    border-bottom-color: var(--primary);
  }

  .table-container .table-data th,
  .table-container .table-data td {
    padding: 8px 12px;
    font-size: 13px;
  }

  .user-tab-button {
    font-size: 13px;
    padding: 10px 16px;
  }
}

/* 状态徽章样式 */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-active {
  background-color: #10b981;
  color: white;
}

.status-inactive {
  background-color: #6b7280;
  color: white;
}

/* 角色徽章样式 */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.role-admin {
  background-color: #ef4444;
  color: white;
}

.role-teacher {
  background-color: #3b82f6;
  color: white;
}

.role-assistant {
  background-color: #8b5cf6;
  color: white;
}

.role-student {
  background-color: #10b981;
  color: white;
}

.role-unknown {
  background-color: #6b7280;
  color: white;
}

/* 夜间模式下的徽章样式 */
:root[data-theme="dark"] .status-active {
  background-color: #059669;
}

:root[data-theme="dark"] .status-inactive {
  background-color: #4b5563;
}

:root[data-theme="dark"] .role-admin {
  background-color: #dc2626;
}

:root[data-theme="dark"] .role-teacher {
  background-color: #2563eb;
}

:root[data-theme="dark"] .role-assistant {
  background-color: #7c3aed;
}

:root[data-theme="dark"] .role-student {
  background-color: #059669;
}

:root[data-theme="dark"] .role-unknown {
  background-color: #4b5563;
}
