/*
 * The orders (pedidos.js) and an order's page (projeto.js), in the home page's language: a blue
 * band with the title, its chain of dimensions and the action of the moment; on white, the list,
 * or the family itself: its parameters, its pictures, a new request about it. Built on painel.css
 * (the chain, the sheets, the pulse) and inicio.css (tokens, header, the order's box, footer).
 */

body:is([data-tela="pedidos"], [data-tela="pedido"]) { background: #fff; }
body:is([data-tela="pedidos"], [data-tela="pedido"]) > :is(.topo, .rodape) { display: none; }
button.ini-botao { border: 0; cursor: pointer; font: inherit; font-size: 1.0625rem; font-weight: 640; }

/* The blue band of both pages, its faint grid, its title. */
:is(.pdd-palco, .prj-palco) {
  position: relative; isolation: isolate; color: var(--sobre);
  background: radial-gradient(ellipse 70% 100% at 80% 30%, var(--palco-luz) 0%, var(--palco) 55%, var(--palco-fundo) 100%);
}
:is(.pdd-palco, .prj-palco)::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('eixos.svg') center top / cover no-repeat; opacity: 0.1; }

/* ---------------------------------------------------------------- the orders */
.pdd-palco { padding: calc(72px + clamp(36px, 7vh, 80px)) var(--borda) clamp(40px, 6vh, 64px); }
.pdd-cabeca { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; }
.pdd-cabeca h1 { font-size: clamp(2.75rem, 1.4rem + 3.4vw, 4.75rem); font-weight: 800; font-stretch: 76%; letter-spacing: -0.028em; line-height: 0.95; color: var(--sobre); }
.pdd-cadeia { max-width: 640px; margin-top: clamp(28px, 5vh, 44px); }
/* Here the chain's parts are buttons: the one pressed filters the list. */
.pdd-cadeia .pnl-cota { border: 0; background: none; cursor: pointer; font-family: inherit; }
.pdd-cadeia .pnl-cota-total { width: 100%; }
.pdd-cadeia .pnl-cota[aria-pressed="true"] { --traco-cota: var(--ciano); color: var(--ciano); font-weight: 700; }
.pdd-cadeia .pnl-cota[aria-pressed="true"]::before { height: 1.5px; }
.pdd-cadeia .pnl-cota:focus-visible { outline: 2px solid var(--sobre); outline-offset: 2px; border-radius: 4px; }

.pdd-lista { padding: clamp(28px, 5vh, 48px) var(--borda) clamp(72px, 10vh, 120px); background: #fff; }
.pdd-ferramentas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-bottom: 18px; border-bottom: 1px solid var(--linha); }
.pdd-busca { position: relative; flex: 1 1 300px; max-width: 460px; }
.pdd-busca svg { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; translate: 0 -50%; fill: none; stroke: var(--tinta-3); stroke-width: 1.6; stroke-linecap: round; pointer-events: none; }
.pdd-busca input {
  width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1px solid #7D8A9D; border-radius: 12px; background: #fff;
  color: var(--tinta); font: inherit; font-size: 0.975rem; transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.pdd-busca input:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgb(36 80 216 / 0.18); }
