:root {
    --bg: #f4f6f9;
    --card: #ffffff;
    --border: #e5eaf1;
    --text: #182230;
    --muted: #5b6b7d;
    --accent: #1b6b8f;
    --accent-dark: #0f3a52;
    --accent-soft: #e9f1f6;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 40, 60, 0.04), 0 8px 24px rgba(15, 40, 60, 0.07);
}

* { 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: linear-gradient(135deg, #0f3a52 0%, #164a66 52%, #1b6b8f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand .logo { font-size: 21px; font-weight: 800; color: #fff; letter-spacing: 1px; }
.brand .sub { font-size: 13px; color: rgba(255, 255, 255, 0.72); }

.btn-activate {
    background: #fff;
    color: #0f3a52;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-activate:hover { background: #e9f1f6; }

.btn-login {
    background: #fff;
    color: #0f3a52;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-login:hover { background: #e9f1f6; }

/* ---------- 分类导航 ---------- */
.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, #eef5f9 0%, #e3eef5 100%);
    border: 1px solid #c7dce8;
    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(27, 107, 143, 0.18);
}
.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-lock { margin-left: auto; font-size: 16px; flex-shrink: 0; }
.cog-card-locked { opacity: 0.72; }
.cog-card-locked:hover { border-color: var(--border); transform: none; box-shadow: var(--shadow); }

/* 认知篇子分组（认知 / 基础知识） */
.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;
}

/* 分组头部（标题 + 数量徽章 + 折叠按钮） */
.group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}
.group-head .group-title { margin-bottom: 0; }
.group-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}
.group-fold {
    margin-left: auto;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 8px;
    transition: all 0.15s;
}
.group-fold:hover { background: var(--accent-soft); color: var(--accent); }
.group.folded .group-body { display: none; }

/* ---------- 工具列表（横向大图标卡片） ---------- */
.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 10px 26px rgba(27, 107, 143, 0.18);
}
.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: #1b6b8f;
    background: #eef5f9;
    border: 1px solid #1b6b8f;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
}
.tool-card-soon { opacity: 0.65; }
.tool-card-soon:hover { opacity: 1; }
.tool-vip {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    color: #9a6b00;
    background: #fff7e0;
    border: 1px solid #d4a017;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
}
.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: #0f3a52;
    background: #e3eef5;
    border-color: #1b6b8f;
}

