:root {
    --bg: #f4f5f7;
    --card: #ffffff;
    --border: #e4e7ec;
    --text: #1a1d24;
    --muted: #7a8190;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-soft: #fff1e6;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 6px 20px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ---------- 顶栏 ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand .logo { font-size: 20px; font-weight: 800; }
.brand .sub { font-size: 13px; color: var(--muted); }

.btn-activate {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-activate:hover { background: var(--accent-dark); }

/* ---------- 分类导航 ---------- */
.cats {
    display: flex;
    gap: 6px;
    padding: 14px 28px 0;
    overflow-x: auto;
    max-width: 1100px;
    margin: 0 auto;
}
.cat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.cat:hover { color: var(--text); border-color: var(--accent); }
.cat.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ---------- 主区 ---------- */
.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 28px 12px;
}

/* ---------- 认知篇（免费公开，入口在最前） ---------- */
.cognition {
    margin-bottom: 32px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    border-radius: 16px;
}
.cognition-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.cognition-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}
.cognition-hint {
    font-size: 12px;
    color: var(--muted);
}
.cognition-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.cog-card {
    flex: 1 1 200px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.18s;
    box-shadow: var(--shadow);
}
.cog-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.14);
}
.cog-icon { font-size: 30px; line-height: 1; flex-shrink: 0; }
.cog-text { min-width: 0; }
.cog-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.cog-sub { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* 认知篇子分组（认知 / 基础知识） */
.cog-subgroup { margin-bottom: 20px; }
.cog-subgroup-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cog-subgroup-title::before {
    content: '';
    width: 4px;
    height: 14px;
    background: var(--accent);
    border-radius: 2px;
}
.cog-group-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* 认知篇正文（扫盲文章） */
.cog-article {
    padding: 4px 8px 12px;
    line-height: 1.9;
    color: var(--text);
}

/* 待补充占位 */
.cog-soon {
    padding: 52px 20px;
    text-align: center;
    color: var(--muted);
}
.cog-soon-icon { font-size: 42px; display: block; margin-bottom: 14px; }
.cog-soon-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.cog-soon-sub { font-size: 13px; }
.cog-article-head { margin-bottom: 6px; }
.cog-article-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.cog-article-sub { font-size: 13px; color: var(--muted); margin: 0; }
.cog-h {
    font-size: 16px; font-weight: 700; margin: 18px 0 8px;
    padding-left: 10px; border-left: 3px solid var(--accent);
}
.cog-p { font-size: 15px; margin: 8px 0; text-indent: 2em; line-height: 1.9; }

/* 金句卡片 */
.cog-quote {
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    padding: 14px 16px;
    margin: 14px 0;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    line-height: 1.7;
}

/* 三要点卡片 */
.cog-points {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0;
}
.cog-point {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}
.cog-point-icon { font-size: 26px; line-height: 1.25; flex-shrink: 0; }
.cog-point-body { min-width: 0; }
.cog-point-title { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.cog-point-text { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* 两种外贸形式（顺序表述：第一个 / 第二个） */
.cog-compare {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 14px 0;
}
.cog-compare-item {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
}
.cog-compare-head {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}
.cog-compare-text {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
    margin: 0 0 6px;
    text-indent: 2em;
}
.cog-compare-text:last-child { margin-bottom: 0; }

/* 结尾强调 */
.cog-highlight {
    background: var(--accent);
    color: #fff;
    padding: 16px 18px;
    margin: 16px 0 4px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    line-height: 1.7;
    box-shadow: var(--shadow);
}



/* ---------- 分组（纵向堆叠，工具横向列表） ---------- */
.group {
    margin-bottom: 24px;
}
.group-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.group-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--accent);
    border-radius: 2px;
}

/* ---------- 工具列表（横向大图标卡片） ---------- */
.tool-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 18px;
    min-width: 120px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
    box-shadow: var(--shadow);
}
.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(249, 115, 22, 0.14);
}
.tool-icon {
    font-size: 44px;
    line-height: 1;
}
.tool-icon-img {
    width: 44px;
    height: 44px;
    display: block;
}
.tool-name {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}
/* 工具二级分组（基础准备 · 网络搭建 等） */
.sub-group { margin-bottom: 20px; }
.sub-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 10px;
    padding-left: 12px;
    border-left: 3px solid var(--accent-soft);
}
.sub-empty {
    font-size: 13px;
    color: var(--muted);
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    text-align: center;
}
/* 待制作角标 */
.tool-soon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 10px;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fbbf24;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
}
.tool-card-soon { opacity: 0.65; }
.tool-card-soon:hover { opacity: 1; }
.chip-level {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
}
.chip-must {
    color: #fff;
    background: #e8590c;
    border-color: #e8590c;
}
.chip-alt {
    color: #0b7285;
    background: #e3fafc;
    border-color: #0b7285;
}
.chip-main {
    color: #92400e;
    background: #fef3c7;
    border-color: #f59e0b;
}

/* ---------- 专区入口 ---------- */
.zones {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 28px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.zone-card {
    background: linear-gradient(135deg, #1f2937, #374151);
    border-radius: var(--radius);
    padding: 20px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.18s, opacity 0.18s;
}
.zone-card:hover { transform: translateY(-3px); }
.zone-icon { font-size: 32px; }
.zone-name { font-size: 15px; font-weight: 700; }
.zone-desc { font-size: 12px; opacity: 0.75; }
.zone-lock { margin-left: auto; font-size: 18px; opacity: 0.7; }

/* ---------- 弹窗 ---------- */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 25, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
    background: var(--card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: pop 0.2s ease;
}
.modal.modal-wide { max-width: 1320px; }
@keyframes pop {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 17px; }
.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: background 0.15s;
}
.modal-close:hover { background: #f1f3f5; }
.modal-body { padding: 22px; overflow-y: auto; }

/* ---------- 翻译工具（三级界面） ---------- */
.lang-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.lang-select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
}
.btn-swap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    color: var(--accent);
    flex-shrink: 0;
}
.btn-swap:hover { background: var(--accent-soft); }

