/* ===========================================================================
   731: SITUACAO DO PEDIDO — escopo .st (tela), .st-modal (janelas) e os botoes de busca rapida
   do menu lateral (.sl-busca-rapida) e da barra do celular. Sem transicoes nem animacoes.
   Layout pela LARGURA DISPONIVEL (container query em .st): o menu lateral come espaco.
   =========================================================================== */
.st, .st-modal { color: var(--slate-900); }
.st *, .st-modal *, .st *::before, .st *::after { box-sizing: border-box; }
.st button, .st-modal button { font: inherit; cursor: pointer; }
.st button:disabled, .st-modal button:disabled { opacity: .6; cursor: default; }
.st { container-type: inline-size; display: flex; flex-direction: column; gap: 16px; max-width: 1120px; margin: 0 auto; }
.st-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-topo h1 { margin: 0; font-size: 22px; }
.st-topo > div:first-child { margin-right: auto; }
.st-card { background: var(--branco); border: 1px solid var(--slate-200); border-radius: 16px; padding: 20px; }
.st-card h2 { font-size: 14px; letter-spacing: .04em; color: var(--slate-700); margin: 0 0 12px; }
.st-btn-sec { appearance: none; border: 1px solid var(--slate-300); background: var(--branco); color: var(--slate-800); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.st-btn-sec:hover { border-color: var(--blue-700); color: var(--blue-700); }
.st-btn { appearance: none; border: 1px solid var(--blue-700); background: var(--blue-700); color: var(--branco); border-radius: 10px; padding: 8px 14px; font-weight: 800; font-size: 14px; }
.st-kbd { font-size: 12px; border: 1px solid var(--slate-300); border-radius: 6px; padding: 1px 6px; color: var(--slate-600); font-weight: 600; background: var(--slate-50); }
.st-dica { margin: 10px 2px; color: var(--slate-500); font-size: 14px; }
.st-erro { color: var(--red-700); font-weight: 600; }
.st-erro:empty { display: none; }
.st-nota { font-size: 12.5px; color: var(--slate-500); margin: 8px 0 0; line-height: 1.4; }
.st-fora { position: fixed; left: -9999px; top: 0; }

/* campo de busca */
.st-campo { display: flex; align-items: center; gap: 10px; border: 1px solid var(--slate-300); border-radius: 12px; padding: 10px 14px; background: var(--slate-50); }
.st-campo:focus-within { border-color: var(--blue-700); background: var(--branco); }
/* 735: o campo de dentro nao tem borda propria (o estilo geral de input desenhava uma caixa dentro da caixa) */
.st-campo input, .st-campo input:focus { flex: 1; min-width: 0; border: 0; outline: 0; box-shadow: none; background: transparent; font-size: 16px; color: var(--slate-900); padding: 4px 0; border-radius: 0; }
.st-campo input::-webkit-search-cancel-button { cursor: pointer; }
.st-campo-grande { padding: 14px 18px; border-width: 2px; border-radius: 14px; background: var(--branco); }
.st-campo-grande input, .st-campo-grande input:focus { font-size: 19px; }
.st-campo-grande:focus-within { box-shadow: 0 0 0 4px var(--blue-100); }
.st-lupa { font-size: 20px; }
.st-busca { padding: 18px 20px; }
.st-res-tit { margin: 2px 2px 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--slate-500); text-transform: uppercase; }
.st-esc { appearance: none; border: 1px solid var(--slate-300); background: var(--branco); border-radius: 6px; font-size: 12px; padding: 2px 8px; color: var(--slate-600); }

/* resultados */
.st-res { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 60vh; overflow-y: auto; }
.st-res-tela { max-height: none; }
.st-item { appearance: none; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid transparent; background: var(--branco); border-radius: 10px; padding: 10px 12px; color: var(--slate-900); }
.st-item:hover, .st-item-sel { background: var(--blue-50); border-color: var(--blue-200); }
.st-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-item-txt b { font-size: 15px; overflow-wrap: anywhere; }
.st-item-txt small { color: var(--slate-500); font-size: 12.5px; overflow-wrap: anywhere; }

/* selo da etapa */
.st-selo { font-weight: 800; border-radius: 999px; padding: 4px 10px; font-size: 11.5px; white-space: nowrap; }
.st-selo-grande { padding: 8px 16px; font-size: 14px; }
.st-selo-azul { background: var(--blue-100); color: var(--blue-800); }
.st-selo-roxo { background: var(--violet-100); color: var(--violet-800); }
.st-selo-ciano { background: var(--cyan-100); color: var(--cyan-800); }
.st-selo-verde { background: var(--green-100); color: var(--green-800); }
.st-selo-vermelho { background: var(--red-100); color: var(--red-800); }
/* 798: as mesmas cores dos blocos (Novo cinza, Pendente laranja) */
.st-selo-cinza { background: var(--slate-200); color: var(--slate-700); }
.st-selo-laranja { background: var(--orange-100); color: var(--orange-800); }

