/* 客户档案：沿用夜空金色体系，无独立 :root，复用 main.css/tarot.css 组件类 */

.client-sidebar-header h3 {
    color: var(--cyan);
}

.client-new-btn {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(212, 175, 55, 0.10));
}

.client-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px 16px;
}

.client-history-item {
    cursor: pointer;
    padding: 12px 14px;
    border: 1px solid rgba(212, 175, 55, 0.14);
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.025);
    transition: border-color .2s, transform .2s;
}
.client-history-item:hover { border-color: rgba(212, 175, 55, 0.38); transform: translateY(-1px); }
.client-history-item.active { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }

.client-history-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}
.client-gender {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: 6px;
    font-weight: 400;
}
.client-history-sub {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 3px;
}
.client-history-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
}
.client-tag-chip {
    font-size: 10px;
    color: var(--gold-light);
    border: 1px solid rgba(212, 175, 55, 0.28);
    background: rgba(212, 175, 55, 0.06);
    border-radius: 999px;
    padding: 2px 7px;
}
.client-link-badge {
    font-size: 10px;
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.28);
    background: rgba(34, 211, 238, 0.06);
    border-radius: 999px;
    padding: 2px 7px;
    margin-left: auto;
}

/* 侧栏·阶段圆点 / 收款徽章 / 待办提示 */
.client-stage-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.client-stage-dot.stage-lead { background: #94a3b8; }
.client-stage-dot.stage-follow { background: #60a5fa; }
.client-stage-dot.stage-negotiate { background: #fbbf24; }
.client-stage-dot.stage-won { background: #34d399; }
.client-stage-dot.stage-lost { background: #f87171; }
.client-paid-badge {
    font-size: 10px;
    color: #34d399;
    border: 1px solid rgba(52,211,153,0.3);
    background: rgba(52,211,153,0.08);
    border-radius: 999px;
    padding: 2px 7px;
    margin-left: auto;
    font-weight: 600;
}
.client-todo-hint { margin-left: auto; font-size: 11px; color: var(--text-secondary); cursor: help; }
.client-todo-hint.overdue { color: #f87171; animation: clientPulse 1.8s ease-in-out infinite; }
@keyframes clientPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.client-follow-hint { color: var(--cyan); opacity: .7; }

/* ===== 欢迎页 ===== */
.client-welcome {
    width: min(640px, 100%);
    margin: 0 auto;
    padding: 24px;
}
.client-welcome-card {
    text-align: center;
    padding: 48px 28px;
    background:
        radial-gradient(circle at 16% 8%, rgba(34, 211, 238, 0.09), transparent 36%),
        radial-gradient(circle at 88% 18%, rgba(212, 175, 55, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(18, 13, 42, 0.84), rgba(8, 6, 24, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
}
.client-welcome-icon { font-size: 46px; color: var(--gold); margin-bottom: 16px; }
.client-welcome-card h3 { color: var(--gold); font-size: 22px; letter-spacing: 3px; margin-bottom: 14px; }
.client-welcome-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.8; margin-bottom: 26px; }
.client-welcome-card .app-status-bar { margin-top: 26px; }

/* ===== 表单页 ===== */
.client-form-layout {
    width: min(820px, 100%);
    margin: 0 auto;
    padding: 24px;
}
.client-form-panel {
    padding: 24px;
    background:
        radial-gradient(circle at 16% 8%, rgba(34, 211, 238, 0.08), transparent 36%),
        linear-gradient(180deg, rgba(18, 13, 42, 0.84), rgba(8, 6, 24, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
}
.client-panel-title {
    color: var(--gold);
    font-size: 18px;
    letter-spacing: 3px;
    margin-bottom: 20px;
}
.client-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.client-field { display: flex; flex-direction: column; }
.client-field-full { grid-column: span 2; }
.client-field label {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 6px;
}
.client-field input, .client-field select, .client-field textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}
.client-field input:focus, .client-field select:focus, .client-field textarea:focus {
    outline: none;
    border-color: var(--gold);
}
.client-submit-btn {
    width: 100%;
    margin-top: 22px;
    padding: 13px;
    border: 1px solid rgba(212, 175, 55, 0.42);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.20), rgba(34, 211, 238, 0.10));
    color: var(--gold-light);
    font-size: 15px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all .2s;
}
.client-submit-btn:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.client-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ===== 详情页 ===== */
.client-detail-layout {
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: 24px;
}
.client-section-title {
    color: var(--gold);
    font-size: 16px;
    letter-spacing: 2px;
    margin: 26px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.client-section-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--gold);
    border-radius: 2px;
}
.client-info-card {
    padding: 20px 22px;
    background: linear-gradient(180deg, rgba(18, 13, 42, 0.84), rgba(8, 6, 24, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 8px;
}
.client-info-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.client-info-name { color: var(--text-primary); font-size: 19px; font-weight: 600; }
.client-info-actions { display: flex; gap: 8px; }
.client-mini-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.06);
    color: var(--gold-light);
    cursor: pointer;
    transition: all .2s;
}
.client-mini-btn:hover { border-color: var(--gold); }
.client-mini-btn.danger { color: #f87171; border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.06); }
.client-mini-btn.danger:hover { border-color: #f87171; }
.client-info-rows { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 24px; }
.client-info-row { display: flex; gap: 8px; font-size: 13px; }
.client-info-k { color: var(--text-secondary); min-width: 64px; }
.client-info-v { color: var(--text-primary); }
.client-info-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.client-info-notes {
    margin-top: 14px;
    padding: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.22);
    border-radius: 6px;
    border-left: 3px solid var(--gold);
    white-space: pre-wrap;
}

/* 多体系挂接卡 */
.client-linkage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.client-linkage-card {
    padding: 16px;
    background: linear-gradient(180deg, rgba(18, 13, 42, 0.7), rgba(8, 6, 24, 0.8));
    border: 1px solid rgba(212, 175, 55, 0.16);
    border-radius: 8px;
}
.client-linkage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.client-linkage-tag {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 999px;
}
.tag-bazi { color: var(--gold-light); background: rgba(212,175,55,0.12); border: 1px solid rgba(212,175,55,0.3); }
.tag-tarot { color: #c4b5fd; background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.3); }
.tag-astro { color: #60a5fa; background: rgba(96,165,250,0.12); border: 1px solid rgba(96,165,250,0.3); }
.tag-qimen { color: var(--cyan); background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.3); }
.tag-liuyao { color: #fde68a; background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); }
.client-linkage-add {
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(212,175,55,0.28);
    border-radius: 6px;
    background: rgba(212,175,55,0.06);
    color: var(--gold-light);
    cursor: pointer;
}
.client-linkage-add:hover { border-color: var(--gold); }
.client-linkage-list { display: flex; flex-direction: column; gap: 8px; }
.client-linkage-empty { color: var(--text-secondary); font-size: 12px; opacity: .7; padding: 6px 0; }
.client-linkage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
}
.client-linkage-info { flex: 1; min-width: 0; }
.client-linkage-title { font-size: 12px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-linkage-sid { font-size: 10px; color: var(--text-secondary); opacity: .6; margin-top: 2px; }

/* 综合解读入口 */
.client-interpret-panel {
    padding: 18px;
    background: linear-gradient(180deg, rgba(18, 13, 42, 0.7), rgba(8, 6, 24, 0.8));
    border: 1px solid rgba(212, 175, 55, 0.16);
    border-radius: 8px;
}
.client-interpret-panel textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 6px;
    padding: 11px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
}
.client-interpret-panel textarea:focus { outline: none; border-color: var(--gold); }
.client-note { font-size: 12px; color: var(--text-secondary); margin-top: 10px; opacity: .8; }

.client-reading-list { display: flex; flex-direction: column; gap: 8px; }
.client-reading-item {
    padding: 12px 14px;
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: border-color .2s;
}
.client-reading-item:hover { border-color: rgba(212,175,55,0.36); }
.client-reading-q { font-size: 13px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-reading-dt { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* ===== 综合解读报告页 ===== */
.client-reading-page {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 24px 24px 48px;
}
.client-print-btn {
    width: 60px;
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 8px;
    background: rgba(212,175,55,0.06);
    color: var(--gold-light);
    cursor: pointer;
    font-size: 15px;
    transition: all .2s;
}
.client-print-btn:hover { border-color: var(--gold); }

/* 报告「纸面」容器 */
.client-report-paper {
    background:
        radial-gradient(circle at 12% 0%, rgba(34,211,238,0.06), transparent 30%),
        radial-gradient(circle at 90% 4%, rgba(212,175,55,0.08), transparent 28%),
        linear-gradient(180deg, rgba(20,15,46,0.92), rgba(10,8,28,0.96));
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    padding: 28px 30px 22px;
    margin-bottom: 24px;
}
.client-report-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(212,175,55,0.18);
}
.client-report-brand {
    font-size: 16px;
    letter-spacing: 2px;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 8px;
}
.client-report-logo { font-size: 20px; }
.client-report-systems { display: flex; flex-wrap: wrap; gap: 6px; }
.client-sys-chip {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(212,175,55,0.28);
    background: rgba(212,175,55,0.06);
    color: var(--gold-light);
}
.client-sys-chip.sys-bazi  { color: #fbbf24; border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.08); }
.client-sys-chip.sys-tarot { color: #c4b5fd; border-color: rgba(196,181,253,0.4); background: rgba(167,139,250,0.10); }
.client-sys-chip.sys-astro { color: #60a5fa; border-color: rgba(96,165,250,0.4); background: rgba(96,165,250,0.10); }
.client-sys-chip.sys-qimen { color: #67e8f9; border-color: rgba(103,232,249,0.4); background: rgba(34,211,238,0.10); }
.client-sys-chip.sys-liuyao { color: #fde68a; border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.10); }

.client-reading-meta {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: rgba(0,0,0,0.22);
    border-left: 3px solid var(--gold);
    border-radius: 0 6px 6px 0;
}
.client-reading-q-line {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.client-reading-q-line i { color: var(--gold); margin-top: 4px; }
.client-interpret-output { min-height: 200px; }

/* 报告分区卡片（复用 tarot 的 .section-card，并强化本应用的间距与色彩） */
.client-interpret-output .section-card {
    margin-bottom: 16px;
    border-radius: 10px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(212,175,55,0.14);
    padding: 16px 18px;
}
.client-interpret-output .section-card .section-title {
    font-size: 15px;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(212,175,55,0.18);
}
.client-interpret-output .section-card.section-overall .section-title { color: var(--gold); }
.client-interpret-output .section-card.section-cards  .section-title { color: #fbbf24; }
.client-interpret-output .section-card.section-insight .section-title { color: #c4b5fd; }
.client-interpret-output .section-card.section-reflect .section-title { color: #60a5fa; }
.client-interpret-output .section-card.section-action  .section-title { color: #67e8f9; }
.client-interpret-output .section-card .section-body p {
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.client-interpret-output .section-card .section-body p:last-child { margin-bottom: 0; }
.client-interpret-output .section-card .section-body strong { color: var(--gold-light); }

/* 核心结论卡：突出显示 */
.client-interpret-output .section-card.section-overall:first-child {
    background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(34,211,238,0.06));
    border-color: rgba(212,175,55,0.38);
}

.client-report-foot {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid rgba(212,175,55,0.14);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    opacity: .75;
}
.client-report-date { color: var(--text-dim); }

/* ===== 打印 / 另存 PDF ===== */
@media print {
    body * { visibility: hidden; }
    #clientReadingPage, #clientReadingPage * { visibility: visible; }
    #clientReadingPage { position: absolute; left: 0; top: 0; width: 100%; padding: 0; }
    .client-reading-page { width: 100%; padding: 0; }
    .tarot-page-header, .client-print-btn, .tarot-followup-section { display: none !important; }
    .client-report-paper {
        background: #fff !important;
        border: none !important;
        box-shadow: none !important;
        color: #1a1a1a !important;
        padding: 0 !important;
    }
    .client-report-brand, .client-reading-q-line, .client-interpret-output .section-card .section-title,
    .client-interpret-output .section-card .section-body p, .client-interpret-output .section-card .section-body strong,
    .client-report-foot { color: #1a1a1a !important; }
    .client-reading-meta { background: #f6f6f6 !important; border-left-color: #c9a961 !important; }
    .client-interpret-output .section-card { break-inside: avoid; border-color: #ddd !important; }
    .client-sys-chip { color: #555 !important; border-color: #ccc !important; background: #f0f0f0 !important; }
}

/* ===== 挂接选择器弹窗 ===== */
.client-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.client-picker-modal {
    width: min(480px, 100%);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(18, 13, 42, 0.97), rgba(8, 6, 24, 0.98));
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.client-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(212,175,55,0.16);
}
.client-picker-head h3 { color: var(--gold); font-size: 16px; }
.client-picker-list { overflow-y: auto; padding: 12px 16px 18px; }
.client-picker-item {
    padding: 12px 14px;
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    background: rgba(255,255,255,0.02);
    transition: border-color .2s;
}
.client-picker-item:hover { border-color: var(--gold); background: rgba(212,175,55,0.06); }
.client-picker-title { font-size: 14px; color: var(--text-primary); }
.client-picker-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
    .client-info-rows { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .client-form-grid,
    .client-linkage-grid { grid-template-columns: 1fr; }
    .client-field-full { grid-column: span 1; }
    .client-info-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
    .client-welcome-card { padding: 32px 18px; }
    .client-welcome-card p { font-size: 13px; }
}

/* ===== CRM：阶段徽章 ===== */
.client-stage-chip {
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 999px;
    margin-left: 8px;
    font-weight: 500;
    vertical-align: middle;
}
.stage-lead      { color: #94a3b8; background: rgba(148,163,184,0.14); border: 1px solid rgba(148,163,184,0.34); }
.stage-follow    { color: #60a5fa; background: rgba(96,165,250,0.14);  border: 1px solid rgba(96,165,250,0.34); }
.stage-negotiate { color: #fbbf24; background: rgba(251,191,36,0.14);   border: 1px solid rgba(251,191,36,0.34); }
.stage-won       { color: #34d399; background: rgba(52,211,153,0.14);   border: 1px solid rgba(52,211,153,0.34); }
.stage-lost      { color: #f87171; background: rgba(248,113,113,0.14);   border: 1px solid rgba(248,113,113,0.34); }

/* ===== CRM：欢迎页·看板入口 ===== */
.client-dashboard-btn {
    width: 100%;
    margin-top: 12px;
    padding: 11px;
    border: 1px solid rgba(34,211,238,0.36);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(34,211,238,0.16), rgba(34,211,238,0.04));
    color: var(--cyan);
    font-size: 14px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all .2s;
}
.client-dashboard-btn:hover { border-color: var(--cyan); transform: translateY(-1px); }

/* ===== CRM：经营看板页 ===== */
.client-dashboard-layout { width: min(1100px, 100%); margin: 0 auto; padding: 24px; }
.client-dash-kpi {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.client-kpi-card {
    padding: 18px 16px;
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(18,13,42,0.84), rgba(8,6,24,0.9));
    text-align: center;
}
.client-kpi-card.gold { border-color: rgba(212,175,55,0.4); background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(8,6,24,0.9)); }
.client-kpi-card.cyan { border-color: rgba(34,211,238,0.36); background: linear-gradient(135deg, rgba(34,211,238,0.1), rgba(8,6,24,0.9)); }
.client-kpi-num { font-size: 26px; font-weight: 700; color: var(--gold-light); }
.client-kpi-card.gold .client-kpi-num { color: #fbbf24; }
.client-kpi-card.cyan .client-kpi-num { color: #67e8f9; }
.client-kpi-label { font-size: 12px; color: var(--text-secondary); margin-top: 6px; letter-spacing: 1px; }
.client-dash-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
}
.client-dash-card {
    padding: 16px 18px;
    border: 1px solid rgba(212,175,55,0.16);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(18,13,42,0.7), rgba(8,6,24,0.8));
}
.client-dash-card-title { color: var(--gold); font-size: 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.client-chart-box { min-height: 180px; display: flex; align-items: center; justify-content: center; }
.client-chart-svg { width: 100%; height: 180px; }
.client-chart-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); margin-top: 6px; opacity: .8; }
.client-chart-curr { color: var(--gold-light); font-weight: 600; }

.client-bar-chart { display: flex; align-items: flex-end; gap: 2px; height: 150px; }
.client-bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.client-bar-fill { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s; opacity: .85; }

.client-barlist { display: flex; flex-direction: column; gap: 10px; }
.client-barlist-row { display: flex; align-items: center; gap: 10px; }
.client-barlist-label { width: 90px; font-size: 12px; color: var(--text-primary); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-barlist-track { flex: 1; height: 10px; background: rgba(0,0,0,0.3); border-radius: 999px; overflow: hidden; }
.client-barlist-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 999px; }
.client-barlist-val { font-size: 12px; color: var(--gold-light); white-space: nowrap; }
.client-barlist-val small { color: var(--text-secondary); }

.client-funnel { display: flex; flex-direction: column; gap: 12px; }
.client-funnel-row { display: flex; align-items: center; gap: 10px; }
.client-funnel-label { width: 64px; font-size: 12px; text-align: right; flex-shrink: 0; }
.client-funnel-bar { flex: 1; height: 22px; background: rgba(0,0,0,0.3); border-radius: 6px; overflow: hidden; }
.client-funnel-fill { height: 100%; border-radius: 6px; opacity: .85; }
.client-funnel-num { width: 32px; font-size: 13px; color: var(--gold-light); font-weight: 600; }

.client-todo-list { display: flex; flex-direction: column; gap: 8px; }
.client-todo-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    cursor: pointer; transition: border-color .2s;
}
.client-todo-item:hover { border-color: rgba(212,175,55,0.36); }
.client-todo-item.overdue { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.05); }
.client-todo-item > i { color: var(--gold); font-size: 15px; }
.client-todo-item.overdue > i { color: #f87171; }
.client-todo-main { flex: 1; min-width: 0; }
.client-todo-name { font-size: 14px; color: var(--text-primary); font-weight: 500; }
.client-todo-sub { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.client-todo-dt { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }

/* ===== CRM：详情页·汇总条 ===== */
.client-crm-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.client-crm-stat {
    padding: 14px 16px;
    border: 1px solid rgba(212,175,55,0.16);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(18,13,42,0.7), rgba(8,6,24,0.8));
    text-align: center;
}
.client-crm-stat.gold { border-color: rgba(212,175,55,0.36); background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(8,6,24,0.8)); }
.client-crm-stat-val { display: block; font-size: 20px; font-weight: 700; color: var(--gold-light); }
.client-crm-stat.gold .client-crm-stat-val { color: #fbbf24; }
.client-crm-stat-label { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.client-crm-stat-label small { color: var(--gold); margin-left: 4px; }

/* ===== CRM：收款面板 ===== */
.client-payment-panel, .client-followup-panel {
    padding: 16px;
    background: linear-gradient(180deg, rgba(18,13,42,0.7), rgba(8,6,24,0.8));
    border: 1px solid rgba(212,175,55,0.16);
    border-radius: 8px;
}
.client-payment-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.client-payment-form-row input, .client-payment-form-row select {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 6px;
    padding: 9px 11px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}
.client-payment-form-row input:focus, .client-payment-form-row select:focus { outline: none; border-color: var(--gold); }
.client-payment-form-row input#clientPayAmount { width: 110px; }
.client-payment-form-row input#clientPayItem { flex: 1; min-width: 140px; }
.client-payment-form-row select { width: auto; }
.client-payment-form-row input[type="datetime-local"] { width: 200px; }
.client-payment-form-row input#clientPayNote { flex: 1; min-width: 140px; }

.client-crm-add-btn {
    padding: 9px 16px;
    border: 1px solid rgba(212,175,55,0.42);
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(34,211,238,0.1));
    color: var(--gold-light);
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.client-crm-add-btn:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.client-crm-add-btn:disabled { opacity: .6; cursor: not-allowed; }

.client-payment-list { display: flex; flex-direction: column; gap: 8px; }
.client-pay-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border-left: 3px solid var(--gold);
}
.client-pay-item.pay-pending { border-left-color: #fbbf24; }
.client-pay-item.pay-refunded { border-left-color: #f87171; opacity: .8; }
.client-pay-main { flex: 1; min-width: 0; }
.client-pay-amount { font-size: 16px; font-weight: 700; color: var(--gold-light); display: flex; align-items: center; gap: 8px; }
.client-pay-status { font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 500; }
.client-pay-status.pay-paid { color: #34d399; background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.3); }
.client-pay-status.pay-pending { color: #fbbf24; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.3); }
.client-pay-status.pay-refunded { color: #f87171; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3); }
.client-pay-meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.client-pay-note { font-size: 12px; color: var(--text-secondary); margin-top: 4px; opacity: .85; }
.client-pay-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ===== CRM：跟进时间线 ===== */
.client-followup-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.client-followup-form-row select, .client-followup-form-row input {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 6px;
    padding: 9px 11px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}
.client-followup-form-row select { width: auto; }
.client-followup-form-row input[type="datetime-local"] { width: 220px; }
.client-followup-form textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 6px;
    padding: 10px 11px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 10px;
}
.client-followup-form textarea:focus, .client-followup-form-row select:focus, .client-followup-form-row input:focus { outline: none; border-color: var(--gold); }

.client-followup-timeline { display: flex; flex-direction: column; gap: 4px; position: relative; }
.client-follow-item { display: flex; gap: 12px; padding: 4px 0; position: relative; }
.client-follow-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 13px; top: 28px; bottom: -4px;
    width: 2px;
    background: rgba(212,175,55,0.18);
}
.client-follow-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212,175,55,0.22), rgba(34,211,238,0.12));
    border: 1px solid rgba(212,175,55,0.3);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-light); font-size: 12px;
    flex-shrink: 0; z-index: 1;
}
.client-follow-body { flex: 1; min-width: 0; padding-bottom: 8px; }
.client-follow-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.client-follow-type { font-size: 12px; color: var(--cyan); font-weight: 600; }
.client-follow-intent { font-size: 10px; padding: 1px 7px; border-radius: 999px; }
.client-follow-intent.intent-hot { color: #f87171; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3); }
.client-follow-intent.intent-warm { color: #fbbf24; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.3); }
.client-follow-intent.intent-cold { color: #94a3b8; background: rgba(148,163,184,0.12); border: 1px solid rgba(148,163,184,0.3); }
.client-follow-dt { font-size: 11px; color: var(--text-secondary); opacity: .7; }
.client-follow-ops { margin-left: auto; display: flex; gap: 6px; }
.client-follow-ops .client-mini-btn { padding: 3px 8px; font-size: 11px; }
.client-follow-content { font-size: 13px; color: var(--text-primary); line-height: 1.7; margin-top: 6px; white-space: pre-wrap; }
.client-follow-next { font-size: 11px; color: #fbbf24; margin-top: 6px; display: flex; align-items: center; gap: 4px; }

/* ===== CRM：编辑弹窗 ===== */
.client-crm-edit-body { padding: 16px 18px 18px; }
.client-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.client-edit-grid .client-field input, .client-edit-grid .client-field select, .client-edit-grid .client-field textarea {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 6px;
    padding: 9px 11px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}
.client-edit-grid .client-field input:focus, .client-edit-grid .client-field select:focus, .client-edit-grid .client-field textarea:focus { outline: none; border-color: var(--gold); }

/* ===== CRM：响应式补充 ===== */
@media (max-width: 880px) {
    .client-dash-grid { grid-template-columns: 1fr; }
    .client-crm-summary { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .client-dash-kpi { grid-template-columns: 1fr; }
    .client-edit-grid { grid-template-columns: 1fr; }
    .client-payment-form-row input, .client-payment-form-row select,
    .client-followup-form-row select, .client-followup-form-row input { width: 100% !important; }
    .client-pay-item { flex-direction: column; align-items: flex-start; }
}
