/* Nei Madeireira — Orçamentos (Comercial). Prefixo oc-. Base visual adaptada do Seu Lóza (oq-/ox-).
   Só tokens: funciona nos temas escuro e claro. */

.page.oc-still, .page.oc-still .rise, .page.oc-still .oc-gate { animation: none !important; }

/* ---------- Lista: indicadores ---------- */
.oc-kpis .oc-kpi { width: 100%; text-align: left; cursor: pointer; transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast); }
.oc-kpis .oc-kpi:hover { border-color: var(--line-3); transform: translateY(-1px); }
.oc-kpis .oc-kpi.on { border-color: var(--red-line); box-shadow: inset 0 0 0 1px var(--red-line); }
.oc-kpis .oc-kpi:focus-visible { outline: 2px solid var(--red-tx); outline-offset: 2px; }
.mini__ic.ok { background: var(--ok-soft); color: var(--ok); }
.oc-kpis .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Lista: barra de filtros ---------- */
.oc-fbar { padding: 14px 16px; display: grid; gap: 12px; margin-bottom: 16px; }
.oc-fbar__r1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oc-q { flex: 1 1 260px; min-width: 0; }
.oc-sel { height: 38px; min-width: 0; flex: 0 1 190px; }
.oc-fbar__r2 { display: flex; align-items: flex-start; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.oc-fbar__lbl { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .08em; color: var(--tx-4); padding-top: 9px; white-space: nowrap; }
.oc-filt { flex: 1; min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.oc-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.oc-chips button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s1); font-size: var(--fs-xs); color: var(--tx-2); transition: all var(--t-fast); white-space: nowrap; }
.oc-chips button:hover { border-color: var(--line-3); color: var(--tx); }
.oc-chips button.on { background: var(--red-soft); border-color: var(--red-line); color: var(--tx); }
.oc-chips button svg { width: 13px; height: 13px; flex: none; }
.oc-chips 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); }
.oc-chips button.on em { background: var(--red-soft); color: var(--red-tx); }
.oc-chips .oc-f-main { font-weight: 600; }
.oc-res { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); color: var(--tx-3); white-space: nowrap; padding-top: 6px; flex: none; }
.oc-res b { color: var(--tx); font-size: var(--fs-sm); }
.oc-res .btn svg { width: 13px; height: 13px; }

/* ---------- Lista: tabela ---------- */
.oc-tbl td { vertical-align: middle; }
.oc-tbl td small { display: flex; align-items: center; gap: 4px; font-size: 11px; margin-top: 2px; white-space: nowrap; }
.oc-tbl td small svg { width: 12px; height: 12px; flex: none; }
.oc-c-id { white-space: nowrap; }
.oc-new { height: 20px; font-size: 10px; margin-left: 6px; }
.oc-cli { display: flex; align-items: center; gap: 10px; min-width: 150px; max-width: 220px; }
.oc-cli > div { min-width: 0; display: grid; }
.oc-cli b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-cli small { color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; }
.oc-cli .dotc { flex: none; }
.oc-lead { flex: none; height: 16px; padding: 0 6px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: var(--info-soft); color: var(--info); }
.oc-c-obra { min-width: 180px; max-width: 300px; }
.oc-c-obra b { display: block; font-weight: 400; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-c-obra small { color: var(--tx-3); }
.oc-vend { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-xs); color: var(--tx-2); white-space: nowrap; }
.oc-vend .avatar { flex: none; }
.oc-c-m3 b, .oc-c-val b { display: block; font-weight: 600; white-space: nowrap; }
.oc-c-m3 b { font-weight: 500; }
.oc-c-m3 small, .oc-c-val small { justify-content: flex-end; }
.oc-c-valid { white-space: nowrap; }
.oc-c-valid b { display: block; font-weight: 500; }
.oc-c-sit { white-space: nowrap; }
.oc-sitsub { margin-top: 4px; }
.oc-sitsub small { margin: 0; color: var(--tx-3); }
.oc-sitsub .ok-tx { color: var(--ok); } .oc-sitsub .warn-tx { color: var(--warn); }
.oc-oslink { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--red-tx); border-bottom: 1px solid var(--red-line); }
.oc-oslink svg { width: 13px; height: 13px; }
.oc-oslink:hover { color: var(--tx); }
.oc-row-go td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.oc-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 30px; color: var(--tx-3); font-size: var(--fs-sm); }
.oc-empty svg { width: 16px; height: 16px; }

/* ---------- Como funciona ---------- */
.modal.oc-m-sm { width: min(640px, calc(100vw - 32px)); }
.oc-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.oc-how li { display: flex; gap: 12px; align-items: flex-start; }
.oc-how__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--red-soft); color: var(--red-tx); }
.oc-how__ic svg { width: 16px; height: 16px; }
.oc-how b { display: block; font-weight: 600; font-size: var(--fs-sm); }
.oc-how small { display: block; font-size: var(--fs-xs); color: var(--tx-2); line-height: 1.5; margin-top: 2px; }
.oc-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.5; }
.oc-explica svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--tx-3); }
.oc-explica b { color: var(--tx); font-weight: 600; }

