/* KeZong P0 - AI 评分 / AI 摘要 样式（配合 style.css 暗色侧栏 + 紫色主题） */

/* ─── AI 评分列（leads） ─────────────────────────────────────── */
.ai-score-cell { white-space: nowrap; }
.ai-score-cell .ai-score-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: help;
}
.ai-badge-hot   { background: rgba(255, 118, 117, 0.15); color: var(--danger, #FF7675); border: 1px solid rgba(255, 118, 117, 0.4); }
.ai-badge-warm  { background: rgba(253, 203, 110, 0.15); color: #D6A419; border: 1px solid rgba(253, 203, 110, 0.4); }
.ai-badge-cold  { background: rgba(108, 92, 231, 0.12);  color: var(--primary, #6C5CE7); border: 1px solid rgba(108, 92, 231, 0.35); }

.btn-ai-score {
    background: linear-gradient(135deg, var(--primary, #6C5CE7), var(--primary-dark, #5A4BD1));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-ai-score:hover { opacity: 0.85; }
.btn-ai-score-sm { padding: 2px 8px; font-size: 0.72rem; margin-left: 6px; opacity: 0.75; }

.ai-score-loading { color: var(--primary, #6C5CE7); font-size: 0.82rem; }
.ai-score-error {
    color: var(--danger, #FF7675);
    font-size: 0.82rem;
    cursor: help;
    text-decoration: underline dotted;
}

/* ─── AI 摘要按钮（profiles） ────────────────────────────────── */
.btn-ai-summary {
    background: linear-gradient(135deg, var(--accent, #00CEC9), var(--success, #00B894));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-ai-summary:hover { opacity: 0.85; }

/* ─── AI 摘要模态（客户卡，暗色风） ──────────────────────────── */
.ai-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 46, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ai-modal.active { display: flex; }
.ai-modal-card {
    background: var(--dark-2, #16213E);
    color: var(--gray-light, #DFE6E9);
    border-radius: var(--radius, 12px);
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg, 0 8px 30px rgba(0, 0, 0, 0.3));
    overflow: hidden;
}
.ai-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--primary, #6C5CE7), var(--primary-dark, #5A4BD1));
    color: #fff;
}
.ai-modal-title { font-weight: 700; font-size: 1rem; }
.ai-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}
.ai-modal-close:hover { opacity: 1; }
.ai-modal-visitor {
    padding: 8px 18px;
    font-size: 0.8rem;
    color: var(--primary-light, #A29BFE);
    border-bottom: 1px solid rgba(162, 155, 254, 0.15);
}
.ai-modal-body {
    padding: 18px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: 0.92rem;
    flex: 1;
}
.ai-modal-footer {
    padding: 8px 18px;
    font-size: 0.72rem;
    color: var(--gray, #636E72);
    border-top: 1px solid rgba(99, 110, 114, 0.25);
}

@media (max-width: 768px) {
    .ai-modal-card { max-height: 90vh; }
    .ai-modal-body { font-size: 0.86rem; }
}
