/* ========================================
 * style.css — 基础样式（始终加载）
 * 页面级样式已拆分至 css/pages/ 目录
 * ======================================== */

/* ==================== 设计令牌(Design Tokens) ==================== */
:root {
  /* 主色系 */
  --primary: #1a3a6b;
  --primary-light: #2a5298;
  --primary-dark: #0f2444;
  --primary-bg: #e8f0fe;
  --primary-border: #b8d4fe;

  /* 强调色 */
  --accent: #d4a843;
  --accent-light: #f0d68a;
  --accent-bg: #fef9e7;

  /* 语义色 */
  --success: #27ae60;
  --success-bg: #e6f9ee;
  --warning: #f39c12;
  --warning-bg: #fef3e2;
  --danger: #e74c3c;
  --danger-bg: #fde8e8;
  --info: #3498db;
  --info-bg: #e8f4fd;

  /* 中性色 */
  --white: #ffffff;
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --bg-hover: #f8f9fb;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --text-muted: #bdc3c7;
  --text-secondary: #7f8c8d;
  --bg-secondary: #f0f2f5;
  --border: #e8ecf1;
  --border-light: #f0f2f5;

  /* 圆角 */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-round: 50%;

  /* 阴影 */
  --shadow-sm: 0 1px 4px rgba(26,58,107,0.06);
  --shadow: 0 2px 12px rgba(26,58,107,0.08);
  --shadow-lg: 0 8px 30px rgba(26,58,107,0.12);
  --shadow-xl: 0 12px 40px rgba(26,58,107,0.16);

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-xxl: 24px;
  --space-xxxl: 32px;

  /* 字体 */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-xxl: 20px;
  --text-xxxl: 24px;
  --text-hero: 28px;

  /* 过渡 */
  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;

  /* 布局 */
  --navbar-height: 56px;
  --max-width: 1200px;
}

/* ==================== Reset ==================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input {
  font-family: inherit;
  outline: none;
}

ul, ol {
  list-style: none;
}

/* ==================== 导航栏 ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}
.nav-logo {
  height: 32px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}

.nav-link:hover {
  background: var(--bg);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary);
  color: var(--white);
}

/* 多模态对答：绿色系高亮 */
.nav-link[data-page="multimodal"].active {
  background: #2E8B57;
  color: #fff;
}

/* 导航栏按钮（设置/退出），与nav-link风格一致 */
.nav-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-btn:hover {
  background: var(--bg);
  color: var(--primary);
}
.nav-btn-logout:hover {
  background: #fde8e8;
  color: var(--danger);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-role {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--primary);
  font-weight: 600;
}

.user-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.btn-login {
  padding: 12px 28px;           /* 统一：6px20px → 12px28px */
  border-radius: 16px;             /* 统一大圆角 */
  background: var(--primary);
  color: var(--white);
  font-size: 16px;                /* 增大：14px → 16px */
  font-weight: 600;               /* 加粗：500 → 600 */
  transition: var(--transition);
}

.btn-login:hover {
  background: var(--primary-light);
}

.btn-logout {
  padding: 4px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-light);
  font-size: 13px;
  transition: var(--transition);
}

.btn-logout:hover {
  background: #fde8e8;
  color: var(--danger);
}

/* ==================== 主内容区 ==================== */
.page-container {
  margin-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
}

.page {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  padding: 16px 20px 0;
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
}

.page-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ==================== 卡片 ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
}

.card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ==================== 按钮系统 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;           /* 增大：10px24px → 12px28px */
  border-radius: 16px;             /* 统一大圆角，参照知识点分类按钮 */
  font-size: 16px;                /* 统一：15px → 16px */
  font-weight: 600;               /* 加粗：500 → 600，更醒目 */
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-warning {
  background: var(--accent);
  color: var(--white);
}

.btn-warning:hover {
  background: #c49a3a;
  box-shadow: var(--shadow-sm);
}

