/* =================================================================
   ESTILO PARA SISTEMA DE SELECCIÓN DE IMÁGENES
   ================================================================= */

/* --- GENERALES Y TIPOGRAFÍA --- */
:root {
    --color-fondo: #121212;
    --color-superficie: #1e1e1e;
    --color-borde: #333;
    --color-primario: #3d8bfd;
    --color-secundario: #444;
    --color-peligro: #d32f2f;
    --color-texto-principal: #e0e0e0;
    --color-texto-secundario: #a0a0a0;
    --color-corazon: #f44336;
    --radio-borde: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto-principal);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

h1, h2, h3 {
    margin: 0 0 15px 0;
    font-weight: 700;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; color: var(--color-texto-principal); }
h3 { font-size: 1.3rem; }

a {
    color: var(--color-primario);
    text-decoration: none;
}

/* --- FORMULARIOS Y BOTONES --- */
input[type="text"],
input[type="password"] {
    background-color: #2a2a2a;
    border: 1px solid var(--color-borde);
    color: var(--color-texto-principal);
    padding: 12px 15px;
    border-radius: var(--radio-borde);
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.3);
}

input[type="file"] {
    background-color: #2a2a2a;
    border: 1px solid var(--color-borde);
    padding: 8px;
    border-radius: var(--radio-borde);
    cursor: pointer;
}

button, .button {
    background-color: var(--color-primario);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radio-borde);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    display: inline-block;
    text-align: center;
}

button:hover, .button:hover {
    transform: translateY(-2px);
}

