/**
 * KB Agency - Custom Styling for CEO Platform (Perfex CRM)
 * Lead Intelligence, Commercial Diagnosis & Temperature Dashboard
 */

/* Lead Intelligence Banner & Diagnostic Card */
.kb-lead-intelligence-banner {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    position: relative;
    overflow: hidden;
}

.kb-lead-intelligence-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 6px;
}

.kb-lead-intel-hot::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.kb-lead-intel-warm::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.kb-lead-intel-cold::before {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

/* Header Row in Banner */
.kb-intel-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 14px;
}

.kb-intel-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.kb-intel-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #475569;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Temperature Badges */
.kb-temp-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.kb-badge-hot {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 1px solid #fca5a5;
    animation: kb-pulse-glow 2.5s infinite;
}

.kb-badge-warm {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #d97706;
    border: 1px solid #fcd34d;
}

.kb-badge-cold {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

@keyframes kb-pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 12px 3px rgba(239, 68, 68, 0.25);
    }
}

/* Score Section */
.kb-intel-score-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kb-score-text {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.kb-score-track {
    width: 120px;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    display: inline-block;
}

.kb-score-bar-hot {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

.kb-score-bar-warm {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.kb-score-bar-cold {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

/* Quick Action Buttons */
.kb-intel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kb-btn-wa {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 7px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.35) !important;
    transition: all 0.2s ease !important;
}

.kb-btn-wa:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5) !important;
    color: #ffffff !important;
}

.kb-btn-outline {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
}

.kb-btn-outline:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* Diagnostic Grid */
.kb-diagnostic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.kb-diag-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    transition: all 0.2s ease;
}

.kb-diag-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.kb-diag-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.kb-diag-value {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    word-break: break-word;
}

.kb-diag-value-highlight {
    color: #0284c7;
}

.kb-diag-value-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

/* Collapsible Empty Address Fields */
.kb-empty-address-toggle {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
}

.kb-empty-address-toggle summary {
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    user-select: none;
    outline: none;
}

.kb-empty-address-toggle summary:hover {
    color: #334155;
}

.kb-empty-address-content {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

/* Stylized Description Box when not in grid */
.kb-desc-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    line-height: 1.6;
}
