/* ===============================================
   ESTILOS PARA SISTEMA DE TICKETS MEJORADO
   Timeline, Comentarios, SLA y Dashboard
   =============================================== */

/* ========== TIMELINE ========== */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #e0e0e0 0%, #f5f5f5 100%);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1;
}

.timeline-content {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.timeline-content h6 {
    margin-bottom: 8px;
}

.timeline-content p {
    margin-bottom: 8px;
    color: #555;
}

/* ========== SLA PROGRESS ========== */
.sla-card {
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.sla-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.sla-success {
    border-color: #28a745;
}

.sla-warning {
    border-color: #ffc107;
}

.sla-danger {
    border-color: #dc3545;
}

/* ========== COMENTARIOS ========== */
.comentario-card {
    transition: all 0.3s ease;
}

.comentario-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.comentario-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* ========== MÉTRICAS DASHBOARD ========== */
.metric-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.metric-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.metric-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== TABS MEJORADOS ========== */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #495057;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: #0d6efd;
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background: transparent;
    border-bottom-color: #0d6efd;
    font-weight: 600;
}

.tab-content {
    padding: 20px 0;
}

/* ========== BADGES MEJORADOS ========== */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ========== CATEGORÍAS ========== */
.categoria-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ========== ANIMACIONES ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ========== LOADING SPINNER ========== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-marker {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .metric-icon {
        font-size: 2rem;
    }
    
    .metric-value {
        font-size: 1.8rem;
    }
}

/* ========== TOOLTIPS MEJORADOS ========== */
.custom-tooltip {
    position: relative;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.custom-tooltip:hover::after {
    opacity: 1;
}

/* ========== ESTADOS COLORIDOS ========== */
.estado-pendiente {
    background: #ffc107;
    color: #000;
}

.estado-en-proceso {
    background: #0dcaf0;
    color: #000;
}

.estado-resuelto {
    background: #198754;
    color: #fff;
}

.estado-cerrado {
    background: #6c757d;
    color: #fff;
}

/* ========== PRIORIDADES ========== */
.prioridad-critica {
    background: #dc3545;
    color: #fff;
}

.prioridad-alta {
    background: #fd7e14;
    color: #fff;
}

.prioridad-media {
    background: #ffc107;
    color: #000;
}

.prioridad-baja {
    background: #28a745;
    color: #fff;
}
