/* Pipeline Dashboard Styles */

.pipeline-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 30px;
    min-height: 100vh;
}

/* Header */
.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.pipeline-header-left {
    flex: 1;
}

.back-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
}

.pipeline-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #fff 0%, #c7c7d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pipeline-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.pipeline-stats {
    display: flex;
    gap: 30px;
}

.pipeline-stat {
    text-align: center;
}

.pipeline-stat .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-mesh);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pipeline-stat .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Pipeline Board */
.pipeline-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    min-height: calc(100vh - 200px);
}

/* Pipeline Columns */
.pipeline-column {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.column-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.column-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.column-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Column header colors */
.column-header-new {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #60a5fa;
}
.column-header-new h3 { color: #60a5fa; }

.column-header-contacted {
    background: rgba(74, 144, 164, 0.1);
    border-left: 3px solid #7CB9E8;
}
.column-header-contacted h3 { color: #7CB9E8; }

.column-header-qualified {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #fbbf24;
}
.column-header-qualified h3 { color: #fbbf24; }

.column-header-converted {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid #34d399;
}
.column-header-converted h3 { color: #34d399; }

.column-header-lost {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #f87171;
}
.column-header-lost h3 { color: #f87171; }

/* Column Content */
.column-leads {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-column {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
}

.loading-column {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
    font-style: italic;
}

/* Pipeline Cards */
.pipeline-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.pipeline-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    flex: 1;
    margin-right: 8px;
}

.card-company {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.card-title {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.card-score {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Card Status Dropdown (small version) */
.card-status-dropdown {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    appearance: none;
    -webkit-appearance: none;
}

.card-status-dropdown:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Grade badges (same as main styles) */
.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.grade-A {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}
.grade-B {
    background: linear-gradient(135deg, #7CB9E8 0%, #4A90A4 100%);
    color: white;
}
.grade-C {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}
.grade-D {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}
.grade-F {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

/* Notification */
.pipeline-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.pipeline-notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.pipeline-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.pipeline-notification.fade-out {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .pipeline-board {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .pipeline-board {
        grid-template-columns: 1fr;
    }

    .pipeline-header {
        flex-direction: column;
        gap: 20px;
    }

    .pipeline-stats {
        width: 100%;
        justify-content: center;
    }
}
