/* Calendarq · tela "pranchas" (frente F5). Carregado depois do legado: sobrescreva aqui.
   Só tokens var(--…), nunca cor escrita à mão (o verificar.mjs recusa). Classes com prefixo próprio da tela.
   Esboço 2.4 (rodada 2): pastas por fase à esquerda, visualizador rápido ao lado. */

/* As duas colunas: a lista e o visualizador (fixo ao rolar). */
.pr-files { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.pr-main { min-width: 0; }
@media (min-width: 1440px) { .pr-files { grid-template-columns: minmax(0, 1fr) 420px; } }

/* Título de cada bloco ("Pranchas por fase") com o envio ao lado. */
.pr-sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.pr-main > .pr-sec:first-child, .fx-other + .pr-sec { margin-top: 0; }
.pr-sec h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.03em; color: var(--ink); }

/* A pasta: vidro, resumo com o ícone de pasta e a seta. */
.pr-folder { border-radius: var(--r-lg); margin-bottom: 10px; overflow: hidden; }
.pr-folder > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 13px 16px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); }
.pr-folder > summary::-webkit-details-marker { display: none; }
.pr-folder > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: var(--r-lg); }
.pr-fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-fname small { font-weight: 400; color: var(--ink-3); font-size: 12px; letter-spacing: 0; }
.pr-fic { width: 34px; height: 28px; border-radius: 7px 7px 8px 8px; background: var(--g3); border: 1px solid var(--g-edge); flex: none; display: grid; place-items: center; color: var(--ink-3); }
.pr-fic .ic { width: 14px; height: 14px; }
.pr-fic b { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .06em; color: var(--ink-2); }
.pr-folder > summary .pr-chev { margin-left: auto; width: 18px; height: 18px; flex: none; color: var(--ink-3); transition: transform .35s var(--ease); }
.pr-folder[open] > summary .pr-chev { transform: rotate(180deg); }

.pr-sheets { padding: 0 12px 12px; border-top: 1px dashed var(--line-2); }
.pr-fbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 2px 4px; }
.pr-fbar-sp { flex: 1; }
.pr-fbar .folder-name-input { max-width: 280px; }

