/* Estilos para el dashboard de usuario - Tabla profesional */
.pqr-professional-table {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
}

.pqr-table-header {
    background: linear-gradient(135deg, #000000 0%, #005a87 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pqr-table-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pqr-table-actions {
    display: flex;
    gap: 10px;
}

.pqr-table-container {
    overflow-x: auto;
}

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

.pqr-table-container th,
.pqr-table-container td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.pqr-table-container th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.pqr-col-id {
    width: 80px;
    font-weight: bold;
}

.pqr-col-fecha {
    width: 140px;
}

.pqr-col-asunto {
    min-width: 200px;
}

.pqr-col-tipo {
    width: 120px;
}

.pqr-col-estado {
    width: 120px;
}

.pqr-col-producto {
    min-width: 200px;
}

.pqr-col-acciones {
    width: 100px;
}

.pqr-subject-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pqr-title {
    font-weight: 600;
    color: #333;
}

.pqr-content-preview {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.pqr-type-badge,
.pqr-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

.pqr-type-badge.type-peticion {
    background: #e3f2fd;
    color: #1976d2;
}

.pqr-type-badge.type-queja {
    background: #fff3e0;
    color: #f57c00;
}

.pqr-type-badge.type-reclamo {
    background: #ffebee;
    color: #d32f2f;
}

.pqr-type-badge.type-sugerencia {
    background: #ffebee;
    color: #dc3545;
}

.pqr-type-badge.type-general {
    background: #e8f5e8;
    color: #2e7d32;
}

.pqr-status-badge.status-pendiente {
    background: #fff3cd;
    color: #856404;
}

.pqr-status-badge.status-en-proceso {
    background: #cce5ff;
    color: #0066cc;
}

.pqr-status-badge.status-resuelto {
    background: #d4edda;
    color: #155724;
}

.pqr-status-badge.status-cerrado {
    background: #f8d7da;
    color: #721c24;
}

.pqr-product-info {
    font-size: 12px;
    line-height: 1.4;
}

.pqr-product-info > div {
    margin-bottom: 3px;
}

.pqr-product-info strong {
    color: #333;
    font-weight: 600;
}

.pqr-category,
.pqr-quantity,
.pqr-purchase-date,
.pqr-invoice,
.pqr-used-product,
.pqr-original-package {
    color: #666;
    font-size: 11px;
}

.pqr-no-product {
    color: #999;
    font-style: italic;
    font-size: 12px;
}

.pqr-actions {
    display: flex;
    gap: 5px;
}

.pqr-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.pqr-no-results h4 {
    color: #333;
    margin-bottom: 10px;
}

/* Estilos para el popup de detalles mejorado */
.pqr-details-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.pqr-modal-title-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pqr-modal-title-section h3 {
    margin: 0;
    color: white;
    font-size: 20px;
}

.pqr-modal-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pqr-modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pqr-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.pqr-detail-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.pqr-detail-section h4 {
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
}

.pqr-detail-section h5 {
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
    margin: 15px 0 8px 0;
}

.pqr-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.pqr-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pqr-detail-row strong {
    color: #495057;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pqr-detail-row span {
    color: #333;
    font-size: 14px;
    word-break: break-word;
}

.pqr-content-text {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    line-height: 1.6;
    color: #333;
    font-size: 14px;
}

.pqr-checkbox-value {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.pqr-checkbox-value.si {
    background: #d4edda;
    color: #155724;
}

.pqr-checkbox-value.no {
    background: #f8d7da;
    color: #721c24;
}

.pqr-attachments-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pqr-attachment-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
}

.pqr-attachment-item a {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pqr-attachment-item a:hover {
    color: #005a87;
    text-decoration: underline;
}

.pqr-response-section {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-color: #28a745;
}

.pqr-response-section h4 {
    color: #155724;
    border-bottom-color: #28a745;
}

.pqr-response-date {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 12px;
}

.pqr-response-content {
    background: white;
    border: 1px solid #28a745;
    border-radius: 6px;
    padding: 15px;
    line-height: 1.6;
    color: #155724;
    font-size: 14px;
}

.pqr-no-response-section {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

.pqr-no-response-section h4 {
    color: #856404;
    border-bottom-color: #ffc107;
}

.pqr-no-response {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    color: #856404;
    font-style: italic;
}

.pqr-popup-btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pqr-popup-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.pqr-popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

/* Responsive para dashboard de usuario */
@media (max-width: 768px) {
    .pqr-table-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .pqr-table-container {
        font-size: 12px;
    }
    
    .pqr-col-asunto,
    .pqr-col-producto {
        min-width: 150px;
    }
    
    .pqr-details-modal-content {
        max-width: 95vw;
        margin: 10px;
    }
    
    .pqr-details-grid {
        grid-template-columns: 1fr;
    }
    
    .pqr-modal-title-section {
        text-align: center;
    }
    
    .pqr-popup-footer {
        flex-direction: column;
        gap: 10px;
    }
}
