/* Seu Lóza — Ordens de serviço (lista + detalhe), quadro da Produção e modais da OS.
   Só tokens (funciona no tema escuro e no claro). Prefixo ox-. */

/* ---------- utilidades ---------- */
.ox-nw { white-space: nowrap; }
.ox-mask { letter-spacing: .08em; color: var(--tx-3); white-space: nowrap; }
.ox-noanim, .ox-noanim .rise, .ox-noanim .ox-gate { animation: none !important; }
@keyframes ox-flash { 0% { box-shadow: 0 0 0 0 var(--red-line), var(--shadow-1); } 100% { box-shadow: 0 0 0 14px transparent, var(--shadow-1); } }
.ox-flash { animation: ox-flash 1.4s var(--ease) both !important; }
.ox-lockwrap { display: inline-flex; cursor: not-allowed; }
.ox-lockwrap .btn[disabled] { pointer-events: none; opacity: .55; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.progress.ox-red i { background: var(--grad-red); }
.pill.ox-stop { background: var(--s4); color: var(--tx); box-shadow: inset 0 0 0 1px var(--line-3); }
.ox-st { flex: none; }
.ox-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 11.5px; color: var(--tx-3); line-height: 1.45; }
.ox-note svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.ox-foot-note { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); }
.ox-foot-note svg { width: 14px; height: 14px; }

/* ---------- "Ver como" (barra compacta) ---------- */
.ox-ver { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 4px 0 12px; border-radius: var(--r-sm); background: var(--s1); border: 1px solid var(--line-2); }
.ox-ver__lbl { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--tx-3); white-space: nowrap; }
.ox-ver__lbl svg { width: 14px; height: 14px; }
.ox-ver .segmented.ox-seg { padding: 2px; border: 0; background: var(--s3); }
.ox-seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; white-space: nowrap; }
.ox-seg button svg { width: 14px; height: 14px; flex: none; }
.ox-ver__hint { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; margin-right: 2px; border-radius: var(--r-pill); font-size: 11px; font-weight: 500; white-space: nowrap; background: var(--warn-soft); color: var(--warn); }
.ox-ver__hint svg { width: 12px; height: 12px; }
.ox-actions { align-items: center; }
.ox-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ox-topbar .back { margin-bottom: 0; }

/* ---------- Lista ---------- */
.ox-bar { align-items: center; }
.ox-q { flex: 1 1 240px; max-width: 320px; }
.ox-setsel { width: auto; min-width: 170px; height: 36px; }
.ox-filt { flex-basis: 100%; }
.ox-filt button { height: 32px; padding: 0 10px 0 12px; gap: 6px; }
.ox-filt button svg { width: 13px; height: 13px; flex: none; }
.ox-filt button em { font-style: normal; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); display: inline-grid; place-items: center; background: var(--s3); color: var(--tx-3); }
.ox-filt button.on em { background: var(--red-soft); color: var(--red-tx); }
.ox-tbl td { vertical-align: middle; }
.ox-tbl th, .ox-tbl td { padding-left: 8px; padding-right: 8px; }
.ox-tbl th:first-child, .ox-tbl td:first-child { padding-left: 16px; }
.ox-tbl th:last-child, .ox-tbl td:last-child { padding-right: 16px; }
.ox-tbl .os-new { display: table; margin: 4px 0 0; }
.ox-tbl .os-id { display: inline-block; }
.ox-tbl small.block { display: block; font-size: 11px; margin-top: 1px; white-space: nowrap; }
.ox-cli { min-width: 160px; max-width: 190px; }
.ox-cli > div { min-width: 0; display: grid; }
.ox-cli b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ox-cli small { font-size: 11.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ox-cli .dotc { margin-top: 6px; flex: none; }
.ox-progcell { min-width: 96px; }
.ox-progcell .os-prog { gap: 6px; } .ox-progcell .os-prog small { width: 28px; }
.ox-etcell { min-width: 232px; }
.ox-stcell { min-width: 0; }
.ox-stcell .pill { vertical-align: middle; }
.ox-kt { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 10.5px; color: var(--info); white-space: nowrap; }
.ox-kt svg { width: 11px; height: 11px; }
.ox-tbl tr.ox-row-split td:first-child { box-shadow: inset 3px 0 0 var(--red-hot); }
.ox-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 26px; color: var(--tx-3); font-size: var(--fs-sm); }
.ox-empty svg { width: 16px; height: 16px; }

/* chips de setor com volume */
.ox-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 240px; }
.ox-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--r-pill); font-size: 11.5px; white-space: nowrap; background: var(--s3); color: var(--tx-2); border: 1px solid var(--line); }
.ox-chip svg { width: 12px; height: 12px; flex: none; color: var(--tx-3); }
.ox-chip b { font-weight: 600; color: var(--tx); font-variant-numeric: tabular-nums; }
.ox-chips.split .ox-chip { background: var(--red-soft); border-color: var(--red-line); color: var(--tx); box-shadow: 0 0 12px -4px var(--red-line); }
.ox-chips.split .ox-chip svg { color: var(--red-tx); }
.ox-chip.new { outline: 2px solid var(--red-line); outline-offset: 1px; }

/* ---------- Detalhe · topo ---------- */
.ox-hero__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.ox-hero__main { min-width: 0; flex: 1 1 380px; }
.ox-hero__ids { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ox-hero__ids .os-hero__id { margin-right: 2px; }
.ox-hero h1 { margin: 8px 0 2px; }
.ox-hero__desc { font-size: var(--fs-md) !important; color: var(--tx-2); margin: 0; }
.ox-hero__by { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: var(--fs-xs) !important; color: var(--tx-3); }
.ox-hero__by b { color: var(--tx); font-weight: 500; }
.ox-hero__acts { justify-content: flex-end; }
.ox-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--s1); overflow: hidden; }
.ox-facts > div { display: grid; align-content: start; gap: 2px; padding: 11px 14px; min-width: 0; }
.ox-facts > div + div { border-left: 1px solid var(--line); }
.ox-facts small { display: flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; }
.ox-facts small svg { width: 12px; height: 12px; flex: none; }
.ox-facts b { font-size: var(--fs-md); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ox-facts > div > span { font-size: 11.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ox-facts .crit-tx { color: var(--crit); } .ox-facts .ok-tx { color: var(--ok); }
.ox-why { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 9px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--tx-2); background: var(--warn-soft); }
.ox-why.crit { background: var(--crit-soft); }
.ox-why svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--warn); }
.ox-why.crit svg { color: var(--crit); }
.ox-why b { color: var(--tx); font-weight: 600; }

/* onde estão as peças */
.ox-where { padding: 12px 14px; border-radius: var(--r-md); background: var(--s1); border: 1px solid var(--line); }
.ox-where.split { border-color: var(--red-line); box-shadow: 0 0 0 3px var(--red-soft), 0 0 28px -14px var(--red-hot); }
.ox-where__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ox-where__t { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; }
.ox-where__t svg { width: 15px; height: 15px; color: var(--red-tx); }
.ox-where__tot { margin-left: auto; font-size: var(--fs-xs); }
.ox-where__bar { display: flex; gap: 3px; height: 10px; border-radius: var(--r-pill); overflow: hidden; background: var(--s4); }
.ox-where__bar i, .ox-where__legend span > i { display: block; background: color-mix(in srgb, var(--red-tx) calc(100% - var(--k) * 26%), var(--s4)); }
.ox-where__bar i { width: var(--w); min-width: 6px; animation: grow-x .9s var(--ease) both; transform-origin: left; }
.ox-where__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.ox-where__legend span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); white-space: nowrap; }
.ox-where__legend span > i { width: 10px; height: 10px; border-radius: 3px; }
.ox-where__legend svg { width: 14px; height: 14px; color: var(--tx-3); }
.ox-where__legend b { font-weight: 500; }
.ox-where__legend em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.ox-where__legend small { font-size: 11px; color: var(--tx-4); }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Banner de liberação no topo da OS ---------- */
.ox-gate { --c: var(--warn); --cs: var(--warn-soft);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; margin: 0 0 14px;
  border-radius: var(--r-md); background: var(--cs); border: 1px solid color-mix(in srgb, var(--c) 38%, transparent); animation: rise .5s var(--ease) both; }
.ox-gate.ok { --c: var(--ok); --cs: var(--ok-soft); }
.ox-gate.info { --c: var(--info); --cs: var(--info-soft); }
.ox-gate__ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--s1); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.ox-gate__ic svg { width: 18px; height: 18px; }
.ox-gate b { display: block; font-weight: 600; font-size: var(--fs-md); color: var(--tx); }
.ox-gate p { font-size: var(--fs-sm); color: var(--tx-2); margin: 2px 0 0; }
.ox-gate.warn .ox-gate__ic { animation: pulse 2s infinite; }