/* ---------- Editor: topo ---------- */
.oc-hero { padding: 22px 24px 18px; }
.oc-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 16px 28px; align-items: center; margin-bottom: 18px; }
.oc-top__l { min-width: 0; }
.oc-ids { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oc-ids .os-hero__id { margin-right: 2px; }
.oc-hero h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; letter-spacing: -.005em; line-height: 1.1; margin: 10px 0 4px; overflow-wrap: anywhere; }
.oc-desc { font-size: var(--fs-md) !important; color: var(--tx-2); margin: 0; }
.oc-by { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; font-size: var(--fs-xs) !important; color: var(--tx-3); }
.oc-by .avatar { flex: none; }
.oc-by span { padding-top: 3px; }
.oc-by b { color: var(--tx); font-weight: 500; }
.oc-acts { display: grid; gap: 8px; min-width: 0; }
.oc-main { width: 100%; height: 44px; font-size: var(--fs-md); justify-content: center; }
.oc-main > svg { flex: none; width: 18px; height: 18px; }
.oc-acts2 { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)) 38px; gap: 8px; }
.oc-act2 { width: 100%; min-width: 0; padding: 0 8px; gap: 7px; font-size: var(--fs-xs); justify-content: center; }
.oc-act2 > svg { flex: none; width: 15px; height: 15px; }
.oc-act2 > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-more { position: relative; min-width: 0; }
.oc-more__b { padding: 0; }
.oc-more__b > svg { width: 17px; height: 17px; }
.oc-more.open .oc-more__b { border-color: var(--line-3); background: var(--s3); }
.oc-more__m { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 290px; padding: 6px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); display: none; }
.oc-more.open .oc-more__m { display: grid; gap: 2px; animation: rise .2s var(--ease) both; }
.oc-more__m > button, .oc-more__m > a { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; padding: 9px 10px; border-radius: var(--r-sm); text-align: left; font-size: var(--fs-sm); color: var(--tx-2); }
.oc-more__m > button:hover, .oc-more__m > a:hover, .oc-more__m > button:focus-visible, .oc-more__m > a:focus-visible { background: var(--s3); color: var(--tx); outline: none; }
.oc-more__m svg { width: 16px; height: 16px; margin-top: 1px; color: var(--tx-3); }
.oc-more__m span { display: grid; gap: 1px; min-width: 0; }
.oc-more__m b { font-weight: 500; }
.oc-more__m small { font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-more__m .crit, .oc-more__m .crit svg { color: var(--crit); }
.oc-more__m hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }

/* Linha do tempo da situação + fatos */
.oc-rail { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--s1); overflow: hidden; }
.oc-steps, .oc-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.oc-steps.has-lost { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.15fr); }
.oc-steps { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.oc-steps li { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 15px 14px 12px; color: var(--tx-3); }
.oc-steps li + li, .oc-facts > div + div { border-left: 1px solid var(--line); }
.oc-steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line-2); }
.oc-steps li.done::before { background: var(--ok); }
.oc-steps li.now::before { background: var(--red); }
.oc-steps__ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); }
.oc-steps__ic svg { width: 13px; height: 13px; }
.oc-steps li.done { color: var(--tx-2); }
.oc-steps li.done .oc-steps__ic { background: var(--ok-soft); color: var(--ok); }
.oc-steps li.now { color: var(--tx); }
.oc-steps li.now .oc-steps__ic { background: var(--red-soft); color: var(--red-tx); box-shadow: 0 0 0 3px var(--red-soft); }
.oc-steps li.off { opacity: .5; }
.oc-steps li.fin::before { background: var(--ok); }
.oc-steps li.fin { color: var(--tx); }
.oc-steps li.fin b { font-weight: 600; }
.oc-steps li.fin .oc-steps__ic { box-shadow: 0 0 0 3px var(--ok-soft); }
.oc-steps li.lost { color: var(--tx); background: var(--crit-soft); }
.oc-steps li.lost::before { background: var(--crit); }
.oc-steps li.lost .oc-steps__ic { background: var(--s1); color: var(--crit); }
.oc-steps li.lost.vencido { background: var(--s3); }
.oc-steps li.lost.vencido::before { background: var(--tx-4); }
.oc-steps li.lost.vencido .oc-steps__ic { color: var(--tx-2); }
.oc-steps__t { display: grid; min-width: 0; }
.oc-steps__t b { font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-steps li.now b, .oc-steps li.lost b { font-weight: 600; }
.oc-steps__t small { font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-facts > div { display: grid; align-content: start; gap: 2px; padding: 12px 14px; min-width: 0; }
.oc-facts small { display: flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; }
.oc-facts small svg { width: 12px; height: 12px; flex: none; }
.oc-facts b { font-size: var(--fs-md); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-facts > div > span { font-size: 11.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-facts .warn-tx { color: var(--warn); } .oc-facts .crit-tx { color: var(--crit); }

/* Faixa de aviso */
.oc-gate { --c: var(--warn); --cs: var(--warn-soft);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; margin: 12px 0 0;
  border-radius: var(--r-md); background: var(--cs); border: 1px solid color-mix(in srgb, var(--c) 36%, transparent); animation: rise .5s var(--ease) both; }
.oc-gate.ok { --c: var(--ok); --cs: var(--ok-soft); }
.oc-gate.info { --c: var(--info); --cs: var(--info-soft); }
.oc-gate.crit { --c: var(--crit); --cs: var(--crit-soft); }
.oc-gate.neg { --c: var(--wa); --cs: var(--wa-soft); }
.oc-gate.mut { --c: var(--tx-3); --cs: var(--s2); }
.oc-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); }
.oc-gate__ic svg { width: 18px; height: 18px; }
.oc-gate b { display: block; font-weight: 600; font-size: var(--fs-md); color: var(--tx); }
.oc-gate p { font-size: var(--fs-sm); color: var(--tx-2); margin: 2px 0 0; }
.oc-gate.warn .oc-gate__ic { animation: pulse 2s infinite; }
.oc-gate .btn { white-space: nowrap; }

/* ---------- Editor: colunas ---------- */
.oc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.oc-col { display: grid; gap: 16px; min-width: 0; }
.oc-side { position: sticky; top: 16px; }
.oc-h4 { display: flex; align-items: center; gap: 8px; color: var(--tx); font-weight: 500; font-size: var(--fs-md); margin: 0 0 14px; }
.oc-h4 svg { width: 16px; height: 16px; color: var(--tx-3); }
.oc-h4 .badge { margin-left: auto; }
.oc-h4.sm { font-size: var(--fs-sm); margin: 18px 0 4px; }
.card-head > .pill { flex: none; }
.oc-mad .card-head, .oc-dados .card-head, .oc-serv .card-head, .oc-histc .card-head, .oc-lev .card-head { flex-wrap: wrap; align-items: center; row-gap: 10px; }
.oc-mad .card-head > div:first-child, .oc-dados .card-head > div:first-child, .oc-serv .card-head > div:first-child, .oc-histc .card-head > div:first-child, .oc-lev .card-head > div:first-child { min-width: 0; flex: 1 1 260px; }

/* Cliente e obra */
.oc-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 14px; padding: 16px 20px 20px; }
.oc-fld { display: grid; align-content: start; min-width: 0; }
.oc-fld .lbl { margin-bottom: 6px; }
.oc-fld .input, .oc-fld .select { width: 100%; min-width: 0; }
.oc-form .span-2 { grid-column: span 2; }
.oc-form .span-4 { grid-column: 1 / -1; }
.oc-ro__ic { width: 14px; height: 14px; color: var(--tx-3); flex: none; }
.oc-ro { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: var(--r-sm); background: var(--s2); border: 1px solid var(--line); font-size: var(--fs-sm); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-ro .dotc, .oc-ro .avatar { flex: none; }
.oc-ro__lnk { font-size: var(--fs-xs); color: var(--tx-3); }
.oc-ro .oc-lead { margin-left: 2px; }
.oc-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.oc-seg button { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); text-align: left; color: var(--tx-2); transition: all var(--t-fast); }
.oc-seg button > svg { width: 18px; height: 18px; flex: none; color: var(--tx-3); }
.oc-seg button span { display: grid; min-width: 0; }
.oc-seg button b { font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-seg button small { font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-seg button:not(:disabled):hover { border-color: var(--line-3); color: var(--tx); }
.oc-seg button.on { border-color: var(--red-line); background: var(--red-soft); color: var(--tx); box-shadow: inset 0 0 0 1px var(--red-line); }
.oc-seg button.on > svg { color: var(--red-tx); }
.oc-seg button:disabled { cursor: default; }
.oc-seg button:disabled:not(.on) { opacity: .5; }
.input[type="date"] { color-scheme: inherit; }

/* Madeira e serviços: tabelas editáveis */
.oc-itwrap { margin-top: 10px; }
.oc-it-tbl th, .oc-sv-tbl th { padding: 10px 7px; }
.oc-it-tbl td, .oc-sv-tbl td { padding: 11px 7px; vertical-align: middle; }
.oc-it-tbl td:first-child, .oc-it-tbl th:first-child, .oc-sv-tbl td:first-child, .oc-sv-tbl th:first-child { padding-left: 20px; }
.oc-it-tbl td:last-child, .oc-it-tbl th:last-child, .oc-sv-tbl td:last-child, .oc-sv-tbl th:last-child { padding-right: 14px; }
.oc-mad, .oc-serv, .oc-tcard { container-type: inline-size; }
.oc-x-cub b, .oc-tf-cub b { display: block; font-weight: 500; }
.oc-x-cub small, .oc-tf-cub small { display: block; font-size: 11px; color: var(--tx-3); white-space: nowrap; margin-top: 1px; }
.oc-prod { display: flex; align-items: flex-start; gap: 10px; min-width: 170px; }
.oc-prod .wood-dot { margin-top: 5px; width: 12px; height: 12px; }
.oc-prod > div { min-width: 0; display: grid; gap: 3px; }
.oc-prod b { font-weight: 500; font-size: var(--fs-sm); }
.oc-prod small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--tx-3); }
.oc-cod { font-size: 10.5px; color: var(--tx-4); }
.oc-calctag { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: 5px; background: var(--gold-soft); color: var(--gold-tx); font-size: 10px; font-weight: 500; }
.oc-calctag svg { width: 11px; height: 11px; }
.oc-stock { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--warn); }
.oc-stock svg { width: 12px; height: 12px; }
.oc-x-warn:empty { display: none; }
.oc-it-tbl td.r, .oc-sv-tbl td.r { white-space: nowrap; }
.oc-it-tbl td small.muted, .oc-sv-tbl td small.muted { margin-left: 2px; font-size: 11px; }
.oc-tab { display: block; font-size: 10.5px; color: var(--gold-tx); margin-top: 2px; }
.oc-in { height: 34px; padding: 0 8px; font-size: var(--fs-sm); }
.oc-in-comp { width: 76px; padding-right: 2px; }
.oc-inu { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.oc-inu > span { font-size: var(--fs-xs); color: var(--tx-3); }
.oc-inu input { width: 62px; text-align: right; -moz-appearance: textfield; }
.oc-inu-r input { width: 74px; }
.oc-inu input::-webkit-outer-spin-button, .oc-inu input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.oc-inu-lg input { width: 120px; height: 44px; font-size: var(--fs-lg); font-weight: 600; }
.oc-inu-lg > span { font-size: var(--fs-sm); }
.oc-x-tot b, .oc-s-tot b { font-weight: 600; }
.oc-c-rm { width: 40px; text-align: right; }
.oc-rm { width: 32px; height: 32px; color: var(--tx-4); }
.oc-rm svg { width: 15px; height: 15px; }
.oc-rm:hover { color: var(--crit); background: var(--crit-soft); }
.oc-it-tbl tfoot td { border-top: 1px solid var(--line-2); border-bottom: 0; background: var(--bg-2); font-size: var(--fs-xs); color: var(--tx-2); padding-top: 12px; padding-bottom: 12px; }
.oc-it-tbl tfoot .oc-tf-l { font-weight: 500; color: var(--tx); font-size: var(--fs-sm); }
.oc-it-tbl tfoot .oc-tf-tot b { font-size: var(--fs-md); color: var(--tx); }
.oc-sv-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--s3); color: var(--tx-2); }
.oc-sv-ic svg { width: 15px; height: 15px; }
.oc-sv-ic.sm { width: 22px; height: 22px; border-radius: 7px; }
.oc-sv-ic.sm svg { width: 12px; height: 12px; }
.oc-sv-tbl .oc-prod { align-items: center; }
.oc-vazio { display: flex; align-items: center; gap: 14px; margin: 14px 20px 4px; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line-2); color: var(--tx-3); }
.oc-vazio > svg { width: 22px; height: 22px; flex: none; }
.oc-vazio > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.oc-vazio b { color: var(--tx); font-weight: 500; }
.oc-vazio small { font-size: var(--fs-xs); }
.oc-vazio.sm { padding: 12px 14px; font-size: var(--fs-sm); }
.oc-vazio.sm > svg { width: 16px; height: 16px; }
.oc-note { display: flex; align-items: center; gap: 6px; margin: 10px 20px 0; font-size: var(--fs-xs); color: var(--tx-3); }
.oc-note svg { width: 13px; height: 13px; flex: none; }
.oc-add { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 14px 20px 18px; padding: 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.oc-add__lbl { flex: 1 1 100%; }
.oc-add__lbl { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--tx-2); white-space: nowrap; }
.oc-add__lbl svg { width: 14px; height: 14px; color: var(--red-tx); }
.oc-add .select { height: 36px; min-width: 0; flex: 0 1 200px; }
.oc-add .oc-addp { flex: 1 1 260px; }
.oc-add .btn { flex: none; }

