/* ========================================
   助业谷业务流说明系统 - 共享样式
   主题色：红白系列
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #fafafa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* --- Layout --- */
.app-layout { display: flex; min-height: 100vh; }

/* --- Sidebar --- */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: #fff;
    color: #333;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
    overflow-y: auto;
}
.sidebar-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #C62828;
}
.sidebar-header .subtitle {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.7rem;
    color: #bbb;
}

/* --- Tree Nodes --- */
.tree-group { margin-bottom: 2px; }
.tree-group-header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.92rem;
    font-weight: 600;
    gap: 8px;
    color: #333;
}
.tree-group-header:hover { background: #FFF5F5; color: #C62828; }
.tree-group-header .arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}
.tree-group.expanded > .tree-group-header .arrow { transform: rotate(90deg); }
.tree-group-icon { font-size: 1rem; flex-shrink: 0; }

.tree-children { display: none; }
.tree-group.expanded > .tree-children { display: block; }

.tree-item {
    display: block;
    padding: 8px 20px 8px 44px;
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
}
.tree-item:hover {
    background: #FFF5F5;
    color: #C62828;
    border-left-color: #C62828;
}
.tree-item.active {
    background: #FFF5F5;
    color: #C62828;
    border-left-color: #C62828;
    font-weight: 600;
}
.tree-item .badge {
    font-size: 0.65rem;
    background: #C62828;
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 400;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

/* --- Top Bar --- */
.top-bar {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.top-bar .breadcrumb {
    font-size: 0.85rem;
    color: #999;
}
.top-bar .breadcrumb a { color: #C62828; text-decoration: none; }
.top-bar .breadcrumb span { margin: 0 6px; }
.top-bar .search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 6px 14px;
    gap: 6px;
}
.top-bar .search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    width: 180px;
}
.top-bar .search-box .search-icon { font-size: 0.9rem; color: #999; }

/* --- Page Content --- */
.page-content { padding: 32px; max-width: 1100px; }

/* --- Section Cards --- */
.section-card {
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #C62828;
}
.section-card h2 {
    font-size: 1.2rem;
    color: #C62828;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFEBEE;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-card h2 .icon { font-size: 1.3rem; }
.section-card h3 {
    font-size: 1.05rem;
    color: #444;
    margin: 20px 0 10px;
    padding-left: 12px;
    border-left: 3px solid #E53935;
}

/* --- Flow Steps --- */
.flow-steps { position: relative; padding-left: 20px; }
.flow-steps .step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
}
.flow-steps .step::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 30px;
    bottom: -20px;
    width: 2px;
    background: #FFCDD2;
}
.flow-steps .step:last-child::before { display: none; }
.flow-steps .step-num {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: #C62828;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}
.flow-steps .step.start .step-num { background: #4CAF50; }
.flow-steps .step.end .step-num { background: #1565C0; }
.flow-steps .step.warning .step-num { background: #F9A825; }
.flow-steps .step-content { flex: 1; }
.flow-steps .step-title { font-weight: 600; color: #333; margin-bottom: 4px; }
.flow-steps .step-desc { font-size: 0.9rem; color: #666; line-height: 1.7; }
.flow-steps .step-note {
    margin-top: 6px;
    padding: 8px 12px;
    background: #FFF3E0;
    border-left: 3px solid #FF9800;
    font-size: 0.82rem;
    color: #E65100;
    border-radius: 0 6px 6px 0;
}

/* --- Price Table --- */
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.9rem;
}
.price-table th {
    background: #C62828;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.price-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.price-table tr:nth-child(even) td { background: #FFF5F5; }
.price-table .highlight { color: #C62828; font-weight: 700; font-size: 1.1rem; }

/* --- Doc List --- */
.doc-list { list-style: none; }
.doc-list li {
    padding: 12px 16px;
    margin: 8px 0;
    background: #FFF5F5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #FFEBEE;
    transition: all 0.2s;
}
.doc-list li:hover { background: #FFEBEE; border-color: #EF9A9A; }
.doc-list .doc-icon { font-size: 1.3rem; flex-shrink: 0; }
.doc-list .doc-info { flex: 1; }
.doc-list .doc-name { font-weight: 600; color: #333; }
.doc-list .doc-desc { font-size: 0.82rem; color: #888; margin-top: 2px; }
.doc-list .doc-tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: #E53935;
    color: #fff;
    flex-shrink: 0;
}
.doc-list .doc-tag.template { background: #F9A825; color: #333; }
.doc-list .doc-tag.guide { background: #1565C0; }
.doc-list .doc-tag.form { background: #7B1FA2; }

/* --- FAQ Accordion --- */
.faq-item {
    margin-bottom: 8px;
    border: 1px solid #FFEBEE;
    border-radius: 8px;
    overflow: hidden;
}
.faq-question {
    padding: 14px 18px;
    background: #FFF5F5;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    font-size: 0.92rem;
}
.faq-question:hover { background: #FFEBEE; }
.faq-question .faq-arrow { transition: transform 0.2s; font-size: 0.7rem; }
.faq-item.open .faq-question .faq-arrow { transform: rotate(180deg); }
.faq-answer {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.8;
}
.faq-item.open .faq-answer { padding: 14px 18px; max-height: 1000px; }

/* --- Info Banner --- */
.info-banner {
    background: linear-gradient(135deg, #FFF5F5, #FFEBEE);
    border: 1px solid #EF9A9A;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.info-banner .banner-icon { font-size: 1.8rem; flex-shrink: 0; }
.info-banner .banner-content { font-size: 0.9rem; color: #555; }
.info-banner .banner-content strong { color: #C62828; }

/* --- Platform Link --- */
.platform-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #C62828;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
    margin: 4px;
}
.platform-link:hover { background: #B71C1C; }

/* --- Checklist --- */
.checklist { list-style: none; }
.checklist li {
    padding: 8px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-bottom: 1px dotted #eee;
}
.checklist li::before { content: '☑'; color: #C62828; font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* --- Tips --- */
.tip-box {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 12px 0;
    font-size: 0.88rem;
    line-height: 1.7;
}
.tip-box.warning { background: #FFF3E0; border: 1px solid #FFB74D; color: #E65100; }
.tip-box.info { background: #E3F2FD; border: 1px solid #64B5F6; color: #0D47A1; }
.tip-box.success { background: #E8F5E9; border: 1px solid #81C784; color: #1B5E20; }
.tip-box .tip-title { font-weight: 700; margin-bottom: 6px; }

/* --- Two Column --- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* --- Price Card --- */
.price-card {
    background: #fff;
    border: 2px solid #C62828;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}
.price-card:hover { box-shadow: 0 4px 16px rgba(198,40,40,0.15); transform: translateY(-2px); }
.price-card .price { font-size: 2rem; font-weight: 800; color: #C62828; }
.price-card .price-label { font-size: 0.85rem; color: #888; margin-bottom: 8px; }
.price-card .price-desc { font-size: 0.82rem; color: #666; margin-top: 4px; }

/* --- Subsection Box --- */
.subsection {
    margin: 20px 0;
    padding: 20px;
    background: #FAFAFA;
    border-radius: 8px;
    border: 1px solid #eee;
}
.subsection h3 { margin-top: 0; }

/* --- Mobile Toggle --- */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    background: #C62828;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .sidebar.open { transform: translateX(0); }
    .mobile-toggle { display: flex; align-items: center; justify-content: center; }
    .main-content { margin-left: 0; }
    .page-content { padding: 20px 16px; }
    .top-bar { padding: 14px 16px; }
    .two-col, .three-col { grid-template-columns: 1fr; }
    .section-card { padding: 20px; }
}

/* --- Print --- */
@media print {
    .sidebar, .top-bar, .mobile-toggle { display: none; }
    .main-content { margin-left: 0; }
    .section-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
