* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background-color: #2c3e50;
    color: white;
    border-radius: 8px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.section {
    background-color: white;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hidden {
    display: none;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    height: 100px;
    resize: vertical;
}

button {
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-membership-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-section-half {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    width: 50%;
    flex: 1;
}

.membership-payment-section-half {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    width: 50%;
    flex: 1;
}

.profile-section-full {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
}

.membership-payment-section,
.pending-payments-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 20px;
}

.payment-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

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

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

.payment-status.rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.payment-item {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 4px solid #3498db;
}

.payment-item h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.payment-item p {
    margin: 4px 0;
    color: #666;
}

.payment-actions {
    margin-top: 15px;
}

.payment-actions button {
    margin-right: 10px;
    padding: 6px 12px;
    font-size: 14px;
}

.approve-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.approve-btn:hover {
    background-color: #219a52;
}

.reject-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.reject-btn:hover {
    background-color: #c0392b;
}

.view-proof-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.view-proof-btn:hover {
    background-color: #2980b9;
}

.admin-notes {
    margin-top: 10px;
}

.admin-notes textarea {
    width: 100%;
    height: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.members-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
}

.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.members-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

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

.delete-btn.hidden {
    display: none;
}

.download-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #219a52;
}

/* Members Table Styles */
.members-table-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.members-table th,
.members-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.members-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
}

.members-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.members-table th.sortable:hover {
    background-color: #e9ecef;
}

.sort-icon {
    margin-left: 5px;
    color: #999;
    font-size: 12px;
}

.members-table th.sortable.sort-asc .sort-icon {
    color: #3498db;
}

.members-table th.sortable.sort-desc .sort-icon {
    color: #3498db;
}

.members-table th.sortable.sort-asc .sort-icon::after {
    content: '↑';
}

.members-table th.sortable.sort-desc .sort-icon::after {
    content: '↓';
}

.members-table th.sortable.sort-asc .sort-icon,
.members-table th.sortable.sort-desc .sort-icon {
    font-weight: bold;
}

.members-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.members-table tbody tr:hover {
    background-color: #f8f9fa;
}

.members-table tbody tr.selected {
    background-color: #e3f2fd;
}

.members-table th:first-child,
.members-table td:first-child {
    width: 40px;
    text-align: center;
}

.member-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

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

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination-controls button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pagination-controls button:hover:not(:disabled) {
    background-color: #f8f9fa;
}

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

.page-number {
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.page-number:hover {
    background-color: #f8f9fa;
}

.page-number.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.profile-info {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.profile-info p {
    margin-bottom: 8px;
}

.profile-info strong {
    color: #2c3e50;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.success-message {
    background-color: #27ae60;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Modal Overlay Styles */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    width: 100vw !important;
    height: 100vh !important;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-overlay:not(.hidden) {
    display: flex !important;
}

/* Loading Modal */
#loadingModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    width: 100vw !important;
    height: 100vh !important;
}

#loadingModal.hidden {
    display: none !important;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 30px 40px 20px;
    border-bottom: 1px solid #eee;
    position: relative;
    flex-shrink: 0;
}

.modal-content-inner {
    padding: 20px 40px 40px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-content form {
    text-align: left;
}

.modal-content input[readonly] {
    background-color: #f8f9fa !important;
    color: #666 !important;
    cursor: not-allowed;
}

.modal-content label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-content input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
    background-color: #f8f9fa;
    border-radius: 50%;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.modal-content p {
    color: #666;
    line-height: 1.6;
}

/* Profile buttons styling */
.profile-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

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

/* Delete account modal styling */
.delete-warning-list {
    text-align: left;
    margin: 15px 0;
}

.delete-warning-list ul {
    margin: 0;
    padding-left: 20px;
}

.delete-warning-list li {
    margin: 8px 0;
    color: #666;
}

/* Error Page Styles */
.error-page {
    text-align: center;
    padding: 40px 20px;
}

.error-page .icon {
    font-size: 4em;
    margin: 20px 0;
}

.error-page h2 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 2em;
}

.error-reasons {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.error-reasons ul {
    margin: 0;
    padding-left: 20px;
}

.error-reasons li {
    margin: 10px 0;
    color: #666;
}

.actions {
    margin: 30px 0;
}

.actions .button {
    display: inline-block;
    margin: 0 10px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.actions .button.secondary {
    background-color: #95a5a6;
    color: white;
}

.actions .button.secondary:hover {
    background-color: #7f8c8d;
}

.help-text {
    margin-top: 30px;
    padding: 20px;
    background-color: #ecf0f1;
    border-radius: 8px;
}

.help-text p {
    margin: 0;
    color: #666;
}

/* Membership Status Styles */
.membership-active {
    color: #27ae60;
    font-weight: bold;
}

.membership-expired {
    color: #e74c3c;
    font-weight: bold;
}

.membership-none {
    color: #95a5a6;
    font-style: italic;
}

/* User Role Styles */
.role-admin {
    color: #e74c3c;
    font-weight: bold;
    text-transform: uppercase;
}

.role-board {
    color: #f39c12;
    font-weight: bold;
    text-transform: uppercase;
}

.role-member {
    color: #27ae60;
    font-weight: normal;
    text-transform: uppercase;
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge { 
    visibility: hidden !important;
}

/* reCAPTCHA disclosure text */
.recaptcha-text {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
    line-height: 1.4;
}

.recaptcha-text a {
    color: #3498db;
    text-decoration: none;
}

.recaptcha-text a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .profile-membership-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .profile-section-half,
    .membership-payment-section-half {
        width: 100%;
    }
    
    .members-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .members-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .members-table-container {
        overflow-x: auto;
    }
    
    .members-table {
        min-width: 600px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
}