.button.secondary { background-color: var(--color-secundario); }
.button.secondary:hover { background-color: #555; }
.button.danger { background-color: var(--color-peligro); }
.button.danger:hover { background-color: #e53935; }
.button.warning { background-color: #ff9800; }
.button.warning:hover { background-color: #f57c00; }


/* --- CONTENEDORES DE LOGIN Y ADMIN --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background-color: var(--color-superficie);
    border-radius: var(--radio-borde);
    border: 1px solid var(--color-borde);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =================================================================
   DASHBOARD ADMINISTRATIVO PROFESIONAL
   ================================================================= */

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

/* --- HEADER DEL DASHBOARD --- */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-info h1 {
    margin: 0 0 8px 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.header-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* --- MÉTRICAS PRINCIPALES --- */
.metrics-section {
    margin-bottom: 40px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric-card {
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.metric-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(61, 139, 253, 0.1);
}

.metric-card.success .metric-icon { background: rgba(40, 167, 69, 0.1); }
.metric-card.warning .metric-icon { background: rgba(255, 152, 0, 0.1); }
.metric-card.info .metric-icon { background: rgba(23, 162, 184, 0.1); }
.metric-card.primary .metric-icon { background: rgba(220, 53, 69, 0.1); }

.metric-content h3 {
    margin: 0 0 5px 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-texto-principal);
}

.metric-content p {
    margin: 0;
    color: var(--color-texto-secundario);
    font-size: 0.9rem;
}

/* --- SECCIÓN DE CREAR EVENTO --- */
.create-section {
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    color: var(--color-texto-principal);
}

.section-header p {
    margin: 0;
    color: var(--color-texto-secundario);
}

.create-form {
    max-width: 600px;
}

.form-group {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.form-group input {
    flex: 1;
    margin: 0;
}

.form-group button {
    white-space: nowrap;
    min-width: 150px;
}

/* --- SECCIÓN DE EVENTOS --- */
.events-section {
    margin-bottom: 40px;
}

/* --- BUSCADOR DE EVENTOS --- */
.search-section {
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.search-container {
    max-width: 600px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: var(--color-texto-secundario);
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--color-borde);
    border-radius: 25px;
    color: var(--color-texto-principal);
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    background: var(--color-secundario);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-texto-secundario);
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: var(--color-peligro);
    color: white;
    transform: scale(1.1);
}

.search-results-info {
    font-size: 0.9rem;
    font-weight: 500;
}

.search-results-total {
    color: var(--color-texto-secundario);
}

.search-results-found {
    color: #28a745;
}

.search-no-results {
    color: var(--color-peligro);
}

/* Resaltado de texto en búsqueda */
.highlight {
    background: linear-gradient(120deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* =================================================================
   SWEETALERT2 TEMA OSCURO PERSONALIZADO
   ================================================================= */

.swal-dark-theme {
    border: 1px solid var(--color-borde) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

.swal2-popup.swal-dark-theme {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.swal2-title {
    color: var(--color-texto-principal) !important;
    font-weight: 700 !important;
}

.swal2-content {
    color: var(--color-texto-secundario) !important;
}

.swal2-confirm.swal-confirm-btn {
    background: var(--color-primario) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 12px 24px !important;
    transition: all 0.2s ease !important;
}

.swal2-confirm.swal-confirm-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(61, 139, 253, 0.4) !important;
}

.swal2-cancel.swal-cancel-btn {
    background: var(--color-secundario) !important;
    border: 1px solid var(--color-borde) !important;
    border-radius: 8px !important;
    color: var(--color-texto-principal) !important;
    font-weight: 500 !important;
    padding: 12px 24px !important;
    transition: all 0.2s ease !important;
}

.swal2-cancel.swal-cancel-btn:hover {
    background: #555 !important;
    transform: translateY(-1px) !important;
}

.swal2-input {
    background: #2a2a2a !important;
    border: 1px solid var(--color-borde) !important;
    color: var(--color-texto-principal) !important;
    border-radius: 8px !important;
}

.swal2-input:focus {
    border-color: var(--color-primario) !important;
    box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.3) !important;
}

/* Loader personalizado */
.swal2-loader {
    border-color: var(--color-primario) transparent var(--color-primario) transparent !important;
}

/* Iconos personalizados */
.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #28a745 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(40, 167, 69, 0.3) !important;
}

.swal2-icon.swal2-error {
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}

.swal2-icon.swal2-warning {
    border-color: #ff9800 !important;
    color: #ff9800 !important;
}

.swal2-icon.swal2-info {
    border-color: var(--color-primario) !important;
    color: var(--color-primario) !important;
}

.swal2-icon.swal2-question {
    border-color: #17a2b8 !important;
    color: #17a2b8 !important;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 12px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--color-texto-principal);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--color-texto-secundario);
}

.events-grid {
    display: grid;
    gap: 25px;
}

/* --- TARJETAS DE EVENTO MODERNAS --- */
.event-card-modern {
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.event-card-modern.closed {
    border-left: 4px solid #dc3545;
}

.event-card-modern.open {
    border-left: 4px solid #28a745;
}

/* Header de la tarjeta */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.event-title-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-title {
    margin: 0;
    font-size: 1.3rem;
    color: var(--color-texto-principal);
    flex: 1;
}

.edit-title-btn {
    background: transparent;
    border: 1px solid var(--color-borde);
    color: var(--color-texto-secundario);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-title-btn:hover {
    background: var(--color-primario);
    color: white;
    border-color: var(--color-primario);
}

.edit-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.edit-form input {
    flex: 1;
    margin: 0;
    padding: 8px 12px;
    font-size: 1rem;
}

.save-btn, .cancel-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.save-btn:hover { background: rgba(40, 167, 69, 0.2); }
.cancel-btn:hover { background: rgba(220, 53, 69, 0.2); }

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.open {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-badge.closed {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* Métricas del evento */
.card-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.metric-item {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
    margin-bottom: 5px;
}

.metric-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-texto-principal);
}

/* Barra de progreso */
.progress-section {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--color-texto-secundario);
}

/* Enlace del cliente */
.client-link-section {
    margin-bottom: 25px;
}

.link-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    margin-bottom: 8px;
}

.link-container {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.client-link {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-borde);
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--color-texto-principal);
}

.copy-btn, .open-btn {
    background: var(--color-secundario);
    border: 1px solid var(--color-borde);
    color: var(--color-texto-principal);
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.copy-btn:hover, .open-btn:hover {
    background: var(--color-primario);
    border-color: var(--color-primario);
}

/* Acciones de la tarjeta */
.card-actions {
    border-top: 1px solid var(--color-borde);
    padding-top: 20px;
}

.upload-section {
    margin-bottom: 20px;
}

.upload-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.file-input {
    display: none;
}

.file-label {
    background: var(--color-secundario);
    color: var(--color-texto-principal);
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--color-borde);
    font-size: 0.9rem;
}

.file-label:hover {
    background: var(--color-primario);
    border-color: var(--color-primario);
}

.button.upload {
    background: #17a2b8;
}

.button.upload:hover {
    background: #138496;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button.success {
    background: #28a745;
}

.button.success:hover {
    background: #218838;
}

/* Responsive para dashboard */
@media (max-width: 768px) {
    .dashboard-wrapper {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .card-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .upload-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .search-input {
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .search-container {
        max-width: 100%;
    }
}

/* --- VISTA CLIENTE --- */
.client-header {
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.client-header p {
    color: var(--color-texto-secundario);
    font-size: 1.1rem;
}
.client-header .counters {
    justify-content: center;
    margin-top: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.photo-card {
    position: relative;
    border-radius: var(--radio-borde);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: #2a2a2a;
}

/* Skeleton Loader para fotos */
.photo-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radio-borde);
    overflow: hidden;
    z-index: 1;
    border: 1px solid #333;
}

.skeleton-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 100%
    );
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.skeleton-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 2;
    opacity: 0.6;
}

.skeleton-icon {
    color: #444;
    animation: pulse 2s infinite;
}

.skeleton-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.skeleton-line {
    height: 8px;
    background: #444;
    border-radius: 4px;
    animation: pulse 2s infinite;
}

.skeleton-line-1 {
    width: 80px;
    animation-delay: 0.2s;
}

.skeleton-line-2 {
    width: 60px;
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
}

/* Imagen real */
.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    opacity: 0;
    z-index: 2;
}

.photo-image.loaded {
    opacity: 1;
}

.photo-card:hover .photo-image.loaded {
    transform: scale(1.05);
}

/* Ocultar skeleton cuando la imagen está cargada */
.photo-card.image-loaded .photo-skeleton {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Estado de error para imágenes que no cargan */
.photo-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #666;
    text-align: center;
}

.error-icon {
    color: #dc3545;
    opacity: 0.7;
}

.error-text {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.photo-skeleton.error-state {
    background: linear-gradient(135deg, #2a1f1f 0%, #1e1414 100%);
}

.photo-skeleton.error-state .skeleton-shimmer {
    display: none;
}

/* ===== INICIO DEL CAMBIO ===== */
/* El overlay ahora es visible por defecto para mostrar siempre el corazón */
.photo-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 50%); /* Gradiente para dar contraste */
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 1px;
    pointer-events: none; /* Permite hacer clic 'a través' del overlay a la imagen */
}

.heart-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
  	margin-bottom: 0px;
  	margin-right: 5px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    pointer-events: all; /* El botón sí debe ser clickeable */
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7)); /* Sombra para mejor legibilidad */
}
/* ===== FIN DEL CAMBIO ===== */

/* Cambios 21_08_2025 */
.filename {
    color: white;
    font-size: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-left: 10px;
  	margin-bottom: 10px;
}

.modal-filename {
    position: absolute;
    bottom: 4vh;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    max-width: 80%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-controls {
    margin-top: 15px;
    text-align: center;
}

.toggle-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.toggle-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.toggle-btn.active {
    background: #28a745;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.toggle-btn.active:hover {
    background: #1e7e34;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* Botón cerrar selección */
.close-selection-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
    margin-left: 10px;
}

.close-selection-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.close-selection-btn svg {
    width: 16px;
    height: 16px;
}

/* Indicador de selección cerrada */
.selection-closed {
    color: #28a745 !important;
    font-weight: 500;
}

/* Indicador de foto seleccionada cuando la selección está cerrada */
.selected-indicator {
    width: 40px;
    height: 40px;
    margin-bottom: 0px;
    margin-right: 5px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7));
}

