/* ---------------------------------------------------- */
/* 设计系统 & 基础样式 (飞书协同工作台风格) */
/* ---------------------------------------------------- */
:root {
  --feishu-blue: #3370ff;
  --feishu-blue-hover: #2b5edb;
  --feishu-blue-light: #e8f0ff;
  --bg-primary: #f5f6f7;
  --bg-sidebar: #1f2329;
  --bg-card: #ffffff;
  --text-main: #1f2329;
  --text-sub: #646a73;
  --text-placeholder: #8f959e;
  --border-light: #dee0e3;
  --border-hover: #bbbfc4;
  --success: #34c759;
  --success-light: #eafbe7;
  --warning: #ff9500;
  --danger: #ff3b30;
  --danger-light: #ffebeb;
  --font-family: 'Outfit', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 2px 8px rgba(31, 35, 41, 0.05);
  --shadow-md: 0 4px 16px rgba(31, 35, 41, 0.08);
  --shadow-lg: 0 12px 32px rgba(31, 35, 41, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  height: 100vh;
}

button, input, select, textarea {
  font-family: inherit;
  outline: none;
}

/* 统一按钮设计 */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  gap: 8px;
}

.btn-primary {
  background-color: var(--feishu-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--feishu-blue-hover);
}

.btn-secondary {
  background-color: var(--feishu-blue-light);
  color: var(--feishu-blue);
}

