/* Estilos adicionales para el módulo de Postventa - Color corporativo #3E75B4 */
:root {
    --primary-color: #3E75B4;
    --primary-dark: #2a5a94;
    --primary-light: #5a8bc7;
    --primary-lightest: #a8c5e8;
    --accent-color: #4a82c4;
    --bg-light: #f8fafe;
    --bg-lighter: #e8f0fc;
}

/* Animaciones suaves */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.postventa-card {
    animation: fadeInUp 0.8s ease-out;
}

/* Estados de hover mejorados */
.form-control:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(62, 117, 180, 0.15);
}

.upload-area.dragover {
    border-color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(62, 117, 180, 0.15) 0%, rgba(42, 90, 148, 0.15) 100%);
    transform: scale(1.02);
}

/* Estilos para validación */
.form-control.is-invalid {
    border-color: #dc3545;
    animation: pulse 0.5s;
}

.form-control.is-valid {
    border-color: #28a745;
}

/* Mejoras para dispositivos móviles */
@media (max-width: 576px) {
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .btn-postventa {
        padding: 1rem 2rem;
        font-size: 14px;
    }
}

/* Estados de carga */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Estilos para archivos adjuntos */
.file-item {
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

/* Iconos por tipo de archivo */
.file-item i.fa-file::before {
    content: "\f15b";
}

.file-item[data-type="pdf"] i.fa-file::before {
    content: "\f1c1";
    color: #dc3545 !important;
}

.file-item[data-type="image"] i.fa-file::before {
    content: "\f1c5";
    color: #28a745 !important;
}

.file-item[data-type="video"] i.fa-file::before {
    content: "\f1c8";
    color: #fd7e14 !important;
}

.file-item[data-type="document"] i.fa-file::before {
    content: "\f1c2";
    color: #3E75B4 !important;
}

/* Mejoras en la barra de progreso */
.progress-custom {
    position: relative;
    overflow: visible;
}

.progress-bar-custom::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Efectos visuales adicionales */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

/* Tooltip personalizado */
.tooltip-custom {
    position: relative;
    display: inline-block;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Estilos para elementos de estado */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new {
    background: rgba(62, 117, 180, 0.1);
    color: var(--primary-color);
}

.status-processing {
    background: #fff3e0;
    color: #f57c00;
}

.status-completed {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-urgent {
    background: #ffebee;
    color: #c62828;
    animation: pulse 2s infinite;
}

/* Mejoras en la tipografía */
.section-title {
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

/* Efectos de entrada escalonada para las cards */
.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Botón flotante para ayuda (opcional) */
.help-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(62, 117, 180, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.help-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(62, 117, 180, 0.5);
}

/* Responsive adjustments para tablets */
@media (max-width: 992px) {
    .postventa-card {
        margin: 1rem 0;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Estilos para impresión */
@media print {
    .btn-postventa,
    .upload-area,
    .help-button {
        display: none !important;
    }
    
    .postventa-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}