/* Cart Abandonment Dashboard - style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background-color: #f9fafb;
    color: #111827;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}





/* Header styles */
.dashboard-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    background-color: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.header-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.recovery-rate, .potential-revenue {
    text-align: center;
}

.rate-value, .revenue-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.rate-label, .revenue-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.btn-campaign {
    background-color: white;
    color: #8b5cf6;
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-campaign:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Stats section */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 2rem;
}

.stat-card {
    background-color: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-details {
    flex: 1;
}

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

.stat-label {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

/* Dashboard content layout */
.dashboard-content {
    display: flex;
    flex: 1;
    padding: 0 2rem 2rem;
    gap: 2rem;
}

/* Main content area */
.main-content {
    flex: 1;
}

.content-section {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.section-header h2 {
    color: #111827;
    font-size: 1.5rem;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f9fafb;
    padding: 0.75rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    color: #6b7280;
    font-weight: 500;
}

.btn-export {
    background-color: #f3f4f6;
    color: #111827;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.btn-export:hover {
    background-color: #e5e7eb;
}

/* Filters bar */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background-color: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid #e5e7eb;
    background-color: white;
    border-radius: 20px;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #d1d5db;
    color: #111827;
}

.filter-btn.active {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
    color: white;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem 1.2rem;
    width: 300px;
}

.search-container i {
    color: #9ca3af;
}

.search-container input {
    border: none;
    background: transparent;
    margin-left: 0.75rem;
    outline: none;
    width: 100%;
    color: #111827;
}

/* Table styles */
.table-container {
    overflow-x: auto;
}

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

.abandoned-carts-table thead {
    background-color: #f9fafb;
}

.abandoned-carts-table th {
    text-align: left;
    padding: 1.2rem 2rem;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f3f4f6;
}

.abandoned-carts-table th:first-child {
    width: 50px;
}

.abandoned-carts-table td {
    padding: 1.2rem 2rem;
    border-bottom: 1px solid #f3f4f6;
}

.abandoned-carts-table tbody tr:hover {
    background-color: #f9fafb;
}

.cart-item.high-value {
    background-color: rgba(255, 247, 237, 0.5);
}

.cart-item.recovered {
    background-color: rgba(209, 250, 229, 0.3);
}

/* Customer cell */
.customer-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.customer-cell img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.customer-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.2rem;
}

.customer-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Products cell */
.products-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-images {
    display: flex;
    align-items: center;
}

.product-images img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid white;
    margin-right: -10px;
}

.product-images img:first-child {
    margin-right: 0;
    z-index: 3;
}

.product-images img:nth-child(2) {
    z-index: 2;
}

.product-images img:nth-child(3) {
    z-index: 1;
}

.more-count {
    background-color: #e5e7eb;
    color: #6b7280;
    font-size: 0.8rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

.product-names {
    flex: 1;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Cart value */
.cart-value {
    font-weight: 700;
    color: #111827;
    font-size: 1.1rem;
}

/* Time cell */
.time-cell {
    display: flex;
    flex-direction: column;
}

.time-ago {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.2rem;
}

.exact-time {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Recovery status */
.status-tag {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.status-tag.not-attempted {
    background-color: rgba(156, 163, 175, 0.2);
    color: #6b7280;
}

.status-tag.email-sent {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-tag.recovered {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-tag.failed {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status-note {
    font-size: 0.8rem;
    color: #9ca3af;
}

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

.action-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: #f3f4f6;
}

.action-btn.send-email:hover {
    color: #3b82f6;
}

.action-btn.send-sms:hover {
    color: #8b5cf6;
}

.action-btn.view-order:hover {
    color: #10b981;
}

.action-btn.retry-email:hover {
    color: #f59e0b;
}

.action-btn.send-call:hover {
    color: #ef4444;
}

/* Table footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: #f9fafb;
    border-top: 1px solid #f3f4f6;
}

.selected-count {
    color: #6b7280;
    font-weight: 500;
}

.selected-count span {
    color: #8b5cf6;
    font-weight: 700;
}

.bulk-actions {
    display: flex;
    gap: 0.75rem;
}

.bulk-action-btn {
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.bulk-action-btn:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-btn {
    background: none;
    border: 1px solid #e5e7eb;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.page-btn:hover:not(.disabled):not(.active) {
    background-color: #f3f4f6;
}

.page-btn.active {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
    color: white;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0.5rem;
}

/* Sidebar */
.sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background-color: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.sidebar-section h3 {
    color: #111827;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
}

/* Strategy list */
.strategy-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.strategy-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #f3f4f6;
}

.strategy-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.strategy-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.strategy-details h4 {
    color: #111827;
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.strategy-details p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.strategy-stats {
    display: flex;
    gap: 1rem;
}

.strategy-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.btn-new-strategy {
    width: 100%;
    background-color: #f3f4f6;
    color: #111827;
    border: none;
    padding: 0.9rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.btn-new-strategy:hover {
    background-color: #e5e7eb;
}

/* Product ranking */
.product-ranking {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-rank {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem;
    background-color: #f9fafb;
    border-radius: 10px;
}

.rank-number {
    background-color: #8b5cf6;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.2rem;
}

.product-stats {
    font-size: 0.85rem;
    color: #6b7280;
}

.recovery-rate {
    font-weight: 700;
    color: #8b5cf6;
    font-size: 1.1rem;
}

/* Time efficiency */
.time-efficiency {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.time-slot {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-label {
    width: 80px;
    font-size: 0.9rem;
    color: #6b7280;
}

.time-bar {
    flex: 1;
    height: 8px;
    background-color: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
}

.time-percent {
    width: 40px;
    text-align: right;
    font-weight: 600;
    color: #111827;
    font-size: 0.9rem;
}

.efficiency-note {
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
    text-align: center;
}

/* Footer */
.dashboard-footer {
    background-color: #111827;
    color: #d1d5db;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Responsive design */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    .table-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .bulk-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .dashboard-content {
        padding: 0 1rem 1rem;
    }
    
    .abandoned-carts-table {
        font-size: 0.9rem;
    }
    
    .abandoned-carts-table th,
    .abandoned-carts-table td {
        padding: 1rem;
    }
    
    .customer-cell,
    .products-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .product-images img {
        width: 32px;
        height: 32px;
    }
    
    .more-count {
        width: 32px;
        height: 32px;
    }
    
    .dashboard-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}