/* 帮助中心公共样式 */
.help-container,
.help-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'SF Pro Display', sans-serif;
}



/* 帮助页面标题样式 */
.help-header,
.help-section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.help-header h2,
.help-section-header h1 {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.help-header p,
.help-section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* 帮助卡片样式 */
.help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.help-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}

.help-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.help-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.help-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.help-card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
    font-size: 14px;
}

.help-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 14px;
}

/* 角色选项卡样式 */
.role-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    justify-content: center;
}

.role-tab {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-light);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.role-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.role-tab:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 流程图公共样式 */
.flowchart-title {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.flowchart-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* 帮助章节样式 */
.role-content {
    display: none;
}

.role-content.active {
    display: block;
}

.help-section {
    margin: 0;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-white);
}

.help-section:last-child {
    border-bottom: none;
}

.help-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.help-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 2px;
}

.help-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

.help-section h5 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
}

.help-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 14px;
}

/* 列表样式 */
.help-section ul {
    list-style: none;
    margin-left: 0;
    margin-bottom: 1.25rem;
    padding-left: 1rem;
}

.help-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    padding-left: 1.25rem;
}

.help-section li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.25rem;
    position: absolute;
    left: 0;
    top: -0.125rem;
    line-height: 1;
}

.help-section li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 嵌套列表样式 */
.help-section li ul {
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding-left: 0.75rem;
}

.help-section li ul li {
    font-size: 13px;
    margin-bottom: 0.5rem;
}

/* 为代码和示例添加样式 */
.help-section code {
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* 流程图容器 */
.flowchart {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 流程图步骤 */
.flowchart-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 流程图节点 */
.flowchart-node {
    padding: 1rem 2rem;
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    max-width: 300px;
}

.flowchart-node.start,
.flowchart-node.end {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    border-radius: var(--radius-full);
}

/* 流程图箭头 */
.flowchart-arrow {
    width: 2px;
    height: 1.5rem;
    background: var(--border-color);
    margin: 0 auto;
}

.flowchart-arrow-horizontal {
    width: 4rem;
    height: 2px;
    background: var(--border-color);
    position: relative;
}

.flowchart-arrow-horizontal::after {
    content: '';
    position: absolute;
    right: -8px;
    top: -6px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid var(--border-color);
}

/* 子步骤容器- 通用样式 */
.flowchart-substeps {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
    justify-items: center;
}

/* 账号创建卡片- 2列 */
.flowchart-step:nth-child(2) .flowchart-substeps {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
}

/* 权限分配卡片- 4列 */
.flowchart-step:nth-child(3) .flowchart-substeps {
    grid-template-columns: repeat(4, minmax(200px, 1fr));
}

/* 账号管理操作卡片- 3列 */
.flowchart-step:nth-child(5) .flowchart-substeps {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
}

/* 子步骤卡片样式 */
.flowchart-substep {
    padding: 0.875rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 200px;
    max-width: 250px;
}

.flowchart-substep strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.flowchart-substep .description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* 水平流程 */
.flowchart-horizontal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

/* 账号状态卡片样式 */
.flowchart-horizontal .flowchart-substep {
    padding: 0.875rem 1.5rem;
    color: white;
    border: none;
    font-weight: 600;
}

/* 待激活状态- 黄色 */
.flowchart-horizontal .flowchart-substep:nth-child(1) {
    background: var(--warning-color);
}

/* 已激活状态- 绿色 */
.flowchart-horizontal .flowchart-substep:nth-child(3) {
    background: var(--success-color);
}

/* 已停用状态- 红色 */
.flowchart-horizontal .flowchart-substep:nth-child(5) {
    background: var(--error-color);
}

/* 状态卡片文字颜色 */
.flowchart-horizontal .flowchart-substep strong {
    color: white;
}

/* 结果节点 */
.flowchart-result {
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    color: white;
}

.flowchart-result.success {
    background: var(--success-color);
    border: 1px solid var(--success-color);
}

.flowchart-result.warning {
    background: var(--warning-color);
    border: 1px solid var(--warning-color);
}

/* 审核流程 */
.audit-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
}

.audit-flow-title {
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.audit-flow-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

.audit-step {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    min-width: 180px;
}

.audit-decision {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.decision-node {
    padding: 1rem 1.5rem;
    background: var(--bg-white);
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    min-width: 180px;
}

.decision-results {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.result-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.result-arrow {
    width: 2px;
    height: 1.5rem;
    background: var(--border-color);
}

.result-node {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    color: white;
}

.result-node.success {
    background: var(--success-color);
    border: 1px solid var(--success-color);
}

.result-node.error {
    background: var(--error-color);
    border: 1px solid var(--error-color);
}

.result-node.warning {
    background: var(--warning-color);
    border: 1px solid var(--warning-color);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .flowchart-step:nth-child(3) .flowchart-substeps {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .help-cards {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .help-card {
        padding: 1.25rem;
    }
    
    .help-header h2,
    .help-section-header h1,
    .flowchart-title {
        font-size: 1.5rem;
    }
    
    .help-section {
        padding: 1.25rem;
    }
    
    .help-section h3 {
        font-size: 1.375rem;
    }
    
    .help-section h4 {
        font-size: 1.125rem;
    }
    
    .flowchart-substeps {
        grid-template-columns: 1fr;
    }
    
    .flowchart-horizontal {
        flex-direction: column;
        gap: 0.875rem;
    }
    
    .flowchart-node {
        padding: 0.875rem 1.75rem;
        font-size: 0.9rem;
    }
    
    .audit-flow-content {
        flex-direction: column;
        gap: 0.875rem;
    }
    
    .decision-results {
        gap: 1.25rem;
    }
    
    .audit-step,
    .decision-node {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        min-width: auto;
    }
}