.pdd-conta { margin: 0; color: var(--tinta-3); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
/* Grid or list: the order's level selector with two choices. */
.pdd-vista { margin-left: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pdd-vista label { padding: 0 20px; }
.pdd-vista .ini-niveis-cota { width: 50%; }
.pdd-vista:has([value="lista"]:checked) .ini-niveis-cota { transform: translateX(100%); }
.pdd-vista label:nth-of-type(2)::after { content: ''; position: absolute; right: -4px; bottom: -8px; width: 9px; height: 1px; background: rgb(13 26 61 / 0.32); transform: rotate(-45deg); }

/* A day: a Revit view title, the day's number in its circle, the name over a heavy line. */
.pdd-dia { margin-top: 40px; }
.pdd .pdd-dia-titulo { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; color: var(--tinta); font-size: 1.0625rem; font-weight: 700; }
.pdd-dia-num { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--tinta); border-radius: 50%; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.pdd-dia-nome { white-space: nowrap; }
.pdd-dia-conta { display: flex; flex: 1; align-items: center; gap: 14px; color: var(--tinta-3); font-size: 0.875rem; font-style: italic; font-weight: 520; font-stretch: 82%; white-space: nowrap; }
.pdd-dia-conta::before { content: ''; flex: 1; height: 1.5px; background: var(--tinta); }

/* A sheet: its picture, or the drawing (dashed while it is made, faded when it was not delivered). */
.pdd-cartao[data-situacao="andamento"] .pnl-familia-desenho,
.pdd-cartao[data-situacao="fila"] .pnl-familia-desenho { stroke: var(--azul); opacity: 0.85; stroke-dasharray: 2 1.5; animation: pdd-tracejado 1.2s linear infinite; }
@keyframes pdd-tracejado { to { stroke-dashoffset: -3.5; } }
.pdd-cartao[data-situacao="falha"] .pnl-familia-imagem { background: #FBF4EF; }
.pdd-cartao[data-situacao="falha"] .pnl-familia-desenho { stroke: var(--aviso); opacity: 0.5; }
.pdd-situacao { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--tinta-3); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.pdd-situacao i { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--tinta-3); }
.pdd-situacao[data-situacao="entregue"] i { background: var(--ok); }
.pdd-situacao[data-situacao="andamento"] i { background: var(--azul); animation: pnl-pulso 2.4s ease-out infinite; }
.pdd-situacao[data-situacao="fila"] i { background: none; box-shadow: inset 0 0 0 1.5px var(--azul); }
.pdd-situacao[data-situacao="falha"] { color: var(--aviso); }
.pdd-situacao[data-situacao="falha"] i { background: var(--aviso); }
/* The revision an order is at, after its situation and in a row's name. */
.pdd-revisao { color: var(--azul); font-weight: 640; }

/* As a list: a schedule, numbered as sheets are. */
.pdd-linhas-cabeca, .pdd-linha { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr) 10.5rem 4.5rem 44px; align-items: center; column-gap: 16px; }
.pdd-linhas-cabeca { margin-top: 26px; padding-bottom: 10px; border-bottom: 1px solid var(--linha); color: var(--tinta-3); font-size: 0.78rem; font-weight: 600; }
.pdd-linhas-cabeca span:first-child { padding-left: 10px; }
.pdd-linhas { margin: 0; padding: 0; list-style: none; }
.pdd .pdd-dia:has(.pdd-linhas) .pdd-dia-titulo { margin-bottom: 4px; }
.pdd-linha { position: relative; border-bottom: 1px solid var(--linha-2); transition: background-color 120ms ease-out; }
.pdd-linha:hover { background: var(--gelo); }
.pdd-linha-link { display: grid; grid-column: 1 / 5; grid-template-columns: subgrid; align-items: center; min-height: 52px; color: inherit; text-decoration: none; }
.pdd-num { padding-left: 10px; color: var(--tinta-3); font-size: 0.85rem; font-style: italic; font-stretch: 78%; font-variant-numeric: tabular-nums; }
.pdd-nome { overflow: hidden; color: var(--tinta); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; transition: color 120ms ease-out; }
.pdd-linha:hover .pdd-nome { color: var(--azul); }
.pdd-hora { color: var(--tinta-3); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.pdd-linha-baixar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--azul); transition: background-color 120ms ease-out; }
.pdd-linha-baixar:hover { background: var(--azul-suave); }
.pdd-linha-baixar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.pdd-vazio { display: grid; justify-items: start; gap: 18px; padding: 48px 0 8px; color: var(--tinta-2); font-size: 1.0625rem; }
.pdd-vazio p { margin: 0; }
.pdd-limpar { min-height: 40px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--azul); font: inherit; font-weight: 620; text-decoration: underline; text-underline-offset: 4px; }
.pdd.entrando .pdd-cabeca, .pdd.entrando .pdd-cadeia { animation: pnl-entra 900ms var(--sai) backwards; }
.pdd.entrando .pdd-cadeia { animation-delay: 100ms; }