/* ---------- Cards do detalhe ---------- */
.ox-grid { align-items: start; }
.ox-headacts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ox-lockhint { display: flex; align-items: center; gap: 6px; margin: 12px 20px 0; padding: 7px 10px; border-radius: var(--r-sm); background: var(--s3); font-size: var(--fs-xs); color: var(--tx-2); }
.ox-lockhint svg { width: 13px; height: 13px; color: var(--warn); }

/* itens */
.ox-it__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.ox-it__head .os-item__n { margin-top: 2px; }
.ox-it__t { min-width: 0; flex: 1; }
.ox-it__t > b { display: block; font-weight: 600; font-size: var(--fs-md); }
.ox-it__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.ox-it__tec { font-size: var(--fs-xs); }
.ox-cor { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 6px; border-radius: var(--r-pill); font-size: 11.5px; background: var(--s3); color: var(--tx-2); white-space: nowrap; }
.ox-cor i { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-3); }
.ox-grade { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
.ox-apl { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--s1); overflow: hidden; }
.ox-apl__h { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: var(--fs-xs); font-weight: 600; color: var(--tx-2); border-bottom: 1px solid var(--line); background: var(--s2); }
.ox-apl__h svg { width: 13px; height: 13px; color: var(--red-tx); }
.ox-apl__tbl th { padding: 7px 12px; }
.ox-apl__tbl td { padding: 8px 12px; font-size: var(--fs-xs); vertical-align: top; }
.ox-apl__tbl td b { font-weight: 500; }
.ox-apl__tbl small.block { display: block; font-size: 10.5px; margin-top: 2px; }
.ox-apl__tbl .pill { height: 22px; font-size: 11px; }
.ox-apl__pos { min-width: 220px; color: var(--tx-2); line-height: 1.45; }
.ox-it__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }
.ox-it__foot .muted { font-size: 11.5px; flex: 1 1 220px; }
.ox-fdet { margin-top: 10px; }
.ox-fdet > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: var(--fs-xs); color: var(--tx-3); list-style: none; }
.ox-fdet > summary::-webkit-details-marker { display: none; }
.ox-fdet > summary svg { width: 13px; height: 13px; transition: transform var(--t-fast); }
.ox-fdet[open] > summary svg { transform: rotate(90deg); }
.ox-fdet[open] > summary { margin-bottom: 8px; color: var(--tx); }

/* roteiro */
.ox-route { list-style: none; margin: 18px 20px 6px; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); position: relative; }
.ox-route::before { content: ""; position: absolute; left: calc(50% / var(--n)); right: calc(50% / var(--n)); top: 19px; height: 2px; background-image: linear-gradient(90deg, var(--line-3) 0 6px, transparent 6px 11px); background-size: 11px 2px; }
.ox-route li { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; text-align: center; padding: 0 2px; }
.ox-route__dot { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); border: 1px solid var(--line-2); color: var(--tx-3); }
.ox-route__dot svg { width: 16px; height: 16px; }
.ox-route__dot em { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-pill); display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 600; background: var(--s1); color: var(--tx-3); border: 1px solid var(--line-2); }
.ox-route b { font-weight: 500; font-size: 12px; color: var(--tx-2); margin-top: 3px; }
.ox-route small { font-size: 10.5px; color: var(--tx-4); line-height: 1.3; }
.ox-route small b { font-size: 11px; margin: 0; color: var(--tx); }
.ox-route li.done .ox-route__dot { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.ox-route li.pass .ox-route__dot { background: var(--s2); border-style: dashed; border-color: var(--ok); color: var(--ok); }
.ox-route li.now .ox-route__dot { background: var(--grad-red); border-color: var(--red-hot); color: #fff; box-shadow: 0 0 0 5px var(--red-soft), 0 0 22px -4px var(--red-hot); }
.ox-route li.now b { color: var(--tx); }
.ox-route li.now small { color: var(--red-tx); font-weight: 500; }
.ox-back { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 7px; border-radius: var(--r-pill); font-size: 10px; font-weight: 500; white-space: nowrap; background: var(--info-soft); color: var(--info); margin-top: 2px; }
.ox-back svg { width: 10px; height: 10px; }
.ox-splitnote { display: flex; gap: 8px; align-items: flex-start; margin: 10px 20px 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--red-soft); border: 1px solid var(--red-line); font-size: var(--fs-xs); color: var(--tx-2); line-height: 1.45; }
.ox-splitnote svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--red-tx); }
.ox-splitnote b { color: var(--tx); }
.ox-rt__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 20px 18px; }
.ox-rt__foot .muted { font-size: var(--fs-xs); }

/* personalização */
.ox-pers__body { display: grid; gap: 14px; padding: 14px 20px 20px; }
.ox-pers__kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ox-pers__kv > div, .ox-pers__obs { padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.ox-pers__kv small, .ox-pers__obs small { display: block; font-size: var(--fs-2xs); color: var(--tx-3); margin-bottom: 2px; }
.ox-pers__kv b { font-weight: 500; font-size: var(--fs-sm); }
.ox-pers__obs p { margin: 0; font-size: var(--fs-sm); color: var(--tx-2); line-height: 1.5; }
.ox-locais { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ox-locais > div { display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px; border-radius: var(--r-sm); border: 1px dashed var(--line-2); color: var(--tx-4); min-width: 0; }
.ox-locais > div > div { min-width: 0; }
.ox-locais b { display: block; font-weight: 500; font-size: var(--fs-xs); color: var(--tx-3); }
.ox-locais small { display: block; font-size: 11px; line-height: 1.35; }
.ox-locais__ck { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: none; background: var(--s3); }
.ox-locais__ck svg { width: 12px; height: 12px; }
.ox-locais > div.on { border-style: solid; border-color: var(--red-line); background: var(--red-soft); color: var(--tx-2); }
.ox-locais > div.on b { color: var(--tx); }
.ox-locais > div.on .ox-locais__ck { background: var(--grad-red); color: #fff; }

/* histórico */
.ox-hf { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px 4px; }
.ox-hf button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s1); font-size: 11.5px; color: var(--tx-2); transition: all var(--t-fast); }
.ox-hf button svg { width: 12px; height: 12px; }
.ox-hf button em { font-style: normal; font-size: 10.5px; color: var(--tx-4); font-variant-numeric: tabular-nums; }
.ox-hf button:hover { border-color: var(--line-3); color: var(--tx); }
.ox-hf button.on { background: var(--red-soft); border-color: var(--red-line); color: var(--tx); }
.ox-hist { list-style: none; margin: 0; padding: 12px 20px 16px; display: grid; max-height: 560px; overflow-y: auto; }
.ox-hist li { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.ox-hist li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background-image: linear-gradient(180deg, var(--line-2) 0 5px, transparent 5px 9px); background-size: 2px 9px; }
.ox-hist li:last-child::before { display: none; }
.ox-hist__ic { --c: var(--tx-3); --cs: var(--s3); width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--cs); color: var(--c); }
.ox-hist__ic svg { width: 14px; height: 14px; }
.ox-hist li.t-envio .ox-hist__ic { --c: var(--info); --cs: var(--info-soft); }
.ox-hist li.t-perda .ox-hist__ic { --c: var(--crit); --cs: var(--crit-soft); }
.ox-hist li.t-roteiro .ox-hist__ic { --c: var(--red-tx); --cs: var(--red-soft); }
.ox-hist li.t-arte .ox-hist__ic { --c: var(--warn); --cs: var(--warn-soft); }
.ox-hist li.t-pagamento .ox-hist__ic { --c: var(--ok); --cs: var(--ok-soft); }
.ox-hist li.first .ox-hist__ic { box-shadow: 0 0 0 3px var(--red-soft); }
.ox-hist b { display: block; font-weight: 500; font-size: var(--fs-sm); line-height: 1.4; }
.ox-hist small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; font-size: 11.5px; color: var(--tx-3); }
.ox-hist__tag { height: 17px; padding: 0 6px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 10px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; background: var(--s3); color: var(--tx-3); }
.ox-hist__empty { padding: 10px 0; font-size: var(--fs-sm); }