.btn-warning:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  opacity: 0.9;
  filter: brightness(1.05);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  opacity: 0.85;
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  opacity: 0.9;
}

.btn-sm {
  padding: 12px 28px;           /* 统一为标准按钮大小 */
  font-size: 16px;                /* 统一为标准按钮大小 */
  border-radius: 16px;             /* 统一为标准按钮圆角 */
}

.btn-lg {
  padding: 12px 32px;
  font-size: var(--text-lg);
}

.btn-block {
  width: 100%;
}

/* 讲授按钮（答题页题目底部，白底蓝边风格，与 .btn-secondary 一致） */
.btn-lecture {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  background: var(--white);
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--primary);
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition);
  margin: 20px 0 0;
}

.btn-lecture:hover {
  background: var(--primary);
  color: var(--white);
}

/* ==================== 表单 ==================== */
.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-input {
  width: 100%;
  box-sizing: border-box;
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,107,0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

/* ==================== 标签系统 ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.4;
}

.tag-blue {
  background: var(--primary-bg);
  color: var(--primary);
}

.tag-green {
  background: var(--success-bg);
  color: var(--success);
}

/* 归档标签 - 淡蓝底深蓝字 */
.archive-link {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 4px;
  background: #dbeafe;
  color: #1a3a6b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  line-height: 1.6;
}
.archive-link:hover {
  background: #bfdbfe;
}

.tag-orange {
  background: var(--warning-bg);
  color: var(--warning);
}

.tag-purple {
  background: #f3e5f5;
  color: #7b1fa2;
}

.tag-red {
  background: var(--danger-bg);
  color: var(--danger);
}

.tag-accent {
  background: var(--accent-bg);
  color: var(--accent);
}

/* ==================== 登录弹窗 ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 400px;
  max-width: 90vw;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: var(--text-light);
  background: none;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 24px;
}

.login-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.login-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
  background: none;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.login-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.login-panel {
  display: none;
}

.login-panel.active {
  display: block;
}

.btn-code {
  padding: 10px 16px;
  background: var(--bg);
  color: var(--primary);
  border-radius: var(--radius);
  font-size: 13px;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-code:hover {
  background: var(--border);
}

.btn-code:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.wechat-placeholder {
  text-align: center;
  padding: 30px 0;
}

.wechat-icon {
  margin-bottom: 16px;
}

.wechat-text {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}

.wechat-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== 首页 ==================== */
.home-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  color: var(--white);
  text-align: center;
  margin-bottom: 24px;
}

.home-hero h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.home-hero p {
  font-size: var(--text-md);
  opacity: 0.9;
  margin-bottom: 24px;
}

.home-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xxl);
  margin-bottom: 24px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-label {
  font-size: var(--text-sm);
  opacity: 0.8;
  margin-top: var(--space-xs);
}

.home-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.home-module-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.home-module-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.home-module-card .module-icon {
  font-size: 36px;
  margin-bottom: var(--space-md);
}

.home-module-card .module-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: var(--space-xs);
}

.home-module-card .module-desc {
  font-size: var(--text-sm);
  color: var(--text-light);
}

/* ==================== 讲授页 ==================== */
.lecture-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding: 0 20px;            /* 新增：与 page-header 的 20px 左padding 对齐 */
}

.lecture-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lecture-tab {
  flex: 1;
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.lecture-tab.active {
  background: var(--primary);
  color: var(--white);
}

.lecture-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  line-height: var(--leading-relaxed, 1.8);
  font-size: var(--text-base);
}