.btn-secondary:hover {
  background-color: rgba(51, 112, 255, 0.15);
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.btn-close:hover {
  background-color: rgba(31, 35, 41, 0.08);
  color: var(--text-main);
}

/* ---------------------------------------------------- */
/* 1. 登录页面样式 */
/* ---------------------------------------------------- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #f0f4ff 0%, #f5f6f7 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 32px;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.feishu-logo {
  display: inline-flex;
  padding: 12px;
  background-color: var(--feishu-blue-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.login-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.login-header .subtitle {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  transition: var(--transition-fast);
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--feishu-blue);
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.15);
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▼';
  font-size: 10px;
  color: var(--text-sub);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

.btn-login {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.error-msg {
  color: var(--danger);
  background-color: var(--danger-light);
  padding: 10px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  text-align: center;
}

/* ---------------------------------------------------- */
/* 2. 主页面布局样式 */
/* ---------------------------------------------------- */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* PC 端侧边栏 */
.sidebar {
  width: 240px;
  background-color: var(--bg-sidebar);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-role {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #ffffff;
}

.sidebar-menu {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition-fast);
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.menu-item.active {
  background-color: var(--feishu-blue);
  color: #ffffff;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.teacher-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--feishu-blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.info-text {
  display: flex;
  flex-direction: column;
}

.info-text .name {
  font-size: 13.5px;
  font-weight: 600;
}

.info-text .org-name {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.btn-icon-logout {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.btn-icon-logout:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* 移动端底部 TabBar 导航 (默认隐藏) */
.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #ffffff;
  border-top: 1px solid var(--border-light);
  z-index: 99;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}

.mobile-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
  height: 100%;
  gap: 4px;
  transition: var(--transition-fast);
}

.mobile-tab-item.active {
  color: var(--feishu-blue);
}

/* 主内容区 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.content-header {
  height: 64px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.breadcrumb {
  font-size: 14px;
  font-weight: 500;
}

.breadcrumb .current-path-parent {
  color: var(--text-sub);
}

.breadcrumb .separator {
  color: var(--text-placeholder);
  margin: 0 8px;
}

.breadcrumb .current-path {
  color: var(--text-main);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-qrcode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-main);
}

.btn-qrcode:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-primary);
}

.select-class {
  padding: 8px 32px 8px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background-color: #ffffff;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23646a73' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px top 50%;
}

.select-class:focus {
  border-color: var(--feishu-blue);
}

/* ---------------------------------------------------- */
/* 3. 面板与组件样式 */
/* ---------------------------------------------------- */
.panel {
  display: none;
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.panel.active {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 核心统计指标卡片 Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.metric-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.bg-gradient-blue {
  background: linear-gradient(135deg, #3370ff 0%, #1f55cc 100%);
  color: #ffffff;
  border: none;
}

.metric-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.metric-info .label {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
  color: inherit;
}

.metric-card:not(.bg-gradient-blue) .metric-info .label {
  color: var(--text-sub);
}

.metric-info .value {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-info .value-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.metric-info .sub-value {
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 500;
}

.metric-info .sub-label {
  font-size: 11px;
  opacity: 0.7;
}

.metric-card:not(.bg-gradient-blue) .metric-info .sub-label {
  color: var(--text-sub);
  opacity: 1;
}

.trend-indicator.up {
  color: var(--success);
  font-weight: bold;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: var(--bg-primary);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--feishu-blue);
  border-radius: 3px;
  transition: width 0.6s ease-out;
}

/* 左右分栏工作台 */
.workbench-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

#student-panel > .card {
  flex-shrink: 0;
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-actions.flex-row {
  display: flex;
  flex-direction: row;
}

.search-input {
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  width: 180px;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--feishu-blue);
  width: 220px;
}

.select-small {
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  cursor: pointer;
}

.card-body {
  padding: 24px;
}

.card-body.no-padding {
  padding: 0;
}

/* 表格样式 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-students {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.table-students th {
  padding: 14px 20px;
  font-weight: 600;
  color: var(--text-sub);
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-light);
}

.table-students td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table-students tr:last-child td {
  border-bottom: none;
}

.table-students tr:hover td {
  background-color: #fcfdfe;
}

/* 状态标签 */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
}

.status-tag.completed {
  background-color: var(--success-light);
  color: var(--success);
}

.status-tag.assigned {
  background-color: var(--feishu-blue-light);
  color: var(--feishu-blue);
}

.status-tag.unstarted {
  background-color: #f1f2f3;
  color: var(--text-sub);
}

/* 动作按钮 */
.action-link {
  color: var(--feishu-blue);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 13px;
  transition: var(--transition-fast);
}

.action-link:hover {
  text-decoration: underline;
  color: var(--feishu-blue-hover);
}

.loading-placeholder {
  text-align: center;
  padding: 40px;
  color: var(--text-placeholder);
  font-size: 14px;
}

/* ---------------------------------------------------- */
/* 4. 条形图与每周走势 */
/* ---------------------------------------------------- */
.weekly-trend-chart {
  display: flex;
  height: 180px;
  margin-top: 16px;
  position: relative;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
}

.chart-y-axis {
  width: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-placeholder);
  padding-right: 6px;
  text-align: right;
  height: 100%;
}

.chart-bars {
  flex: 1;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 100%;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 14%;
  gap: 8px;
}

.bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  width: 100%;
  justify-content: center;
}

.bar {
  width: 10px;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease-out;
  cursor: pointer;
}

.bar-fluency {
  background-color: var(--feishu-blue);
}

.bar-fluency:hover {
  background-color: var(--feishu-blue-hover);
}

.bar-accuracy {
  background-color: var(--success);
}

.bar-accuracy:hover {
  background-color: #2fb04f;
}

.bar-label {
  font-size: 10px;
  color: var(--text-sub);
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--text-sub);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-item .dot.fluency {
  background-color: var(--feishu-blue);
}

.legend-item .dot.accuracy {
  background-color: var(--success);
}

.radar-summary-box {
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 20px;
  font-size: 12.5px;
  line-height: 1.6;
}

.radar-summary-box h4 {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.radar-summary-box p {
  color: var(--text-sub);
}

/* ---------------------------------------------------- */
/* 5. 计划配置读本关联网格 (配置读本模态框专用) */
/* ---------------------------------------------------- */
.plan-books-setup-grid {
  display: flex;
  gap: 24px;
  width: 100%;
}

.plan-books-setup-grid > .setup-section {
  flex: 1;
  min-width: 0;
}

@media (max-width: 767px) {
  .plan-books-setup-grid {
    flex-direction: column;
    gap: 16px;
  }
}

.setup-section {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  background-color: #fafbfc;
  max-height: 480px;
  overflow-y: auto;
}

/* Premium Interactive Book Cards */
.clickable-book-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
  font-size: 13.5px;
}

.clickable-book-card:hover {
  border-color: var(--feishu-blue);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.book-title-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.book-title-info strong {
  font-weight: 600;
  color: var(--text-main);
}

.book-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.badge {
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-grade {
  background-color: #f1f5f9;
  color: #475569;
}

.badge-diff {
  background-color: #eff6ff;
  color: #1d4ed8;
}

.badge-lexile {
  background-color: #f0fdf4;
  color: #15803d;
  font-weight: 600;
}

.badge-words {
  background-color: #fffbeb;
  color: #b45309;
}

/* Action arrows */
.btn-action-arrow {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-sub);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-fast);
  margin: 0 4px;
}

.clickable-book-card:hover .btn-action-arrow {
  background-color: var(--feishu-blue);
  color: #ffffff;
  border-color: var(--feishu-blue);
}

.configured-book-item:hover .btn-action-arrow {
  background-color: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.available-book-select-row .book-details {
  font-size: 11px;
  color: var(--text-placeholder);
}

/* ---------------------------------------------------- */
/* 6. 学生管理与状态开关 */
/* ---------------------------------------------------- */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider-switch {
  background-color: var(--success);
}

input:checked + .slider-switch:before {
  transform: translateX(18px);
}

.status-label {
  font-size: 12px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 500;
}

.status-label.active {
  color: var(--success);
}

.status-label.inactive {
  color: var(--text-sub);
}

/* ---------------------------------------------------- */
/* 7. 原生 Dialog (Glassmorphism 飞书风) */
/* ---------------------------------------------------- */
dialog.modal-dialog {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin: auto;
  max-width: 650px;
  width: calc(100% - 32px);
  background-color: var(--bg-card);
  overflow: hidden;
  padding: 0;
}

dialog.modal-dialog::backdrop {
  background: rgba(31, 35, 41, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

dialog.modal-dialog:has(.large) {
  max-width: 1120px;
  width: 92vw;
}

.modal-content {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.modal-content.large {
  width: 100%;
}

.btn-close .icon-mobile {
  display: none;
}
.btn-close .icon-pc {
  display: inline;
}

.modal-dialog[open] {
  animation: scaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-header .sub-title {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 14px;
}

/* ---------------------------------------------------- */
/* 8. 回听评阅内部网格 */
/* ---------------------------------------------------- */
.review-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}

.audio-player-wrapper {
  margin-bottom: 20px;
}

.custom-audio-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.btn-audio-control {
  background-color: var(--feishu-blue);
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  box-shadow: 0 2px 6px rgba(51, 112, 255, 0.3);
}

.btn-audio-control:hover {
  background-color: var(--feishu-blue-hover);
  transform: scale(1.05);
}

.audio-timeline {
  flex: 1;
  height: 6px;
  background-color: var(--border-light);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.audio-progress-bar {
  height: 100%;
  background-color: var(--feishu-blue);
  border-radius: 3px;
  position: absolute;
  left: 0;
  top: 0;
}

.time-label {
  font-size: 11px;
  color: var(--text-sub);
  font-family: 'Outfit', sans-serif;
  min-width: 65px;
  text-align: right;
}

.reading-text-card {
  background-color: #f8fafc;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.paragraph-text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  margin-bottom: 12px;
}

.paragraph-text span {
  display: inline-block;
  margin-right: 4px;
}

.word-error {
  color: var(--danger);
  font-weight: 600;
  border-bottom: 2px wavy var(--danger);
  cursor: help;
  position: relative;
}

.word-error:hover::after {
  content: "AI 发音异常";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: #ffffff;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
}

.text-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-sub);
}

.dot-red {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--danger);
  display: inline-block;
}

/* 调分滑块 */
.score-adjust-panel {
  background-color: #f6f8fa;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.score-display {
  display: flex;
  align-items: baseline;
  color: var(--feishu-blue);
}

.large-score {
  font-size: 40px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
}

.score-unit {
  font-size: 14px;
  font-weight: 600;
  margin-left: 4px;
}

.slider-container {
  margin-bottom: 20px;
}

.premium-slider {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  appearance: none;
  outline: none;
}

.premium-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--feishu-blue);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(51, 112, 255, 0.4);
  transition: transform 0.1s ease-in;
}

.premium-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-placeholder);
  padding: 0 4px;
  margin-top: 6px;
  font-family: 'Outfit', sans-serif;
}

