/* Members Directory Styles */

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --primary-light: #e6f0ff;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
}

/* Page Header Section */
.members-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 20px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    z-index: -1;
}

.members-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    z-index: 0;
}

.members-header-content {
    position: relative;
    z-index: 1;
}

.members-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.members-header p {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.95;
}

/* Statistics Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.filter-group input,
.filter-group select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-top: 15px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

/* Members Grid */
.members-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--dark-color);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.members-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
}

.members-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
    white-space: nowrap;
}

.members-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.members-table tbody tr:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.members-table td {
    padding: 15px;
    color: #333;
    font-size: 0.95rem;
}

.members-table .loading-row {
    text-align: center;
    padding: 40px;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-verified {
    background-color: #d4edda;
    color: #155724;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

/* Member ID / User Link */
.member-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.member-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* Action Buttons */
.action-button {
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Remove old grid styles */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Member Card */
.member-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0;
}

.member-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.member-card-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0f4ff 100%);
    padding: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.member-card-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 15px;
}

.member-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.member-id {
    font-size: 0.85rem;
    color: #666;
}

.member-card-body {
    padding: 20px;
}

.member-info-row {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.member-info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    min-width: 80px;
}

.member-info-value {
    font-size: 0.95rem;
    color: #333;
    flex: 1;
}

.member-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
}

.member-location i {
    color: var(--primary-color);
}

.member-payment-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 10px;
}

.payment-verified {
    background-color: #d4edda;
    color: #155724;
}

.payment-pending {
    background-color: #fff3cd;
    color: #856404;
}

.member-card-footer {
    padding: 15px 20px;
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-view-details {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view-details:hover {
    background-color: var(--primary-dark);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.empty-text {
    color: #666;
    font-size: 0.95rem;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination button,
.pagination a {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--dark-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination button:hover,
.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    animation: slideUp 0.3s ease;
    margin: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--dark-color);
}

.modal-body {
    padding: 30px 20px;
}

.detail-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1rem;
    color: var(--dark-color);
    font-weight: 500;
}

.modal-footer {
    padding: 15px 20px;
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.modal-footer .btn-close {
    background-color: #6c757d;
    color: white;
}

.modal-footer .btn-close:hover {
    background-color: #5a6268;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 768px) {
    .members-header h1 {
        font-size: 1.8rem;
    }

    .members-header p {
        font-size: 0.95rem;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-buttons button {
        width: 100%;
    }

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

    .modal-content {
        width: 95%;
    }

    .modal-body {
        padding: 20px;
    }

    /* Table responsive */
    .table-responsive {
        font-size: 0.85rem;
    }

    .members-table th,
    .members-table td {
        padding: 10px;
        font-size: 0.85rem;
    }

    .action-button {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .members-header {
        padding: 40px 15px;
        margin-bottom: 20px;
    }

    .members-header h1 {
        font-size: 1.5rem;
    }

    .filter-section {
        padding: 20px;
    }

    .members-section {
        padding: 20px;
    }

    /* Table responsive */
    .table-responsive {
        font-size: 0.75rem;
    }

    .members-table th,
    .members-table td {
        padding: 8px 5px;
        font-size: 0.75rem;
    }

    .members-table th {
        white-space: normal;
    }

    .action-button {
        padding: 4px 6px;
        font-size: 0.7rem;
    }

    .status-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}
