﻿/* Leitura de projeto com IA (www.gransoftweb.com/Leitura-de-Projeto-Gratis)
   Complementa plano-corte-gratis.css: cabeçalho, hero, cartões, botões, tabelas e rodapé vêm de lá (classes pcg-).
   Aqui fica só o que é desta página (classes lpj-). */

/* ---------- Envio do arquivo ---------- */
.lpj-envio { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.lpj-envio__arq { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.lpj-envio__lado { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.lpj-solta {
    position: relative; border: 2px dashed #76899F; border-radius: 8px; background: #F7F7FA; min-height: 300px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px 20px;
    text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.lpj-solta:hover, .lpj-solta:focus-visible { border-color: #126F65; background: #F1F7F6; }
.lpj-solta:focus-visible { outline: 2px solid #126F65; outline-offset: 2px; }
.lpj-solta--sobre { border-color: #126F65; background: #E8F3F1; }
.lpj-solta--cheia { padding: 12px; cursor: default; border-style: solid; border-color: #D9DDE3; background: #FFFFFF; min-height: 0; }
.lpj-solta svg { color: #126F65; }
.lpj-solta b { font-size: 16px; line-height: 24px; font-weight: 600; }
.lpj-solta span { font-size: 13px; line-height: 20px; color: #4A5A70; max-width: 420px; }
.lpj-solta input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lpj-tipos { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.lpj-tipos i { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 8px; border-radius: 4px; background: #E8F3F1; color: #126F65; }

.lpj-previa { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.lpj-previa__img { background: #EEF1F5; border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lpj-previa__img canvas { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; }
.lpj-previa__barra { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; color: #4A5A70; }
.lpj-previa__barra b { color: #16233F; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lpj-previa__barra .pcg-btn { height: 36px; }
.lpj-pag { display: inline-flex; align-items: center; gap: 6px; }
.lpj-pag select { height: 36px; width: auto; }

.lpj-uso { background: #EEF1F5; border-radius: 4px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.lpj-uso small { font-size: 12px; line-height: 16px; font-weight: 500; color: #4A5A70; }
.lpj-uso b { font-size: 15px; line-height: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lpj-uso__trilho { height: 8px; border-radius: 4px; background: #D9DDE3; overflow: hidden; }
.lpj-uso__trilho i { display: block; height: 100%; background: #2FBF9B; border-radius: 4px; transition: width .3s; }

.lpj-promptbtn { justify-content: flex-start; height: auto; min-height: 56px; padding: 10px 14px; text-align: left; white-space: normal; }
.lpj-promptbtn > span { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.lpj-promptbtn small { font-size: 12px; line-height: 16px; font-weight: 400; color: #4A5A70; }
.lpj-selo { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; background: #FDF1D6; color: #8A5300; font-size: 11px; font-weight: 600; white-space: nowrap; }

.lpj-ler { height: 56px; font-size: 16px; width: 100%; }
.lpj-passos { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lpj-passos li { display: flex; gap: 10px; align-items: center; font-size: 13px; line-height: 20px; color: #76899F; }
.lpj-passos li i { flex: none; width: 18px; height: 18px; border-radius: 9px; border: 2px solid #B9C7D4; display: inline-block; }
.lpj-passos li.lpj-feito { color: #16233F; }
.lpj-passos li.lpj-feito i { border-color: #2FBF9B; background: #2FBF9B; }
.lpj-passos li.lpj-agora { color: #16233F; font-weight: 600; }
.lpj-passos li.lpj-agora i { border-color: #0D6EFD; border-top-color: transparent; animation: pcg-gira .8s linear infinite; }

/* ---------- Resultado ---------- */
.lpj-res { padding-bottom: 72px; display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 16px; }
.lpj-res:focus { outline: none; }
.lpj-res > .pcg-ponte { margin-top: 0; }
.lpj-res__cab { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
.lpj-res__cab h2 { font-size: 26px; line-height: 34px; font-weight: 700; flex: 1 1 auto; }
.lpj-res__cab span { font-size: 13px; color: #4A5A70; }

.lpj-alertas { background: #FDF1D6; border-radius: 8px; padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.lpj-alertas b { font-size: 15px; font-weight: 600; color: #8A5300; display: flex; align-items: center; gap: 8px; }
.lpj-alertas ul { margin: 0; padding-left: 20px; font-size: 13px; line-height: 21px; color: #16233F; }
.lpj-ok { background: #E8F3F1; color: #126F65; border-radius: 8px; padding: 12px 16px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }

.lpj-vis { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.lpj-vis__3d { flex: 999 1 560px; min-width: 0; }
.lpj-vis__des { flex: 1 1 340px; min-width: 0; }
.lpj-3d { position: relative; height: 480px; border-radius: 4px; overflow: hidden; background: linear-gradient(#EAF0F6, #D6DEE8); touch-action: none; }
.lpj-3d canvas { display: block; width: 100% !important; height: 100% !important; outline: none; }
.lpj-3d__aviso { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; font-size: 13px; line-height: 20px; color: #4A5A70; }
.lpj-3d__dica { position: absolute; left: 12px; bottom: 10px; font-size: 11px; font-weight: 500; color: #4A5A70; background: rgba(255,255,255,.78); padding: 3px 8px; border-radius: 4px; pointer-events: none; }
.lpj-3d__rot { position: absolute; top: 10px; left: 12px; font-size: 12px; font-weight: 600; color: #16233F; background: rgba(255,255,255,.9); padding: 4px 10px; border-radius: 4px; pointer-events: none; max-width: calc(100% - 24px); }
.lpj-3dbarra { display: flex; flex-wrap: wrap; gap: 8px; }
.lpj-3dbarra .pcg-btn { height: 36px; padding: 0 12px; font-size: 12px; }
.lpj-desenho { background: #EEF1F5; border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lpj-desenho img { display: block; max-width: 100%; max-height: 480px; }

.lpj-dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; font-size: 13px; line-height: 20px; }
.lpj-dados div small { display: block; font-size: 12px; font-weight: 500; color: #4A5A70; }
.lpj-dados div b { font-weight: 600; word-break: break-word; }

.lpj-item__cab { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.lpj-item__cab h3 { font-size: 17px; line-height: 24px; font-weight: 600; }
.lpj-item__cab span { font-size: 13px; color: #4A5A70; }
.lpj-item__obs { font-size: 13px; line-height: 20px; color: #4A5A70; }
.lpj-sub { font-size: 12px; font-weight: 600; color: #126F65; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.pcg-lista tr.lpj-linha { cursor: pointer; transition: background-color .12s; }
.pcg-lista tr.lpj-linha:hover, .pcg-lista tr.lpj-linha--ativa { background: #E8F3F1; }
.pcg-lista td small { display: block; font-size: 12px; line-height: 17px; color: #5A6C82; }
.lpj-conf { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lpj-conf i { width: 7px; height: 7px; border-radius: 4px; background: currentColor; display: inline-block; }
.lpj-conf--alta { color: #126F65; }
.lpj-conf--media { color: #8A5300; }
.lpj-conf--baixa { color: #B93245; }
.lpj-falta { color: #B93245; font-weight: 600; }

.lpj-json summary { cursor: pointer; font-size: 14px; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 10px; list-style: none; }
.lpj-json summary::-webkit-details-marker { display: none; }
.lpj-json summary svg { transition: transform .2s; flex: none; color: #126F65; }
.lpj-json[open] summary svg { transform: rotate(45deg); }
.lpj-json pre { margin: 8px 0 0; max-height: 420px; overflow: auto; background: #16233F; color: #D6E2F0; border-radius: 4px; padding: 14px 16px; font: 400 12px/18px Consolas, "SFMono-Regular", Menlo, monospace; white-space: pre-wrap; word-break: break-word; }

/* ---------- Janelas (prompt e cadastro) ---------- */
.lpj-fundo { position: fixed; inset: 0; z-index: 1000; background: rgba(22,35,63,.62); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lpj-janela { background: #FFFFFF; border-radius: 8px; box-shadow: 0 24px 64px -12px rgba(22,35,63,.5); width: 100%; max-width: 860px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.lpj-janela--p { max-width: 460px; }
.lpj-janela__cab { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 12px; }
.lpj-janela__cab h2 { flex: 1 1 auto; font-size: 20px; line-height: 28px; font-weight: 600; }
.lpj-janela__corpo { padding: 0 24px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.lpj-janela__corpo p { font-size: 13px; line-height: 20px; color: #4A5A70; }
.lpj-janela__pe { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 24px 20px; border-top: 1px solid #EEF1F5; }
.lpj-janela__pe .lpj-vao { flex: 1 1 auto; }
.pcg textarea.lpj-prompt { min-height: 340px; height: 46vh; font: 400 13px/20px Consolas, "SFMono-Regular", Menlo, monospace; resize: vertical; white-space: pre-wrap; }
.lpj-conta { font-size: 12px; color: #5A6C82; font-variant-numeric: tabular-nums; }
.lpj-conta--erro { color: #B93245; font-weight: 600; }
.lpj-nota { background: #F1F7F6; border-left: 3px solid #2FBF9B; border-radius: 0 4px 4px 0; padding: 10px 14px; font-size: 13px; line-height: 20px; color: #16233F; }
.lpj-nota b { font-weight: 600; }

@media (max-width: 760px) {
    /* Os dois botões do rodapé não cabem lado a lado no celular e empurravam a página para o lado. */
    .pcg-rodape__acoes { flex: 1 1 100%; }
    .lpj-3d { height: 360px; }
    .lpj-janela__cab { padding: 16px 16px 8px; }
    .lpj-janela__corpo { padding: 0 16px 8px; }
    .lpj-janela__pe { padding: 12px 16px 16px; }
    .lpj-janela__pe .pcg-btn { flex: 1 1 140px; }
    .lpj-res__cab h2 { font-size: 22px; line-height: 30px; }
}

@media print {
    #lpj-entrada, .lpj-3dbarra, .lpj-json, .lpj-3d__dica { display: none !important; }
    .lpj-res { padding-bottom: 0; gap: 12px; }
    .lpj-3d { height: 300px; }
}