/* ---------- 专区入口 ---------- */
.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;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: pop 0.2s ease;
}
.modal.modal-narrow { max-width: 440px; }
.modal.modal-wide { max-width: 920px; }
.modal.modal-xwide { max-width: 1320px; }
.modal-resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 22px;
    height: 22px;
    cursor: nwse-resize;
    z-index: 5;
}
.modal-resize::after {
    content: '';
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    border-bottom-right-radius: 2px;
}
@keyframes pop {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-head h2 {
    font-size: 17px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 「历史 / 清空」成组靠右，和 ✕ 之间加分隔线拉开距离（防误触） */
.modal-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.modal-sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; flex: none; }
.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, color 0.15s;
}
.modal-close:hover { background: #fdecec; color: #dc2626; }
.modal-hist {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    font-size: 12px;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 8px;
    margin: 0;
    white-space: nowrap;
    font-weight: 600;
}
.modal-hist:hover { background: #dbeafe; }
.modal-body { padding: 22px; overflow-y: auto; }

/* ---------- 历史生成记录（弹窗内整块切换的视图，替代旧的二级小窗） ---------- */
.modal-body.hist-mode {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.hist-panel { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.hist-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--card);
}
.hist-back {
    border: 1px solid var(--accent); background: var(--card); color: var(--accent);
    border-radius: 6px; padding: 5px 12px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.hist-title { font-weight: 800; font-size: 14px; color: var(--text); }
.hist-search {
    margin-left: auto; min-width: 180px; flex: 1 1 180px; max-width: 320px;
    border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 13px;
}
.hist-hint { padding: 8px 18px 0; font-size: 12px; color: var(--muted); }
.hist-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 18px 20px; }
.hist-count { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.hist-empty { color: var(--muted); font-size: 13px; line-height: 1.9; }
.hist-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--card); }
.hist-item-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hist-item-title { font-weight: 700; font-size: 13.5px; color: var(--text); flex: 1 1 auto; min-width: 0; word-break: break-all; }
.hist-item-title em { font-style: normal; color: var(--accent); }
.hist-item-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hist-item-body {
    position: relative; margin-top: 8px; padding: 8px 10px; border-radius: 6px;
    background: #f9fafb; font-size: 12.5px; line-height: 1.75; color: #374151;
    white-space: pre-wrap; word-break: break-word;
    max-height: 86px; overflow: hidden;
}
.hist-item-body::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
    background: linear-gradient(rgba(249,250,251,0), #f9fafb);
}
.hist-item.open .hist-item-body { max-height: none; }
.hist-item.open .hist-item-body::after { display: none; }
.hist-item-acts { margin-top: 8px; display: flex; gap: 16px; }
.hist-item-acts a { font-size: 12.5px; color: #2563eb; cursor: pointer; user-select: none; }
.hist-item-acts a.danger { color: #dc2626; }

/* ---------- 翻译工具（三级界面） ---------- */
.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: #eef5f9; color: #1b6b8f; border: 1px solid #c7dce8; }
.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: #1b6b8f; }
.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: #1b6b8f; }
.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-pros {
    background: #ecfdf3;
    border: 1px solid #6ce9a6;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.net-pros-title {
    font-size: 13px;
    font-weight: 700;
    color: #027a48;
    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;
    /* 合规声明需要换行可读（内容是 esc 转义后的纯文本，靠 pre-line 保留换行） */
    white-space: pre-line;
    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: #1b6b8f;
    background: #eef5f9;
    border: 1px solid #c7dce8;
    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: #1b6b8f; 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; }

/* 网络设置页底部两个动作按钮（联系管理员 + 问 AI） */
.net-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* 「问 AI」是纯外链 <a>，这里让它的外观跟旁边的按钮一致（.btn-ghost 默认 flex:1 会撑满） */
.net-actions .net-ai-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    background: transparent;
}
.net-actions .net-ai-link:hover { background: rgba(0, 0, 0, 0.05); }
@media (max-width: 600px) {
    .net-actions { flex-direction: column; align-items: stretch; }
    .net-actions .btn-primary, .net-actions .btn-ghost { width: 100% !important; }
}

/* 联系管理员弹窗（统一入口；此前 5 处都是 alert 假按钮） */
.contact-mask {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(0, 0, 0, 0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.contact-box {
    background: var(--card, #fff);
    border-radius: 14px;
    padding: 22px;
    max-width: 320px; width: 100%;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.contact-title { font-size: 17px; font-weight: 700; color: var(--text); }
.contact-sub { font-size: 12px; color: var(--muted); margin: 6px 0 14px; line-height: 1.6; }
.contact-qr { width: 180px; height: 180px; display: block; margin: 0 auto; border-radius: 8px; }
.contact-qr-tip { font-size: 12px; color: var(--muted); margin: 8px 0 12px; }
.contact-online {
    display: block; margin-bottom: 10px; padding: 10px;
    background: #07c160; color: #fff; border-radius: 8px;
    text-decoration: none; font-size: 14px; font-weight: 600;
}
.contact-close {
    margin-top: 4px; padding: 9px 22px; border-radius: 8px;
    border: 1px solid var(--border); background: transparent;
    color: var(--text); cursor: pointer; font-size: 14px;
}
.contact-close:hover { background: rgba(0, 0, 0, 0.05); }
@media (max-width: 600px) { .contact-qr { width: 150px; height: 150px; } }

/* 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, #e3eef5);
    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: #eef5f9;
    border: 1px solid #c7dce8;
    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: #1b6b8f;
    background: #e3eef5;
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid #1b6b8f;
    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: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-settings:hover { color: #fff; border-color: #fff; }

.btn-logout {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-logout:hover { color: #fff; border-color: #fff; }

/* ---------- Token 账单 ---------- */
.bill-wrap { max-height: 60vh; overflow-y: auto; padding: 4px 2px; }
.bill-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.bill-tool { flex: 1; font-weight: 600; color: var(--text); }
.bill-time { color: var(--muted); font-size: 13px; }
.bill-use { color: #c0392b; font-weight: 700; font-variant-numeric: tabular-nums; }
.bill-recharge { color: #1e8e5a; font-weight: 700; font-variant-numeric: tabular-nums; }
.bill-empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- 卡密管理 ---------- */
.admin-wrap { padding: 4px 2px; }
.admin-gen { margin-bottom: 20px; }
.admin-gen h3, .admin-list h3 { font-size: 15px; margin-bottom: 10px; color: var(--text); }
.admin-amounts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-amt { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid var(--border); border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; transition: all .15s; }
.admin-amt:hover { background: var(--accent); color: #fff; }
.admin-gen-row { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-gen-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.admin-gen-row button { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 0 22px; font-size: 14px; font-weight: 600; cursor: pointer; }
.admin-gen-result { margin-bottom: 8px; }
.admin-result-tip { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.admin-code-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: var(--accent-soft); cursor: pointer; }
.admin-code-row:hover { border-color: var(--accent); }
.admin-code { font-family: monospace; font-weight: 700; color: var(--accent-dark); flex: 1; }
.admin-code-amt { color: var(--muted); font-size: 13px; }
.admin-error { color: #c0392b; font-size: 13px; }
.admin-codes-list { max-height: 45vh; overflow-y: auto; }
.admin-code-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-code-item .code { font-family: monospace; font-weight: 600; flex: 1; }
.admin-code-item .amt { color: var(--muted); }
.admin-code-item .status-used { color: #c0392b; font-size: 12px; }
.admin-code-item .status-new { color: #1e8e5a; font-size: 12px; }
.admin-code-item .time { color: var(--muted); font-size: 12px; }
.admin-empty { padding: 20px; text-align: center; color: var(--muted); }
.admin-fb-item { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.admin-fb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.admin-fb-type { background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.admin-fb-user { font-weight: 600; font-size: 13px; }
.admin-fb-time { color: var(--muted); font-size: 12px; margin-left: auto; }
.admin-fb-content { font-size: 14px; color: var(--text); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.admin-fb-contact { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ============ 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; }

/* 联网检索来源链接：让学员能点开官方原文核对（政策/关税类内容的重要信任背书） */
.ai-src-link {
    color: #1b6b8f;
    text-decoration: underline;
    word-break: break-all;
    text-underline-offset: 2px;
}
.ai-src-link:hover { color: #124b66; }
@media (max-width: 600px) {
    .ai-src-link { font-size: 13px; }
}

/* ============ 注册邮箱教程 ============ */
.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-ov { display: flex; flex-direction: column; gap: 10px; }
.er-ov-item {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 14px;
    border-left: 3px solid var(--accent);
}
.er-ov-item b { font-size: 14px; display: block; margin-bottom: 4px; }
.er-ov-item p { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }

/* 内容预审 */
.text-area {
    width: 100%; box-sizing: border-box;
    border: 1px solid var(--border); border-radius: 10px;
    padding: 12px; font-size: 14px; line-height: 1.6;
    resize: vertical; background: var(--card); color: var(--foreground);
}
.file-input { width: 100%; box-sizing: border-box; margin: 8px 0; }
.vc-hint {
    font-size: 12px; color: var(--muted); line-height: 1.7;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 8px; padding: 10px 12px; margin: 10px 0;
}
.ca-level { font-size: 15px; font-weight: 700; padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.ca-green { background: #e6f4ea; color: #137333; border: 1px solid #b7dfc1; }
.ca-yellow { background: #fef7e0; color: #b06000; border: 1px solid #f5d78e; }
.ca-red { background: #fce8e6; color: #c5221f; border: 1px solid #f5b6b3; }
.ca-section { margin-top: 14px; }
.ca-section h4 { font-size: 14px; margin: 0 0 8px; }
.ca-item {
    background: var(--card); border: 1px solid var(--border);
    border-left: 3px solid var(--accent); border-radius: 8px;
    padding: 10px 12px; margin-bottom: 8px;
}
.ca-item.ca-red { border-left-color: #d93025; }
.ca-item.ca-yellow { border-left-color: #f9ab00; }
.ca-item b { font-size: 13px; }
.ca-item p { font-size: 12px; color: var(--muted); margin: 4px 0 0; line-height: 1.6; }
.ca-fix { color: var(--accent) !important; }
.ca-script {
    font-size: 12px; color: var(--muted);
    background: var(--card); border: 1px dashed var(--border);
    border-radius: 8px; padding: 10px 12px; margin: 10px 0; line-height: 1.7;
}
.ca-clean {
    font-size: 13px; color: #137333; background: #e6f4ea;
    border: 1px solid #b7dfc1; border-radius: 8px;
    padding: 10px 12px; margin: 10px 0;
}

.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: #e3eef5; border: 1px solid #1b6b8f;
    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: #1b6b8f; color: #fff; border: none;
    padding: 9px 16px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.er-switch:hover { background: #1b6b8f; }

.er-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.er-act-btn {
    background: #1b6b8f;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.er-act-btn:hover { background: #15587a; }
.er-act-btn.er-act-ai {
    background: #fff;
    color: #1b6b8f;
    border: 1px solid #1b6b8f;
}
.er-act-btn.er-act-ai:hover { background: #eef5f9; }
.ai-help-hint {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

@media (max-width: 600px) {
    .er-prep { grid-template-columns: 1fr; }
}

/* ---------- 外贸工作流模拟：入口卡片 ---------- */
.flow-guide {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px 18px;
}
.fg-head {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent2, #0f3a52);
    margin-bottom: 12px;
}
.fg-steps {
    display: flex;
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.fg-step {
    flex: 1;
    min-width: 96px;
    background: var(--card, #fff);
    border: 1px solid var(--border, #e5eaf1);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    transition: border-color .15s ease;
}
.fg-step:hover { border-color: var(--accent, #1b6b8f); }
.fg-ico { font-size: 22px; display: block; }
.fg-name { font-size: 13px; font-weight: 700; color: var(--text, #182230); margin-top: 6px; }
.fg-cat { font-size: 11px; color: var(--muted, #7a8798); margin-top: 2px; }
.fg-arrow { align-self: center; color: var(--muted, #9fb6d4); font-size: 16px; flex-shrink: 0; }

.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, #1b6b8f, #0f3a52);
    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(27, 107, 143, 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: #1b6b8f; border: none;
    padding: 10px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    white-space: nowrap;
}
.wf-entry-btn:hover { background: #eef5f9; }

/* ---------- 外贸工作流模拟：弹窗内 ---------- */
.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 #c7dce8; 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 #bcd4e0;
    background: #eef5f9;
    border-radius: 10px;
    padding: 14px 16px;
    animation: wfFadeIn 0.4s both;
}
.wf-gaps-title { font-size: 13px; font-weight: 700; color: #1b6b8f; 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: #eef5f9; border: 1px solid #bcd4e0; 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, #eef5f9, #eef5f9);
    border: 1px solid #c7dce8;
    border-radius: 12px;
    padding: 14px 16px;
}
.av-warning-title { font-size: 14px; font-weight: 800; color: #1b6b8f; margin-bottom: 4px; }
.av-warning-text { font-size: 12px; color: #0f3a52; 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-table-wrap { overflow-x: auto; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; }
.av-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.av-table th, .av-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border, #e5e7eb); white-space: nowrap; }
.av-table th { background: var(--card, #f9fafb); font-weight: 700; color: var(--muted-foreground, #6b7280); position: sticky; top: 0; }
.av-table tbody tr.av-row:hover { background: #f3f4f6; }
.av-table .av-cell-platform { font-weight: 700; }
.av-table .av-cell-actions { white-space: nowrap; }
.av-table .av-empty-row td { text-align: center; color: #9ca3af; padding: 24px 12px; white-space: normal; }

.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: #eef5f9; color: #1b6b8f; border: 1px solid #c7dce8; }

.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; }


/* ============ 选题灵感 ============ */
.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-hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin: -4px 0 8px; }
.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; }
.topic-notice { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #f0d9a8; border-left: 4px solid #d97706; background: #fffbef; color: #7a4e0a; font-size: 13px; line-height: 1.7; border-radius: 8px; }
/* 官方查证入口 */
.os-notice { padding: 10px 14px; border: 1px solid #f0d9a8; border-left: 4px solid #d97706; background: #fffbef; color: #7a4e0a; font-size: 13px; line-height: 1.7; border-radius: 8px; margin-bottom: 12px; }
.os-src { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.os-section { margin-bottom: 16px; }
.os-section-title { font-weight: 700; color: var(--accent); margin-bottom: 8px; font-size: 14px; }
.os-card { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--card); }
.os-name { font-weight: 700; font-size: 14px; color: var(--text); }
.os-what { font-size: 13px; color: var(--accent2); margin-top: 4px; }
.os-how { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.7; }
.os-url { font-size: 12px; color: var(--accent); word-break: break-all; margin-top: 6px; }
.os-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.os-open { font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; }
.os-copy { font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--accent); background: var(--card); color: var(--accent); cursor: pointer; font-weight: 600; }
.os-empty { font-size: 13px; color: var(--muted); padding: 8px 0; }
.os-fallback { font-size: 13px; color: var(--text); background: #eef5f9; border: 1px solid #c7dce8; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.8; }
.os-fallback code { background: #fff; padding: 1px 6px; border-radius: 4px; }
.os-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.os-badge-manual { background: #e8f5e9; color: #2e7d32; border: 1px solid #b7e0b9; }
.os-badge-auto { background: #fff8e1; color: #a2740a; border: 1px solid #f0dfa8; }
.os-badge-stale { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c2; }
.os-badge-ok { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.os-report { font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; font-weight: 600; }
.os-report:hover { color: #c0392b; border-color: #f5c6c2; }
.topic-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.topic-btn-soft { background: var(--card); color: var(--accent); border-color: var(--accent); }
.tc-wrap { display: flex; flex-direction: column; gap: 12px; }
.tc-position { font-weight: 700; color: var(--accent); background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; }
.tc-dir { border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--card); }
.tc-dir-name { font-weight: 700; color: var(--accent); margin-bottom: 8px; font-size: 14px; }
.tc-card { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
.tc-card:last-child { margin-bottom: 0; }
.tc-title { font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: 14px; }
.tc-stage { display: inline-block; margin-left: 6px; font-size: 10px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent); padding: 0 6px; border-radius: 999px; font-weight: 700; vertical-align: middle; }
.tc-line { font-size: 12px; color: var(--muted); margin: 2px 0; }
.tc-why { color: var(--muted); opacity: 0.85; }
.tc-actions { margin-top: 6px; display: flex; gap: 6px; }
.tc-btn { font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--accent); background: var(--card); color: var(--accent); cursor: pointer; font-weight: 600; }
.tc-write { background: var(--accent); color: #fff; }
.tc-write:hover { opacity: 0.9; }
.tc-save:hover { background: var(--accent-soft); }
.tc-suggestion { font-size: 12px; color: #b45309; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 6px; padding: 8px 12px; }

/* ============ 计算器（利润/锁汇/退税/PI） ============ */
.pf-result { margin-top: 4px; }
.pf-good { padding: 10px 12px; border-radius: 8px; background: rgba(34, 197, 94, 0.12); color: #16a34a; font-weight: 700; margin-bottom: 10px; }
.pf-bad { padding: 10px 12px; border-radius: 8px; background: rgba(239, 68, 68, 0.12); color: #dc2626; font-weight: 700; margin-bottom: 10px; }
.pf-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.pf-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.pf-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-table tr.pf-total td { font-weight: 800; background: var(--card); border-top: 2px solid var(--border); }
.pf-tip { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.pi-output { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: Consolas, Menlo, monospace; font-size: 12px; line-height: 1.5; margin: 8px 0; white-space: pre; }

/* ============ 内容分发助手 ============ */
.dt-zone-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.dt-zone-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; cursor: pointer; }
.dt-zone-btn:hover { border-color: var(--accent); }
.dt-zone { margin-bottom: 14px; }
.dt-zone-title { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.dt-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); cursor: pointer; }
.dt-card:hover { border-color: var(--accent); }
.dt-card .dt-check, .dt-card .dt-radio { align-self: flex-start; margin: 0; }
.dt-name { font-size: 13px; font-weight: 700; }
.dt-profile { font-size: 11px; color: var(--muted); line-height: 1.45; }
.dt-ctype { font-size: 11px; color: var(--accent); line-height: 1.45; border-top: 1px dashed var(--border); padding-top: 4px; margin-top: 2px; }
.dt-progress { margin: 10px 0; font-size: 13px; color: var(--accent); font-weight: 700; }
.dt-results { display: flex; flex-direction: column; gap: 12px; }
.dt-result-card { border: 1px solid var(--border); border-radius: 12px; background: var(--card); overflow: hidden; }
.dt-result-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; font-size: 14px; font-weight: 800; border-bottom: 1px solid var(--border); }
.dt-result-body { padding: 12px 14px; font-size: 13px; line-height: 1.7; }
.dt-ok { color: #16a34a; }
.dt-fail { color: #dc2626; }
.dt-loading { color: var(--muted); font-size: 12px; font-weight: 400; }
.dt-actions { display: flex; gap: 8px; margin-top: 10px; }
.dt-copy { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font-size: 12px; cursor: pointer; }
.dt-copy:hover { opacity: 0.9; }
.dt-copy-alt { background: var(--card); color: var(--text); border-color: var(--border); }
.dt-open { padding: 6px 12px; border-radius: 8px; border: 1px solid #16a34a; background: #16a34a; color: #fff; font-size: 12px; cursor: pointer; }
.dt-open:hover { opacity: 0.9; }

/* ============ 内容日历 ============ */
.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: #eef5f9; color: #1b6b8f; border-color: #c7dce8; }
.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; }

/* WhatsApp 插件版下载条（轻量替代 200MB 本地工具包） */
.wa-plug-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 9px 14px; background: #fff8e6; border: 1px solid #f0d9a0; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.wa-plug-bar .wp-txt { color: #6b5320; }
.wa-plug-bar .wp-note { color: #8a7340; font-size: 12.5px; }
.wa-plug-bar .wp-dl { flex: none; background: #d97706; color: #fff; text-decoration: none; padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; transition: background .15s; }
.wa-plug-bar .wp-dl:hover { background: #b45309; }
@media (max-width: 820px) { .wa-plug-bar { font-size: 12.5px; padding: 8px 10px; } .wa-plug-bar .wp-note { display: none; } }
.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: #1b6b8f; }
.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: 6px; 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; }
/* 右栏默认 380px（原 320 偏窄，用户要求酌情加宽）；三栏宽度用户可拖动，自动记住 */
.wa-col-right { width: 380px; flex: 0 0 380px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.wa-resizer { flex: 0 0 6px; width: 6px; cursor: col-resize; border-radius: 3px; background: var(--border); opacity: .45; transition: opacity .15s, background .15s; }
.wa-resizer:hover { background: var(--accent); opacity: .85; }
@media (max-width: 900px) { .wa-resizer { display: none; } }
.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-unknown { align-self: center; background: #fff7e6; border: 1px dashed #e0a800; color: var(--text); }
.wa-dir-warn { background: #fff7e6; border: 1px solid #ffe0a3; color: #8a6d1a; border-radius: 9px; padding: 9px 12px; font-size: 12.5px; line-height: 1.6; margin-bottom: 4px; }
.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; }
/* AI 建议卡片（2026-09-20：AI 建议从"暂停"改为真实现） */
.wa-sug-head { font-size: 12px; color: var(--muted); padding: 4px 2px 10px; }
.wa-sug-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.wa-sug-zh { font-size: 13px; color: var(--text); line-height: 1.55; margin-bottom: 6px; }
.wa-sug-tr { font-size: 13px; color: #2563eb; line-height: 1.55; margin-bottom: 8px; }
.wa-sug-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.wa-sug-meta { font-size: 11px; color: var(--muted); padding: 6px 2px; line-height: 1.6; }
.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; }
/* 话术来源徽章（AI 整理 vs 我写的）—— 话术库是用户自己的资产，标清楚好管理 */
.wa-tpl-badge { display: inline-block; font-size: 10px; padding: 1px 5px; border-radius: 4px;
    background: #eef2ff; color: #4f46e5; margin-right: 4px; vertical-align: middle; }
.wa-tpl-badge-me { background: #ecfdf5; color: #0f766e; }
.wa-tpl-arch { margin-top: 8px; font-size: 12px; color: var(--muted); }
.wa-tpl-arch summary { cursor: pointer; padding: 4px 0; }
.wa-tpl-arch-item { opacity: .68; }
.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; align-self: start; }
.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; }

/* ============ 实时翻译（百炼 LiveTranslate 实时同传） ============ */
.lt-wrap { display: flex; flex-direction: column; gap: 10px; height: calc(85vh - 140px); min-height: 460px; }
.lt-topbar { display: flex; align-items: flex-end; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; flex-wrap: wrap; }
.lt-field { display: flex; flex-direction: column; gap: 5px; }
.lt-field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.lt-field select, .lt-field input { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; font-family: inherit; }
.lt-field select:focus, .lt-field input:focus { outline: none; border-color: var(--accent); }
.lt-field-grow { flex: 1; min-width: 220px; }
.lt-field-grow input { width: 100%; box-sizing: border-box; }
.lt-status { padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.lt-status.ok { color: #059669; }
.lt-status.warn { color: #d97706; }
.lt-status.rec { color: #dc2626; font-weight: 600; }
.lt-status.err { color: #dc2626; font-weight: 600; }
.lt-subs { flex: 1; min-height: 0; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.lt-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 40px 12px; }
.lt-sub { padding: 10px 14px; border-radius: 10px; line-height: 1.6; word-break: break-word; }
.lt-sub-in { background: rgba(128,128,128,0.08); font-size: 14px; color: var(--text); align-self: flex-start; max-width: 90%; }
.lt-sub-out { background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; align-self: flex-end; max-width: 90%; }


/* ---------- 我的空间（学员个人数据中心） ---------- */
.sp-wrap { display: flex; flex-direction: column; gap: 12px; }
.sp-hero { font-size: 17px; font-weight: 800; color: var(--text); }
.sp-hero-sub { font-size: 13px; color: var(--muted); line-height: 1.7; }
.sp-tabs { display: flex; gap: 8px; }
.sp-tab { padding: 8px 16px; border-radius: 10px 10px 0 0; border: 1px solid var(--border); border-bottom: none; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; }
.sp-tab:hover { color: var(--accent); }
.sp-tab.active { background: var(--card); color: var(--accent); border-color: var(--border); }
.sp-pane { background: var(--card); border: 1px solid var(--border); border-radius: 0 12px 12px 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.sp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-tip { font-size: 12px; color: var(--muted); flex: 1; }
.sp-list { display: flex; flex-direction: column; gap: 10px; }
.sp-item { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; flex-direction: column; }
.sp-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.sp-cat { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; white-space: nowrap; }
.sp-item-title { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; }
.sp-tags { font-size: 11px; color: var(--muted); background: #f3f4f6; border-radius: 999px; padding: 1px 8px; }
.sp-status { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.sp-status-done { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.sp-status-doing { background: #eef5f9; color: #1b6b8f; border: 1px solid #c7dce8; }
.sp-status-draft { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.sp-status-todo { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.sp-item-body { font-size: 13px; color: var(--text); line-height: 1.7; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.sp-item-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sp-item-side { margin-left: auto; display: flex; gap: 6px; }
.sp-item-head .sp-item-side { margin-left: 0; }
.sp-form .cal-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%; font-family: inherit; resize: vertical; }
.sp-form .cal-form-grid textarea:focus { outline: none; border-color: var(--accent); }


/* ---------- 选中文字评论（纠错标 / 建议标） ---------- */
#comment-float { position: fixed; z-index: 9999; display: none; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
#comment-float:hover { opacity: 0.9; }
#comment-panel { position: fixed; z-index: 10000; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 380px; max-width: 92vw; background: var(--card); border: 1px solid var(--accent); border-radius: 14px; padding: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); display: flex; flex-direction: column; gap: 10px; }
#comment-panel .cm-head { font-size: 14px; font-weight: 800; color: var(--text); }
#comment-panel .cm-sel { font-size: 12px; color: var(--muted); background: #f3f4f6; border-radius: 8px; padding: 8px 10px; max-height: 72px; overflow-y: auto; word-break: break-word; }
#comment-panel .cm-type { display: flex; gap: 14px; flex-wrap: wrap; }
#comment-panel .cm-type-opt { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); cursor: pointer; }
#comment-panel .cm-type-opt input { cursor: pointer; }
#comment-panel textarea { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; font-family: inherit; resize: vertical; min-height: 64px; }
#comment-panel textarea:focus { outline: none; border-color: var(--accent); }
#comment-panel .cm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.cm-count-badge { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 700; color: var(--accent); background: #eef5f9; border-radius: 999px; padding: 2px 10px; cursor: pointer; vertical-align: middle; }
.cm-count-badge:hover { background: #dbeafe; }
#comment-panel .cm-reply-to { font-size: 12px; color: var(--accent); background: #eff6ff; border-radius: 6px; padding: 4px 8px; }
#comment-panel .cm-list-head { font-size: 13px; font-weight: 700; color: var(--text); margin-top: 6px; border-top: 1px solid var(--border); padding-top: 8px; }
#comment-panel .cm-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
#comment-panel .cm-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 12px; }
.cm-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.cm-item-head { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.cm-item-type { font-size: 11px; }
.cm-item-head b { color: var(--text); }
.cm-item-time { color: var(--muted); font-size: 11px; margin-left: auto; }
.cm-item-sel { font-size: 11px; color: var(--muted); background: #f3f4f6; border-left: 3px solid var(--accent); padding: 3px 8px; margin: 4px 0; border-radius: 0 4px 4px 0; }
.cm-item-body { font-size: 13px; color: var(--text); line-height: 1.6; margin-top: 4px; word-break: break-word; }
.cm-reply-btn { font-size: 11px; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0; margin-top: 4px; }
.cm-reply-btn:hover { text-decoration: underline; }
.cm-replies { margin-left: 14px; margin-top: 6px; padding-left: 10px; border-left: 2px solid #e2e8f0; display: flex; flex-direction: column; gap: 6px; }
.cm-item-reply { background: #fff; }



/* 管理员面板 · 评论纠错 */
.admin-fb-type.cm-err { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.admin-fb-type.cm-sug { background: #eef5f9; color: #1b6b8f; border: 1px solid #c7dce8; }
.cm-sel-text { font-size: 12px; color: var(--muted); background: #f3f4f6; border-left: 3px solid var(--accent); padding: 6px 10px; margin-top: 6px; border-radius: 0 6px 6px 0; word-break: break-word; }
.admin-cm-actions { margin-top: 6px; }


/* 管理员面板 · 数据看板 */
.admin-stats { padding: 4px 0; }
.stats-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; text-align: center; }
.stats-card-v { font-size: 18px; font-weight: 800; color: var(--accent); }
.stats-card-k { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stats-sources { font-size: 12px; color: var(--muted); margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stats-src { display: inline-block; background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.stats-src b { font-weight: 800; }


/* ---------- 工具解释卡片（怎么用 + 为什么好用） ---------- */
.tool-intro { margin-bottom: 12px; background: linear-gradient(135deg, #eef5f9, #e6f0f6); border: 1px solid #c7dce8; border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 5px; }
.tool-intro-how { font-size: 13px; color: var(--text); line-height: 1.6; }
.tool-intro-why { font-size: 13px; color: #0f3a52; line-height: 1.6; font-weight: 600; }

/* ============================================================
   手机端适配（2026-09-18）
   重点：① 文章阅读（认知篇 16 篇 + 教程） ② 网络搭建/账号注册等长文板块
   重交互工具（视频/上传/表格类）不做深度适配，保证能看能点即可。
   ============================================================ */
@media (max-width: 768px) {
    /* ---------- 顶栏：紧凑、可换行 ---------- */
    .topbar { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
    .brand { gap: 8px; }
    .brand .logo { font-size: 17px; }
    .brand .sub { font-size: 11px; }
    .topbar-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
    .btn-activate, .btn-login, .btn-logout, .btn-settings { padding: 7px 12px; font-size: 12px; }
    .user-info { font-size: 11px; }

    /* ---------- 主体留白 ---------- */
    .cats { padding-left: 14px; padding-right: 14px; gap: 6px; }
    .cat { padding: 7px 14px; font-size: 12px; }
    .main { padding: 16px 14px 10px; }
    .zones { padding-left: 14px; padding-right: 14px; grid-template-columns: 1fr; gap: 12px; }
    .flow-guide { padding: 0 14px 14px; }
    .fg-step { min-width: 84px; padding: 10px 8px; }
    .fg-name { font-size: 12px; }

    /* ---------- 认知篇入口卡片：一行一个，好点 ---------- */
    .cognition { padding: 16px 14px; }
    .cognition-title { font-size: 16px; }
    .cognition-hint { font-size: 12px; }
    .cognition-row { gap: 10px; }
    .cog-group-row { gap: 10px; }
    .cog-card { flex: 1 1 100%; padding: 13px 14px; }
    .cog-icon { font-size: 26px; }

    /* ---------- 工具卡：一行 3 个 ---------- */
    .tool-row { gap: 10px; }
    .tool-card { flex: 1 1 28%; min-width: 0; padding: 16px 8px; border-radius: 14px; gap: 8px; }
    .tool-icon { font-size: 32px; }
    .tool-name { font-size: 12px; }

    /* ---------- 弹窗：手机端全屏（长文阅读体验的关键） ---------- */
    .modal-mask { padding: 0; }
    .modal, .modal.modal-narrow, .modal.modal-wide, .modal.modal-xwide {
        width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0;
    }
    .modal-resize { display: none; }              /* 触屏拖拽无意义 */
    .modal-head { padding: 10px 14px; position: sticky; top: 0; background: var(--card); z-index: 5; gap: 8px; }
    .modal-head h2 { font-size: 15px; }
    .modal-head-actions { gap: 6px; }
    .modal-sep { margin: 0 3px; }
    .modal-hist { padding: 5px 9px; font-size: 11px; }
    .modal-close { width: 40px; height: 40px; font-size: 22px; }   /* 加大点击区 */
    .modal-body { padding: 16px 14px 32px; }

    /* 历史视图在手机上：工具条换行、搜索框占满、列表留白收窄 */
    .hist-toolbar { padding: 10px 12px; gap: 8px; }
    .hist-search { max-width: none; margin-left: 0; flex: 1 1 100%; }
    .hist-hint { padding: 8px 12px 0; }
    .hist-list { padding: 8px 12px 16px; }
    .hist-item-body { max-height: 76px; }

    /* ---------- 长文排版（认知篇 / 教程） ---------- */
    .cog-article { padding: 2px 0 10px; }
    .cog-article-title { font-size: 19px; line-height: 1.45; }
    .cog-article-sub { font-size: 12px; }
    .cog-p { font-size: 15.5px; line-height: 1.9; }
    .cog-h { font-size: 16px; margin: 20px 0 8px; }
    .cog-highlight, .tool-intro { padding: 12px 14px; font-size: 14px; }
    .cog-points { gap: 10px; }
    .cog-compare { padding: 12px 14px; }
    .cog-compare-text { font-size: 14px; line-height: 1.8; }
    .ai-p, .ai-ul li { font-size: 15px; line-height: 1.85; }

    /* ---------- 网络搭建 / 账号注册 长文板块 ---------- */
    .sb-method, .sb-step { padding: 12px 13px; }
    .sb-step { gap: 10px; }
    .sb-step-desc, .sb-method-desc, .er-step-desc, .net-points li { font-size: 14.5px; line-height: 1.85; }
    .sb-step-title, .sb-method-name { font-size: 15px; }
    .er-step-title, .guide-q { font-size: 15px; }
    .sb-step-no { width: 26px; height: 26px; font-size: 13px; }
    .er-tabs { gap: 6px; margin: 14px 0 12px; }
    .er-tab { padding: 11px 8px; font-size: 13px; }
    .guide-opt { padding: 12px; }
    .guide-actions { flex-direction: column; align-items: stretch; }

    /* ---------- 表格 / 图片 / 代码：横向滑动不撑破 ---------- */
    .modal-body table, .cog-article table, .av-table-wrap {
        display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
    .modal-body img, .cog-article img { max-width: 100%; height: auto; }
    .modal-body pre, .cog-article pre { overflow-x: auto; font-size: 12px; }

    /* ---------- 输入框 ≥16px，防 iOS 点击自动放大 ---------- */
    .modal-body input, .modal-body textarea, .modal-body select { font-size: 16px; }
}

@media (max-width: 420px) {
    .tool-card { flex: 1 1 45%; }
    .brand .sub { display: none; }
    .modal-head h2 { font-size: 14px; }
    .cog-article-title { font-size: 18px; }
    .cog-p { font-size: 15px; }
}
