/* Diálogo de exclusão: acabamento Linhas, isolado do restante da plataforma. */
dialog.rp-delete-dialog {
  box-sizing: border-box;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 28px;
  overflow: auto;
  color: #f3f4f6;
  background: #17191d;
  border: 1px solid #363b43;
  border-radius: 14px;
  font: 400 15px/1.6 var(--corpo, sans-serif);
  text-align: left;
}
.rp-delete-dialog::backdrop { background: rgb(0 0 0 / 68%); }
.rp-delete-dialog .rp-delete-heading { display: flex; align-items: flex-start; gap: 16px; }
.rp-delete-dialog h2 { flex: 1; margin: 0; font: 650 23px/1.3 var(--corpo, sans-serif); letter-spacing: -.02em; }
.rp-delete-dialog .rp-delete-name { margin: 20px 0; padding-bottom: 20px; border-bottom: 1px solid #363b43; color: #e0e3e8; overflow-wrap: anywhere; }
.rp-delete-dialog .rp-delete-description p { margin: 0 0 12px; color: #b8bec8; }
.rp-delete-dialog .rp-delete-description .rp-delete-warning { margin: 0; color: #f3f4f6; }
.rp-delete-dialog .rp-delete-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.rp-delete-dialog button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid #454b55; border-radius: 8px; background: #25282e; color: #f3f4f6; font: 600 14px/1.3 var(--corpo, sans-serif); cursor: pointer; box-shadow: none; }
.rp-delete-dialog button:hover { background: #30343c; }
.rp-delete-dialog button:focus-visible { outline: 2px solid #f3f4f6; outline-offset: 3px; }
.rp-delete-dialog .rp-delete-confirm { border-color: #c52323; background: #c52323; color: #fff; }
.rp-delete-dialog .rp-delete-confirm:hover { border-color: #ac1e1e; background: #ac1e1e; }
.rp-delete-dialog .rp-delete-close { flex: 0 0 44px; width: 44px; margin: -8px -8px 0 0; padding: 0; border-color: transparent; background: transparent; color: #b8bec8; }
.rp-delete-dialog .rp-delete-close svg { width: 20px; height: 20px; }
@media (max-width: 540px) {
  dialog.rp-delete-dialog { padding: 22px; }
  .rp-delete-dialog h2 { font-size: 21px; }
  .rp-delete-dialog .rp-delete-actions { flex-direction: column-reverse; }
  .rp-delete-dialog .rp-delete-actions button { width: 100%; }
}

.pw-page {
  --pw-bg: #0b0c10;
  --pw-surface: #111319;
  --pw-surface-quiet: #0e1015;
  --pw-surface-raised: #171920;
  --pw-line: #292d37;
  --pw-line-soft: #20232b;
  --pw-text: #f3f4f6;
  --pw-muted: #9ca3b0;
  --pw-muted-2: #737b89;
  /* A FAMILIA ACCENT — que no simulador vem da casca do laboratorio.
     `--pw-red` e os irmaos abaixo sao `var(--accent...)`, e quem declara essa
     familia no simulador e o `lab.css` da propria pagina de prototipo
     (`--accent: #ff3b30`). O app real nao tem essa casca, e NENHUM arquivo
     nosso declarava a familia: os 18 usos deste arquivo resolviam para valor
     INVALIDO e caiam em transparente.

     Medido lado a lado, mesma tela, mesmo viewport:
       preenchimento da barra   simulador rgb(255,59,48)   real rgba(0,0,0,0)
       marcador "Filmagem real" simulador rgb(255,59,48)   real rgba(0,0,0,0)
     Era por isso que a barra de progresso parecia cinza e o quadradinho
     colorido da origem simplesmente nao aparecia.

     Os valores sao copiados do `lab.css` aprovado, sem reinterpretar: conferi
     que o `dotti-lines.css` do simulador nao sobrescreve nenhum deles, entao
     sao exatamente os que a tela aprovada pinta.

     E ficam DENTRO de `.pw-page` de proposito. O vermelho do resto do site e o
     `--linhas-vermelho` (#ff2020, o dotti-red do DESIGN.md); soltar um segundo
     vermelho no `:root` criaria dois sistemas concorrentes, que e a deriva que
     este repo ja catalogou. Aqui ele fica preso a Sala de Controle, que e um
     contrato preservado. */
  /* AS FONTES, pelo nome que ESTE app usa. O workspace pede `--font-sans` e
     `--font-mono`, que sao os nomes do laboratorio; aqui elas se chamam
     `--corpo` e `--mono` (estilo.css:63-65). Sem a ponte, os 5 usos caiam no
     `monospace`/`sans-serif` generico do sistema — ou seja, o horario do log e
     os dados tabulares do Robo NAO saiam em Geist Mono, que e a fonte que o
     DESIGN.md reserva justamente para procedencia, sequencia e dado tabular. */
  --font-sans: var(--corpo);
  --font-mono: var(--mono);

  /* O VERMELHO DESTRUTIVO, que tambem faltava. `.pw-button-danger` e
     `.pw-button-quiet-danger` — os botoes "Apagar" e "Parar e apagar" — pintam
     borda, fundo e texto com esta familia. Sem ela, as tres declaracoes eram
     invalidas e o botao destrutivo perdia a cor inteira, ficando igual a um
     botao neutro. Acao que apaga producao nao pode se parecer com acao comum.
     O `#b42318` bate com o `destructive-red` declarado no DESIGN.md. */
  --danger-rgb: 180 35 24;
  --danger: #b42318;
  --danger-text: #ff8a82;

  --red-rgb: 255 59 48;
  --accent: #ff3b30;
  --accent-solid: #d92d20;
  --accent-solid-hover: #c5221a;
  --accent-deep: #b42318;
  --accent-focus: #ff5147;
  --accent-text: #ff817a;
  --accent-soft: rgb(var(--red-rgb) / .12);
  --pw-red: var(--accent);
  --pw-red-solid: var(--accent-solid);
  --pw-red-solid-hover: var(--accent-solid-hover);
  --pw-red-soft: var(--accent-soft);
  --pw-green: #54d69b;
  --pw-green-soft: rgba(84, 214, 155, .09);
  --pw-amber: #f2bb5e;
  --pw-amber-soft: rgba(242, 187, 94, .09);
  color: var(--pw-text);
  container: pw-page / inline-size;
  font-family: var(--font-sans), sans-serif;
  font-size: 14px;
}

.pw-page *, .pw-page *::before, .pw-page *::after { box-sizing: border-box; }
.pw-page button, .pw-page input, .pw-page select { font: inherit; }
.pw-page button:focus-visible, .pw-page input:focus-visible, .pw-page select:focus-visible, .pw-page [tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent-focus);
  outline-offset: 2px;
}
.pw-page button { color: inherit; }
.pw-page button:disabled { cursor: not-allowed; opacity: .45; }
.pw-icon { display: block; flex: 0 0 auto; }
.pw-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.pw-page-heading {
  min-height: 88px;
  margin: 0 0 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}
.pw-page-heading > div:first-child { max-width: 760px; }
.pw-page-heading h1 { margin: 0; font-size: clamp(30px, 3vw, 38px); line-height: 1.06; letter-spacing: -.035em; }
.pw-page-heading > div:first-child > span { display: block; max-width: 720px; margin-top: 11px; color: var(--pw-muted); font-size: 14px; line-height: 1.55; }
.pw-page-heading-actions { display: flex; gap: 10px; align-items: center; }

.pw-button {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 660;
  line-height: 1;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.pw-button-primary { border-color: var(--pw-red-solid); background: var(--pw-red-solid); color: #fff !important; }
.pw-button-primary:hover:not(:disabled) { border-color: var(--pw-red-solid-hover); background: var(--pw-red-solid-hover); }
.pw-button-secondary { border-color: #343945; background: #171a21; color: #e5e7eb !important; }
.pw-button-secondary:hover:not(:disabled) { border-color: #4b5260; background: #1c2028; }
.pw-button-danger { border-color: rgb(var(--danger-rgb) / .45); background: rgb(var(--danger-rgb) / .11); color: var(--danger-text) !important; }
.pw-button-danger:hover:not(:disabled), .pw-button-quiet-danger:hover:not(:disabled) { border-color: var(--danger); background: rgb(var(--danger-rgb) / .17); }
.pw-button-quiet-danger { border-color: transparent; background: transparent; color: var(--danger-text) !important; }

.pw-status {
  width: max-content;
  min-height: 25px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #343945;
  border-radius: 999px;
  background: #171a21;
  color: #bbc1cc;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.pw-status > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pw-status-live { border-color: rgb(var(--red-rgb) / .32); background: var(--pw-red-soft); color: var(--accent-text); }
.pw-status-done { border-color: rgba(84, 214, 155, .24); background: var(--pw-green-soft); color: #82e7b7; }
.pw-status-attention { border-color: rgba(242, 187, 94, .3); background: var(--pw-amber-soft); color: #f6ca7f; }

.pw-operations-strip {
  min-height: 58px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr);
  overflow: hidden;
  border: 1px solid var(--pw-line);
  border-radius: 6px;
  background: var(--pw-surface-quiet);
}
.pw-operation-counts { min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pw-operation-stat { min-width: 0; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pw-operation-stat + .pw-operation-stat { border-left: 1px solid var(--pw-line); }
.pw-operation-stat dt, .pw-operation-attention > span, .pw-operation-clear > span { min-width: 0; display: flex; align-items: center; gap: 9px; color: var(--pw-muted); font-size: 13px; font-weight: 590; }
.pw-operation-stat dt .pw-icon { color: var(--pw-red); }
.pw-operation-stat.is-queued dt .pw-icon { color: var(--pw-muted); }
.pw-operation-stat dd { margin: 0; color: var(--pw-text); font-size: 17px; font-weight: 720; line-height: 1; font-variant-numeric: tabular-nums; }
.pw-operation-attention, .pw-operation-clear {
  min-width: 0;
  min-height: 42px;
  margin: 7px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(242, 187, 94, .28);
  border-radius: 8px;
  background: var(--pw-amber-soft);
  color: var(--pw-amber);
}
.pw-operation-attention { cursor: pointer; transition: border-color .16s ease, background-color .16s ease; }
.pw-operation-attention:hover { border-color: rgba(242, 187, 94, .48); background: rgba(242, 187, 94, .13); }
.pw-operation-attention:focus-visible { outline-color: var(--pw-amber) !important; }
.pw-operation-attention > span, .pw-operation-clear > span { color: var(--pw-amber); white-space: nowrap; }
.pw-operation-attention > strong, .pw-operation-clear > strong { font-size: 17px; line-height: 1; font-variant-numeric: tabular-nums; }
.pw-operation-attention > .pw-icon:last-child { transform: rotate(180deg); }
.pw-operation-clear { grid-template-columns: minmax(0, 1fr) auto; border-color: rgba(84, 214, 155, .2); background: var(--pw-green-soft); color: var(--pw-green); }
.pw-operation-clear > span { color: var(--pw-green); }

.pw-workspace {
  min-height: 720px;
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--pw-line);
  border-radius: 6px;
  background: var(--pw-surface);
}
.pw-queue { min-width: 0; background: var(--pw-surface-quiet); border-right: 1px solid var(--pw-line); }
.pw-queue-heading { min-height: 74px; padding: 0 18px; display: flex; align-items: center; border-bottom: 1px solid var(--pw-line); }
.pw-queue-heading > div { display: flex; align-items: center; gap: 11px; }
.pw-queue-heading > div > .pw-icon { color: var(--accent-text); }
.pw-queue-heading span { display: flex; flex-direction: column; gap: 3px; }
.pw-queue-heading strong { font-size: 14px; }
.pw-queue-heading small { color: var(--pw-muted-2); font-size: 12px; }
.pw-queue-group { padding-top: 14px; }
.pw-queue-group > header { min-height: 30px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; }
.pw-queue-group h2 { margin: 0; color: #8d95a2; font: 650 12px/1 var(--font-mono), monospace; letter-spacing: .08em; text-transform: uppercase; }
.pw-queue-group > header > span { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: #1c1f27; color: #aeb5c1; font-size: 12px; }
.pw-queue-group > div { margin-top: 5px; }
.pw-queue-item {
  width: 100%;
  min-height: 142px;
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--pw-line-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.pw-queue-item:last-child { border-bottom: 1px solid var(--pw-line-soft); }
.pw-queue-item:hover { background: #14171d; }
.pw-queue-item.is-selected { background: #191b22; box-shadow: inset 0 0 0 1px rgb(var(--red-rgb) / .5); }
.pw-queue-item.needs-attention.is-selected { box-shadow: inset 0 0 0 1px rgba(242, 187, 94, .5); }
.pw-queue-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pw-queue-item-top time { color: var(--pw-muted-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.pw-queue-item > strong { overflow: hidden; color: #f0f1f3; font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.pw-queue-item-meta { overflow: hidden; color: var(--pw-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pw-queue-item-meta > span { margin: 0 4px; color: #565e6d; }

.pw-progress { min-width: 180px; }
.pw-progress-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--pw-muted); font-size: 12px; }
.pw-progress-copy strong { color: #e5e7eb; font-size: 13px; font-variant-numeric: tabular-nums; }
.pw-progress-track { height: 4px; margin-top: 9px; overflow: hidden; background: #2a2e38; border-radius: 4px; }
.pw-progress-track > span { display: block; height: 100%; background: var(--pw-red); border-radius: inherit; }
.pw-montagem { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--pw-muted); font-size: 12px; line-height: 1.35; }
.pw-montagem strong { flex: 0 0 auto; color: #e5e7eb; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.pw-progress-compact { min-width: 0; margin-top: 2px; }
.pw-progress-compact .pw-progress-copy { font-size: 12px; }
.pw-progress-compact .pw-progress-copy strong { font-size: 12px; }

.pw-detail { min-width: 0; background: var(--pw-surface); container: pw-detail / inline-size; }
.pw-detail-header { padding: 22px 28px 20px; border-bottom: 1px solid var(--pw-line); }
.pw-detail-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.pw-detail-title-row > div:first-child { min-width: 0; }
.pw-detail-title-row :is(h1, h2) { max-width: 820px; margin: 10px 0 6px; color: #f7f7f8; font-size: clamp(23px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -.03em; }
.pw-detail-title-row p { margin: 0; color: var(--pw-muted); font-size: 13px; }
.pw-detail-title-row p > span { margin: 0 7px; color: #555d6b; }
.pw-id-copiar { padding: 1px 6px; border: 1px solid var(--pw-line); border-radius: 4px; background: transparent; color: var(--pw-muted); font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; letter-spacing: .02em; cursor: pointer; }
.pw-id-copiar:hover { border-color: #565e6d; color: #d7d9de; }
.pw-detail-title-row > .pw-progress { width: min(260px, 34%); flex: 0 0 auto; }
.pw-attention-note { margin-top: 20px; padding: 13px 15px; display: flex; gap: 11px; border: 1px solid rgba(242, 187, 94, .26); border-radius: 6px; background: var(--pw-amber-soft); color: #f4c676; }
.pw-attention-note > .pw-icon { margin-top: 2px; }
.pw-attention-note strong { color: #f4d295; font-size: 13px; }
.pw-attention-note p { margin: 3px 0 0; color: #bba778; font-size: 13px; line-height: 1.45; }
.pw-back-button { min-height: 36px; margin: -4px 0 14px; padding: 0; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #b2b8c2; font-size: 13px; cursor: pointer; }
.pw-back-button:hover { color: #fff; }

.pw-detail-tabs { min-height: 55px; padding: 0 28px; display: flex; align-items: stretch; gap: 24px; border-bottom: 1px solid var(--pw-line); overflow-x: auto; scrollbar-width: none; }
.pw-detail-tabs::-webkit-scrollbar { display: none; }
.pw-detail-tabs button { min-height: 55px; padding: 0 1px; display: flex; align-items: center; gap: 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #858d9b; font-size: 13px; font-weight: 620; white-space: nowrap; cursor: pointer; }
.pw-detail-tabs button:hover { color: #d9dce2; }
.pw-detail-tabs button[aria-selected="true"] { border-bottom-color: var(--pw-red); color: #fff; }
.pw-detail-content { min-height: 0; padding: 24px 28px 28px; outline: none; }
.pw-detail-footer { min-height: 62px; padding: 11px 28px; display: flex; align-items: center; justify-content: flex-end; gap: 24px; border-top: 1px solid var(--pw-line); }
.pw-detail-footer p { max-width: 560px; margin: 0; color: var(--pw-muted-2); font-size: 12px; line-height: 1.45; }
.pw-detail-footer > div { display: flex; gap: 9px; }
.pw-detail-footer:has(> p) { justify-content: space-between; }

.pw-summary-panel { display: grid; gap: 24px; }
.pw-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--pw-line); border-bottom: 1px solid var(--pw-line); }
.pw-facts > div { min-width: 0; padding: 14px 18px; }
.pw-facts > div + div { border-left: 1px solid var(--pw-line); }
.pw-delivery-facts { margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--pw-line); border-bottom: 1px solid var(--pw-line); }
.pw-delivery-facts > div { min-width: 0; padding: 13px 0; }
.pw-delivery-facts > div + div { padding-left: 18px; border-left: 1px solid var(--pw-line); }
.pw-facts dt, .pw-delivery-facts dt { margin-bottom: 5px; color: var(--pw-muted-2); font-size: 12px; }
.pw-facts dd, .pw-delivery-facts dd { margin: 0; overflow: hidden; color: #e5e7eb; font-size: 13px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }

.pw-phases > header, .pw-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.pw-phases h3, .pw-panel-heading h3 { margin: 0; color: #eff0f2; font-size: 17px; letter-spacing: -.02em; }
.pw-phases header p, .pw-panel-heading p { max-width: 650px; margin: 6px 0 0; color: var(--pw-muted); font-size: 13px; line-height: 1.5; }
.pw-phases > header { align-items: center; }
.pw-phases header p { margin: 0; }
.pw-phases ol { margin: 15px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); list-style: none; border-top: 1px solid var(--pw-line); border-bottom: 1px solid var(--pw-line); }
.pw-phases li { min-width: 0; min-height: 62px; padding: 0 12px; display: flex; align-items: center; gap: 9px; background: #0f1116; }
.pw-phases li + li { border-left: 1px solid var(--pw-line); }
.pw-phases li > i { width: 23px; height: 23px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #343945; border-radius: 50%; color: #858d9b; font-style: normal; }
.pw-phases li > i > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pw-phases li > span { overflow: hidden; color: #d9dce2; font-size: 12px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.pw-phases li.is-done > i { border-color: rgba(84, 214, 155, .3); background: var(--pw-green-soft); color: var(--pw-green); }
.pw-phases li.is-current > i { border-color: rgb(var(--red-rgb) / .35); background: var(--pw-red-soft); color: var(--accent-text); }
.pw-phases li.is-attention > i { border-color: rgba(242, 187, 94, .35); background: var(--pw-amber-soft); color: var(--pw-amber); }

.pw-activity-panel { min-width: 0; min-height: 0; }
.pw-subsection-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.pw-subsection-heading > div { min-width: 0; }
.pw-subsection-heading h4 { margin: 0; color: #eceef2; font-size: 15px; line-height: 1.3; letter-spacing: -.015em; }
.pw-subsection-heading p { max-width: 680px; margin: 5px 0 0; color: var(--pw-muted); font-size: 12px; line-height: 1.5; }
.pw-source-overview { margin-top: 23px; padding-top: 22px; border-top: 1px solid var(--pw-line); }
.pw-source-total { flex: 0 0 auto; padding-top: 1px; color: var(--pw-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pw-source-total strong { color: #f1f2f4; font-size: 15px; }
.pw-source-readout { margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); border-top: 1px solid var(--pw-line); border-bottom: 1px solid var(--pw-line); }
.pw-source-stat { min-width: 0; padding: 13px 14px; }
.pw-source-stat + .pw-source-stat { border-left: 1px solid var(--pw-line); }
.pw-source-stat dt { min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; color: #b9bec8; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pw-source-stat dt i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 2px; background: #858d9b; }
.pw-source-stat dd { margin: 8px 0 0; display: flex; align-items: baseline; gap: 8px; }
.pw-source-stat dd strong { color: #f3f4f6; font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
.pw-source-stat dd span { overflow: hidden; color: var(--pw-muted-2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pw-source-stat.is-youtube dt i { background: var(--pw-red); }
.pw-source-stat.is-stock dt i { background: #e5a35a; }
.pw-source-stat.is-ai-image dt i { background: #9b8cff; }
.pw-source-stat.is-ai-video dt i { background: #65a9ff; }
.pw-source-stat.is-other dt i { background: #9ca3b0; }
.pw-source-stat.is-pending dt i { border: 1px solid #69717f; background: transparent; }
.pw-presenter-coverage { min-height: 50px; padding: 11px 2px 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; color: #8d96a4; }
.pw-presenter-coverage p { min-width: 0; margin: 0; display: flex; align-items: baseline; gap: 8px; }
.pw-presenter-coverage p strong { color: #dfe2e7; font-size: 12px; }
.pw-presenter-coverage p span, .pw-presenter-coverage small { color: var(--pw-muted-2); font-size: 11px; }
.pw-presenter-coverage small { white-space: nowrap; }
.pw-source-unavailable { min-height: 82px; margin-top: 14px; padding: 15px 2px; display: flex; align-items: flex-start; gap: 11px; border-top: 1px solid var(--pw-line); border-bottom: 1px solid var(--pw-line); color: #7f8795; }
.pw-source-unavailable > .pw-icon { margin-top: 1px; }
.pw-source-unavailable p { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.pw-source-unavailable strong { color: #dfe2e7; font-size: 13px; }
.pw-source-unavailable span { color: var(--pw-muted); font-size: 12px; line-height: 1.45; }
.pw-log-section { margin-top: 29px; padding-top: 27px; border-top: 1px solid var(--pw-line); }
.pw-log-tools, .pw-archive-tools { margin: 15px 0; display: grid; grid-template-columns: minmax(260px, 1fr) 190px; gap: 10px; }
.pw-search-field { min-height: 42px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border: 1px solid #303541; border-radius: 8px; background: #0f1116; color: #7f8795; }
.pw-search-field:focus-within { border-color: var(--accent-focus); box-shadow: 0 0 0 3px rgb(var(--red-rgb) / .08); }
.pw-search-field input { width: 100%; min-width: 0; height: 40px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--pw-text); font-size: 13px; }
.pw-search-field input::placeholder { color: #7b8492; }
.pw-select-field { min-height: 42px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding-left: 12px; border: 1px solid #303541; border-radius: 8px; background: #0f1116; }
.pw-select-field > span { color: var(--pw-muted-2); font-size: 12px; }
.pw-select-field select { min-width: 0; height: 40px; padding: 0 28px 0 2px; border: 0; outline: 0; background: transparent; color: var(--pw-text); color-scheme: dark; font-size: 13px; }
.pw-select-field select option { background: #111319; color: #f3f4f6; }
.pw-select-field select option:disabled { color: #737b89; }
.pw-event-list { max-height: 320px; margin: 0; padding: 0; overflow-y: auto; list-style: none; border-top: 1px solid var(--pw-line); scrollbar-color: #474e5b transparent; scrollbar-width: thin; }
.pw-event-list::-webkit-scrollbar { width: 8px; }
.pw-event-list::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: #474e5b; background-clip: padding-box; }
.pw-event-list li { min-height: 72px; display: grid; grid-template-columns: 26px 75px minmax(0, 1fr); gap: 11px; align-items: start; padding: 15px 2px; border-bottom: 1px solid var(--pw-line-soft); }
.pw-event-list li > i { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #343945; border-radius: 50%; color: #89919e; font-style: normal; }
.pw-event-list li > i > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pw-event-list li.is-success > i { border-color: rgba(84, 214, 155, .3); color: var(--pw-green); }
.pw-event-list li.is-warning > i, .pw-event-list li.is-error > i { border-color: rgba(242, 187, 94, .3); color: var(--pw-amber); }
.pw-event-list time { padding-top: 4px; color: var(--pw-muted-2); font: 500 12px/1.4 var(--font-mono), monospace; font-variant-numeric: tabular-nums; }
.pw-event-list li > div > span { color: var(--accent-text); font-size: 12px; font-weight: 650; }
.pw-event-list li > div > p { margin: 5px 0 0; color: #d3d6dc; font-size: 13px; line-height: 1.45; }
.pw-event-more { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--pw-line-soft); }
.pw-event-more p { margin: 0; color: var(--pw-muted); font-size: 12px; }
.pw-empty-inline, .pw-empty-page { min-height: 220px; padding: 32px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--pw-muted-2); }
.pw-empty-inline > .pw-icon, .pw-empty-page > .pw-icon { margin-bottom: 14px; color: #626a78; }
.pw-empty-inline strong, .pw-empty-page h2 { margin: 0; color: #e1e4e9; font-size: 16px; }
.pw-empty-inline p, .pw-empty-page p { max-width: 560px; margin: 8px 0 0; color: var(--pw-muted); font-size: 13px; line-height: 1.55; }
.pw-empty-page { min-height: 420px; border: 1px solid var(--pw-line); border-radius: 6px; background: var(--pw-surface); }
.pw-empty-page .pw-button { margin-top: 20px; }

.pw-delivery { padding-top: 0; }
.pw-delivery-file { min-height: 78px; margin-top: 18px; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--pw-line); border-bottom: 1px solid var(--pw-line); color: #7f8794; }
.pw-delivery-file.is-ready { color: #d6dae0; }
.pw-delivery-file-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.pw-delivery-file-main > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pw-delivery-file strong { overflow: hidden; color: #eef0f3; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.pw-delivery-file span { color: var(--pw-muted); font-size: 12px; }
.pw-video { width: 100%; max-height: 520px; margin-top: 20px; display: block; border: 1px solid var(--pw-line); border-radius: 6px; background: #050609; }
.pw-published-path { margin-top: 14px; padding: 13px 15px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--pw-line); border-radius: 8px; background: #0e1015; }
.pw-published-path span { color: var(--pw-muted-2); font-size: 12px; }
.pw-published-path code { overflow-wrap: anywhere; color: #d1d5db; font: 12px/1.45 var(--font-mono), monospace; }
.pw-published-path .pw-copy-path { width: max-content; margin-top: 5px; }
.pw-delivery-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 9px; }
.pw-delivery.is-compact .pw-delivery-file { min-height: 70px; margin-top: 0; }

.pw-scene-details { margin-top: 14px; border-bottom: 1px solid var(--pw-line); }
.pw-scene-details > summary { min-height: 44px; display: flex; align-items: center; color: #cfd3da; font-size: 12px; font-weight: 650; cursor: pointer; }
.pw-scene-table-wrap { padding: 0 0 14px; overflow-x: auto; }

.pw-archive-detail-page { max-width: 1250px; }
.pw-archive-detail-page .pw-detail { overflow: hidden; border: 1px solid var(--pw-line); border-radius: 6px; }
.pw-archive-tools { grid-template-columns: minmax(260px, 1fr) 245px minmax(210px, .6fr); margin: 0 0 14px; }
.pw-archive-tools > label { min-width: 0; min-height: 44px; }
.pw-archive-tools .pw-select-field { grid-template-columns: auto minmax(0, 1fr); }
.pw-archive-tools select { width: 100%; text-overflow: ellipsis; }
.pw-archive-list { overflow: hidden; border: 1px solid var(--pw-line); border-radius: 6px; background: var(--pw-surface); }
.pw-archive-list > header { min-height: 46px; padding: 0 19px; display: grid; grid-template-columns: minmax(300px, 1.3fr) minmax(280px, 1fr) minmax(250px, .8fr); gap: 20px; align-items: center; border-bottom: 1px solid var(--pw-line); background: #0e1015; color: #78808e; font: 650 12px/1 var(--font-mono), monospace; letter-spacing: .08em; text-transform: uppercase; }
.pw-archive-row { min-height: 116px; padding: 18px; display: grid; grid-template-columns: minmax(260px, 1.3fr) minmax(250px, 1fr) minmax(250px, .8fr); gap: 20px; align-items: center; border-bottom: 1px solid var(--pw-line); }
.pw-archive-row:last-child { border-bottom: 0; }
.pw-archive-identity { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.pw-archive-identity > strong { max-width: 100%; overflow: hidden; color: #f0f1f3; font-size: 15px; font-weight: 670; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.pw-archive-identity p { margin: 0; color: var(--pw-muted); font-size: 12px; }
.pw-archive-identity p span { margin: 0 4px; color: #565e6d; }
.pw-archive-facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pw-archive-facts > div { min-width: 0; }
.pw-archive-facts dt { margin-bottom: 5px; color: var(--pw-muted-2); font-size: 12px; }
.pw-archive-facts dd { margin: 0; overflow: hidden; color: #dce0e5; font-size: 12px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pw-row-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; }
.pw-row-actions .pw-button { width: 100%; min-height: 40px; padding: 0 10px; font-size: 12px; }
.pw-row-actions .pw-button .pw-icon { width: 15px; height: 15px; }
.pw-row-action-open { grid-column: 1; grid-row: 1; }
.pw-row-action-secondary { grid-column: 2; }
.pw-row-action-delete { grid-column: 3; grid-row: 1; }
.pw-archive-empty { min-height: 330px; }
.pw-pagination { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pw-pagination p, .pw-pagination > span { margin: 0; color: var(--pw-muted); font-size: 12px; }
.pw-pagination[data-historico] {
  width: min(100%, 760px);
  min-height: 88px;
  margin: 16px auto 8px;
  padding: 12px 8px;
  gap: 28px;
  justify-content: center;
}
.pw-history-summary { min-width: 0; display: grid; gap: 6px; }
.pw-pagination .pw-history-count {
  color: var(--pw-text);
  font: 600 15px/1.4 var(--font-sans), sans-serif;
  font-variant-numeric: tabular-nums;
}
.pw-history-help {
  display: block;
  color: var(--pw-muted);
  font: 400 13px/1.5 var(--font-sans), sans-serif;
  text-wrap: pretty;
}
.pw-pagination .pw-history-more {
  flex: 0 0 auto;
  min-width: 244px;
  min-height: 48px;
  padding: 12px 20px;
  gap: 10px;
  font: 600 14px/1.4 var(--font-sans), sans-serif;
}
.pw-history-more .pw-icon { opacity: .85; }
.pw-loading-dot { width: 10px; height: 10px; border: 2px solid #777f8d; border-top-color: #fff; border-radius: 50%; animation: pw-spin .7s linear infinite; }

@keyframes pw-spin { to { transform: rotate(360deg); } }

@container pw-page (max-width: 1180px) {
  .pw-workspace { grid-template-columns: 310px minmax(0, 1fr); }
}

@container pw-page (max-width: 940px) {
  .pw-archive-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pw-archive-tools .pw-search-field { grid-column: 1 / -1; }
  .pw-archive-list > header { display: none; }
  .pw-archive-row { grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr); }
  .pw-row-actions { grid-column: 1 / -1; }
}

@container pw-page (max-width: 860px) {
  .pw-page-heading { min-height: 0; flex-direction: column; gap: 18px; }
  .pw-workspace { display: block; }
  .pw-queue {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--pw-line);
  }
  .pw-queue-heading { min-height: 44px; grid-column: 1 / -1; }
  .pw-queue-group, .pw-queue-group > div { display: contents; }
  .pw-queue-group > header { display: none; }
  .pw-queue-item {
    min-height: 76px;
    padding: 8px 10px;
    gap: 4px;
    border: 1px solid var(--pw-line-soft);
    border-width: 0 1px 1px 0;
  }
  .pw-queue-item:last-child { border-bottom: 1px solid var(--pw-line-soft); }
  .pw-queue-item-top { justify-content: flex-start; }
  .pw-queue-item .pw-status { min-height: 21px; padding-inline: 7px; font-size: 10px; }
  .pw-queue-item-top time, .pw-queue-item-meta, .pw-progress-compact { display: none; }
  .pw-queue-item > strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@container pw-page (max-width: 620px) {
  .pw-page-heading h1 { font-size: 32px; }
  .pw-page-heading-actions, .pw-page-heading-actions .pw-button { width: 100%; }
  .pw-cockpit-page .pw-page-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }
  .pw-cockpit-page .pw-page-heading > div:first-child > span { display: none; }
  .pw-cockpit-page .pw-page-heading-actions, .pw-cockpit-page .pw-page-heading-actions .pw-button { width: auto; }
  .pw-button { min-height: 44px; }
  .pw-operations-strip { min-height: 0; grid-template-columns: 1fr; }
  .pw-operation-counts { min-height: 52px; }
  .pw-operation-stat { padding: 0 14px; }
  .pw-operation-stat dt { gap: 7px; font-size: 12px; }
  .pw-operation-stat dd { font-size: 17px; }
  .pw-operation-attention, .pw-operation-clear { min-height: 44px; margin: 0; border: 0; border-top: 1px solid rgba(242, 187, 94, .24); border-radius: 0; }
  .pw-operation-clear { border-top-color: rgba(84, 214, 155, .18); }
  .pw-workspace { margin-inline: -4px; border-radius: 6px; }
  .pw-queue-item { min-height: 76px; }
  .pw-archive-tools { grid-template-columns: 1fr; margin-top: 4px; }
  .pw-archive-row { padding: 15px; gap: 16px; grid-template-columns: 1fr; }
  .pw-archive-facts, .pw-row-actions { grid-column: 1; }
  .pw-archive-facts { padding-top: 14px; border-top: 1px solid var(--pw-line-soft); }
  .pw-archive-identity > strong { white-space: normal; }
  .pw-archive-facts { grid-template-columns: 1fr 1fr; gap: 14px; }
  .pw-row-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .pw-row-action-open { grid-column: 1 / -1; grid-row: 1; }
  .pw-row-action-secondary { grid-column: 1; grid-row: 2; }
  .pw-row-action-delete { grid-column: 2; grid-row: 2; }
  .pw-row-actions .pw-button { min-height: 44px; }
  .pw-pagination { align-items: stretch; flex-direction: column; padding: 17px 0; }
  .pw-pagination .pw-button { width: 100%; }
  .pw-pagination[data-historico] { gap: 16px; margin-block: 12px 4px; }
  .pw-pagination .pw-history-more { min-width: 0; }
}

@container pw-detail (max-width: 760px) {
  .pw-detail-header, .pw-detail-content { padding-left: 22px; padding-right: 22px; }
  .pw-detail-tabs, .pw-detail-footer { padding-left: 22px; padding-right: 22px; }
  .pw-detail-title-row { align-items: stretch; flex-direction: column; gap: 18px; }
  .pw-detail-title-row > .pw-progress { width: 100%; }
  .pw-facts { grid-template-columns: 1fr 1fr; }
  .pw-facts > div:nth-child(n) { border-left: 0; }
  .pw-facts > div:nth-child(even) { border-left: 1px solid var(--pw-line); }
  .pw-facts > div:nth-child(n + 3) { border-top: 1px solid var(--pw-line); }
  .pw-phases ol { grid-template-columns: repeat(3, 1fr); }
  .pw-phases li:nth-child(n) { border-left: 0; border-top: 0; }
  .pw-phases li:not(:nth-child(3n + 1)) { border-left: 1px solid var(--pw-line); }
  .pw-phases li:nth-child(n + 4) { border-top: 1px solid var(--pw-line); }
}

@container pw-detail (max-width: 560px) {
  .pw-detail-header, .pw-detail-content, .pw-detail-footer { padding-left: 16px; padding-right: 16px; }
  .pw-detail-header { padding-top: 14px; padding-bottom: 13px; }
  .pw-detail-title-row { gap: 14px; }
  .pw-detail-title-row :is(h1, h2) { margin-top: 8px; margin-bottom: 4px; font-size: 22px; }
  .pw-detail-title-row p { font-size: 12px; line-height: 1.45; }
  .pw-detail-title-row > .pw-progress .pw-progress-track { margin-top: 6px; }
  .pw-detail-tabs { padding: 0 16px; gap: 22px; }
  .pw-detail-tabs button { min-height: 58px; }
  .pw-detail-content { padding-top: 20px; padding-bottom: 22px; }
  .pw-detail-footer { align-items: stretch; flex-direction: column; }
  .pw-detail-footer > div { display: grid; grid-template-columns: 1fr; }
  .pw-phases > header { align-items: flex-start; flex-direction: column; gap: 5px; }
  .pw-phases ol { grid-template-columns: 1fr 1fr; }
  .pw-phases li:nth-child(n) { border-left: 0; border-top: 0; }
  .pw-phases li:nth-child(even) { border-left: 1px solid var(--pw-line); }
  .pw-phases li:nth-child(n + 3) { border-top: 1px solid var(--pw-line); }
  .pw-source-heading { align-items: flex-start; }
  .pw-source-readout { grid-template-columns: 1fr 1fr; }
  .pw-source-stat:nth-child(n) { border-top: 0; border-left: 0; }
  .pw-source-stat:nth-child(even) { border-left: 1px solid var(--pw-line); }
  .pw-source-stat:nth-child(n + 3) { border-top: 1px solid var(--pw-line); }
  .pw-source-stat:last-child:nth-child(odd) { grid-column: 1 / -1; border-left: 0; }
  .pw-source-stat dd { align-items: flex-start; flex-direction: column; gap: 5px; }
  .pw-presenter-coverage { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding-top: 13px; }
  .pw-presenter-coverage p { align-items: flex-start; flex-direction: column; gap: 3px; }
  .pw-presenter-coverage small { grid-column: 2; }
  .pw-log-tools { grid-template-columns: 1fr; }
  .pw-search-field, .pw-select-field { min-height: 44px; }
  .pw-search-field input, .pw-select-field select { height: 42px; }
  .pw-event-list li { grid-template-columns: 26px minmax(0, 1fr); }
  .pw-event-list time { grid-column: 2; grid-row: 1; }
  .pw-event-list li > div { grid-column: 2; }
  .pw-panel-heading { align-items: stretch; flex-direction: column; }
  .pw-panel-heading .pw-button { width: 100%; }
  .pw-delivery-file { align-items: stretch; flex-direction: column; }
  .pw-delivery-actions { display: grid; grid-template-columns: 1fr; }
  .pw-delivery-actions .pw-button { min-height: 44px; width: 100%; }
  .pw-delivery-facts { grid-template-columns: 1fr; }
  .pw-delivery-facts > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--pw-line); }
}

@media (prefers-reduced-motion: reduce) {
  .pw-page *, .pw-page *::before, .pw-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── Tags e descrição (2026-08-26) ─────────────────────────────────────────
   Quem abre esta aba está com o YouTube aberto na outra janela: a única ação
   é COPIAR. Por isso o texto vive num `textarea` somente-leitura (o navegador
   já sabe selecionar tudo, e ele rola sozinho no texto longo) em vez de um
   `pre` bonito que obriga a arrastar o mouse até o fim.
   Herda os tokens e as bordas do resto do workspace — aba nova com estética
   própria seria uma segunda linguagem visual na mesma tela. */
.pw-meta-panel { display: grid; gap: 24px; }
.pw-meta-bloco > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pw-meta-bloco h3 { margin: 0; color: #eff0f2; font-size: 17px; letter-spacing: -.02em; }
.pw-meta-dica { max-width: 650px; margin: 6px 0 0; color: var(--pw-muted); font-size: 12px; line-height: 1.5; }
.pw-meta-campo { width: 100%; margin-top: 13px; padding: 13px 15px; display: block; box-sizing: border-box;
  border: 1px solid var(--pw-line); border-radius: 8px; background: #0f1116; color: #d9dce2;
  font: inherit; font-size: 13px; line-height: 1.6; resize: vertical; }
.pw-meta-campo:focus-visible { outline: 2px solid rgb(var(--red-rgb) / .55); outline-offset: 1px; }
.pw-meta-panel .pw-panel-heading { margin-bottom: 4px; }
.pw-meta-saida:empty { display: none; }
.pw-meta-erro { margin: 0; padding: 11px 14px; border: 1px solid rgb(var(--danger-rgb) / .35);
  border-radius: 8px; background: rgb(var(--danger-rgb) / .08); color: var(--danger-text);
  font-size: 13px; line-height: 1.5; }

/* O botao de copiar e' secundario ao lado de um titulo: menor que o de acao
   da tela, e com largura estavel — o rotulo troca para "Copiado" por 1,4 s e
   sem `min-width` o bloco inteiro dava um solavanco a cada clique. */
.pw-meta-copiar { min-width: 92px; min-height: 32px; padding: 0 14px; font-size: 13px; }
/* A alca de redimensionar encostava na borda arredondada e vazava do campo. */
.pw-meta-campo { resize: vertical; }
.pw-meta-bloco + .pw-meta-bloco { padding-top: 4px; }

/* ── 2026-09-02 · O ERRO DO DOWNLOAD DA LEGENDA (.srt), NA ABA ARQUIVOS ──
   A linha da legenda em si NAO trouxe regra nova: ela reusa `.pw-delivery-file`
   (linha 391), o `.is-ready` que a acende, `.pw-delivery-file-main` e
   `.pw-delivery-actions` — e' a mesma linha do mp4 com outro icone.

   O que faltava era so' a caixa do recado quando a rota recusa. O desenho e' o
   mesmo do `.pw-meta-erro` (linha 598), COPIADO e nao agrupado no mesmo
   seletor: juntar os dois exigiria editar uma regra de que a aba "Tags e
   descricao" ja' depende, e as duas caixas poderiam ter de divergir depois. O
   `margin-top` e' o unico valor proprio — aqui ela nasce colada embaixo de uma
   `.pw-delivery-file`, que tem borda inferior. */
.pw-file-erro { margin: 12px 0 0; padding: 11px 14px; border: 1px solid rgb(var(--danger-rgb) / .35);
  border-radius: 8px; background: rgb(var(--danger-rgb) / .08); color: var(--danger-text);
  font-size: 13px; line-height: 1.5; }