/* cabecalho do pedido */
.st-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.st-cab-esq { min-width: 0; flex: 1 1 360px; }
.st-cab h1 { margin: 0; font-size: 24px; overflow-wrap: anywhere; }
.st-cab p { margin: 4px 0 0; color: var(--slate-600); }
.st-cab-dir { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.st-copiar { appearance: none; border: 1px solid var(--green-600); color: var(--green-800); background: var(--branco); border-radius: 10px; padding: 8px 12px; font-weight: 800; font-size: 13px; }
.st-copiar:hover { background: var(--green-50); }
.st-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.st-chip { appearance: none; font-size: 12.5px; border: 1px solid var(--slate-300); border-radius: 999px; padding: 4px 10px; color: var(--slate-700); background: var(--branco); display: inline-flex; align-items: center; gap: 4px; }
.st-outros-aviso { margin: 8px 0 0; }
.st-link { appearance: none; border: 0; background: none; padding: 2px 0; color: var(--blue-700); font-weight: 700; font-size: 14px; }
.st-link:hover { text-decoration: underline; }
.st-num { display: inline-block; min-width: 22px; text-align: center; border-radius: 999px; padding: 0 7px; margin-left: 4px; font-size: 12px; background: var(--slate-200); color: var(--slate-600); }
.st-ped { display: flex; flex-direction: column; }
.st-ped-item { appearance: none; display: grid; grid-template-columns: 170px minmax(0, 1fr) 130px auto 16px; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--slate-100); background: var(--branco); padding: 11px 6px; color: var(--slate-900); font-size: 14px; }
.st-ped-item:hover { background: var(--slate-50); }
.st-ped-item small { display: block; color: var(--slate-500); font-size: 12.5px; margin-top: 2px; }
.st-ped-prod { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.st-ped-valor { text-align: right; font-weight: 700; }
.st-ped-valor small { font-weight: 500; }
.st-ped-seta { color: var(--slate-400); font-size: 20px; }
.st-ped-mais { margin-top: 12px; }
.st-x { appearance: none; border: 0; background: none; color: var(--red-700); font-weight: 800; padding: 0 2px; }

/* etapas */
.st-passos { display: flex; align-items: flex-start; margin: 22px 0 4px; padding: 0; list-style: none; }
.st-p { flex: 1; min-width: 0; text-align: center; position: relative; font-size: 13px; color: var(--slate-500); }
.st-p b { display: block; font-weight: 800; }
.st-p small { display: block; font-weight: 500; color: var(--slate-500); margin-top: 2px; padding: 0 4px; overflow-wrap: break-word; }
.st-b { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-weight: 900; background: var(--slate-200); color: var(--slate-500); position: relative; z-index: 1; }
.st-p:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: 50%; width: 100%; height: 4px; background: var(--slate-200); }
.st-p-ok { color: var(--green-700); }
.st-p-ok .st-b { background: var(--green-500); color: var(--branco); }
.st-p-ok small { color: var(--green-700); font-weight: 700; }
.st-p-ok:not(:last-child)::after { background: var(--green-500); }
.st-p-agora { color: var(--blue-700); }
.st-p-agora .st-b { background: var(--blue-600); color: var(--branco); box-shadow: 0 0 0 5px var(--blue-200); }
.st-p-agora small { color: var(--blue-700); font-weight: 700; }
.st-p-cancelado { color: var(--red-700); }
.st-p-cancelado .st-b { background: var(--red-600); color: var(--branco); }
.st-p-nao { color: var(--slate-400); }
.st-p-nao .st-b { background: var(--slate-100); color: var(--slate-400); }

/* proximo passo */
.st-prox { display: flex; align-items: center; gap: 12px; margin-top: 16px; background: var(--blue-50); border: 1px solid var(--blue-200); border-radius: 12px; padding: 12px 14px; }
.st-prox-fim { background: var(--red-50); border-color: var(--red-200); }
.st-prox-txt { min-width: 0; }
.st-prox b { font-size: 16px; }
.st-prox span { color: var(--slate-600); font-size: 13.5px; display: block; margin-top: 2px; }
.st-prox .st-falta { color: var(--orange-800); }
.st-parado { margin-left: auto; background: var(--amber-100); color: var(--amber-800) !important; font-weight: 800; border-radius: 999px; padding: 4px 10px; font-size: 12.5px !important; white-space: nowrap; }
.st-pend { margin-top: 10px; background: var(--orange-50); border: 1px solid var(--orange-300); border-left: 6px solid var(--orange-600); border-radius: 12px; padding: 10px 14px; color: var(--orange-900); font-size: 14px; }
.st-pend ul { margin: 6px 0 0; padding-left: 18px; }
.st-pend li { margin: 2px 0; }
.st-pend small { color: var(--orange-800); }

