/* ==================== 专业知识学习页 样式 ==================== */

/* 整体容器 */
#page5 { height: calc(100vh - 96px); overflow: hidden; margin-top: -24px }
#page5 > .learn-container { padding: 0; }

.learn-container {
  padding: 0;
  max-width: none;
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
}

/* 顶部头 */
.learn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, #2a5298 100%);
  color: #fff;
  flex-shrink: 0;
}

.learn-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.learn-page-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.learn-page-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--accent-red);
  border-radius: 2px;
}

/* 学习统计速览 */
.learn-stats-bar {
  display: flex;
  gap: 20px;
  align-items: center;
}

.learn-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.learn-stat-num {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.learn-stat-label {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

.learn-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.2);
}

/* 模块 Tab */
.learn-module-tabs {
  display: flex;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.learn-module-tab {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all .2s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  position: relative;
}

.learn-module-tab:hover {
  color: var(--primary-blue);
  background: rgba(27,58,107,0.04);
}

.learn-module-tab.active {
  color: var(--primary-blue);
  font-weight: 600;
  border-bottom-color: var(--accent-red);
}

.learn-tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-page);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.learn-module-tab.active .learn-tab-num {
  background: var(--accent-red);
  color: #fff;
}

.learn-tab-progress {
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #eee;
  border-radius: 1px;
  overflow: hidden;
}

.learn-tab-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 1px;
  transition: width 0.3s;
}

/* 主内容区 */
.learn-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  gap: 0;
}

/* 左侧知识点列表 */
.learn-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.learn-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.learn-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.learn-sidebar-search {
  position: relative;
  margin-bottom: 10px;
}

.learn-sidebar-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  transition: border-color 0.2s;
}

.learn-sidebar-search input:focus {
  border-color: var(--primary-blue);
}

.learn-sidebar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-muted);
}

.learn-status-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.learn-status-filter {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.learn-status-filter:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.learn-status-filter.active {
  background: var(--primary-blue);
  color: #fff;
  border-color: var(--primary-blue);
}

.learn-point-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.learn-point-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.learn-point-item:hover {
  background: #f0f4fa;
  border-color: #d6e0ef;
}

.learn-point-item.active {
  background: #e8f0fe;
  border-color: var(--primary-blue);
}

.learn-point-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.learn-point-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.learn-point-status.not-started { background: #ef4444; }
.learn-point-status.learning { background: #f59e0b; }
.learn-point-status.mastered { background: #10b981; }
.learn-point-status.review { background: #3b82f6; }

.learn-point-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.learn-point-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.learn-difficulty {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
}

.learn-difficulty.beginner { background: #dcfce7; color: #166534; }
.learn-difficulty.intermediate { background: #fef3c7; color: #92400e; }
.learn-difficulty.advanced { background: #fee2e2; color: #991b1b; }

.learn-point-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* 右侧学习区 */
.learn-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-page);
}

.learn-content-inner {
  max-width: 900px;
  margin: 0 auto;
}

.learn-content-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: var(--text-muted);
  font-size: 14px;
}

.learn-content-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* 知识讲解卡片 */
.learn-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}

.learn-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.learn-card-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--gradient-main);
  border-radius: 2px;
}

.learn-knowledge-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.learn-knowledge-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.learn-theory {
  line-height: 1.8;
  color: var(--text-primary);
}

.learn-theory h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-blue);
  margin: 20px 0 10px;
}

.learn-theory h3:first-child { margin-top: 0; }