.selected-indicator svg {
    width: 28px;
    height: 28px;
    color: var(--color-corazon);
}

/* Estilos para fotos cuando la selección está deshabilitada */
.photo-card.selection-disabled .overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 50%);
}

/* Estados de selección en admin */
.status-closed {
    color: #dc3545;
    font-weight: 500;
}

.status-open {
    color: #28a745;
    font-weight: 500;
}

/* Estilos para ocultar fotos no seleccionadas */
.gallery.show-selected-only .photo-card:not(.selected-photo) {
  	display: none;
}

/* Animación suave para el filtro */
.photo-card {
  	transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery.show-selected-only .photo-card.selected-photo {
  	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Efecto de resaltado para la foto actual al cerrar modal */
.photo-card.photo-highlight {
    animation: photoHighlight 2s ease-out;
    z-index: 10;
    position: relative;
}

@keyframes photoHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(61, 139, 253, 0.8);
        transform: scale(1);
    }
    15% {
        box-shadow: 0 0 0 8px rgba(61, 139, 253, 0.6);
        transform: scale(1.02);
    }
    30% {
        box-shadow: 0 0 0 12px rgba(61, 139, 253, 0.4);
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(61, 139, 253, 0.2);
        transform: scale(1.01);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(61, 139, 253, 0);
        transform: scale(1);
    }
}