/* arte para aprovação */
.ox-art__body { display: grid; gap: 10px; padding: 14px 18px 18px; }
.ox-art__thumb { position: relative; display: block; width: 100%; padding: 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--s3); cursor: zoom-in; aspect-ratio: 4 / 3; }
.ox-art__thumb img, .ox-art__thumb svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.ox-art__zoom { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--s1); color: var(--tx-2); box-shadow: var(--shadow-1); opacity: 0; transition: opacity var(--t-fast); }
.ox-art__thumb:hover .ox-art__zoom, .ox-art__thumb:focus-visible .ox-art__zoom { opacity: 1; }
.ox-art__zoom svg { width: 14px; height: 14px; }
.ox-art__file { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-xs); color: var(--tx-2); }
.ox-art__file svg { width: 14px; height: 14px; flex: none; color: var(--tx-3); }
.ox-art__file .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ox-art__file .pill { height: 20px; font-size: 10.5px; margin-left: auto; }
.ox-art__st { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); }
.ox-art__st.ok { background: var(--ok-soft); }
.ox-art__st > svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--warn); }
.ox-art__st.ok > svg { color: var(--ok); }
.ox-art__st b { display: block; font-weight: 600; font-size: var(--fs-sm); }
.ox-art__st small { font-size: 11.5px; color: var(--tx-2); }
.ox-art__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ox-artbig { display: grid; place-items: center; }
.ox-artbig img, .ox-artbig svg { max-height: 70vh; max-width: 100%; border-radius: 12px; }
.ox-artup { min-height: 170px; }
.ox-artup__img { max-height: 150px; border-radius: 10px; margin-bottom: 6px; }

/* arquivos do cliente */
.ox-arq__list { display: grid; gap: 6px; padding: 14px 18px 4px; }
.ox-fchip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 8px 7px 7px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.ox-fchip__ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--s3); color: var(--tx-2); }
.ox-fchip__ic svg { width: 14px; height: 14px; }
.ox-fchip__n { font-size: var(--fs-xs); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-fchip .pill { height: 20px; font-size: 10.5px; }
.ox-arq__empty { margin: 0; font-size: var(--fs-sm); }
.ox-arq__foot { padding: 8px 18px 10px; }
.ox-arq > .ox-note { padding: 0 18px 16px; }
.ox-upbtn { cursor: pointer; }

/* stand-by: reserva de material */
.ox-standby { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-style: dashed; background: var(--s1); opacity: .8; }
.ox-standby__ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--s3); color: var(--tx-4); }
.ox-standby__ic svg { width: 15px; height: 15px; }
.ox-standby > div { min-width: 0; flex: 1; }
.ox-standby b { display: block; font-weight: 500; font-size: var(--fs-sm); color: var(--tx-2); }
.ox-standby small { display: block; font-size: 11px; color: var(--tx-4); }
.ox-standby .pill { height: 22px; font-size: 10.5px; }

/* ---------- Contrato / financeiro ---------- */
.ox-kbar { display: block; margin: 7px 0 5px; }
.ox-kprog { margin-top: 12px; }
.ox-kprog__t { font-size: var(--fs-xs); color: var(--tx-2); }
.ox-kprog small { display: block; font-size: 11px; line-height: 1.4; }
.ox-finc { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: var(--r-sm); background: var(--info-soft); }
.ox-finc__ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--s1); color: var(--info); }
.ox-finc__ic svg { width: 16px; height: 16px; }
.ox-finc b { display: block; font-weight: 600; font-size: var(--fs-sm); color: var(--tx); }
.ox-finc small { display: block; font-size: 11.5px; margin-top: 2px; line-height: 1.4; }
.ox-finbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ox-finlock { display: flex; gap: 12px; align-items: center; }
.ox-finlock__ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); color: var(--tx-3); flex: none; }
.ox-finlock__ic svg { width: 16px; height: 16px; }
.ox-finlock b { display: block; font-weight: 600; }
.ox-finlock small { font-size: 11.5px; }

/* material reservado (stand-by · usado só se RESERVA_ESTOQUE = true) */
.ox-rolls { grid-column: 2; display: grid; gap: 3px; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--s1); border: 1px solid var(--line); }
.ox-rolls > div { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.ox-rolls > div i { flex: 1; border-bottom: 1px dotted var(--line-3); transform: translateY(-3px); }
.ox-sobra { display: flex; gap: 6px; align-items: flex-start; margin: 5px 0 0; padding-top: 6px; border-top: 1px solid var(--line); font-size: 11px; color: var(--tx-3); line-height: 1.4; }
.ox-sobra svg { width: 12px; height: 12px; flex: none; margin-top: 1px; }
.ox-sobra.ok { color: var(--ok); }

/* ---------- Modais ---------- */
.ox-file { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.ox-file__ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.ox-file__ic svg { width: 16px; height: 16px; }
.ox-file b { display: block; font-weight: 500; font-size: var(--fs-sm); }
.ox-file small { font-size: 11px; }
.ox-explica { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--s3); font-size: var(--fs-xs); color: var(--tx-2); line-height: 1.45; }
.ox-explica svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--tx-3); }
.ox-pay { display: grid; gap: 0; }
.ox-pay .ox-explica { margin-top: 8px; }
.ox-trust b { display: block; font-weight: 500; }
.ox-trust.fixa { opacity: .55; }

/* envio parcial */
.ox-env { display: grid; gap: 16px; }
.ox-env .select, .ox-env .input { width: 100%; }
.ox-env__route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.ox-env__arrow { width: 34px; height: 38px; display: grid; place-items: center; color: var(--red-tx); }
.ox-env__arrow svg { width: 18px; height: 18px; }
.ox-env__qty { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ox-env__qty small { display: block; margin-top: 5px; font-size: 11px; }
.ox-stepper { display: flex; align-items: center; gap: 6px; }
.ox-stepper .icon-btn { width: 38px; height: 38px; flex: none; border: 1px solid var(--line-2); background: var(--s2); }
.ox-stepper .icon-btn svg { width: 16px; height: 16px; }
.ox-stepper .input { width: 90px !important; text-align: center; font-weight: 600; font-size: var(--fs-md); }
.ox-perda { display: grid; grid-template-columns: 80px 1fr; gap: 6px; }
.ox-perda .input { text-align: center; }
.ox-env__prev { padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.ox-env__prev .ox-chips { max-width: none; }
.ox-env__prev p { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--tx-2); }

/* editar roteiro */
.ox-rl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ox-rl li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); animation: rise .3s var(--ease) both; }
.ox-rl li.new { border-color: var(--info); background: var(--info-soft); }
.ox-rl li b { font-weight: 500; font-size: var(--fs-sm); }
.ox-rl li .pill { height: 22px; font-size: 10.5px; }
.ox-rl__n { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 600; background: var(--s3); color: var(--tx-3); font-variant-numeric: tabular-nums; }
.ox-rl__ic { color: var(--tx-3); display: grid; } .ox-rl__ic svg { width: 15px; height: 15px; }
.ox-rl__acts { margin-left: auto; display: flex; gap: 2px; }
.ox-rl__acts .icon-btn { width: 32px; height: 32px; }
.ox-rl__acts .icon-btn svg { width: 15px; height: 15px; }
.ox-rl__acts .icon-btn[disabled] { opacity: .3; cursor: not-allowed; }
.ox-rl__del:not([disabled]):hover { color: var(--crit); }
.ox-rl__add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.ox-rl__add .select { width: 100%; }