.lecture-content h3 {
  font-size: var(--text-xl);
  color: var(--primary-dark);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.lecture-content p {
  margin-bottom: var(--space-md);
}

.lecture-content .highlight {
  background: var(--accent-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 500;
}

.lecture-content .law-ref {
  background: var(--primary-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: var(--text-sm);
}

/* ===== 讲授内容表格样式（支持所有教学模型） ===== */
.lecture-content table,
.lecture-unified-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}
.lecture-content th,
.lecture-unified-content th {
  background: #2c3e50;
  color: #fff;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
}
.lecture-content td,
.lecture-unified-content td {
  padding: 8px 14px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.lecture-content tr:nth-child(even) td,
.lecture-unified-content tr:nth-child(even) td {
  background: #f7f9fc;
}
.lecture-content thead tr:first-child th:first-child,
.lecture-unified-content thead tr:first-child th:first-child {
  border-radius: 6px 0 0 0;
}
.lecture-content thead tr:first-child th:last-child,
.lecture-unified-content thead tr:first-child th:last-child {
  border-radius: 0 6px 0 0;
}
.lecture-content tr:hover td,
.lecture-unified-content tr:hover td {
  background: #eef3fa !important;
}

.lecture-edit-area {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
}

.lecture-edit-area textarea {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: var(--text-sm);
  line-height: var(--leading-normal, 1.6);
}

.lecture-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xl);
}

/* ==================== 答题页 ==================== */
.exam-header {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-xl);
}

/* ==================== 答题记录 ==================== */
.history-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.history-stat {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  text-align: center;
}

.history-stat .stat-value {
  font-size: var(--text-xxxl);
  font-weight: 700;
  color: var(--primary);
}

.history-stat .stat-value.success {
  color: var(--success);
}

.history-stat .stat-value.accent {
  color: var(--accent);
}

.history-stat .stat-label {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-top: var(--space-xs);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.history-group {
  margin-bottom: var(--space-lg);
}

.history-group-title,
.wrong-group-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--primary);
  padding: var(--space-sm) 0 var(--space-xs);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-sm);
}

.wrong-group {
  margin-bottom: var(--space-lg);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border: none;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--text-base);
  transition: var(--transition);
}
.btn-danger:hover {
  opacity: 0.85;
}
.btn-sm.btn-danger {
  /* 保留红色，大小圆角继承 .btn-sm（标准按钮尺寸） */
}

.history-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.history-card.pass {
  border-left: 4px solid var(--success);
}

.history-card.fail {
  border-left: 4px solid var(--danger);
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  cursor: pointer;
  transition: var(--transition);
}

.history-card-header:hover {
  background: var(--bg-hover);
}

.history-card-info {
  flex: 1;
  min-width: 0;
}

.history-card-review {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: var(--space-xs);
}

.history-card-meta {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-top: var(--space-xs);
}

.history-card-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.history-card-score {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--primary);
}

.history-toggle {
  font-size: var(--text-sm);
  color: var(--text-light);
  width: var(--space-xl);
  text-align: center;
}

.history-card-detail {
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border);
  background: var(--bg-hover);
}

.history-detail-questions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.history-detail-q {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--space-md);
  border: 1px solid var(--border);
}

.hdq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.hdq-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}

.hdq-content {
  font-size: var(--text-sm);
  color: var(--text-light);
  line-height: var(--leading-normal, 1.6);
}

.history-detail-section {
  margin-bottom: var(--space-md);
}

.history-detail-section:last-child {
  margin-bottom: 0;
}

.history-detail-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.history-detail-text {
  font-size: var(--text-base);
  line-height: var(--leading-normal, 1.6);
  color: var(--text);
}

/* ==================== 管理员页面 ==================== */
.admin-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - var(--navbar-height));
}

.admin-sidebar {
  width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: var(--space-xl) 0;
  flex-shrink: 0;
  overflow-y: auto;
}

.admin-sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 16px;
}

.admin-sidebar-group-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 20px 8px;
}

/* 仪表板分区 */
.dashboard-group-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0 0;
}

.dashboard-group-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.5px;
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-base);
  color: var(--text);
  transition: var(--transition);
  cursor: pointer;
}

.admin-menu-item:hover {
  background: var(--bg-hover);
}

.admin-menu-item.active {
  background: var(--primary);
  color: var(--white);
}

.admin-menu-item .menu-icon {
  width: var(--space-xl);
  text-align: center;
}

