/* Estilos para Panel de Administración de Eventos en Index - Estilo Moderno */

.admin-controls {
    background: #ffffff;
    padding: 35px;
    border-radius: 20px;
    margin: 40px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e4e6eb;
    transition: all 0.3s ease;
}

.admin-controls:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.admin-controls h3 {
    margin: 0 0 8px 0;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #050505;
}

.admin-controls h3 i {
    color: #1877f2;
    font-size: 1.6rem;
}

.admin-controls p {
    margin: 0 0 25px 0;
    color: #65676b;
    font-size: 0.95rem;
    font-weight: 400;
}

.admin-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.admin-button {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.admin-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.admin-button:hover::before {
    width: 300px;
    height: 300px;
}

.admin-button i {
    font-size: 1.15rem;
    z-index: 1;
}

.admin-button span {
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #42b883, #35a372);
    color: white;
    box-shadow: 0 2px 8px rgba(66, 184, 131, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #35a372, #2d8f63);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 184, 131, 0.35);
}

.btn-info {
    background: linear-gradient(135deg, #1877f2, #0c63d4);
    color: white;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.25);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0c63d4, #0952b8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.admin-button:active {
    transform: translateY(0);
}

/* Formulario de Evento - Estilo Moderno */
.evento-form-container {
    background: #ffffff;
    padding: 0;
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e4e6eb;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

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

.evento-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: #f7f8fa;
    border-bottom: 1px solid #e4e6eb;
}

.evento-form-header h3 {
    margin: 0;
    color: #050505;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.evento-form-header h3 i {
    color: #1877f2;
}

.btn-close-form {
    background: #e4e6eb;
    color: #65676b;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-form:hover {
    background: #d8dadf;
    color: #050505;
    transform: scale(1.1);
}

#evento-form-index {
    padding: 30px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #050505;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #65676b;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccd0d5;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #f0f2f5;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1877f2;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8a8d91;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85rem;
}

.checkbox-label-index {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.checkbox-label-index input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.image-preview-index,
.pdf-preview-index {
    margin-top: 10px;
}

/* Info de expiración */
.expiracion-info {
    margin: 20px 0;
    padding: 0;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #1877f2;
    padding: 16px 20px;
    border-radius: 10px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.info-box i {
    color: #1877f2;
    font-size: 1.5rem;
    margin-top: 2px;
}

.info-box strong {
    color: #050505;
    font-weight: 600;
}

.info-box span {
    color: #65676b;
}

/* Badge de estado en las cards */
.evento-estado-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.estado-activo {
    background: #d1f4e0;
    color: #0d894f;
}

.estado-inactivo {
    background: #fee;
    color: #dc2626;
}

.estado-expirado {
    background: #fef3c7;
    color: #92400e;
}

.estado-programado {
    background: #e0e7ff;
    color: #3730a3;
}

/* Botón de reactivar */
.btn-reactivar-evento {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fef3c7;
    color: #92400e;
}

.btn-reactivar-evento:hover {
    background: #fbbf24;
    color: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
}

/* Indicador de tiempo restante */
.tiempo-restante {
    font-size: 0.85rem;
    color: #65676b;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tiempo-restante i {
    color: #1877f2;
}

.tiempo-restante.expirando-pronto {
    color: #f59e0b;
}

.tiempo-restante.expirando-pronto i {
    color: #f59e0b;
}

.form-buttons-index {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-submit-evento,
.btn-cancel-evento {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit-evento {
    background: linear-gradient(135deg, #1877f2, #0c63d4);
    color: white;
    flex: 1;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.25);
}

.btn-submit-evento:hover {
    background: linear-gradient(135deg, #0c63d4, #0952b8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}

.btn-submit-evento:active {
    transform: translateY(0);
}

.btn-cancel-evento {
    background: #e4e6eb;
    color: #050505;
}

.btn-cancel-evento:hover {
    background: #d8dadf;
}

/* Lista de Eventos Admin */
.eventos-admin-list {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.eventos-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.eventos-list-header h3 {
    margin: 0;
    color: #1a4b8c;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.evento-card-admin {
    background: #ffffff;
    border: 1px solid #e4e6eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.evento-card-admin:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #1877f2;
}

.evento-card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.evento-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.evento-card-body h4 {
    margin: 0 0 12px 0;
    color: #050505;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.evento-tipo {
    display: inline-block;
    padding: 6px 14px;
    background: #e7f3ff;
    color: #1877f2;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.evento-fecha,
.evento-ubicacion {
    color: #666;
    font-size: 0.9rem;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.evento-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-edit-evento,
.btn-delete-evento {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-edit-evento {
    background: #e7f3ff;
    color: #1877f2;
}

.btn-edit-evento:hover {
    background: #1877f2;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.25);
}

.btn-delete-evento {
    background: #fee;
    color: #ef4444;
}

.btn-delete-evento:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.loading,
.no-eventos,
.error {
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    color: #666;
}

.loading i {
    font-size: 2rem;
    color: #1a4b8c;
    animation: spin 1s linear infinite;
}

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

.error {
    color: #e74c3c;
}

/* Filtros de administración */
.eventos-admin-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

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

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

.filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-group input,
.filter-group select {
    padding: 10px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #1a4b8c;
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-apply-filters,
.btn-clear-filters {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-apply-filters {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-apply-filters:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

.btn-clear-filters {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.btn-clear-filters:hover {
    background: linear-gradient(135deg, #5a6268, #6c757d);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4);
    transform: translateY(-2px);
}

.eventos-count {
    margin-left: auto;
    padding: 10px 15px;
    background: white;
    border: 2px solid #1a4b8c;
    border-radius: 6px;
    font-weight: 600;
    color: #1a4b8c;
}

/* Paginación de administración */
.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
}

.admin-pagination button {
    padding: 8px 16px;
    border: 2px solid #1a4b8c;
    background: white;
    color: #1a4b8c;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-pagination button:hover:not(:disabled) {
    background: #1a4b8c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 75, 140, 0.3);
}

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

.admin-pagination button.active {
    background: #1a4b8c;
    color: white;
}

.admin-pagination .page-info {
    padding: 8px 16px;
    font-weight: 600;
    color: #495057;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    
    .admin-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .eventos-count {
        margin-left: 0;
        text-align: center;
    }
    
    .admin-pagination {
        flex-wrap: wrap;
    }
    
    .eventos-grid {
        grid-template-columns: 1fr;
    }
    
    .form-buttons-index {
        flex-direction: column;
    }
}