/* editar pedido */
.ox-ped { display: grid; gap: 12px; }
.ox-ped #pd-itens { display: grid; gap: 10px; }
.ox-ped__it { padding: 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.ox-ped__it.born { border-color: var(--info); animation: rise .4s var(--ease) both; }
.ox-ped__h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ox-ped__h b { font-weight: 600; font-size: var(--fs-sm); }
/* cor, preço e tamanho novo (revisão 10/11 · N7) */
.ox-ped__mais { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ox-ped__mais label { display: grid; gap: 4px; min-width: 0; }
.ox-ped__mais label > span:first-child { font-size: var(--fs-2xs); color: var(--tx-3); text-transform: uppercase; letter-spacing: .04em; }
.ox-ped__tamr { display: flex; gap: 6px; }
.ox-ped__tamr .input { flex: 1; min-width: 0; }
.ox-ped__mais .input { width: 100%; min-width: 0; }
.ox-ped__h small { font-size: 11.5px; }
.ox-ped__h .icon-btn { margin-left: auto; width: 32px; height: 32px; align-self: center; }
.ox-ped__h .icon-btn svg { width: 14px; height: 14px; }
.ox-gin { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.ox-gin label { display: grid; gap: 3px; text-align: center; }
.ox-gin span { font-size: 11px; color: var(--tx-3); }
.ox-gin .input::-webkit-inner-spin-button, .ox-stepper .input::-webkit-inner-spin-button, .ox-perda .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ox-gin .input, .ox-stepper .input, .ox-perda .input { -moz-appearance: textfield; }
.ox-gin .input { width: 100%; height: 36px; padding: 0 4px; text-align: center; font-weight: 600; }
.ox-ped__add { padding: 12px; border-radius: var(--r-md); border: 1px dashed var(--line-3); }
.ox-ped__addh { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: var(--fs-sm); }
.ox-ped__addh svg { width: 14px; height: 14px; color: var(--red-tx); }
.ox-ped__addh b { font-weight: 500; }
.ox-ped__addrow { display: grid; grid-template-columns: 1.6fr 1fr auto; gap: 8px; align-items: end; }
.ox-ped__addrow .select, .ox-ped__addrow .input { width: 100%; }
.ox-ped__tot { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--tx-2); }
.ox-ped__tot .pill { height: 22px; }

/* ---------- Quadro da Produção ---------- */
.ox-lock { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; font-size: 10.5px; background: var(--warn-soft); color: var(--warn); }
.ox-lock svg { width: 12px; height: 12px; flex: none; }
.ox-lock b { font-weight: 600; }
.ox-lock.ok { background: var(--info-soft); color: var(--info); }
.pc.ox-pcsplit { border-color: var(--red-line); box-shadow: 0 0 0 1px var(--red-line), 0 0 22px -8px var(--red-hot); }
.pc.ox-pcsplit.crit { box-shadow: 0 0 0 1px var(--red-line), 0 0 22px -8px var(--red-hot), inset 3px 0 12px -6px var(--crit); }
.pboard .pc { min-width: 0; } .pboard .pc > * { min-width: 0; }
.ox-pcpart { justify-self: start; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 600; white-space: nowrap; background: var(--red-soft); color: var(--red-tx); }
.ox-pcpart svg { width: 11px; height: 11px; }
.ox-pcst .pill { height: 22px; font-size: 10.5px; }
.ox-pcst .pill svg { width: 12px; height: 12px; }
.ox-pcetapa { display: grid; gap: 2px; font-size: 10.5px; color: var(--tx-3); }
.ox-pcetapa span { display: flex; align-items: center; gap: 5px; }
.ox-pcetapa svg { width: 11px; height: 11px; }
.ox-pcetapa b { color: var(--tx); }
.ox-pcother { display: flex; align-items: flex-start; gap: 6px; padding: 5px 8px; border-radius: 7px; background: var(--red-soft); font-size: 10.5px; color: var(--tx-2); line-height: 1.4; }
.ox-pcother svg { width: 12px; height: 12px; flex: none; margin-top: 1px; color: var(--red-tx); }
.ox-pcother b { color: var(--tx); font-weight: 600; }
.pc.ox-pcflash { animation: ox-flash 1.4s var(--ease) both; }

/* ---------- Nova OS: 4 formas de começar ---------- */
.no-ways.ox-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .no-ways.ox-4 { grid-template-columns: repeat(2, 1fr); }
  .ox-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ox-facts > div:nth-child(4) { border-left: 0; }
  .ox-facts > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .ox-route { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
  .ox-route::before { display: none; }
}
@media (max-width: 760px) {
  .no-ways.ox-4 { grid-template-columns: 1fr; }
  .ox-gate { grid-template-columns: auto 1fr; }
  .ox-gate > :last-child { grid-column: 1 / -1; justify-self: start; }
  .ox-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ox-facts > div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .ox-route { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ox-finbtns, .ox-env__qty, .ox-pers__kv, .ox-rl__add, .ox-ped__addrow { grid-template-columns: 1fr; }
  .ox-env__route { grid-template-columns: 1fr; } .ox-env__arrow { transform: rotate(90deg); justify-self: center; }
  .ox-ver__lbl { display: none; }
}

/* Filtro de datas da lista de OS */
.ox-dt { display: inline-flex; align-items: center; gap: 2px; }
.ox-dt__b { height: 38px; gap: 8px; }
.ox-dt__b svg:last-child { width: 14px; height: 14px; opacity: .6; }
.ox-dt.on .ox-dt__b { border-color: var(--red-line); background: var(--red-soft); color: var(--tx); }
.ox-dt__x { width: 30px; height: 30px; }
.ox-dt__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ox-dt__chips .chip { cursor: pointer; }
.ox-dt__chips .chip:disabled { opacity: .4; cursor: not-allowed; }
.ox-dt__range { display: none; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ox-dt__range.on { display: grid; }
.ox-dt__range .input { width: 100%; }
.ox-dt__prev { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); font-size: var(--fs-sm); }
.ox-dt__prev svg { width: 15px; height: 15px; }
.ox-dt__prev b { color: var(--tx); }

/* Janela de datas: meses e calendário */
.modal.ox-dt-modal { width: min(720px, calc(100vw - 32px)); }
.ox-dt__top { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.ox-dt__top .segmented button { display: inline-flex; align-items: center; gap: 6px; }
.ox-dt__top .segmented svg { width: 14px; height: 14px; }
.ox-dt__pane { min-height: 250px; }
.ox-mo__head, .ox-cal__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ox-mo__head b { font-size: var(--fs-lg); min-width: 52px; text-align: center; }
.ox-mo__head small { margin-left: 8px; font-size: var(--fs-2xs); }
.ox-mo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ox-mo__m { display: grid; gap: 2px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; transition: all var(--t-fast); }
.ox-mo__m b { font-size: var(--fs-sm); font-weight: 600; }
.ox-mo__m small { font-size: var(--fs-2xs); color: var(--tx-3); }
.ox-mo__m:hover { border-color: var(--line-3); }
.ox-mo__m.on { border-color: var(--red-line); background: var(--red-soft); }
.ox-mo__m.on small { color: var(--tx-2); }
.ox-mo__m.fut { opacity: .55; }
.ox-cal__head { justify-content: space-between; }
.ox-cal__head small { font-size: var(--fs-xs); }
.ox-cal { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ox-cal__m > b { display: block; text-align: center; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 8px; }
.ox-cal__w, .ox-cal__g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ox-cal__w span { text-align: center; font-size: 10.5px; color: var(--tx-4); padding: 2px 0 4px; }
.ox-cal__d { position: relative; height: 34px; border-radius: 8px; font-size: var(--fs-xs); color: var(--tx-2); transition: background var(--t-fast); }
.ox-cal__d:hover { background: var(--s3); color: var(--tx); }
.ox-cal__d i { position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--red-tx); }
.ox-cal__d.meio { background: var(--red-soft); color: var(--tx); border-radius: 0; }
.ox-cal__d.ini, .ox-cal__d.fim { background: var(--red); color: #fff; font-weight: 600; }
.ox-cal__d.ini i, .ox-cal__d.fim i { background: #fff; }
.ox-cal__d.hoje { box-shadow: inset 0 0 0 1.5px var(--line-3); }
.ox-cal__legend { display: flex; gap: 16px; margin-top: 10px; font-size: var(--fs-2xs); }
.ox-cal__legend span { display: inline-flex; align-items: center; gap: 6px; }
.ox-cal__legend .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red-tx); }
.ox-cal__legend .hj { width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--line-3); }
@media (max-width: 700px) { .ox-cal { grid-template-columns: 1fr; } .ox-cal__m:last-child { display: none; } .ox-mo { grid-template-columns: repeat(3, 1fr); } }

/* Data usada na lista (ordena e filtra) */
.ox-sort { display: inline-flex; align-items: center; gap: 8px; }
.ox-sort > .muted { font-size: var(--fs-xs); }
.ox-sort .segmented button { display: inline-flex; align-items: center; gap: 6px; }
.ox-sort .segmented svg { width: 14px; height: 14px; }
.ox-dir { height: 38px; gap: 7px; font-size: var(--fs-xs); }
.ox-dir svg { width: 15px; height: 15px; }
.ox-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.ox-th-sort:hover { color: var(--tx); }
.ox-th-sort.on { color: var(--tx); }
.ox-th-sort svg { width: 12px; height: 12px; margin-left: 4px; vertical-align: -1px; color: var(--red-tx); }
.ox-dt__using { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); font-size: var(--fs-sm); }
.ox-dt__using svg { width: 15px; height: 15px; color: var(--red-tx); }
.ox-dt__using small { font-size: var(--fs-2xs); margin-left: 4px; }

/* Barra de filtros em cartão: busca e datas em cima, situação embaixo */
.ox-fbar { padding: 14px 16px; display: grid; gap: 12px; margin-bottom: 16px; overflow: visible; position: relative; z-index: 3; }
.ox-fbar__r1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ox-fbar__r1 .ox-q { flex: 1 1 260px; max-width: none; }
.ox-fbar__r2 { display: flex; align-items: flex-start; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.ox-fbar__lbl { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .08em; color: var(--tx-4); padding-top: 9px; white-space: nowrap; }
.ox-fbar .ox-filt { flex: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ox-filt__chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ox-filt .ox-f-main { font-weight: 600; }
.ox-filt__res { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); color: var(--tx-3); white-space: nowrap; padding-top: 6px; }
.ox-filt__res b { color: var(--tx); font-size: var(--fs-sm); }
.ox-filt__res .btn svg { width: 13px; height: 13px; }
/* Menu "Mais situações" */
.ox-more { position: relative; }
.ox-more__b { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border-radius: var(--r-pill); border: 1px dashed var(--line-3); font-size: var(--fs-xs); color: var(--tx-3); }
.ox-more__b:hover { color: var(--tx); border-color: var(--line-3); }
.ox-more__b.on { border-style: solid; border-color: var(--red-line); background: var(--red-soft); color: var(--tx); }
.ox-more__b svg { width: 13px; height: 13px; }
.ox-more__b em { font-style: normal; font-size: 10.5px; font-weight: 600; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); display: inline-grid; place-items: center; background: var(--red-soft); color: var(--red-tx); }
.ox-more__m { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 260px; padding: 6px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); display: none; }
.ox-more.open .ox-more__m { display: grid; gap: 2px; animation: rise .25s var(--ease) both; }
.ox-more__m button { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); text-align: left; font-size: var(--fs-sm); color: var(--tx-2); }
.ox-more__m button:hover { background: var(--s3); color: var(--tx); }
.ox-more__m button.on { background: var(--red-soft); color: var(--tx); }
.ox-more__m button svg { width: 15px; height: 15px; color: var(--tx-3); }
.ox-more__m span { display: grid; }
.ox-more__m small { font-size: var(--fs-2xs); }
.ox-more__m em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--tx-3); }
/* KPIs clicáveis */
.ox-kpi { cursor: pointer; transition: border-color var(--t-fast), transform var(--t-fast); }
.ox-kpi:hover { border-color: var(--line-3); transform: translateY(-1px); }
.ox-kpi.on { border-color: var(--red-line); box-shadow: inset 0 0 0 1px var(--red-line); }
@media (max-width: 900px) { .ox-fbar__r2 { flex-direction: column; } .ox-fbar__lbl { padding-top: 0; } }
.ox-fbar .ox-filt { flex-wrap: nowrap; }
.ox-fbar .ox-filt__chips { flex: 1; min-width: 0; }
.ox-fbar .ox-filt__res { flex: none; }
.ox-filt .ox-more__m button { height: auto; border: 0; border-radius: var(--r-sm); padding: 9px 10px; background: transparent; }
.ox-filt .ox-more__m button:hover { background: var(--s3); }
.ox-filt .ox-more__m button.on { background: var(--red-soft); }
.ox-filt .ox-more__m button em { background: transparent; min-width: 0; height: auto; padding: 0; }
@media (max-width: 1100px) { .ox-fbar .ox-filt { flex-wrap: wrap; } }

