* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    background-attachment: fixed;
}

/* Header Styles */
.header {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.header-subtitle {
    color: #718096;
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

.icon {
    width: 32px;
    height: 32px;
    color: #667eea;
    stroke-width: 2;
}

.icon-sm {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.icon-lg {
    width: 40px;
    height: 40px;
    color: white;
    stroke-width: 2;
}

/* Buttons */
.btn-admin {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-admin:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Filter Card */
.filter-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.form-select, .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-select:focus, .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Members Grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.member-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.member-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.member-card-header {
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.member-card-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    background: white;
}

.member-card-body {
    padding: 4rem 1.5rem 1.5rem;
    text-align: center;
}

.member-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.75rem;
}

.member-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.member-programs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge-program {
    background: #edf2f7;
    color: #667eea;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-status.active {
    background: #c6f6d5;
    color: #22543d;
}

.badge-status.inactive {
    background: #fed7d7;
    color: #742a2a;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.modal-content.modal-lg {
    max-width: 700px;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
}

.btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-close:hover {
    background: #f7fafc;
    transform: rotate(90deg);
}

/* Member Detail Modal */
.member-detail-header {
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    border-radius: 20px 20px 0 0;
    margin: -2rem -2rem 0;
}

.member-detail-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid white;
    position: absolute;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    background: white;
}

.member-detail-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid white;
    position: absolute;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Fix image not loading */
.member-card-photo, .member-detail-photo {
    background-color: #f7fafc;
}

.member-card-photo img, .member-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-detail-body {
    padding-top: 5rem;
}

.detail-name {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    margin-bottom: 0.5rem;
}

.detail-status-center {
    text-align: center;
    margin-bottom: 2rem;
}

.detail-name {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    margin-bottom: 1rem;
}

.detail-section {
    background: #f7fafc;
    border-radius: 15px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #718096;
    margin-bottom: 0.5rem;
}

.detail-value {
    color: #1a202c;
    font-size: 1rem;
}

.detail-programs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge-program-large {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Admin Dashboard */
.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.admin-form {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.admin-table {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.table {
    margin: 0;
}

.table thead {
    background: #667eea;
    color: white;
}

.table thead th {
    padding: 1rem;
    font-weight: 600;
    border: none;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:nth-child(even) {
    background: #f7fafc;
}

.btn-action {
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background: #4299e1;
    color: white;
    margin-right: 0.5rem;
}

.btn-edit:hover {
    background: #3182ce;
}

.btn-delete {
    background: #f56565;
    color: white;
}

.btn-delete:hover {
    background: #e53e3e;
}

/* Statistics Cards */
.stat-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 35px;
    height: 35px;
    color: white;
    stroke-width: 2;
}

.stat-icon.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.active {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.stat-icon.inactive {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.stat-icon.districts {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    line-height: 1;
}

.stat-content p {
    font-size: 0.95rem;
    color: #718096;
    margin: 0.5rem 0 0 0;
    font-weight: 600;
}

/* Responsive Stats */
@media (max-width: 576px) {
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
    }
    
    .stat-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .stat-content h3 {
        font-size: 2rem;
    }
    
    .stat-content p {
        font-size: 0.85rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.25rem;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .admin-table {
        overflow-x: auto;
    }
}

/* Loading and Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.member-card {
    animation: fadeIn 0.5s ease;
}