.learn-theory p {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.learn-theory ul, .learn-theory ol {
  margin: 10px 0 10px 20px;
  color: var(--text-secondary);
}

.learn-theory li { margin-bottom: 6px; }

.learn-theory strong { color: var(--text-primary); }

.learn-theory .framework-box {
  background: #f0f4fa;
  border-left: 3px solid var(--primary-blue);
  padding: 12px 16px;
  margin: 14px 0;
  border-radius: 0 6px 6px 0;
}

.learn-theory .framework-box h4 {
  color: var(--primary-blue);
  margin-bottom: 6px;
  font-size: 14px;
}

/* 操作按钮组 */
.learn-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.learn-actions .btn {
  padding: 8px 16px;
  font-size: 13px;
}

/* 实务题目 */
.learn-question {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.learn-question:hover {
  box-shadow: var(--shadow-md);
}

.learn-q-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.learn-q-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.learn-q-type {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  margin-left: auto;
  flex-shrink: 0;
}

.learn-q-type.single { background: #dbeafe; color: #1e40af; }
.learn-q-type.multiple { background: #ede9fe; color: #5b21b6; }
.learn-q-type.judge { background: #fef3c7; color: #92400e; }
.learn-q-type.case { background: #fce7f3; color: #9d174d; }

.learn-q-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
}

.learn-q-options {
  margin: 10px 0 0 36px;
}

.learn-q-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 6px;
  border: 1px solid var(--border-color);
  background: #fff;
}

.learn-q-option:hover {
  border-color: var(--primary-blue);
  background: #f0f4fa;
}

.learn-q-option.selected {
  border-color: var(--primary-blue);
  background: #e8f0fe;
}

.learn-q-option.correct {
  border-color: #10b981;
  background: #ecfdf5;
}

.learn-q-option.wrong {
  border-color: #ef4444;
  background: #fef2f2;
}

/* 多选题：漏选的正确选项标黄提示 */
.learn-q-option.missed {
  border-color: #f59e0b;
  background: #fffbeb;
}

/* 多选题选项复选框样式 */
.learn-q-option .q-checkbox,
.learn-q-option .q-mark {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  color: transparent;
  margin-top: 1px;
  transition: all 0.2s;
}

.learn-q-option.multi-opt.selected .q-checkbox {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
  color: #fff;
}

.learn-q-option.correct .q-mark.correct-mark {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}

.learn-q-option.wrong .q-mark.wrong-mark {
  border-color: #ef4444;
  background: #ef4444;
  color: #fff;
}

.learn-q-option.missed .q-mark.correct-mark {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #f59e0b;
}

.learn-q-opt-label {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.learn-q-option.selected .learn-q-opt-label {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
  color: #fff;
}

.learn-q-option.correct .learn-q-opt-label {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}

.learn-q-option.wrong .learn-q-opt-label {
  border-color: #ef4444;
  background: #ef4444;
  color: #fff;
}

.learn-q-opt-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  padding-top: 1px;
}

.learn-q-explanation {
  margin: 12px 0 0 36px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.7;
  display: none;
}

.learn-q-explanation.show { display: block; }

.learn-q-explanation.correct {
  background: #ecfdf5;
  border-left: 3px solid #10b981;
  color: #065f46;
}

.learn-q-explanation.wrong {
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  color: #991b1b;
}

.learn-q-explanation strong { font-weight: 600; }

/* 多选题提示 */
.learn-q-hint {
  margin: 6px 0 6px 36px;
  padding: 6px 10px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 12px;
  border-radius: 4px;
  display: inline-block;
}

/* 题目操作区 */
.learn-q-actions {
  margin: 12px 0 0 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.q-result-tag {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.q-result-tag.correct {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #10b981;
}

.q-result-tag.wrong {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* 判断题特殊样式 */
.learn-judge-options {
  display: flex;
  gap: 12px;
  margin-left: 36px;
}

.learn-judge-btn {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.learn-judge-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.learn-judge-btn.selected {
  background: var(--primary-blue);
  color: #fff;
  border-color: var(--primary-blue);
}

.learn-judge-btn.correct {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.learn-judge-btn.wrong {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

/* 案例分析题 */
.learn-case-answer {
  margin-left: 36px;
  margin-top: 10px;
}

.learn-case-answer textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
}

.learn-case-answer textarea:focus {
  border-color: var(--primary-blue);
}

.learn-case-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.learn-case-ref {
  margin-left: 36px;
  margin-top: 12px;
  padding: 14px;
  background: #f0f4fa;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  display: none;
}

.learn-case-ref.show { display: block; }

.learn-case-ref strong {
  color: var(--primary-blue);
  display: block;
  margin-bottom: 6px;
}

.learn-self-eval {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.learn-self-eval span {
  font-size: 12px;
  color: var(--text-secondary);
  align-self: center;
}

/* 统计面板 */
.learn-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.learn-stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.learn-stat-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.learn-pie-chart {
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.learn-line-chart {
  width: 100%;
  height: 200px;
}

.learn-weak-modules {
  grid-column: 1 / -1;
}

.learn-weak-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.learn-weak-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fef2f2;
  border-radius: 8px;
  border-left: 3px solid var(--accent-red);
}

.learn-weak-name {
  font-weight: 500;
  color: var(--text-primary);
  min-width: 120px;
}

.learn-weak-bar {
  flex: 1;
  height: 8px;
  background: #fee2e2;
  border-radius: 4px;
  overflow: hidden;
}

.learn-weak-bar-fill {
  height: 100%;
  background: var(--accent-red);
  border-radius: 4px;
  transition: width 0.5s;
}

.learn-weak-rate {
  font-weight: 600;
  color: var(--accent-red);
  min-width: 50px;
  text-align: right;
}

/* 学习日历 */
.learn-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 10px;
}

.learn-cal-day {
  aspect-ratio: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  background: #f3f4f6;
}

.learn-cal-day.has-study {
  background: #dbeafe;
  color: #1e40af;
}

.learn-cal-day.has-review {
  background: #fef3c7;
  color: #92400e;
}

.learn-cal-day.today {
  border: 2px solid var(--accent-red);
  font-weight: 600;
}

.learn-cal-label {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* 收藏标记 */
.learn-fav-btn {
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  transition: all 0.2s;
  background: none;
  border: none;
  padding: 0 6px;
}

.learn-fav-btn.active { color: #f59e0b; }

/* 复习提示条 */
.learn-review-banner {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.learn-review-banner h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-blue);
  margin: 0 0 4px;
}

.learn-review-banner p {
  font-size: 13px;
  color: #1e40af;
  margin: 0;
}

/* 响应式 */
@media (max-width: 1200px) {
  .learn-sidebar { width: 280px; }
  .learn-dashboard { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .learn-sidebar { width: 100%; height: 40vh; }
  .learn-main { flex-direction: column; }
  .learn-stats-bar { display: none; }
}
