:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

/* =================== UTILITY CLASSES =================== */
/* Reusable components to reduce CSS duplication */

/* Card Base - Used by event-card, members-list, participants-list, etc. */
.card-base {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-base:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Button Base - Standardized button styling */
.btn-base {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Flexbox Utilities */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Spacing Utilities */
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 1.5rem; }

/* =================== END UTILITY CLASSES =================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.navbar {
    background-color: white;
    padding: 0.3rem 1rem;
    min-height: 70px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Structure simple : conteneur + deux blocs */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-image {
    display: flex;
    align-items: center;
}

.logo-image img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.username-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
    line-height: 1;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

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

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #357abd;
}

/* Auth Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* Form group styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Button styles */
button {
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

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

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

/* Full width buttons for forms */
.auth-form button,
.form-actions button {
    width: 100%;
}

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

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

/* Form links */
.form-links {
    margin-top: 1rem;
    text-align: center;
}

.form-links a {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Message styles */
.error-message {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    border-left: 4px solid #dc2626;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

.success-message {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #16a34a;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    border-left: 4px solid #16a34a;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.1);
}

/* Verification message styles */
.verification-message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #64748b;
}

.verification-message p {
    margin-bottom: 0.5rem;
}

.verification-message p:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-form {
        padding: 1.5rem;
    }
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: white;
    margin-top: auto;
}

/* Membres Styles */
.membres-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.membres-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.membres-actions {
    display: flex;
    gap: 1rem;
}

.members-controls {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    margin-bottom: 1rem;
}

.search-container {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.sort-buttons {
    display: flex;
    gap: 0.3rem;
}

.separator {
    height: 1px;
    background-color: #ddd;
    margin: 1rem 0;
}

.action-button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.action-button:hover {
    background-color: #357abd;
}

.membres-table-container {
    overflow-x: auto;
}

.membres-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.membres-table th,
.membres-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.membres-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

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

.view-button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.view-button:hover {
    background-color: #357abd;
}

.delete-button {
    background-color: #dc3545;
    color: white;
}

.delete-button:hover {
    background-color: #c82333;
}

/* Styles pour la page de détails du membre */
.membre-detail-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.membre-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.back-button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #357abd;
}

.membre-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-group {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.info-group h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.info-row {
    display: flex;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    min-width: 200px;
    color: var(--text-color);
}

.info-value {
    color: #666;
    flex: 1;
}

/* Styles pour la page des avatars */
.avatars-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.avatars-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.avatars-actions {
    display: flex;
    gap: 1rem;
}

.avatars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.avatar-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.avatar-image {
    text-align: center;
}

.avatar-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
}

.avatar-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row label {
    font-weight: bold;
    min-width: 150px;
    color: #666;
}

.info-row span {
    flex: 1;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.avatar-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.delete-button {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-button:hover {
    background-color: #cc0000;
}

.text-center {
    text-align: center;
    grid-column: 1 / -1;
    padding: 20px;
    color: #666;
}

/* Styles pour l'avatar dans la page de détails */
.avatar-group {
    text-align: center;
}

.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.member-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: opacity 0.3s ease;
}

.member-avatar.loading {
    opacity: 0.5;
    position: relative;
}

.member-avatar.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.avatar-actions {
    display: flex;
    gap: 1rem;
}

.member-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0.3rem 0.5rem;
        min-height: 60px;
    }

    .nav-links a {
        margin-left: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .container {
        padding: 1rem;
    }

    .membres-header {
        flex-direction: column;
        gap: 1rem;
    }

    .membres-actions {
        width: 100%;
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .action-button {
        min-width: 120px;
        flex: 1;
    }

    .membre-detail-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .membre-info-grid {
        grid-template-columns: 1fr;
    }

    .info-row {
        flex-direction: column;
    }

    .info-label {
        min-width: auto;
        margin-bottom: 0.25rem;
    }

    .avatars-header {
        flex-direction: column;
        gap: 1rem;
    }

    .avatars-actions {
        width: 100%;
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .action-button {
        min-width: 120px;
        flex: 1;
    }

    .avatars-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .member-avatar {
        width: 150px;
        height: 150px;
    }

    .avatar-actions {
        flex-direction: column;
        width: 100%;
    }

    .avatar-actions .action-button {
        min-width: 120px;
        flex: 1;
    }

    .member-title {
        font-size: 2rem;
    }

    .members-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .members-controls {
        width: 100%;
    }

    .sort-buttons {
        width: 100%;
        flex-wrap: wrap;
    }

    .sort-button {
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
}




/* Styles pour les événements */
.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.event-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.event-content {
    flex: 1;
    margin-right: 1.5rem;
}

.event-field {
    margin-bottom: 1rem;
}

.event-text {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
}

.edit-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.event-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Event Participants Section */
.event-participants-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.members-list, 
.participants-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.members-list h3, 
.participants-list h3 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.members-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-container {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.sort-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sort-button, 
.sort-button-participants {
    padding: 0.6rem 1rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-button:hover, 
.sort-button-participants:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.sort-button.active, 
.sort-button-participants.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sort-button i, 
.sort-button-participants i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.sort-button.active i, 
.sort-button-participants.active i {
    color: white;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

/* Participant and Member Cards */
.participant-card,
.member-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.participant-info,
.member-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.participant-avatar,
.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.participant-info span,
.member-info span {
    font-size: 0.9rem;
    color: #333;
}

.action-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.add-button {
    background-color: #4CAF50;
    color: white;
}

.remove-button {
    background-color: #f44336;
    color: white;
}

.add-button:hover {
    background-color: #45a049;
}

.remove-button:hover {
    background-color: #da190b;
}

/* Responsive Design */
@media (max-width: 767px) {
    .event-participants-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .event-header {
        flex-direction: column;
    }

    .event-content {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .event-actions {
        width: 100%;
    }

    .action-button {
        flex: 1;
    }

    .members-grid {
        grid-template-columns: 1fr;
    }

    .sort-buttons {
        flex-wrap: wrap;
    }

    .sort-button,
    .sort-button-participants {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Standaard verborgen */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.action-button.primary {
    background-color: #28a745;
}

.action-button.primary:hover {
    background-color: #218838;
}

/* Avatar styles */
.participant-avatar,
.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
}

.participant-avatar img,
.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.participant-info,
.member-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.participant-details,
.member-details {
    flex: 1;
    min-width: 0;
}

.participant-name,
.member-name {
    margin: 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-lifrasid,
.member-lifrasid {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-card,
.member-card {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.participant-card:hover,
.member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.participant-actions,
.member-actions {
    margin-left: 10px;
}

.action-button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: #007bff;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.action-button:hover {
    background: #0056b3;
}

/* Circular buttons for event detail page */
.remove-participant,
.add-participant {
    padding: 0.5rem !important;
    font-size: 1.2rem !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    max-width: 40px !important;
    border: 2px solid !important;
}

.remove-participant {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.remove-participant:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
    transform: scale(1.1);
}

.add-participant {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.add-participant:hover {
    background: #218838 !important;
    border-color: #218838 !important;
    transform: scale(1.1);
}

/* Make event description match section titles */
#eventDescription, .event-text#eventDescription {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

/* Gray out past event cards */
.past-event {
    background-color: #e0e0e0 !important;
    color: #888 !important;
    opacity: 0.7;
    filter: grayscale(0.3);
}

.grayed-out {
    background-color: #bdbdbd !important;
    color: #f5f5f5 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
}

/* User Management Delete Button Styles */
.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    transition: all 0.2s ease-in-out;
}

.btn-danger:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-danger:active {
    background-color: #a71e2a !important;
    border-color: #a71e2a !important;
    transform: translateY(0);
}

.btn-danger i {
    margin-right: 6px;
    color: white !important;
}

/* User management action buttons container */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.action-buttons .btn {
    padding: 6px 12px;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease-in-out;
    min-width: 80px;
    justify-content: center;
}

.action-buttons .btn i {
    margin-right: 4px;
    font-size: 12px;
}

/* Edit button */
.btn-edit {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-edit:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

/* Suspend button */
.btn-suspend {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-suspend:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

/* Approve/Activate button */
.btn-approve {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-approve:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

/* Firebase Auth User Management Styles */
.needs-firestore {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107;
}

.needs-firestore:hover {
    background-color: #fff1b3 !important;
}

.warning-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 16px;
    color: #ff6b35;
    cursor: help;
}

.verified-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    color: #28a745;
}

.unverified-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    color: #dc3545;
}

.source-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    cursor: help;
}

.btn-create-profile {
    background-color: #17a2b8;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    margin-right: 4px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-create-profile:hover {
    background-color: #138496;
    transform: translateY(-1px);
}

.btn-create-profile i {
    margin-right: 4px;
}

/* Enhanced user table styling */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-table th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.user-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

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

/* Status indicator improvements */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active {
    background-color: #28a745;
}

.status-dot.pending {
    background-color: #ffc107;
}

.status-dot.suspended {
    background-color: #dc3545;
}

.status-dot.missing-profile {
    background-color: #ff6b35;
}

/* Firebase Auth indicator */
.firebase-auth-indicator {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 8px;
}

/* Tooltips for badges */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(2px);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #333;
    z-index: 1000;
}

/* Alert styling for missing profiles */
.missing-profile-alert {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.missing-profile-alert i {
    color: #f39c12;
    font-size: 20px;
}

.missing-profile-alert .alert-content h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.missing-profile-alert .alert-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Action button improvements */
.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    font-size: 12px;
    padding: 4px 8px;
    min-width: auto;
    white-space: nowrap;
}

/* Statistics cards enhancement */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}

.stat-card.pending::before {
    background: #ffc107;
}

.stat-card.active::before {
    background: #28a745;
}

.stat-card.suspended::before {
    background: #dc3545;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    color: #6c757d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =================== IPAD OPTIMIZATIONS =================== */
/* Touch-friendly interface optimizations for iPad Safari */

/* iPad Detection Media Query */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait),
       (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    
    /* Enhanced Touch Targets - Minimum 44px */
    .btn-base,
    button,
    .nav-links a,
    .sort-button,
    .action-button {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    /* iPad Event Participants Layout - Force side-by-side */
    .event-participants-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    /* iPad Member and Participant Cards Touch Optimization */
    .members-list, 
    .participants-list {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .participant-card, 
    .member-card {
        padding: 1.2rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    .remove-participant, 
    .add-participant {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.3rem;
    }
    
    /* Navigation Touch Optimization */
    .navbar {
        min-height: 80px;
        padding: 0.5rem 1rem;
    }
    
    .nav-links a {
        padding: 12px 20px;
        margin: 0 4px;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }
    
    .nav-links a:hover,
    .nav-links a:active {
        background-color: rgba(74, 144, 226, 0.1);
    }
    
    /* Form Input Touch Optimization */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    /* Table Touch Optimization */
    table th,
    table td {
        padding: 12px 16px;
        min-height: 44px;
    }
    
    /* Action buttons in tables */
    .action-buttons button {
        min-height: 40px;
        min-width: 80px;
        margin: 2px;
    }
    
    /* Search and filter inputs */
    #searchInput {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    /* Modal and dialog optimization */
    .modal {
        padding: 20px;
    }
    
    .modal-content {
        border-radius: 12px;
        max-width: 90vw;
    }
}

/* iPad Landscape Specific */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    .dashboard-container {
        max-width: 95%;
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

/* iPad Portrait Specific */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Stack navigation on portrait */
    .navbar {
        flex-direction: column;
        min-height: auto;
        padding: 1rem;
    }
    
    .nav-links {
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }
}

/* Touch Interaction Enhancements */
@media (pointer: coarse) {
    /* Larger touch targets for all touch devices */
    button,
    .btn-base,
    a[role="button"],
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improve scroll behavior */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Remove hover effects on touch devices */
    .card-base:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    /* Touch-friendly spacing */
    .members-list .member-item,
    .events-list .event-item {
        margin-bottom: 12px;
        padding: 16px;
    }
}

/* Touch Feedback Styles */
.touch-active {
    opacity: 0.7;
    transform: scale(0.98);
    transition: all 0.1s ease;
}

/* Virtual Keyboard Visible State */
.keyboard-visible {
    /* Prevent zooming when keyboard appears */
    zoom: 1;
}

.keyboard-visible .navbar {
    /* Reduce navbar height when keyboard is visible */
    min-height: 60px;
}

/* iPad Device Specific Styles */
.ipad-device {
    /* Optimize for iPad */
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(74, 144, 226, 0.3);
}

.ipad-device .nav-links a {
    /* Better touch feedback for navigation */
    position: relative;
    overflow: hidden;
}

.ipad-device .nav-links a:active {
    background-color: rgba(74, 144, 226, 0.2);
}

/* Orientation-specific styles */
[data-orientation="landscape"] .dashboard-container {
    padding: 1rem 2rem;
}

[data-orientation="portrait"] .dashboard-container {
    padding: 1rem;
}

/* Swipe indicators (optional visual feedback) */
.swipe-indicator {
    position: fixed;
    top: 50%;
    font-size: 2rem;
    color: rgba(74, 144, 226, 0.6);
    pointer-events: none;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.swipe-indicator.left {
    left: 20px;
}

.swipe-indicator.right {
    right: 20px;
}

.swipe-indicator.active {
    opacity: 1;
}

/* Virtual Keyboard and Input Optimizations */
@supports (-webkit-touch-callout: none) {
    /* iOS/Safari specific optimizations */
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="email"], 
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        transform: translateZ(0); /* Force hardware acceleration */
    }
    
    /* Better input experience on touch devices */
    .form-group {
        margin-bottom: 20px;
    }
    
    /* Floating labels for better UX */
    .floating-label {
        position: relative;
        margin-bottom: 20px;
    }
    
    .floating-label input {
        padding-top: 20px;
        padding-bottom: 8px;
    }
    
    .floating-label label {
        position: absolute;
        top: 16px;
        left: 16px;
        transition: all 0.3s ease;
        pointer-events: none;
        color: #999;
    }
    
    .floating-label input:focus + label,
    .floating-label input:not(:placeholder-shown) + label {
        top: 6px;
        font-size: 0.8rem;
        color: var(--primary-color);
    }
    
    /* Input focus improvements */
    input:focus,
    textarea:focus,
    select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
        transition: all 0.3s ease;
    }
    
    /* Date picker optimization */
    input[type="date"] {
        position: relative;
        cursor: pointer;
    }
    
    input[type="date"]::-webkit-calendar-picker-indicator {
        background: transparent;
        color: var(--primary-color);
        cursor: pointer;
        font-size: 1.2rem;
        padding: 5px;
    }
}

/* Form improvements for iPad */
@media (min-width: 768px) and (max-width: 1024px) {
    .auth-form,
    .member-form,
    .event-form {
        max-width: 500px;
        margin: 0 auto;
        padding: 30px;
    }
    
    .form-row {
        display: flex;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .form-row .form-group {
        flex: 1;
        margin-bottom: 0;
    }
    
    /* Better button layouts on iPad */
    .form-actions {
        display: flex;
        gap: 15px;
        justify-content: space-between;
        margin-top: 30px;
    }
    
    .form-actions button {
        flex: 1;
        min-height: 50px;
    }
    
    /* Search and filter improvements */
    .search-container {
        position: relative;
        margin-bottom: 20px;
    }
    
    .search-container input {
        padding-right: 50px;
    }
    
    .search-container::after {
        content: "🔍";
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.2rem;
        pointer-events: none;
    }
} 