/* ============================================================
   ENTRADA DE NOTAS — conferência de recebimento (mobile-first)
   Segue os tokens de css/variables.css e padrões do fiscal.css.
   ============================================================ */

/* ── Filtros / busca ── */
.en-filtros { padding: 14px; }
.en-busca-row { display: flex; gap: 10px; flex-wrap: wrap; }
.en-busca-row .form-input { flex: 1 1 240px; }

.en-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.en-chip-filtro {
  border: 1px solid var(--border, #d5dcd5); background: var(--bg2, #fff);
  color: var(--text2, #444); border-radius: 999px; padding: 5px 12px;
  font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.en-chip-filtro b { margin-left: 3px; }
.en-chip-filtro.ativa {
  background: var(--verde-escuro, #1d6b33); color: #fff; border-color: var(--verde-escuro, #1d6b33);
}

/* ── Cards da fila ── */
.en-lista { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.en-card {
  background: var(--bg2, #fff); border: 1px solid var(--border, #e2e6e2);
  border-radius: 10px; padding: 12px 14px; cursor: pointer;
  transition: box-shadow .15s ease;
}
.en-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.en-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.en-card-forn { font-size: 14.5px; }
.en-card-meta {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px;
  font-size: 13px; color: var(--text2, #555);
}
.en-card-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

/* ── Chips de etapa/situação ── */
.en-chip {
  display: inline-block; border-radius: 999px; padding: 2.5px 10px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.en-chip-cinza    { background: #eceff0; color: #5a6468; }
.en-chip-azul     { background: #e1edfb; color: #1d5ba6; }
.en-chip-amarelo  { background: #fdf3d7; color: #8a6d1a; }
.en-chip-verde    { background: #e2f4e6; color: #1d6b33; }
.en-chip-vermelho { background: #fbe3e3; color: #a62222; }
.en-chip-laranja  { background: #fdeada; color: #a65b1d; }

.en-assin { font-size: 12px; color: var(--text2, #556); }
.en-mini  { font-size: 11.5px; color: var(--text3, #778); }

/* ── Modal da conferência ── */
.en-modal { max-height: 92vh; overflow-y: auto; }
.en-sec { margin-top: 16px; border-top: 1px solid var(--border, #e5e9e5); padding-top: 12px; }
.en-sec-title { font-weight: 800; font-size: 13.5px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.en-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.en-correcao {
  background: #fbe3e3; color: #7c2020; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; margin-bottom: 10px;
}

/* Stepper da esteira */
.en-stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.en-step { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--text3, #889); }
.en-step-dot { width: 10px; height: 10px; border-radius: 50%; background: #d4d9d4; display: inline-block; }
.en-step-feita  { color: var(--verde-escuro, #1d6b33); }
.en-step-feita .en-step-dot { background: var(--verde-escuro, #1d6b33); }
.en-step-atual  { color: #a65b1d; }
.en-step-atual .en-step-dot { background: #e8912d; box-shadow: 0 0 0 3px #fdeada; }
.en-step-sep { flex: 0 0 14px; height: 2px; background: #e0e4e0; }

/* Tabela de itens — rola horizontal no celular */
.en-itens-wrap { overflow-x: auto; }
.en-itens { width: 100%; border-collapse: collapse; min-width: 720px; }
.en-itens th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text3, #778); padding: 6px 6px; border-bottom: 1px solid var(--border, #e2e6e2);
}
.en-itens td { padding: 6px 6px; border-bottom: 1px solid var(--border, #eef1ee); vertical-align: top; }
.en-itens .en-in { min-width: 84px; padding: 6px 8px; font-size: 13px; }
.en-itens .en-qtd { max-width: 96px; }
.en-prod { min-width: 160px; font-size: 13px; }

/* Ocorrências */
.en-ocorrencia {
  border: 1px solid var(--border, #e2e6e2); border-left: 4px solid #b9c2b9;
  border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px;
  display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap;
}
.en-ocorrencia.aberta { border-left-color: #d24a4a; background: #fdf7f7; }

/* Checklist de transferência */
.en-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 8px 0; flex-wrap: wrap; }
.en-check input[type="checkbox"] { width: 18px; height: 18px; }
.en-ref { max-width: 180px; padding: 5px 8px; font-size: 12.5px; }

/* Timeline */
.en-timeline { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; }
.en-tl-item { font-size: 12.5px; color: var(--text2, #555); }
.en-tl-quando { color: var(--text3, #889); margin-right: 6px; font-variant-numeric: tabular-nums; }

/* Mobile */
@media (max-width: 640px) {
  .en-busca-row .btn { width: 100%; }
  .en-card-meta { gap: 10px; }
  .en-modal { max-height: 96vh; }
}

/* ── Leitor de código de barras (câmera) ── */
.en-scan-ov {
  position: fixed; inset: 0; z-index: 100002; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.en-scan-ov video { width: 100%; height: 100%; object-fit: cover; }
.en-scan-frame {
  position: absolute; left: 8%; right: 8%; top: 42%; height: 16%;
  border: 3px solid #99D420; border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.35); pointer-events: none;
}
.en-scan-hint {
  position: absolute; top: 24%; left: 0; right: 0; text-align: center;
  color: #fff; font-size: 15px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.en-scan-cancel {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #fff !important; z-index: 2;
}
