/* ===== VARIABLES GLOBALES ===== */
:root {
    --primary: #1a365d;
    --secondary: #c9a227;
    --accent: #e74c3c;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #1a365d 0%, #2c3e50 100%);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow-light: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-medium: 0 8px 24px rgba(0,0,0,0.15);
    --shadow-heavy: 0 12px 36px rgba(0,0,0,0.2);
}

/* ===== MODAL DE CONTRASEÑA ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.password-modal {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 450px;
    padding: 2.5rem;
    box-shadow: var(--shadow-heavy);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .password-modal {
    transform: translateY(0);
}

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

.modal-title {
    font-size: 1.5rem;
    color: var(--primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: var(--transition);
}

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

.password-error {
    color: #c53030;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.password-error.show {
    display: block;
}

/* ===== SISTEMA DE GESTIÓN DE CAMPAMENTOS ===== */
.camp-management-section {
    background: white;
    padding: 3rem 0;
    border-radius: var(--border-radius);
    margin: 2rem auto;
    max-width: 1200px;
}

.camp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light);
}

.camp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border-top: 4px solid var(--primary);
}

.stat-card.confirmed {
    border-top-color: #2ecc71;
}

.stat-card.pending {
    border-top-color: #f39c12;
}

.stat-card.canceled {
    border-top-color: #e74c3c;
}

.stat-card.total-pay {
    border-top-color: #27ae60;
    background: linear-gradient(135deg, #f8f5f0 0%, #e8f5e9 100%);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: 600;
}

/* ===== FORMULARIOS ===== */
.camp-form {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-title {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* GRID DE DOS COLUMNAS PARA FORMULARIOS */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

/* GRUPOS DE FORMULARIO */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

/* ESTILOS UNIFICADOS PARA INPUTS */
.form-group input,
.form-group select,
.form-group textarea,
.form-group input.form-control,
.form-group input[type="tel"].form-control,
.form-group input[type="text"].form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-group input.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* BÚSQUEDA DE CÓNYUGE */
.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-box input {
    padding-left: 35px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: none;
}

.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.selected-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 13px;
    margin-right: 5px;
}

.btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
}

.btn-remove:hover {
    color: #c82333;
}

/* ===== BOTONES ===== */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

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

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

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
}

.btn-outline-primary {
    border: 1px solid #007bff;
    background: transparent;
    color: #007bff;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
}

/* ===== TABLAS ===== */
.camp-table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--light);
    border-bottom: 1px solid #eee;
}

.table-title {
    font-size: 1.2rem;
    color: var(--primary);
}

.table-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

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

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

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

.camp-table thead {
    background: var(--gradient-primary);
    color: white;
}

.camp-table th {
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
}

.camp-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.camp-table tbody tr:hover {
    background-color: #f9f9f9;
}

.camp-table td {
    padding: 1.2rem 1rem;
}

/* ===== BADGES Y ETIQUETAS ===== */
.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-confirmed {
    background-color: #d4f8e8;
    color: #0a7b4a;
}

.status-pending {
    background-color: #fff4e6;
    color: #e67e22;
}

.status-canceled {
    background-color: #ffeaea;
    color: #c53030;
}