/* Header fijo con sticky */
.sticky-controls {
    position: sticky;
  	background-color: #121212;
    top: 0;
    padding: 5px 0;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    z-index: 99;
    margin-bottom: 10px;
  	padding-bottom: 10px;
}

/* Fin Avances */

.heart-btn svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: color 0.2s;
}

.heart-btn.selected svg { color: var(--color-corazon); }
.heart-btn:active { transform: scale(0.9); }


/* --- MODAL CON NAVEGACIÓN --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 90%;
    max-height: 80%;
    touch-action: pan-y; /* Permitir scroll vertical pero capturar swipe horizontal */
}

.modal-content {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radio-borde);
    transition: opacity 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover,
.close-modal:focus {
    color: #fff;
    background: rgba(220, 53, 69, 0.8);
    transform: scale(1.1);
}

/* Botones de navegación */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(61, 139, 253, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.nav-btn:disabled:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(0.9);
}

.nav-prev {
    left: 30px;
}

.nav-next {
    right: 30px;
}

/* Botón de corazón en el modal */
.modal-heart-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.modal-heart-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-heart-btn svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: color 0.2s;
}

.modal-heart-btn.selected svg {
    color: var(--color-corazon);
}

.modal-heart-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Información del modal */
.modal-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    z-index: 1001;
}

