/* O app Projetos: clientes e projetos na lateral, quadro, lista, ficha do cliente e o cartão aberto. Materiais do sistema (cosmos.css). */

.janela.j-projetos:not(.cheia) { max-width: 1440px; }
.pj { --divisa-base: 10px; position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: var(--pj-lado, 252px) minmax(0, 1fr); }
.pj > * { min-width: 0; min-height: 0; }
.pj.sem-lado { grid-template-columns: minmax(0, 1fr); }
.pj.sem-lado .pj-lado, .pj.sem-lado > .divisa { display: none; }
.pj.sem-lado .pj-meio { margin-left: 10px; }

/* ---------------------------------------------------------------- a lateral */
.pj-lado { display: flex; flex-direction: column; padding: 2px 10px 0; }
.pj-busca { flex: none; display: flex; align-items: center; gap: 8px; height: 32px; margin-bottom: 8px; padding: 0 10px; border-radius: 7px; color: var(--tinta-3); background: rgba(var(--f), .07); transition: background-color .16s ease, box-shadow .16s ease; cursor: text; }
.pj-busca:focus-within { background: rgba(var(--f), .11); box-shadow: inset 0 0 0 1px rgba(var(--f), .22); }
.pj-busca input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; font-size: 14px; color: var(--tinta); background: none; }
.pj-busca input::placeholder { color: var(--tinta-3); opacity: 1; }
.pj-busca input::-webkit-search-cancel-button { display: none; }
.pj-lado-rolo { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; overflow-y: auto; overscroll-behavior: contain; }
.pj-lado h3 { display: flex; align-items: center; min-height: 24px; margin: 12px 4px 2px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--tinta-3); }
.pj-lado h3 span { flex: 1; }
.pj-mais { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--tinta-3); transition: background-color .14s ease, color .14s ease; }
.pj-novo-projeto { margin: 6px 0 10px; color: var(--tinta-2); }
.pj-novo-projeto .ico { color: var(--laranja-claro); }
.pj-item { flex: none; display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 4px 8px; border-radius: 7px; text-align: left; font-size: 14px; color: var(--tinta-2); transition: background-color .14s ease, color .14s ease; }
.pj-item > .ico { color: var(--laranja-claro); }
.pj-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-item small { flex: none; font-size: 12px; color: var(--tinta-3); }
.pj-item.on { color: var(--tinta); background: rgba(var(--f), .13); }
.pj-cliente { display: flex; flex-direction: column; gap: 4px; }
.pj-cli { gap: 0; padding: 0 8px 0 0; }
.pj-abre { flex: none; display: grid; place-items: center; width: 26px; height: 34px; color: var(--tinta-3); }
.pj-abre .ico { transition: transform .18s var(--ease-out); }
.pj-cliente.aberto .pj-abre .ico { transform: rotate(90deg); }
.pj-cli-nome { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; min-height: 34px; text-align: left; font-weight: 500; color: inherit; }
.pj-filhos { display: flex; flex-direction: column; gap: 4px; padding-left: 16px; }
.pj-nada { margin: 0; padding: 6px 8px; font-size: 13px; color: var(--tinta-3); }
.pj-logo, .pj-sigla { flex: none; display: grid; place-items: center; font-style: normal; font-weight: 700; color: #fff; background: var(--cor, #6b7688); }
.pj-logo { position: relative; overflow: hidden; width: 22px; height: 22px; border-radius: 6px; font-size: 10px; letter-spacing: .02em; }
.pj-logo img, .pj-rosto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pj-logo img { object-fit: contain; background: #fff; }
.pj-logo.grande { width: 34px; height: 34px; border-radius: 8px; font-size: 14px; }
.pj-sigla { min-width: 30px; height: 18px; padding: 0 5px; border-radius: 5px; font-size: 9.5px; letter-spacing: .04em; }
.pj-vivo { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e; animation: pj-pulso 2s ease-in-out infinite; }
@keyframes pj-pulso { 50% { opacity: .35; } }
.pj-item .pj-atraso, .pj-ficha-proj .pj-atraso { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; color: #fff; background: #d0513f; }

/* ---------------------------------------------------------------- o meio */
.pj-meio { display: flex; flex-direction: column; margin: 0 10px 10px 0; border-radius: 8px; background: var(--poco); overflow: hidden; }
.pj-topo { flex: none; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 12px 8px 12px; }
.pj-titulo { min-width: 0; display: flex; align-items: center; gap: 10px; }
.pj-titulo h2 { margin: 0; min-width: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-sub { font-size: 13px; color: var(--tinta-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-chip { flex: none; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--tinta-2); background: rgba(var(--f), .09); transition: background-color .14s ease, color .14s ease; }
.pj-alterna { width: 30px; height: 30px; border-radius: 7px; background: none; }
.pj-alterna[aria-pressed="false"] { background: rgba(var(--f), .09); }
.pj-pessoas { display: flex; align-items: center; gap: 2px; }
.pj-pessoas button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; opacity: .55; transition: opacity .14s ease, box-shadow .14s ease; }
.pj-pessoas button.on { opacity: 1; box-shadow: 0 0 0 1.5px var(--tinta); }
.pj-rosto { position: relative; overflow: hidden; flex: none; display: inline-grid; place-items: center; width: var(--t, 22px); height: var(--t, 22px); border-radius: 50%; font-style: normal; font-size: calc(var(--t, 22px) * .42); font-weight: 700; color: #fff; background: var(--cor, #6b7688); }
.pj-fases { flex: none; display: flex; gap: 4px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.pj-fases button { flex: none; height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--tinta-3); transition: background-color .14s ease, color .14s ease; }
.pj-fases button.on { color: var(--tinta); background: rgba(var(--f), .13); }
.pj-estado { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font-size: 14.5px; color: var(--tinta-2); }
.pj-estado p { margin: 0; }
.pj-vazio { margin: 0; padding: 18px 0; text-align: center; font-size: 13px; color: var(--tinta-3); }
.pj-rolo { flex: 1; min-height: 0; scrollbar-gutter: stable; overflow-y: auto; overscroll-behavior: contain; padding: 0 10px 12px; }

/* o quadro */
.pj-quadro { flex: 1; min-height: 0; display: flex; gap: 8px; padding: 0 10px 10px; overflow-x: auto; overscroll-behavior-x: contain; }
.pj-col { flex: 1 0 208px; min-width: 0; max-width: 360px; min-height: 0; display: flex; flex-direction: column; border-radius: 8px; background: color-mix(in srgb, var(--cor, #8b93a1) 9%, transparent); }
.pj-col > header { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; }
.pj-col > header small, .pj-secao > header small { font-size: 12.5px; color: var(--tinta-3); }
.pj-selo { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #12161d; background: var(--cor, #8b93a1); }
.pj-col-rolo { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 0 6px 8px; overflow-y: auto; overscroll-behavior: contain; }
.pj-cartao { flex: none; display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 9px 11px 10px; border-radius: 7px; text-align: left; color: var(--tinta); background: rgba(var(--f), .085); box-shadow: 0 1px 2px rgba(0, 0, 0, .22); transition: background-color .14s ease, transform .14s var(--ease-out); }
.pj-cartao:active { transform: scale(.985); }
.pj-cartao > b { font-size: 14px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pj-cartao-topo { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.pj-id { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--tinta-3); white-space: nowrap; }
.pj-pede { flex: none; height: 18px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 700; line-height: 18px; color: #fff; background: var(--laranja); white-space: nowrap; }
.pj-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.pj-tag { height: 18px; padding: 0 7px; border-radius: 5px; font-style: normal; font-size: 11px; font-weight: 600; line-height: 18px; color: #fff; background: color-mix(in srgb, var(--cor, #8b93a1) 78%, #000); white-space: nowrap; }
.pj-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 22px; }
.pj-prazo, .pj-conta { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--tinta-3); white-space: nowrap; }
.pj-prazo.hoje { color: var(--ambar); }
.pj-prazo.atrasado, .pj-vermelho { color: #ee6b5a; }
.pj-conta b { font-weight: 500; }
.pj-conta.cheia { color: #3ecf8e; }
.pj-depois { flex: none; display: flex; align-items: center; gap: 6px; width: 100%; height: 30px; padding: 0 6px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--tinta-3); text-align: left; }
.pj-depois span { flex: 1; }
.pj-depois .ico { transition: transform .18s var(--ease-out); }
.pj-depois[aria-expanded="true"] .ico { transform: rotate(90deg); }
.pj-novo { flex: none; display: flex; align-items: center; gap: 6px; width: 100%; height: 30px; padding: 0 8px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--tinta-3); text-align: left; transition: background-color .14s ease, color .14s ease; }
.pj-novo-form { flex: none; display: flex; }
.pj-novo-form textarea { flex: 1; min-width: 0; padding: 9px 11px; border: 0; border-radius: 7px; outline: 0; resize: none; font: inherit; font-size: 14px; line-height: 1.35; color: var(--tinta); background: rgba(var(--f), .1); box-shadow: inset 0 0 0 1px rgba(var(--f), .24); }
.pj-novo-form textarea::placeholder, .pj-nova-linha input::placeholder, .pj-sub-nova input::placeholder, .pj-comentar textarea::placeholder, .pj-responder textarea::placeholder, .pj-descricao::placeholder { color: var(--tinta-3); opacity: 1; }
.pj-nova-linha { flex: none; display: flex; align-items: center; gap: 10px; height: 42px; margin: 0 10px 10px; padding: 0 12px; border-radius: 8px; color: var(--laranja-claro); background: rgba(var(--f), .07); }
.pj-nova-linha input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; font-size: 15px; color: var(--tinta); background: none; }
.pj-nova-tarefa .pj-chip { max-width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
/* o campo de escrever não ganha contorno: a faixa inteira clareia um pouco quando o cursor está nela */
.pj-nova-linha { transition: background-color .16s ease; }
.pj-nova-linha:focus-within { background: rgba(var(--f), .1); }
.pj-nova-linha input:focus-visible { box-shadow: none; }
/* nas listas de tarefas, a tarefa pessoal e o cartão do Corp dividem as colunas: o círculo e o ponto no mesmo eixo,
   o texto começando na mesma linha e a data na mesma ponta */
.pj-tarefas .tf-tarefa { padding: 3px 8px 3px 6px; }
.pj-tarefas .pj-linha { position: relative; padding-left: 42px; }
.pj-tarefas .pj-linha .pj-ponto { position: absolute; left: 14.5px; top: 50%; margin-top: -4.5px; }
.pj-cartao.arrastando { opacity: .3; }
.pj.arrastando, .pj.arrastando * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.pj-voando { position: absolute; z-index: 6; margin: 0; pointer-events: none; background: color-mix(in srgb, var(--sup-folha) 92%, transparent); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .7); will-change: transform; }
.pj-col.alvo { background: color-mix(in srgb, var(--cor, #8b93a1) 20%, transparent); }
.pj-cai { flex: none; display: block; height: 3px; margin: -1px 2px; border-radius: 2px; background: var(--laranja); }
.pj-fantasma { flex: none; display: block; height: 74px; border-radius: 7px; background: rgba(var(--f), .06); animation: pj-pulso 1.6s ease-in-out infinite; }
.pj-selo.fantasma { width: 74px; background: rgba(var(--f), .1); }
.pj-colunas { display: none; }
.pj-recolhe { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--tinta-3); opacity: 0; transition: opacity .14s ease, background-color .14s ease; }
.pj-col:hover .pj-recolhe, .pj-recolhe:focus-visible { opacity: 1; }
.pj-col.recolhida { flex: 0 0 40px; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; transition: background-color .14s ease; }
.pj-col.recolhida .pj-selo { writing-mode: vertical-rl; height: auto; padding: 8px 0; width: 21px; justify-content: center; }
.pj-col.recolhida small { font-size: 12.5px; color: var(--tinta-3); }

/* a lista */
/* cada linha tem fundo próprio no ponteiro: o respiro entre elas vem do gap da seção */
.pj-secao { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.pj-secao > header { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px; }
.pj-secao button.pj-selo { cursor: pointer; }
.pj-grupo { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--tinta-3); }
.pj-secao.atrasada .pj-grupo { color: #ee6b5a; }
.pj-linha { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 4px 8px; border-radius: 7px; text-align: left; color: var(--tinta); transition: background-color .14s ease; }
.pj-linha > b { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-linha .pj-tags { flex: none; flex-wrap: nowrap; max-width: 34%; overflow: hidden; }
.pj-linha .pj-id { flex: none; min-width: 54px; }
.pj-ponto { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--cor, #8b93a1); }
.pj-de { flex: none; max-width: 160px; font-size: 12.5px; color: var(--tinta-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* a ficha do cliente */
.pj-ficha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; padding-top: 2px; }
.pj-bloco { min-width: 0; padding: 12px 14px 14px; border-radius: 8px; background: rgba(var(--f), .055); }
.pj-bloco.largo { grid-column: 1 / -1; }
.pj-bloco h3, .pj-folha h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--tinta-3); }
.pj-bloco .pj-nada { padding: 2px 0; }
.pj-ficha-proj { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 8px; margin: 0 -8px; width: calc(100% + 16px); border-radius: 7px; text-align: left; color: var(--tinta); transition: background-color .14s ease; }
.pj-ficha-proj > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pj-ficha-proj b { font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-ficha-proj > small { flex: none; font-size: 12.5px; color: var(--tinta-3); }
.pj-barra { display: block; height: 4px; border-radius: 2px; background: rgba(var(--f), .1); overflow: hidden; }
.pj-barra i { display: block; width: var(--p, 0%); height: 100%; border-radius: 2px; background: #3ecf8e; }
.pj-contrato { display: flex; align-items: center; gap: 10px; margin: 0; }
.pj-contrato b { min-width: 0; font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-estado-contrato { flex: none; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 22px; color: #fff; background: #6b7688; }
.pj-estado-contrato.e-assinado, .pj-estado-contrato.e-concluido { background: #2f9e6e; }
.pj-estado-contrato.e-enviado, .pj-estado-contrato.e-assinando { background: #3b82c4; }
.pj-estado-contrato.e-cancelado { background: #b4483c; }
.pj-numeros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.pj-numeros dt { font-size: 12.5px; color: var(--tinta-3); }
.pj-numeros dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.pj-numeros .vencido dd { color: #ee6b5a; }
.pj-proxima { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 0; padding-top: 10px; box-shadow: inset 0 1px 0 rgba(var(--f), .08); font-size: 13px; color: var(--tinta-2); }
.pj-proxima span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-proxima b { color: var(--tinta); }
.pj-pessoa { display: flex; align-items: center; gap: 10px; margin: 0; min-height: 38px; }
.pj-pessoa span { min-width: 0; display: flex; flex-direction: column; }
.pj-pessoa b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-pessoa small { font-size: 12.5px; color: var(--tinta-3); }
.pj-fato { display: flex; gap: 12px; margin: 0; padding: 5px 0; font-size: 13.5px; color: var(--tinta-2); }
.pj-fato span:first-child { flex: none; width: 118px; font-size: 12.5px; color: var(--tinta-3); }
.pj-fato span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- o cartão aberto */
/* sem vidro (backdrop-filter) aqui dentro: a janela já é vidro, e vidro dentro de vidro faz a placa de vídeo recompor o fundo a cada troca (a "tarja"). A folha por cima já é quase opaca. */
.pj-veu { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: var(--veu); animation: pj-veu .16s ease; }
.pj-veu[hidden] { display: none; }
@keyframes pj-veu { from { opacity: 0; } }
.pj-folha { display: flex; flex-direction: column; width: min(1080px, 100%); height: min(740px, 100%); border-radius: 10px; color: var(--tinta); background: var(--sup-folha); box-shadow: var(--brilho), 0 30px 70px -24px rgba(0, 0, 0, .8); overflow: hidden; outline: none; animation: pj-folha .2s var(--ease-out); }
@keyframes pj-folha { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.pj-folha > header { flex: none; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 10px 0 18px; }
.pj-folha > header .redondo { flex: none; width: 30px; height: 30px; border-radius: 7px; }
.pj-folha > header .pj-sub { min-width: 0; }
.pj-folha > header .redondo:disabled { opacity: .35; cursor: default; }
.pj-estado-selo { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: #12161d; background: var(--cor, #8b93a1); }
button.pj-estado-selo { height: 24px; cursor: pointer; }
.pj-estado-selo .c-seta { opacity: .6; }
.pj-folha.sem-entrada, .pj-form.sem-entrada { animation: none; }
.pj-folha > header .botao.pequeno { flex: none; }
.pj-folha-esq h2[contenteditable] { margin-left: -8px; padding: 2px 8px; border-radius: 6px; outline: 0; cursor: text; transition: background-color .14s ease, box-shadow .14s ease; }
.pj-folha-esq h2[contenteditable]:focus { background: rgba(var(--f), .07); box-shadow: inset 0 0 0 1px rgba(var(--f), .2); }
.pj-valor { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; min-height: 30px; margin-left: -8px; padding: 3px 8px; border-radius: 6px; text-align: left; font-size: 14px; color: var(--tinta); cursor: pointer; transition: background-color .14s ease; }
.pj-valor[aria-expanded="true"], .pj-valor:focus-visible { outline: none; background: rgba(var(--f), .1); }
.pj-descricao { display: block; width: calc(100% + 16px); min-height: 44px; margin: -4px -8px 0; padding: 6px 8px; border: 0; border-radius: 6px; outline: 0; resize: none; overflow: hidden; font: inherit; font-size: 14.5px; line-height: 1.5; color: var(--tinta); background: none; transition: background-color .14s ease, box-shadow .14s ease; }
.pj-descricao:focus { background: rgba(var(--f), .07); box-shadow: inset 0 0 0 1px rgba(var(--f), .2); }
.pj-marca { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: -3px -5px -3px -4px; border-radius: 6px; cursor: pointer; }
.pj-marca i { display: block; }
.pj-marcas li .pj-marca i { margin-top: 0; }
.pj-marcas li > span { flex: 1; }
.pj-tira { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--tinta-3); opacity: 0; transition: opacity .14s ease, background-color .14s ease; }
.pj-marcas li:hover .pj-tira, .pj-tira:focus-visible, .pj-pessoa-linha .pj-tira { opacity: 1; }
.pj-sub-nova { display: flex; align-items: center; gap: 10px; height: 34px; margin-top: 2px; color: var(--tinta-3); }
.pj-sub-nova .ico { flex: none; width: 17px; }
.pj-sub-nova input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; font-size: 14.5px; color: var(--tinta); background: none; }
.pj-responder { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-top: 10px; }
.pj-responder textarea { width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; outline: 0; resize: none; font: inherit; font-size: 14.5px; line-height: 1.45; color: var(--tinta); background: rgba(var(--f), .08); }
.pj-responder textarea:focus { box-shadow: inset 0 0 0 1px rgba(var(--f), .24); }
.pj-voce > .botao { margin-top: 10px; }
.pj-folha-corpo { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--pj-folha-dir, 340px); }
.pj-folha-esq { min-height: 0; padding: 4px 22px 22px 18px; overflow-y: auto; overscroll-behavior: contain; }
.pj-folha-esq h2 { margin: 0 0 14px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.pj-folha-esq section { margin-top: 20px; }
.pj-folha h3 small { margin-left: 6px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.pj-voce { margin-bottom: 16px; padding: 12px 14px 14px; border-radius: 8px; color: var(--tinta); background: rgba(var(--f), .075); }
.pj-voce b { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--laranja-claro); }
.pj-voce.respondido b { color: var(--tinta-3); }
.pj-voce p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.pj-resposta { padding-top: 8px; margin-top: 8px !important; box-shadow: inset 0 1px 0 rgba(var(--f), .12); color: var(--tinta-2); }
.pj-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; margin: 0; }
.pj-campos > div { display: flex; align-items: center; gap: 12px; min-height: 34px; }
.pj-campos dt { flex: none; width: 96px; font-size: 13px; color: var(--tinta-3); }
.pj-campos dd { min-width: 0; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.pj-sem { color: var(--tinta-3); }
.pj-texto { margin: 0; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.pj-marcas, .pj-pontos { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pj-marcas li { display: flex; align-items: flex-start; gap: 10px; min-height: 30px; padding: 5px 0; font-size: 14.5px; }
.pj-marcas li i { flex: none; width: 17px; height: 17px; margin-top: 2px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px rgba(var(--f), .4); }
.pj-marcas li.feito i { box-shadow: none; background: #2f9e6e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.400' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.500 12.500 3.500 3.500 7.500-8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pj-marcas li.feito span { color: var(--tinta-3); text-decoration: line-through; }
.pj-marcas li span, .pj-pontos li { min-width: 0; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.pj-pontos li { position: relative; padding: 4px 0 4px 16px; font-size: 14.5px; }
.pj-pontos li::before { content: ""; position: absolute; left: 3px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--tinta-3); }
.pj-folha-dir { min-height: 0; display: flex; flex-direction: column; padding: 14px 0 0; background: var(--poco); }
.pj-folha-dir > h3 { flex: none; padding: 0 16px; }
.pj-atos { flex: 1; min-height: 0; padding: 0 16px 14px; overflow-y: auto; overscroll-behavior: contain; }
.pj-comentar { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; box-shadow: inset 0 1px 0 rgba(var(--f), .08); }
.pj-comentar textarea { flex: 1; min-width: 0; min-height: 34px; max-height: 160px; padding: 7px 10px; border: 0; border-radius: 8px; outline: 0; resize: none; font: inherit; font-size: 14px; line-height: 1.4; color: var(--tinta); background: rgba(var(--f), .08); }
.pj-comentar textarea:focus { box-shadow: inset 0 0 0 1px rgba(var(--f), .24); }
.pj-comentar .redondo { flex: none; }
.pj-ato { display: flex; gap: 10px; padding: 7px 0; }
.pj-ato > div { min-width: 0; flex: 1; }
.pj-ato p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--tinta-2); overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.pj-ato p:first-child { display: flex; align-items: baseline; gap: 8px; }
.pj-ato p:first-child b { font-size: 13px; font-weight: 600; color: var(--tinta); }
.pj-ato p:first-child span { font-size: 12px; color: var(--tinta-3); }
.pj-ato.fala > div { padding: 8px 10px; border-radius: 8px; background: rgba(var(--f), .07); }
.pj-ato.fala p:last-child { color: var(--tinta); }
.pj-datas { margin: 14px 0 0; font-size: 12px; color: var(--tinta-3); }

/* ---------------------------------------------------------------- formulários (projeto novo, cliente) */
.pj-form { display: flex; flex-direction: column; width: min(520px, 100%); max-height: 100%; border-radius: 10px; color: var(--tinta); background: var(--sup-folha); box-shadow: var(--brilho), 0 30px 70px -24px rgba(0, 0, 0, .8); overflow: hidden; animation: pj-folha .2s var(--ease-out); }
.pj-form > header { flex: none; display: flex; align-items: center; height: 52px; padding: 0 10px 0 18px; font-size: 16px; font-weight: 600; }
.pj-form > header span { flex: 1; }
.pj-form > header .redondo { width: 30px; height: 30px; border-radius: 7px; }
.pj-form-corpo { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 4px 18px 6px; overflow-y: auto; overscroll-behavior: contain; }
.pj-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pj-campo > span { font-size: 12.5px; font-weight: 500; color: var(--tinta-3); }
.pj-campo input, .pj-campo textarea, .pj-pessoa-linha input { width: 100%; min-width: 0; height: 36px; padding: 0 10px; border: 0; border-radius: 6px; outline: 0; font: inherit; font-size: 14.5px; color: var(--tinta); background: rgba(var(--f), .075); transition: background-color .16s ease, box-shadow .16s ease; }
.pj-campo textarea { height: auto; padding: 8px 10px; resize: none; line-height: 1.45; }
.pj-campo input:focus, .pj-campo textarea:focus, .pj-pessoa-linha input:focus { background: rgba(var(--f), .11); box-shadow: inset 0 0 0 1px rgba(var(--f), .26); }
.pj-campo input::placeholder, .pj-pessoa-linha input::placeholder { color: var(--tinta-3); opacity: 1; }
.pj-campo .segmento { align-self: flex-start; }
.pj-dupla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pj-dupla:has(.curto) { grid-template-columns: minmax(0, 1fr) 96px; }
.pj-logo-linha { display: flex; align-items: center; gap: 10px; }
.pj-pessoas-form { display: flex; flex-direction: column; gap: 6px; }
.pj-pessoa-linha { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 24px; gap: 6px; align-items: center; }
.pj-form-erro { margin: 0; font-size: 13.5px; color: var(--erro); }
.pj-aviso { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: rgba(var(--laranja-rgb), .14); }
.pj-aviso p { flex: 1; margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--tinta); }
.pj-aviso .botao { flex: none; }
.pj-etiqueta-linha { display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; gap: 10px; align-items: center; }
.pj-etiqueta-linha input { width: 100%; min-width: 0; height: 34px; padding: 0 10px; border: 0; border-radius: 6px; outline: 0; font: inherit; font-size: 14.5px; color: var(--tinta); background: rgba(var(--f), .075); }
.pj-etiqueta-linha input:focus { background: rgba(var(--f), .11); box-shadow: inset 0 0 0 1px rgba(var(--f), .26); }
.pj-etiqueta-linha .pj-tira { opacity: 1; }
.pj-cores { display: flex; gap: 4px; }
.pj-cor { width: 20px; height: 20px; border-radius: 50%; background: var(--cor); cursor: pointer; transition: transform .14s var(--ease-out), box-shadow .14s ease; }
.pj-cor.on { box-shadow: 0 0 0 2px var(--sup-folha), 0 0 0 3.5px var(--tinta); }
.pj-cor:active { transform: scale(.9); }
.pj-form > footer { flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 18px 16px; }

@media (hover: hover) and (pointer: fine) {
  .pj-novo:hover, .pj-mais:hover, .pj-tira:hover { color: var(--tinta); background: rgba(var(--f), .09); }
  .pj-valor:hover { background: rgba(var(--f), .08); }
  .pj-folha-esq h2[contenteditable]:hover:not(:focus), .pj-descricao:hover:not(:focus) { background: rgba(var(--f), .05); }
  .pj-item:not(.on):hover, .pj-linha:hover, .pj-ficha-proj:hover, .pj-depois:hover { background: rgba(var(--f), .07); }
  .pj-cartao:hover { background: rgba(var(--f), .13); }
  .pj-recolhe:hover { color: var(--tinta); background: rgba(var(--f), .1); }
  .pj-col.recolhida:hover { background: color-mix(in srgb, var(--cor, #8b93a1) 16%, transparent); }
  .pj-chip:hover { color: var(--tinta); background: rgba(var(--f), .15); }
  .pj-fases button:not(.on):hover { color: var(--tinta); background: rgba(var(--f), .07); }
  .pj-pessoas button:hover { opacity: 1; }
  .pj-abre:hover { color: var(--tinta); }
}
.pj :is(.pj-item, .pj-cli-nome, .pj-abre, .pj-cartao, .pj-linha, .pj-chip, .pj-ficha-proj, .pj-depois, .pj-fases button, .pj-pessoas button, .pj-novo, .pj-mais, .pj-marca, .pj-tira, .pj-estado-selo):focus-visible { outline: none; box-shadow: 0 0 0 1.5px rgba(var(--f), .5); }
.pj .redondo.so-computador, .pj .pj-recolhe.so-computador { display: inline-grid; }
/* no celular o botão redondo vira flex (.so-celular): o ícone continua no meio */
.pj .redondo { justify-content: center; }
.pj .segmento.so-computador { display: inline-flex; }

@media (max-width: 860px) {
  .pj, .pj.sem-lado { grid-template-columns: minmax(0, 1fr); }
  .pj .so-computador, .pj .redondo.so-computador, .pj .segmento.so-computador, .pj .pj-recolhe.so-computador { display: none; }
  .pj[data-vista="meio"] .pj-lado, .pj[data-vista="lado"] .pj-meio { display: none; }
  .pj.sem-lado[data-vista="lado"] .pj-lado { display: flex; }
  .pj-lado { padding: 2px 10px calc(8px + env(safe-area-inset-bottom)); }
  .pj-busca { height: 40px; }
  .pj-busca input, .pj-item { font-size: 16px; }
  .pj-item, .pj-cli-nome, .pj-abre { min-height: 44px; }
  .pj-abre { width: 36px; height: 44px; }
  .pj-filhos { padding-left: 20px; }
  .pj-meio, .pj.sem-lado .pj-meio { margin: 0 8px calc(8px + env(safe-area-inset-bottom)); }
  .pj-topo { flex-wrap: wrap; row-gap: 6px; }
  .pj-titulo { flex: 1; }
  .pj-topo > .espaco { display: none; }
  .pj-titulo h2 { font-size: 18px; }
  .pj-chip { display: none; }
  /* a escolha de onde a tarefa nova entra (Pessoal ou um projeto) continua à mão no telefone */
  .pj-nova-tarefa .pj-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; font-size: 14px; }
  /* o círculo da tarefa tem 38 px no telefone; o ponto do cartão fica no meio da primeira linha, e a segunda linha
     (selo, itens e prazo) começa onde começa o título */
  .pj-tarefas .pj-linha { padding-left: 54px; }
  .pj-tarefas .pj-linha .pj-ponto { left: 20.5px; top: 14px; }
  .pj-pessoas { display: none; }
  .pj-fases button { height: 36px; }
  .pj-colunas { flex: none; display: flex; gap: 4px; padding: 0 10px 8px; overflow-x: auto; scrollbar-width: none; }
  .pj-colunas::-webkit-scrollbar, .pj-fases::-webkit-scrollbar { display: none; }
  .pj-colunas button { flex: none; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--tinta-3); }
  .pj-colunas button.on { color: var(--tinta); background: rgba(var(--f), .13); }
  .pj-colunas small { font-size: 12px; color: var(--tinta-3); }
  .pj-quadro { overflow-x: hidden; }
  .pj-quadro .pj-col { display: none; flex: 1 1 auto; max-width: none; }
  .pj-quadro[data-coluna="afazer"] .pj-col[data-estado="afazer"], .pj-quadro[data-coluna="andamento"] .pj-col[data-estado="andamento"], .pj-quadro[data-coluna="testar"] .pj-col[data-estado="testar"],
  .pj-quadro[data-coluna="feito"] .pj-col[data-estado="feito"], .pj-quadro[data-coluna="pausado"] .pj-col[data-estado="pausado"], .pj-quadro .pj-col:not([data-estado]) { display: flex; }
  .pj-col > header { display: none; }
  .pj-col-rolo { padding-top: 8px; }
  .pj-cartao > b, .pj-linha > b { font-size: 15.5px; }
  .pj-linha { flex-wrap: wrap; min-height: 48px; }
  .pj-linha > b { flex-basis: calc(100% - 90px); white-space: normal; }
  .pj-linha .pj-tags, .pj-de { display: none; }
  .pj-depois { height: 40px; }
  .pj-ficha { grid-template-columns: minmax(0, 1fr); }
  .pj-bloco.largo { grid-column: auto; }
  .pj-fato { flex-direction: column; gap: 2px; }
  .pj-fato span:first-child { width: auto; }
  .pj-novo, .pj-sub-nova { height: 40px; font-size: 15px; }
  .pj-nova-linha { height: 48px; margin-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .pj-nova-linha input, .pj-novo-form textarea, .pj-sub-nova input, .pj-comentar textarea, .pj-responder textarea, .pj-descricao, .pj-campo input, .pj-campo textarea, .pj-pessoa-linha input { font-size: 16px; }
  .pj-mais, .pj-tira { width: 36px; height: 36px; opacity: 1; }
  .pj-marca { width: 36px; height: 36px; margin: -6px -8px -6px -8px; }
  .pj-valor { min-width: 44px; min-height: 38px; }
  button.pj-estado-selo { height: 36px; padding: 0 12px; }
  .pj-campo input, .pj-pessoa-linha input { height: 42px; }
  .pj-pessoa-linha { grid-template-columns: minmax(0, 1fr) 36px; }
  .pj-etiqueta-linha { grid-template-columns: minmax(0, 1fr) 36px; }
  .pj-etiqueta-linha .pj-cores { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; gap: 6px; }
  .pj-cor { width: 36px; height: 36px; }
  .pj-etiqueta-linha input { height: 42px; font-size: 16px; }
  .pj-aviso { flex-direction: column; align-items: stretch; }
  .pj-pessoa-linha input[name="p-nome"] { grid-column: 1; }
  .pj-pessoa-linha input[name="p-papel"], .pj-pessoa-linha input[name="p-telefone"] { grid-column: 1; }
  .pj-pessoa-linha .pj-tira { grid-column: 2; grid-row: 1; }
  .pj-form { width: 100%; height: 100%; border-radius: 0; }
  .pj-form > header .redondo { width: 38px; height: 38px; }
  .pj-form > footer { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .pj-folha-dir { display: block; padding-bottom: 0; }
  .pj-atos { overflow: visible; }
  .pj-comentar { position: sticky; bottom: 0; background: var(--sup-folha); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .pj-veu { padding: 0; }
  .pj-folha { width: 100%; height: 100%; border-radius: 0; }
  .pj-folha > header .redondo { width: 38px; height: 38px; }
  /* no telefone o topo do cartão não cabe numa linha (os botões de ir ao próximo e de fechar saíam da tela): os botões descem para
     uma segunda linha, encostados à direita */
  .pj-folha > header { flex-wrap: wrap; height: auto; min-height: 52px; padding: 8px 10px 8px 16px; row-gap: 8px; }
  .pj-folha > header .espaco + * { margin-left: auto; }
  .pj-folha-corpo { display: block; overflow-y: auto; }
  .pj-folha-esq, .pj-folha-dir { overflow: visible; }
  .pj-folha-esq { padding: 4px 16px 20px; }
  .pj-folha-dir { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .pj-campos { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .pj-vivo, .pj-fantasma, .pj-veu, .pj-folha { animation: none; } }