.type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.type-camper { background: #2ecc71; color: white; }
.type-leader { background: #3498db; color: white; }
.type-collaborator { background: #9b59b6; color: white; }
.type-sibling { background: #f39c12; color: white; }
.type-unknown { background: #95a5a6; color: white; }

/* ===== BOTONES DE ACCIÓN ===== */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-action.edit {
    background-color: #3498db;
    color: white;
}

.btn-action.edit:hover {
    background-color: #2980b9;
}

.btn-action.delete {
    background-color: #fff5f5;
    color: #e53e3e;
}

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

.btn-action.delete-camper {
    background-color: #f39c12;
    color: white;
}

.btn-action.delete-camper:hover {
    background-color: #e67e22;
}

.btn-action.delete-person {
    background-color: #e74c3c;
    color: white;
}

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

/* ===== TABS ===== */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #3498db;
}

.tab-btn.active {
    color: #3498db;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== SECCIONES COLAPSABLES ===== */
.form-section.collapsible {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.form-section.collapsible .section-header {
    padding: 12px 16px;
    background: linear-gradient(to bottom, #f1f3f4, #e9ecef);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    border-bottom: 1px solid #dee2e6;
}

.form-section.collapsible .section-header:hover {
    background: linear-gradient(to bottom, #e9ecef, #dee2e6);
}

.form-section.collapsible .section-header h3 {
    margin: 0;
    font-size: 1em;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section.collapsible .section-header h3 i {
    color: #3498db;
    font-size: 1.1em;
}

.btn-toggle-section {
    background: white;
    border: 1px solid #ced4da;
    color: #495057;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-toggle-section:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-toggle-section i {
    transition: transform 0.3s;
}

.btn-toggle-section.rotated i {
    transform: rotate(180deg);
}

.section-content {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.section-toggle-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ===== CAMPOS OBLIGATORIOS Y OPCIONALES ===== */
.field-required {
    color: #dc3545;
    font-size: 0.75em;
    font-weight: normal;
    background: #f8d7da;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    display: inline-block;
}

.field-optional {
    color: #6c757d;
    font-size: 0.75em;
    font-weight: normal;
    font-style: italic;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    display: inline-block;
}

/* ===== ALERTAS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert.success {
    background-color: #d4f8e8;
    color: #0a7b4a;
    border-left: 4px solid #0a7b4a;
}

.alert.error {
    background-color: #ffeaea;
    color: #c53030;
    border-left: 4px solid #c53030;
}

.close-alert {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
}

/* ===== MENSAJES DE TABLA VACÍA ===== */
.empty-table-message {
    padding: 3rem;
    text-align: center;
    color: #999;
}

.empty-table-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* ===== MODAL DE INVITACIÓN AL CAMPAMENTO ===== */
.camp-invitation-modal {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 300px;
    z-index: 1001;
    opacity: 1;
    visibility: visible;
    transition: var(--transition);
    box-shadow: var(--shadow-heavy);
    border-radius: var(--border-radius);
    background: white;
    overflow: hidden;
}

.camp-invitation-modal.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(120%);
}

.camp-invitation-modal.minimized {
    transform: scale(0);
    opacity: 0;
    visibility: hidden;
}

.invitation-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.invitation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--gradient-primary);
    color: white;
    cursor: move;
}

.invitation-title {
    font-size: 1rem;
    margin: 0;
    color: white;
    font-weight: 600;
}

.invitation-controls {
    display: flex;
    gap: 0.5rem;
}

.invitation-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

.invitation-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.invitation-body {
    position: relative;
    padding: 0;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

.carousel-container {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 7/9;
    overflow: hidden;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background-color: #f8f9fa;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    z-index: 30;
    pointer-events: auto;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.carousel-indicator.active {
    background: var(--secondary);
    border-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(201, 162, 39, 0.7);
}

.invitation-footer {
    padding: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f5f0 0%, #e9e1d3 100%);
    border-top: 3px solid var(--secondary);
}

.invitation-message {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
    max-height: 250px;
    overflow-y: auto;
    padding: 0.8rem;
    flex: 1;
    word-wrap: break-word;
}

.invitation-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.invitation-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.invitation-minimized-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #8b322c 0%, #c44c44 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    z-index: 1000;
    cursor: pointer;
    transition: var(--transition);
    animation: float 3s ease-in-out infinite;
}

.invitation-minimized-icon.hidden {
    display: none;
}

.invitation-minimized-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .camp-management-section {
        padding: 1rem;
        margin: 1rem;
    }

    .camp-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .camp-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .camp-header h2 {
        font-size: 1.3rem;
    }

    .camp-form {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

    .table-title {
        font-size: 1.1rem;
        text-align: center;
        width: 100%;
    }

    .table-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.8rem;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
        padding: 0.8rem 1rem 0.8rem 2.5rem;
    }

    .export-buttons {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-success,
    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 auto;
        padding: 0.8rem 0.5rem;
        font-size: 0.8rem;
        text-align: center;
    }

    .camp-table {
        min-width: 600px;
    }

    .empty-table-message {
        padding: 2rem 1rem;
    }

    .empty-table-message i {
        font-size: 2.5rem;
    }

    .empty-table-message h3 {
        font-size: 1.1rem;
    }

    .password-modal {
        width: 95%;
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .form-section.collapsible .section-header h3 {
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .form-section.collapsible .section-header h3 small {
        display: block;
        margin-left: 0;
        margin-top: 5px;
        width: 100%;
    }

    .btn-toggle-section {
        width: 28px;
        height: 28px;
    }

    .section-toggle-buttons {
        flex-direction: column;
    }

    .section-toggle-buttons button {
        width: 100%;
    }

    .camp-invitation-modal {
        top: auto !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 40px) !important;
        max-width: 350px;
        right: auto !important;
        z-index: 500 !important;
    }

    .invitation-minimized-icon {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        z-index: 550 !important;
    }

    .invitation-minimized-icon::after {
        display: none;
    }

    .btn-action {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .btn-action i {
        font-size: 1rem;
    }

    .action-buttons {
        gap: 0.3rem;
    }

    .btn-primary, 
    .btn-secondary,
    .btn-danger,
    .btn-success {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    select.form-control,
    input.form-control {
        font-size: 16px;
        padding: 0.8rem;
    }

    .camp-invitation-modal.minimized,
    .camp-invitation-modal.hidden {
        pointer-events: none;
    }

    .camp-invitation-modal:not(.minimized):not(.hidden) {
        pointer-events: auto;
    }

    .btn-action,
    .tab-btn,
    .btn-toggle-section,
    .invitation-btn,
    .close-modal {
        min-height: 44px;
        min-width: 44px;
    }

    .action-buttons {
        gap: 0.5rem;
    }

    .btn-action:hover,
    .tab-btn:hover,
    .btn-toggle-section:hover {
        transform: none;
    }

    .btn-action:active,
    .tab-btn:active,
    .btn-toggle-section:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

@media (max-width: 600px) {
    .camp-table:not(.keep-table) {
        min-width: auto;
    }

    .camp-table:not(.keep-table) thead {
        display: none;
    }

    .camp-table:not(.keep-table) tbody tr {
        display: block;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 1rem;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .camp-table:not(.keep-table) td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.9rem;
    }

    .camp-table:not(.keep-table) td:last-child {
        border-bottom: none;
    }

    .camp-table:not(.keep-table) td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #2c3e50;
        background: #f8f9fa;
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        font-size: 0.8rem;
        margin-right: 1rem;
    }

    .camp-table:not(.keep-table) .status-badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }

    .camp-table:not(.keep-table) .action-buttons {
        justify-content: flex-end;
    }

    .camp-table:not(.keep-table) .type-badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .camp-invitation-modal {
        top: auto !important;
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 46px) !important;
        transform: none !important;
        z-index: 100 !important;
    }

    .invitation-header {
        padding: 0.6rem 0.8rem;
    }

    .invitation-title {
        font-size: 0.9rem;
    }

    .invitation-footer {
        padding: 0.5rem;
    }

    .invitation-message {
        font-size: 0.8rem;
        max-height: 180px;
        overflow-y: auto;
        padding: 0.5rem;
    }

    .invitation-whatsapp-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .carousel-indicators {
        bottom: 10px;
        gap: 6px;
    }

    .carousel-indicator {
        width: 8px;
        height: 8px;
    }

    .action-buttons {
        z-index: 650;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .camp-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .camp-table {
        min-width: 100%;
    }

    .table-actions {
        flex-wrap: wrap;
    }

    .search-box input {
        width: 200px;
    }
}

@media (min-width: 1200px) {
    .camp-invitation-modal {
        width: 300px;
        top: 120px;
        right: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   MODAL DE CONFRATERNIZACIÓN JUVENIL
   ============================================ */

/* Modal de Confraternización */
.youth-fellowship-modal {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-heavy);
    transform: translateY(20px);
    transition: var(--transition);
    position: relative;
    z-index: 2001;
}

.modal-overlay.active .youth-fellowship-modal {
    transform: translateY(0);
}

.youth-fellowship-modal .modal-header {
    background: linear-gradient(135deg, #8b322c 0%, #c44c44 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.youth-fellowship-modal .modal-title {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.modal-btn-info {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-btn-info:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.youth-fellowship-modal .close-modal {
    color: white;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youth-fellowship-modal .close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.youth-fellowship-modal .modal-body {
    padding: 1.5rem;
}

.modal-description {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}

/* ✅ CONTENEDOR DEL INPUT - POSITION RELATIVE */
.youth-fellowship-modal .form-group {
    position: relative;
    margin-bottom: 1.2rem;
}

.youth-fellowship-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.youth-fellowship-modal .form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.youth-fellowship-modal .form-group input:focus {
    border-color: #c44c44;
    outline: none;
    box-shadow: 0 0 0 3px rgba(196, 76, 68, 0.1);
}

/* ✅ RESULTADOS DE BÚSQUEDA - Z-INDEX MUY ALTO */
.youth-fellowship-modal .search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 99999 !important;  /* ✅ Muy alto para estar encima */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.youth-fellowship-modal .search-results.hidden {
    display: none;
}

.youth-fellowship-modal .search-results:not(.hidden) {
    display: block;
}

.youth-fellowship-modal .search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.youth-fellowship-modal .search-result-item:hover {
    background: #f5f5f5;
}

.youth-fellowship-modal .search-result-item.create-new {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
}

.youth-fellowship-modal .search-result-item.create-new i {
    color: #4caf50;
}

.youth-fellowship-modal .search-result-item.error {
    color: #d32f2f;
    cursor: default;
}

.youth-fellowship-modal .search-result-item.error:hover {
    background: white;
}

/* Error message */
.youth-fellowship-modal .error-message {
    background: #ffeaea;
    color: #c53030;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.youth-fellowship-modal .error-message:not(:empty) {
    display: block;
}

/* Footer del modal */
.youth-fellowship-modal .modal-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.youth-fellowship-modal .btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.youth-fellowship-modal .btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

.youth-fellowship-modal .btn-primary {
    background: linear-gradient(135deg, #8b322c 0%, #c44c44 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.youth-fellowship-modal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 76, 68, 0.3);
}

/* ============================================
   RESPONSIVE PARA MODALES
   ============================================ */

@media (max-width: 768px) {
    .youth-fellowship-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .youth-fellowship-modal .modal-header {
        padding: 0.8rem 1rem;
    }
    
    .youth-fellowship-modal .modal-title {
        font-size: 1.1rem;
    }
    
    .youth-fellowship-modal .modal-body {
        padding: 1rem;
    }
    
    .youth-fellowship-modal .modal-footer {
        padding: 0.8rem 1rem;
        flex-direction: column;
    }
    
    .youth-fellowship-modal .modal-footer button {
        width: 100%;
    }
    
    .participants-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .participants-modal .modal-header {
        padding: 0.8rem 1rem;
    }
    
    .participants-modal .modal-title {
        font-size: 1.1rem;
    }
    
    .participants-modal .modal-body {
        padding: 1rem;
    }
    
    .participant-item {
        padding: 0.6rem;
    }
    
    .participant-number {
        font-size: 0.9rem;
        min-width: 35px;
    }
    
    .participant-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .youth-fellowship-modal .form-group input {
        font-size: 16px;
        padding: 0.7rem;
    }
    
    .participant-item {
        flex-wrap: wrap;
    }
    
    .participant-number {
        width: 100%;
        margin-bottom: 0.3rem;
    }
    
    .participant-name {
        width: 100%;
        padding-left: 0;
    }
}

/* ============================================
   MODAL DE LISTA DE PARTICIPANTES - VERSIÓN AZUL
   ============================================ */

.participants-modal {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-heavy);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header con gradiente AZUL */
.participants-modal .modal-header {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participants-modal .modal-title {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.participants-modal .modal-title i {
    font-size: 1.3rem;
}

.participants-modal .close-modal {
    color: white;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.participants-modal .close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.participants-modal .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Lista de participantes */
.participants-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Cada participante */
.participant-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    transition: var(--transition);
    border-left: 4px solid #1a365d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.participant-item:hover {
    background: #e8f0fe;
    transform: translateX(4px);
    border-left-color: #2c5282;
}

/* Número del participante */
.participant-number {
    font-weight: 700;
    color: #1a365d;
    font-size: 1.1rem;
    min-width: 40px;
    background: #e2e8f0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nombre del participante */
.participant-name {
    flex: 1;
    font-weight: 500;
    color: #2d3748;
    font-size: 1rem;
}

/* Mensaje cuando no hay participantes */
.participants-empty {
    text-align: center;
    padding: 2rem;
    color: #a0aec0;
    font-size: 0.95rem;
}

.participants-empty::before {
    content: "📋";
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Contador de participantes */
.participants-count {
    text-align: center;
    padding: 0.8rem;
    background: #e8f0fe;
    border-radius: 8px;
    font-weight: 600;
    color: #1a365d;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE PARA MODAL DE PARTICIPANTES
   ============================================ */

@media (max-width: 768px) {
    .participants-modal {
        width: 95%;
        max-height: 85vh;
    }
    
    .participants-modal .modal-header {
        padding: 0.8rem 1rem;
    }
    
    .participants-modal .modal-title {
        font-size: 1.1rem;
    }
    
    .participants-modal .modal-body {
        padding: 1rem;
    }
    
    .participant-item {
        padding: 0.6rem 0.8rem;
        gap: 0.8rem;
    }
    
    .participant-number {
        font-size: 0.9rem;
        min-width: 32px;
        width: 28px;
        height: 28px;
    }
    
    .participant-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .participant-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .participant-number {
        width: 100%;
        max-width: 35px;
        margin-bottom: 0;
    }
    
    .participant-name {
        width: calc(100% - 45px);
        padding-left: 0;
    }
}