.admin-main {
  flex: 1;
  padding: var(--space-xl);
  background: var(--bg);
  overflow-y: auto;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.admin-search {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.admin-search input {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  width: 260px;
}

.admin-table {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-light);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  border-bottom: 1px solid var(--border-light);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--bg-hover);
}

/* ==================== 空状态 ==================== */
.empty-state {
  text-align: center;
  padding: var(--space-xxxl) var(--space-xl);
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-lg);
}

.empty-state .empty-title {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: var(--space-sm);
}

.empty-state .empty-desc {
  font-size: var(--text-base);
}

/* ==================== 加载动画 ==================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xxxl);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: var(--radius-round);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== 消息提示 ==================== */
.toast {
  position: fixed;
  top: var(--navbar-height);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--primary-dark);
  color: var(--white);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius);
  font-size: var(--text-base);
  z-index: 3000;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

/* ==================== 专题列表（桌面基础） ==================== */
.subject-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.subject-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}
.subject-tab-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}
.subject-tab-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.subject-tab-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.subject-tab-icon svg {
    width: 24px;
    height: 24px;
}
.subject-tab-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}
.subject-tab-item.active .subject-tab-name {
    color: #fff;
}
.subject-tab-count {
    font-size: 11px;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.subject-tab-item.active .subject-tab-count {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ==================== 考试类型标签（桌面基础） ==================== */
.scoring-rule-bar {
    font-size: 12px;
    color: var(--text-light);
    padding: 6px 0 2px;
    margin-bottom: 8px;
    line-height: 1.6;
}
.exam-type-tabs-bar {
    display: flex;
    gap: 0;
    margin-bottom: 8px;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border);
}
.exam-type-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}
.exam-type-tab-item:hover {
    background: var(--bg-hover);
}
.exam-type-tab-item.active {
    background: var(--primary);
    color: #fff;
}
.exam-type-tab-icon {
    font-size: 22px;
    line-height: 1;
}
.exam-type-tab-name {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 var(--space-lg);
  }

  .nav-links {
    gap: 0;
  }

  .nav-link {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }

  .page {
    padding: var(--space-lg);
  }

  .home-hero {
    padding: 28px var(--space-lg);
  }

  .home-hero h1 {
    font-size: var(--text-xxl);
  }

  .home-stats {
    gap: var(--space-xl);
  }

  .stat-number {
    font-size: var(--text-xxxl);
  }

  .home-modules {
    grid-template-columns: 1fr 1fr;
  }

  .analysis-summary {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: var(--space-xl) var(--space-lg);
    margin: 0 var(--space-lg);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* 管理员页面移动端适配为上下布局 */
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) 0;
    display: flex;
    overflow-x: auto;
  }

  .admin-menu-item {
    padding: var(--space-md) var(--space-lg);
    white-space: nowrap;
    font-size: var(--text-sm);
  }

  .admin-main {
    padding: var(--space-lg);
  }

  .admin-search input {
    width: 160px;
  }

  .admin-table {
    overflow-x: auto;
  }

  .exam-actions {
    flex-direction: column;
  }
}

/* ==================== 首页管理员入口 ==================== */
.admin-entry {
  margin-top: 40px;
  text-align: center;
}

.admin-entry-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.admin-entry-divider::before,
.admin-entry-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.admin-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
}

.admin-entry-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f5ff;
}

/* ==================== 法条检索页 ==================== */
.law-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--navbar-height));
  overflow: hidden;
}

.law-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
}

.law-toolbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
}

.law-toolbar-icon {
  font-size: 18px;
}

.law-toolbar-source {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.law-toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.law-iframe-wrapper {
  flex: 1;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

.law-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--white);
}

.law-iframe-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: var(--bg);
}

.law-fallback-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 400px;
}

.law-fallback-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.law-fallback-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.law-fallback-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .law-toolbar {
    padding: 8px 14px;
  }

  .law-toolbar-title {
    font-size: 14px;
  }

  .law-toolbar-source {
    display: none;
  }
}

