/* ===================================
   PEDIDOS - ESTILOS
   =================================== */

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: 16px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--gray-500);
    z-index: 1;
}

.timeline-item.completed .timeline-icon {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.timeline-item.active .timeline-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.timeline-content h4 {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-900);
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 12px;
    color: var(--gray-500);
}

.timeline-content.completed h4 {
    color: var(--success);
}

.timeline-content.active h4 {
    color: var(--primary);
}

/* Status Steps */
.status-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0;
    padding: 0 20px;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.status-step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: var(--gray-200);
    z-index: 0;
}

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

.status-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-100);
    border: 3px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gray-500);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    transition: all var(--transition-base);
}

.status-step.completed .status-step-icon {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.status-step.active .status-step-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 6px rgba(var(--primary-rgb), 0.15);
}

/* Status Step Clicável */
.status-step[onclick] {
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-step[onclick]:hover .status-step-icon {
    background: var(--warning);
    border-color: var(--warning);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.status-step[onclick]:hover .status-step-label {
    color: var(--warning);
    font-weight: var(--font-weight-bold);
}

.status-step[onclick]::before {
    content: '👆 Clique para avançar';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--warning);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.status-step[onclick]:hover::before {
    opacity: 1;
}

.status-step-label {
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-500);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-step.completed .status-step-label,
.status-step.active .status-step-label {
    color: var(--gray-900);
}

/* Pedido Card */
.pedido-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
    cursor: pointer;
}

.pedido-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.pedido-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.pedido-numero {
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
}

.pedido-card-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.pedido-info-item {
    display: flex;
    flex-direction: column;
}

.pedido-info-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pedido-info-value {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-900);
}

.pedido-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.pedido-valor {
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    color: var(--success);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 8px;
}

.btn-quick-action {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-quick-action:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-quick-action.success {
    background: rgba(52, 199, 89, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.btn-quick-action.success:hover {
    background: var(--success);
    color: var(--white);
}

/* Detalhes do Pedido */
.pedido-detalhes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.detalhe-section {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--radius-md);
}

.detalhe-section h4 {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-900);
    margin-bottom: 12px;
}

.detalhe-linha {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-200);
}

.detalhe-linha:last-child {
    border-bottom: none;
}

.detalhe-label {
    color: var(--gray-600);
}

.detalhe-valor {
    font-weight: var(--font-weight-semibold);
    color: var(--gray-900);
}

/* Itens do Pedido */
.pedido-itens-lista {
    margin-top: 16px;
}

.item-pedido {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid var(--gray-200);
}

.item-pedido-info h5 {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-900);
    margin-bottom: 4px;
}

.item-pedido-info p {
    font-size: 12px;
    color: var(--gray-500);
}

.item-pedido-valor {
    text-align: right;
}

.item-pedido-preco {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    color: var(--success);
}

/* Form de Atualização */
.update-form {
    background: var(--gray-50);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-top: 20px;
}

.update-form h4 {
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    color: var(--gray-900);
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .pedido-detalhes {
        grid-template-columns: 1fr;
    }
    
    .status-steps {
        flex-wrap: wrap;
    }
    
    .status-step {
        flex: 0 0 50%;
        margin-bottom: 20px;
    }
    
    .status-step::after {
        display: none;
    }
    
    .pedido-card-body {
        grid-template-columns: 1fr;
    }
}
