/* 帮助手册页面样式 */
.help-manual-container {
  display: flex;
  height: calc(100vh - 120px);
  background: var(--bg-color, #f5f7fa);
}

/* 左侧目录树 */
.help-sidebar {
  width: 280px;
  min-width: 280px;
  background: #fff;
  border-right: 1px solid #e4e7ed;
  overflow-y: auto;
  padding: 16px 0;
}

.help-sidebar-header {
  padding: 0 20px 12px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 8px;
}

.help-sidebar-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #303133);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-search-box {
  width: 100%;
}

.help-category-item {
  cursor: pointer;
  transition: background 0.2s;
}

.help-category-item:hover {
  background: var(--primary-light, #f0f5ff);
}

.help-category-item.active {
  background: var(--primary, #4f46e5);
}

.help-category-item.active .help-category-name {
  color: #fff;
}

.help-category-item.active .help-article-item {
  color: rgba(255, 255, 255, 0.85);
}

.help-category-item.active .help-article-item.active {
  color: #fff;
  font-weight: 600;
}

.help-category-name {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #303133);
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-category-name .el-icon {
  font-size: 16px;
}

.help-article-list {
  padding: 4px 0;
}

.help-article-item {
  padding: 8px 20px 8px 48px;
  font-size: 13px;
  color: var(--text-secondary, #606266);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.5;
}

.help-article-item:hover {
  color: var(--primary, #4f46e5);
  background: rgba(79, 70, 229, 0.04);
}

.help-article-item.active {
  color: var(--primary, #4f46e5);
  font-weight: 600;
  background: rgba(79, 70, 229, 0.08);
}

/* 右侧内容区 */
.help-content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  background: #fff;
}

.help-content-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e4e7ed;
}

.help-content-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary, #303133);
  margin: 0 0 8px 0;
}

.help-content-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary, #909399);
}

.help-content-meta .el-tag {
  font-size: 12px;
}

/* 文章内容样式 */
.help-article-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary, #303133);
}

.help-article-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-primary, #303133);
  padding-left: 12px;
  border-left: 4px solid var(--primary, #4f46e5);
}

.help-article-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--text-primary, #303133);
}

.help-article-content p {
  margin: 8px 0;
}

.help-article-content ul,
.help-article-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

.help-article-content li {
  margin: 4px 0;
}

.help-article-content .help-tip {
  background: rgba(79, 70, 229, 0.06);
  border-left: 4px solid var(--primary, #4f46e5);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
  font-size: 13px;
  color: var(--text-secondary, #606266);
}

.help-article-content .help-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.help-article-content .help-table th {
  background: var(--primary, #4f46e5);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}

.help-article-content .help-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e4e7ed;
}

.help-article-content .help-table tr:nth-child(even) td {
  background: #fafafa;
}

/* 欢迎页面 */
.help-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.help-welcome-icon {
  font-size: 64px;
  color: var(--primary, #4f46e5);
  margin-bottom: 24px;
}

.help-welcome h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary, #303133);
}

.help-welcome p {
  font-size: 14px;
  color: var(--text-secondary, #909399);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 32px;
}

.help-welcome-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 800px;
  width: 100%;
}

.help-welcome-card {
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: var(--radius-md, 12px);
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
}

.help-welcome-card:hover {
  border-color: var(--primary, #4f46e5);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,0.08));
  transform: translateY(-2px);
}

.help-welcome-card .card-icon {
  font-size: 28px;
  color: var(--primary, #4f46e5);
  margin-bottom: 12px;
}

.help-welcome-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-primary, #303133);
}

.help-welcome-card p {
  font-size: 12px;
  color: var(--text-secondary, #909399);
  margin: 0;
  line-height: 1.5;
}

/* 导航按钮 */
.help-nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e4e7ed;
}

/* 搜索结果 */
.help-search-results {
  padding: 20px;
}

.help-search-result-item {
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.help-search-result-item:hover {
  background: rgba(79, 70, 229, 0.04);
}

.help-search-result-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--primary, #4f46e5);
}

.help-search-result-item p {
  font-size: 13px;
  color: var(--text-secondary, #909399);
  margin: 0;
  line-height: 1.6;
}

.help-search-result-item .el-tag {
  margin-right: 6px;
}

/* 下载按钮区域 */
.help-download-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(79, 70, 229, 0.04);
  border-radius: var(--radius-md, 12px);
  margin-bottom: 16px;
}

.help-download-bar .help-download-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary, #606266);
}

/* 角色标签颜色 */
.role-tag-admin {
  --el-tag-bg-color: rgba(239, 68, 68, 0.1);
  --el-tag-border-color: rgba(239, 68, 68, 0.2);
  --el-tag-text-color: #ef4444;
}

.role-tag-project_manager {
  --el-tag-bg-color: rgba(79, 70, 229, 0.1);
  --el-tag-border-color: rgba(79, 70, 229, 0.2);
  --el-tag-text-color: #4f46e5;
}

.role-tag-site_staff {
  --el-tag-bg-color: rgba(16, 185, 129, 0.1);
  --el-tag-border-color: rgba(16, 185, 129, 0.2);
  --el-tag-text-color: #10b981;
}
