*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

::selection { background: rgba(79,110,247,.18); color: var(--text); }
footer ::selection { background: rgba(79,110,247,.55); color: #fff; }

:root {
    --primary: #4f6ef7;
    --primary-dark: #3a55d4;
    --accent: #ff6b35;
    --bg: #f5f7ff;
    --card: #ffffff;
    --text: #1e1e2e;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(79,110,247,0.10);
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ===== NAV ===== */
nav {
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    box-shadow: 0 1px 12px rgba(0,0,0,.06);
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), #7c8ff7);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav-links a:hover,
.nav-links a.active { color: var(--primary); font-weight: 600; }
.btn-nav {
    background: var(--primary); color: #fff;
    border: none; border-radius: 8px;
    padding: 8px 22px; font-size: .95rem;
    cursor: pointer; transition: background .2s;
    text-decoration: none;
}
.btn-nav:hover { background: var(--primary-dark); }

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, #EEF2FF 0%, #E8EDFF 55%, #EDE9FE 100%);
    padding: 64px 5% 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(79,110,247,.07) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}
.page-header > * { position: relative; z-index: 1; }
.page-header .hero-badge {
    display: inline-block;
    background: rgba(79,110,247,.1); color: var(--primary);
    border: 1px solid rgba(79,110,247,.22);
    border-radius: 20px; padding: 4px 16px;
    font-size: .82rem; font-weight: 600;
    margin-bottom: 16px; letter-spacing: .5px;
}
.page-header h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 12px; color: var(--text); }
.page-header h1 span { color: var(--primary); }
.page-header p { color: var(--muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* ===== SECTION ===== */
.section { padding: 64px 5%; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
.section-title p { color: var(--muted); font-size: 1rem; }

/* ===== STATS ===== */
.stats {
    background: linear-gradient(135deg, var(--primary), #6a7df8);
    padding: 56px 5%;
    display: flex;
    justify-content: center;
    gap: 64px;
    flex-wrap: wrap;
    text-align: center;
    color: #fff;
}
.stat-item strong { display: block; font-size: 2.5rem; font-weight: 800; }
.stat-item span { font-size: .95rem; opacity: .85; }

/* ===== FOOTER ===== */
footer {
    background: #111827;
    color: #9ca3af;
    padding: 56px 5% 0;
}
.footer-body {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid #1f2937;
}
.footer-brand .logo { color: #fff; margin-bottom: 14px; display: inline-flex; }
.footer-brand p { font-size: .88rem; line-height: 1.7; max-width: 240px; }
.footer-col h4 {
    color: #fff; font-size: .9rem; font-weight: 700;
    margin-bottom: 16px; letter-spacing: .3px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; list-style: none; }
.footer-links a { color: #9ca3af; text-decoration: none; font-size: .87rem; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-links a.active { color: #fff; font-weight: 600; }
/* 微信图标 QR 悬浮 */
.wechat-qr-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    min-width: 130px;
    pointer-events: none;
}
.wechat-qr-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #fff;
}
.wechat-qr-tip .qr-img { width: 108px; height: 108px; }
.wechat-qr-tip .qr-label { font-size: .74rem; color: #374151; font-weight: 600; white-space: nowrap; }
.contact-icon.wechat { position: relative; cursor: pointer; }
.contact-icon.wechat:hover .wechat-qr-tip { display: flex; }
.footer-contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-item {
    display: flex; align-items: center; gap: 12px;
    font-size: .87rem; color: #9ca3af;
}
.contact-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.contact-icon.qq      { background: #1a73e8; }
.contact-icon.wechat  { background: #07c160; }
.contact-icon.email   { background: #6366f1; }
.contact-label { display: flex; flex-direction: column; }
.contact-label strong { color: #e5e7eb; font-size: .85rem; line-height: 1.2; }
.contact-label span   { font-size: .78rem; color: #6b7280; margin-top: 2px; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; flex-wrap: wrap; gap: 10px;
    font-size: .82rem; color: #4b5563;
}
.footer-bottom a { color: #6b7280; text-decoration: none; transition: color .2s; }
.footer-bottom a:hover { color: #9ca3af; }
.footer-beian { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.footer-beian a { display: flex; align-items: center; gap: 5px; }
@media (max-width: 860px) {
    .footer-body { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .footer-body { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ===== TOAST ===== */
#toast {
    position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(80px);
    background: rgba(26,26,46,.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 28px; border-radius: 40px;
    font-size: .92rem; opacity: 0;
    transition: all .3s; z-index: 999;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== FORMAT ITEMS ===== */
.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}
.format-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.format-item:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #c8d3ff; }
.format-item .fmt-icon {
    width: 52px; height: 52px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.4rem; font-weight: 800; color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.fmt-pdf  { background: #e74c3c; }
.fmt-word { background: #2980b9; }
.fmt-excel{ background: #27ae60; }
.fmt-ppt  { background: #e67e22; }
.fmt-img  { background: #8e44ad; }
.fmt-txt  { background: #7f8c8d; }
.fmt-md   { background: #2c3e50; }
.fmt-html { background: #e84393; }
.format-item strong { display: block; font-size: .95rem; margin-bottom: 4px; }
.format-item span { font-size: .82rem; color: var(--muted); }

/* ===== FEATURE CARDS ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}
.feature-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px 24px;
    border: 1px solid var(--border);
    transition: box-shadow .2s, transform .2s, border-color .2s;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), #7c8ff7);
    opacity: 0; transition: opacity .2s;
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #d0d8ff; }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #e8edff, #d0d9ff);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 16px;
}
.feature-card h4 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* ===== STEP CARDS ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    max-width: 880px;
    margin: 0 auto;
}
.step-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform .2s, box-shadow .2s;
}
.step-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(79,110,247,.14); }
.step-num {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), #7c8ff7);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 1.1rem;
    margin: 0 auto 14px;
}
.step-card h4 { font-size: 1rem; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.faq-q {
    padding: 18px 22px;
    font-weight: 600; font-size: .97rem;
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    user-select: none;
}
.faq-q::after { content: '+'; font-size: 1.3rem; color: var(--primary); transition: transform .2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
    max-height: 0; overflow: hidden;
    transition: max-height .3s, padding .3s;
    color: var(--muted); font-size: .9rem; line-height: 1.6;
    padding: 0 22px;
}
.faq-item.open .faq-a { max-height: 200px; padding: 0 22px 18px; }

@media (max-width: 860px) {
    .nav-links { display: none; }
}
@media (max-width: 600px) {
    .page-header h1 { font-size: 1.8rem; }
    .stats { gap: 32px; }
    nav { padding: 0 4%; }
}

/* ===== BACK TO TOP ===== */
#backToTop {
    position: fixed;
    bottom: 84px; right: 20px;
    width: 44px; height: 44px;
    background: var(--primary);
    color: #fff; border: none; border-radius: 50%;
    font-size: 1.25rem; line-height: 1; font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(79,110,247,.4);
    opacity: 0; pointer-events: none;
    transform: translateY(12px);
    transition: opacity .28s, transform .28s, background .2s;
    z-index: 9990;
    display: flex; align-items: center; justify-content: center;
}
#backToTop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
#backToTop:hover { background: var(--primary-dark); transform: translateY(-3px) !important; }

/* ===== CUSTOMER SERVICE FLOAT ===== */
/* 整体容器 */
#csFloat {
    position: fixed;
    right: 20px; bottom: 148px;
    z-index: 9999;
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}

/* 触发按钮 */
#csTrigger {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #6278f8, #4f6ef7);
    color: #fff; border: none; border-radius: 50%;
    cursor: pointer; font-family: inherit;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 24px rgba(79,110,247,.45);
    transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
    position: relative;
    flex-shrink: 0;
}
#csTrigger svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#csTrigger:hover { transform: scale(1.12); box-shadow: 0 10px 32px rgba(79,110,247,.55); }
#csTrigger.is-open { background: linear-gradient(135deg, #374151, #1f2937); }

/* 脉冲圈 */
.cs-pulse {
    position: absolute; inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(79,110,247,.5);
    animation: csPulse 2.2s ease-out infinite;
    pointer-events: none;
}
@keyframes csPulse {
    0%   { transform: scale(1);   opacity: .8; }
    70%  { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1.4); opacity: 0; }
}
#csTrigger.is-open .cs-pulse { display: none; }

/* 面板 */
#csPanel {
    position: absolute;
    bottom: 64px; right: 0;
    width: 300px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.08);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: scale(.92) translateY(14px);
    transform-origin: bottom right;
    transition: opacity .26s cubic-bezier(.4,0,.2,1), transform .26s cubic-bezier(.34,1.2,.64,1);
}
#csPanel.open { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }

/* 面板头部 */
.cs-head {
    background: linear-gradient(135deg, #5a72f8 0%, #7c52e8 100%);
    padding: 20px 18px 18px;
    position: relative;
}
.cs-head-row { display: flex; align-items: center; gap: 12px; }
.cs-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255,255,255,.22);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.4);
}
.cs-head-info { flex: 1; }
.cs-head-info strong { display: block; color: #fff; font-size: .98rem; font-weight: 800; letter-spacing: .2px; }
.cs-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; }
.cs-dot-sm {
    width: 7px; height: 7px; border-radius: 50%; background: #4ade80; flex-shrink: 0;
    animation: csDotBlink 2.2s ease-in-out infinite;
    box-shadow: 0 0 6px #4ade80;
}
.cs-status-text { font-size: .76rem; color: rgba(255,255,255,.85); }
.cs-close {
    position: absolute; top: 12px; right: 12px;
    background: rgba(255,255,255,.18); border: none;
    width: 28px; height: 28px; border-radius: 50%;
    color: #fff; cursor: pointer; font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.cs-close:hover { background: rgba(255,255,255,.32); }

/* 面板内容区 */
.cs-body { padding: 16px; }

/* 标签切换 */
.cs-tabs {
    display: flex; gap: 6px;
    background: #f3f4f8; border-radius: 10px; padding: 4px;
    margin-bottom: 16px;
}
.cs-tab {
    flex: 1; border: none; border-radius: 7px; padding: 7px 0;
    font-size: .82rem; font-weight: 600; cursor: pointer;
    background: none; color: #6b7280; font-family: inherit;
    transition: background .18s, color .18s;
}
.cs-tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* 内容页 */
.cs-page { display: none; }
.cs-page.active { display: block; }

/* 微信 QR 区 */
.cs-wechat-wrap { text-align: center; padding: 4px 0 6px; }
.cs-qr-frame {
    width: 148px; height: 148px;
    margin: 0 auto 10px;
    padding: 10px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(7,193,96,.15), 0 0 0 1.5px rgba(7,193,96,.25);
    box-sizing: border-box;
}
.cs-qr-label { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.cs-wid-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 8px; padding: 5px 14px;
    font-size: .83rem; font-weight: 700; color: #16a34a;
}
.cs-wid-badge svg { width: 15px; height: 15px; flex-shrink: 0; }

/* 联系列表 */
.cs-contact-list { display: flex; flex-direction: column; gap: 10px; }
.cs-card {
    display: flex; align-items: center; gap: 12px;
    background: #f8f9fc; border-radius: 12px;
    padding: 11px 13px;
    transition: background .18s;
}
.cs-card:hover { background: #eef1ff; }
.cs-card-icon {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.cs-card-icon.ic-qq      { background: #e8f1ff; }
.cs-card-icon.ic-email   { background: #eef0ff; }
.cs-card-body { flex: 1; min-width: 0; }
.cs-card-body b { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 2px; }
.cs-card-body span { font-size: .77rem; color: var(--muted); }
.cs-btn {
    font-size: .77rem; font-weight: 700;
    border-radius: 8px; padding: 5px 12px;
    cursor: pointer; text-decoration: none; border: none;
    font-family: inherit; transition: opacity .18s, transform .12s; white-space: nowrap;
}
.cs-btn:hover { opacity: .85; transform: translateY(-1px); }
.cs-btn-blue  { background: #1677ff; color: #fff; }
.cs-btn-ghost { background: none; border: 1.5px solid var(--border); color: var(--muted); }

/* 底部 */
.cs-footer {
    border-top: 1px solid #f3f4f6;
    margin-top: 14px; padding-top: 12px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: .74rem; color: #9ca3af;
}
.cs-dot-online {
    width: 6px; height: 6px; border-radius: 50%; background: #4ade80; flex-shrink: 0;
    animation: csDotBlink 2.2s ease-in-out infinite;
}
@keyframes csDotBlink { 0%,100%{opacity:1} 50%{opacity:.25} }

@media (max-width: 480px) {
    #csFloat { right: 12px; bottom: 140px; }
    #csPanel { width: 272px; }
}

/* ===================================================================
   USER BACKEND LAYOUT  (dashboard.html + billing.html 共用)
=================================================================== */
.user-layout {
    display: flex; max-width: 1400px;
    margin: 0 auto; gap: 28px;
    padding: 40px 5%; align-items: flex-start;
    min-height: 70vh;
}
.user-sidebar { width: 260px; flex-shrink: 0; }
.user-profile {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 20px;
    text-align: center; margin-bottom: 16px;
}
.user-profile .avatar {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--primary), #7c8ff7);
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 1.8rem; color: #fff;
    font-weight: 700; margin: 0 auto 12px;
}
.user-profile h3 { font-size: 1rem; margin-bottom: 4px; }
.user-profile p  { color: var(--muted); font-size: .84rem; }
.plan-badge {
    display: inline-block; margin-top: 10px;
    background: linear-gradient(135deg, var(--primary), #7c8ff7);
    color: #fff; border-radius: 20px;
    padding: 3px 14px; font-size: .8rem; font-weight: 600;
}
.user-menu {
    list-style: none; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.user-menu li a {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 18px; font-size: .92rem; color: var(--muted);
    text-decoration: none; border-bottom: 1px solid var(--border);
    transition: background .15s, color .15s;
}
.user-menu li:last-child a { border-bottom: none; }
.user-menu li a:hover  { background: #f0f4ff; color: var(--primary); }
.user-menu li a.active { background: #eef1ff; color: var(--primary); font-weight: 600; }
.menu-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.user-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.content-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 26px;
}
.content-card h3 {
    font-size: 1.05rem; font-weight: 700;
    margin-bottom: 18px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
}
/* 进度条 */
.progress-label { display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); margin-bottom: 6px; }
.progress-bar   { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-fill  { height: 100%; background: linear-gradient(90deg, var(--primary), #7c8ff7); border-radius: 99px; transition: width .8s; }
.usage-item { background: var(--bg); border-radius: 10px; padding: 16px; text-align: center; }
.usage-item strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.usage-item span   { font-size: .82rem; color: var(--muted); }
/* 账单列表 */
.billing-list { display: flex; flex-direction: column; }
.billing-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.billing-item:last-child { border-bottom: none; }
.billing-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem; flex-shrink: 0;
}
.billing-desc { flex: 1; min-width: 0; }
.billing-desc .b-name { font-size: .9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.billing-desc .b-time { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.billing-amount       { font-size: .92rem; font-weight: 700; white-space: nowrap; }
.billing-amount.plus,  .billing-amount.credit { color: #27ae60; }
.billing-amount.minus, .billing-amount.debit  { color: #e74c3c; }
.billing-balance-col  { font-size: .78rem; color: var(--muted); white-space: nowrap; text-align: right; min-width: 80px; }
/* 计费表 */
.price-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.price-table th, .price-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.price-table th { background: var(--bg); font-weight: 600; color: var(--muted); font-size: .82rem; }
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:hover td { background: #f7f8ff; }
.price-val   { color: var(--primary); font-weight: 700; }
.price-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.price-badge.free { background: #e6f9f0; color: #27ae60; }
.price-badge.paid { background: #fff5e6; color: #e67e22; }
/* 套餐卡片 */
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan-card {
    border: 2px solid var(--border); border-radius: 14px;
    padding: 20px 14px; text-align: center; cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    position: relative; background: var(--card); overflow: hidden;
}
.plan-card:hover   { border-color: var(--primary); box-shadow: 0 6px 24px rgba(79,110,247,.15); transform: translateY(-2px); }
.plan-card.selected{ border-color: var(--primary); box-shadow: 0 4px 18px rgba(79,110,247,.18); background: #f7f9ff; }
.plan-tag {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b3d, #f7a236); color: #fff;
    font-size: .7rem; font-weight: 700; padding: 2px 12px; border-radius: 20px; white-space: nowrap;
}
.plan-tag.recommend { background: linear-gradient(135deg, var(--primary), #7c8ff7); }
.plan-points { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.plan-price  { font-size: 1.15rem; font-weight: 700; color: var(--text); }
/* 分页 */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.page-btn {
    border: 1.5px solid var(--border); background: var(--card); color: var(--muted);
    border-radius: 8px; padding: 6px 12px; font-size: .85rem; cursor: pointer;
    transition: all .2s; min-width: 34px; text-align: center; line-height: 1.4;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active   { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.page-btn:disabled { opacity: .4; cursor: default; }
/* 筛选栏 */
.records-filter { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-select {
    border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 12px;
    font-size: .88rem; outline: none; cursor: pointer;
    background: var(--bg); color: var(--text); transition: border-color .2s;
}
.filter-select:focus { border-color: var(--primary); }
.filter-clear {
    border: 1.5px solid var(--border); background: var(--card); color: var(--muted);
    border-radius: 8px; padding: 8px 14px; font-size: .85rem; cursor: pointer;
    white-space: nowrap; transition: all .2s;
}
.filter-clear:hover { border-color: #e74c3c; color: #e74c3c; }
/* 空状态 */
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .es-icon { font-size: 2.5rem; margin-bottom: 10px; opacity: .5; }
.empty-state p { font-size: .9rem; }
/* 余额高亮卡 */
.balance-highlight { background: linear-gradient(135deg, var(--primary), #7c8ff7) !important; }
.balance-highlight strong { color: #fff !important; }
.balance-highlight span   { color: rgba(255,255,255,.85) !important; }
/* 充值按钮 */
.btn-recharge {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--primary), #7c8ff7);
    color: #fff; border: none; border-radius: 8px;
    padding: 10px 24px; font-size: .92rem; font-weight: 600;
    cursor: pointer; transition: opacity .2s;
}
.btn-recharge:hover { opacity: .88; }
@keyframes spin { to { transform: rotate(360deg); } }
.plan-unit  { font-size: .8rem; color: var(--muted); margin: 2px 0 4px; }
.plan-save  { font-size: .75rem; color: #27ae60; font-weight: 600; min-height: 16px; }
.plan-orig  { font-size: .85rem; color: var(--muted); text-decoration: line-through; margin-left: 4px; }
.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.pay-method-btn {
    display: flex; align-items: center; gap: 8px;
    border: 2px solid var(--border); background: var(--card);
    border-radius: 10px; padding: 10px 18px;
    cursor: pointer; font-size: .9rem; transition: all .2s;
}
.pay-method-btn.selected { border-color: var(--primary); color: var(--primary); background: #eef1ff; }
.billing-icon.credit { background: #e6f9f0; }
.billing-icon.debit  { background: #ffeaea; }
@media (max-width: 680px) {
    .user-sidebar { display: none; }
    .user-layout  { padding: 24px 4%; }
    .plan-grid    { grid-template-columns: repeat(2, 1fr); }
    .price-table th:nth-child(2), .price-table td:nth-child(2) { display: none; }
}
@media (max-width: 440px) {
    .plan-grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   LEGAL DOCS  (privacy.html + terms.html 共用)
=================================================================== */
.legal-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 5% 88px;
}
.legal-meta {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    margin-bottom: 40px; padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    font-size: .84rem; color: var(--muted);
}
.legal-meta-item { display: flex; align-items: center; gap: 6px; }
.legal-meta-item svg { flex-shrink: 0; }
.legal-version {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(79,110,247,.08); color: var(--primary);
    border: 1px solid rgba(79,110,247,.18);
    border-radius: 20px; padding: 4px 14px;
    font-size: .78rem; font-weight: 600; margin-bottom: 8px;
}
.legal-tip {
    background: linear-gradient(135deg, #eef1ff, #f0f4ff);
    border-left: 4px solid var(--primary);
    border-radius: 0 10px 10px 0;
    padding: 14px 18px; margin: 14px 0;
    font-size: .88rem; color: var(--text); line-height: 1.7;
    box-shadow: 0 2px 8px rgba(79,110,247,.07);
}
.legal-tip.warn {
    background: linear-gradient(135deg, #fff8ec, #fff3e0);
    border-left-color: #f59e0b;
}
.legal-tip.danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left-color: #ef4444;
}
.legal-section {
    margin-bottom: 44px;
    scroll-margin-top: 80px;
}
.legal-section-title {
    display: flex; align-items: center; gap: 12px;
    font-size: 1.1rem; font-weight: 800; color: var(--text);
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.legal-num {
    min-width: 28px; height: 28px; border-radius: 8px;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 800; flex-shrink: 0;
}
.legal-body p {
    font-size: .92rem; color: var(--muted); line-height: 1.85; margin-bottom: 12px;
}
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body ul, .legal-body ol {
    margin: 8px 0 14px; padding: 0;
    list-style: none; display: flex; flex-direction: column; gap: 6px;
}
.legal-body ul li, .legal-body ol li {
    font-size: .9rem; color: var(--muted); line-height: 1.7;
    display: flex; align-items: flex-start; gap: 8px;
    padding: 5px 8px; border-radius: 7px; transition: background .15s;
}
.legal-body ul li:hover, .legal-body ol li:hover { background: var(--bg); }
.legal-body ul li::before {
    content: '•'; color: var(--primary); font-weight: 700;
    flex-shrink: 0; margin-top: 1px;
}
.legal-body ol { counter-reset: legal-ol; }
.legal-body ol li { counter-increment: legal-ol; }
.legal-body ol li::before {
    content: counter(legal-ol) ".";
    color: var(--primary); font-weight: 700;
    flex-shrink: 0; min-width: 18px; margin-top: 1px;
}
/* privacy.html 专用：目录、联系卡片 */
.legal-toc {
    background: linear-gradient(135deg, #EEF2FF, #E8EDFF);
    border: 1px solid rgba(79,110,247,.18);
    border-radius: 14px; padding: 22px 26px;
    margin-bottom: 48px;
}
.legal-toc-title {
    font-size: .82rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px;
}
.legal-toc ol {
    list-style: none; display: flex; flex-direction: column; gap: 6px;
    columns: 2; column-gap: 24px;
}
.legal-toc li { break-inside: avoid; }
.legal-toc a {
    font-size: .88rem; color: var(--primary); text-decoration: none;
    display: flex; align-items: center; gap: 6px;
    padding: 3px 0; transition: opacity .15s;
}
.legal-toc a:hover { opacity: .75; text-decoration: underline; }
.legal-toc .toc-num {
    font-size: .74rem; font-weight: 700; color: var(--primary);
    background: rgba(79,110,247,.12); border-radius: 4px;
    padding: 1px 6px; flex-shrink: 0;
}
.legal-contact-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 14px; padding: 22px 26px;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    box-shadow: 0 2px 12px rgba(79,110,247,.06);
}
.legal-contact-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #7c8ff7);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}
.legal-contact-info strong { display: block; font-size: .95rem; margin-bottom: 3px; }
.legal-contact-info span   { font-size: .86rem; color: var(--muted); }
.legal-contact-info a { color: var(--primary); text-decoration: none; }
.legal-contact-info a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .legal-toc ol       { columns: 1; }
    .legal-section-title{ font-size: 1rem; }
    .legal-contact-card { flex-direction: column; }
}
