* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    overflow: hidden;
}
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-left h1 { font-size: 18px; font-weight: 700; color: #f1f5f9; }
.header-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #94a3b8; }
#lastUpdated { display: none; }
.nav-links { display: flex; align-items: center; gap: 14px; margin-right: 8px; }
.nav-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600; color: #93c5fd;
    text-decoration: none; padding: 4px 10px; border-radius: 6px;
    border: 1px solid #334155; background: #1e293b; transition: background 0.2s;
}
.nav-link:hover { background: #334155; color: #bfdbfe; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.green { background: #22c55e; }
.notification-bell { position: relative; font-size: 18px; cursor: pointer; }
.badge {
    position: absolute; top: -6px; right: -8px;
    background: #ef4444; color: #fff; font-size: 10px;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: #2563eb; color: #fff; font-size: 12px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}

/* Pipeline */
.pipeline {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 6px 24px;
    overflow-x: auto;
    flex-shrink: 0;
}
.pipeline-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 180px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.3s, border-color 0.3s;
}
.pipeline-card.card-active {
    animation: blinkBlue 1.4s ease-in-out infinite;
    border-color: #93c5fd;
}
.pipeline-card.card-completed {
    background: #f0fdf4;
    border-color: #86efac;
}
@keyframes blinkBlue {
    0%, 100% { background: #fff; }
    50% { background: #dbeafe; }
}
.arrow { display: flex; align-items: center; font-size: 20px; color: #d1d5db; font-weight: 300; transition: color 0.3s; }
.arrow.arrow-active { color: #3b82f6; }
.arrow.arrow-done { color: #22c55e; }

/* Step Cards */
.step-card { align-items: stretch; }
.step-header { display: flex; align-items: center; gap: 10px; }
.step-icon {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.step-icon.blue-bg { background: #dbeafe; }
.step-icon.gear-bg { background: #e0e7ff; }
.step-icon.person-bg { background: #f3e8ff; }
.step-icon.prospect-bg { background: #dcfce7; }
.step-title { font-size: 12px; font-weight: 700; color: #1a1a2e; }
.step-desc { font-size: 10px; color: #6b7280; }

/* Upload Drop Area */
.upload-drop-area {
    border: 1.5px dashed #d1d5db; border-radius: 8px; padding: 10px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    margin-top: 2px;
}
.upload-drop-icon { font-size: 24px; color: #9ca3af; }
.upload-drop-text { font-size: 11px; color: #6b7280; }
.upload-drop-or { font-size: 10px; color: #9ca3af; }
.btn-upload-csv {
    padding: 6px 14px; font-size: 12px; border-radius: 6px; margin-top: 4px;
}

/* Sourcer Stats */
.sourcer-step { min-width: 280px; }
.sourcer-stats {
    display: flex; gap: 8px; margin-top: 2px;
}
.stat-box {
    flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px;
}
.stat-box.stat-valid { background: #f0fdf4; }
.stat-box.stat-invalid { background: #fff7ed; }
.stat-box.stat-total { background: #eff6ff; }
.stat-label { font-size: 10px; font-weight: 600; color: #6b7280; }
.stat-value { font-size: 20px; font-weight: 700; }
.stat-value.green { color: #16a34a; }
.stat-value.red { color: #ea580c; }
.stat-value.blue { color: #2563eb; }

.sourcer-actions {
    display: flex; align-items: center; gap: 12px; margin-top: auto;
}
.btn-run-sourcer {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: none; background: #1e3a5f; color: #fff;
    transition: all 0.2s;
}
.btn-run-sourcer:hover { background: #15304d; }
.btn-run-sourcer:disabled { background: #93c5fd; cursor: not-allowed; }
.last-run-text { font-size: 11px; color: #6b7280; }

/* Step Status */
.step-status {
    display: flex; align-items: center; gap: 8px; margin-top: auto;
    padding: 2px 0;
}
.step-status-icon { font-size: 18px; }
.step-status-text { font-size: 12px; font-weight: 600; color: #6b7280; }
.step-completion-time { font-size: 11px; color: #10b981; margin-top: 4px; text-align: center; font-weight: 500; }

/* Upload Modal */
.upload-modal-body {
    background: #fff !important; color: #1a1a2e !important;
    padding: 20px !important; white-space: normal !important;
}
.upload-options { display: flex; flex-direction: column; gap: 10px; }
.upload-option {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer;
    transition: all 0.2s;
}
.upload-option:hover { background: #eff6ff; border-color: #bfdbfe; }
.upload-option-icon { font-size: 20px; width: 28px; text-align: center; }
.upload-option-label { font-size: 14px; font-weight: 600; color: #374151; flex: 1; }
.upload-file-name { font-size: 11px; color: #9ca3af; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-file-name.file-selected { color: #16a34a; font-weight: 500; }
.upload-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.upload-actions .btn:disabled { background: #93c5fd; cursor: not-allowed; }
#uploadStatus { font-size: 12px; color: #6b7280; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: none; transition: all 0.2s;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.upload-btn { margin-top: 4px; }

/* Sourcer Card */
.sourcer-card { align-items: flex-start; }
.card-title { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.card-title.blue { color: #2563eb; }
.card-title.orange { color: #f59e0b; }
.card-title.green { color: #22c55e; }
.card-row {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: #4b5563; width: 100%;
}
.card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.agent-icon {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.green-bg { background: #dcfce7; }
.orange-bg { background: #fef3c7; }

.status-icon { margin-left: auto; font-size: 16px; }
.status-icon.active { color: #2563eb; }
.status-icon.completed { color: #22c55e; }

.status-dot-inline {
    width: 10px; height: 10px; border-radius: 50%; background: #d1d5db;
}
.status-dot-inline.running { background: #f59e0b; }
.status-dot-inline.completed { background: #22c55e; }

/* Spinner */
.spinner {
    width: 18px; height: 18px; border: 2px solid #e5e7eb;
    border-top-color: #2563eb; border-radius: 50%;
    animation: spin 0.8s linear infinite; margin-left: auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Table */
.table-section {
    background: #fff;
    margin: 0 24px 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.table-scroll {
    flex: 1;
    overflow-y: auto;
}
table { width: 100%; border-collapse: collapse; }
thead { background: #f9fafb; position: sticky; top: 0; z-index: 1; }
th {
    padding: 10px 12px; text-align: center;
    font-size: 11px; font-weight: 600; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}
th:nth-child(1) { text-align: left; width: 5%; }
th:nth-child(2) { text-align: left; width: 40%; }
th:nth-child(3) { width: 12%; }
th:nth-child(4) { width: 12%; }
th:nth-child(5) { width: 11%; }
th:nth-child(6) { width: 20%; }
td {
    padding: 12px; font-size: 13px; color: #374151;
    border-bottom: 1px solid #f3f4f6; vertical-align: middle;
    text-align: center;
}
td:nth-child(1) { text-align: left; width: 5%; }
td:nth-child(2) { text-align: left; width: 40%; }
tr:hover { background: #f9fafb; }

/* Row status indicator */
.row-indicator {
    width: 3px; height: 40px; border-radius: 2px;
    display: inline-block; margin-right: 8px;
}
.row-indicator.red { background: #ef4444; }
.row-indicator.yellow { background: #f59e0b; }
.row-indicator.green { background: #22c55e; }
.row-indicator.blue { background: #3b82f6; }

.nid-cell { display: flex; align-items: center; }

/* Status badges */
.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.status-badge.uploaded { background: #eff6ff; color: #2563eb; }
.status-badge.processing { background: #fef3c7; color: #d97706; }
.status-badge.accepted { background: #dcfce7; color: #16a34a; }
.status-badge.rejected { background: #fee2e2; color: #dc2626; }
.status-badge.completed { background: #dcfce7; color: #16a34a; }

/* Action buttons */
.actions-cell { display: flex; gap: 8px; justify-content: center; }
.btn-sm {
    padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
    cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 4px;
    transition: all 0.2s;
}
.btn-logs { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.btn-logs:hover { background: #dbeafe; }
.btn-run { background: #2563eb; color: #fff; }
.btn-run:hover { background: #1d4ed8; }
.btn-run:disabled { background: #93c5fd; cursor: not-allowed; }

/* Table Footer */
.table-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 16px; font-size: 12px; color: #6b7280;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.pagination { display: flex; align-items: center; gap: 3px; }
.page-btn {
    width: 24px; height: 24px; border-radius: 4px; border: 1px solid #e5e7eb;
    background: #fff; cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
}
.page-btn:hover { background: #f3f4f6; }
.page-num {
    width: 24px; height: 24px; border-radius: 4px;
    background: #2563eb; color: #fff; font-weight: 600;
    display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.rows-per-page { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.rows-per-page select {
    padding: 2px 6px; border: 1px solid #e5e7eb; border-radius: 4px; font-size: 12px;
}

/* Output link */
.output-link { color: #2563eb; cursor: pointer; text-decoration: underline; font-size: 13px; }
.output-link.disabled {
    color: #9ca3af; cursor: not-allowed; text-decoration: none;
    pointer-events: auto;
}

/* Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 1000;
    justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff; border-radius: 12px; width: 560px; max-height: 80vh;
    display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-lg { width: 790px; }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid #e5e7eb;
}
.modal-header h3 { font-size: 16px; }
.modal-close {
    background: none; border: none; font-size: 18px; cursor: pointer; color: #6b7280;
}
.modal-body {
    padding: 20px; overflow-y: auto; font-size: 12px;
    background: #1e1e2e; color: #a6e3a1; border-radius: 0 0 12px 12px;
    white-space: pre-wrap; word-break: break-word; max-height: 60vh;
}

/* Agent progress in row */
.agent-progress {
    display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 11px;
}
.agent-step {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500;
    background: #f3f4f6; color: #6b7280;
}
.agent-step.active { background: #fef3c7; color: #d97706; }
.agent-step.completed { background: #dcfce7; color: #16a34a; }
.agent-step.has-tooltip { cursor: pointer; }
.agent-step.has-tooltip:hover { filter: brightness(0.92); }

/* Status tooltip */
.status-tooltip-wrap {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}
.status-tooltip {
    display: none;
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    transform: translateY(-50%);
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12px;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 8px;
    width: max-content;
    max-width: 420px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    line-height: 1.4;
}
.status-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1e293b;
}
.status-tooltip-wrap:hover .status-tooltip {
    display: block;
}

/* Row highlight states */
tr.row-processing {
    animation: blinkGreen 1.2s ease-in-out infinite;
}
tr.row-completed-high {
    background: #dcfce7 !important;
}
tr.row-completed-low {
    background: #fefce8 !important;
}
tr.row-rejected {
    background: transparent !important;
}

@keyframes blinkGreen {
    0%, 100% { background: #fff; }
    50% { background: #dcfce7; }
}

/* Email form in output modal */
.email-form {
    display: flex; flex-direction: column; gap: 10px;
}
.email-form label {
    font-size: 12px; font-weight: 600; color: #94a3b8;
}
.email-form input, .email-form textarea {
    width: 100%; padding: 8px 12px; border-radius: 6px;
    border: 1px solid #334155; background: #0f172a; color: #e2e8f0;
    font-size: 13px; font-family: inherit;
}
.email-form textarea { resize: vertical; }
.btn-send { margin-top: 8px; align-self: flex-start; }
#emailStatus {
    font-size: 12px; color: #94a3b8; align-self: center;
}

/* Lead Profile Modal */
.lead-profile-body {
    background: #fff !important;
    color: #1a1a2e !important;
    padding: 0 !important;
    white-space: normal !important;
}
.lp-persona {
    display: flex; align-items: center; gap: 16px;
    padding: 20px; border-bottom: 1px solid #e5e7eb;
}
.lp-avatar {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    background: #e5e7eb; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; color: #9ca3af;
}
.lp-info { display: flex; flex-direction: column; gap: 2px; }
.lp-name { font-size: 18px; font-weight: 700; color: #1a1a2e; }
.lp-occupation { font-size: 13px; color: #4b5563; }
.lp-org { font-size: 13px; color: #2563eb; }
.lp-status-badge {
    display: inline-block; margin-top: 6px;
    padding: 3px 10px; border-radius: 4px;
    font-size: 12px; font-weight: 600;
}
.lp-status-badge.strong { background: #dcfce7; color: #16a34a; }
.lp-status-badge.notfound { background: #fef3c7; color: #d97706; }
.lp-status-badge.nolead { background: #fee2e2; color: #dc2626; }
.lp-contact {
    padding: 16px 20px;
}
.lp-contact-title {
    font-size: 14px; font-weight: 700; color: #1a1a2e;
    margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.lp-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.lp-row:last-child { border-bottom: none; }
.lp-icon { width: 20px; text-align: center; flex-shrink: 0; }
.lp-label { width: 110px; color: #6b7280; font-weight: 500; flex-shrink: 0; }
.lp-value { color: #1a1a2e; word-break: break-word; }
.lp-value.green { color: #16a34a; }
.lp-value.orange { color: #d97706; }
.lp-value.red { color: #dc2626; }
.lp-value.blue { color: #2563eb; }

/* Lead profile modal header variants */
.modal-header.lp-green { border-left: 4px solid #22c55e; }
.modal-header.lp-orange { border-left: 4px solid #f59e0b; }
.modal-header.lp-red { border-left: 4px solid #ef4444; }
.modal-header .lp-header-icon { font-size: 20px; margin-right: 6px; }

/* Clickable lead name in table */
.lead-name-link {
    color: #2563eb; cursor: pointer; text-decoration: underline;
    font-weight: 500;
}

/* Output Section */
.output-section { padding: 0; overflow-y: auto; }
.output-section h4 { font-size: 14px; font-weight: 700; color: #e2e8f0; margin: 16px 0 8px; }
.output-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 16px; table-layout: fixed; }
.output-table thead { position: sticky; top: 0; z-index: 2; }
.output-table th {
    padding: 8px 10px; font-size: 11px; font-weight: 600;
    background: #334155; color: #94a3b8; text-align: left;
    border-bottom: 1px solid #475569;
}
.output-table th:nth-child(1) { width: 18%; }
.output-table th:nth-child(2) { width: 16%; }
.output-table th:nth-child(3) { width: 16%; }
.output-table th:nth-child(4) { width: 14%; }
.output-table th:nth-child(5) { width: 18%; white-space: nowrap; }
.output-table th:nth-child(6) { width: 18%; }
.output-table td {
    padding: 8px 10px; font-size: 12px; color: #e2e8f0;
    border-bottom: 1px solid #334155; text-align: left;
}
.output-table td:nth-child(5),
.output-table td:nth-child(6) { text-align: center; }
.output-table th:nth-child(5),
.output-table th:nth-child(6) { text-align: center; }
.output-table tr:hover, .output-table tr:hover td { background: transparent !important; }

/* Nudge Cards */
.nudge-card {
    background: #1e293b; border: 1px solid #334155; border-radius: 8px;
    padding: 12px; margin-bottom: 10px;
}
.nudge-card strong { color: #f1f5f9; font-size: 13px; }
.nudge-card.muted { color: #64748b; }
.nudge-email { margin-top: 8px; font-size: 12px; color: #cbd5e1; }
.nudge-email div { margin-bottom: 4px; }
.nudge-body {
    background: #0f172a; padding: 10px; border-radius: 6px;
    margin-top: 6px; font-size: 12px; color: #a6e3a1;
    white-space: pre-wrap; word-break: break-word;
}

/* Info button in extracted leads table */
.btn-info {
    background: none; border: none; cursor: pointer; font-size: 14px;
    padding: 2px 4px; border-radius: 4px; vertical-align: middle;
}
.btn-info:hover { background: #334155; }


/* Contact Card Modal */
.modal-xl { width: 780px; max-width: 95vw; max-height: 90vh; }
.contact-card-body {
    background: #f8fafc !important; color: #1a1a2e !important;
    padding: 0 !important; white-space: normal !important;
    border-radius: 0 0 12px 12px; overflow-y: auto;
    max-height: calc(90vh - 56px);
}

.cc-layout { display: flex; }

/* Left Panel */
.cc-left {
    width: 220px; min-width: 220px; background: #fff; padding: 20px 16px;
    border-right: 1px solid #e5e7eb; display: flex; flex-direction: column; align-items: center;
}
.cc-avatar-section { position: relative; margin-bottom: 8px; }
.cc-avatar {
    width: 72px; height: 72px; border-radius: 50%; background: #e5e7eb;
    display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.cc-confidence-badge {
    position: absolute; top: -4px; right: -24px;
    background: #dcfce7; color: #16a34a; font-size: 10px; font-weight: 600;
    padding: 2px 6px; border-radius: 10px; white-space: nowrap;
}
.cc-name { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-top: 6px; text-align: center; }
.cc-designation-badge {
    display: inline-block; margin-top: 4px; padding: 3px 10px;
    border: 1.5px solid #2563eb; border-radius: 14px;
    color: #2563eb; font-size: 11px; font-weight: 600;
}
.cc-divider { border: none; border-top: 1px solid #e5e7eb; width: 100%; margin: 10px 0; }
.cc-divider.dashed { border-top: 1px dashed #d1d5db; }
.cc-meta { width: 100%; }
.cc-meta-row {
    display: flex; align-items: flex-start; gap: 8px; padding: 5px 0;
    font-size: 12px; color: #374151;
}
.cc-meta-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.cc-meta-label { font-size: 10px; color: #6b7280; }

/* Right Panel */
.cc-right { flex: 1; padding: 20px; overflow-y: auto; }
.cc-section-title { font-size: 14px; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.cc-contact-row {
    display: flex; align-items: center; gap: 10px; padding: 6px 0;
    font-size: 13px; color: #374151;
}
.cc-contact-icon { font-size: 16px; width: 24px; text-align: center; }
.cc-contact-label { width: 50px; font-weight: 600; color: #374151; font-size: 12px; }
.cc-contact-value { color: #1a1a2e; font-size: 12px; word-break: break-all; }
.cc-contact-value.blue { color: #2563eb; }

/* Info Cards Grid */
.cc-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.cc-info-card {
    display: flex; align-items: flex-start; gap: 8px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px;
}
.cc-card-icon { font-size: 18px; flex-shrink: 0; }
.cc-card-icon.green { color: #16a34a; }
.cc-card-icon.blue { color: #2563eb; }
.cc-card-icon.purple { color: #7c3aed; }
.cc-card-label { font-size: 10px; color: #6b7280; font-weight: 500; }
.cc-card-text { font-size: 11px; color: #374151; }

/* Bottom rows */
.cc-bottom-rows { margin-top: 6px; }
.cc-bottom-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 6px;
    font-size: 12px;
}
.cc-bottom-row .cc-card-label { flex: 1; }

/* Footer */
.cc-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 20px; background: #eef2ff; border-top: 1px solid #e5e7eb;
    font-size: 11px; color: #4b5563;
}

/* Contact Card Header Colors */
.cc-header-green { background: #dcfce7; border-bottom-color: #86efac; }
.cc-header-red { background: #fee2e2; border-bottom-color: #fca5a5; }

/* Rejected Badge */
.cc-rejected-badge {
    margin-left: 8px; cursor: pointer; position: relative; display: inline-block;
}
.cc-rejected-badge:hover::after {
    content: 'Lead rejected due to low contactibility score';
    position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    background: #1e293b; color: #f1f5f9; font-size: 11px; padding: 6px 10px;
    border-radius: 6px; white-space: nowrap; z-index: 10;
}

/* Color helpers */
.green { color: #16a34a; }
.blue { color: #2563eb; }
.red { color: #dc2626; }
.purple { color: #7c3aed; }

/* WhatsApp & Email icon buttons in output table */
.nudge-actions { display: flex; gap: 8px; align-items: center; justify-content: center; }
.btn-nudge-icon {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e5e7eb;
    background: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer; text-decoration: none; transition: background 0.2s;
}
.btn-nudge-icon:hover { background: #f1f5f9; }

/* Nudge Popup */
.nudge-overlay { z-index: 1100; }
.nudge-overlay .modal { width: 600px; height: 520px; display: flex; flex-direction: column; }
.nudge-popup-body {
    background: #fff !important; color: #1a1a2e !important;
    padding: 20px !important; white-space: normal !important;
    flex: 1; overflow-y: auto;
}
.nudge-toggle {
    display: flex; gap: 0; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden;
}
.nudge-toggle-btn {
    padding: 6px 16px; font-size: 12px; font-weight: 600; cursor: pointer;
    border: none; background: #f9fafb; color: #6b7280; transition: all 0.2s;
}
.nudge-toggle-btn.active { background: #2563eb; color: #fff; }
.nudge-toggle-btn:hover:not(.active) { background: #f3f4f6; }
.nudge-header-right { display: flex; align-items: center; gap: 12px; }
.btn-nudge { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.btn-nudge:hover { background: #dbeafe; }
.nudge-form { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.nudge-form textarea { flex: 1; resize: none; }
.nudge-form label { font-size: 12px; font-weight: 600; color: #4b5563; }
.nudge-form input, .nudge-form textarea {
    width: 100%; padding: 10px 12px; border-radius: 6px;
    border: 1px solid #e5e7eb; background: #f9fafb; color: #1a1a2e;
    font-size: 13px; font-family: inherit;
}
.nudge-form input[readonly] { background: #f3f4f6; color: #6b7280; }
.nudge-form textarea { resize: vertical; }
.nudge-form .btn { margin-top: 8px; }
.nudge-form .btn-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
#nudgeSendStatus { font-size: 12px; color: #16a34a; }
.btn-disabled { background: #93c5fd !important; cursor: not-allowed !important; opacity: 0.7; }

/* Sending animation */
.sending-anim { color: #2563eb; font-weight: 600; font-size: 12px; }
.sending-anim .dots::after {
    content: '';
    animation: dotAnim 1.2s steps(4, end) infinite;
}
@keyframes dotAnim {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* News Detail */
.header-link { cursor: pointer; }
.header-link:hover { color: #2563eb; }
.news-detail-body {
    background: #fff !important; color: #1a1a2e !important;
    padding: 24px !important; white-space: normal !important;
}
.news-detail-header {
    font-size: 13px; font-weight: 700; color: #2563eb; margin-bottom: 6px; margin-top: 16px;
}
.news-detail-header:first-child { margin-top: 0; }
.news-detail-text {
    font-size: 14px; color: #374151; line-height: 1.6; margin-bottom: 12px;
}