/* produtos e linha do tempo */
.st-grade { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.st-prod > div { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--slate-100); padding: 9px 0; font-size: 14px; gap: 8px; }
.st-prod small { color: var(--slate-500); }
.st-tag { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.st-tag-m { background: var(--indigo-100); color: var(--indigo-800); }
.st-tag-s { background: var(--slate-100); color: var(--slate-600); }
.st-tl { list-style: none; margin: 0; padding: 0; }
.st-tl li { display: grid; grid-template-columns: 92px 18px minmax(0, 1fr); gap: 10px; padding-bottom: 14px; }
.st-q { font-size: 12.5px; color: var(--slate-500); text-align: right; padding-top: 1px; }
.st-d { width: 14px; height: 14px; border-radius: 50%; background: var(--slate-400); margin-top: 3px; }
.st-d-verde { background: var(--green-500); }
.st-d-azul { background: var(--blue-600); }
.st-d-roxo { background: var(--violet-600); }
.st-d-ciano { background: var(--cyan-700); }
.st-d-laranja { background: var(--orange-600); }
.st-d-vermelho { background: var(--red-600); }
.st-tl b { display: block; font-size: 14.5px; }
.st-tl em { display: block; font-style: normal; font-size: 13px; color: var(--slate-600); overflow-wrap: anywhere; }

/* janelas */
.st-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.st-modal.hidden { display: none; }
.st-modal-fundo { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.st-modal-caixa { position: relative; width: 100%; max-width: 640px; background: var(--branco); border-radius: 16px; padding: 14px; box-shadow: 0 20px 50px rgba(15, 23, 42, .3); max-height: 80vh; display: flex; flex-direction: column; }
.st-lista { gap: 6px; overflow-y: auto; }
.st-lista h2 { margin: 4px 0 0; font-size: 18px; }
.st-lnova { display: flex; gap: 8px; margin-top: 12px; }
.st-lnova input { flex: 1; min-width: 0; border: 1px solid var(--slate-300); border-radius: 10px; padding: 8px 12px; font-size: 15px; text-transform: uppercase; }
.st-lbotoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* busca rapida no menu lateral (computador) e na barra do celular */
.sl-busca-rapida { white-space: nowrap; display: flex; align-items: center; gap: 8px; width: calc(100% - 24px); margin: 12px 12px 0; padding: 8px 10px; border: 1px solid var(--line, var(--slate-200)); border-radius: 10px; background: var(--branco); color: var(--slate-500); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.sl-busca-rapida:hover { border-color: var(--primary, var(--blue-700)); color: var(--primary, var(--blue-700)); }
.sl-busca-rapida .st-kbd { margin-left: auto; }
.sl-busca-rapida.hidden, .topbar-btn.hidden { display: none; }
.topbar #slBuscaTopo { margin-left: auto; }
/* 735: menu ENCOLHIDO (so icones): fica so a lupa, num botao quadrado centralizado (o "Ctrl K" vazava para fora) */
@media (min-width: 901px) {
  .menu-encolhido .sl-busca-rapida { width: 44px; height: 40px; margin: 10px auto 0; padding: 0; justify-content: center; gap: 0; }
  .menu-encolhido .sl-busca-rapida > span:not(:first-child) { display: none; }
  .menu-encolhido .sl-busca-rapida > span:first-child { font-size: 18px; }
}
@media (max-width: 900px) {
  .sl-busca-rapida .st-kbd { display: none; }
}

/* largura disponivel estreita (celular / tablet em pe) */
@container (max-width: 720px) {
  .st-grade { grid-template-columns: minmax(0, 1fr); }
  .st-card { padding: 14px; }
  .st-cab h1 { font-size: 20px; }
  .st-cab-dir { align-items: flex-start; }
  .st-p { font-size: 11px; }
  .st-b { width: 32px; height: 32px; }
  .st-p:not(:last-child)::after { top: 14px; }
  .st-tl li { grid-template-columns: 70px 18px minmax(0, 1fr); }
  .st-prox { flex-wrap: wrap; }
  .st-parado { margin-left: 0; }
  .st-topo .st-kbd { display: none; }
  .st-res-tela .st-item { flex-wrap: wrap; gap: 6px; }
  .st-res-tela .st-item-txt { flex: 1 1 100%; }
  .st-campo-grande input, .st-campo-grande input:focus { font-size: 16px; }
  .st-campo-grande { padding: 12px 14px; }
  .st-ped-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "data selo" "prod valor"; row-gap: 6px; }
  .st-ped-data { grid-area: data; }
  .st-ped-item .st-selo { grid-area: selo; justify-self: end; }
  .st-ped-prod { grid-area: prod; }
  .st-ped-valor { grid-area: valor; }
  .st-ped-seta { display: none; }
}

/* 735: no celular, a etapa vai para baixo do nome tambem na janela de busca */
@media (max-width: 600px) {
  .st-modal .st-item { flex-wrap: wrap; gap: 6px; }
  .st-modal .st-item-txt { flex: 1 1 100%; }
  .st-modal { padding: 12px; }
}

/* 924: os blocos por situacao (789) sairam; sem nada digitado a tela mostra as ultimas vendas (lista .st-item) */
}
