// Incomplete Orders Section Styles - Compatible SCSS
.incomplete-orders-section {
    margin-top: 2rem;

    .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #e5e7eb;

        h2 {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #1f2937;
            font-size: 1.5rem;
            margin: 0;
        }

        .section-icon {
            color: #ef4444;
        }

        .section-tabs {
            display: flex;
            gap: 0.5rem;
        }

        .tab-button {
            padding: 0.5rem 1rem;
            border: 1px solid #d1d5db;
            background: white;
            color: #6b7280;
            border-radius: 0.375rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .tab-button:hover {
            background: #f9fafb;
            border-color: #9ca3af;
        }

        .tab-button.active {
            background: #ef4444;
            color: white;
            border-color: #ef4444;
        }
    }

    // Loading and Error States
    .incomplete-orders-loading,
    .incomplete-orders-error {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 3rem;
        text-align: center;
    }

    .loading-spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f4f6;
        border-top: 4px solid #ef4444;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-bottom: 1rem;
    }

    .error-icon {
        font-size: 3rem;
        color: #ef4444;
        margin-bottom: 1rem;
    }

    .retry-button {
        padding: 0.5rem 1rem;
        background: #ef4444;
        color: white;
        border: none;
        border-radius: 0.375rem;
        cursor: pointer;
        margin-top: 1rem;
    }

    .retry-button:hover {
        background: #dc2626;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    // Overview Tab
    .incomplete-orders-overview {
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .stat-card {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 0.5rem;
            padding: 1.5rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .stat-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .stat-icon {
            color: #ef4444;
            font-size: 1.5rem;
        }

        .stat-header h3 {
            color: #6b7280;
            font-size: 0.875rem;
            font-weight: 500;
            margin: 0;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            color: #1f2937;
            margin-bottom: 0.25rem;
        }

        .stat-subtext {
            color: #6b7280;
            font-size: 0.875rem;
        }

        .charts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
            gap: 2rem;
        }

        .chart-container {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 0.5rem;
            padding: 1.5rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .chart-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }

        .chart-header h3 {
            color: #1f2937;
            font-size: 1.125rem;
            margin: 0;
        }

        .chart-info-icon {
            color: #6b7280;
            cursor: pointer;
        }

        .chart-info-icon:hover {
            color: #374151;
        }

        .chart-content {
            height: 300px;
        }
    }

    // Orders Tab
    .incomplete-orders-list {
        .orders-header {
            margin-bottom: 1.5rem;
        }

        .orders-header h3 {
            color: #1f2937;
            font-size: 1.25rem;
            margin: 0 0 0.5rem 0;
        }

        .orders-header p {
            color: #6b7280;
            margin: 0;
        }

        .orders-table-container {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 0.5rem;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .orders-table {
            width: 100%;
            border-collapse: collapse;
        }

        .orders-table thead {
            background: #f9fafb;
        }

        .orders-table th {
            padding: 1rem;
            text-align: left;
            font-weight: 600;
            color: #374151;
            border-bottom: 1px solid #e5e7eb;
            font-size: 0.875rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .orders-table tbody tr {
            border-bottom: 1px solid #f3f4f6;
        }

        .orders-table tbody tr:hover {
            background: #f9fafb;
        }

        .orders-table td {
            padding: 1rem;
            vertical-align: top;
        }

        .customer-info strong {
            display: block;
            color: #1f2937;
            margin-bottom: 0.25rem;
        }

        .customer-email {
            color: #6b7280;
            font-size: 0.875rem;
        }

        .contact-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.25rem;
            font-size: 0.875rem;
            color: #6b7280;
        }

        .contact-icon {
            font-size: 1rem;
            color: #9ca3af;
        }

        .product-item {
            background: #f3f4f6;
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            margin-bottom: 0.25rem;
            font-size: 0.875rem;
            color: #374151;
        }

        .more-products {
            color: #6b7280;
            font-size: 0.75rem;
            font-style: italic;
        }

        .no-products {
            color: #9ca3af;
            font-style: italic;
        }

        .value-cell strong {
            color: #059669;
            font-size: 1.125rem;
        }

        .date-cell {
            color: #6b7280;
            font-size: 0.875rem;
        }

        .status-badge {
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .status-badge.incomplete {
            background: #fef2f2;
            color: #dc2626;
        }

        .status-badge.contacted {
            background: #fef3c7;
            color: #d97706;
        }

        .status-badge.completed {
            background: #d1fae5;
            color: #059669;
        }

        .action-buttons {
            display: flex;
            gap: 0.5rem;
        }

        .action-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2rem;
            height: 2rem;
            border-radius: 0.375rem;
            border: none;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
        }

        .action-btn svg {
            font-size: 1rem;
        }

        .action-btn.email-btn {
            background: #dbeafe;
            color: #2563eb;
        }

        .action-btn.email-btn:hover {
            background: #bfdbfe;
        }

        .action-btn.contact-btn {
            background: #d1fae5;
            color: #059669;
        }

        .action-btn.contact-btn:hover {
            background: #a7f3d0;
        }

        .no-data {
            text-align: center;
            color: #9ca3af;
            font-style: italic;
            padding: 3rem;
        }
    }

    // Products Tab
    .abandoned-products-section {
        .products-header {
            margin-bottom: 1.5rem;
        }

        .products-header h3 {
            color: #1f2937;
            font-size: 1.25rem;
            margin: 0 0 0.5rem 0;
        }

        .products-header p {
            color: #6b7280;
            margin: 0;
        }

        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
        }

        .abandoned-product-card {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 0.5rem;
            padding: 1.5rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            position: relative;
        }

        .product-rank {
            position: absolute;
            top: -0.5rem;
            right: -0.5rem;
            background: #ef4444;
            color: white;
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.875rem;
        }

        .product-info {
            margin-bottom: 1rem;
        }

        .product-name {
            color: #1f2937;
            font-size: 1.125rem;
            margin: 0 0 1rem 0;
            line-height: 1.4;
        }

        .stat {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }

        .stat-label {
            color: #6b7280;
            font-size: 0.875rem;
        }

        .stat-value {
            color: #1f2937;
            font-weight: 600;
        }

        .edit-product-btn {
            display: inline-block;
            padding: 0.5rem 1rem;
            background: #f3f4f6;
            color: #374151;
            text-decoration: none;
            border-radius: 0.375rem;
            font-size: 0.875rem;
            transition: all 0.2s;
        }

        .edit-product-btn:hover {
            background: #e5e7eb;
            color: #1f2937;
        }

        .no-abandoned-products {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem;
            text-align: center;
            grid-column: 1 / -1;
        }

        .no-data-icon {
            font-size: 3rem;
            color: #d1d5db;
            margin-bottom: 1rem;
        }

        .no-abandoned-products h4 {
            color: #6b7280;
            margin: 0 0 0.5rem 0;
        }

        .no-abandoned-products p {
            color: #9ca3af;
            margin: 0;
        }
    }
}

// Responsive Design
@media (max-width: 768px) {
    .incomplete-orders-section {
        .section-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 1rem;
        }

        .section-tabs {
            width: 100%;
        }

        .tab-button {
            flex: 1;
            text-align: center;
        }

        .incomplete-orders-overview .stats-grid {
            grid-template-columns: 1fr;
        }

        .incomplete-orders-overview .charts-grid {
            grid-template-columns: 1fr;
        }

        .chart-content {
            height: 250px;
        }

        .orders-table-container {
            overflow-x: auto;
        }

        .orders-table {
            min-width: 800px;
        }

        .abandoned-products-section .products-grid {
            grid-template-columns: 1fr;
        }
    }
}