.ai-score-dimensions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
  gap: 12px;
}

.dimension {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
  gap: 4px;
}

.dimension span {
  font-size: 11px;
  color: var(--text-placeholder);
}

.dimension strong {
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
}

/* 评语表单 */
.teacher-feedback-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  resize: none;
  transition: var(--transition-fast);
  background-color: #ffffff;
}

.teacher-feedback-form textarea:focus {
  border-color: var(--feishu-blue);
}

.quick-comments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.btn-quick-comment {
  text-align: left;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.btn-quick-comment:hover {
  background-color: var(--feishu-blue-light);
  border-color: rgba(51, 112, 255, 0.3);
  color: var(--feishu-blue);
}

/* ---------------------------------------------------- */
/* 9. 小程序二维码 */
/* ---------------------------------------------------- */
.qrcode-content {
  max-width: 380px;
}

.qrcode-intro {
  color: var(--text-sub);
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.qrcode-svg-container {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.qrcode-svg {
  filter: drop-shadow(0 4px 12px rgba(31,35,41,0.08));
}

.qrcode-meta {
  background-color: #f1f5f9;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 11.5px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-class {
  background-color: var(--feishu-blue);
  color: #ffffff;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
}

.qrcode-meta .tip {
  color: var(--text-sub);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastIn {
  from {
    bottom: 8px;
    opacity: 0;
  }
  to {
    bottom: 24px;
    opacity: 1;
  }
}

/* 辅色 & 工具类 */
.hidden {
  display: none !important;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.w-full {
  width: 100%;
}

.mt-4 {
  margin-top: 16px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  height: 18px;
  width: 18px;
  background-color: #eee;
  border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--feishu-blue);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 3px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------------------------------------------------- */
/* 10. 📱 手机端 (移动端) 媒体查询自适应分流 */
/* ---------------------------------------------------- */
@media (max-width: 767px) {
  /* 隐藏 PC 侧边栏和头部非移动操作 */
  .sidebar {
    display: none !important;
  }

  .content-header {
    padding: 0 16px;
    height: 56px;
  }

  .breadcrumb {
    font-size: 13px;
  }

  .breadcrumb .current-path-parent, 
  .breadcrumb .separator {
    display: none; /* 手机端只显示当前视图 */
  }

  /* 显式展示手机底栏 Tab */
  .mobile-tabbar {
    display: flex;
  }

  /* 让主内容区底部留白，防遮挡 */
  .main-content {
    margin-bottom: 60px;
    height: calc(100vh - 60px);
  }

  .panel {
    padding: 16px;
    gap: 16px;
  }

  /* 核心卡片重排为纵向单列 */
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .metric-card {
    padding: 16px;
  }

  .metric-info .value {
    font-size: 18px;
  }

  /* 左右分栏变为纵向单列并展开 */
  .workbench-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* 缩窄表格列宽和间距以防横向溢出严重 */
  .table-students th, 
  .table-students td {
    padding: 12px 10px;
    font-size: 12.5px;
  }

  /* 隐藏非关键的表格列以适应窄屏 */
  .table-students th:nth-child(4), /* 答题率 */
  .table-students td:nth-child(4),
  .table-students th:nth-child(6), /* 完成时间 */
  .table-students td:nth-child(6) {
    display: none;
  }

  /* 手机端 Dialog 全屏页面跳转式交互 */
  dialog.modal-dialog[open] {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background-color: var(--bg-primary) !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
  }
  dialog.modal-dialog::backdrop {
    display: none !important;
  }
  .modal-content {
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  .modal-content.large {
    width: 100% !important;
    max-width: 100% !important;
  }
  .modal-header {
    flex-direction: row-reverse !important;
    justify-content: flex-end !important;
    gap: 16px !important;
    padding: 12px 16px !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--border-light) !important;
  }
  .modal-header > div,
  .modal-header > h3 {
    flex: 1;
    margin: 0 !important;
  }
  .modal-header .btn-close {
    margin: 0 !important;
    order: -1;
  }
  .modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 16px !important;
    background-color: var(--bg-primary) !important;
  }
  .setup-section {
    max-height: 240px !important;
  }
  .btn-close .icon-mobile {
    display: inline !important;
  }
  .btn-close .icon-pc {
    display: none !important;
  }
  .review-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .review-section-left, 
  .review-section-right {
    width: 100%;
  }
  .large-score {
    font-size: 32px;
  }

  /* 移动端打卡进度表格卡片化重构 */
  .table-responsive {
    overflow-x: visible !important;
    border: none !important;
  }
  
  .table-students {
    display: block !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
  }
  
  .table-students thead {
    display: none !important;
  }
  
  .table-students tbody {
    display: block !important;
  }

  /* 1. 今日打卡看板学生列表 */
  #student-progress-list {
    display: block !important;
  }
  #student-progress-list tr {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(31, 35, 41, 0.04) !important;
    position: relative !important;
    gap: 6px !important;
    opacity: 1 !important; /* 消除停用账号在手机上过度变淡问题 */
  }
  #student-progress-list td {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    text-align: left !important;
    width: 100% !important;
  }
  /* 姓名与标签 */
  #student-progress-list tr td:nth-child(1) {
    font-size: 15px !important;
    color: var(--text-main) !important;
    padding-right: 80px !important; /* 防止被绝对定位的状态标签重叠 */
  }
  /* 状态 tag 绝对定位到右上角 */
  #student-progress-list tr td:nth-child(2) {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: auto !important;
  }
  /* 今日打卡书目 */
  #student-progress-list tr td:nth-child(3) {
    font-size: 13.5px !important;
    margin: 4px 0 !important;
  }
  /* 今日口语得分 */
  #student-progress-list tr td:nth-child(4) {
    font-size: 13px !important;
    color: var(--text-sub) !important;
  }
  #student-progress-list tr td:nth-child(4)::before {
    content: "今日口语分：";
    color: var(--text-placeholder);
    font-weight: normal;
  }
  /* 个人打卡进度条 */
  #student-progress-list tr td:nth-child(5) {
    margin: 4px 0 !important;
  }
  #student-progress-list tr td:nth-child(5) > div {
    width: 100% !important;
  }
  /* 提交时间 */
  #student-progress-list tr td:nth-child(6) {
    font-size: 12px !important;
    color: var(--text-placeholder) !important;
  }
  #student-progress-list tr td:nth-child(6)::before {
    content: "提交时间：";
  }
  /* 操作栏 */
  #student-progress-list tr td:nth-child(7) {
    margin-top: 6px !important;
    padding-top: 8px !important;
    border-top: 1px dashed var(--border-light) !important;
    display: flex !important;
    justify-content: flex-end !important;
  }

  /* 2. 学生名册管理面板 */
  #mgmt-student-list {
    display: block !important;
  }
  #mgmt-student-list tr {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(31, 35, 41, 0.04) !important;
    position: relative !important;
    gap: 6px !important;
  }
  #mgmt-student-list td {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    text-align: left !important;
    width: 100% !important;
  }
  /* 姓名/头像 */
  #mgmt-student-list tr td:nth-child(1) {
    font-size: 15px !important;
    color: var(--text-main) !important;
    padding-right: 80px !important;
  }
  /* 微信绑定状态绝对定位右上角 */
  #mgmt-student-list tr td:nth-child(2) {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: auto !important;
  }
  /* 级标签 */
  #mgmt-student-list tr td:nth-child(3)::before {
    content: "推荐年级：";
    color: var(--text-placeholder);
    font-weight: normal;
  }
  #mgmt-student-list tr td:nth-child(3) {
    font-size: 13px !important;
  }
  /* 年龄 */
  #mgmt-student-list tr td:nth-child(4)::before {
    content: "年龄：";
    color: var(--text-placeholder);
    font-weight: normal;
  }
  #mgmt-student-list tr td:nth-child(4) {
    font-size: 13px !important;
  }
  /* 成长能量 */
  #mgmt-student-list tr td:nth-child(5)::before {
    content: "累计成长能量：";
    color: var(--text-placeholder);
    font-weight: normal;
  }
  #mgmt-student-list tr td:nth-child(5) {
    font-size: 13px !important;
  }
  /* 家长关联手机 */
  #mgmt-student-list tr td:nth-child(6)::before {
    content: "绑定家长手机：";
    color: var(--text-placeholder);
    font-weight: normal;
  }
  #mgmt-student-list tr td:nth-child(6) {
    font-size: 13px !important;
  }
  /* 账号开启状态 */
  #mgmt-student-list tr td:nth-child(7) {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 4px 0 !important;
  }
  /* 修改基本资料 */
  #mgmt-student-list tr td:nth-child(8) {
    margin-top: 6px !important;
    padding-top: 8px !important;
    border-top: 1px dashed var(--border-light) !important;
    display: flex !important;
    justify-content: flex-end !important;
  }

  /* 3. 班级计划列表响应式卡片化 */
  #plan-list-body {
    display: block !important;
  }
  #plan-list-body tr {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(31, 35, 41, 0.04) !important;
    position: relative !important;
    gap: 6px !important;
  }
  #plan-list-body td {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    text-align: left !important;
    width: 100% !important;
  }
  /* 计划名称 */
  #plan-list-body tr td:nth-child(1) {
    font-size: 15px !important;
    color: var(--text-main) !important;
    font-weight: bold !important;
  }
  /* 计划时间 */
  #plan-list-body tr td:nth-child(2)::before {
    content: "计划时长：";
    color: var(--text-placeholder);
  }
  #plan-list-body tr td:nth-child(2) {
    font-size: 13.5px !important;
  }
  /* 包含读本数 */
  #plan-list-body tr td:nth-child(3)::before {
    content: "已配读本：";
    color: var(--text-placeholder);
  }
  #plan-list-body tr td:nth-child(3) {
    font-size: 13.5px !important;
  }
  /* 第一个读本 */
  #plan-list-body tr td:nth-child(4)::before {
    content: "首测文章：";
    color: var(--text-placeholder);
  }
  #plan-list-body tr td:nth-child(4) {
    font-size: 13.5px !important;
    display: block !important; /* 强制覆盖原本 td:nth-child(4) display:none 隐藏规则 */
  }
  /* 计划状态 (开关) */
  #plan-list-body tr td:nth-child(5) {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 4px 0 !important;
  }
  /* 修改读本配置按钮 */
  #plan-list-body tr td:nth-child(6) {
    margin-top: 6px !important;
    padding-top: 8px !important;
    border-top: 1px dashed var(--border-light) !important;
    display: flex !important; /* 强制覆盖原本 td:nth-child(6) display:none 隐藏规则 */
    justify-content: flex-end !important;
  }
}

