.page-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 24px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.stat-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-primary .stat-icon {
    background: #3b82f6;
}

.stat-success .stat-icon {
    background: #10b981;
}

.stat-info .stat-icon {
    background: #8b5cf6;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

.pipeline-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pipeline-column {
    background: #f8fafc;
    border-radius: 8px;
    min-height: 600px;
}

.pipeline-header {
    padding: 16px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pipeline-open {
    background: #dbeafe;
    color: #1e40af;
}

.pipeline-won {
    background: #dcfce7;
    color: #166534;
}

.pipeline-lost {
    background: #fee2e2;
    color: #991b1b;
}

.pipeline-title {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pipeline-count {
    font-weight: 700;
    font-size: 20px;
}

.pipeline-cards {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deal-card {
    background: white;
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.deal-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.deal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.deal-amount {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deal-attachment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.deal-attachment-badge i {
    font-size: 11px;
}

.deal-stage-select {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #e1e8ef;
    border-radius: 4px;
    background: white;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.deal-stage-select:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.deal-stage-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.deal-stage-select option[value="Open"] {
    color: #3b82f6;
}

.deal-stage-select option[value="Won"] {
    color: #10b981;
}

.deal-stage-select option[value="Lost"] {
    color: #ef4444;
}

.deal-company {
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.deal-contact {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.deal-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
}

.deal-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e1e8ef;
}

/* ===== Drag-and-drop pipeline (cards move between swim lanes) ===== */
.deal-card {
    cursor: grab;
    user-select: none;
}
.deal-card:active {
    cursor: grabbing;
}
.deal-card.dragging {
    opacity: 0.5;
}

/* Lanes are drop targets; keep empty lanes tall enough to drop onto. */
.pipeline-cards {
    min-height: 80px;
}
.pipeline-cards.drag-over {
    background: #eff6ff;
    outline: 2px dashed #3b82f6;
    outline-offset: -6px;
    border-radius: 8px;
}

.pipeline-empty {
    text-align: center;
    color: #94a3b8;
    padding: 24px;
    font-size: 13px;
}

/* "Show older lost deals" toggle */
.lost-toggle {
    width: 100%;
    margin-top: 4px;
    padding: 8px;
    background: transparent;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}
.lost-toggle:hover {
    border-color: #94a3b8;
    color: #475569;
    background: #f8fafc;
}