/* ==================== 知识点导航 ==================== */
/* 知识点导航标题 */
.kp-nav-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 4px;
}
.kp-nav-header-icon {
  font-size: 18px;
}
.kp-nav-header-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.kp-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.kp-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-align: left;
  min-height: 48px;
}

.kp-nav-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f5ff;
}

.kp-nav-item.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(26,58,107,0.25);
}

.kp-nav-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(26,58,107,0.1);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.kp-nav-item.active .kp-nav-num {
  background: rgba(255,255,255,0.3);
  color: var(--white);
}

.kp-nav-name {
  font-weight: 600;
  line-height: 1.5;
  flex: 1;
  word-break: break-all;
}

.kp-nav-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  opacity: 0;
  transition: var(--transition);
  flex-shrink: 0;
  margin-top: 2px;
}

.kp-nav-item:hover .kp-nav-edit {
  opacity: 0.6;
}

.kp-nav-item:hover .kp-nav-edit:hover {
  opacity: 1;
  background: rgba(26,58,107,0.1);
}

.kp-nav-item.active .kp-nav-edit:hover {
  background: rgba(255,255,255,0.2);
}

.kp-nav-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--accent);
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(212,168,67,0.3);
}

.kp-nav-add:hover {
  background: #e6c34a;
  box-shadow: 0 4px 14px rgba(212,168,67,0.45);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .kp-nav {
    grid-template-columns: 1fr;
  }
}