/* Frete e roteiro */
.oc-frete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 20px 0; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--s1); }
.oc-frete__l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.oc-frete__l > div { display: grid; min-width: 0; }
.oc-frete__l b { font-weight: 500; font-size: var(--fs-sm); }
.oc-frete__l small { font-size: var(--fs-2xs); color: var(--tx-3); }
.oc-frete__r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.oc-frete__r .select { height: 36px; min-width: 0; max-width: 340px; }
.oc-fr-val { font-weight: 600; min-width: 76px; text-align: right; white-space: nowrap; }
.oc-rot { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 12px 20px 18px; }
.oc-rot > small { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--tx-3); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.oc-rot > small svg { width: 13px; height: 13px; }
.oc-rot__l { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.oc-rot__s { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: var(--r-pill); background: var(--s3); border: 1px solid var(--line); font-size: 11.5px; color: var(--tx-2); white-space: nowrap; }
.oc-rot__s svg { width: 12px; height: 12px; color: var(--red-tx); }
.oc-rot__sep { width: 13px; height: 13px; color: var(--tx-4); }

/* Histórico */
.oc-hist { list-style: none; margin: 0; padding: 14px 20px 16px; display: grid; max-height: 460px; overflow-y: auto; }
.oc-hist li { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.oc-hist li::before { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--line); }
.oc-hist li:last-child { padding-bottom: 0; }
.oc-hist li:last-child::before { display: none; }
.oc-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); }
.oc-hist__ic svg { width: 14px; height: 14px; }
.oc-hist li.t-enviado .oc-hist__ic, .oc-hist li.t-visualizado .oc-hist__ic { --c: var(--info); --cs: var(--info-soft); }
.oc-hist li.t-negociacao .oc-hist__ic, .oc-hist li.t-followup .oc-hist__ic { --c: var(--wa); --cs: var(--wa-soft); }
.oc-hist li.t-aprovado .oc-hist__ic, .oc-hist li.t-os .oc-hist__ic { --c: var(--ok); --cs: var(--ok-soft); }
.oc-hist li.t-alterado .oc-hist__ic { --c: var(--warn); --cs: var(--warn-soft); }
.oc-hist li.t-calc .oc-hist__ic { --c: var(--gold-tx); --cs: var(--gold-soft); }
.oc-hist li.t-perdido .oc-hist__ic { --c: var(--crit); --cs: var(--crit-soft); }
.oc-hist li.t-criado .oc-hist__ic { --c: var(--red-tx); --cs: var(--red-soft); }
.oc-hist li.first .oc-hist__ic { box-shadow: 0 0 0 3px var(--red-soft); }
.oc-hist b { display: block; font-weight: 500; font-size: var(--fs-sm); line-height: 1.4; overflow-wrap: anywhere; }
.oc-hist small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; font-size: 11.5px; color: var(--tx-3); }
.oc-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); }

/* ---------- Lateral: resumo e carga ---------- */
.oc-sum__t { display: grid; gap: 9px; }
.oc-sum__t > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: var(--fs-sm); color: var(--tx-2); }
.oc-sum__t > div > span { min-width: 0; }
.oc-sum__t small { display: block; font-size: var(--fs-2xs); color: var(--tx-3); }
.oc-sum__t b { font-weight: 500; color: var(--tx); white-space: nowrap; }
.oc-sum__t .desc b { color: var(--ok); }
.oc-sum__desc { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 7px 10px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--tx-2); }
.oc-sum__dl { display: inline-flex; align-items: center; gap: 10px; }
.oc-sum__desc > b { color: var(--ok); font-weight: 500; white-space: nowrap; }
.oc-sum__desc > b.muted { color: var(--tx-3); }
.oc-wa__h { display: inline-flex; align-items: center; gap: 5px; }
.oc-wa__h svg { width: 13px; height: 13px; }
.oc-sum__desc .oc-inu input { width: 68px; height: 32px; }
.oc-sum__tot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.oc-sum__tot span { font-weight: 600; }
.oc-sum__tot b { font-size: 26px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.oc-sum__pg { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: var(--fs-xs); color: var(--tx-3); }
.oc-sum__pg svg { width: 13px; height: 13px; flex: none; }
.oc-carga { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.oc-sum .oc-h4 + .oc-carga { margin-top: 0; padding-top: 0; border-top: 0; }
.oc-carga__nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.oc-carga__nums > div { display: grid; gap: 1px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.oc-carga__nums small { font-size: var(--fs-2xs); color: var(--tx-3); white-space: nowrap; }
.oc-carga__nums b { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-veic { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--gold-line); background: var(--gold-soft); }
.oc-veic.ret { border-color: var(--line-2); background: var(--s2); }
.oc-veic__ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--s1); color: var(--gold-tx); border: 1px solid var(--gold-line); }
.oc-veic.ret .oc-veic__ic { color: var(--tx-2); border-color: var(--line-2); }
.oc-veic__ic svg { width: 18px; height: 18px; }
.oc-veic__b { display: grid; gap: 4px; min-width: 0; flex: 1; }
.oc-veic__b > small { font-size: var(--fs-2xs); color: var(--tx-3); text-transform: uppercase; letter-spacing: .06em; }
.oc-veic__b > b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; font-size: var(--fs-sm); }
.oc-veic__b .pill { height: 20px; font-size: 10.5px; }
.oc-veic__bar { display: flex; align-items: center; gap: 8px; }
.oc-veic__bar .progress { flex: 1; }
.oc-veic__bar span { font-size: 11px; color: var(--tx-2); min-width: 30px; text-align: right; }
.oc-veic__s { font-size: 11px; color: var(--tx-3); }