/* Conta das peças: setores + perdidas + sem registro = pedido */
.ox-chip--perda { border-style: dashed !important; color: var(--tx-3) !important; background: transparent !important; }
.ox-chip--perda svg { color: var(--tx-3) !important; }
.ox-chip--falta { border-color: color-mix(in srgb, var(--warn) 55%, transparent) !important; background: var(--warn-soft) !important; color: var(--warn) !important; animation: ox-pulse 2.4s ease-in-out infinite; }
.ox-chip--falta svg { color: var(--warn) !important; }
@keyframes ox-pulse { 50% { box-shadow: 0 0 0 4px var(--warn-soft); } }
.ox-div { display: flex; align-items: center; gap: 5px; margin-top: 5px; font-size: var(--fs-2xs); color: var(--warn); font-weight: 500; white-space: nowrap; }
.ox-div svg { width: 12px; height: 12px; }
.ox-row-div td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.ox-conta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; font-size: var(--fs-xs); color: var(--tx-2); }
.ox-conta > span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--s2); border: 1px solid var(--line); }
.ox-conta > span svg { width: 13px; height: 13px; color: var(--tx-3); }
.ox-conta > span b { color: var(--tx); }
.ox-conta > span.zero { opacity: .5; }
.ox-conta > span.perda { border-style: dashed; }
.ox-conta > span.falta { border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: var(--warn-soft); color: var(--warn); }
.ox-conta > span.falta svg, .ox-conta > span.falta b { color: var(--warn); }
.ox-conta > i { font-style: normal; color: var(--tx-4); font-weight: 600; }
.ox-conta.ok > span.tot { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.ox-conta.ok > span.tot svg, .ox-conta.ok > span.tot b { color: var(--ok); }
.ox-conta.bad > span.tot { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 40%, transparent); color: var(--crit); }
.ox-conta.bad > span.tot svg, .ox-conta.bad > span.tot b { color: var(--crit); }
.ox-where__bar i.perda { background: repeating-linear-gradient(45deg, var(--s4) 0 5px, transparent 5px 9px) !important; border: 1px dashed var(--line-3); }
.ox-where__bar i.falta { background: repeating-linear-gradient(45deg, var(--warn) 0 5px, var(--warn-soft) 5px 9px) !important; }
.ox-where__legend span.perda i { background: repeating-linear-gradient(45deg, var(--tx-4) 0 2px, transparent 2px 4px) !important; }
.ox-where__legend span.falta i { background: var(--warn) !important; }
.ox-where__legend span.falta b, .ox-where__legend span.falta em { color: var(--warn); }
.ox-where.has-falta { border-color: color-mix(in srgb, var(--warn) 55%, transparent) !important; }
.ox-falta { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.ox-falta__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--warn); color: #1a1205; }
.ox-falta__ic svg { width: 17px; height: 17px; }
.ox-falta > div:not(.ox-falta__act) { flex: 1; min-width: 0; }
.ox-falta b { display: block; font-size: var(--fs-sm); color: var(--tx); }
.ox-falta p { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--tx-2); }
.ox-falta__act { display: flex; gap: 6px; flex-wrap: wrap; }
.ox-repor { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: var(--r-md); border: 1px dashed var(--line-3); font-size: var(--fs-xs); color: var(--tx-2); }
.ox-repor > svg { width: 15px; height: 15px; flex: none; color: var(--tx-3); }
.ox-repor > span { flex: 1; }
.ox-repor b { color: var(--tx); }
.ox-ro { height: 38px; display: flex; align-items: center; padding: 0 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); color: var(--tx-2); font-size: var(--fs-sm); }
@media (max-width: 900px) { .ox-falta { flex-direction: column; align-items: flex-start; } }
.ox-filt__chips button[data-v="entregue"] svg { color: var(--ok); }

/* Plataforma · celular (390 px): o filtro e os itens da OS não empurram a largura da tela */
.os-items { grid-template-columns: minmax(0, 1fr); }
.ox-it, .ox-it__head > * { min-width: 0; }
@media (max-width: 640px) {
  .ox-it__head { flex-wrap: wrap; }
  .ox-it__head .ox-it__t { flex: 1 1 180px; }
  .ox-it__head .os-it__tot { flex-basis: 100%; margin-left: 46px; white-space: normal; }
  .ox-fbar__r1 > * { flex: 1 1 100%; min-width: 0; max-width: 100%; }
  .ox-sort { display: flex; flex-wrap: wrap; }
  .ox-fbar .ox-filt { flex-wrap: wrap; min-width: 0; }
  .ox-fbar .ox-filt__res { white-space: normal; flex-wrap: wrap; }
}


/* =====================================================================================================
   OS em abas (fase 7 · R2 · igual à demonstração, fase 6 · B2) · prefixo oa- · só tokens (tema escuro e claro)
   Topo sempre visível + barra de abas presa ao rolar (no celular rola na horizontal) · controle por item
   ===================================================================================================== */
.oa-ancora { height: 0; }
.oa-tabs { position: sticky; top: 0; z-index: 8; display: flex; gap: 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  margin: 2px -28px 18px; padding: 6px 28px 0; background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); border-bottom: 1px solid var(--line-2); }
.oa-tabs::-webkit-scrollbar { display: none; }
.oa-tab { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 11px; border-radius: var(--r-sm) var(--r-sm) 0 0;
  font-size: var(--fs-sm); font-weight: 500; color: var(--tx-3); white-space: nowrap; transition: color var(--t-fast), background var(--t-fast); }
.oa-tab svg { width: 15px; height: 15px; flex: none; }
.oa-tab:hover { color: var(--tx); background: var(--s2); }
.oa-tab:focus-visible { outline: 2px solid var(--red-tx); outline-offset: -3px; }
.oa-tab.on { color: var(--tx); font-weight: 600; }
.oa-tab.on svg { color: var(--red-tx); }
.oa-tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--red); box-shadow: 0 0 10px var(--red-line); }
.oa-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); font-style: normal; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--s3); color: var(--tx-3); }
.oa-n.crit { background: var(--crit); color: #fff; }
.oa-n.warn { background: var(--warn-soft); color: var(--warn); }
.oa-pane[hidden] { display: none !important; }
.oa-pane { animation: oa-in .35s var(--ease) both; }
.oa-pane:focus { outline: none; }
.ox-noanim .oa-pane, .oa-pane.ox-noanim { animation: none; }
@keyframes oa-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.oa-pane .card-head { flex-wrap: wrap; }
.oa-pane .card-head > div:first-child { flex: 1 1 240px; min-width: 0; }

/* cadeado, selo e vazio */
.oa-lock { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--s3); color: var(--tx-2); border: 1px solid var(--line-2); }
.oa-lock svg { width: 13px; height: 13px; color: var(--warn); }
.oa-selo { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 6px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 600; background: var(--warn-soft); color: var(--warn); vertical-align: 2px; white-space: nowrap; }
.oa-vazio { display: flex; align-items: center; gap: 8px; margin: 0; padding: 18px 20px 22px; color: var(--tx-3); font-size: var(--fs-sm); }
.oa-vazio svg { width: 16px; height: 16px; flex: none; }
.oa-mini { font-size: var(--fs-xs); }