/* ==================== 讲授管理栏 ==================== */
.lecture-admin-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* ==================== 移动端补充适配（2026-05-23） ==================== */
@media (max-width: 768px) {
  /* 全局 */
  body {
    font-size: 14px;
  }

  /* 导航栏：允许横向滚动，防止链接溢出 */
  .navbar {
    padding: 0 10px;
  }
  .nav-left {
    gap: 8px;
  }
  .nav-brand {
    font-size: 16px;
    flex-shrink: 0;
  }
  .nav-logo {
    height: 26px;
  }
  .nav-links {
    gap: 0;
    overflow-x: auto;
    flex-shrink: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-link {
    padding: 6px 8px;
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .nav-right {
    gap: 6px;
    flex-shrink: 0;
  }
  .user-name {
    display: none;
  }
  .user-role {
    display: none;
  }
  .btn-login {
    padding: 5px 12px;
    font-size: 12px;
  }
  .btn-logout {
    padding: 3px 8px;
    font-size: 12px;
  }
  .nav-btn {
    padding: 6px 8px;
    font-size: 12px;
  }

  /* 页面容器 */
  .page {
    padding: 12px 10px;
  }
  .page-title {
    font-size: 20px;
  }
  .page-desc {
    font-size: 13px;
  }

  /* 卡片 */
  .card {
    padding: 16px 14px;
  }
  .card-title {
    font-size: 15px;
  }

  /* 首页 */
  .home-hero {
    padding: 28px 16px;
    border-radius: var(--radius);
  }
  .home-hero h1 {
    font-size: 22px;
  }
  .home-hero p {
    font-size: 14px;
  }
  .home-stats {
    gap: 16px;
  }
  .stat-number {
    font-size: 24px;
  }
  .home-modules {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .home-module-card {
    padding: 20px 16px;
  }

  /* 专题列表 */
  .subject-tabs-bar {
    margin-bottom: 14px;
  }
  .subject-tab-item {
    padding: 10px 6px;
  }
  .subject-tab-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .subject-tab-name {
    font-size: 11px;
  }
  .subject-page-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .topic-item {
    padding: 14px 14px;
    gap: 10px;
  }
  .topic-name {
    font-size: 14px;
  }

  /* 讲授页 */
  .lecture-layout {
    gap: 14px;
  }
  .lecture-tabs {
    border-radius: var(--radius);
  }
  .lecture-tab {
    padding: 10px 8px;
    font-size: 13px;
  }
  .lecture-content {
    padding: 18px 14px;
    font-size: 14px;
  }
  .lecture-content h3 {
    font-size: 16px;
  }
  .lecture-edit-area {
    padding: 16px 14px;
  }
  .lecture-nav {
    flex-direction: column;
    gap: 10px;
  }
  .lecture-nav .btn-primary,
  .lecture-nav .btn-secondary {
    width: 100%;
  }

  /* 答题页 */
  .exam-header {
    padding: 14px 14px;
    border-radius: var(--radius);
  }
  .exam-question {
    padding: 18px 14px;
    border-radius: var(--radius);
  }
  .question-text {
    font-size: 14px;
  }
  .answer-textarea {
    min-height: 140px;
    font-size: 14px;
    padding: 12px;
  }
  .exam-actions {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;       /* 防止按钮被拉伸 */
  }

  /* 多小问 */
  .exam-stem {
    padding: 14px 14px;
    border-radius: var(--radius);
  }
  .stem-content {
    font-size: 14px;
  }
  .question-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .multi-result-summary {
    padding: 18px 14px;
    border-radius: var(--radius);
  }
  .question-result-card {
    padding: 16px 14px;
    border-radius: var(--radius);
  }
  .qr-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .qr-title {
    font-size: 14px;
  }

  /* 成绩分析 */
  .analysis-summary {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .analysis-card {
    padding: 16px 12px;
  }
  .analysis-card .card-value {
    font-size: 22px;
  }
  .score-detail-list {
    padding: 16px 14px;
    border-radius: var(--radius);
  }

  /* 答题记录 */
  .history-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .history-stat {
    padding: 16px 12px;
  }
  .history-stat .stat-value {
    font-size: 22px;
  }
  .history-card-header {
    padding: 12px 14px;
  }
  .history-card-preview {
    font-size: 13px;
  }
  .history-card-detail {
    padding: 14px 14px;
  }
  .history-detail-q {
    padding: 10px 12px;
  }

  /* 错题本 */
  .wrong-filters {
    border-radius: var(--radius);
  }
  .wrong-filter-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
  .wrong-list {
    gap: 10px;
  }
  .wrong-card {
    padding: 14px 14px;
    border-radius: var(--radius);
  }
  .wrong-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .wrong-card-detail {
    padding: 14px 12px;
  }
  .wrong-original-header {
    padding: 8px 12px;
  }
  .wrong-original-body {
    padding: 0 12px 12px;
  }

  /* 记忆卡片 */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .memory-card {
    padding: 18px 14px;
  }

  /* 法条页 */
  .law-page {
    height: calc(100vh - var(--navbar-height));
  }
  .law-toolbar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .law-toolbar-title {
    font-size: 14px;
  }
  .law-toolbar-source {
    display: none;
  }

  /* 管理员页面 */
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    display: flex;
    overflow-x: auto;
    flex-shrink: 0;
  }
  .admin-menu-item {
    padding: 8px 14px;
    white-space: nowrap;
    font-size: 13px;
    border-bottom: none;
    border-right: 2px solid transparent;
  }
  .admin-menu-item.active {
    border-right-color: var(--primary);
    border-bottom: none;
  }
  .admin-main {
    padding: 14px 12px;
  }
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .admin-search {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .admin-search input {
    width: 100%;
  }
  .admin-table {
    overflow-x: auto;
    border-radius: var(--radius);
  }
  .admin-table table {
    min-width: 600px;
  }

  /* 管理员专题管理 */
  .admin-subject-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .admin-subject-tab {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .admin-save-bar {
    position: static;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: 16px;
    flex-direction: column;
    gap: 8px;
  }
  .admin-save-bar .btn-primary {
    width: 100%;
  }

  /* 模态框 */
  .modal {
    padding: 24px 18px;
    margin: 0 10px;
    border-radius: var(--radius);
  }
  .modal-title {
    font-size: 20px;
  }

  /* TinyMCE 编辑器 */
  .tinymce-editor-wrapper {
    min-height: 200px;
  }

  /* 表单 */
  .form-row {
    flex-direction: column;
    gap: 10px;
  }
  textarea.form-input {
    min-height: 100px;
  }

  /* Toast 提示 */
  .toast {
    top: 70px;
    font-size: 13px;
    padding: 8px 18px;
    max-width: 90vw;
  }
}

/* ==================== 首页底部页脚 ==================== */
.home-footer {
  margin-top: 48px;
  padding: 24px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  font-size: 13px;
  line-height: 2;
}

.home-footer a {
  color: var(--text-light);
  transition: var(--transition);
}

.home-footer a:hover {
  color: var(--primary);
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
}
.pagination .btn-sm {
  min-width: 36px;
  padding: 6px 12px;
  font-size: 13px;
}
.pagination .btn-sm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  padding: 0 8px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* ==================== 首页三大卡片（登录后） ==================== */
/* ===== 首页大卡片样式 ===== */
.home-big-card {
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.home-big-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.home-big-icon {
  font-size: 56px;
  margin-bottom: 14px;
  line-height: 1;
}
.home-big-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.home-big-desc {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.7;
}
@media (max-width: 768px) {
  .home-big-card {
    padding: 24px 16px;
    border-radius: 12px;
  }
  .home-big-icon {
    font-size: 40px;
    margin-bottom: 10px;
  }
  .home-big-title {
    font-size: 16px;
    margin-bottom: 6px;
  }
  .home-big-desc {
    font-size: 12px;
    line-height: 1.5;
  }
}

.user-dashboard-role {
  font-size: 12px;
  color: var(--text-light, #888);
}

.user-dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 320px;
  gap: 16px;
  padding: 16px 24px;
  flex: 1;
  min-height: 0;
}

.user-dashboard-col {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-dashboard-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--border, #e0e0e0);
  flex-shrink: 0;
}

.col-header-icon {
  font-size: 18px;
}

.col-header-badge {
  font-size: 10px;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  font-weight: 500;
}

.user-dashboard-col-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.col-loading {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-light, #888);
  font-size: 13px;
}

.col-empty {
  text-align: center;
  padding: 40px 16px;
}

.col-empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.col-empty-text {
  font-size: 14px;
  color: var(--text, #555);
  line-height: 1.7;
}

.col-subject-group {
  margin: 4px 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light, #f0f0f0);
}

.col-subject-group:last-child {
  border-bottom: none;
}

.col-subject-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light, #888);
  padding: 4px 8px;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.col-topic-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
}

.col-topic-item:hover {
  background: var(--accent, #e8eaf6);
}

.col-topic-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.col-topic-name {
  color: var(--text, #333);
}

.col-topic-more {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  text-align: center;
}

.col-topic-more:hover {
  background: var(--accent, #e8eaf6);
  border-radius: 8px;
}

.user-dashboard-col-actions {
  padding: 0 16px 12px;
  flex-shrink: 0;
}

.user-dashboard-action-list {
  padding: 8px;
  flex: 1;
}

.user-dashboard-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}

.user-dashboard-action-item:hover {
  background: var(--accent, #e8eaf6);
}

.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent, #e8eaf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.action-text {
  flex: 1;
  min-width: 0;
}

.action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #333);
}

.action-desc {
  font-size: 11px;
  color: var(--text-light, #888);
  margin-top: 2px;
}

.action-arrow {
  font-size: 16px;
  color: var(--text-light, #bbb);
  flex-shrink: 0;
}

.admin-action-item {
  border-top: 2px solid #ffcdd2;
  margin-top: 8px;
  padding-top: 12px;
}

/* 窄屏适配 */
@media (max-width: 960px) {
  .user-dashboard-columns {
    grid-template-columns: 1fr;
  }
}

/* ===== 首页四卡片网格——四列并排 ===== */
.home-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto 40px;
  padding: 0 20px;
}
@media (max-width: 768px) {
  .home-card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 10px;
  }
}