/* ==================================================== */
/* 微信绑定小程序 Dialog 精美视觉重新设计 */
/* ==================================================== */
.qrcode-content {
  max-width: 400px !important;
}

.qrcode-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(31, 35, 41, 0.04);
}

.qrcode-box {
  position: relative;
  display: inline-block;
  padding: 14px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  margin: 12px 0 20px 0;
  box-shadow: 0 4px 16px rgba(51, 112, 255, 0.06);
}

.qrcode-image {
  display: block;
  width: 240px;
  height: 240px;
  border-radius: 8px;
}

.qrcode-image[hidden] {
  display: none;
}

.qrcode-pulse-glow {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid rgba(51, 112, 255, 0.15);
  border-radius: 20px;
  animation: qrcodeGlow 2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes qrcodeGlow {
  0% { transform: scale(0.98); opacity: 0.5; }
  50% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(0.98); opacity: 0.5; }
}

.qrcode-steps {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 12px 0 20px 0;
  background: #f8fafc;
  padding: 12px 8px;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-num {
  width: 20px;
  height: 20px;
  background: var(--feishu-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-desc {
  font-size: 10.5px;
  color: var(--text-sub);
  font-weight: 500;
}

.step-arrow {
  color: var(--text-placeholder);
  font-size: 12px;
  font-weight: bold;
}

.qrcode-meta-new {
  text-align: left;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  margin-top: 12px;
}

.badge-class-new {
  display: inline-block;
  background: #e8f0ff;
  color: var(--feishu-blue);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
  border: 1px solid rgba(51, 112, 255, 0.15);
}

.tip-text {
  font-size: 11.5px;
  color: var(--text-sub);
  line-height: 1.5;
  margin: 0;
}

.btn-primary-new {
  background-color: var(--feishu-blue);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(51, 112, 255, 0.15);
  width: 100%;
}

.btn-primary-new:hover {
  background-color: #275df5;
  box-shadow: 0 6px 16px rgba(51, 112, 255, 0.25);
  transform: translateY(-1px);
}

.btn-primary-new:active {
  transform: translateY(0);
}

/* ==================================================== */
/* 读本可选列表底部的分页控制区 */
/* ==================================================== */
.config-books-pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.btn-pagination {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-pagination:hover:not(:disabled) {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: var(--feishu-blue);
}

.btn-pagination:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f1f5f9;
}

.pagination-indicator {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
}

/* ==========================================================================
   📂 历史打卡详情手风琴 (Accordion) 高级飞书质感样式
   ========================================================================== */

/* 主行样式 */
.history-main-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.history-main-row:hover {
  background-color: #f8fafc !important;
}

.history-arrow-icon {
  display: inline-block;
  font-size: 10px;
  color: #94a3b8;
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.history-main-row.expanded .history-arrow-icon {
  transform: rotate(90deg);
  color: var(--feishu-blue);
}

/* 详情行展开 */
.history-detail-row {
  background-color: #fcfdfe !important;
}

.history-detail-row.hidden {
  display: none;
}

.history-accordion-content {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  animation: fadeInAccordion 0.3s ease-out;
}

@keyframes fadeInAccordion {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 二栏布局 */
.history-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 992px) {
  .history-detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.history-oral-detail, 
.history-quiz-detail {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.history-oral-detail h4,
.history-quiz-detail h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 3px solid var(--feishu-blue);
  padding-left: 8px;
}

/* 跟读维度胶囊分 */
.oral-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.metric-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-pill span {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.metric-pill strong {
  font-size: 16px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--feishu-blue);
}

/* 录音核心指标 */
.oral-audio-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed #e2e8f0;
}

.oral-audio-stats > div {
  font-size: 12px;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.oral-audio-stats strong {
  font-family: 'Outfit', sans-serif;
  color: #0f172a;
}

/* AI智能诊断框 */
.oral-feedback-box {
  background: #f5f3ff;
  border: 1px solid #e0d7ff;
  border-radius: 8px;
  padding: 12px;
}

.oral-feedback-box strong {
  font-size: 12.5px;
  color: #6d28d9;
  display: block;
  margin-bottom: 4px;
}

.oral-feedback-box p {
  font-size: 12px;
  line-height: 1.5;
  color: #5b21b6;
  margin: 0;
}

/* 阅读理解题目卡 */
.quiz-q-card {
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.quiz-q-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.quiz-q-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
  line-height: 1.4;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.quiz-opt-item {
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background-color: #f8fafc;
  color: #334155;
  transition: all 0.2s ease;
}

/* 正确选项样式 */
.quiz-opt-item.correct {
  border-color: #86efac;
  background-color: #f0fdf4;
  color: #166534;
  font-weight: 600;
}

/* 错误选项样式 */
.quiz-opt-item.incorrect {
  border-color: #fca5a5;
  background-color: #fef2f2;
  color: #991b1b;
  font-weight: 600;
}

/* 解析说明样式 */
.quiz-explanation {
  background-color: #f8fafc;
  border-left: 3px solid #cbd5e1;
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  margin-top: 8px;
}

.quiz-explanation.correct-wrapper {
  border-left-color: #22c55e;
}

.quiz-explanation.incorrect-wrapper {
  border-left-color: #ef4444;
}

.quiz-explanation strong {
  font-size: 12px;
  color: #475569;
}

.quiz-explanation .explanation-text {
  font-size: 12px;
  color: #64748b;
  margin: 6px 0 0 0;
  line-height: 1.4;
}

.text-success {
  color: #166534 !important;
  font-weight: bold;
}

.text-danger {
  color: #991b1b !important;
  font-weight: bold;
}

/* 错漏词胶囊 */
.badge-red-issue {
  display: inline-block;
  font-size: 11px;
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 1px 6px;
  border-radius: 4px;
  margin: 2px 4px;
  font-weight: 500;
}

.badge-yellow-issue {
  display: inline-block;
  font-size: 11px;
  background-color: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 1px 6px;
  border-radius: 4px;
  margin: 2px 4px;
  font-weight: 500;
}

/* IRI 读本难度匹配指示胶囊 */
.iri-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  border: 1px solid;
}

.iri-badge.independent {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.iri-badge.instructional {
  background-color: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.iri-badge.frustration {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.iri-card-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