/* chips por produto (lista e abas) */
.ox-etcell .ox-chips { max-width: 236px; }
.ox-tbl .ox-progcell { min-width: 84px; }
.ox-tbl .oa-prodcell, .ox-tbl th.oa-thprod { padding-left: 4px; padding-right: 4px; }
.ox-tbl th { letter-spacing: .05em; }
.ox-tbl th.oa-thprod { letter-spacing: .01em; }
.ox-tbl .ox-progcell .os-prog small { width: 26px; }
.ox-chip em { font-style: normal; font-size: 10.5px; color: var(--warn); font-weight: 600; }
.ox-chip.pend { border-style: dashed; }
.ox-chip.parte { background: var(--red-soft); border-color: var(--red-line); color: var(--tx); }
.ox-chip.parte svg { color: var(--red-tx); }
.oa-chip__p { font-weight: 600; color: var(--tx); max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.oa-chip__sep { font-style: normal; color: var(--tx-4); margin: 0 -1px; }
.oa-chip--mais { font-weight: 600; color: var(--tx); cursor: help; }
.oa-chip--ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.oa-chip--ok svg { color: var(--ok) !important; }
.oa-chip--wait { border-style: dashed; color: var(--tx-3); background: transparent; white-space: normal; height: auto; min-height: 24px; }
.oa-prodcell b { font-weight: 600; }
.oa-prodcell small { font-size: 11px; }
.oa-chips-pos { max-width: none; }

/* Início: onde está cada produto */
.oa-pis { display: grid; gap: 10px; padding: 14px 20px 6px; }
.oa-pi { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.oa-pi__h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.oa-pi__t { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.oa-pi__t b { font-weight: 600; font-size: var(--fs-md); }
.oa-pi__t small { font-size: var(--fs-xs); color: var(--tx-3); }
.oa-pi__p { display: inline-flex; align-items: center; gap: 8px; min-width: 130px; }
.oa-pi__p .progress { flex: 1; min-width: 80px; display: block; }
.oa-pi__p small { font-size: 11.5px; font-weight: 600; color: var(--tx-2); width: 34px; text-align: right; }
.oa-onde__f { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding: 8px 20px 16px; font-size: var(--fs-xs); }
.oa-onde__f > span { display: inline-flex; align-items: center; gap: 6px; }
.oa-onde__f svg { width: 14px; height: 14px; flex: none; }
.oa-okc { color: var(--ok); }
.oa-bad { color: var(--crit); font-weight: 500; }

/* Início: avisos da produção */
.oa-av { list-style: none; margin: 0; padding: 12px 20px 16px; display: grid; gap: 8px; }
.oa-av li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--crit-soft); border: 1px solid color-mix(in srgb, var(--crit) 30%, transparent); }
.oa-av li.s-atendimento { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.oa-av__ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--s1); color: var(--crit); }
.oa-av li.s-atendimento .oa-av__ic { color: var(--warn); }
.oa-av__ic svg { width: 15px; height: 15px; }
.oa-av li > div { min-width: 0; }
.oa-av b { display: block; font-weight: 600; font-size: var(--fs-sm); }
.oa-av li > div > span { display: block; font-size: var(--fs-xs); color: var(--tx-2); margin-top: 1px; }
.oa-av small { display: block; font-size: 11px; color: var(--tx-3); margin-top: 3px; }
.oa-mais { margin: -8px 0 0; padding: 0 20px 12px; font-size: var(--fs-xs); color: var(--tx-3); }
.oa-avoc { display: flex; align-items: center; gap: 8px; width: calc(100% - 40px); margin: 0 20px 16px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px dashed var(--line-3); font-size: var(--fs-sm); color: var(--tx-2); text-align: left; }
.oa-avisos .card-head + .oa-avoc { margin-top: 14px; }
.oa-avoc span { flex: 1; }
.oa-avoc svg { width: 15px; height: 15px; flex: none; color: var(--warn); }
.oa-avoc:hover { border-color: var(--warn); color: var(--tx); }

/* Gestão da OS e dados (chave/valor) */
.oa-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 20px 4px; }
.oa-kv__i { display: grid; gap: 2px; align-content: start; min-width: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.oa-kv__i small { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--tx-3); }
.oa-kv__i small svg { width: 13px; height: 13px; flex: none; }
.oa-kv__i b { font-weight: 600; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.oa-kv__i b em { font-style: normal; font-weight: 500; font-size: var(--fs-xs); }
.oa-kv__i > span { font-size: var(--fs-xs); color: var(--tx-2); overflow-wrap: anywhere; }
.oa-kv__i:last-child:nth-child(odd) { grid-column: 1 / -1; }
.oa-kv--ent { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.oa-kv--ent .oa-kv__i:last-child:nth-child(odd) { grid-column: auto; }
.oa-gest.locked .oa-kv__i { background: var(--s1); }
.oa-gest__f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 20px 18px; }
.oa-gest__f small { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; }
.oa-gest__f small svg { width: 13px; height: 13px; flex: none; }

/* Arte */
.oa-art__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 14px; }
.oa-art__info { display: grid; gap: 10px; min-width: 0; }
.oa-artmini { display: grid; gap: 10px; }
.oa-artmini__h { display: flex; gap: 12px; align-items: center; min-width: 0; }
.oa-artmini__th { width: 64px; height: 48px; flex: none; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--s3); cursor: pointer; }
.oa-artmini__th img, .oa-artmini__th svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.oa-artmini__h > div { min-width: 0; display: grid; }
.oa-artmini__h b { font-weight: 600; font-size: var(--fs-sm); }
.oa-artmini__h small { font-size: 11.5px; color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-artmini__a { display: flex; gap: 8px; flex-wrap: wrap; }
.oa-aprov__l { list-style: none; margin: 0; padding: 12px 20px 18px; display: grid; gap: 8px; }
.oa-aprov__l li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px 8px 8px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.oa-aprov__th { width: 52px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--s3); display: block; }
.oa-aprov__th img, .oa-aprov__th svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.oa-aprov__l li > div { display: grid; min-width: 0; }
.oa-aprov__l b { font-size: var(--fs-xs); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-aprov__l small { font-size: 11px; color: var(--tx-3); line-height: 1.4; }

/* Itens e grade: posição de cada item */
.oa-itpos { display: grid; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--s2); border: 1px solid var(--line); }
.oa-itpos__h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oa-itpos__h > span:first-child { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--tx-2); }
.oa-itpos__h > span:first-child svg { width: 13px; height: 13px; color: var(--red-tx); }
.oa-itpos__h .oa-pi__p { flex: 1 1 140px; }
.oa-itpos__h .btn { margin-left: auto; }

/* Roteiro de cada produto */
.oa-rothead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; }
.oa-rothead__t h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-md); font-weight: 600; }
.oa-rothead__t h3 svg { width: 17px; height: 17px; color: var(--red-tx); }
.oa-rothead__t p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--tx-2); }
.oa-rothead__a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.oa-rothead__n { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--s3); font-size: var(--fs-xs); color: var(--tx-2); line-height: 1.45; }
.oa-rothead__n svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--tx-3); }
.oa-rot { padding-bottom: 8px; scroll-margin-top: 70px; }
.oa-rot .card-head h3 { font-weight: 600; }
.oa-rot .card-head h3 svg { color: var(--red-tx); }
.oa-rot .card-head .oa-pi__p { min-width: 150px; }
.ox-route li.wait .ox-route__dot { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 45%, transparent); border-style: dashed; color: var(--info); }
.ox-route li.wait small { color: var(--info); }
.oa-poss { display: grid; gap: 8px; padding: 6px 20px 4px; }
.oa-poss > .lbl { margin: 8px 0 0; }
.oa-pos { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.oa-pos__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--red-soft); color: var(--red-tx); }
.oa-pos__ic svg { width: 16px; height: 16px; }
.oa-pos__t { display: grid; min-width: 0; }
.oa-pos__t b { font-weight: 600; font-size: var(--fs-sm); }
.oa-pos__t small { font-size: 11.5px; color: var(--tx-3); }
.oa-pos__n { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.oa-pos__n span { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--s2); border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--tx-2); white-space: nowrap; }
.oa-pos__n span b { color: var(--tx); font-weight: 700; }
.oa-pos__n span.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.oa-pos__n span.warn b { color: var(--warn); }
.oa-pos__n span.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.oa-pos__n span.ok b { color: var(--ok); }
.oa-pos__a { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.oa-falta { margin: 10px 20px 0; }
.oa-repor { display: grid; gap: 6px; margin: 10px 20px 0; padding: 10px 12px; border-radius: var(--r-md); border: 1px dashed var(--line-3); }
.oa-repor > .lbl { display: flex; align-items: center; gap: 6px; margin: 0; }
.oa-repor > .lbl svg { width: 13px; height: 13px; }
.oa-repor__i { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--tx-2); }
.oa-rot__f { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 14px 20px 10px; }
.oa-rot__f small { font-size: 11.5px; flex: 1 1 220px; }

