/* Seu Lóza · fase 9 — aprovação do projeto (mockup) e do bordado pelo cliente, "Antes da produção" e "Esperando começar".
   Prefixo oap-. Só tokens de css/tokens.css (o tema claro troca os tokens). Igual no real e na demo.
   A página que o cliente abre NÃO usa este arquivo (o HTML vem do servidor, src/server/link-os-pagina.ts). */

/* ---------- cartão da aprovação (aba Arte e personalização) ---------- */
.oap .card-head { align-items: flex-start; }
.oap .card-head .pill { flex: none; }
.oap-semimg { display: grid; place-items: center; width: 100%; height: 100%; min-height: 120px; color: var(--tx-4); background: var(--s3); }
.oap-semimg svg { width: 28px; height: 28px; }
.oap .ox-art__thumb[disabled] { cursor: default; }
.oap-st--alt { --c: var(--crit); background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 35%, transparent); }
.oap-st--alt > svg { color: var(--crit); }
.oap-com { display: block; margin: 6px 0 2px; padding: 6px 10px; border-left: 3px solid var(--line-3); border-radius: 0 var(--r-xs) var(--r-xs) 0; background: var(--s2); font-size: var(--fs-xs); color: var(--tx-2); white-space: pre-line; quotes: none; }
.oap-lib, .oap-cob { display: flex; align-items: flex-start; gap: 7px; margin: 8px 0 0; padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-xs); line-height: 1.45; }
.oap-lib { background: var(--warn-soft); color: var(--tx-2); }
.oap-lib svg { color: var(--warn); }
.oap-cob { background: var(--info-soft); color: var(--tx-2); }
.oap-cob svg { color: var(--info); }
.oap-lib svg, .oap-cob svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.oap-acts { flex-wrap: wrap; }
.oap-hist { margin: 0 var(--sp-5) var(--sp-4); border-top: 1px solid var(--line); padding-top: 10px; }
.oap-hist summary { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; font-size: var(--fs-sm); font-weight: 600; color: var(--tx-2); cursor: pointer; list-style: none; border-radius: var(--r-xs); }
.oap-hist summary::-webkit-details-marker { display: none; }
.oap-hist summary svg { width: 15px; height: 15px; }
.oap-hist summary em { font-style: normal; padding: 0 7px; border-radius: var(--r-pill); background: var(--s3); font-size: var(--fs-2xs); }
.oap-hist summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.oap-vers { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.oap-ver { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 10px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); }
.oap-ver__th { width: 56px; height: 56px; border-radius: var(--r-sm); overflow: hidden; background: var(--s3); display: grid; place-items: center; }
.oap-ver__th img, .oap-ver__th svg.ox-mock { width: 100%; height: 100%; object-fit: cover; }
.oap-ver__th .oap-semimg { min-height: 56px; }
.oap-ver__t { min-width: 0; }
.oap-ver__t > b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--tx); }
.oap-ver__t > b .mono { min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-xs); }
.oap-ver__t > small { display: block; font-size: var(--fs-2xs); color: var(--tx-3); }
.oap-atual { font-style: normal; font-size: var(--fs-2xs); font-weight: 600; color: var(--ok); text-transform: uppercase; letter-spacing: .04em; }
.oap-decs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.oap-dec { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 7px 8px; border-radius: var(--r-sm); background: var(--s1); }
.oap-dec__ic svg { width: 16px; height: 16px; margin-top: 1px; }
.oap-dec.ok .oap-dec__ic { color: var(--ok); }
.oap-dec.alt .oap-dec__ic { color: var(--crit); }
.oap-dec__t b { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--tx); }
.oap-dec__t small { display: block; font-size: var(--fs-2xs); color: var(--tx-3); overflow-wrap: anywhere; }
.oap-dec__bt { white-space: nowrap; }