.modal-filename {
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    backdrop-filter: blur(10px);
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-counter {
    background: rgba(61, 139, 253, 0.8);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Indicador de carga */
.modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 1002;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--color-primario);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive para modal */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-image-container {
        max-width: 95%;
        max-height: 75%;
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
    }
    
    .nav-prev {
        left: 15px;
    }
    
    .nav-next {
        right: 15px;
    }
    
    .close-modal {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .modal-heart-btn {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
    
    .modal-info {
        bottom: 15px;
        left: 15px;
        right: 70px;
        transform: none;
        text-align: left;
    }
    
    .modal-filename {
        font-size: 14px;
        max-width: 100%;
    }
    
    .modal-counter {
        font-size: 12px;
    }
}

/* --- GALERÍA RESPONSIVE MEJORADA --- */
.gallery {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

@media (max-width: 480px) {
    /* Móviles: 1 sola columna */
    .gallery {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    /* Tablets: 2-3 columnas */
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Laptops pequeñas: 3-4 columnas */
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 1025px) {
    /* PC escritorio: máximo 5 columnas */
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* =================================================================
   MODALES ADMINISTRATIVOS (Subida y Galería)
   ================================================================= */

.admin-modal-overlay {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}

.admin-modal-box {
    background: var(--color-superficie);
    border: 1px solid var(--color-borde);
    border-radius: 16px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

.upload-modal-box {
    max-width: 700px;
}

.gallery-modal-box {
    max-width: 1100px;
}

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

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--color-borde);
}

.admin-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--color-texto-principal);
}

.admin-modal-close {
    background: transparent;
    border: 1px solid var(--color-borde);
    color: var(--color-texto-secundario);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.admin-modal-close:hover {
    background: var(--color-peligro);
    color: white;
    border-color: var(--color-peligro);
}

.admin-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 25px;
    border-top: 1px solid var(--color-borde);
}

/* --- Drop Zone --- */
.upload-drop-zone {
    border: 2px dashed var(--color-borde);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--color-texto-secundario);
    margin-bottom: 15px;
}

.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
    border-color: var(--color-primario);
    background: rgba(61, 139, 253, 0.05);
    color: var(--color-primario);
}

.upload-drop-zone p {
    margin: 0;
    font-size: 1rem;
}

/* --- Upload Summary --- */
.upload-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
    font-size: 0.9rem;
    color: var(--color-texto-secundario);
    border-bottom: 1px solid var(--color-borde);
    margin-bottom: 10px;
}

.upload-global-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.upload-global-bar {
    height: 100%;
    background: linear-gradient(90deg, #17a2b8, #28a745);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* --- Upload File List --- */
.upload-file-list {
    max-height: 400px;
    overflow-y: auto;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 6px;
    transition: background 0.2s;
}

.upload-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.upload-item-done {
    background: rgba(40, 167, 69, 0.08) !important;
}

.upload-item-error {
    background: rgba(220, 53, 69, 0.08) !important;
}

.upload-item-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.upload-item-info {
    flex: 1;
    min-width: 0;
}

.upload-item-name {
    display: block;
    font-size: 0.9rem;
    color: var(--color-texto-principal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-item-size {
    display: block;
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
    margin-bottom: 4px;
}

.upload-item-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
}

.upload-item-progress-fill {
    height: 100%;
    background: var(--color-primario);
    border-radius: 2px;
    transition: width 0.2s ease;
    width: 0%;
}

.upload-item-status {
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
}

.upload-item-remove {
    background: transparent;
    border: 1px solid var(--color-borde);
    color: var(--color-texto-secundario);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.upload-item-remove:hover {
    background: var(--color-peligro);
    color: white;
    border-color: var(--color-peligro);
}

/* --- Gallery DataTable Dark Theme --- */
#gallery-table_wrapper {
    color: var(--color-texto-principal);
}

#gallery-table {
    border-collapse: collapse;
    color: var(--color-texto-principal) !important;
}

#gallery-table thead th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-texto-principal);
    border-bottom: 2px solid var(--color-borde);
    padding: 12px 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#gallery-table tbody td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    color: var(--color-texto-principal);
    background: transparent;
}

#gallery-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.gallery-dt-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--color-borde);
}

/* DataTables dark overrides */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: var(--color-texto-secundario) !important;
    padding: 10px 0;
}

.dataTables_wrapper .dataTables_filter input {
    background: #2a2a2a;
    border: 1px solid var(--color-borde);
    color: var(--color-texto-principal);
    border-radius: 6px;
    padding: 6px 10px;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_length select {
    background: #2a2a2a;
    border: 1px solid var(--color-borde);
    color: var(--color-texto-principal);
    border-radius: 6px;
    padding: 4px 8px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--color-texto-secundario) !important;
    background: transparent !important;
    border: 1px solid var(--color-borde) !important;
    border-radius: 6px !important;
    margin: 0 2px;
    padding: 4px 10px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--color-primario) !important;
    color: white !important;
    border-color: var(--color-primario) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--color-primario) !important;
    color: white !important;
    border-color: var(--color-primario) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.3;
}