/* Entrega */
.oa-ent .table-wrap { margin-top: 10px; }
.oa-ent__tbl td b { font-weight: 500; }
.oa-ent__n { padding: 10px 20px 18px; }
.os-chk.oa-ro label { cursor: default; }

/* Anotações */
.oa-nota-f { display: grid; gap: 8px; margin: 14px 20px 6px; padding: 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.oa-nota-f textarea { width: 100%; }
.oa-nota-f__b { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oa-nota-f__b small { flex: 1 1 200px; font-size: var(--fs-xs); }
.oa-nota-f__b .num { font-size: 11px; }
.oa-fil { padding-bottom: 6px; }
.oa-notas__l { max-height: none; }

/* Alertas */
.oa-al__l { list-style: none; margin: 0; padding: 12px 20px 18px; display: grid; gap: 10px; }
.oa-al { --c: var(--crit); --cs: var(--crit-soft); display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--c); }
.oa-al.s-atendimento { --c: var(--warn); --cs: var(--warn-soft); }
.oa-al.s-resolvido { --c: var(--ok); --cs: var(--ok-soft); }
.oa-al__h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.oa-al__ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--cs); color: var(--c); }
.oa-al__ic svg { width: 16px; height: 16px; }
.oa-al__t { min-width: 0; }
.oa-al__t b { display: block; font-weight: 600; font-size: var(--fs-sm); }
.oa-al__t p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--tx-2); }
.oa-al__t small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--tx-3); }
.oa-al__linha { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.oa-al__linha li { display: flex; gap: 8px; align-items: flex-start; min-width: 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s1); border: 1px dashed var(--line-2); opacity: .6; }
.oa-al__linha li.on { opacity: 1; border-style: solid; }
.oa-al__linha li > span { width: 22px; height: 22px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--s3); color: var(--tx-3); }
.oa-al__linha li.on:nth-child(1) > span { background: var(--crit-soft); color: var(--crit); }
.oa-al__linha li.on:nth-child(2) > span { background: var(--warn-soft); color: var(--warn); }
.oa-al__linha li.on:nth-child(3) > span { background: var(--ok-soft); color: var(--ok); }
.oa-al__linha svg { width: 12px; height: 12px; }
.oa-al__linha li > div { min-width: 0; }
.oa-al__linha b { display: block; font-size: 11.5px; font-weight: 600; }
.oa-al__linha small { display: block; font-size: 11px; color: var(--tx-3); line-height: 1.35; overflow-wrap: anywhere; }
.oa-al__a { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Perdas e retrabalho */
.oa-oc__res { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px 4px; }
.oa-oc__res small { font-size: 11.5px; }
.oa-oc__g { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; padding: 12px 20px 18px; }
.oa-oc__s { border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.oa-oc__s header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--s2); }
.oa-oc__s header svg { width: 15px; height: 15px; color: var(--red-tx); }
.oa-oc__s header b { font-weight: 600; font-size: var(--fs-sm); }
.oa-oc__s header small { margin-left: auto; font-size: 11px; color: var(--tx-3); }
.oa-oc__s ul { list-style: none; margin: 0; padding: 4px 12px; display: grid; }
.oa-oc__i { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.oa-oc__i:last-child { border-bottom: 0; }
.oa-oc__ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; grid-row: span 2; background: var(--crit-soft); color: var(--crit); }
.oa-oc__i.t-retrabalho .oa-oc__ic { background: var(--info-soft); color: var(--info); }
.oa-oc__ic svg { width: 14px; height: 14px; }
.oa-oc__i > div { min-width: 0; }
.oa-oc__i b { font-weight: 500; font-size: var(--fs-sm); line-height: 1.45; }
.oa-oc__i small { display: block; font-size: 11px; color: var(--tx-3); }
.oa-oc__a { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Histórico: tipos novos e nome do produto */
.ox-hist li.t-retrabalho .ox-hist__ic { --c: var(--info); --cs: var(--info-soft); }
.ox-hist li.t-alerta .ox-hist__ic { --c: var(--crit); --cs: var(--crit-soft); }
.ox-hist li.t-ajuste .ox-hist__ic { --c: var(--warn); --cs: var(--warn-soft); }
.ox-hist li.t-leitura .ox-hist__ic { --c: var(--tx-2); --cs: var(--s3); }
.ox-hist li.t-anotacao .ox-hist__ic { --c: var(--info); --cs: var(--info-soft); }
.ox-hist li.t-link .ox-hist__ic { --c: var(--ok); --cs: var(--ok-soft); }
.oa-htag { display: inline-flex; align-items: center; gap: 4px; height: 18px; max-width: 260px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; font-weight: 500; background: var(--red-soft); color: var(--red-tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-htag svg { width: 11px; height: 11px; flex: none; }

/* Formulários da OS (janelas) */
.modal.oa-modal { width: min(560px, calc(100vw - 32px)); }
.modal.oa-modal--largo { width: min(720px, calc(100vw - 32px)); }
.oa-form { display: grid; gap: 10px; align-content: start; }
.oa-form .lbl { margin: 6px 0 0; }
.oa-form .lbl small { color: var(--tx-4); }
.oa-form__d { margin: 0; font-size: var(--fs-sm); color: var(--tx-2); line-height: 1.5; }
.oa-full { width: 100%; }
.oa-form textarea.input, .oa-nota-f textarea.input { height: auto; min-height: 64px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.oa-err { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--crit-soft); color: var(--crit); font-size: var(--fs-sm); font-weight: 500; }
.oa-err svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.oa-err[hidden] { display: none; }
.oa-prev { display: flex; align-items: center; gap: 6px; min-height: 20px; margin: 0; font-size: var(--fs-sm); color: var(--tx-2); }
.oa-prev svg { width: 15px; height: 15px; flex: none; }
.oa-step { flex-wrap: wrap; }
.oa-step .input { width: 110px !important; height: 44px; font-size: var(--fs-lg); }
.oa-step .icon-btn { width: 44px; height: 44px; }
.oa-step .btn { height: 44px; }
.oa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.oa-chipb { min-height: 38px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s2); font-size: var(--fs-xs); color: var(--tx-2); transition: all var(--t-fast); }
.oa-chipb:hover { border-color: var(--line-3); color: var(--tx); }
.oa-chipb.on { background: var(--red-soft); border-color: var(--red-line); color: var(--tx); font-weight: 600; }
.oa-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.oa-tipos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.oa-radios label, .oa-tipos label { position: relative; cursor: pointer; min-width: 0; }
.oa-radios input, .oa-tipos input { position: absolute; opacity: 0; pointer-events: none; }
.oa-radios label > span, .oa-tipos label > span { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; min-height: 56px; height: 100%; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s2); transition: all var(--t-fast); }
.oa-radios label > span svg, .oa-tipos label > span svg { width: 18px; height: 18px; grid-row: span 2; color: var(--tx-3); }
.oa-radios b, .oa-tipos b { font-weight: 600; font-size: var(--fs-sm); }
.oa-radios small, .oa-tipos small { font-size: 11px; color: var(--tx-3); }
.oa-radios input:checked + span, .oa-tipos input:checked + span { border-color: var(--red-line); background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red-line); }
.oa-radios input:checked + span svg, .oa-tipos input:checked + span svg { color: var(--red-tx); }
.oa-radios input:focus-visible + span, .oa-tipos input:focus-visible + span { outline: 2px solid var(--red-tx); outline-offset: 2px; }
.oa-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.oa-grid2 > div { min-width: 0; display: grid; align-content: start; }
.oa-grid2 .input, .oa-grid2 .select { width: 100%; }
.oa-grid2 .lbl { margin: 0 0 6px; }
.oa-grid2__full { grid-column: 1 / -1; }
.oa-grid2 small { font-size: 11px; margin-top: 4px; }
.oa-rota2 { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.oa-rota2 > div { display: grid; gap: 2px; min-width: 0; }
.oa-rota2 small { font-size: var(--fs-2xs); color: var(--tx-3); text-transform: uppercase; letter-spacing: .06em; }
.oa-rota2 b { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--fs-md); }
.oa-rota2 b svg { width: 16px; height: 16px; flex: none; color: var(--red-tx); }
.oa-rota2 span { font-size: 11.5px; color: var(--tx-3); }
.oa-rota2__s { display: grid; place-items: center; color: var(--red-tx); }
.oa-rota2__s svg { width: 20px; height: 20px; }
.oa-cq { display: grid; gap: 6px; }
.oa-cq label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.oa-cq label > span { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; min-width: 0; }
.oa-cq label > span svg { width: 15px; height: 15px; grid-row: span 2; color: var(--tx-3); }
.oa-cq b { font-weight: 600; font-size: var(--fs-sm); }
.oa-cq small { font-size: 11px; color: var(--tx-3); }
.oa-cq .input { width: 96px; height: 42px; text-align: center; font-weight: 600; flex: none; }
.ox-rl li.lock { opacity: .75; }
.oa-rl__lock { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--tx-3); white-space: nowrap; }
.oa-rl__lock svg { width: 12px; height: 12px; }
.oa-qr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; }
.oa-qr .qr-big { width: 200px; }
.oa-qr__t p { margin: 0 0 10px; font-size: var(--fs-sm); line-height: 1.5; }
.oa-qr__n { display: flex; align-items: center; gap: 12px; }
.oa-qr__n .lbl { margin: 0; }
.oa-qr__n b { min-width: 34px; text-align: center; font-size: var(--fs-lg); }
.oa-tp-aba { display: block; font-size: 11px; }