/* ---------- mini no Início ---------- */
.oap-mini { display: grid; gap: 8px; }
.oap-mini__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.oap-mini__h b { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-sm); color: var(--tx); }
.oap-mini__h b svg { width: 15px; height: 15px; color: var(--red-tx); }
.oap-mini__l { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 4px; align-items: center; width: 100%; padding: 8px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); text-align: left; color: inherit; cursor: pointer; }
.oap-mini__l:hover, .oap-mini__l:focus-visible { border-color: var(--red-line); }
.oap-mini__th { grid-row: span 2; width: 44px; height: 44px; border-radius: var(--r-sm); overflow: hidden; background: var(--s3); }
.oap-mini__th img, .oap-mini__th svg.ox-mock { width: 100%; height: 100%; object-fit: cover; }
.oap-mini__th .oap-semimg { min-height: 44px; }
.oap-mini__t { min-width: 0; }
.oap-mini__t b { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--tx); }
.oap-mini__t b em { font-style: normal; color: var(--tx-3); font-weight: 500; }
.oap-mini__t small { display: block; font-size: var(--fs-2xs); color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oap-mini__l .pill { justify-self: start; }

/* ---------- Antes da produção (Início) ---------- */
.oap-antes { display: grid; gap: 14px; border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: radial-gradient(120% 120% at 0 0, var(--warn-soft), transparent 60%), var(--s1); }
.oap-antes__h { display: flex; align-items: center; gap: 12px; }
.oap-antes__ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--warn-soft); color: var(--warn); }
.oap-antes__ic svg { width: 19px; height: 19px; }
.oap-antes__h h3 { margin: 0; font-size: var(--fs-md); font-weight: 600; color: var(--tx); }
.oap-antes__h small { display: block; font-size: var(--fs-xs); }
.oap-passos { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.oap-passos li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 8px 0; }
.oap-passos li + li { border-top: 1px dashed var(--line); }
.oap-passo__ic { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line-3); color: var(--tx-3); }
.oap-passo__ic svg { width: 13px; height: 13px; }
.oap-passos li.ok .oap-passo__ic { border-color: var(--ok); background: var(--ok); color: #fff; }
.oap-passos li.pend .oap-passo__ic { border-color: var(--warn); color: var(--warn); }
.oap-passos li.agora .oap-passo__ic { border-color: var(--red); background: var(--red); color: #fff; }
.oap-passos b { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--tx); }
.oap-passos li.fut b { color: var(--tx-3); font-weight: 500; }
.oap-passos small { display: block; font-size: var(--fs-xs); color: var(--tx-3); }
.oap-passos li.pend small { color: var(--tx-2); }
.oap-passo__m { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--fs-2xs); }
.oap-antes__a { display: flex; flex-wrap: wrap; gap: 8px; }
.oap-falta { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.oap-falta li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--tx-2); }
.oap-falta svg { width: 14px; height: 14px; color: var(--warn); flex: none; }

/* de quem depende */
.oap-dep { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 600; background: var(--s3); color: var(--tx-2); white-space: nowrap; }
.oap-dep--cliente { background: var(--info-soft); color: var(--info); }
.oap-dep--financeiro { background: var(--warn-soft); color: var(--warn); }
.oap-dep--bordado { background: var(--red-soft); color: var(--red-tx); }
.oap-dep--producao { background: var(--ok-soft); color: var(--ok); }
.oap-dep--comercial { background: var(--s4); color: var(--tx); }

/* ---------- Esperando começar (lista de OS) ---------- */
.oap-esp { margin-bottom: var(--sp-4); padding: var(--sp-4) var(--sp-5); display: grid; gap: 12px; border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.oap-esp__h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.oap-esp__h > div { flex: 1; min-width: 200px; }
.oap-esp__ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--warn-soft); color: var(--warn); }
.oap-esp__ic svg { width: 18px; height: 18px; }
.oap-esp__h h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: var(--fs-lg); font-weight: 600; color: var(--tx); }
.oap-esp__h h3 em { font-style: normal; padding: 1px 9px; border-radius: var(--r-pill); background: var(--warn-soft); color: var(--warn); font-size: var(--fs-sm); }
.oap-esp__h small { display: block; font-size: var(--fs-xs); }
.oap-esp__m { display: flex; flex-wrap: wrap; gap: 6px; }
.oap-esp__m button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s2); color: var(--tx-2); font-size: var(--fs-xs); font-weight: 500; }
.oap-esp__m button svg { width: 14px; height: 14px; }
.oap-esp__m button em { font-style: normal; font-weight: 700; color: var(--tx); }
.oap-esp__m button.zero { opacity: .55; }
.oap-esp__m button.on { border-color: var(--red-line); background: var(--red-soft); color: var(--red-tx); }
.oap-esp__m button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.oap-esp__ls { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.oap-esp__l { display: grid; grid-template-columns: 56px minmax(140px, 1.1fr) minmax(180px, 1.6fr) 64px minmax(110px, auto); align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-md); color: inherit; text-decoration: none; background: var(--s2); border: 1px solid transparent; }
.oap-esp__l:hover, .oap-esp__l:focus-visible { border-color: var(--red-line); }
.oap-esp__c { min-width: 0; }
.oap-esp__c b { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oap-esp__c small { display: block; font-size: var(--fs-2xs); color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oap-esp__f { display: flex; align-items: flex-start; gap: 7px; min-width: 0; font-size: var(--fs-xs); color: var(--tx-2); }
.oap-esp__f svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--warn); }
.oap-esp__f.ok svg { color: var(--ok); }
.oap-esp__f em { font-style: normal; font-weight: 700; color: var(--tx-3); }
.oap-esp__d { font-size: var(--fs-xs); font-weight: 600; color: var(--tx); text-align: right; }
.oap-esp__q { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.oap-esp__mais { justify-self: start; }
.oap-esp__vazio { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-sm); color: var(--tx-3); }
.oap-esp__vazio svg { width: 16px; height: 16px; color: var(--ok); }
@media (max-width: 900px) {
  .oap-esp__l { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "id cli dias" "falta falta falta" "dep dep dep"; row-gap: 6px; }
  .oap-esp__l > .os-id { grid-area: id; }
  .oap-esp__c { grid-area: cli; }
  .oap-esp__f { grid-area: falta; }
  .oap-esp__d { grid-area: dias; }
  .oap-esp__q { grid-area: dep; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .oap-esp { padding: var(--sp-4); }
  .oap-esp__seg { width: 100%; }
  .oap-ver { grid-template-columns: 44px minmax(0, 1fr); }
  .oap-ver__th { width: 44px; height: 44px; }
  .oap-dec { grid-template-columns: 22px minmax(0, 1fr); }
  .oap-dec__bt { grid-column: 2; justify-self: start; }
  .oap-hist { margin: 0 var(--sp-4) var(--sp-4); }
}

/* ---------- Modelo da OS · termos da aprovação ---------- */
.tp-termos { display: grid; gap: 10px; }
.tp-termos__rasc { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); font-size: var(--fs-xs); color: var(--tx-2); line-height: 1.5; }
.tp-termos__rasc svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--warn); }
.tp-termos__rasc code { font-family: var(--mono); font-size: var(--fs-2xs); padding: 0 4px; border-radius: 4px; background: var(--s3); }
.tp-termos__tx { min-height: 132px; resize: vertical; line-height: 1.5; }
.tp-termos .btn { justify-self: start; }