/* Conversa ligada */
.oc-wa__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.oc-wa__meta .muted { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); margin-left: auto; }
.oc-fdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.oc-wa__msgs { display: grid; gap: 6px; padding: 10px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.oc-wa__m { max-width: 88%; padding: 7px 10px; border-radius: 10px; background: var(--s3); justify-self: start; }
.oc-wa__m.eu { justify-self: end; background: var(--wa-soft); }
.oc-wa__m.sis { justify-self: center; background: transparent; padding: 2px 6px; }
.oc-wa__m.sis p { font-size: 11px; color: var(--tx-3); text-align: center; }
.oc-wa__m p { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--tx); overflow-wrap: anywhere; }
.oc-wa__m p svg { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--tx-3); }
.oc-wa__m small { display: block; font-size: 10px; color: var(--tx-4); margin-top: 2px; text-align: right; }
.oc-wa__m.sis small { display: none; }
.oc-wa__b { width: 100%; margin-top: 12px; justify-content: center; }

/* Aprovação registrada */
.oc-kv { display: grid; gap: 9px; margin: 0; }
.oc-kv > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; font-size: var(--fs-xs); color: var(--tx-2); align-items: center; }
.oc-kv small { font-size: var(--fs-2xs); color: var(--tx-3); }
.oc-kv b { color: var(--tx); font-weight: 500; }
.oc-who { display: inline-flex; align-items: center; gap: 6px; }
.oc-confs { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.oc-confs li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--tx-2); }
.oc-confs svg { width: 14px; height: 14px; color: var(--ok); flex: none; }
.oc-aprov__p { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: var(--fs-sm); color: var(--tx-2); line-height: 1.5; }
.oc-aprov__p > svg { width: 16px; height: 16px; flex: none; color: var(--ok); margin-top: 2px; }

/* ---------- Modais ---------- */
.oc-ta { width: 100%; height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.oc-motivos { display: flex; flex-wrap: wrap; gap: 8px; }
.oc-motivos .chip { cursor: pointer; height: 34px; }
.oc-motivos .chip:hover { color: var(--tx); border-color: var(--line-3); }
.oc-mt { margin-top: 16px; }
.oc-chs { display: flex; flex-wrap: wrap; gap: 6px; }
.oc-chs button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--bg-2); font-size: var(--fs-xs); color: var(--tx-2); transition: all var(--t-fast); }
.oc-chs button svg { width: 14px; height: 14px; }
.oc-chs button:hover { border-color: var(--line-3); color: var(--tx); }
.oc-chs button.on { background: var(--red-soft); border-color: var(--red-line); color: var(--tx); font-weight: 500; }