/* ---------------------------------------------------------------- an order */
.prj-palco {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); grid-template-areas: "texto prancha" "andamento andamento";
  gap: 32px clamp(32px, 5vw, 88px); padding: calc(72px + clamp(28px, 5vh, 56px)) var(--borda) clamp(36px, 5vh, 56px);
}
.prj-palco-curto { grid-template-columns: minmax(0, 1fr); grid-template-areas: "texto"; min-height: min(72vh, 680px); align-content: end; }
.prj-texto { grid-area: texto; align-self: end; min-width: 0; }
.prj-voltar {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-left: -8px; padding: 0 12px 0 6px; border-radius: 10px;
  color: var(--sobre-2); font-size: 0.95rem; font-weight: 560; text-decoration: none; transition: background-color 150ms ease-out, color 150ms ease-out;
}
.prj-voltar:hover { background: rgb(255 255 255 / 0.1); color: var(--sobre); }
.prj-voltar svg, .prj-dialogo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.prj-codigo { margin: 18px 0 0; color: var(--sobre-3); font-size: 13px; font-style: italic; font-weight: 560; font-stretch: 78%; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.prj-palco h1 { max-width: 18em; margin-top: 8px; color: var(--sobre); font-size: clamp(2.25rem, 1.2rem + 2.8vw, 4rem); font-weight: 800; font-stretch: 76%; letter-spacing: -0.024em; line-height: 0.98; text-wrap: balance; overflow-wrap: anywhere; }
.prj-palco-curto h1 { max-width: none; }
.prj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 16px; color: var(--sobre-2); font-size: 0.95rem; }
.prj-meta:empty { display: none; }
.prj-meta a { color: var(--sobre); text-decoration: underline; text-decoration-color: rgb(255 255 255 / 0.4); text-underline-offset: 4px; }
.prj-situacao { display: inline-flex; align-items: center; gap: 8px; color: var(--sobre); font-weight: 640; }
.prj-situacao i { width: 9px; height: 9px; border-radius: 2px; background: var(--sobre-3); }
.prj-situacao[data-situacao="entregue"] i { background: var(--ok-claro); }
.prj-situacao[data-situacao="andamento"] i { background: var(--ciano); animation: prj-pulso 2.4s ease-out infinite; }
.prj-situacao[data-situacao="fila"] i { background: none; box-shadow: inset 0 0 0 1.5px var(--ciano); }
.prj-situacao[data-situacao="falha"] i { background: #FFB38A; }
@keyframes prj-pulso { 0% { box-shadow: 0 0 0 0 rgb(163 222 255 / 0.5); } 70%, 100% { box-shadow: 0 0 0 9px rgb(163 222 255 / 0); } }
.prj-acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.prj-acoes:empty { display: none; }
.prj-cancelar {
  min-height: 46px; padding: 0 20px; border: 1.5px solid rgb(255 255 255 / 0.45); border-radius: 999px; background: none; cursor: pointer;
  color: var(--sobre); font: inherit; font-weight: 620; transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.prj-cancelar:hover { border-color: #fff; background: rgb(255 255 255 / 0.1); }
.prj-palco :focus-visible { outline-color: var(--sobre); }

/* The sheet with the family: its picture from Revit, or the sketch of what was asked. */
.prj-prancha { display: grid; grid-area: prancha; align-self: end; gap: 10px; margin: 0; }
.prj-prancha-imagem, .prj-croqui {
  display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 0; border-radius: 14px;
  background: #fff; box-shadow: 0 30px 60px -30px rgb(4 12 52 / 0.7);
}
/* The picture laid over its frame: as a grid item it would size the row and spill out of the frame. */
.prj-prancha-imagem { position: relative; cursor: zoom-in; }
.prj-prancha-imagem img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 6%; object-fit: contain; transition: transform 400ms var(--sai); }
.prj-prancha-imagem:hover img { transform: scale(1.03); }
.prj-croqui { padding: 5%; }
.prj-croqui svg { width: 100%; height: 100%; }
/* No picture and no scene: a frame drawn on the stage, not a white sheet stuck onto it. */
.prj-croqui-vazio { background: none; box-shadow: none; border: 1.5px dashed rgb(255 255 255 / 0.28); }
.prj-croqui-vazio svg { width: 30%; height: auto; fill: none; stroke: var(--sobre); stroke-width: 0.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.prj-prancha.andando .prj-croqui-vazio svg { stroke: var(--ciano); opacity: 0.9; stroke-dasharray: 2 1.5; animation: pdd-tracejado 1.2s linear infinite; }

/* While the family is made: the crane works on the stage itself (grua.js), drawn over in white
   like the home page's scene. Only the family's picture comes in a white sheet. */
.prj-grua { position: relative; width: 100%; aspect-ratio: 4 / 3; transition: opacity 420ms var(--sai); }
.prj-grua.saindo { opacity: 0; }
.prj-grua .grua-tela { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 700ms var(--sai); touch-action: pan-y; }
.prj-grua .grua-tela.pronta { opacity: 1; }
.grua-cotas .esboco { stroke: var(--sobre); stroke-width: 1.6; stroke-linejoin: round; }
.grua-cotas .fantasma { stroke-dasharray: 4 3; opacity: 0.8; }
.grua-cotas .cadeado rect { fill: var(--sobre); }
.grua-cotas .cadeado path.arco { stroke: var(--sobre); stroke-width: 1.9; }
.grua-cotas .selo circle { fill: var(--ok-claro); }
.grua-cotas .selo path { stroke: var(--tinta); stroke-width: 2.2; stroke-linejoin: round; }
.grua-cotas .selo.grande path { stroke-width: 2.8; }
.grua-rotulos { pointer-events: none; }
/* The picture after the crane: set down where it worked. */
.prj-prancha-imagem.pousando { animation: prj-pousa 700ms var(--sai) both; }
@keyframes prj-pousa { from { opacity: 0; transform: translateY(-18px) scale(0.97); } }
@media (prefers-reduced-motion: reduce) {
  .prj-prancha-imagem.pousando { animation: none; }
  .prj-grua, .prj-grua .grua-tela { transition: none; }
}
.prj-prancha figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: right; color: var(--sobre-3); font-size: 0.85rem; }
.prj-selo { display: inline-flex; flex: none; align-items: center; gap: 6px; white-space: nowrap; padding: 4px 10px 4px 8px; border-radius: 4px; background: var(--ok); color: #fff; font-size: 0.8rem; font-weight: 700; }
.prj-selo svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* The phases: a chain of dimensions across the band; the phase under way runs. */
.prj-andamento { grid-area: andamento; }
.prj-etapas { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.prj-etapas::after { content: ''; position: absolute; right: -5px; bottom: 6px; width: 11px; height: 1.5px; background: rgb(255 255 255 / 0.3); transform: rotate(-45deg); }
.prj-etapas li { --traco-etapa: rgb(255 255 255 / 0.3); position: relative; display: grid; gap: 2px; padding: 0 12px 20px; }
.prj-etapas li::before { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1.5px; background: var(--traco-etapa); }
.prj-etapas li::after { content: ''; position: absolute; left: -5px; bottom: 6px; width: 11px; height: 1.5px; background: var(--traco-etapa); transform: rotate(-45deg); }
.prj-etapas .nome { color: var(--sobre-2); font-size: 1rem; font-weight: 640; }
.prj-etapas .estado { color: var(--sobre-3); font-size: 12.5px; font-style: italic; font-weight: 540; font-stretch: 80%; }
.prj-etapas li[data-estado="feita"] { --traco-etapa: var(--ciano); }
.prj-etapas li[data-estado="feita"] .nome { color: var(--sobre); }
.prj-etapas li[data-estado="atual"] { --traco-etapa: var(--ciano); }
.prj-etapas li[data-estado="atual"] .nome { color: #fff; }
.prj-etapas li[data-estado="atual"] .estado { color: var(--ciano); }
.prj-etapas li[data-estado="atual"]::before {
  background: linear-gradient(90deg, var(--ciano) 0 35%, rgb(163 222 255 / 0.25) 35% 100%) 0 0 / 200% 100%;
  animation: pnl-corre 1.8s linear infinite;
}
.prj-etapas li[data-estado="falha"] { --traco-etapa: #FFB38A; }
.prj-etapas li[data-estado="falha"] .estado { color: #FFB38A; }
/* Research the order did not need: its dimension dashed, its name faded. */
.prj-etapas li[data-estado="pulada"]::before { background: repeating-linear-gradient(90deg, rgb(255 255 255 / 0.4) 0 5px, transparent 5px 10px); }
.prj-etapas li[data-estado="pulada"] .nome, .prj-etapas li[data-estado="nao"] .nome { color: var(--sobre-3); }
.prj-agora { display: flex; align-items: center; gap: 12px; min-height: 28px; margin: 16px 0 0 12px; color: var(--sobre); font-size: 1.0625rem; font-weight: 560; }
.prj-agora:empty { display: none; }
.prj-agora .pnl-pulso { flex: none; background: var(--ciano); animation-name: prj-pulso; }

/* On white: the order's matter, and beside it the title block and the request. */
.prj-corpo {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); align-items: start; gap: clamp(28px, 4vw, 72px);
  padding: clamp(36px, 6vh, 64px) var(--borda) clamp(72px, 10vh, 120px); background: #fff;
}
/* One column that never grows past its share: a wide table scrolls inside its box instead of
   widening the page (on a phone the browser would zoom the whole page out to fit it). */
.prj-principal, .prj-lateral { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; min-width: 0; }
.prj-principal > div:empty { display: none; }
.prj-bloco { padding-top: 22px; border-top: 1px solid var(--linha); }
.prj-bloco h2 { color: var(--tinta); font-size: 1.375rem; font-weight: 800; font-stretch: 80%; letter-spacing: -0.01em; }
.prj-bloco h2 span { margin-left: 8px; color: var(--tinta-3); font-size: 1rem; font-weight: 560; font-stretch: 100%; font-variant-numeric: tabular-nums; }

.prj-entrega { display: flex; align-items: center; gap: 12px; }
.prj-entrega .selo { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--ok); color: #fff; }
.prj-entrega.falhou .selo { background: var(--aviso); }
.prj-entrega .selo svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.prj-entrega h2 { font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2rem); }
.prj-resumo { max-width: 62ch; margin: 14px 0 0; color: var(--tinta-2); font-size: 1.0625rem; line-height: 1.6; text-wrap: pretty; white-space: pre-line; }
.prj-resultado-acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.prj-resultado-acoes .ini-botao { min-height: 48px; font-size: 1rem; }
.prj-retomar-nota { margin-top: 12px; font-size: 0.9375rem; }
.prj-pausa { max-width: 62ch; margin: 12px 0 0; color: var(--aviso); font-size: 1rem; line-height: 1.5; }
.prj-retomar-erro { max-width: 62ch; margin: 12px 0 0; color: var(--aviso); font-size: 1rem; line-height: 1.5; }

/* The parameters' place, until the service sends them: a schedule waiting for its rows. */
.prj-parametros-vazio {
  display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 22px 24px;
  border: 1.5px dashed rgb(13 26 61 / 0.2); border-radius: 12px; color: var(--tinta-3);
}
.prj-parametros-vazio svg { flex: none; width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.prj-parametros-vazio p { margin: 0; line-height: 1.5; }
/* The family's parameters as a Revit schedule: a heavy line under the heading row, light lines
   between rows, a column per type; a wide one scrolls inside its box (see .prj-principal). */
.prj-parametros-nota { margin: 6px 0 0; color: var(--tinta-3); font-size: 0.9rem; }
.prj-tabela { overflow-x: auto; margin-top: 14px; }
.prj-tabela table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.prj-tabela th, .prj-tabela td { padding: 9px 14px 9px 0; border-bottom: 1px solid var(--linha); text-align: left; vertical-align: top; white-space: nowrap; }
.prj-tabela thead th { padding-top: 0; border-bottom: 1.5px solid var(--tinta); color: var(--tinta-3); font-size: 0.78rem; font-weight: 640; letter-spacing: 0.01em; }
.prj-tabela tbody th { color: var(--tinta); font-weight: 640; }
.prj-tabela tbody th small { display: block; margin-top: 1px; color: var(--tinta-3); font-size: 0.75rem; font-weight: 520; }
.prj-tabela td { color: var(--tinta-2); }
.prj-tabela td.formula { color: var(--tinta-3); font-style: italic; white-space: normal; }
.prj-apoio { margin-top: 10px; }
.prj-apoio summary {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--azul); font-size: 0.925rem; font-weight: 600; cursor: pointer; list-style: none;
  transition: color 150ms ease-out;
}
.prj-apoio summary::-webkit-details-marker { display: none; }
.prj-apoio summary::before { content: '+'; display: inline-block; width: 1.1em; font-weight: 700; transition: transform 150ms ease-out; }
.prj-apoio[open] summary::before { transform: rotate(45deg); }
.prj-apoio summary:hover { color: var(--azul-forte); }
.prj-apoio .prj-tabela { margin-top: 4px; }

/* The family in 3D: the home page's blue stage in a box (its light, its faint axes drawing), the
   types above it marked like the order box's levels, by a blue dimension line, and on the stage
   the views as Revit names them and how to turn it. */
/* One row; a family with many types scrolls it sideways rather than stacking them. */
.prj-modelo-tipos { display: flex; gap: 4px; overflow-x: auto; margin-top: 12px; scrollbar-width: thin; }
.prj-modelo-tipos button { flex: none; }
.prj-modelo-tipos:empty { display: none; }
.prj-modelo-tipos button {
  min-height: 44px; padding: 0 14px; border: 0; background: none; box-shadow: inset 0 -1px 0 var(--linha);
  color: var(--tinta-3); font: inherit; font-size: 0.925rem; font-weight: 600; cursor: pointer;
  transition: color 150ms ease-out, box-shadow 150ms ease-out;
}
.prj-modelo-tipos button:hover { color: var(--tinta-2); }
.prj-modelo-tipos button[aria-pressed="true"] { color: var(--tinta); box-shadow: inset 0 -1.5px 0 var(--azul); }
.prj-modelo-palco {
  position: relative; isolation: isolate; overflow: hidden; margin-top: 14px; aspect-ratio: 16 / 10; border-radius: 16px;
  background: radial-gradient(ellipse 70% 100% at 80% 30%, var(--palco-luz) 0%, var(--palco) 55%, var(--palco-fundo) 100%);
}
.prj-modelo-palco::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('eixos.svg') center / cover no-repeat; opacity: 0.1; }
.prj-modelo-tela { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; cursor: grab; touch-action: none; transition: opacity 200ms ease-out; }
.prj-modelo-palco.pronto .prj-modelo-tela { opacity: 1; }
.prj-modelo-tela:active { cursor: grabbing; }
.prj-modelo-tela:focus-visible { outline: 2px solid var(--sobre); outline-offset: -4px; border-radius: 16px; }
.prj-modelo-vistas { position: absolute; left: 10px; bottom: 8px; z-index: 1; display: flex; gap: 2px; }
.prj-modelo-vistas button {
  min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none;
  color: var(--sobre-3); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  transition: color 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out;
}
.prj-modelo-vistas button:hover { color: var(--sobre); background: rgb(255 255 255 / 0.08); }
.prj-modelo-vistas button[aria-pressed="true"] { color: var(--sobre); box-shadow: inset 0 -1.5px 0 var(--ciano); }
.prj-modelo-dica { position: absolute; right: 16px; bottom: 20px; z-index: 1; margin: 0; color: var(--sobre-3); font-size: 0.8125rem; pointer-events: none; }
@media (max-width: 640px) {
  .prj-modelo-palco { aspect-ratio: 4 / 5; }
  .prj-modelo-dica { display: none; }
}

/* The family's pictures from Revit, each with the name of its view. */
.prj-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.prj-galeria li { display: grid; gap: 8px; }
.prj-galeria li > span { color: var(--tinta-3); font-size: 0.8125rem; line-height: 1.3; }
.prj-galeria button {
  display: block; width: 100%; aspect-ratio: 1; overflow: hidden; padding: 0; border: 0; border-radius: 10px; cursor: zoom-in;
  background: #fff; box-shadow: inset 0 0 0 1px var(--linha); transition: box-shadow 150ms ease-out;
}
.prj-galeria button:hover { box-shadow: inset 0 0 0 1px rgb(36 80 216 / 0.45), 0 12px 24px -16px rgb(10 26 100 / 0.4); }
.prj-galeria img { width: 100%; height: 100%; padding: 8%; object-fit: contain; }

/* The revisions: a drawing's revision schedule, newest first, each number in its delta. */
.prj-meta-revisao { padding: 1px 8px; border: 1px solid rgb(255 255 255 / 0.45); border-radius: 4px; color: var(--sobre); font-size: 0.875rem; font-weight: 640; }
.prj-revisoes-lista { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1.5px solid var(--tinta); }
.prj-revisoes-lista li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--linha); }
.prj-revisao-num { position: relative; display: grid; place-items: center; width: 42px; height: 37px; align-self: start; }
.prj-revisao-num svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--tinta); stroke-width: 1.4; stroke-linejoin: round; }
.prj-revisao-num b { position: relative; top: 6px; color: var(--tinta); font-size: 0.75rem; font-style: italic; font-weight: 700; font-stretch: 80%; font-variant-numeric: tabular-nums; }
.prj-revisoes-lista li.atual .prj-revisao-num svg { fill: var(--azul-suave); stroke: var(--azul); }
.prj-revisoes-lista li.atual .prj-revisao-num b { color: var(--azul); }
.prj .prj-revisao-texto h3 { margin: 0; color: var(--tinta); font-size: 1rem; font-weight: 700; }
.prj-revisao-texto h3 em { margin-left: 8px; color: var(--azul); font-size: 0.78rem; font-style: normal; font-weight: 700; }
.prj-revisao-pedido { display: -webkit-box; overflow: hidden; margin: 4px 0 0; color: var(--tinta-2); line-height: 1.5; overflow-wrap: anywhere; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.prj-revisao-resultado { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 6px 0 0; color: var(--tinta-3); font-size: 0.875rem; }
.prj-revisao-resultado .pdd-situacao { font-size: inherit; }
.prj-revisao-acoes { display: flex; align-items: center; gap: 8px; }
.prj-revisao-imagem {
  width: 76px; height: 76px; overflow: hidden; padding: 0; border: 0; border-radius: 8px; cursor: zoom-in;
  background: #fff; box-shadow: inset 0 0 0 1px var(--linha); transition: box-shadow 150ms ease-out;
}
.prj-revisao-imagem:hover { box-shadow: inset 0 0 0 1px rgb(36 80 216 / 0.45); }
.prj-revisao-imagem img { width: 100%; height: 100%; padding: 8%; object-fit: contain; }
.prj-revisao-baixar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--azul); transition: background-color 120ms ease-out; }
.prj-revisao-baixar:hover { background: var(--azul-suave); }
.prj-revisao-baixar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* A new request about the family: the order's box, without levels, on white. */
.prj-ajuda { max-width: 60ch; margin: 8px 0 18px; color: var(--tinta-2); line-height: 1.5; }
.prj-ajuste .ini-compositor { box-shadow: 0 0 0 1px var(--linha), 0 18px 40px -24px rgb(10 26 100 / 0.3); }
.prj-ajuste .ini-compositor:focus-within { box-shadow: 0 0 0 2px rgb(36 80 216 / 0.45), 0 18px 40px -24px rgb(10 26 100 / 0.3); }

