/* 
 * RECAP.PRO - Ordem de Serviço de Recapagem
 * Design focado em formulário estruturado e grid de pneus
 */

.recap-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    padding: 0;
}

.recap-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Seções do Formulário */
.recap-section {
    margin-bottom: 25px;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 4px;
    position: relative;
}

.recap-section-title {
    position: absolute;
    top: -10px;
    left: 10px;
    background: #fff;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    color: #0078d4;
    text-transform: uppercase;
}

.recap-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.recap-field {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.recap-field label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.recap-field input, .recap-field select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ccc;
    border-radius: 2px;
    outline: none;
}

.recap-field input:focus { border-color: #0078d4; }

/* Grid de Pneus */
.recap-tires-grid {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

/* Footer de Ações */
.recap-footer {
    height: 60px;
    background: #f3f3f3;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 20px;
    gap: 10px;
}

/* ============================================
   EXECUÇÃO DE OS - Timeline de Produção
   ============================================ */

.exec-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f5f5f5;
}

.exec-header {
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exec-info h2 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
}

.exec-info p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.exec-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.exec-timeline {
    width: 100%;
}

.exec-timeline table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.exec-timeline th {
    background: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.exec-timeline td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.exec-timeline tr:hover td {
    background: #fafafa;
}

.exec-timeline tr.exec-item-concluido td {
    background: #f1f8e9;
}

.exec-timeline tr.exec-item-andamento td {
    background: #fff8e1;
}

.exec-timeline tr.exec-item-bloqueado td {
    background: #f5f5f5;
    opacity: 0.7;
}

.exec-empty {
    text-align: center;
    color: #666;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
}

.exec-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pendente {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-andamento {
    background: #fff3e0;
    color: #f57c00;
}

.badge-concluido {
    background: #e8f5e9;
    color: #388e3c;
}

.badge-bloqueado {
    background: #f5f5f5;
    color: #999;
}

.exec-timer {
    font-size: 16px;
    font-weight: 700;
    font-family: monospace;
    color: #f57c00;
}

.exec-check {
    font-size: 18px;
    color: #4caf50;
}

.exec-bloqueado {
    color: #999;
    font-size: 12px;
}

.exec-progress {
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.exec-progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 15px;
}

.exec-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0078d4, #00b050);
    border-radius: 3px;
    transition: width 0.3s;
}

.exec-progress-bar-container {
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.exec-progress-bar-container .exec-progress-bar {
    flex: 1;
    margin-bottom: 0;
}

.exec-progress-text {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.exec-op-info {
    background: linear-gradient(135deg, #0078d4, #005a9e);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.exec-op-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.exec-op-info h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.exec-op-info p {
    margin: 0 0 8px 0;
    font-size: 12px;
    opacity: 0.9;
}

.exec-op-tempo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    background: rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 6px;
}

.exec-passos {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
}

.exec-passos-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.exec-passos h5 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
}

.exec-passo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.exec-passo.current {
    border-color: #0078d4;
    background: #e3f2fd;
}

.exec-passo.done {
    background: #e8f5e9;
    border-color: #4caf50;
}

.exec-passo-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #999;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.exec-passo.current .exec-passo-num {
    background: #0078d4;
}

.exec-passo.done .exec-passo-num {
    background: #4caf50;
}

.exec-passo-nome {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.exec-passo-tempo {
    font-size: 11px;
    color: #666;
}

.exec-op-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
}

.exec-op-status.done {
    background: #e8f5e9;
    color: #388e3c;
}

.exec-op-status.running {
    background: #fff3e0;
    color: #f57c00;
}

.exec-passo i {
    font-size: 16px;
    color: #4caf50;
}

.exec-passo.current i {
    color: #0078d4;
}

.exec-timer-grande {
    text-align: center;
    padding: 15px;
    background: #fff8e1;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.exec-timer-grande div {
    text-align: left;
}

.exec-timer-grande div strong {
    display: block;
    font-size: 14px;
    color: #333;
}

.exec-timer-grande div small {
    font-size: 11px;
    color: #666;
}

.exec-timer-grande i {
    font-size: 24px;
    color: #f57c00;
}

.exec-timer-grande span {
    font-size: 32px;
    font-weight: 700;
    font-family: monospace;
    color: #f57c00;
}

.exec-concluido-msg {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #388e3c;
    font-weight: 600;
}

.exec-concluido-msg i {
    font-size: 18px;
}

.exec-operacoes-flow {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.exec-op-flow-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.2s;
}

.exec-op-flow-item.active {
    background: #e3f2fd;
    border: 2px solid #0078d4;
}

.exec-op-flow-item.done {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.exec-op-num {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #999;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.exec-op-flow-item.active .exec-op-num {
    background: #0078d4;
}

.exec-op-flow-item.done .exec-op-num {
    background: #4caf50;
}

.exec-op-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.exec-op-count {
    font-size: 11px;
    color: #666;
}

.exec-operacao-atual {
    background: linear-gradient(135deg, #0078d4, #005a9e);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.exec-op-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 4px;
}

.exec-operacao-atual h3 {
    margin: 0;
    font-size: 18px;
}

.exec-operacao-atual p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.exec-op-tempo-min {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    background: rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 6px;
}

.exec-item-op {
    background: #0078d4;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.exec-footer {
    background: #fff;
    padding: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.btn-lg {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 700;
}

/* ============================================
   OPERACOES RECAP MODULE
   ============================================ */

.op-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f5f5f5;
}

.op-header {
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.op-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.op-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

.op-content table {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 14px;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.sequence-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.sequence-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.2s;
}

.sequence-item:hover {
    background: #e9ecef;
    border-color: #0078d4;
}

.sequence-item:hover .sequence-num {
    background: #0078d4;
    color: #fff;
}

.sequence-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0078d4;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}

.sequence-name {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sequence-name small {
    color: #666;
    font-size: 12px;
}

.sequence-actions {
    display: flex;
    gap: 4px;
}

.sequence-actions .btn {
    padding: 4px 8px;
    min-width: 30px;
}
