/* Past History Page Styles */

.past-history-section {
    background: #f8f9fa;
    min-height: 60vh;
}

.section-title {
    color: #2c3e50;
    font-weight: 700;
    font-size: 2rem;
}

/* Lead Card Styles */
.lead-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.lead-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.lead-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.lead-info {
    flex: 1;
}

.lead-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.lead-id {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.lead-status {
    display: flex;
    align-items: center;
}

/* Status Badge Styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Status Colors */
.status-raised {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.status-in-progress {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.status-completed {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.status-cancelled {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.status-on-hold {
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
    color: #333;
}

.status-on-review {
    background: linear-gradient(135deg, #fddb92 0%, #d1fdff 100%);
    color: #333;
}

.status-on-approval {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    color: #333;
}

.status-on-payment {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.status-on-delivery {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #333;
}

.status-on-installation {
    background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 100%);
    color: #333;
}

.status-default {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    color: #333;
}

/* Lead Card Body */
.lead-card-body {
    padding: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.detail-item:hover {
    background: #e9ecef;
}

.detail-item i {
    font-size: 1.25rem;
    margin-top: 0.2rem;
}

.detail-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.detail-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.detail-value {
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Lead Rating */
.lead-rating {
    padding: 0.75rem;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.lead-rating i {
    font-size: 1.1rem;
}

/* Lead Feedback */
.lead-feedback {
    padding: 0.75rem;
    background: #d1ecf1;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

/* Download Invoice Button */
.btn-download-invoice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-download-invoice:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-download-invoice:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-download-invoice i {
    font-size: 1.2rem;
}

/* Empty State */
.empty-state {
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem;
}

.empty-state i {
    opacity: 0.3;
}

.empty-state h4 {
    color: #2c3e50;
    font-weight: 600;
}

/* Pagination Styles */
.pagination {
    margin-top: 2rem;
}

.page-item .page-link {
    color: #667eea;
    border: 1px solid #dee2e6;
    margin: 0 0.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.page-item .page-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.page-item.disabled .page-link {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Breadcrumb Styles */
.breadcrumb {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #764ba2;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }

    .lead-card-header {
        flex-direction: column;
        gap: 1rem;
    }

    .lead-status {
        width: 100%;
        justify-content: flex-start;
    }

    .lead-title {
        font-size: 1.1rem;
    }

    .status-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .detail-item {
        padding: 0.5rem;
    }

    .detail-label {
        font-size: 0.75rem;
    }

    .detail-value {
        font-size: 0.875rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state i {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {
    .lead-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    .lead-card-header {
        background: #f8f9fa !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .status-badge {
        border: 1px solid #000;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .pagination {
        display: none;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lead-card {
    animation: fadeInUp 0.5s ease;
}