/* The title block, ruled in ink like a drawing's. */
.prj-carimbo { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; margin: 14px 0 0; border: 1.5px solid var(--tinta); border-radius: 4px; background: var(--tinta); }
.prj-carimbo > div { padding: 9px 12px 10px; background: #fff; }
.prj-carimbo .inteira { grid-column: 1 / -1; }
.prj-carimbo dt { color: var(--tinta-3); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em; }
.prj-carimbo dd { margin: 2px 0 0; color: var(--tinta); font-size: 0.95rem; font-weight: 620; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.prj-carimbo dd.nome { font-size: 1.05rem; font-weight: 720; }
.prj-carimbo dd.codigo { font-style: italic; font-stretch: 80%; }
.prj-texto-pedido { margin: 14px 0 0; color: var(--tinta-2); font-size: 0.95rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.prj-texto-pedido.recolhido { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 7; -webkit-box-orient: vertical; }
.prj-mais { min-height: 36px; margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--azul); font: inherit; font-size: 0.9rem; font-weight: 620; }
.prj-fontes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.prj-fontes:empty { display: none; }

/* ---------------------------------------------------------------- dialogs: a picture, a question */
.prj-dialogo {
  width: min(960px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; overflow: hidden;
  border: 0; border-radius: 16px; background: #fff; color: var(--tinta); box-shadow: 0 40px 80px -30px rgb(4 12 52 / 0.6);
  opacity: 1; scale: 1; transition: opacity 200ms ease-out, scale 260ms var(--sai), overlay 260ms allow-discrete, display 260ms allow-discrete;
}
.prj-dialogo[open] { display: flex; flex-direction: column; }
.prj-dialogo:not([open]) { opacity: 0; scale: 0.98; }
@starting-style { .prj-dialogo[open] { opacity: 0; scale: 0.98; } }
.prj-dialogo::backdrop { background: rgb(8 20 76 / 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.prj-dialogo-topo { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 22px; border-bottom: 1px solid var(--linha); }
.prj-dialogo-topo h2 { flex: 1; overflow: hidden; margin: 0; color: var(--tinta); font-size: 1.05rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.prj-dialogo-passos { display: flex; gap: 4px; }
.prj-dialogo-fechar, .prj-dialogo-passos button {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; cursor: pointer;
  color: var(--tinta-2); transition: background-color 150ms ease-out, color 150ms ease-out;
}
.prj-dialogo-fechar:hover, .prj-dialogo-passos button:hover { background: var(--gelo); color: var(--tinta); }
.prj-dialogo-corpo { overflow: auto; padding: 22px; }
.prj-dialogo-imagem .prj-dialogo-corpo { display: grid; place-items: center; }
.prj-dialogo-imagem img { max-width: 100%; max-height: calc(100dvh - 170px); object-fit: contain; }
.prj-dialogo-pergunta { width: min(460px, calc(100vw - 32px)); }
.prj-dialogo-pergunta p { margin: 0; color: var(--tinta-2); line-height: 1.5; }
.prj-dialogo-acoes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.prj-dialogo-acoes .ini-botao { min-height: 44px; font-size: 0.95rem; }
.prj-perigo { background: var(--aviso); box-shadow: none; }
.prj-perigo:hover { background: #8A370C; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 959px) {
  .prj-palco { grid-template-columns: minmax(0, 1fr); grid-template-areas: "texto" "prancha" "andamento"; }
  .prj-prancha { max-width: 520px; }
  .prj-corpo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .pdd-vista { margin-left: 0; }
  .pdd-linhas-cabeca { display: none; }
  .pdd-linha { grid-template-columns: minmax(0, 1fr) 44px; }
  .pdd-linha-link { grid-column: 1; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 0 10px 4px; }
  .pdd-num, .pdd-hora { display: none; }
  .pdd-dia-nome { white-space: normal; }
}
@media (max-width: 640px) {
  .prj-etapas li { padding: 0 4px 20px; }
  .prj-etapas .nome { font-size: 0.75rem; }
  .prj-etapas .estado { display: none; }
  .prj-agora { margin-left: 0; font-size: 0.975rem; }
  .prj-galeria { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
  .prj-galeria li > span { font-size: 0.75rem; }
  .prj-parametros-vazio { padding: 18px; }
  .prj-revisoes-lista li { grid-template-columns: 36px minmax(0, 1fr); gap: 10px 14px; }
  .prj-revisao-num { width: 36px; height: 32px; }
  .prj-revisao-acoes { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.pdd, .prj, .prj-dialogo) *, :is(.pdd, .prj, .prj-dialogo) *::before, :is(.pdd, .prj, .prj-dialogo) *::after { animation: none !important; transition-duration: 0ms !important; }
  .prj-dialogo { transition: none; }
}

/* ---------------------------------------------------------------- the quote (orcamento.js) */
.orc-dialogo p { margin: 0; }
.orc-dialogo .orc-tipo { color: var(--tinta-3); font-size: 0.8125rem; font-weight: 640; letter-spacing: 0.04em; text-transform: uppercase; }
.orc-dialogo .orc-preco { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; color: var(--tinta); }
.orc-preco strong { font-size: 3rem; font-weight: 800; font-stretch: 76%; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.orc-preco .unidade { color: var(--tinta-2); font-size: 1rem; font-weight: 620; }
.orc-preco .reais { margin-left: auto; color: var(--tinta-2); font-size: 1.125rem; font-weight: 640; font-variant-numeric: tabular-nums; }
.orc-dialogo .orc-fechado { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--tinta-2); font-size: 0.925rem; }
.orc-fechado svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.orc-dialogo .orc-aviso { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: var(--gelo); box-shadow: inset 2px 0 0 var(--aviso); color: var(--tinta); font-size: 0.925rem; line-height: 1.45; }
.orc-ficha { display: grid; margin: 16px 0 0; border-top: 1px solid var(--linha); }
.orc-ficha div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--linha-2); }
.orc-ficha dt { color: var(--tinta-3); font-size: 0.875rem; }
.orc-ficha dd { margin: 0; color: var(--tinta); font-size: 0.925rem; }
.orc-dialogo .orc-nota { margin-top: 12px; color: var(--tinta-2); font-size: 0.925rem; line-height: 1.45; }
.orc-dialogo .orc-declaracao { margin-top: 14px; color: var(--tinta-3); font-size: 0.8125rem; line-height: 1.45; }
.orc-dialogo .prj-dialogo-acoes .ini-botao[disabled] { opacity: 0.55; cursor: not-allowed; }