/* Novo orçamento */
.oc-nmodo { margin-bottom: 16px; }
.oc-nform { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.oc-nform[hidden] { display: none; }
#oc-ncli { grid-template-columns: 1fr; }

/* Enviar */
.oc-send { display: grid; gap: 12px; }
.oc-send__to { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--tx-2); }
.oc-send__to svg { width: 16px; height: 16px; color: var(--wa); flex: none; }
.oc-send__to b { color: var(--tx); font-weight: 600; }
.oc-send__chat { padding: 14px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.oc-send__doc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--wa-soft); border: 1px solid color-mix(in srgb, var(--wa) 30%, transparent); max-width: 420px; justify-self: end; min-width: 0; width: 100%; }
.oc-send__doc > div { display: grid; min-width: 0; }
.oc-send__doc b { font-size: var(--fs-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-send__doc small { font-size: var(--fs-2xs); color: var(--tx-3); }
.oc-send__pdf { width: 36px; height: 42px; border-radius: 6px; display: grid; place-items: center; flex: none; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.oc-send__chat .lbl { margin: 4px 0 0; }
.oc-send__kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.oc-send__kv > div { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s3); min-width: 0; }
.oc-send__kv small { font-size: var(--fs-2xs); color: var(--tx-3); }
.oc-send__kv b { font-size: var(--fs-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Calculadoras */
.modal.oc-m-calc { width: min(980px, calc(100vw - 32px)); }
.oc-calc-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.oc-calc-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); font-size: var(--fs-sm); color: var(--tx-2); transition: all var(--t-fast); }
.oc-calc-tabs button svg { width: 18px; height: 18px; }
.oc-calc-tabs button:hover { border-color: var(--line-3); color: var(--tx); }
.oc-calc-tabs button.on { background: var(--red-soft); border-color: var(--red-line); color: var(--tx); font-weight: 600; box-shadow: inset 0 0 0 1px var(--red-line); }
.oc-calc-tabs button.on svg { color: var(--red-tx); }
.oc-calc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.oc-calc__f { display: grid; gap: 18px; padding: 16px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.oc-hint { display: flex; gap: 5px; align-items: flex-start; margin-top: 6px; font-size: var(--fs-2xs); color: var(--tx-3); line-height: 1.4; }
.oc-hint svg { width: 12px; height: 12px; flex: none; margin-top: 1px; }
.oc-tog { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.oc-tog input { position: absolute; opacity: 0; pointer-events: none; }
.oc-tog__sw { position: relative; width: 36px; height: 20px; border-radius: 20px; background: var(--s4); flex: none; transition: background var(--t-fast); margin-top: 1px; }
.oc-tog__sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--t-med) var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.oc-tog input:checked + .oc-tog__sw { background: var(--ok); }
.oc-tog input:checked + .oc-tog__sw::after { transform: translateX(16px); }
.oc-tog input:focus-visible + .oc-tog__sw { outline: 2px solid var(--red-tx); outline-offset: 2px; }
.oc-tog > span:last-child { display: grid; gap: 1px; }
.oc-tog b { font-weight: 500; font-size: var(--fs-sm); }
.oc-tog small { font-size: var(--fs-2xs); color: var(--tx-3); }
.oc-calc__r { min-width: 0; }
.oc-calc__r .table-wrap { border: 1px solid var(--line); border-radius: var(--r-md); }
.oc-calc-tbl td.r small { display: block; font-size: 11px; }
.oc-calc-tbl td { padding: 10px 12px; }
.oc-calc-tbl tfoot td { border-top: 1px solid var(--line-2); background: var(--bg-2); font-size: var(--fs-xs); color: var(--tx-2); font-weight: 500; padding: 11px 12px; }
.oc-calc-tbl tfoot b { font-size: var(--fs-md); color: var(--tx); }
.oc-calc-sv td { background: var(--s2); }
.oc-calc-rg { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; }
.oc-calc-rg li { display: flex; align-items: flex-start; gap: 7px; font-size: var(--fs-xs); color: var(--tx-2); }
.oc-calc-rg svg { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--ok); }
.oc-sug { border: 1px solid var(--gold-line); background: var(--gold-soft); }
.oc-sug svg { color: var(--gold-tx); }
.oc-calc-ft { font-size: var(--fs-xs); }
.oc-calc .oc-vazio { margin: 0; }
.oc-calc .oc-prod { min-width: 0; }
.oc-calc-tbl td.r { white-space: nowrap; }

/* Aprovação: revisão e conferências */
.modal.oc-m-rev { width: min(780px, calc(100vw - 32px)); }
.oc-rev { padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); display: grid; gap: 12px; }
.oc-rev__h { display: flex; align-items: center; gap: 8px; }
.oc-rev__h svg { width: 16px; height: 16px; color: var(--red-tx); }
.oc-rev__h small { margin-left: auto; font-size: var(--fs-2xs); }
.oc-rev__its { display: grid; gap: 4px; }
.oc-rev__it { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 92px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s2); border: 1px solid var(--line); font-size: var(--fs-sm); }
.oc-rev__it.sv { grid-template-columns: 22px minmax(0, 1fr) auto 92px; }
.oc-rev__it .wood-dot { width: 12px; height: 12px; }
.oc-rev__n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-rev__n b { font-weight: 500; }
.oc-rev__n .muted { font-size: var(--fs-xs); }
.oc-rev__q { font-size: var(--fs-xs); color: var(--tx-2); white-space: nowrap; }
.oc-rev__v { text-align: right; font-weight: 600; white-space: nowrap; }
.oc-rev__kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.oc-rev__kv > div { display: grid; gap: 1px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--s2); min-width: 0; }
.oc-rev__kv small { font-size: var(--fs-2xs); color: var(--tx-3); }
.oc-rev__kv b { font-size: var(--fs-sm); font-weight: 600; }
.oc-rev__rot { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.oc-rev__rot > small { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--tx-2); font-weight: 500; }
.oc-rev__rot > small svg { width: 14px; height: 14px; color: var(--red-tx); }
.oc-chk { padding: 0; margin: 4px 0 0; }
.oc-chk li { padding: 10px 4px; }
.oc-chk li.on { background: transparent; }
.oc-chk .os-chk__t { display: grid; gap: 1px; min-width: 0; }
.oc-chk .os-chk__t b { font-weight: 500; font-size: var(--fs-sm); }
.oc-chk .os-chk__t small { white-space: normal; font-size: var(--fs-xs); color: var(--tx-3); }
.oc-chk li.on .os-chk__t, .oc-chk li.on .os-chk__t b { color: var(--tx); }
.oc-aform { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.oc-areg { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); font-size: var(--fs-xs); color: var(--tx-2); }
.oc-areg .avatar { flex: none; }
.oc-areg b { color: var(--tx); font-weight: 600; }
.oc-ck-n { font-size: var(--fs-xs); color: var(--tx-3); }
.oc-ck-n b { color: var(--tx); font-size: var(--fs-sm); }
.oc-ck-n.ok, .oc-ck-n.ok b { color: var(--ok); }
.modal .btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .oc-top { grid-template-columns: 1fr; align-items: start; }
  .oc-acts { max-width: 640px; }
}
@media (max-width: 1100px) {
  .oc-grid { grid-template-columns: minmax(0, 1fr); }
  .oc-side { position: static; }
  .oc-fbar__r2 { flex-direction: column; } .oc-fbar__lbl { padding-top: 0; }
  .oc-steps__t small { display: none; }
}
@media (max-width: 900px) {
  .oc-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oc-calc { grid-template-columns: 1fr; }
  .oc-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .oc-facts > div:nth-child(4) { border-left: 0; }
  .oc-facts > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .oc-filt { flex-direction: column; gap: 8px; }
  .oc-sel { flex: 1 1 140px; }
  /* Editor */
  .oc-hero { padding: 18px 16px 16px; }
  .oc-hero h1 { font-size: 26px; }
  .oc-acts2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oc-acts2 .oc-more { grid-column: auto; }
  .oc-more__m { width: min(290px, calc(100vw - 48px)); }
  .oc-steps, .oc-steps.has-lost { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .oc-steps.has-lost li.lost { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); justify-content: flex-start; }
  .oc-steps.has-lost li.lost .oc-steps__t { display: grid; }
  .oc-steps.has-lost li.lost .oc-steps__t small { display: block; }
  .oc-steps li { justify-content: center; padding: 14px 4px 10px; }
  .oc-steps__t { display: none; }
  .oc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oc-facts > div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .oc-facts > div:nth-child(-n + 2) { border-top: 0; }
  .oc-facts > div:nth-child(even) { border-left: 1px solid var(--line) !important; }
  .oc-facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .oc-gate { grid-template-columns: auto minmax(0, 1fr); }
  .oc-gate > :last-child:not(div) { grid-column: 1 / -1; justify-self: start; }
  .oc-form { grid-template-columns: 1fr; padding: 14px 16px 16px; }
  .oc-form .span-2 { grid-column: auto; }
  .oc-seg { grid-template-columns: 1fr; }
  .oc-add { margin: 12px 16px 16px; }
  .oc-add .select, .oc-add .oc-addp { flex: 1 1 100%; }
  .oc-add .btn { flex: 1 1 100%; justify-content: center; }
  .oc-frete { margin: 12px 16px 0; }
  .oc-frete__r { width: 100%; }
  .oc-frete__r .select { flex: 1 1 100%; max-width: none; }
  .oc-rot { margin: 12px 16px 16px; }
  .oc-vazio { margin: 12px 16px 4px; flex-wrap: wrap; }
  .oc-note { margin: 10px 16px 0; }
  .oc-hist { padding: 12px 16px 14px; }
  .oc-rev__it, .oc-rev__it.sv { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .oc-rev__it .oc-rev__q { grid-column: 2; grid-row: 2; }
  .oc-rev__it .oc-rev__v { grid-column: 3; grid-row: 1 / span 2; }
  .oc-rev__kv, .oc-send__kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oc-aform, .oc-nform { grid-template-columns: 1fr; }
  .oc-calc-tabs button { height: 40px; font-size: var(--fs-xs); }
  .modal .modal__foot { flex-wrap: wrap; }
  .oc-ck-n, .oc-calc-ft { flex: 1 1 100%; }
}
@media (max-width: 420px) {
  .oc-sum__tot b { font-size: 22px; }
  .oc-calc-tbl th:nth-child(3), .oc-calc-tbl td:nth-child(3) { display: none; }
}

/* Tabelas viram cartões quando o cartão fica estreito (container query) */
@container (max-width: 860px) {
  /* Lista vira cartões */
  .oc-twrap { overflow: visible; }
  .oc-tbl thead { display: none; }
  .oc-tbl, .oc-tbl tbody { display: block; }
  .oc-tbl tr[data-id] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .oc-tbl tr[data-id] td { display: block; padding: 0; border: 0; min-width: 0; max-width: none; }
  .oc-tbl .oc-c-id { grid-column: 1; grid-row: 1; }
  .oc-tbl .oc-c-sit { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .oc-tbl .oc-c-sit .oc-sitsub small, .oc-tbl .oc-c-sit .oc-oslink { justify-content: flex-end; }
  .oc-tbl .oc-c-cli { grid-column: 1; grid-row: 2; }
  .oc-tbl .oc-c-obra { grid-column: 1 / -1; grid-row: 3; }
  .oc-tbl .oc-c-vend { grid-column: 1 / -1; grid-row: 4; }
  .oc-tbl .oc-c-m3, .oc-tbl .oc-c-val, .oc-tbl .oc-c-valid { grid-row: 5; text-align: left; }
  .oc-tbl .oc-c-m3 { grid-column: 1; }
  .oc-tbl .oc-c-val { grid-column: 2; text-align: right; }
  .oc-tbl .oc-c-valid { grid-column: 1 / -1; grid-row: 6; display: flex !important; align-items: baseline; gap: 8px; }
  .oc-tbl .oc-c-valid::before { content: "Validade"; font-size: var(--fs-2xs); color: var(--tx-3); }
  .oc-tbl .oc-c-m3 small, .oc-tbl .oc-c-val small { justify-content: flex-start; }
  .oc-tbl .oc-c-val small { justify-content: flex-end; }
  .oc-cli { max-width: none; min-width: 0; }
  .oc-c-obra { max-width: none; }
}
@container (max-width: 640px) {
  /* Itens viram cartões */
  .oc-itwrap { overflow: visible; }
  .oc-it-tbl thead, .oc-sv-tbl thead { display: none; }
  .oc-it-tbl, .oc-it-tbl tbody, .oc-it-tbl tfoot, .oc-sv-tbl, .oc-sv-tbl tbody { display: block; }
  .oc-it-tbl tbody tr, .oc-sv-tbl tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: relative; }
  .oc-it-tbl tbody td, .oc-sv-tbl tbody td { display: block; padding: 0 !important; border: 0; min-width: 0; text-align: left; }
  .oc-it-tbl tbody td[data-l]::before, .oc-sv-tbl tbody td[data-l]::before { content: attr(data-l); display: block; font-size: var(--fs-2xs); color: var(--tx-4); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
  .oc-it-tbl tbody .oc-c-prod, .oc-sv-tbl tbody .oc-c-prod { grid-column: 1 / -1; padding-right: 40px !important; }
  .oc-it-tbl tbody .oc-c-prod::before, .oc-sv-tbl tbody .oc-c-prod::before { display: none !important; }
  .oc-it-tbl tbody .oc-c-rm, .oc-sv-tbl tbody .oc-c-rm { position: absolute; right: 10px; top: 10px; width: auto; }
  .oc-it-tbl.is-ed tbody td[data-l="Comprimento"], .oc-it-tbl.is-ed tbody td[data-l="Quantidade"] { grid-column: span 1; }
  .oc-it-tbl tbody td[data-l="Preço (R$)"] { grid-column: span 2; }
  .oc-it-tbl tbody td.r, .oc-sv-tbl tbody td.r { text-align: left; }
  .oc-sv-tbl tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oc-sv-tbl tbody td[data-l="Quantidade"] { grid-column: 1 / -1; }
  .oc-prod { min-width: 0; }
  .oc-inu input { width: 70px; }
  .oc-in-comp { width: 80px; }
  .oc-it-tbl tfoot tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; padding: 12px 16px; background: var(--bg-2); }
  .oc-it-tbl tfoot td { display: block; padding: 0 !important; border: 0; background: none; text-align: left !important; }
  .oc-it-tbl tfoot td:empty { display: none; }
  .oc-it-tbl tfoot .oc-tf-l { grid-column: 1 / -1; }
  .oc-it-tbl tfoot .oc-tf-tot { grid-column: 1 / -1; }
}

/* ---------- Tema claro ---------- */
:root[data-theme="light"] .oc-steps { background: var(--s3); }
:root[data-theme="light"] .oc-rail, :root[data-theme="light"] .oc-frete { background: var(--s1); }
:root[data-theme="light"] .oc-send__pdf { background: var(--red-tx); }
:root[data-theme="light"] .oc-tog__sw { background: var(--line-3); }
.oc-add__hint { font-size: var(--fs-xs); }

/* ---------- Cabeçalhos de cartão: título à esquerda, ações à direita ---------- */
.oc-hacts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.oc-hacts .btn > svg { flex: none; }
.card-head .sub { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.oc-sub__ic { width: 12px; height: 12px; flex: none; color: var(--tx-4); }
.oc-sub__lnk { color: var(--tx-2); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.oc-sub__lnk:hover { color: var(--tx); text-decoration-color: var(--tx-3); }

/* ---------- Levantamento da obra ---------- */
.oc-lev { container-type: inline-size; }
.oc-lev__b { padding: 14px 20px 18px; display: grid; gap: 12px; }
.oc-lev .lv-dl { grid-template-columns: 132px minmax(0, 1fr); gap: 10px 16px; }
.oc-lev .lv-dl dt { white-space: nowrap; }
.oc-lev .lv-por { margin: 0; }
@container (min-width: 620px) {
  .oc-lev .lv-dl { grid-template-columns: 132px minmax(0, 1fr) 112px minmax(0, 1fr); }
}
.oc-lev__dif { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--gold-soft); border: 1px solid var(--gold-line); font-size: var(--fs-xs); color: var(--tx-2); line-height: 1.5; }
.oc-lev__dif > svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--gold-tx); }
.oc-lev__dif b { color: var(--tx); font-weight: 500; }

