/**
 * Customer Management Styles
 * สไตล์สำหรับหน้าจัดการลูกค้า
 */

/* Statistics Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

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

/* Gradient backgrounds removed for consistent card styling across all admin pages */

/* Customer Avatar */
.customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bs-secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Type Badges */
.type-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.type-employer {
    background-color: #e3f2fd;
    color: #1565c0;
}

.type-agent {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Credit Display */
.credit-amount {
    font-weight: 600;
    color: #2c3e50;
}

.credit-positive {
    color: #27ae60;
}

.credit-zero {
    color: #95a5a6;
}

/* Action Buttons */
.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    transition: all 0.2s ease;
}

.btn-view {
    background-color: #e3f2fd;
    color: #1976d2;
}

.btn-view:hover {
    background-color: #1976d2;
    color: white;
}

.btn-edit {
    background-color: #fff3e0;
    color: #f57c00;
}

.btn-edit:hover {
    background-color: #f57c00;
    color: white;
}

.btn-delete {
    background-color: #ffebee;
    color: #d32f2f;
}

.btn-delete:hover {
    background-color: #d32f2f;
    color: white;
}

/* Table Enhancements */
.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 12px 8px;
}

.table td {
    vertical-align: middle;
    padding: 12px 8px;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0,0,0,0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* Card Header */
.card-header {
    background-color: var(--bs-light);
    border-bottom: 1px solid #dee2e6;
}

/* Filters */
.bg-light {
    background-color: #f8f9fa !important;
}

/* Loading Spinner */
#loadingSpinner {
    background-color: rgba(255,255,255,0.9);
}

/* Pagination */
.pagination-info {
    font-size: 14px;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #495057;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        font-size: 14px;
    }
    
    .action-btn {
        width: 28px;
        height: 28px;
    }
    
    .customer-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Customer Detail Modal */
.customer-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.customer-detail-item:last-child {
    border-bottom: none;
}

.customer-detail-label {
    font-weight: 600;
    color: #495057;
    min-width: 120px;
}

.customer-detail-value {
    color: #212529;
    text-align: right;
}

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

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}