.text-input, .text-output {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 14px;
    line-height: 1.6;
}
.text-input:focus { outline: none; border-color: var(--accent); }
.text-output { background: #fafbfc; }

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { background: #cbd0d8; cursor: not-allowed; }

.result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}
.status { font-size: 13px; color: var(--muted); }
.status.error { color: #dc2626; }
.status.ok { color: #16a34a; }

.btn-copy {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
}
.btn-copy:hover { background: var(--accent-soft); }
.btn-copy:disabled { color: var(--muted); cursor: not-allowed; background: #fafbfc; }

/* ---------- 交互式教程（决策树） ---------- */
.guide-q { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.guide-hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.guide-opts { display: flex; flex-direction: column; gap: 10px; }
.guide-opt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 13px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    font-family: inherit;
}
.guide-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.guide-opt-label { font-size: 14px; font-weight: 600; }
.guide-opt-hint { font-size: 12px; color: var(--muted); }
.guide-result {
    font-size: 17px;
    font-weight: 800;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
}
.guide-result.ok { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.guide-result.warn { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.guide-tip { font-size: 13px; line-height: 1.6; color: var(--text); margin-bottom: 14px; }
.guide-check {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.guide-check h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.guide-check ul { margin: 0; padding-left: 18px; }
.guide-check li { font-size: 12px; line-height: 1.8; color: var(--muted); }
.guide-actions { display: flex; justify-content: flex-end; }

/* ---------- 未实现工具占位 ---------- */
.tool-placeholder {
    text-align: center;
    padding: 40px 20px;
}
.tool-placeholder .big-icon { font-size: 52px; margin-bottom: 14px; }
.tool-placeholder p { color: var(--muted); font-size: 14px; }

/* ---------- 服务器指引（合规科普） ---------- */
.guide-disclaimer {
    font-size: 12px;
    color: #7c6a3a;
    background: #fffbea;
    border: 1px solid #f0e4b2;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    line-height: 1.5;
}
.guide-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

/* ---------- IP 安全检测工具 ---------- */
.ipcheck .ip-input-row { display: flex; gap: 10px; margin-bottom: 10px; }
.ip-input {
    flex: 1;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.ip-input:focus { outline: none; border-color: var(--accent); }
.ip-summary {
    font-size: 14px;
    font-weight: 700;
    padding: 12px 14px;
    border-radius: 10px;
    margin: 12px 0;
    background: var(--accent-soft);
    color: var(--accent-dark);
    border: 1px solid var(--accent);
    line-height: 1.5;
}
.ip-card {
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.ip-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.ip-kv { list-style: none; margin: 0; padding: 0; }
.ip-kv li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    padding: 5px 0;
    border-bottom: 1px dashed var(--border);
}
.ip-kv li:last-child { border-bottom: none; }
.ip-kv li span { color: var(--muted); }
.ip-kv li b { font-weight: 600; text-align: right; }
.ip-flag { font-size: 13px; font-weight: 600; }
.ip-flag.good { color: #16a34a; }
.ip-flag.bad { color: #dc2626; }
.ip-sources { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- 网络选择科普（平铺） ---------- */
.net-head { margin-bottom: 4px; }
.net-title { font-size: 20px; font-weight: 800; }
.net-subtitle { font-size: 13px; color: var(--muted); margin-top: 4px; }

.net-tabs {
    display: flex;
    gap: 10px;
    margin: 14px 0 16px;
}
.net-tab {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 16px;
    border: 2px solid var(--border);
    background: var(--card);
    color: var(--muted);
    cursor: pointer;
    border-radius: 10px;
    font-family: inherit;
    text-align: center;
    line-height: 1.4;
    transition: all .15s ease;
}
.net-tab:hover {
    border-color: var(--accent);
    color: var(--text);
}
.net-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
}

.net-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--muted);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.net-section.net-danger { border-left-color: #dc2626; }
.net-section.net-warn { border-left-color: #d97706; }
.net-section.net-ok { border-left-color: #16a34a; }
.net-section.net-best { border-left-color: #059669; }

.net-rank {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
    color: #fff;
    background: var(--muted);
}
.net-danger .net-rank { background: #dc2626; }
.net-warn .net-rank { background: #d97706; }
.net-ok .net-rank { background: #16a34a; }
.net-best .net-rank { background: #059669; }

.net-sec-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }

.net-cost {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-dark);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 2px 10px;
    margin-bottom: 8px;
}
.net-intro {
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 10px;
}
.net-warn {
    background: #fef3f2;
    border: 1px solid #fda29b;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.net-warn-title {
    font-size: 13px;
    font-weight: 700;
    color: #b42318;
    margin-bottom: 6px;
}
.net-downside {
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.net-downside-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
}
.net-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 4px 0 12px;
}
.net-table th, .net-table td {
    border: 1px solid var(--border);
    padding: 7px 9px;
    text-align: left;
    vertical-align: top;
}
.net-table th {
    background: var(--accent-soft);
    font-weight: 700;
    white-space: nowrap;
}
.net-table tbody tr:nth-child(even) {
    background: #f8f9fb;
}

.net-impact { font-size: 13px; font-weight: 700; margin: 4px 0 6px; }

.net-points { list-style: none; margin: 0 0 10px; padding: 0; }
.net-points li {
    font-size: 13px;
    line-height: 1.7;
    padding: 4px 0 4px 18px;
    position: relative;
}
.net-points li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--accent);
    font-weight: 700;
}

.net-conclusion {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-dark);
    background: var(--accent-soft);
    border-radius: 8px;
    padding: 8px 12px;
}

.net-footnote {
    font-size: 13px;
    line-height: 1.6;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.net-points-card {
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
}
.net-points-card .net-points { margin-bottom: 0; }

.net-compliance {
    font-size: 13px;
    line-height: 1.7;
    background: #ecfdf5;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 4px;
    color: #065f46;
    font-weight: 600;
}

/* 合规声明横幅（电脑/手机/软路由 网络设置） */
.nc-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #1f2937, #374151);
    color: #fff;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.nc-banner-icon { font-size: 30px; line-height: 1; }
.nc-banner-title { font-size: 17px; font-weight: 800; letter-spacing: 2px; }
.nc-banner-sub { font-size: 11px; opacity: 0.65; letter-spacing: 3px; text-transform: uppercase; margin-top: 2px; }

/* 合规声明：AI 查询法条入口 */
.nc-ai {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    background: #f8f9fb;
    margin-bottom: 14px;
}
.nc-ai-title { font-size: 14px; font-weight: 700; color: var(--text); }
.nc-ai-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.nc-ai-btn {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    text-decoration: none;
    border-radius: 8px;
    padding: 9px 18px;
    transition: background .15s;
}
.nc-ai-btn:hover { background: var(--accent-dark); }

/* IP 检测：结果解释 */
.ip-explain {
    font-size: 12px;
    color: var(--muted);
    margin: 8px 0 0;
    line-height: 1.6;
}
.ip-summary-explain {
    margin: 4px 0 12px;
}
.ip-disclaimer {
    font-size: 12px;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 12px 0;
    line-height: 1.6;
}

/* 海外服务器选购：检测块 + 供应商卡片 */
.sp-detect .btn-primary { margin: 6px 0 0; }
.sp-detect-result {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
}
.sp-detect-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--border);
}
.sp-detect-row:last-of-type { border-bottom: none; }
.sp-detect-row span { color: var(--muted); }
.sp-detect-row b { font-size: 15px; }
.sp-detect-advice {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: #1e40af;
}
.sp-suppliers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sp-supplier {
    display: block;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.sp-supplier:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.sp-supplier-name { font-size: 15px; font-weight: 700; color: var(--text); }
.sp-supplier-line { font-size: 13px; color: #1e40af; margin-top: 4px; }
.sp-supplier-note { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.sp-supplier-go { font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 8px; }
.sp-note { font-size: 12px; color: #b45309; margin-top: 10px; line-height: 1.6; }
.sp-contact {
    margin-top: 14px;
    border: 1px dashed var(--accent);
    border-radius: 10px;
    padding: 16px;
    background: var(--accent-soft);
    text-align: center;
}
.sp-contact-text { font-size: 15px; font-weight: 700; color: var(--text); }
.sp-contact-sub { font-size: 12px; color: var(--muted); margin: 4px 0 12px; }

/* IP 检测：网页自助查询区块 */
.ip-manual { margin-top: 14px; }
.ip-manual-note {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 10px;
    line-height: 1.6;
}
.ip-manual-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fff;
}
.ip-manual-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ip-manual-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.ip-manual-btn {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 4px 10px;
    white-space: nowrap;
    transition: all .15s;
}
.ip-manual-btn:hover {
    background: var(--accent);
    color: #fff;
}
.ip-manual-guide {
    font-size: 12px;
    color: var(--muted);
    margin: 6px 0 0;
    line-height: 1.6;
}

/* 进阶卡片 */
.net-advanced {
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
}
.net-advanced-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    text-align: left;
    padding: 16px 18px;
    border: none;
    background: linear-gradient(135deg, #fff1e6, #ffedd5);
    cursor: pointer;
    font-family: inherit;
    position: relative;
}
.net-advanced-badge {
    display: inline-block;
    width: fit-content;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: var(--accent);
    padding: 2px 10px;
    border-radius: 999px;
}
.net-advanced-title { font-size: 16px; font-weight: 800; }
.net-advanced-teaser { font-size: 13px; color: var(--muted); line-height: 1.6; }
.net-advanced-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--accent);
    font-weight: 700;
}
.net-advanced-body {
    border-top: 1px solid var(--border);
    padding: 16px 18px;
}
.net-adv-sec { margin-bottom: 14px; }
.net-adv-sec:last-child { margin-bottom: 0; }
.net-adv-sec h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.net-adv-sec p { font-size: 13px; line-height: 1.8; }

/* 海外服务器搭建：合规声明 + 两方式 + 7 步 */
.nc-banner-main { flex: 1; }
.sb-declare {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 10px 14px;
    margin: -4px 0 14px;
}
.sb-declare .net-points { color: #9a3412; font-weight: 600; margin-bottom: 0; }
.sb-intro { margin: 4px 0 14px; }
.sb-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.sb-method {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
}
.sb-method-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.sb-method-desc { font-size: 13px; color: var(--muted); line-height: 1.7; }
.sb-download {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    text-decoration: none;
    border-radius: 8px;
    padding: 9px 18px;
    margin-bottom: 12px;
    transition: background .15s;
}
.sb-download:hover { background: var(--accent-dark); }
.sb-ssh-guide {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 9px 18px;
    margin: 0 0 12px 8px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.sb-ssh-guide:hover { background: var(--accent); color: #fff; }

/* ---------- 嵌套二级弹窗（图文教程） ---------- */
.sub-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 25, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
    opacity: 0;
    transition: opacity .2s;
}
.sub-modal-mask.show { opacity: 1; }
.sub-modal {
    background: var(--card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 720px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.94);
    transition: transform .2s;
}
.sub-modal-mask.show .sub-modal { transform: scale(1); }
.sub-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.sub-modal-head h3 { font-size: 16px; }
.sub-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: background .15s;
}
.sub-modal-close:hover { background: #f1f3f5; }
.sub-modal-body { padding: 20px; overflow-y: auto; }

.ssh-step {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    margin-bottom: 14px;
}
.ssh-step:last-child { margin-bottom: 0; }
.ssh-step-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.ssh-step-no {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ssh-step-title { font-size: 14px; font-weight: 700; color: var(--text); }
.ssh-step-img {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
    cursor: zoom-in;
}
.ssh-step-points { margin: 0; padding-left: 18px; }
.ssh-step-points li { font-size: 13px; line-height: 1.8; color: var(--text); }

/* ---------- 图片放大查看（lightbox） ---------- */
.img-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 20px;
    opacity: 0;
    transition: opacity .2s;
}
.img-lightbox.show { opacity: 1; }
.img-lightbox-box { position: relative; max-width: 95vw; max-height: 92vh; }
.img-lightbox-img {
    max-width: 95vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.img-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: background .15s;
}
.img-lightbox-close:hover { background: #f1f3f5; }
.img-lightbox-hint {
    position: absolute;
    bottom: -34px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    white-space: nowrap;
}
.sb-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sb-step {
    display: flex;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    align-items: flex-start;
}
.sb-step-no {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sb-step-body { flex: 1; }
.sb-step-title { font-size: 14px; font-weight: 700; color: var(--text); }
.sb-step-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 3px; }

/* 汇率转换 */
.ex-amount-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 14px;
}
.ex-amount-row .text-input { flex: 1; min-width: 0; margin-bottom: 0; padding: 10px 12px; line-height: normal; }
.ex-amount-row .lang-select { flex-shrink: 0; max-width: 210px; }
#ex-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.ex-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.ex-row-base { background: #f0f7ff; border-color: var(--accent); }
.ex-flag { font-size: 22px; flex-shrink: 0; line-height: 1; }
.ex-row-mid { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ex-code { font-size: 15px; font-weight: 700; color: var(--text); }
.ex-name { font-size: 12px; color: var(--muted); }
.ex-del {
    border: none; background: none; cursor: pointer;
    font-size: 18px; color: #cbd5e1; padding: 0 4px; flex-shrink: 0; line-height: 1;
}
.ex-del:hover { color: #ef4444; }
.ex-val { font-size: 16px; font-weight: 700; color: var(--text); text-align: right; flex-shrink: 0; }
.ex-note { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.6; }

/* 添加币种 */
#ex-add-btn {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}
#ex-add-panel { padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafafa; }
#ex-add-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 240px; overflow-y: auto; }
.ex-add-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px; border: 1px solid var(--border); border-radius: 16px;
    background: #fff; cursor: pointer; font-size: 13px;
}
.ex-add-item:hover { border-color: var(--accent); background: #f0f7ff; }
.ex-add-code { font-weight: 700; }
.ex-add-name { color: var(--muted); }
.ex-add-empty { font-size: 13px; color: var(--muted); padding: 6px; }

/* 语音合成 */
.vc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.vc-label {
    flex-shrink: 0;
    width: 52px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
.vc-val { color: var(--accent); font-weight: 700; }
.vc-slider {
    flex: 1;
    accent-color: var(--accent);
}
.vc-audio-box {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.vc-preview-tip { font-size: 12px; color: var(--muted); }
.vc-actions {
    display: flex;
    gap: 10px;
    margin: 6px 0 2px;
}
.vc-actions .btn-primary { flex: 1; }
.btn-ghost {
    flex: 1;
    padding: 11px 16px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.btn-ghost:hover { background: rgba(0, 0, 0, 0.05); }
.vc-clone-area {
    margin-top: 12px;
    border: 1px dashed var(--accent);
    border-radius: 10px;
    padding: 14px 16px;
    background: #f8fbff;
}
.vc-clone-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}
.vc-clone-item {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    margin-bottom: 8px;
}
.vc-file { flex: 1; font-size: 13px; }
.vc-tip {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    margin: 4px 0 10px;
}
.vc-tip.vc-warn {
    color: #b45309;
    background: #fef3c7;
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
    margin: 6px 0 12px;
}
.dub-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    padding: 8px 10px;
    background: #f8f9fb;
    border-radius: 6px;
    word-break: break-all;
}
.dub-text b { color: var(--accent); }
@media (max-width: 600px) {
    .topbar, .cats, .main, .zones { padding-left: 16px; padding-right: 16px; }
}

/* ============ 顶栏按钮组 ============ */
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.btn-settings {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-settings:hover { color: var(--accent); border-color: var(--accent); }

/* ============ Key 设置弹窗 ============ */
.settings-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.settings-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    width: 440px;
    max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.settings-box h3 { margin: 0 0 12px; font-size: 17px; }
.settings-tip { font-size: 13px; color: var(--muted); margin: 0 0 16px; line-height: 1.6; }
.settings-box input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
    outline: none;
}
.settings-box input:focus { border-color: var(--accent); }
.settings-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-primary {
    background: var(--accent); color: #fff; border: none;
    padding: 9px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost {
    background: transparent; color: var(--muted);
    border: 1px solid var(--border);
    padding: 9px 16px; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

/* ============ 通用 AI 搜索框 ============ */
.ai-box {
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 16px;
}
.ai-box-head { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.ai-box-hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.ai-input {
    width: 100%;
    min-height: 88px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid var(--border);
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    outline: none;
}
.ai-input:focus { border-color: var(--accent); }
.ai-send {
    margin-top: 10px;
    background: var(--accent); color: #fff;
    border: none; padding: 8px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.ai-send:hover { background: var(--accent-dark); }
.ai-send:disabled { opacity: 0.6; cursor: not-allowed; }
.ai-result { margin-top: 12px; font-size: 14px; line-height: 1.7; }
.ai-err { color: #dc2626; font-size: 13px; }
.ai-loading { color: var(--muted); font-size: 13px; }
.ai-h1 { font-size: 16px; font-weight: 700; margin: 10px 0 4px; }
.ai-h2 { font-size: 15px; font-weight: 700; margin: 8px 0 4px; }
.ai-h3 { font-size: 14px; font-weight: 700; margin: 6px 0 3px; }
.ai-h4 { font-size: 14px; font-weight: 600; margin: 6px 0 3px; }
.ai-ul { margin: 6px 0; padding-left: 20px; }
.ai-ul li { margin: 3px 0; }
.ai-p { margin: 6px 0; }

/* ============ 注册邮箱教程 ============ */
.er-intro { margin-bottom: 16px; }
.er-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.er-points { display: flex; flex-wrap: wrap; gap: 8px; }
.er-point {
    font-size: 13px; font-weight: 600;
    color: var(--accent); background: var(--accent-soft);
    padding: 6px 12px; border-radius: 20px;
}
.er-block { margin: 18px 0; }
.er-h { font-size: 15px; margin: 0 0 10px; }
.er-prep { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.er-prep-item {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px;
    display: flex; flex-direction: column; gap: 4px;
}
.er-prep-item b { font-size: 14px; }
.er-prep-item span { font-size: 12px; color: var(--muted); line-height: 1.5; }

.er-tabs { display: flex; gap: 8px; margin: 18px 0 14px; }
.er-tab {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    font-size: 14px; font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.15s;
}
.er-tab.active { border-color: var(--accent); color: var(--accent); }
.er-tag {
    font-size: 11px; font-weight: 600;
    background: var(--accent-soft); color: var(--accent);
    padding: 2px 8px; border-radius: 10px;
}

.er-pane { display: none; }
.er-pane.show { display: block; }

.er-progress {
    height: 8px; background: var(--border);
    border-radius: 4px; overflow: hidden; margin-bottom: 6px;
}
.er-progress-bar {
    height: 100%; width: 0;
    background: var(--accent); transition: width 0.3s;
}
.er-progress-label { font-size: 12px; color: var(--muted); margin-bottom: 14px; }

.er-steps { display: flex; flex-direction: column; gap: 8px; }
.er-step {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 14px;
    cursor: pointer;
    transition: all 0.15s;
}
.er-step:hover { border-color: var(--accent); }
.er-step.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent);
}
.er-step-title { font-size: 14px; font-weight: 600; }
.er-step-detail { display: block; font-size: 13px; color: var(--muted); margin: 4px 0 0 0; line-height: 1.6; }

.er-step-ai { margin-top: 10px; }

.er-tips {
    margin: 8px 0 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
}
.er-tips li { margin: 2px 0; }

.er-link {
    display: inline-block;
    margin: 10px 0 0 0;
    padding: 8px 14px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.er-link:hover { background: var(--accent); color: #fff; }

.er-faq { border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; overflow: hidden; background: var(--card); }
.er-faq summary {
    padding: 12px 14px; cursor: pointer; font-size: 14px; font-weight: 600;
    list-style: none;
}
.er-faq summary::after { content: ' ▾'; color: var(--muted); }
.er-faq[open] summary::after { content: ' ▴'; }
.er-faq p { padding: 0 14px 12px; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

.er-fallback {
    margin-top: 18px;
    background: #fef3c7; border: 1px solid #f59e0b;
    border-radius: 12px; padding: 14px 16px;
    font-size: 13px; line-height: 1.7;
    display: flex; flex-direction: column; align-items: flex-start;
}
.er-switch {
    margin-top: 10px;
    background: #f59e0b; color: #fff; border: none;
    padding: 9px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.er-switch:hover { background: #d97706; }

@media (max-width: 600px) {
    .er-prep { grid-template-columns: 1fr; }
}

/* ---------- 外贸工作流模拟：入口卡片 ---------- */
.workflow-entry {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px 22px;
}
.wf-entry-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #f97316, #fb923c);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}
.wf-entry-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35); }
.wf-entry-icon { font-size: 34px; line-height: 1; }
.wf-entry-text { flex: 1; }
.wf-entry-title { font-size: 18px; font-weight: 800; }
.wf-entry-sub { font-size: 13px; opacity: 0.92; margin-top: 2px; }
.wf-entry-btn {
    background: #fff; color: #f97316; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    white-space: nowrap;
}
.wf-entry-btn:hover { background: #fff7ed; }

/* ---------- 外贸工作流模拟：弹窗内 ---------- */
.wf-sim { display: flex; flex-direction: column; gap: 16px; }
.wf-head {
    display: flex; gap: 10px; flex-wrap: wrap;
    align-items: center;
}
.wf-role, .wf-goal {
    font-size: 13px; font-weight: 600;
    padding: 5px 12px; border-radius: 20px;
}
.wf-role { background: var(--accent-soft); color: var(--accent); }
.wf-goal { background: #eef2ff; color: #4f46e5; }

.wf-question {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
}
.wf-q-text { font-size: 16px; font-weight: 700; margin-bottom: 14px; line-height: 1.5; }
.wf-opts { display: flex; flex-direction: column; gap: 10px; }
.wf-opt {
    text-align: left;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text);
}
.wf-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.wf-opt.selected { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.wf-next {
    margin-top: 14px;
    background: var(--accent); color: #fff; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 700; cursor: pointer;
}
.wf-next:hover { background: var(--accent-dark); }

.wf-end { font-size: 17px; font-weight: 800; color: var(--accent); }
.wf-end-sub { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
.wf-restart {
    margin-top: 14px;
    background: var(--accent-soft); color: var(--accent);
    border: 1px solid var(--accent);
    padding: 9px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.wf-restart:hover { background: var(--accent); color: #fff; }

.wf-tree-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
}
.wf-tree-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 10px; letter-spacing: 1px; }
.wf-tree { font-size: 14px; }
.wf-node {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 7px; padding: 6px 0;
}
.wf-node-dot { color: var(--accent); font-size: 10px; flex-shrink: 0; }
.wf-tree .wf-node:first-child .wf-node-text { font-size: 16px; font-weight: 800; }
.wf-node-text { font-weight: 600; color: var(--text); }
.wf-ability {
    font-size: 11px; color: #4f46e5;
    background: #eef2ff; border-radius: 4px; padding: 1px 7px;
}
.wf-tool-list { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.wf-tool-chip {
    font-size: 12px; background: var(--accent-soft); color: var(--accent);
    border: 1px solid #fed7aa; border-radius: 6px;
    padding: 2px 9px; cursor: pointer;
    transition: all 0.15s;
}
.wf-tool-chip:hover { background: var(--accent); color: #fff; }

/* 动画节奏：问题/选项/树节点都是慢慢浮现 */
@keyframes wfFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.wf-scene {
    font-size: 13px; color: var(--muted);
    background: var(--bg); border-left: 3px solid var(--border);
    padding: 10px 14px; border-radius: 6px;
    margin-bottom: 12px; line-height: 1.7;
    animation: wfFadeIn 0.4s both;
}
.wf-q-text { animation: wfFadeIn 0.2s both; }
.wf-opt { animation: wfFadeIn 0.4s both; }
.wf-node { animation: wfFadeIn 0.3s both; }

/* 走完后：没解决的关键环节提醒 */
.wf-gaps {
    margin-top: 14px;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    border-radius: 10px;
    padding: 14px 16px;
    animation: wfFadeIn 0.4s both;
}
.wf-gaps-title { font-size: 13px; font-weight: 700; color: #b45309; margin-bottom: 8px; }
.wf-gap { padding: 6px 0; }
.wf-gap-q { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.wf-gap-link { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 全流程总结 */
.wf-summary { margin-top: 8px; }
.wf-sum-item {
    display: flex; align-items: baseline; gap: 10px;
    padding: 8px 12px; margin-bottom: 6px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px;
    animation: wfFadeIn 0.3s both;
}
.wf-sum-n { color: var(--accent); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.wf-sum-t { font-weight: 700; font-size: 14px; color: var(--text); flex-shrink: 0; }
.wf-sum-d { font-size: 13px; color: var(--muted); }
.wf-sum-close {
    margin-top: 12px; padding: 12px 14px;
    font-size: 13px; line-height: 1.7; color: var(--text);
    background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px;
}
.wf-sum-btns { margin-top: 14px; display: flex; gap: 10px; }
.wf-gotools {
    padding: 10px 18px; border: none; border-radius: 8px;
    background: var(--accent); color: #fff; font-size: 14px; cursor: pointer;
}
.wf-gotools:hover { opacity: 0.9; }


/* ============ 账号资料库 ============ */
.av-wrap { display: flex; flex-direction: column; gap: 14px; }

.av-warning {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 14px 16px;
}
.av-warning-title { font-size: 14px; font-weight: 800; color: #b45309; margin-bottom: 4px; }
.av-warning-text { font-size: 12px; color: #92400e; line-height: 1.7; }

.av-toolbar { display: flex; align-items: center; justify-content: space-between; }
.av-count { font-size: 13px; color: var(--muted); }
.av-count b { color: var(--accent); font-size: 15px; }

.av-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.av-btn:hover { border-color: var(--accent); }
.av-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.av-btn-primary:hover { opacity: 0.9; border-color: var(--accent); }
.av-btn-edit { color: #2563eb; border-color: #bfdbfe; }
.av-btn-edit:hover { background: #eff6ff; border-color: #2563eb; }
.av-btn-del { color: #dc2626; border-color: #fecaca; }
.av-btn-del:hover { background: #fef2f2; border-color: #dc2626; }

.av-list { display: flex; flex-direction: column; gap: 12px; }

.av-empty {
    text-align: center;
    color: var(--muted);
    padding: 32px 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    font-size: 13px;
}

.av-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
}
.av-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.av-platform { font-size: 15px; font-weight: 800; }
.av-badges { display: flex; gap: 6px; }
.av-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.av-tag-ok { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.av-tag-bad { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.av-tag-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

.av-card-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 16px; }
.av-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.av-field label { font-size: 11px; color: var(--muted); }
.av-field-val { font-size: 13px; word-break: break-all; }
.av-muted { color: var(--muted); }

.av-field-pwd { flex-direction: row; align-items: center; gap: 6px; }
.av-field-pwd label { font-size: 11px; color: var(--muted); }
.av-pwd-val { font-size: 13px; font-family: monospace; letter-spacing: 1px; }
.av-eye {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    color: var(--muted);
}
.av-eye:hover { border-color: var(--accent); color: var(--accent); }

.av-card-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }

.av-form {
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.av-form-title { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.av-form-grid { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; }
.av-form-grid label { font-size: 13px; color: var(--muted); text-align: right; }
.av-form-grid label i { color: #dc2626; font-style: normal; }
.av-form-grid input, .av-form-grid select {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 13px;
    width: 100%;
}
.av-form-grid input:focus, .av-form-grid select:focus { outline: none; border-color: var(--accent); }
.av-form-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.av-platform-wrap, .av-pwd-input { display: flex; gap: 6px; align-items: center; }
.av-platform-wrap select, .av-platform-wrap input, .av-pwd-input input { flex: 1; }
.av-pwd-input .av-eye { flex-shrink: 0; }


/* ============ 客户管理 CRM ============ */
.crm-wrap { display: flex; flex-direction: column; gap: 14px; }
.crm-warning { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 12px 16px; }
.crm-warning-title { font-size: 14px; font-weight: 800; color: #b45309; margin-bottom: 4px; }
.crm-warning-text { font-size: 12px; color: #92400e; line-height: 1.7; }
.crm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.crm-stat { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 6px; text-align: center; }
.crm-stat-val { font-size: 20px; font-weight: 800; line-height: 1.1; }
.crm-stat-label { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.crm-stat-total .crm-stat-val { color: var(--accent); }
.crm-stat-deal .crm-stat-val { color: #059669; }
.crm-stat-hot .crm-stat-val { color: #dc2626; }
.crm-stat-due .crm-stat-val { color: #d97706; }
.crm-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crm-search { flex: 1; min-width: 180px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; }
.crm-sel { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; }
.crm-search:focus, .crm-sel:focus { outline: none; border-color: var(--accent); }
.crm-btn { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; cursor: pointer; }
.crm-btn:hover { border-color: var(--accent); }
.crm-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.crm-btn-primary:hover { opacity: 0.9; }
.crm-btn-detail, .crm-btn-edit { color: #2563eb; border-color: #bfdbfe; }
.crm-btn-del { color: #dc2626; border-color: #fecaca; }
.crm-btn-detail:hover, .crm-btn-edit:hover { background: #eff6ff; border-color: #2563eb; }
.crm-btn-del:hover { background: #fef2f2; border-color: #dc2626; }
.crm-list { display: flex; flex-direction: column; gap: 12px; }
.crm-empty { text-align: center; color: var(--muted); padding: 32px 16px; font-size: 13px; }
.crm-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: border-color .15s; }
.crm-card:hover { border-color: var(--accent); }
.crm-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.crm-name { font-size: 15px; font-weight: 800; }
.crm-badges { display: flex; gap: 6px; }
.crm-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.crm-heat-hot { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.crm-heat-warm { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.crm-heat-cold { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.crm-stage-lead { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.crm-stage-inquiry { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.crm-stage-quote { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.crm-stage-negotiate { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.crm-stage-won { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.crm-stage-lost { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.crm-card-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.crm-meta { font-size: 12px; color: var(--muted); }
.crm-interest { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.crm-card-contact { display: flex; gap: 14px; flex-wrap: wrap; }
.crm-contact { font-size: 13px; word-break: break-all; }
.crm-followup { font-size: 12px; color: #d97706; margin-top: 6px; }
.crm-card-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.crm-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.crm-d-name { font-size: 17px; font-weight: 800; flex: 1; }
.crm-d-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 16px; }
.crm-d-field { display: flex; flex-direction: column; gap: 2px; }
.crm-d-field label { font-size: 11px; color: var(--muted); }
.crm-d-field span { font-size: 13px; word-break: break-all; }
.crm-d-actions { display: flex; gap: 8px; margin: 14px 0; }
.crm-fu { border-top: 1px solid var(--border); padding-top: 14px; }
.crm-fu-title { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.crm-fu-add { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.crm-fu-add textarea { flex: 1; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; resize: vertical; }
.crm-fu-list { display: flex; flex-direction: column; gap: 8px; }
.crm-fu-item { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.crm-fu-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.crm-fu-content { flex: 1; font-size: 13px; white-space: pre-wrap; }
.crm-fu-del { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--muted); }
.crm-fu-del:hover { color: #dc2626; }
.crm-form-box { background: var(--card); border: 1px solid var(--accent); border-radius: 12px; padding: 14px 16px; }
.crm-form-title { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.crm-form-grid { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; align-items: center; }
.crm-form-grid label { font-size: 13px; color: var(--muted); text-align: right; }
.crm-form-grid label i { color: #dc2626; font-style: normal; }
.crm-form-grid input, .crm-form-grid select { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; width: 100%; }
.crm-form-grid input:focus, .crm-form-grid select:focus { outline: none; border-color: var(--accent); }
.crm-form-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }


/* ============ 选题灵感 ============ */
.topic-wrap { display: flex; flex-direction: column; gap: 14px; }
.topic-intro { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 12px 16px; font-size: 13px; color: #1e40af; }
.topic-block { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.topic-h { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.topic-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.7; }
.topic-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.topic-row label { font-size: 13px; color: var(--muted); min-width: 32px; }
.topic-select, .topic-input { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; }
.topic-select:focus, .topic-input:focus, .topic-textarea:focus { outline: none; border-color: var(--accent); }
.topic-input { flex: 1; min-width: 200px; }
.topic-textarea { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; resize: vertical; margin-bottom: 10px; }
.topic-btn { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font-size: 14px; cursor: pointer; font-weight: 700; }
.topic-btn:hover { opacity: 0.9; }
.topic-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.topic-result { margin-top: 12px; font-size: 13px; line-height: 1.7; }


/* ============ 内容日历 ============ */
.cal-wrap { display: flex; flex-direction: column; gap: 14px; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-title { font-size: 15px; font-weight: 800; }
.cal-btn { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; cursor: pointer; }
.cal-btn:hover { border-color: var(--accent); }
.cal-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.cal-btn-primary:hover { opacity: 0.9; }
.cal-btn-edit { color: #2563eb; border-color: #bfdbfe; }
.cal-btn-del { color: #dc2626; border-color: #fecaca; }
.cal-btn-edit:hover { background: #eff6ff; }
.cal-btn-del:hover { background: #fef2f2; }
.cal-list { display: flex; flex-direction: column; gap: 10px; }
.cal-empty { text-align: center; color: var(--muted); padding: 32px 16px; font-size: 13px; }
.cal-item { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.cal-date { font-size: 13px; font-weight: 700; color: var(--accent); min-width: 90px; white-space: nowrap; }
.cal-muted { color: var(--muted); }
.cal-body { flex: 1; min-width: 0; }
.cal-topic { font-size: 14px; font-weight: 700; }
.cal-platform { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; margin-right: 8px; vertical-align: 1px; }
.cal-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cal-remark { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cal-side { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.cal-status { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); font-size: 12px; font-weight: 700; cursor: pointer; }
.cal-status-todo { background: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; }
.cal-status-doing { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.cal-status-done { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.cal-form-box { background: var(--card); border: 1px solid var(--accent); border-radius: 12px; padding: 14px 16px; }
.cal-form-title { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.cal-form-grid { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; }
.cal-form-grid label { font-size: 13px; color: var(--muted); text-align: right; }
.cal-form-grid label i { color: #dc2626; font-style: normal; }
.cal-form-grid input, .cal-form-grid select { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; width: 100%; }
.cal-form-grid input:focus, .cal-form-grid select:focus { outline: none; border-color: var(--accent); }
.cal-form-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }

/* ============ WhatsApp 助手（CDP 全自动监听） ============ */
.wa-full { display: flex; flex-direction: column; gap: 10px; height: calc(85vh - 140px); min-height: 500px; }
.wa-topbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; flex-wrap: wrap; }
.wa-status-dot { width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; flex: 0 0 auto; }
.wa-dot-gray { background: #9ca3af; }
.wa-dot-green { background: #22c55e; }
.wa-dot-orange { background: #f59e0b; }
.wa-dot-red { background: #ef4444; }
.wa-status-text { font-weight: 700; font-size: 14px; }
.wa-status-hint { font-size: 12px; color: var(--muted); flex: 1; min-width: 200px; }

.wa-cols { display: flex; gap: 10px; flex: 1; min-height: 0; }
.wa-col-left { width: 260px; flex: 0 0 260px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.wa-col-mid { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.wa-col-right { width: 320px; flex: 0 0 320px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.wa-col-head { padding: 10px 14px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--border); flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wa-chat-list { flex: 1; overflow-y: auto; }
.wa-chat-item { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.wa-chat-item:hover { background: rgba(128,128,128,0.08); }
.wa-chat-active { background: rgba(128,128,128,0.12); }
.wa-chat-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.wa-chat-last { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-unread { color: #22c55e; font-size: 10px; }

.wa-msg-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.wa-msg { max-width: 78%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.wa-msg-client { align-self: flex-start; background: var(--card); border: 1px solid var(--border); }
.wa-msg-me { align-self: flex-end; background: var(--accent); color: #fff; }
.wa-msg-meta { font-size: 11px; opacity: 0.7; margin-bottom: 3px; }
.wa-msg-orig { white-space: pre-wrap; word-break: break-word; }
.wa-msg-zh { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(128,128,128,0.4); font-size: 12px; opacity: 0.9; white-space: pre-wrap; word-break: break-word; }

.wa-compose { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); flex: 0 0 auto; }
.wa-compose textarea { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; resize: none; font-family: inherit; box-sizing: border-box; }
.wa-compose textarea:focus { outline: none; border-color: var(--accent); }
.wa-compose-bar { display: flex; gap: 8px; align-items: center; }
.wa-compose-bar select { flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; }
.wa-compose-bar .wa-btn { flex: 0 0 auto; }

.wa-rpanel { flex: 1; overflow-y: auto; padding: 12px 14px; }
.wa-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 12px; line-height: 1.6; }

.wa-sug { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.wa-sug-zh { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.wa-sug-en { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.wa-sug-actions { display: flex; gap: 6px; }
.wa-btn-sm { padding: 5px 10px; font-size: 12px; }

.wa-tpl-cat { font-size: 12px; font-weight: 700; color: var(--accent); margin: 12px 0 6px; display: flex; align-items: center; justify-content: space-between; }
.wa-tpl-cat-actions { display: flex; gap: 4px; }
.wa-tpl-toolbar { margin-bottom: 6px; display: flex; gap: 6px; }
.wa-tpl { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.wa-tpl-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.wa-tpl-zh { font-size: 13px; margin-bottom: 3px; }
.wa-tpl-en { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.wa-tpl-actions { display: flex; gap: 6px; }
.wa-btn-del { color: #dc2626; border-color: #dc2626; }

/* 复用块（tab / 按钮 / 表单 / CRM） */
.wa-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 6px; flex: 0 0 auto; }
.wa-tab { padding: 9px 12px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.wa-tab:hover { color: var(--text); }
.wa-tab-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.wa-block { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.wa-block-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.wa-crm-hint { font-size: 12px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.wa-crm-found { color: #059669; font-weight: 600; }
.wa-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.wa-row input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; }
.wa-row input:focus { outline: none; border-color: var(--accent); }
.wa-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; cursor: pointer; font-weight: 600; }
.wa-btn:hover { border-color: var(--accent); }
.wa-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.wa-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.wa-btn-primary:hover { opacity: 0.9; }
.wa-btn-block { display: block; width: 100%; margin-top: 10px; }
.wa-form { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 12px; }
.wa-form-grid { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; }
.wa-form-grid label { font-size: 13px; color: var(--muted); text-align: right; }
.wa-form-grid input, .wa-form-grid select, .wa-form-grid textarea { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; width: 100%; box-sizing: border-box; }
.wa-form-grid textarea { resize: vertical; font-family: inherit; min-height: 60px; }
.wa-form-grid input:focus, .wa-form-grid select:focus, .wa-form-grid textarea:focus { outline: none; border-color: var(--accent); }
.wa-form-actions { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.wa-save-status { font-size: 13px; }
.wa-save-ok { color: #059669; font-weight: 600; }
.wa-save-err { color: #dc2626; font-weight: 600; }



