/* 全域與企業級 SaaS 風格 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.7;
}

/* 頂部 Header */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-brand-custom {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a !important;
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 15px;
}
.navbar-brand-custom .logo-icon {
    background-color: #2563eb;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    margin-right: 10px;
    font-size: 16px;
}
.header-nav > li > a {
    color: #475569;
    font-weight: 500;
    padding: 20px 15px;
    transition: color 0.2s;
}
.header-nav > li > a:hover,
.header-nav > li.active > a {
    color: #2563eb;
    background: transparent;
}

/* 頁面標題 Banner */
.page-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 45px 0 40px 0;
    margin-bottom: 35px;
}
.page-banner h1 {
    font-size: 32px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.page-banner p.subtitle {
    font-size: 16px;
    color: #94a3b8;
    max-width: 800px;
    margin-bottom: 15px;
}
.update-date-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 主要內容佈局 */
.legal-container {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* 左側章節導覽 (Sticky Table of Contents) */
.toc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    position: sticky;
    top: 80px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.toc-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}
.toc-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}
.toc-list li {
    margin-bottom: 6px;
}
.toc-list a {
    color: #475569;
    font-size: 13.5px;
    display: block;
    padding: 5px 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toc-list a:hover {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

/* 主文件區域 */
.document-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.legal-section {
    margin-bottom: 40px;
    scroll-margin-top: 90px;
}
.legal-section:last-child {
    margin-bottom: 0;
}
.legal-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    margin-top: 0;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
}
.legal-section h2 .section-num {
    color: #2563eb;
    margin-right: 8px;
}
.legal-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 18px;
    margin-bottom: 10px;
}
.legal-section p {
    color: #334155;
    font-size: 15px;
    margin-bottom: 12px;
}
.legal-section ul, .legal-section ol {
    padding-left: 20px;
    margin-bottom: 15px;
}
.legal-section li {
    margin-bottom: 8px;
    font-size: 14.5px;
    color: #334155;
}

/* 特殊高亮聲明框 */
.legal-alert-box {
    background-color: #f0f9ff;
    border-left: 4px solid #0284c7;
    padding: 16px 20px;
    border-radius: 0 6px 6px 0;
    margin: 18px 0;
}
.legal-alert-box p {
    color: #0369a1;
    font-size: 14.5px;
    margin-bottom: 0;
    font-weight: 500;
}
.legal-alert-box.warning {
    background-color: #fffbebf7;
    border-left-color: #d97706;
}
.legal-alert-box.warning p {
    color: #92400e;
}

/* 客服與公司聯絡 Card */
.contact-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 20px;
    margin-top: 15px;
}
.contact-box p {
    margin-bottom: 6px;
    font-size: 14px;
}

/* Footer 頁尾 */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 35px 0;
    color: #64748b;
    font-size: 14px;
}
.footer-links {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    gap: 20px;
}
.footer-links a {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: #2563eb;
}

/* 路由快速測試切換列 (開發除錯用) */
.route-demo-bar {
    background-color: #1e293b;
    color: #ffffff;
    padding: 8px;
    text-align: center;
    font-size: 12px;
}
.route-demo-bar a {
    color: #38bdf8;
    margin: 0 8px;
    font-weight: bold;
    text-decoration: underline;
}

/* Responsive 調整 */
@media (max-width: 991px) {
    .toc-card {
        position: static;
        margin-bottom: 25px;
    }
    .document-card {
        padding: 25px;
    }
}