/* ============================================
   地图商家采集系统 - 样式表
   ============================================ */

/* ---------- Reset & Base ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #4f6ef7;
    --primary-dark: #3b54d4;
    --primary-light: #e8ecff;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.08);
}

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;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Auth Page ---------- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 880px;
    display: flex;
    gap: 40px;
    align-items: center;
}

.auth-card {
    flex: 1;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
}

.auth-header { text-align: center; margin-bottom: 28px; }
.auth-logo { font-size: 48px; margin-bottom: 8px; }
.auth-header h1 { font-size: 24px; color: var(--text); margin-bottom: 4px; }
.auth-subtitle { color: var(--text-secondary); font-size: 14px; }

.auth-form { margin-top: 8px; }
.form-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; text-align: center; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
    background: #f8fafc;
    outline: none;
}
.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: #fff;
}
.form-group select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ---------- 过滤开关 ---------- */
.filter-options { margin-top: 4px; }
.filter-options > label { margin-bottom: 8px; }
.filter-row { display: flex; flex-direction: column; gap: 10px; }

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    transition: all .2s;
}
.filter-toggle:hover { border-color: #b0bec5; }
.filter-toggle.has-checked {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.filter-toggle.has-checked .toggle-label { color: #fff; }
.filter-toggle.has-checked .toggle-hint { color: rgba(255,255,255,.75); }
.filter-toggle input[type="checkbox"] { display: none; }

.toggle-track {
    position: relative;
    width: 40px;
    min-width: 40px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 11px;
    transition: background .25s;
}
.filter-toggle.has-checked .toggle-track { background: rgba(255,255,255,.4); }

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.filter-toggle.has-checked .toggle-thumb { transform: translateX(18px); }

.toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    transition: color .2s;
}
.toggle-hint {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
    transition: color .2s;
}

.btn-primary,
.btn-submit {
    width: 100%;
    padding: 11px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: 4px;
}
.btn-primary:hover,
.btn-submit:hover { background: var(--primary-dark); }
.btn-primary:active,
.btn-submit:active { transform: scale(.98); }
.btn-primary:disabled,
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

.form-switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-secondary); }

.message-box,
.task-message {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}
.msg-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.msg-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* Auth Features */
.auth-features {
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.feature-item {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,.2);
}
.feature-icon { font-size: 20px; }

/* ---------- Dashboard Page ---------- */
.dashboard-page { background: var(--bg); }

/* Topbar */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.topbar-logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 26px; }
.logo-text { font-size: 17px; font-weight: 700; color: var(--text); }
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-user { display: flex; align-items: center; gap: 10px; }
.user-avatar { font-size: 22px; }
.user-name { font-size: 14px; font-weight: 500; color: var(--text); }

