/* =============================================================================
   Gestão de Documentos — Processos Comerciais
   ============================================================================= */

/* Pipeline Visual */
.process-pipeline {
    padding: 0.75rem 0;
}

.process-pipeline > div {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    min-width: 90px;
}

.pipeline-step::after {
    content: '';
    position: absolute;
    top: 10px;
    left: calc(50% + 12px);
    right: calc(-50% + 12px);
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.pipeline-step:last-child::after {
    display: none;
}

.pipeline-step.completed::after {
    background: var(--step-color, var(--green-500));
}

.pipeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gray-200);
    border: 2px solid var(--gray-300);
    position: relative;
    z-index: 1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pipeline-dot svg {
    width: 10px;
    height: 10px;
}

.pipeline-step.completed .pipeline-dot {
    background: var(--step-color, var(--green-500));
    border-color: var(--step-color, var(--green-500));
}

.pipeline-step.completed .pipeline-dot svg {
    color: white;
}

.pipeline-step.active .pipeline-dot {
    background: white;
    border: 3px solid var(--step-color, var(--primary-500));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--step-color, var(--primary-500)) 20%, transparent);
}

.pipeline-label {
    font-size: 0.65rem;
    color: var(--gray-400);
    text-align: center;
    margin-top: 0.4rem;
    line-height: 1.2;
    max-width: 80px;
}

.pipeline-step.active .pipeline-label {
    color: var(--step-color, var(--primary-600));
    font-weight: 600;
}

.pipeline-step.completed .pipeline-label {
    color: var(--step-color, var(--green-600));
}

/* Estágio pulado - cinza bem apagado (opacity ~0.3 effect) */
.pipeline-step.skipped .pipeline-dot {
    background: #e5e7eb;
    border-color: #e5e7eb;
    opacity: 0.5;
}

.pipeline-step.skipped .pipeline-dot::after {
    content: '';
}

.pipeline-step.skipped .pipeline-label {
    color: #d1d5db;
    opacity: 0.6;
}

.pipeline-step.skipped::after {
    background: #f3f4f6;
    opacity: 0.5;
}

/* Estágio pendente - vermelho com opacidade */
.pipeline-step.pending .pipeline-dot {
    background: rgba(239, 68, 68, 0.6);
    border-color: rgba(239, 68, 68, 0.8);
}

.pipeline-step.pending .pipeline-dot svg {
    color: white;
}

.pipeline-step.pending .pipeline-label {
    color: rgba(239, 68, 68, 0.8);
    font-weight: 500;
}

.pipeline-step.pending::after {
    background: rgba(254, 202, 202, 0.6);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-500);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
    font-weight: 500;
}

/* Modal XL */
.modal-xl {
    max-width: 900px !important;
}

/* Form section in modals */
.form-section {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--gray-25, #fafafa);
    border-radius: 8px;
    border: 1px solid var(--gray-100);
}

.form-section h4 {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Process table row hover */
#processes-list tr:hover {
    background: var(--gray-25, #fafafa);
}

/* Stat cards clicáveis */
.stat-card-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-300);
}

.stat-card-clickable:active {
    transform: translateY(0);
}

/* Badge de estágio alinhado */
.badge {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