/* ---------- 21/11 · um mockup por produto da OS (grade no cartão, "Nova versão · Projeto (mockups)" e galeria) ---------- */
.oap-body--mks { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; }
.oap-mks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 18px 16px; }
.oap-mk { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 8px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); }
.oap-mk.vazio { border-style: dashed; border-color: var(--line-3); }
.oap-mk__th { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--s3); color: var(--tx-4); cursor: zoom-in; }
span.oap-mk__th { cursor: default; }
.oap-mk__th img, .oap-mk__th svg.ox-mock { display: block; width: 100%; height: 100%; object-fit: cover; }
.oap-mk__th > svg { width: 24px; height: 24px; }
.oap-mk__th:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.oap-mk__t { min-width: 0; }
.oap-mk__t b { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--tx); overflow-wrap: anywhere; }
.oap-mk__t small { display: block; font-size: var(--fs-2xs); color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oap-mk.vazio .oap-mk__t small { color: var(--warn); }
.oap-mk.vazio.geral .oap-mk__t small { color: var(--tx-3); }
.oap-mk__bt { justify-self: start; }
.oap-ver__th { position: relative; }
.oap-ver__n { position: absolute; right: 3px; bottom: 3px; min-width: 18px; padding: 0 5px; border-radius: var(--r-pill); background: rgba(12, 10, 12, .78); color: #fff; font-style: normal; font-size: var(--fs-2xs); font-weight: 700; line-height: 18px; text-align: center; }
.oap-ver__t > small.oap-ver__mks { color: var(--tx-2); overflow-wrap: anywhere; }
.oap-ver__mks em { font-style: normal; font-weight: 600; color: var(--ok); }
.oap-up { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.oap-up__l { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); background: var(--s2); border: 1px solid var(--line); }
.oap-up--vazio { border-style: dashed; border-color: var(--line-3); }
.oap-up--novo { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.oap-up--tirar .oap-up__th, .oap-up--tirar .oap-up__t { opacity: .6; }
.oap-up--foco { box-shadow: 0 0 0 2px var(--red-line); }
.oap-up__th { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--r-sm); overflow: hidden; background: var(--s3); color: var(--tx-4); }
.oap-up__th img, .oap-up__th svg.ox-mock { display: block; width: 100%; height: 100%; object-fit: cover; }
.oap-up__th > svg { width: 20px; height: 20px; }
.oap-up__t { min-width: 0; }
.oap-up__t b { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--tx); overflow-wrap: anywhere; }
.oap-up__t small { display: block; font-size: var(--fs-2xs); color: var(--tx-3); overflow-wrap: anywhere; }
.oap-up--novo .oap-up__t small { color: var(--ok); }
.oap-up__a { display: flex; align-items: center; gap: 4px; }
.oap-up__a label { cursor: pointer; }
.oap-up__a label:focus-within { outline: 2px solid var(--red); outline-offset: 2px; }
.oap-gal { display: grid; gap: 18px; }
.oap-gal__f { margin: 0; display: grid; gap: 8px; scroll-margin-top: 8px; }
.oap-gal__f figcaption b { display: block; font-size: var(--fs-sm); color: var(--tx); }
.oap-gal__f figcaption small { font-size: var(--fs-2xs); color: var(--tx-3); overflow-wrap: anywhere; }
.oap-gal .ox-artbig img, .oap-gal .ox-artbig svg { max-height: 62vh; }
@media (max-width: 560px) {
  .oap-mks { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 14px 14px; }
  .oap-up__l { grid-template-columns: 44px minmax(0, 1fr); }
  .oap-up__th { width: 44px; height: 44px; }
  .oap-up__a { grid-column: 1 / -1; justify-content: flex-end; }
}