/* 右上角按钮 */
.btn-topbar {
    padding: 7px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all .2s;
    font-family: inherit;
}
.btn-login {
    background: var(--primary);
    color: #fff;
}
.btn-login:hover { background: var(--primary-dark); }
.btn-register {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-register:hover { background: var(--primary-light); }

.btn-logout {
    font-size: 13px;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
}
.btn-logout:hover { background: #e2e8f0; text-decoration: none; }

/* 会员状态徽章 */
.membership-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.mem-active { background: #dcfce7; color: #15803d; }
.mem-expired { background: #fef3c7; color: #b45309; }
.mem-none { background: #f1f5f9; color: #64748b; }

/* 激活按钮 */
.btn-recharge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff !important;
    border: none;
}
.btn-recharge:hover { 
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #fff !important;
}

/* 顶部栏卡密激活输入框 */
.topbar-activate {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.input-card-code {
    width: 160px;
    height: 32px;
    padding: 4px 10px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
    background: #f9fafb;
    transition: border-color .2s, box-shadow .2s;
    color: #374151;
}
.input-card-code:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,.15);
    background: #fff;
}
.input-card-code::placeholder {
    color: #9ca3af;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
    text-transform: none;
    letter-spacing: 0;
}
.btn-activate-card {
    height: 32px;
    padding: 0 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    font-family: inherit;
}
.btn-activate-card:hover {
    background: linear-gradient(135deg, #e3900a, #c56d05);
    transform: translateY(-1px);
}
.btn-activate-card:active {
    transform: scale(.96);
}
.btn-activate-card:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}
.activate-msg {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.activate-msg.error {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}
.activate-msg.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* 手机端卡密输入适配 */
@media (max-width: 640px) {
    .topbar-activate {
        order: 10;
        width: 100%;
        margin-top: 2px;
    }
    .input-card-code {
        flex: 1;
        min-width: 100px;
    }
}

/* Layout */
.dashboard-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 20px;
    align-items: stretch;
}

/* Panel */
.panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.panel-right {
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}
.panel-left {
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}
.panel-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-header h2 { font-size: 16px; font-weight: 600; }
.panel-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.btn-refresh {
    font-size: 13px;
    background: none;
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all .2s;
}
.btn-refresh:hover { background: #f1f5f9; color: var(--text); }

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-export {
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    color: var(--text-secondary);
    background: #fff;
}
.btn-export:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-export:disabled { opacity: .45; cursor: not-allowed; background: #f8fafc; }
.btn-export-csv:not(:disabled):hover { background: #ecfdf5; border-color: var(--success); color: var(--success); }
.btn-export-vcf:not(:disabled):hover { background: #fef3c7; border-color: #f59e0b; color: #d97706; }

/* Task Form */
.task-form { padding: 20px; }

/* Platform Grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    user-select: none;
}
.platform-card:hover { border-color: #93c5fd; background: #eff6ff; }
.platform-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79,110,247,.15);
}
.platform-icon { font-size: 24px; }
.platform-name { font-size: 12px; font-weight: 600; color: var(--text); }

/* 全网地图 tooltip */
.platform-all-map {
    position: relative;
    grid-column: 1 / -1;
}
.platform-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #e2e8f0;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 10;
    pointer-events: none;
}
.platform-all-map:hover .platform-tooltip { display: block; }

/* Task Stats */
.task-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat-item {
    text-align: center;
    padding: 16px 10px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num { display: block; font-size: 26px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.stat-pending .stat-num { color: var(--warning); }
.stat-running .stat-num { color: var(--primary); }
.stat-done .stat-num { color: var(--success); }

/* Task List */
.task-list { padding: 16px 20px; max-height: calc(100vh - 280px); overflow-y: auto; }

.task-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}
.empty-icon { font-size: 44px; display: block; margin-bottom: 10px; }
.empty-hint { font-size: 12px; color: #94a3b8; margin-top: 4px; }

.task-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: box-shadow .2s;
}
.task-item:hover { box-shadow: var(--shadow); }
.task-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.task-platform { font-size: 14px; font-weight: 600; }
.task-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.status-pending { background: #fef3c7; color: #b45309; }
.status-running { background: #dbeafe; color: #1e40af; }
.status-done { background: #dcfce7; color: #15803d; }
.status-failed { background: #fee2e2; color: #dc2626; }

.task-location { font-size: 13px; color: var(--text-secondary); }
.task-keyword { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-style: italic; }
.task-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.modal-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    position: relative;
    animation: slideUp .25s ease;
}
.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all .15s;
}
.modal-close:hover { background: #f1f5f9; color: var(--text); }

.modal-card .auth-header { margin-bottom: 20px; }
.modal-card .auth-header h2 { font-size: 20px; }
.modal-card .auth-logo { font-size: 36px; }

/* ---------- Responsive ---------- */

/* 平板适配 (768px以下) */
@media (max-width: 900px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .auth-container { flex-direction: column; }
    .auth-features { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .feature-item { flex: 1; min-width: 140px; justify-content: center; }
    .platform-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 手机适配 (640px以下) */
@media (max-width: 640px) {
    /* 顶部导航 */
    .topbar {
        padding: 0 12px;
        height: auto;
        min-height: 52px;
    }
    .topbar-inner {
        height: auto;
        min-height: 52px;
        padding: 8px 0;
        flex-wrap: wrap;
        gap: 6px;
    }
    .logo-text { font-size: 14px; }
    .logo-icon { font-size: 20px; }

    /* 右上角操作区 - 换行排列 */
    .topbar-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    .btn-topbar {
        padding: 5px 10px;
        font-size: 11px;
    }
    .membership-badge {
        font-size: 10px;
        padding: 3px 7px;
    }
    .user-name { font-size: 12px; max-width: 60px; overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
    .btn-logout { padding: 4px 8px; font-size: 11px; }

    /* 主布局 */
    .dashboard-layout {
        padding: 10px 10px;
        gap: 12px;
    }

    /* 面板 */
    .panel-header { padding: 14px 14px; }
    .panel-header h2 { font-size: 14px; }
    .panel-desc { font-size: 11px; }
    .task-form { padding: 14px; }

    /* 表单 */
    .form-group label { font-size: 12px; }
    .form-group input,
    .form-group select { padding: 9px 12px; font-size: 13px; }

    /* 平台选择卡片 */
    .platform-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .platform-card { padding: 10px 4px; border-radius: 8px; }
    .platform-icon { font-size: 20px; }
    .platform-name { font-size: 11px; }

    /* 统计栏 */
    .task-stats { grid-template-columns: repeat(4, 1fr); }
    .stat-item { padding: 12px 4px; }
    .stat-num { font-size: 20px; }
    .stat-label { font-size: 10px; }

    /* 任务列表 */
    .task-list { padding: 12px; max-height: none; }
    .task-item { padding: 12px; border-radius: 8px; }
    .task-platform { font-size: 13px; }
    .task-location { font-size: 12px; }
    .task-meta { flex-wrap: wrap; gap: 4px 12px; font-size: 10px; }

    /* 弹窗 */
    .modal-card {
        margin: 16px;
        width: calc(100% - 32px);
        padding: 24px 18px;
        border-radius: 14px;
    }
    .modal-card .auth-logo { font-size: 32px; }
    .modal-card .auth-header h2 { font-size: 17px; }
}

/* 超小屏手机 (380px以下) */
@media (max-width: 400px) {
    .topbar-inner { justify-content: space-between; }
    .logo-text { display: none; }
    .platform-grid { grid-template-columns: repeat(2, 1fr); }
    .task-stats { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(even) { border-right: none; }
    .stat-item { border-bottom: 1px solid var(--border); }

    /* 查询结果表格手机适配 */
    .result-table th:nth-child(n+3),
    .result-table td:nth-child(n+3) { display: none; }
}

/* ========== 查询结果表格 ========== */
.query-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.query-result-title {
    font-size: 14px;
    font-weight: 600;
}
.query-result-count {
    font-size: 13px;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 20px;
}
.query-result-count strong { color: #fde047; }

.query-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}
.query-empty h3 { margin-top: 8px; font-size: 16px; color: var(--text); }
.query-empty p { font-size: 13px; margin-top: 4px; }

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}
.result-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
}
.result-table th {
    background: #f8fafc;
    padding: 9px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.result-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    transition: background .15s;
}
.result-table tr:hover td { background: #f8fafc; }
.result-table tr:hover td.td-name strong { color: var(--primary); }

/* 各列宽度 */
.td-num { width: 36px; text-align: center; color: #94a3b8; font-size: 11px !important; }
.td-name { min-width: 140px; max-width: 200px; overflow:hidden;text-overflow:ellipsis; }
.td-phone { min-width: 110px; font-family:'Courier New',monospace;font-size:12px; color:#15803d; }
.td-landline { min-width: 90px; font-size:11px;color:#64748b; }
.td-address { min-width: 180px; max-width: 250px; color:var(--text-secondary);font-size:12px;overflow:hidden;text-overflow:ellipsis;}
.td-industry { min-width: 80px; }
.td-area { min-width: 60px; }

.ind-tag {
    display: inline-block;
    padding: 2px 7px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* 查询提示 */
.query-tip {
    padding: 10px 16px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* ========== 数据卡片列表 ========== */
.data-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
}
.data-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eef2f7;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    transition: all .2s ease;
    position: relative;
}
.data-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 12px rgba(79,110,247,.08);
    transform: translateY(-1px);
}

/* 逐条飞入动画 */
.card-fly-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .3s ease, transform .3s ease;
}
.card-fly-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* 卡片序号 */
.card-index {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
/* 卡片主体 */
.card-body { min-width: 0; }
.card-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}
.card-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.5;
}
.card-detail-item .label { 
    color: #94a3b8; 
    flex-shrink: 0;
    min-width: 20px;
    text-align: center;
}
.card-phone {
    color: #15803d !important;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}
.card-landline {
    font-weight: 700;
    font-size: 15px;
    color: #475569;
}
.card-industry {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.card-address {
    max-width: none;
    overflow: visible;
    white-space: normal;
    word-break: break-all;
    font-size: 15px;
    font-weight: 600;
}
.card-zuobiao {
    max-width: none;
    overflow: visible;
    white-space: normal;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
}
/* 卡片右侧操作区 */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    flex-shrink: 0;
}
.card-btn-copy {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.card-btn-copy:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ========== 分页控件 ========== */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 12px 8px;
    gap: 6px;
}
.pagination-wrap button {
    min-width: 36px;
    height: 34px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.pagination-wrap button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.pagination-wrap button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}
.pagination-wrap button:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.pagination-info {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 8px;
    white-space: nowrap;
}

/* 手机端卡片适配 */
@media (max-width: 900px) {
    .data-card {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .card-index { width: 26px; height: 26px; font-size: 11px; border-radius: 6px; }
    .card-body { order: 2; }
    .card-name { font-size: 14px; }
    .card-detail { gap: 4px 10px !important; }
    .card-actions { order: 1; flex-direction: row !important; }
    .card-address { max-width: none; }
    .pagination-wrap button { min-width: 30px; height: 30px; font-size: 12px; }
    .pagination-info { font-size: 11px; }
}
@media (max-width: 480px) {
    .data-card-list { padding: 8px; gap: 8px; }
    .data-card { padding: 10px 12px; }
    .card-detail-item { font-size: 13px; }
}

/* 加载动画 */
.loading-spinner {
    width:40px;height:40px;
    border:3px solid #e2e8f0;
    border-top-color:var(--primary);
    border-radius:50%;
    animation:spin .6s linear infinite;
    margin:0 auto 16px;
}
@keyframes spin{to{transform:rotate(360deg)}}

.query-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========== 全网群采集 - 二维码卡片 ========== */
.qr-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 12px;
    padding: 12px;
}
.qr-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all .2s ease;
}
.qr-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 12px rgba(79,110,247,.08);
    transform: translateY(-1px);
}
.qr-card-left {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-canvas {
    width: 140px;
    height: 140px;
    display: block;
    object-fit: contain;
}

/* 非会员模糊 + 遮罩 */
.qr-card-left.qr-blur {
    position: relative;
    overflow: hidden;
}
.qr-card-left.qr-blur .qr-canvas {
    filter: blur(20px) brightness(0.4);
}
.qr-lock-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.15);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
    pointer-events: none;
    border-radius: 8px;
}
.qr-card-body {
    flex: 1;
    min-width: 0;
}
.qr-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    word-break: break-all;
    line-height: 1.4;
}
.qr-card-tag {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}
.qr-card-time {
    font-size: 12px;
    color: #94a3b8;
}
.qr-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    flex-shrink: 0;
}
.card-btn-dl {
    padding: 5px 12px;
    font-size: 12px;
    border: 1px solid var(--success);
    background: #f0fdf4;
    color: #15803d;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    font-weight: 500;
}
.card-btn-dl:hover {
    background: var(--success);
    color: #fff;
}

/* 手机端二维码卡片适配 */
@media (max-width: 640px) {
    .qr-card-list {
        grid-template-columns: 1fr;
        padding: 8px;
        gap: 8px;
    }
    .qr-card {
        flex-direction: column;
        text-align: center;
        padding: 14px;
    }
    .qr-card-left {
        width: 120px;
        height: 120px;
    }
    .qr-canvas {
        width: 120px;
        height: 120px;
    }
    .qr-card-actions {
        flex-direction: row;
        align-items: center;
    }
}

/* ---------- 文章弹窗内容样式（TinyMCE 编辑器输出） ---------- */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}
.article-body table td,
.article-body table th {
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    text-align: left;
}
.article-body table th {
    background: #f1f5f9;
    font-weight: 600;
}
.article-body iframe {
    max-width: 100%;
    border-radius: 6px;
    margin: 8px 0;
}
.article-body video {
    max-width: 100%;
    border-radius: 6px;
    margin: 8px 0;
}
.article-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
}
.article-body blockquote {
    border-left: 3px solid #3b82f6;
    padding-left: 12px;
    margin: 10px 0;
    color: #64748b;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
}
.article-body h1, .article-body h2, .article-body h3, .article-body h4 {
    margin: 16px 0 8px;
    color: #1e40af;
}
.article-body ul, .article-body ol {
    margin-left: 20px;
    padding: 0;
}
.article-body a {
    color: #3b82f6;
    text-decoration: underline;
}
.article-body hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 12px 0;
}