/* ---------- Faixa de edição destravada ---------- */
.oc-gate.ed { --c: var(--gold-tx); --cs: var(--gold-soft); }
.oc-gate p b, .oc-gate p .oc-gate__n { display: inline; font-size: inherit; font-weight: 600; color: var(--tx); }
.oc-gate__n { margin-left: 4px; white-space: nowrap; }

/* ---------- Modal: destravar edição ---------- */
.oc-dt__p { margin: 0; font-size: var(--fs-sm); color: var(--tx-2); line-height: 1.6; }
.oc-dt__p b { color: var(--tx); font-weight: 600; }
.oc-dt__kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.oc-dt__kv > div { display: grid; gap: 2px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--s3); min-width: 0; }
.oc-dt__kv small { font-size: var(--fs-2xs); color: var(--tx-3); }
.oc-dt__kv b { font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-dt__l { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.oc-dt__l li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-xs); color: var(--tx-2); line-height: 1.5; }
.oc-dt__l svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--tx-3); }

/* ---------- Histórico: filtro e mudanças "antigo → novo" ---------- */
.oc-hf { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--r-pill); background: var(--s3); border: 1px solid var(--line); flex: none; }
.oc-hf button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); color: var(--tx-3); transition: background var(--t-fast), color var(--t-fast); }
.oc-hf button svg { width: 13px; height: 13px; flex: none; }
.oc-hf button em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--tx-4); }
.oc-hf button:hover { color: var(--tx); }
.oc-hf button.on { background: var(--s1); color: var(--tx); box-shadow: inset 0 0 0 1px var(--line-2); }
.oc-hf button.on em { color: var(--red-tx); }
.oc-hist li.t-edicao .oc-hist__ic, .oc-hist li.t-destravar .oc-hist__ic { --c: var(--gold-tx); --cs: var(--gold-soft); }
.oc-hist li.t-lev .oc-hist__ic { --c: var(--info); --cs: var(--info-soft); }
.oc-hist li > div { min-width: 0; flex: 1; }
.oc-mud { list-style: none; margin: 8px 0 4px; padding: 8px 12px; display: grid; gap: 6px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.oc-mud li { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 0; font-size: var(--fs-xs); }
.oc-mud li::before { display: none; }
.oc-mud__k { color: var(--tx-3); overflow-wrap: anywhere; }
.oc-mud__v { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; color: var(--tx); }
.oc-mud__v s { color: var(--tx-3); text-decoration-color: var(--tx-4); }
.oc-mud__v b { display: inline; font-size: var(--fs-xs); font-weight: 500; line-height: 1.4; }
.oc-mud__ar { width: 12px; height: 12px; flex: none; color: var(--tx-4); align-self: center; }
.oc-hist__dep { height: 17px; padding: 0 6px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 10px; font-weight: 500; background: var(--gold-soft); color: var(--gold-tx); }
.oc-hist li.oc-hist__vazio { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: var(--fs-xs); color: var(--tx-3); }
.oc-hist li.oc-hist__vazio::before { display: none; }
.oc-hist li.oc-hist__vazio svg { width: 15px; height: 15px; flex: none; }

@media (max-width: 760px) {
  .oc-lev__b { padding: 12px 16px 16px; }
  .oc-hacts { justify-content: flex-start; }
  .oc-dt__kv { grid-template-columns: 1fr; }
  .oc-mud li { grid-template-columns: 1fr; gap: 1px; }
  .oc-mud li + li { padding-top: 6px; border-top: 1px solid var(--line); }
}
/* Reservar madeira da linha (abre a reserva do Estoque do pátio) */
.oc-reservar { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: var(--fs-2xs); color: var(--gold-tx); }
.oc-reservar svg { width: 12px; height: 12px; }
.oc-reservar:hover { text-decoration: underline; text-underline-offset: 3px; }