/* no computador as 10 abas cabem numa linha só: sem os ícones entre 761 e 1700 px (no celular a barra rola) */
@media (min-width: 761px) and (max-width: 1700px) { .oa-tab > svg { display: none; } }
@media (max-width: 1380px) { .oa-kv--ent { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .oa-al__linha { grid-template-columns: 1fr; } .oa-art__body { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .oa-tabs { margin: 0 -16px 14px; padding: 4px 16px 0; }
  .oa-tab { min-height: 48px; padding: 0 12px; }
  .oa-kv, .oa-kv--ent, .oa-grid2, .oa-radios { grid-template-columns: 1fr; }
  .oa-tipos { grid-template-columns: 1fr 1fr; }
  .oa-rothead { grid-template-columns: 1fr; }
  .oa-rothead__a { justify-content: stretch; }
  .oa-rothead__a .btn, .oa-pos__a .btn, .oa-gest__f .btn, .oa-gest__f .ox-lockwrap, .oa-rot__f .btn, .oa-rot__f .ox-lockwrap, .oa-artmini__a .btn, .ox-art__acts .btn, .ox-art__acts .ox-lockwrap,
  .oa-al__a .btn, .oa-nota-f__b .btn, .oa-onde .card-head > .btn, .oa-repor__i .btn, .oa-oc__a .btn, .ox-headacts .btn, .ox-headacts .ox-lockwrap, .oa-alertas .card-head > .btn, .oa-oc .card-head > .btn, .ox-falta__act .btn { flex: 1 1 100%; min-height: 44px; }
  .oa-gest__f .ox-lockwrap .btn, .oa-rot__f .ox-lockwrap .btn, .ox-art__acts .ox-lockwrap .btn, .ox-headacts .ox-lockwrap .btn { width: 100%; }
  .ox-headacts { width: 100%; }
  .oa-pos { grid-template-columns: auto minmax(0, 1fr); }
  .oa-pos__n { grid-column: 1 / -1; justify-content: flex-start; }
  .oa-al__h { grid-template-columns: auto minmax(0, 1fr); }
  .oa-al__h > .pill { grid-column: 2; justify-self: start; }
  .oa-rota2 { grid-template-columns: 1fr; }
  .oa-rota2__s { transform: rotate(90deg); justify-self: center; }
  .oa-qr { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .oa-qr__n { justify-content: center; }
  .oa-modal .modal__foot { flex-wrap: wrap; }
  .oa-modal .modal__foot .btn { flex: 1 1 auto; min-height: 44px; height: auto; white-space: normal; }
  .oa-pane .ox-hf button { min-height: 36px; }
  .oa-itpos__h .btn { margin-left: 0; }
  .oa-av li { grid-template-columns: auto minmax(0, 1fr); }
  .oa-av li > .pill { grid-column: 2; justify-self: start; }
  .oa-aprov__l li { grid-template-columns: auto minmax(0, 1fr); }
  .oa-aprov__l li > .pill { grid-column: 2; justify-self: start; }
  .oa-cq .input { width: 80px; }
}
/* pílulas longas da ficha (ex.: "ficha em rascunho · conferir antes de cortar") quebram a linha no celular */
.ox-it__meta .pill { max-width: 100%; white-space: normal; height: auto; min-height: 24px; padding-top: 3px; padding-bottom: 3px; line-height: 1.3; }
.ox-it__meta .pill svg { flex: none; }

/* Condições de pagamento (Gestão da OS · campos fixos) e resumo no Financeiro */
.oa-cp { display: grid; gap: 10px; }
.oa-cp .lbl { margin: 6px 0 0; }
.oa-chipb { display: inline-flex; align-items: center; gap: 6px; }
.oa-chipb svg { width: 14px; height: 14px; flex: none; }
.oa-chipb[disabled] { opacity: .45; cursor: not-allowed; }
.oa-cp__sub { max-width: 360px; }
.oa-cp__sub .select, .oa-cp__sub .input { width: 100%; }
.oa-cp__n { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--tx-2); font-size: var(--fs-xs); line-height: 1.45; }
.oa-cp__n svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--warn); }
.oa-cp__prev { display: flex; gap: 10px; align-items: flex-start; margin-top: 6px; padding: 12px 14px; border-radius: var(--r-md); background: var(--red-soft); border: 1px solid var(--red-line); }
.oa-cp__prev > svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--red-tx); }
.oa-cp__prev b { display: block; font-weight: 600; font-size: var(--fs-sm); line-height: 1.45; }
.oa-cp__prev small { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--tx-2); }
.oa-form__d svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: var(--tx-3); }
.oa-fincond { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.oa-fincond > svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--red-tx); }
.oa-fincond small { display: block; font-size: var(--fs-2xs); color: var(--tx-3); }
.oa-fincond b { display: block; font-weight: 600; font-size: var(--fs-sm); line-height: 1.4; }

/* Janela do QR da Qualidade: checklist e fotos da peça pronta (js/qr-os.js, conferHTML) */
.qo-conf .qo-chk { margin: 0; padding: 0 10px 6px; }
.qo-conf .qo-chk li { padding: 10px 6px; }
.qo-conf .qo-chk label { min-height: 32px; }
.qo-fotos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 14px 14px; }
.qo-fotos img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.qo-foto { min-height: 44px; cursor: pointer; }
@media (max-width: 760px) { .qo-foto { flex: 1 1 100%; } .oa-cp__sub { max-width: none; } .qo-conf .qo-chk li { flex-wrap: wrap; } }

/* Só no sistema real (fase 7 · R2): aviso de quem tem o papel mas não tem a ação "Editar OS" e botão de entregar na aba Entrega */
.oa-lock--ed { background: var(--warn-soft); border-color: transparent; color: var(--tx); }
.oa-aviso-ed { display: flex; gap: 8px; align-items: flex-start; flex: 1 1 100%; margin: 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--tx-2); font-size: var(--fs-xs); line-height: 1.45; }
.oa-aviso-ed svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--warn); }
.oa-aviso-ed--card { margin: 4px 20px 18px; }
.oa-ent__a { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
@media (max-width: 760px) { .oa-ent__a .btn { flex: 1 1 100%; min-height: 44px; } }
/* L11 (revisão do comercial 10/11): comprovante da entrada anexado pela vendedora */
.oa-comp { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: var(--fs-xs); color: var(--tx-2); }
.oa-comp svg { width: 14px; height: 14px; flex: none; }

/* "Onde está cada produto" recolhível (21/11): o título é o botão */
.oa-onde__tg { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.oa-onde__tg:hover > span { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.oa-onde__tg:focus-visible { outline: 2px solid var(--red-tx); outline-offset: 3px; }
.oa-onde__tg .oa-onde__chev { color: var(--tx-2); transition: transform var(--t-fast) var(--ease); }
.oa-onde__tg[aria-expanded="false"] .oa-onde__chev { transform: rotate(-90deg); }
.oa-onde__corpo[hidden], .oa-onde__pct[hidden] { display: none; }
.oa-onde.recolhido .card-head { border-bottom-color: transparent; }
@media (prefers-reduced-motion: reduce) { .oa-onde__tg .oa-onde__chev { transition: none; } }
