/* ==================== COMPONENTE DE TIMELINE ==================== */
.timeline-container {
    position: fixed;
    right: -350px; /* Escondido por padrão */
    top: 60px; /* Abaixo do header */
    width: 350px;
    height: calc(100vh - 60px);
    background: var(--bg-card, #ffffff);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color, #e0e0e0);
}

.timeline-container.is-visible {
    right: 0;
}

.timeline-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-sidebar, #f8f9fa);
}

.timeline-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary, #333);
}

.btn-close-timeline {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary, #666);
    padding: 5px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.btn-close-timeline:hover {
    color: var(--primary-color, #0056b3);
}

.timeline-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Itens da Timeline */
.timeline-item {
    position: relative;
    padding-left: 30px;
    padding-bottom: 2rem;
    border-left: 2px solid var(--border-color, #e0e0e0);
}

.timeline-item:last-child {
    border-left: 2px solid transparent;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color, #0056b3);
    border: 2px solid var(--bg-card, #fff);
}

.timeline-item.criou::before { background: #28a745; }
.timeline-item.editou::before { background: #ffc107; }
.timeline-item.status_alt::before { background: #17a2b8; }

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-secondary, #999);
    margin-bottom: 0.3rem;
    display: block;
}

.timeline-user {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary, #333);
}

.timeline-action {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
}

.timeline-details {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-body, #f4f6f9);
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Botão Flutuante para Abrir */
.btn-toggle-timeline {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color, #0056b3);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.btn-toggle-timeline:hover {
    transform: scale(1.1);
    background: var(--primary-color-dark, #004494);
}

.btn-toggle-timeline svg {
    width: 24px;
    height: 24px;
}
