/* ===== OVERLAY FILA CHEIA ===== */
.fila-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    animation: overlayIn .4s ease-out;
}
.fila-overlay.hidden { display: none; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.fila-overlay-content {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 24px;
    padding: 40px 36px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    border: 1px solid rgba(255,255,255,.1);
}
.fila-overlay-emoji {
    font-size: 72px;
    animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.fila-overlay-titulo {
    font-size: 28px; font-weight: 800; color: #fff;
    margin-top: 16px;
}
.fila-overlay-msg {
    font-size: 16px; color: rgba(255,255,255,.7);
    margin-top: 12px; line-height: 1.5;
}
.fila-overlay-counter {
    margin-top: 24px;
    display: flex; align-items: baseline; justify-content: center; gap: 8px;
}
.fila-overlay-num {
    font-size: 64px; font-weight: 900; color: #f87171;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(248,113,113,.4);
}
.fila-overlay-label {
    font-size: 20px; color: rgba(255,255,255,.5); font-weight: 600;
}
.fila-overlay-bar-track {
    margin-top: 20px;
    height: 8px; background: rgba(255,255,255,.1);
    border-radius: 4px; overflow: hidden;
}
.fila-overlay-bar-fill {
    height: 100%; background: linear-gradient(90deg, #22c55e, #f87171);
    border-radius: 4px; transition: width .5s ease;
    width: 100%;
}
.fila-overlay-hint {
    margin-top: 16px;
    font-size: 13px; color: rgba(255,255,255,.35);
    font-style: italic;
}

/* ===== APONTAMENTO MOBILE ===== */

/* Cards resumo de lote */
.lotes-lista { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.lote-card {
    background: #fff; border-radius: 12px; padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1); cursor: pointer;
    border-left: 5px solid #1565C0; transition: transform .1s;
}
.lote-card:active { transform: scale(.98); }
.lote-card.lote-completo { border-left-color: #2E7D32; opacity: .7; }
.lote-card.lote-processando { border-left-color: #FF8F00; }
.lote-card-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.lote-card-titulo { font-size: 16px; font-weight: 700; color: #1565C0; }
.lote-card-badge {
    font-size: 11px; font-weight: 700; padding: 3px 8px;
    border-radius: 10px; text-transform: uppercase;
}
.lote-card-badge.pendente { background: #FFF3E0; color: #E65100; }
.lote-card-badge.processando { background: #E3F2FD; color: #1565C0; }
.lote-card-badge.completo { background: #E8F5E9; color: #2E7D32; }
.lote-card-stats {
    display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #546E7A;
}
.lote-card-stat { display: flex; align-items: center; gap: 4px; }
.lote-card-stat strong { font-size: 15px; }
.stat-total strong { color: #37474F; }
.stat-ok strong { color: #2E7D32; }
.stat-proc strong { color: #FF8F00; }
.stat-pend strong { color: #78909C; }
.stat-erro strong { color: #C62828; }
.stat-parada strong { color: #F9A825; }
.lotes-vazio { text-align: center; color: #90A4AE; padding: 40px 20px; font-size: 14px; }

/* Landing de seleção de módulo */
.apo-landing {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px 20px;
}
.apo-landing-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 20px;
    background: #1565C0;
    color: #fff;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
    font-size: 18px;
    font-weight: 700;
}
.apo-landing-btn-orange { background: #E65100; }
.apo-landing-icon { font-size: 28px; }
.apo-landing-btn:active { opacity: .85; }

/* Botão voltar */
.apo-voltar {
    padding: 8px 14px 0;
}
.apo-voltar-link {
    font-size: 14px;
    color: #1565C0;
    text-decoration: none;
    font-weight: 600;
}


.apo-search-bar {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #1565C0;
}
.apo-search-bar input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
}
.apo-btn-buscar {
    padding: 10px 18px;
    background: #FFA000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.apo-btn-scan-grande {
    flex: 1;
    padding: 14px 18px;
    background: #fff;
    color: #1565C0;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background 0.12s, transform 0.08s;
}
.apo-btn-scan-grande:hover { background: #E3F2FD; }
.apo-btn-scan-grande:active { transform: scale(0.98); }
.apo-btn-scan-grande:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Leitor QR (modal) ===== */
.qr-reader {
    width: 100%;
    min-height: 240px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}
.qr-status {
    font-size: 13px;
    color: #1565C0;
    margin: 8px 0 2px;
    text-align: center;
    font-weight: 600;
    min-height: 18px;
}
.qr-status.qr-erro { color: #C62828; }
.qr-status.qr-ok { color: #2E7D32; }
.qr-timer {
    font-size: 11px;
    color: #707880;
    text-align: center;
    margin: 0 0 8px;
    font-variant-numeric: tabular-nums;
    min-height: 14px;
}

/* Bloco de digitação manual dentro do modal — aparece só após 10s/erro */
.qr-manual {
    margin-top: 14px;
    padding: 12px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: 8px;
    animation: qrManualFadeIn 0.25s ease-out;
}
.qr-manual.hidden { display: none; }
@keyframes qrManualFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.qr-manual-titulo {
    font-size: 12px;
    font-weight: 700;
    color: #E65100;
    margin: 0 0 8px;
    text-align: center;
}
.qr-manual-input-row {
    display: flex;
    gap: 6px;
}
.qr-manual-input-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #FFB300;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
}
.qr-manual-input-row input:focus { border-color: #FF8F00; }
.qr-manual-input-row button {
    padding: 10px 16px;
    flex-shrink: 0;
}

.lote-resumo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #E3F2FD;
    font-size: 14px;
    flex-wrap: wrap;
}
.lote-resumo.hidden { display: none; }

/* Filtro por produto */
.apo-filtro {
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #E0E0E0;
}
.apo-filtro input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #CBD5E0;
    border-radius: 8px;
    font-size: 15px;
    background: #F7FAFC;
    outline: none;
}
.apo-filtro input:focus { border-color: #1565C0; background: #fff; }
.apo-filtro.hidden { display: none; }
#resumo-lote-num { font-weight: 700; color: #1565C0; }
#resumo-progresso { color: #555; }
.badge-finalizado {
    background: #2E7D32;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}
.badge-finalizado.hidden { display: none; }

/* Botão imprimir etiqueta + status */
.btn-imprimir-etiqueta {
    background: #1565C0;
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.btn-imprimir-etiqueta:hover { background: #0D47A1; }
.btn-imprimir-etiqueta:disabled { opacity: .55; cursor: default; }
.btn-imprimir-etiqueta.hidden { display: none; }

.imp-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.imp-status.hidden { display: none; }
.imp-status.imp-status-info { background: #E3F2FD; color: #0D47A1; }
.imp-status.imp-status-ok   { background: #E8F5E9; color: #1B5E20; }
.imp-status.imp-status-erro { background: #FFEBEE; color: #B71C1C; }

/* Tabs de etapas */
.apo-tabs {
    display: flex;
    background: #fff;
    border-bottom: 2px solid #E0E0E0;
    overflow-x: auto;
}
.apo-tab {
    flex: 1;
    padding: 11px 6px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.apo-tab.active {
    color: #1565C0;
    border-bottom-color: #1565C0;
}

/* Lista de OPs */
.apo-lista {
    padding: 10px 12px 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Card de OP */
.op-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    overflow: hidden;
    transition: opacity .3s;
}
.op-card.hidden { display: none; }
.op-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 6px;
}
.op-card-id {
    font-size: 12px;
    color: #888;
    font-weight: 600;
}
.op-card-etapa {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #E3F2FD;
    color: #1565C0;
    font-weight: 700;
}
.op-card-body {
    padding: 4px 14px 10px;
}
.op-card-produto {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}
.op-card-ref {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}
.op-card-qtd {
    font-size: 13px;
    color: #444;
    margin-top: 4px;
}

/* Status do card */
.op-status {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0 0 4px 4px;
    display: none;
    align-items: center;
    gap: 8px;
}
.op-status.na-fila {
    display: flex;
    background: #E3F2FD;
    color: #1565C0;
    font-weight: 500;
}
.op-status.processando {
    display: flex;
    background: #FFF8E1;
    color: #F57F17;
}
.op-status.ok {
    display: flex;
    background: #E8F5E9;
    color: #2E7D32;
    font-weight: 600;
}
.op-status.refugado {
    display: flex;
    background: #FFEBEE;
    color: #C62828;
    font-weight: 600;
}
.op-status.erro {
    display: flex;
    background: #FFEBEE;
    color: #C62828;
}
.op-status.cancelado {
    display: flex;
    background: #FAFAFA;
    color: #888;
}
.op-status.finalizado {
    display: flex;
    background: #E8F5E9;
    color: #2E7D32;
}

/* Spinner inline */
.spin {
    width: 14px; height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Botões do card */
.op-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 14px 12px;
    flex-wrap: wrap;
}
.op-card-actions.hidden { display: none; }
.btn-bom {
    flex: 1;
    padding: 10px;
    background: #2E7D32;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}
.btn-refugo {
    flex: 1;
    padding: 10px;
    background: #E65100;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}
.btn-cancelar-op {
    flex: 0 0 auto;
    padding: 10px 14px;
    background: #fff;
    color: #B71C1C;
    border: 1.5px solid #B71C1C;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}
.btn-parar-op {
    flex: 0 0 auto;
    padding: 10px 14px;
    background: #FBC02D;
    color: #3E2723;
    border: 1.5px solid #F9A825;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}
.btn-continuar-op {
    flex: 0 0 auto;
    padding: 10px 14px;
    background: #1976D2;
    color: #fff;
    border: 1.5px solid #1565C0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}
.btn-bom:disabled, .btn-refugo:disabled, .btn-cancelar-op:disabled,
.btn-parar-op:disabled, .btn-continuar-op:disabled {
    opacity: .4;
    cursor: default;
}
.op-parada-tag {
    margin: 0 14px 12px;
    padding: 6px 10px;
    background: #FFF3E0;
    color: #E65100;
    border-left: 3px solid #E65100;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.snk-textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    padding: 10px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 64px;
}
.snk-btn-warning {
    background: #E65100;
    color: #fff;
    border: none;
}
.snk-btn-warning:disabled { opacity: .4; cursor: default; }

/* FAB */
.apo-fab {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1565C0;
    color: #fff;
    border: none;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.apo-fab.hidden { display: none; }

/* ===== Modal base (não importado do style.css) ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-overlay.hidden { display: none; }
.modal-box {
    background: #fff;
    border-radius: 10px;
    width: 420px;
    max-width: 95vw;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    overflow: hidden;
}
.modal-header {
    background: #C62828;
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 15px;
}
.modal-body { padding: 16px; }
.modal-footer {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid #E0E0E0;
    background: #F7FAFC;
}

/* Botões do modal */
.snk-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border: 1px solid #CBD5E0;
    border-radius: 6px;
    background: #F0F4F8;
    color: #333;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    min-height: 40px;
}
.snk-btn:disabled { opacity: .45; cursor: default; }
.snk-btn-primary { background: #1565C0; border-color: #0D47A1; color: #fff; }
.snk-btn-danger  { background: #C62828; border-color: #B71C1C; color: #fff; }

/* Inputs do modal */
.snk-select, .field input, .field select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #CBD5E0;
    border-radius: 8px;
    font-size: 15px;
    background: #F7FAFC;
    font-family: inherit;
    outline: none;
}
.snk-select:focus, .field input:focus { border-color: #1565C0; background: #fff; }

/* Autocomplete */
.ac-wrap { position: relative; }
.ac-drop {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid #CBD5E0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    z-index: 200;
    max-height: 220px;
    overflow-y: auto;
}
.ac-drop.hidden { display: none; }
.ac-item {
    padding: 11px 14px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #F0F4F8;
}
.ac-item:active { background: #E3F2FD; }

/* Field label */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }

/* Modal nova OP — header verde */
#modal-op .modal-header { background: #2E7D32; }

/* Modal grande */
.modal-box-lg {
    max-width: 480px;
    width: 95vw;
}
.modal-desc {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
}
.op-msg {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 10px;
}
.op-msg.hidden { display: none; }
.op-msg.erro { background: #FFEBEE; color: #C62828; }
.op-msg.ok { background: #E8F5E9; color: #2E7D32; }

/* Produto Avulso (CQ) */
.avulso-section { margin-top: 16px; padding: 0 12px 100px; }
.avulso-section.hidden { display: none; }
.avulso-header {
    font-size: 13px; font-weight: 700; color: #E65100;
    text-transform: uppercase; letter-spacing: .5px;
    padding: 8px 2px; border-top: 2px solid #FFE0B2; margin-bottom: 8px;
}
.avulso-search { margin-bottom: 12px; }
.avulso-produto-atual {
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 12px;
    color: #6D4C41;
    background: #FFF3E0;
    border-radius: 6px;
    border-left: 3px solid #E65100;
}
.avulso-produto-atual.hidden { display: none; }
.avulso-produto-atual strong { color: #BF360C; }
.avulso-search input {
    width: 100%; padding: 10px 14px; border: 1.5px solid #E65100;
    border-radius: 8px; font-size: 15px; background: #FFF3E0;
    outline: none; box-sizing: border-box;
}
.avulso-search input:focus { border-color: #BF360C; background: #fff; }
.avulso-contexto {
    font-size: 13px; color: #fff; font-weight: 700;
    padding: 6px 10px; margin-bottom: 6px; border-radius: 6px;
    background: #E65100;
}
.avulso-contexto strong { font-size: 15px; }

/* Scroll infinito da listagem avulso */
.avulso-scroll-sentinel {
    height: 1px;
    width: 100%;
}
.avulso-scroll-sentinel.hidden { display: none; }
.avulso-loadmore {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: #E65100;
    font-size: 13px;
    font-weight: 600;
}
.avulso-loadmore.hidden { display: none; }
.avulso-fim {
    text-align: center;
    padding: 16px 8px 24px;
    color: #888;
    font-size: 12px;
    font-style: italic;
}
.avulso-fim.hidden { display: none; }

/* Abas do Apontamento Avulso */
.avulso-tabs {
    display: flex;
    background: #fff;
    border-bottom: 2px solid #FFE0B2;
    position: sticky;
    top: 52px;
    z-index: 5;
}
.avulso-tab {
    flex: 1;
    padding: 14px 8px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all .15s;
    position: relative;
}
.avulso-tab:hover { color: #E65100; background: #FFF3E0; }
.avulso-tab.ativo {
    color: #E65100;
    border-bottom-color: #E65100;
    background: #FFF3E0;
}
.avulso-tab-content { display: none; }
.avulso-tab-content.ativo { display: block; }

.avulso-badge {
    display: inline-block;
    background: #E65100;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
    min-width: 20px;
    text-align: center;
}
.avulso-badge.hidden { display: none; }
.avulso-badge-fila { background: #1976D2; }

.apo-fila-card {
    background: #fff;
    border: 1.5px solid #BBDEFB;
    border-left: 4px solid #1976D2;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.apo-fila-card .apo-fila-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #1976D2;
    font-weight: 700;
    margin-top: 6px;
}

.avulso-apontados-info {
    background: #FFF3E0;
    border: 1px dashed #FFB74D;
    color: #6D4C41;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.apo-apontado-card {
    background: #fff;
    border: 1.5px solid #E0E0E0;
    border-left: 4px solid #2E7D32;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.apo-apontado-card.refugo { border-left-color: #C62828; }
.apo-apontado-linha1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #212121;
}
.apo-apontado-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    background: #E8F5E9;
    color: #2E7D32;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.apo-apontado-tag.refugo { background: #FFEBEE; color: #C62828; }
.apo-apontado-produto {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
}
.apo-apontado-meta {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* Badges no header do card */
.badge-lote-parcial,
.badge-parada {
    display: inline-block;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-left: 6px;
    vertical-align: middle;
}
.badge-lote-parcial { background: #FF6F00; }
.badge-parada { background: #C62828; }

/* Erro expansível no card */
.op-status.erro {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}
.erro-resumo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.erro-icone { font-size: 15px; flex-shrink: 0; }
.erro-msg { flex: 1; font-size: 13px; }
.erro-expandir {
    background: none;
    border: none;
    color: #C62828;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.erro-expandir:active { background: #FFCDD2; }
.erro-detalhe {
    margin-top: 8px;
    padding: 10px;
    background: #FFF3F3;
    border-radius: 8px;
    border-left: 3px solid #C62828;
}
.erro-detalhe.hidden { display: none; }
.erro-detalhe-texto {
    font-size: 12px;
    color: #555;
    word-break: break-word;
    line-height: 1.5;
    margin-bottom: 8px;
}
.erro-copiar {
    background: #fff;
    border: 1px solid #C62828;
    color: #C62828;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.erro-copiar:active { background: #FFEBEE; }

/* Card fantasma (OP pendente na etapa anterior) */
.op-card.fantasma {
    opacity: .65;
    border: 1.5px dashed #FFA000;
    box-shadow: none;
}
.op-card.fantasma .op-card-produto,
.op-card.fantasma .op-card-ref,
.op-card.fantasma .op-card-qtd {
    color: #888;
}
.fantasma-aviso {
    display: flex !important;
    background: #FFF8E1;
    color: #E65100;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 0 0 12px 12px;
}
.fantasma-header {
    color: #E65100;
    border-bottom-color: #FFE0B2;
}

/* Sem OPs */
.apo-vazio {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 15px;
}

/* Divisor de etapa dentro da lista */
.etapa-header {
    font-size: 12px;
    font-weight: 700;
    color: #1565C0;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 6px 2px 2px;
    border-bottom: 1px solid #E3F2FD;
    margin-bottom: 4px;
}

/* ===== Botão "Reimprimir etiqueta" dentro do card de OP apontada (Roto) ===== */
/* Aparece à direita do badge "✔ Apontado" quando o lote está finalizado.
   Permite reimprimir só a etiqueta da OP caso uma etiqueta tenha dado erro,
   sem desperdiçar o restante do lote. */
.btn-reimp-card {
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid #2E7D32;
    border-radius: 6px;
    background: #fff;
    color: #2E7D32;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
    white-space: nowrap;
}
.btn-reimp-card:hover:not(:disabled) {
    background: #2E7D32;
    color: #fff;
}
.btn-reimp-card:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    border-color: #B6BDC4;
    color: #888;
}
.btn-reimp-card.reimprimindo {
    background: #FFF8E1;
    border-color: #F57F17;
    color: #F57F17;
}
