/* Customers Page - Minimal & Professional */

.customers-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Page Header */
.page-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.page-header-modern .header-content h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 0.9375rem;
    color: #6B7280;
    margin: 0;
    font-weight: 400;
}

/* Stats Cards */
.customers-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: #D1D5DB;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #7B1FA2;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.8125rem;
    color: #6B7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Search and Filter Bar */
.customers-filter-bar {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 0.875rem;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #7B1FA2;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

.search-input::placeholder {
    color: #9CA3AF;
}

.filter-select {
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.filter-select:focus {
    outline: none;
    border-color: #7B1FA2;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

/* Table Container */
.customers-table-container {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
}

.table-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.table-count {
    font-size: 0.875rem;
    color: #6B7280;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
}

.customers-table thead {
    background: #F9FAFB;
}

.customers-table th {
    padding: 0.875rem 1.5rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #E5E7EB;
    white-space: nowrap;
}

.customers-table tbody tr {
    border-bottom: 1px solid #F3F4F6;
    transition: background-color 0.2s;
}

.customers-table tbody tr:hover {
    background: #F9FAFB;
}

.customers-table tbody tr:last-child {
    border-bottom: none;
}

.customers-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #374151;
}

.customer-name {
    font-weight: 500;
    color: #111827;
}

.no-name {
    color: #9CA3AF;
    font-style: italic;
}

.text-muted {
    color: #9CA3AF;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-active {
    background: #DCFCE7;
    color: #15803D;
}

.status-inactive {
    background: #FEE2E2;
    color: #991B1B;
}

/* Delete Button */
.btn-delete-customer {
    background: transparent;
    border: none;
    color: #DC2626;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-delete-customer:hover {
    background: #FEE2E2;
    color: #991B1B;
}

.btn-delete-customer i {
    font-size: 0.875rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #F3F4F6;
    border-radius: 8px;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #E5E7EB;
    color: #111827;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    font-size: 0.9375rem;
    color: #374151;
    margin: 0 0 1rem 0;
}

.alert-warning {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    color: #92400E;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-warning i {
    font-size: 1.25rem;
}

.customer-delete-info {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.customer-delete-info p {
    font-size: 0.875rem;
    color: #374151;
    margin: 0.5rem 0;
}

.modal-actions {
    padding: 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-secondary {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.btn-danger {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: #DC2626;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: #B91C1C;
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    font-size: 0.9375rem;
    color: #6B7280;
    margin: 0;
}

/* Loading State */
.loading-spinner {
    text-align: center;
    padding: 4rem;
    font-size: 1rem;
    color: #6B7280;
}

/* Responsive */
@media (max-width: 768px) {
    .customers-page {
        padding: 1rem;
    }

    .customers-stats {
        grid-template-columns: 1fr;
    }

    .customers-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input-wrapper {
        min-width: 100%;
    }

    .table-responsive {
        overflow-x: scroll;
    }

    .customers-table {
        min-width: 800px;
    }
}
