/* Customers Page Styles */

/* Stats Cards */
.customer-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--admin-text-light);
}

/* Filters */
.customer-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.filter-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-row .search-box {
    flex: 1;
    min-width: 300px;
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: var(--admin-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--admin-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
}

/* Customers Table */
.customers-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
}

.customers-table thead {
    background: var(--admin-bg-light);
    border-bottom: 1px solid var(--admin-border);
}

.customers-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customers-table tbody tr {
    border-bottom: 1px solid var(--admin-border);
    transition: background 0.2s ease;
}

.customers-table tbody tr:hover {
    background: var(--admin-bg-light);
}

.customers-table tbody tr:last-child {
    border-bottom: none;
}

.customers-table td {
    padding: 20px;
    font-size: 14px;
    color: var(--admin-text);
}

.checkbox-column {
    width: 40px;
}

/* Customer Info */
.customer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--admin-bg-light);
    color: var(--admin-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.customer-details {
    flex: 1;
}

.customer-name {
    font-weight: 500;
    color: var(--admin-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.customer-name:hover {
    color: var(--admin-primary);
}

.customer-since {
    font-size: 12px;
    color: var(--admin-text-light);
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-email {
    color: var(--admin-text);
}

.contact-phone {
    font-size: 13px;
    color: var(--admin-text-light);
}

/* Status Tags */
.customer-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.customer-status.active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.customer-status.inactive {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.customer-status.vip {
    background: rgba(255, 193, 7, 0.1);
    color: #f39c12;
}

/* Customer Actions */
.customer-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    background: none;
    border: 1px solid var(--admin-border);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--admin-text);
}

.btn-action:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 0 0 12px 12px;
    margin-top: -1px;
    border-top: 1px solid var(--admin-border);
}

.showing-info {
    font-size: 14px;
    color: var(--admin-text-light);
}

/* Loading State */
.loading-cell {
    text-align: center;
    padding: 60px 20px !important;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--admin-text-light);
}

.loading-state i {
    font-size: 48px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--admin-text-light);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0 0 8px 0;
}

.empty-state p {
    margin: 0 0 24px 0;
    font-size: 16px;
}

/* Customer Detail Page */
.customer-header {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
}

.customer-header-content {
    display: flex;
    align-items: center;
    gap: 32px;
}

.customer-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--admin-bg-light);
    color: var(--admin-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 48px;
}

.customer-header-info {
    flex: 1;
}

.customer-header-name {
    font-size: 32px;
    font-weight: 700;
    color: var(--admin-text);
    margin-bottom: 8px;
}

.customer-header-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.customer-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--admin-text-light);
}

.customer-meta-item i {
    color: var(--admin-primary);
}

.customer-tags {
    display: flex;
    gap: 8px;
}

.customer-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 107, 74, 0.1);
    color: var(--admin-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Customer Stats Grid */
.customer-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.customer-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.customer-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
    margin-bottom: 8px;
}

.customer-stat-label {
    font-size: 14px;
    color: var(--admin-text-light);
}

/* Responsive */
@media (max-width: 1200px) {
    .customer-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .customer-stats {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-row .search-box {
        min-width: auto;
    }
    
    .filter-group {
        flex-wrap: wrap;
    }
    
    .customers-table-container {
        overflow-x: auto;
    }
    
    .customers-table {
        min-width: 800px;
    }
    
    .table-footer {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
    .customer-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .customer-header-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .customer-tags {
        justify-content: center;
    }
}