table.dataTable.no-footer {
    border-bottom: 1px solid var(--color-borde);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-modal-box {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .admin-modal-body {
        padding: 15px;
    }
    
    .gallery-dt-thumb {
        width: 40px;
        height: 40px;
    }
    
    .upload-item-thumb {
        width: 40px;
        height: 40px;
    }
}


/* =================================================================
   PRECIOS DEL PAQUETE - ADMIN
   ================================================================= */
.pricing-section {
    margin-bottom: 20px;
    padding: 18px;
    background: rgba(255, 215, 0, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 10px;
}

.pricing-form {
    margin: 0;
}

.pricing-fields {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.pricing-field {
    flex: 1;
    min-width: 180px;
}

.pricing-field label {
    display: block;
    font-size: 0.82rem;
    color: var(--color-texto-secundario);
    margin-bottom: 6px;
    font-weight: 500;
}

.pricing-field input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-borde);
    border-radius: 8px;
    color: var(--color-texto-principal);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pricing-field input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.pricing-field input::placeholder {
    color: #666;
}

.pricing-save-btn {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    white-space: nowrap;
    background: linear-gradient(135deg, #ffd700, #ffaa00) !important;
    color: #1a1a1a !important;
    font-weight: 600 !important;
    border: none !important;
}

.pricing-save-btn:hover {
    background: linear-gradient(135deg, #ffed4e, #ffd700) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
    .pricing-fields {
        flex-direction: column;
    }
    
    .pricing-field {
        min-width: 100%;
    }
    
    .pricing-save-btn {
        width: 100%;
    }
}

/* =================================================================
   PRECIOS DEL PAQUETE - CLIENTE (badges elegantes)
   ================================================================= */
.pricing-info-client {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pricing-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 28px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-badge:hover {
    transform: translateY(-3px);
}

.pricing-badge.total-paquete {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(32, 201, 151, 0.1));
    border: 1px solid rgba(40, 167, 69, 0.3);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.1);
}

.pricing-badge.total-paquete:hover {
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.2);
}

.pricing-badge.foto-adicional {
    background: linear-gradient(135deg, rgba(61, 139, 253, 0.15), rgba(23, 162, 184, 0.1));
    border: 1px solid rgba(61, 139, 253, 0.3);
    box-shadow: 0 4px 20px rgba(61, 139, 253, 0.1);
}

.pricing-badge.foto-adicional:hover {
    box-shadow: 0 8px 30px rgba(61, 139, 253, 0.2);
}

.pricing-badge.extras-total {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 193, 7, 0.1));
    border: 1px solid rgba(255, 152, 0, 0.3);
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.1);
    animation: fadeInBadge 0.4s ease;
}

.pricing-badge.extras-total:hover {
    box-shadow: 0 8px 30px rgba(255, 152, 0, 0.2);
}

.pricing-badge.extras-total .pricing-value {
    color: #ff9800;
}

.pricing-detail {
    font-size: 0.75rem;
    color: var(--color-texto-secundario);
    opacity: 0.8;
}

@keyframes fadeInBadge {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pricing-label {
    font-size: 0.8rem;
    color: var(--color-texto-secundario);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-texto-principal);
}

.pricing-badge.total-paquete .pricing-value {
    color: #28a745;
}

.pricing-badge.foto-adicional .pricing-value {
    color: #3d8bfd;
}

@media (max-width: 768px) {
    .pricing-info-client {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .pricing-badge {
        width: 100%;
        max-width: 280px;
        padding: 14px 20px;
    }
    
    .pricing-value {
        font-size: 1.2rem;
    }
}
