/* ========== 学情报告系统样式 ========== */

/* --- 通用报告页面 --- */
.report-page {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 200;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.report-page.active { display: flex; }

.report-header {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.report-header .back-btn {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 20px; color: #333;
}
.report-header .header-title {
  flex: 1; text-align: center; font-size: 17px; font-weight: 600; color: #333;
}
.report-header .header-right {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #666; position: relative; font-size: 22px; font-weight: 300;
}
.report-header-menu {
  display: none; position: absolute; top: 38px; right: 0; background: #fff;
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); min-width: 140px;
  z-index: 100; overflow: hidden;
}
.report-header-menu.show { display: block; }
.report-menu-item {
  padding: 13px 18px; font-size: 14px; color: #333; white-space: nowrap;
  transition: background .15s;
}
.report-menu-item:active { background: #f5f5f5; }
.report-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
}

/* --- 考试报告列表页 --- */
.report-tabs {
  display: flex; justify-content: center; padding: 12px 16px 8px; gap: 0;
}
.report-tab-btn {
  padding: 8px 28px; font-size: 14px; border: 2px solid #3ecfb4; cursor: pointer;
  background: #fff; color: #3ecfb4; font-weight: 500; transition: all .2s;
}
.report-tab-btn:first-child { border-radius: 20px 0 0 20px; }
.report-tab-btn:last-child { border-radius: 0 20px 20px 0; }
.report-tab-btn.active { background: #3ecfb4; color: #fff; }

.report-year-row {
  display: flex; justify-content: flex-end; padding: 8px 16px;
}
.report-year-select {
  padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px;
  color: #333; background: #fff; outline: none;
}

.exam-list { padding: 0; }
.exam-list-item {
  padding: 18px 20px; border-bottom: 1px solid #f0f0f0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: flex-start;
  transition: background .15s;
}
.exam-list-item:active { background: #f9f9f9; }
.exam-item-left {}
.exam-item-name { font-size: 15px; color: #333; font-weight: 500; }
.exam-item-name::after { content: ' >'; color: #ccc; font-weight: 400; }
.exam-item-date { font-size: 12px; color: #999; margin-top: 8px; }
.exam-item-status { font-size: 13px; color: #3ecfb4; font-weight: 500; }
.exam-item-status.unpublished { color: #ff6b4a; }

.exam-list-empty {
  text-align: center; padding: 60px 20px; color: #bbb; font-size: 14px;
}
.exam-list-end {
  text-align: center; padding: 20px; color: #ccc; font-size: 13px;
}

/* --- 未发布弹窗 --- */
.unpublish-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.unpublish-modal-box {
  background: #fff; border-radius: 14px; width: 300px; text-align: center; overflow: hidden;
}
.unpublish-modal-body { padding: 30px 24px 20px; }
.unpublish-modal-body h3 { font-size: 17px; color: #333; margin-bottom: 14px; }
.unpublish-modal-body p { font-size: 13px; color: #999; line-height: 1.8; }
.unpublish-modal-btn {
  padding: 14px; border-top: 1px solid #f0f0f0; cursor: pointer;
  font-size: 16px; color: #3ecfb4; font-weight: 500;
}
.unpublish-modal-btn:active { background: #f9f9f9; }

/* --- 成绩报告详情页 --- */
.subject-tabs {
  display: flex; padding: 0 16px; border-bottom: 1px solid #f0f0f0;
  overflow-x: auto; flex-shrink: 0; gap: 0;
}
.subject-tabs::-webkit-scrollbar { display: none; }
.subject-tab {
  padding: 14px 16px; font-size: 15px; color: #666; cursor: pointer;
  white-space: nowrap; position: relative; transition: color .2s; flex-shrink: 0;
}
.subject-tab.active { color: #3ecfb4; font-weight: 600; }
.subject-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px; background: #3ecfb4; border-radius: 2px;
}

/* 分数展示区 */
.score-hero {
  padding: 24px 20px 20px; position: relative;
}
.score-hero .score-label { font-size: 14px; color: #666; margin-bottom: 6px; }
.score-hero .score-big {
  font-size: 42px; font-weight: 700; color: #222; line-height: 1;
}
.score-hero .score-big .score-unit { font-size: 16px; font-weight: 500; color: #666; }
.score-hero .score-full { font-size: 14px; color: #999; margin-left: 10px; }
/* 圆形装饰 */
.score-hero::before {
  content: ''; position: absolute; top: 10px; right: 20px;
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(62,207,180,0.1); z-index: 0;
}
.score-hero::after {
  content: ''; position: absolute; top: 40px; right: 50px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(62,207,180,0.08); z-index: 0;
}

/* 科目成绩表 */
.subject-score-table { padding: 0 20px 16px; }
.subject-score-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid #f5f5f5;
}
.subject-score-row:first-child {
  padding: 10px 0; font-size: 13px; color: #999; border-bottom: 1px solid #eee;
}
.subject-score-name { font-size: 15px; color: #333; }
.subject-score-val { font-size: 15px; color: #333; }
.subject-score-val .full-score { color: #ccc; }

/* --- 等级进度条 --- */
.grade-bar-section {
  margin: 0 20px; padding: 20px 0 10px; border-top: 6px solid #f5f5f5;
}
.grade-bar-title-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.grade-bar-title { font-size: 16px; font-weight: 600; color: #333; }
.grade-bar-year { font-size: 12px; color: #999; padding: 4px 10px; border: 1px solid #ddd; border-radius: 12px; }

.grade-toggle-row { display: flex; gap: 0; margin-bottom: 16px; }
.grade-toggle-btn {
  padding: 6px 16px; font-size: 12px; border: 1.5px solid #3ecfb4; cursor: pointer;
  background: #fff; color: #3ecfb4; transition: all .2s;
}
.grade-toggle-btn:first-child { border-radius: 14px 0 0 14px; }
.grade-toggle-btn:last-child { border-radius: 0 14px 14px 0; }
.grade-toggle-btn.active { background: #3ecfb4; color: #fff; }

/* 彩色等级条 */
.grade-color-bar {
  height: 14px; border-radius: 7px; display: flex; overflow: hidden; margin-bottom: 4px;
  position: relative;
}
.grade-color-bar .seg { flex: 1; }
.grade-color-bar .seg-e { background: linear-gradient(90deg, #ff6b6b, #ff8e53); }
.grade-color-bar .seg-d { background: linear-gradient(90deg, #ff8e53, #ffc048); }
.grade-color-bar .seg-c { background: linear-gradient(90deg, #ffc048, #87ceeb); }
.grade-color-bar .seg-b { background: linear-gradient(90deg, #87ceeb, #5ed4c8); }
.grade-color-bar .seg-a { background: linear-gradient(90deg, #5ed4c8, #3ecfb4); }
.grade-color-bar .bar-pointer {
  position: absolute; top: -4px; width: 12px; height: 22px;
  background: #3ecfb4; border-radius: 4px; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2); transform: translateX(-50%);
  transition: left .5s ease;
}
.grade-labels {
  display: flex; justify-content: space-between; font-size: 11px; color: #999;
  padding: 0 4px; margin-bottom: 16px;
}

/* --- 趋势图 --- */
.trend-chart-area {
  padding: 10px 0 20px; min-height: 200px;
}
.trend-chart-svg { width: 100%; }

/* --- 收缩卡片 --- */
.collapse-section { padding: 0 20px; }
.collapse-card {
  border-top: 6px solid #f5f5f5; padding: 16px 0;
}
.collapse-card-header {
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.collapse-card-title { font-size: 16px; font-weight: 600; color: #333; }
.collapse-card-action { font-size: 13px; color: #3ecfb4; display: flex; align-items: center; gap: 4px; }
.collapse-card-action .info-icon {
  width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #3ecfb4;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; color: #3ecfb4;
}
.collapse-card-body {
  display: none; padding: 14px 0 0;
}
.collapse-card-body.open { display: block; }
.collapse-empty {
  text-align: center; padding: 20px; color: #999; font-size: 13px;
  background: #f8f8f8; border-radius: 8px;
}

/* --- 查看试卷解析按钮 --- */
.view-paper-btn {
  display: block; margin: 20px 20px 30px; padding: 14px; text-align: center;
  border: 2px solid #3ecfb4; border-radius: 25px; color: #3ecfb4;
  font-size: 15px; font-weight: 500; cursor: pointer; transition: all .2s;
}
.view-paper-btn:active { background: #e8faf5; }

/* --- 等级规则说明页 --- */
.rules-content { padding: 24px 20px; }
.rules-content h4 { font-size: 14px; color: #333; margin-bottom: 6px; }
.rules-content p { font-size: 13px; color: #666; margin-bottom: 12px; line-height: 1.6; }
.rules-table {
  width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px;
}
.rules-table th, .rules-table td {
  padding: 12px 16px; border: 1px solid #e0e0e0; text-align: center;
}
.rules-table th { background: #fafafa; font-weight: 600; color: #333; }
.rules-table td { color: #555; }
.rules-notes { margin-top: 20px; }
.rules-notes p { font-size: 12px; color: #888; line-height: 1.8; margin-bottom: 4px; }
.rules-ref { font-size: 12px; color: #3ecfb4; cursor: pointer; }
