/**
 * 安全教育考试系统 - 样式表
 */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 14px; color: #25324a; background: #f3f6fb; }

/* Layout */
.layout { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar {
  width: 240px; min-width: 240px;
  background: linear-gradient(180deg, #34445d 0%, #2e3b51 100%);
  display: flex; flex-direction: column;
  color: #fff; overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.logo-icon { font-size: 28px; color: #5b95f7; }
.logo-text { font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav-menu { list-style: none; padding: 12px 0; flex: 1; }
.nav-item {
  padding: 12px 20px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; transition: all 0.2s; color: rgba(255,255,255,0.7);
  font-size: 14px; border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active {
  background: rgba(91,149,247,0.15); color: #5b95f7;
  border-left-color: #5b95f7; font-weight: 500;
}
.nav-item i { font-size: 18px; width: 20px; text-align: center; }

/* Main Wrapper */
.main-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Topbar */
.topbar {
  height: 56px; background: #fff; display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px;
  border-bottom: 1px solid #e8edf3; flex-shrink: 0;
}
.breadcrumb { font-size: 13px; color: #60708a; }
.breadcrumb .sep { margin: 0 6px; }
.breadcrumb .current { color: #25324a; font-weight: 500; }
.user-badge { display: flex; align-items: center; gap: 8px; }
.user-name { font-size: 13px; color: #25324a; }

/* Content */
.content { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* Page Toolbar */
.page-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 20px; font-weight: 600; color: #25324a; }
.role-switcher { display: flex; flex-wrap: wrap; gap: 8px; }

/* Panel */
.panel {
  background: rgba(255,255,255,0.95); border: 1px solid #e8edf5;
  border-radius: 16px; box-shadow: 0 4px 20px rgba(37,50,74,0.06);
  overflow: hidden; margin-bottom: 20px;
}
.panel-head {
  padding: 20px 24px 0; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 8px;
}
.panel-title { display: flex; align-items: center; gap: 8px; }
.panel-title::before {
  content: ''; width: 4px; height: 18px;
  background: linear-gradient(180deg, #5b95f7, #8fc0ff); border-radius: 99px;
}
.panel-title h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.panel-desc { color: #60708a; font-size: 13px; }

/* User Card Grid */
.user-card-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 16px; padding: 16px 24px 24px;
}
.card-box {
  background: linear-gradient(180deg, #fff, #f7faff);
  border: 1px solid #eaf0f8; border-radius: 14px; padding: 20px;
}
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.meta-item span { display: block; font-size: 12px; color: #93a0b5; margin-bottom: 4px; }
.meta-item strong { font-size: 14px; line-height: 1.5; color: #25324a; }
.summary-tip { margin-top: 14px; font-size: 12px; color: #60708a; padding-top: 12px; border-top: 1px solid #eaf0f8; }

/* Tags */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mini-tag {
  display: inline-flex; align-items: center; padding: 5px 10px;
  border-radius: 99px; font-size: 11px; font-weight: 600;
}
.mini-tag.normal { color: #3978e6; background: #eef4ff; }
.mini-tag.level-i { color: #c62828; background: #ffe2e5; }
.mini-tag.level-ii { color: #b95e0f; background: #ffe7d5; }
.mini-tag.level-iii { color: #947000; background: #fff6d8; }
.mini-tag.level-iv { color: #1565c0; background: #e3f2fd; }

/* Progress Bar */
.hours-progress { margin-bottom: 14px; }
.progress-head { display: flex; justify-content: space-between; font-size: 12px; color: #60708a; margin-bottom: 8px; }
.progress-bar { width: 100%; height: 8px; background: #edf2fa; border-radius: 99px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #5b95f7, #7eb4ff); border-radius: inherit; transition: width 0.3s; }

/* KPI */
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi-box { background: #f7faff; border: 1px solid #e5edf8; border-radius: 12px; padding: 12px; }
.kpi-box span { display: block; font-size: 11px; color: #93a0b5; margin-bottom: 4px; }
.kpi-box strong { font-size: 22px; color: #25324a; }
.kpi-box em { font-style: normal; font-size: 12px; color: #60708a; margin-left: 2px; }
.kpi-exam { font-size: 15px !important; }

/* Status List */
.status-list { display: grid; gap: 8px; }
.status-item {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 10px 12px; border-radius: 10px;
  background: #f7f9fd; border: 1px solid #e8eef9;
}
.status-chip {
  padding: 3px 10px; border-radius: 99px; font-weight: 600; font-size: 11px;
}
.status-chip.success { background: #e8f8f1; color: #18794e; }
.status-chip.pending { background: #fff5dc; color: #9c6c00; }
.status-chip.locked { background: #eef2f8; color: #637187; }
.status-chip.danger { background: #ffe2e5; color: #c62828; }

/* Feature Grid */
.feature-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 14px; padding: 16px 24px 24px;
}
.feature-card {
  border: 1px solid #e8edf5; border-radius: 14px; padding: 18px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  min-height: 220px; display: flex; flex-direction: column; gap: 10px;
}
.feature-card h3 { margin: 0; font-size: 15px; color: #25324a; }
.feature-card > p { margin: 0; font-size: 12px; color: #60708a; line-height: 1.5; }

/* Record/Task Items */
.record-list { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.record-list--fixed { max-height: 140px; overflow: hidden; flex: none; }
.record-list--scroll { max-height: 168px; overflow-y: auto; flex: none; }
.record-list--scroll::-webkit-scrollbar { width: 4px; }
.record-list--scroll::-webkit-scrollbar-thumb { background: #d4dbe6; border-radius: 4px; }
.record-item {
  padding: 10px 12px; border-radius: 10px; background: #fff;
  border: 1px solid #edf2f7; flex-shrink: 0;
}
.record-item strong { display: block; font-size: 13px; margin-bottom: 4px; color: #25324a; }
.record-item span { color: #60708a; font-size: 11px; line-height: 1.5; }
.task-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 4px; vertical-align: middle;
}
.task-dot.pending { background: #ffb020; }
.task-dot.locked { background: #c0c8d4; }
.task-dot.in-progress { background: #5b95f7; }

/* Meter Box */
.meter-box {
  padding: 12px; border-radius: 12px; background: #fff; border: 1px solid #edf2f7;
}
.meter-box strong { display: block; font-size: 22px; color: #25324a; margin-bottom: 4px; }
.meter-box span { font-size: 12px; color: #60708a; }

/* Resource Section */
.resource-section, .video-section {
  background: #fff; border-radius: 12px; padding: 24px;
  box-shadow: 0 2px 12px rgba(37,50,74,0.06); margin-bottom: 24px;
}
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 16px; font-weight: 600; color: #25324a; margin: 0; }
.section-hint { font-size: 12px; }
.resource-content { padding: 8px 0; }
.resource-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.resource-block { margin-bottom: 0; }
.resource-block:last-child { margin-bottom: 0; }
.block-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #f0f2f5;
}
.block-header h5 {
  font-size: 14px; font-weight: 600; color: #25324a; margin: 0;
  display: flex; align-items: center; gap: 6px;
}
.block-header h5 i { color: #5b95f7; font-size: 16px; }

/* Doc Cards */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-card {
  border: 1px solid #e8edf3; border-radius: 10px; padding: 14px;
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  transition: all 0.2s; background: #fafbfd;
}
.doc-card:hover { border-color: #5b95f7; background: #f0f6ff; box-shadow: 0 2px 8px rgba(91,149,247,0.1); }
.doc-icon {
  width: 40px; height: 40px; border-radius: 8px; background: #eef3ff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.doc-icon i { font-size: 20px; color: #5b95f7; }
.doc-body { flex: 1; min-width: 0; }
.doc-title { font-size: 13px; color: #25324a; font-weight: 500; display: block; margin-bottom: 6px; line-height: 1.4; }
.doc-meta-row { display: flex; align-items: center; justify-content: space-between; }
.doc-meta { font-size: 11px; color: #93a0b5; }
.doc-duration { font-size: 11px; color: #60708a; display: flex; align-items: center; gap: 3px; }
.doc-duration i { font-size: 12px; }

/* Question Cards */
.question-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.question-card {
  border: 1px solid #e8edf3; border-radius: 10px; padding: 16px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all 0.2s; background: #fafbfd; text-align: center;
}
.question-card:hover { border-color: #5b95f7; background: #f0f6ff; }
.question-card-icon {
  width: 36px; height: 36px; border-radius: 50%; background: #eef3ff;
  display: flex; align-items: center; justify-content: center;
}
.question-card-icon i { font-size: 18px; color: #5b95f7; }
.question-cat-name { font-size: 13px; color: #25324a; font-weight: 500; }
.question-cat-count { font-size: 12px; color: #93a0b5; }
.total-card { background: #f0f6ff; border-color: #d4e4fd; }
.total-card .question-card-icon { background: #5b95f7; }
.total-card .question-card-icon i { color: #fff; }

/* Video Section */
.video-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.video-card {
  border-radius: 10px; overflow: hidden; cursor: pointer;
  box-shadow: 0 2px 8px rgba(37,50,74,0.08); transition: transform 0.2s;
}
.video-card:hover { transform: translateY(-2px); }
.video-cover {
  height: 120px; background: linear-gradient(135deg, #34445d, #5b95f7);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.video-cover i { font-size: 36px; color: rgba(255,255,255,0.8); }
.video-duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 11px;
  padding: 2px 6px; border-radius: 4px;
}
.video-info { padding: 12px; }
.video-title { font-size: 13px; color: #25324a; font-weight: 500; margin-bottom: 4px; line-height: 1.4; }
.video-meta { font-size: 11px; color: #93a0b5; }
.video-pagination { text-align: center; }

/* Config Page */
.config-card {
  background: #fff; border-radius: 12px; padding: 24px;
  box-shadow: 0 2px 12px rgba(37,50,74,0.06);
}

/* Statistics Page */
.stats-section {
  background: #fff; border-radius: 12px; border: 1px solid #e8edf5;
  padding: 20px; margin-bottom: 20px;
}
.stats-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.stats-section-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: #25324a; }
.stats-section-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stats-chart-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
.stats-chart-box {
  background: #f7f9fd; border-radius: 12px; border: 1px solid #e8edf5;
  padding: 16px; height: 280px;
}
.stats-chart-full { grid-column: 1 / -1; }
.stats-filter-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.reject-reason-text { font-size: 11px; color: #e84d5b; }

/* Flow Page */
.flow-page {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px;
}
.flow-card {
  background: #fff; border-radius: 14px; padding: 20px;
  border: 1px solid #e8edf5; box-shadow: 0 2px 12px rgba(37,50,74,0.05);
}
.flow-title {
  font-size: 15px; font-weight: 600; color: #25324a; margin: 0 0 16px;
  padding-bottom: 12px; border-bottom: 1px solid #f0f2f5;
}
.flow-chart { display: flex; flex-direction: column; align-items: center; }
.flow-step { display: flex; flex-direction: column; align-items: center; width: 100%; }
.flow-node {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 14px; border-radius: 10px; background: #f7f9fd;
  border: 1px solid #e8eef9; transition: all 0.2s;
}
.flow-node:hover { border-color: #5b95f7; background: #f0f6ff; }
.flow-node.start { background: #eef4ff; border-color: #c5d9f8; }
.flow-node.end { background: #e8f8f1; border-color: #b8e6d0; }
.flow-node.decision { background: #fff8e6; border-color: #f0dfa0; }
.flow-num {
  width: 22px; height: 22px; border-radius: 50%; background: #5b95f7;
  color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.flow-node.end .flow-num { background: #36b37e; }
.flow-node.decision .flow-num { background: #ffb020; }
.flow-text { font-size: 13px; color: #25324a; line-height: 1.4; }
.flow-arrow {
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 0; color: #c0c8d4;
}
.flow-arrow i { font-size: 14px; }
.flow-condition {
  font-size: 11px; color: #5b95f7; background: #f0f6ff;
  padding: 2px 8px; border-radius: 4px; margin-top: 2px;
}

/* Placeholder Page */
.placeholder-page {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 400px; color: #93a0b5;
}
.placeholder-page i { font-size: 64px; margin-bottom: 16px; }
.placeholder-page p { font-size: 16px; }

/* PRD Page */
.prd-page {
  background: #fff; border-radius: 14px; padding: 32px 40px;
  box-shadow: 0 2px 12px rgba(37,50,74,0.06);
  line-height: 1.8; color: #25324a; font-size: 14px;
}
.prd-page h1 { font-size: 24px; margin: 0 0 8px; padding-bottom: 12px; border-bottom: 2px solid #5b95f7; }
.prd-page h2 { font-size: 20px; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid #e8edf3; }
.prd-page h3 { font-size: 16px; margin: 24px 0 10px; }
.prd-page h4 { font-size: 14px; margin: 16px 0 8px; }
.prd-page p { margin: 8px 0; }
.prd-page table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.prd-page th, .prd-page td { border: 1px solid #e8edf3; padding: 8px 12px; text-align: left; }
.prd-page th { background: #f7f9fd; font-weight: 600; }
.prd-page code { background: #f3f6fb; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.prd-page pre { background: #f3f6fb; padding: 14px 18px; border-radius: 8px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.prd-page pre code { background: none; padding: 0; }
.prd-page blockquote { border-left: 3px solid #5b95f7; padding: 8px 16px; margin: 12px 0; background: #f7f9fd; color: #60708a; }
.prd-page ul, .prd-page ol { padding-left: 20px; margin: 8px 0; }
.prd-page li { margin: 4px 0; }
.prd-page strong { color: #25324a; }
.prd-page hr { border: none; border-top: 1px solid #e8edf3; margin: 24px 0; }

/* Dialog */
.bind-dialog-content .search-hint { font-size: 12px; color: #93a0b5; margin-top: 8px; line-height: 1.6; }
.bind-dialog-content .selected-lab-info { margin-top: 16px; }
.bind-dialog-content .no-lab-option { padding: 12px; background: #f8f9fc; border-radius: 8px; }
.notice-content p { font-size: 14px; color: #25324a; line-height: 2.2; padding-left: 4px; }

/* Responsive */
@media (max-width: 1400px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  .user-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .resource-split { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { width: 60px; min-width: 60px; }
  .logo-text, .nav-item span { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .feature-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .role-switcher { flex-wrap: wrap; }
  .meta-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
}