/* A prancha: folha com o código, nome, revisão, cadeado e ações. */
.pr-sheet { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 6px 12px; align-items: center; padding: 11px 6px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink); cursor: pointer; border-radius: 12px; }
.pr-sheet:last-child { border-bottom: 0; }
.pr-sheet:hover { background: var(--g1); }
.pr-sheet:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.pr-sheet.sel { background: var(--g1); border-bottom-color: transparent; box-shadow: inset 0 0 0 1px var(--g-edge); }
.pr-sheet.is-hidden .pr-code { border-style: dashed; }
.pr-code { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; width: 40px; height: 44px; border-radius: 7px 12px 7px 7px; display: grid; place-items: end center; padding-bottom: 6px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); overflow: hidden; white-space: nowrap; }
.pr-t { min-width: 0; display: grid; gap: 1px; }
.pr-t b { font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-t small { display: block; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.pr-t .pr-sub { white-space: nowrap; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.pr-chips .fx-situ { font-size: 11.5px; }
.pr-rev { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; white-space: nowrap; background: var(--pri-bg); color: var(--pri-ink); }
.pr-rev.is-r0, .pr-rev.is-old { background: var(--sunk); color: var(--ink-3); }
.pr-lock { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; background: var(--ok-s); color: var(--ok); }
.pr-lock .ic { width: 12px; height: 12px; }
.pr-lock.is-sm { height: 19px; padding: 0 7px; font-size: 9.5px; }
.pr-acts { display: inline-flex; align-items: center; gap: 4px; }

/* As revisões antigas, recolhidas embaixo da atual. */
.pr-olds { grid-column: 2 / -1; margin-top: -2px; }
.pr-olds > summary { list-style: none; cursor: pointer; font-size: 12px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.pr-olds > summary::-webkit-details-marker { display: none; }
.pr-olds > summary .ic { width: 13px; height: 13px; transition: transform .3s var(--ease); }
.pr-olds[open] > summary .ic { transform: rotate(180deg); }
.pr-oldrow { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-3); padding: 6px 0 0; flex-wrap: wrap; }
.pr-oldrow.sel .pr-oldt { color: var(--ink); font-weight: 500; }
.pr-oldt { min-width: 0; flex: 1 1 180px; }
.pr-olds-more { display: inline-block; margin-top: 8px; font-size: 12px; }

/* O visualizador: vidro forte, fixo ao rolar; o papel é sempre claro. */
.pr-viewer { border-radius: var(--r-lg); padding: 12px; position: sticky; top: 12px; min-width: 0; }
.pr-vbar { display: flex; align-items: center; gap: 6px; padding: 2px 2px 10px; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }
.pr-vname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-vname small { font-weight: 400; color: var(--ink-3); }
.pr-vbar-sp { flex: 1; }
.pr-zoom { font-size: 16px; line-height: 1; width: 30px; height: 30px; }
.pr-paper { background: var(--lgf-ffffff); border-radius: 12px; aspect-ratio: 1.414 / 1; position: relative; overflow: hidden; box-shadow: 0 1px 2px var(--lgs-0-0-0-6), 0 12px 30px -14px var(--lgs-0-0-0-35); display: grid; place-items: center; color: var(--lgf-000000); }
.pr-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--lgf-ffffff); }
.pr-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pr-vwait { font-size: 12.5px; opacity: .6; }
.pr-vfail { display: grid; justify-items: center; gap: 8px; padding: 20px; text-align: center; font-size: 13px; }
.pr-vfail span { opacity: .7; }
.pr-vempty { display: grid; justify-items: center; gap: 6px; padding: 36px 16px; text-align: center; color: var(--ink-2); font-size: 13px; }
.pr-vempty p { margin: 0; color: var(--ink-3); }
.pr-vlock { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--ok-s); color: var(--ok); font-size: 12.5px; font-weight: 500; }
.pr-vlock .ic { width: 14px; height: 14px; flex: none; }
.pr-vold { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }
.pr-vfoot { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 10px; font-size: 12px; color: var(--ink-3); }
.pr-vfoot-b { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-panel .pr-vlock { margin: 0 0 12px; }

/* Tablet e notebook estreito: uma coluna, o visualizador em cima, sem prender
   ao rolar e na proporção da prancha. */
@media (max-width: 1100px) {
  .pr-files { grid-template-columns: minmax(0, 1fr); }
  .pr-viewer { position: static; order: -1; }
  .pr-paper { aspect-ratio: 1.414 / 1; }
}

/* Celular: sem visualizador (sem iframe); "Ver" abre o arquivo. A folha
   empilha: nome em cima, revisão, cadeado e ações embaixo. */
@media (max-width: 760px) {
  .pr-viewer { display: none; }
  .pr-sec { flex-wrap: wrap; }
  .pr-sheet { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pr-sheet .pr-code { grid-row: 1 / span 2; align-self: start; }
  .pr-sheet .pr-t { grid-column: 2 / -1; }
  .pr-sheet .pr-rev { grid-column: 2; grid-row: 2; justify-self: start; }
  .pr-sheet .pr-acts { grid-column: 3; grid-row: 2; }
  .pr-sheet .pr-lock { grid-column: 2 / -1; grid-row: 3; justify-self: start; }
  .pr-sheet .pr-lock-sp { display: none; }
  .pr-fbar .btn .lbl { display: none; }
}

/* Dentro da aba, a seção começa logo abaixo das abas (sem o vão do topo antigo). */
[data-aba-corpo="pranchas"] > .files-sec { padding-top: 8px; }
@media (max-width: 760px) { .pr-main > .pr-sec:first-child { margin-top: 14px; } }
