/* ===============================================
   PERFIL ENHANCED - DISEÑO MEJORADO
   Diciembre 2025
   =============================================== */

/* HEADER DEL PERFIL */
.perfil-header-enhanced {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.perfil-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.4);
}

.avatar-icon {
    font-size: 40px;
}

.perfil-info {
    flex: 1;
}

.perfil-info h1 {
    color: white;
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.perfil-info .perfil-email {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0;
}

.perfil-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.perfil-actions .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.perfil-actions .btn-outline {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.perfil-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
}

.perfil-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
}

.perfil-actions .btn-secondary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* TARJETAS DE ESTADO */
.perfil-status-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.status-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.status-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.status-card.status-active {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.status-card.status-active.pack-card {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.status-card.status-inactive {
    border-color: #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.status-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.status-icon {
    font-size: 32px;
}

.status-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.status-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Badges de estado */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    width: fit-content;
}

.status-badge.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-card.pack-card .status-badge.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.status-badge.inactive {
    background: #e2e8f0;
    color: #64748b;
}

/* Detalles */
.status-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.detail-label {
    color: #64748b;
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

/* Notas */
.status-note {
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    color: #065f46;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    border-left: 4px solid #10b981;
}

.status-note.pack-note {
    background: rgba(139, 92, 246, 0.1);
    color: #5b21b6;
    border-left-color: #8b5cf6;
}

.status-description {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

/* Barra de progreso del pack */
.pack-progress {
    padding: 16px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 12px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #64748b;
}

.progress-numbers {
    color: #5b21b6;
}

.progress-numbers strong {
    font-size: 1.4rem;
    color: #7c3aed;
}

.progress-bar {
    height: 12px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* Botones de las tarjetas */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-premium:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    color: white;
}

.btn-pack-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-pack-buy:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    color: white;
}

/* SECCIONES DEL PERFIL */
.perfil-contenido {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.perfil-seccion {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 2px solid #e2e8f0;
}

.perfil-seccion h2 {
    font-size: 1.4rem;
    color: #1e293b;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
    font-weight: 700;
}

/* PRODUCTOS DESCARGABLES */
.productos-descarga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.producto-descarga-card {
    display: flex;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.producto-descarga-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.producto-descarga-imagen {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background: #e2e8f0;
}

.producto-descarga-info {
    flex: 1;
    padding: 12px 16px;
}

.producto-descarga-info h3 {
    font-size: 0.95rem;
    margin: 0 0 8px 0;
    color: #1e293b;
    font-weight: 600;
}

/* PEDIDOS */
.pedidos-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.pedido-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.pedido-item:hover {
    background: white;
    border-color: #cbd5e1;
}

.pedido-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pedido-numero {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pedido-numero strong {
    color: #1e293b;
}

.badge-tipo-suscripcion {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pedido-fecha {
    color: #64748b;
    font-size: 0.85rem;
}

.pedido-detalles {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pedido-productos {
    color: #64748b;
    font-size: 0.9rem;
}

.pedido-total {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
}

.pedido-estado {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pedido-estado-completado {
    background: #d1fae5;
    color: #065f46;
}

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

.pedido-estado-procesando {
    background: #dbeafe;
    color: #1e40af;
}

.pedido-estado-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .perfil-status-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .perfil-header-enhanced {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .perfil-avatar {
        width: 70px;
        height: 70px;
    }
    
    .avatar-icon {
        font-size: 35px;
    }
    
    .perfil-info h1 {
        font-size: 1.5rem;
    }
    
    .perfil-actions {
        width: 100%;
        justify-content: center;
    }
    
    .perfil-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .status-card {
        padding: 20px;
    }
    
    .status-icon {
        font-size: 28px;
    }
    
    .status-label {
        font-size: 1rem;
    }
    
    .perfil-seccion {
        padding: 20px;
    }
    
    .perfil-seccion h2 {
        font-size: 1.2rem;
    }
    
    .productos-descarga-grid {
        grid-template-columns: 1fr;
    }
    
    .pedido-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .pedido-detalles {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .perfil-header-enhanced {
        padding: 20px 16px;
    }
    
    .perfil-actions {
        flex-direction: column;
    }
    
    .perfil-actions .btn {
        width: 100%;
    }
    
    .status-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
