/* ============================================
   SISTEMA PREMIUM - ESTILOS
   ============================================ */

/* Tarjetas de membresía en admin */
.membresias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.membresia-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.membresia-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.membresia-card.inactive {
    opacity: 0.6;
}

.membresia-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
}

.membresia-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
}

.btn-edit {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

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

.membresia-descripcion {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.membresia-precio {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 8px;
    margin-bottom: 20px;
}

.precio-valor {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.precio-periodo {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.membresia-limites,
.membresia-permisos {
    margin-bottom: 20px;
}

.membresia-limites h4,
.membresia-permisos h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}

.limite-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

.permiso-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 5px;
}

.permiso-item.activo {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.permiso-item.inactivo {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.permiso-status {
    margin-left: auto;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Modal de edición */
.modal-membresia-edit {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

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

.modal-body {
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    margin: 0 0 15px 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.form-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

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

.form-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: var(--bg-tertiary);
}

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

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

.form-actions button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

/* Estadísticas de membresías */
.stats-grid-membresias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.stat-card h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.membresia-distribution,
.uso-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.distribution-item,
.uso-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: var(--card-bg);
    border-radius: 6px;
}

.big-stat {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .membresias-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid-membresias {
        grid-template-columns: 1fr;
    }
}

/* Badge de membresía en perfiles */
.badge-membresia {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Widget de membresía en dashboard */
.membresia-widget {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid var(--border);
}

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

.btn-upgrade {
    background: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.membresia-limites {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.limite-item {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
}

.limite-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.limite-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.limite-progress {
    height: 100%;
    transition: width 0.3s;
    border-radius: 4px;
}

.membresia-expiracion {
    margin-top: 15px;
    padding: 10px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    text-align: center;
    color: #f59e0b;
    font-weight: 600;
}


/* ============================================
   DESTACADO PREMIUM EN TARJETAS Y PERFILES
   ============================================ */

/* Animación de brillo para tarjetas premium */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Efecto de brillo sutil en hover para tarjetas premium */
.profile-card[data-premium="true"]:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(251, 191, 36, 0.2),
        transparent
    );
    animation: shimmer 2s infinite;
    z-index: 1;
    pointer-events: none;
}

.profile-card[data-premium-verificado="true"]:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(139, 92, 246, 0.2),
        transparent
    );
    animation: shimmer 2s infinite;
    z-index: 1;
    pointer-events: none;
}

/* Badge premium con animación de pulso */
@keyframes premium-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(251, 191, 36, 0.6);
    }
}

@keyframes premium-verificado-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6);
    }
}

/* Perfil premium - Header destacado */
.profile-header-premium {
    position: relative;
    overflow: hidden;
}

.profile-header-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(251, 191, 36, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
    z-index: 0;
}

.profile-header-premium-verificado::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(139, 92, 246, 0.1),
        transparent
    );
}

/* Badge premium en perfil */
.profile-premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: premium-pulse 2s infinite;
}

.profile-premium-verificado-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    animation: premium-verificado-pulse 2s infinite;
}

/* Borde dorado/púrpura en foto de perfil */
.profile-photo-premium {
    border: 3px solid #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.profile-photo-premium-verificado {
    border: 3px solid #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* Efecto de partículas doradas (opcional) */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .profile-premium-badge,
    .profile-premium-verificado-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}
