/* Solar BESS · RS Engenharia — visual tecnológico. Tema escuro (padrão) e claro, tudo por variáveis.
   Cores dos gráficos validadas com o validador do dataviz nos dois fundos. */
:root, :root[data-tema="claro"] {
  color-scheme: light;
  --fundo: #eef1f4; --fundo-2: #e3e8ed; --superficie: #fbfcfd; --superficie-2: #f2f5f8; --campo: #ffffff;
  --borda: #dfe5eb; --borda-forte: #c6d0da;
  --texto: #0d1620; --texto-2: #4a5866; --texto-3: #7a8794;
  --acento: #12a150; --acento-2: #0c7d3d; --acento-claro: rgba(18, 161, 80, .1); --acento-txt: #0b7a3b; --brilho: rgba(18, 161, 80, .18);
  --weg: #1f63b8; --weg-claro: rgba(31, 99, 184, .1);
  --aviso: rgba(214, 150, 0, .1); --aviso-borda: rgba(214, 150, 0, .45); --aviso-txt: #8a5a00;
  --erro: rgba(204, 51, 51, .08); --erro-borda: rgba(204, 51, 51, .4); --erro-txt: #b02727;
  --ok: rgba(18, 161, 80, .08); --ok-borda: rgba(18, 161, 80, .35);
  --sombra: 0 1px 2px rgba(13, 22, 32, .06), 0 6px 20px rgba(13, 22, 32, .05);
  --topo: linear-gradient(100deg, #081320 0%, #0d2236 55%, #0f3a2c 100%);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --grade: #e6ebf0; --eixo: #b5c0cb; --faixa: #eef2f5;
  --doc-fundo: #d6dce2;
  --raio: 12px;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
:root[data-tema="escuro"] {
  color-scheme: dark;
  --fundo: #070e16; --fundo-2: #0b1520; --superficie: #0f1b27; --superficie-2: #142231; --campo: #0b1520;
  --borda: #1c2d3f; --borda-forte: #2a3f55;
  --texto: #e6edf3; --texto-2: #a3b3c3; --texto-3: #6f8295;
  --acento: #2fd17a; --acento-2: #22b366; --acento-claro: rgba(47, 209, 122, .12); --acento-txt: #5fe3a0; --brilho: rgba(47, 209, 122, .25);
  --weg: #5b9cf0; --weg-claro: rgba(91, 156, 240, .14);
  --aviso: rgba(240, 180, 40, .1); --aviso-borda: rgba(240, 180, 40, .38); --aviso-txt: #f2c45a;
  --erro: rgba(240, 90, 90, .1); --erro-borda: rgba(240, 90, 90, .42); --erro-txt: #ff8a8a;
  --ok: rgba(47, 209, 122, .08); --ok-borda: rgba(47, 209, 122, .32);
  --sombra: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .35);
  --topo: linear-gradient(100deg, #04090f 0%, #081a2b 55%, #0a2a20 100%);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --grade: #172739; --eixo: #2e445b; --faixa: #16283b;
  --doc-fundo: #050b12;
}
* { box-sizing: border-box; }
html { background: var(--fundo); color: var(--texto); }
body { margin: 0; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; background:
  radial-gradient(1200px 500px at 85% -10%, var(--brilho), transparent 60%), var(--fundo); min-height: 100vh; }
h1 { font-size: 1.6rem; margin: 0 0 .3rem; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 1.05rem; margin: 0 0 .55rem; letter-spacing: -.01em; font-weight: 650; }
h3 { font-size: .98rem; margin: 1rem 0 .3rem; }
a { color: var(--acento-txt); }
.suave { color: var(--texto-2); }
.fina { font-size: .92rem; }
.ico { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }

/* topo */
.barra-topo { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1.1rem;
  background: var(--topo); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.marca { display: flex; gap: .7rem; align-items: center; color: #fff; text-decoration: none; }
.marca .logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #2fd17a, #1b8f52); box-shadow: 0 0 18px rgba(47, 209, 122, .45); }
.marca .logo svg { width: 20px; height: 20px; }
.marca b { display: block; font-size: 1.05rem; letter-spacing: .01em; }
.marca small { display: block; opacity: .7; font-size: .74rem; }
.topo-acoes { display: flex; align-items: center; gap: .5rem; }
.versao { font-size: .72rem; opacity: .75; border: 1px solid rgba(255, 255, 255, .25); border-radius: 99px; padding: .12rem .6rem; letter-spacing: .04em; }
.tema-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; }
.tema-btn:hover { background: rgba(255, 255, 255, .14); }
.tema-btn svg { width: 18px; height: 18px; }

/* estrutura */
.corpo { display: flex; max-width: 1360px; margin: 0 auto; }
#lateral { display: none; }
body.com-lateral #lateral { display: block; width: 252px; flex: none; padding: 1.1rem .8rem; position: sticky; top: 58px; align-self: flex-start; max-height: calc(100vh - 58px); overflow: auto; }
main { flex: 1; min-width: 0; padding: 1.4rem 1.3rem 4rem; animation: entrar .25s ease; }
@keyframes entrar { from { opacity: .85; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.voltar { display: inline-flex; gap: .35rem; align-items: center; font-size: .88rem; margin-bottom: .9rem; text-decoration: none; color: var(--texto-2); }
.voltar:hover { color: var(--acento-txt); }
.lat-cli { margin-bottom: .9rem; padding: .7rem .75rem; border: 1px solid var(--borda); border-radius: 10px; background: var(--superficie); }
.lat-cli b { display: block; font-size: .95rem; } .lat-cli span { font-size: .8rem; color: var(--texto-2); }
nav .passo { position: relative; display: flex; align-items: center; gap: .6rem; padding: .48rem .55rem; border-radius: 9px; text-decoration: none; color: var(--texto-2); font-size: .92rem; transition: background .15s, color .15s; }
nav .passo em { font-style: normal; width: 1.6rem; height: 1.6rem; border-radius: 8px; display: grid; place-items: center; font-size: .76rem; font-weight: 700; background: var(--superficie-2); border: 1px solid var(--borda); color: var(--texto-2); flex: none; }
nav .passo small { margin-left: auto; color: var(--texto-3); font-size: .72rem; font-variant-numeric: tabular-nums; }
nav a.passo:hover { background: var(--superficie-2); color: var(--texto); }
nav .passo.atual { background: var(--acento-claro); color: var(--texto); font-weight: 600; }
nav .passo.atual::before { content: ""; position: absolute; left: -.8rem; top: 20%; bottom: 20%; width: 3px; border-radius: 3px; background: var(--acento); box-shadow: 0 0 10px var(--acento); }
nav .passo.atual em { background: var(--acento); border-color: var(--acento); color: #04120a; }
nav .passo.feito em { background: var(--acento-claro); border-color: var(--ok-borda); color: var(--acento-txt); }
nav .passo.futuro { color: var(--texto-3); cursor: default; }
.salvo { margin-top: 1rem; font-size: .74rem; color: var(--texto-3); transition: color .3s; display: flex; align-items: center; gap: .35rem; }
.salvo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--texto-3); }
.salvo.ok { color: var(--acento-txt); } .salvo.ok::before { background: var(--acento); box-shadow: 0 0 8px var(--acento); }

/* blocos */
.topo-tela { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.secao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.05rem 1.15rem; margin: 0 0 1rem; box-shadow: var(--sombra); }
.sec-topo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.caixa { border: 1px solid var(--borda); background: var(--superficie-2); border-radius: 10px; padding: .75rem .95rem; margin: .7rem 0; }
.caixa.ok { background: var(--ok); border-color: var(--ok-borda); }
.caixa.aviso { background: var(--aviso); border-color: var(--aviso-borda); }
.caixa.erro { background: var(--erro); border-color: var(--erro-borda); }
.caixa ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.vazio { text-align: center; padding: 2.6rem 1rem; background: var(--superficie); border: 1px dashed var(--borda-forte); border-radius: var(--raio); }

/* botões e campos */
.btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--borda-forte); background: var(--superficie-2); color: var(--texto); border-radius: 9px; padding: .5rem .95rem; font: inherit; font-size: .92rem; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.btn:hover { border-color: var(--acento); }
.btn.pri { background: linear-gradient(135deg, var(--acento), var(--acento-2)); border-color: transparent; color: #04120a; font-weight: 650; box-shadow: 0 4px 16px var(--brilho); }
.btn.pri:hover { box-shadow: 0 6px 22px var(--brilho); filter: brightness(1.05); }
.btn.perigo { color: var(--erro-txt); }
.btn[disabled], .btn.futuro { opacity: .45; cursor: not-allowed; }
.btn.mini { padding: .25rem .6rem; font-size: .8rem; border-radius: 7px; }
.link { background: none; border: 0; padding: 0; color: var(--acento-txt); text-decoration: underline; font: inherit; cursor: pointer; }
.linha-btns { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.rodape-tela { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.3rem; }
.grade-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .85rem 1rem; }
.grade-campos.estreita { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); margin: .6rem 0; }
.campo { display: flex; flex-direction: column; gap: .28rem; }
.campo.cheio { grid-column: 1 / -1; }
.campo label, .campo .lbl { font-size: .8rem; color: var(--texto-2); font-weight: 550; letter-spacing: .01em; }
.campo input, .campo select, .campo textarea, .tab input, .tab select, .mini-campo select { font: inherit; color: var(--texto); background: var(--campo); border: 1px solid var(--borda-forte); border-radius: 8px; }
.campo input, .campo select, .campo textarea { padding: .52rem .65rem; width: 100%; min-width: 0; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .tab input:focus, .tab select:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-claro); }
.com-un { display: flex; align-items: center; }
.com-un input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.com-un .un { padding: .52rem .6rem; border: 1px solid var(--borda-forte); border-left: 0; border-radius: 0 8px 8px 0; background: var(--superficie-2); color: var(--texto-3); font-size: .82rem; white-space: nowrap; }
.ajuda { color: var(--texto-3); font-size: .76rem; }
.ess { color: var(--acento); font-style: normal; font-size: .66rem; vertical-align: 2px; }
.simnao { display: flex; } .simnao button { flex: 1; padding: .52rem; font: inherit; color: var(--texto-2); border: 1px solid var(--borda-forte); background: var(--campo); cursor: pointer; }
.simnao button:first-child { border-radius: 8px 0 0 8px; } .simnao button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.simnao button.sel { background: var(--acento); color: #04120a; border-color: var(--acento); font-weight: 650; }

/* escolhas grandes */
.opcoes-grandes { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: .65rem; }
.op-g { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; text-align: left; padding: .9rem; border: 1px solid var(--borda-forte); border-radius: var(--raio); background: var(--superficie-2); color: var(--texto); cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.op-g:hover { border-color: var(--acento); transform: translateY(-1px); }
.op-g .ico { width: 28px; height: 28px; color: var(--acento-txt); }
.op-g small { color: var(--texto-2); font-size: .78rem; }
.op-g.sel { border-color: var(--acento); background: var(--acento-claro); box-shadow: 0 0 0 1px var(--acento), 0 6px 20px var(--brilho); }
.objetivos { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: .65rem; }
.obj { border: 1px solid var(--borda-forte); border-radius: var(--raio); padding: .7rem .85rem; background: var(--superficie-2); display: flex; flex-direction: column; gap: .3rem; transition: border-color .15s; }
.obj label { display: flex; gap: .55rem; align-items: center; cursor: pointer; } .obj input { width: 1.1rem; height: 1.1rem; accent-color: var(--acento); }
.obj small { color: var(--texto-2); font-size: .8rem; }
.obj.sel { border-color: var(--acento); background: var(--acento-claro); }
.estrela { align-self: flex-start; border: 1px solid var(--borda-forte); background: var(--campo); border-radius: 99px; padding: .15rem .65rem; font-size: .76rem; cursor: pointer; color: var(--texto-2); }
.estrela.on { background: rgba(240, 180, 40, .16); border-color: rgba(240, 180, 40, .6); color: var(--aviso-txt); font-weight: 650; }

.medidor { min-width: 210px; text-align: right; font-size: .84rem; color: var(--texto-2); }
.barra { height: 8px; background: var(--superficie-2); border: 1px solid var(--borda); border-radius: 99px; overflow: hidden; margin-bottom: .35rem; }
.barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--acento-2), var(--acento)); border-radius: 99px; box-shadow: 0 0 10px var(--brilho); }

.cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.cartao { display: flex; gap: .85rem; padding: 1rem; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); text-decoration: none; color: var(--texto); box-shadow: var(--sombra); transition: border-color .15s, transform .15s; }
.cartao:hover { border-color: var(--acento); transform: translateY(-2px); }
.c-ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--acento-claro); color: var(--acento-txt); flex: none; }
.c-ic .ico { width: 24px; height: 24px; }
.c-tx { display: flex; flex-direction: column; gap: .22rem; min-width: 0; }
.c-tx span { color: var(--texto-2); font-size: .86rem; } .c-tx small { color: var(--texto-3); font-size: .76rem; }
.chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.chip { font-style: normal; font-size: .7rem; background: var(--superficie-2); border: 1px solid var(--borda); border-radius: 99px; padding: .08rem .5rem; color: var(--texto-2); }
.chip.pri { background: var(--acento-claro); border-color: var(--ok-borda); color: var(--acento-txt); font-weight: 650; }

.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.foto { display: flex; flex-direction: column; gap: .2rem; border: 1px dashed var(--borda-forte); border-radius: var(--raio); padding: .65rem; cursor: pointer; background: var(--superficie-2); }
.foto:hover { border-color: var(--acento); }
.f-mini { display: flex; gap: 3px; height: 48px; align-items: center; color: var(--texto-3); }
.f-mini img { height: 48px; width: 48px; object-fit: cover; border-radius: 6px; }
.foto b { font-size: .84rem; } .foto small { color: var(--texto-3); font-size: .74rem; }
.soltar { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 1.8rem 1rem; border: 2px dashed var(--borda-forte); border-radius: var(--raio); background: var(--superficie-2); cursor: pointer; text-align: center; margin: .6rem 0; transition: border-color .15s, background .15s; }
.soltar .ico { width: 30px; height: 30px; color: var(--acento-txt); }
.soltar:hover, .soltar.sobre { border-color: var(--acento); background: var(--acento-claro); }
.soltar span { color: var(--texto-3); font-size: .84rem; }

/* tabelas */
.tabela-rolar { overflow-x: auto; }
.tab { border-collapse: collapse; width: 100%; font-size: .87rem; font-variant-numeric: tabular-nums; }
.tab th, .tab td { padding: .45rem .6rem; border-bottom: 1px solid var(--borda); text-align: left; white-space: nowrap; }
.tab th { color: var(--texto-3); font-weight: 650; background: var(--superficie-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.tab tbody tr:hover td { background: var(--superficie-2); }
.tab.mapa tr.usada td:first-child { font-weight: 650; color: var(--acento-txt); }
.tab.mapa select { padding: .3rem; max-width: 260px; }
.tab .amostra { color: var(--texto-3); max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.tab.conta input { width: 5.2rem; padding: .3rem; text-align: right; }

/* indicadores */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.kpi { position: relative; overflow: hidden; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: .8rem .9rem; box-shadow: var(--sombra); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--acento), transparent); opacity: .8; }
.kpi span { display: block; font-size: .74rem; color: var(--texto-3); text-transform: uppercase; letter-spacing: .05em; }
.kpi b { display: block; font-size: 1.55rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: .15rem; }
.kpi b small { font-size: .78rem; font-weight: 500; color: var(--texto-2); }
.kpi em { display: block; font-style: normal; font-size: .74rem; color: var(--texto-3); }
.diag { margin: 0; padding-left: 1.1rem; } .diag li { margin: .28rem 0; }
.lim { display: flex; align-items: center; gap: .55rem; font-size: .86rem; color: var(--texto-2); }
.lim input { accent-color: var(--acento); width: 180px; } .lim b { color: var(--texto); min-width: 5rem; }

/* gráficos */
.grafico { position: relative; margin-top: .4rem; touch-action: pan-y; }
.grafico svg { display: block; width: 100%; height: auto; overflow: visible; }
.grafico .grade { stroke: var(--grade); stroke-width: 1; }
.grafico .eixo { stroke: var(--eixo); stroke-width: 1; }
.grafico .rot { fill: var(--texto-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.grafico .faixa { fill: var(--faixa); }
.grafico .limite { stroke: var(--texto-2); stroke-width: 1.5; stroke-dasharray: 6 4; }
.grafico .cruz { stroke: var(--texto-3); stroke-width: 1; }
.legenda { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--texto-2); margin-bottom: .2rem; }
.legenda span { display: inline-flex; align-items: center; gap: .35rem; }
.legenda i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; }
.dica { position: absolute; z-index: 5; pointer-events: none; background: var(--superficie-2); color: var(--texto); border: 1px solid var(--borda-forte); border-radius: 9px; padding: .45rem .6rem; font-size: .8rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); white-space: nowrap; }
.dica-t { font-weight: 650; margin-bottom: .15rem; }
.dica i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .3rem; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--superficie-2); color: var(--texto); border: 1px solid var(--ok-borda); padding: .65rem 1.1rem; border-radius: 10px; z-index: 50; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.toast.erro { border-color: var(--erro-borda); color: var(--erro-txt); }

/* etapa 2 */
.tab.cargas input { padding: .3rem .45rem; } .tab.cargas input.nome { width: 11rem; } .tab.cargas input.n { width: 4.2rem; text-align: right; }
.tab.cargas select { padding: .3rem; }
.tab.cargas input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--acento); }
.tab.cargas .com-un .un { padding: .3rem .4rem; }
.tab.cargas tr.critica td:first-child { box-shadow: inset 3px 0 0 var(--acento); }
.tab .calc { color: var(--texto-2); }
.tab tr.atual td { background: var(--acento-claro); }
.tab tfoot th { background: var(--superficie-2); color: var(--texto); text-transform: none; letter-spacing: 0; font-size: .86rem; }
.quebra { white-space: normal !important; min-width: 220px; }
.falta { color: var(--aviso-txt); }
.opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.opcao { position: relative; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1rem; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: .5rem; }
.opcao.escolhida { border-color: var(--acento); box-shadow: 0 0 0 1px var(--acento), 0 10px 30px var(--brilho); }
.opcao.com-falha { border-color: var(--erro-borda); }
.op-topo { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; } .op-topo h3 { margin: 0; flex: 1; font-size: 1.05rem; }
.op-preco { font-size: 1.5rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; } .op-preco small { font-size: .78rem; font-weight: 400; color: var(--texto-2); }
.mini-campo { display: flex; flex-direction: column; font-size: .76rem; color: var(--texto-3); gap: .15rem; }
.mini-campo select { font-size: .85rem; padding: .32rem; }
.op-itens, .confs { margin: 0; padding-left: 1rem; font-size: .85rem; } .op-itens li, .confs li { margin: .18rem 0; }
.confs { list-style: none; padding-left: 0; font-size: .79rem; border-top: 1px solid var(--borda); padding-top: .45rem; }
.confs .ok { color: var(--acento-txt); } .confs .nao { color: var(--erro-txt); font-weight: 650; }
.mini-n { font-size: .74rem; color: var(--texto-3); white-space: nowrap; } .mini-n input { width: 3.4rem; font: inherit; font-size: .8rem; padding: .1rem .3rem; color: var(--texto); background: var(--campo); border: 1px solid var(--borda-forte); border-radius: 6px; }
.memoria { margin: 0; padding-left: 1.3rem; font-size: .9rem; } .memoria li { margin: .32rem 0; }
.tab.cat input.preco { width: 6.5rem; text-align: right; padding: .3rem; border-left: 0; border-radius: 0 6px 6px 0; }
.tab.cat .com-un .un { border-radius: 6px 0 0 6px; border-left: 1px solid var(--borda-forte); border-right: 0; padding: .3rem .4rem; }

/* painel do projeto */
.painel-topo { display: grid; grid-template-columns: minmax(230px, 300px) 1fr; gap: 1rem; margin-bottom: 1rem; }
.anel-caixa { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; text-align: center; }
.anel { position: relative; width: 170px; height: 170px; }
.anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anel .fundo-anel { stroke: var(--superficie-2); } .anel .valor-anel { stroke: var(--acento); filter: drop-shadow(0 0 6px var(--brilho)); transition: stroke-dashoffset .8s ease; }
.anel-centro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.anel-centro b { font-size: 2rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; } .anel-centro span { font-size: .74rem; color: var(--texto-3); text-transform: uppercase; letter-spacing: .05em; }
.etapas-status { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.etapa-s { display: flex; gap: .55rem; align-items: center; padding: .55rem .65rem; border: 1px solid var(--borda); border-radius: 10px; background: var(--superficie-2); text-decoration: none; color: var(--texto); font-size: .86rem; }
.etapa-s:hover { border-color: var(--acento); }
.etapa-s .pt { width: 9px; height: 9px; border-radius: 50%; background: var(--texto-3); flex: none; }
.etapa-s.ok .pt { background: var(--acento); box-shadow: 0 0 8px var(--acento); } .etapa-s.pend .pt { background: #e0a320; }
.etapa-s small { margin-left: auto; color: var(--texto-3); font-size: .74rem; }

@media (max-width: 820px) {
  .corpo { flex-direction: column; }
  body.com-lateral #lateral { width: auto; min-width: 0; max-width: 100vw; position: static; max-height: none; padding: .6rem .8rem 0; }
  nav { display: flex; overflow-x: auto; gap: .2rem; padding-bottom: .4rem; }
  nav .passo { flex: none; white-space: nowrap; } nav .passo.atual::before { display: none; }
  nav .passo small { margin-left: .2rem; }
  .salvo, .lat-cli span { display: none; }
  main { padding: .9rem .8rem 4rem; }
  .lim input { width: 120px; }
  .painel-topo { grid-template-columns: 1fr; }
  .marca small { display: none; }
}
@media (prefers-reduced-motion: reduce) { main { animation: none; } * { transition: none !important; } }

/* etapa 3: financeiro e documentos */
.tab .r, .doc-tab .r { text-align: right; }
.doc-barra { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.resumo { white-space: pre-wrap; font: inherit; font-size: .88rem; margin: .5rem 0 0; }
.doc-area { overflow-x: auto; background: var(--doc-fundo); border-radius: var(--raio); padding: 14px 0; }
.doc { --verde: #2e9b3a; color: #1a1a1a; font-size: 10.5pt; line-height: 1.45; }
.folha { width: 210mm; min-height: 297mm; margin: 0 auto 14px; background: #fff; padding: 14mm 16mm 20mm; position: relative; box-shadow: 0 2px 10px rgba(0,0,0,.15); overflow: hidden; }
.folha h2 { font-size: 15pt; color: #0f2a3d; margin: 6mm 0 2.5mm; border-left: 4px solid var(--verde); padding-left: 3mm; }
.folha h3 { font-size: 11.5pt; margin: 0 0 1mm; color: #0f2a3d; }
.folha .lead { font-size: 12pt; color: #333; }
.doc-cab { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e2e1dc; padding-bottom: 3mm; margin-bottom: 2mm; }
.doc-cab img { height: 9mm; } .doc-cab span { font-size: 8.5pt; color: #7a7974; }
.doc-rod { position: absolute; left: 16mm; right: 16mm; bottom: 8mm; display: flex; justify-content: space-between; font-size: 8pt; color: #7a7974; border-top: 1px solid #e2e1dc; padding-top: 2mm; }
.capa { padding: 0; display: flex; flex-direction: column; }
.capa-foto { height: 170mm; background: linear-gradient(135deg, #0f2a3d, #0e7c66) center / cover no-repeat; position: relative; }
.capa-veu { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(5,20,30,.78)); }
.capa-tit { position: absolute; left: 16mm; right: 16mm; bottom: 14mm; color: #fff; }
.capa-tit small { font-size: 11pt; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.capa-tit h1 { font-size: 28pt; margin: 2mm 0 0; line-height: 1.1; color: #fff; }
.capa-baixo { flex: 1; padding: 12mm 16mm 10mm; display: flex; flex-direction: column; gap: 6mm; }
.capa-logo { height: 15mm; align-self: flex-start; }
.capa-baixo dl { display: grid; grid-template-columns: 32mm 1fr; gap: 2.5mm 4mm; margin: 0; font-size: 11.5pt; }
.capa-baixo dt { color: #7a7974; } .capa-baixo dd { margin: 0; font-weight: 600; }
.capa-frase { margin-top: auto; color: var(--verde); font-style: italic; font-size: 10pt; }
.doc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; margin: 3mm 0; }
.doc-kpis > div { border: 1px solid #e2e1dc; border-radius: 3mm; padding: 3mm; background: #f7faf6; }
.doc-kpis b { display: block; font-size: 14pt; color: #0f2a3d; } .doc-kpis span { font-size: 8.5pt; color: #52514e; }
.doc-graf { margin: 2mm 0; } .doc-graf .legenda { font-size: 8.5pt; }
.doc-lista { margin: 2mm 0; padding-left: 5mm; } .doc-lista li { margin: 1mm 0; }
.doc-benef { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.doc-benef > div { border: 1px solid #e2e1dc; border-top: 3px solid var(--verde); border-radius: 2mm; padding: 3mm 4mm; }
.doc-benef p { margin: 0; }
.doc-diag { border: 1px solid #e2e1dc; border-radius: 3mm; padding: 3mm; }
.doc-tab { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin: 2mm 0; }
.doc-tab th, .doc-tab td { border-bottom: 1px solid #e2e1dc; padding: 1.8mm 2mm; text-align: left; vertical-align: top; }
.doc-tab th { background: #f2f4ef; color: #0f2a3d; } .doc-tab tfoot th { font-size: 11pt; }
.doc-tab tr.rec td { background: #eef7ec; } .doc-tab small { color: #7a7974; }
.folha .nota { font-size: 8.5pt; color: #7a7974; }
.folha .destaque { font-size: 11.5pt; font-weight: 600; color: #0f2a3d; background: #f2f7f0; border-radius: 2mm; padding: 3mm 4mm; }
.folha .sobre { font-size: 9.5pt; color: #52514e; margin-top: 6mm; }
.aceite { display: grid; grid-template-columns: 1fr 1fr; gap: 14mm; margin-top: 16mm; font-size: 9.5pt; text-align: center; color: #52514e; }
.aceite span { display: block; border-top: 1px solid #52514e; margin-bottom: 1.5mm; }
.memorial { font-size: 9.5pt; }
.folha.memorial { min-height: 0; overflow: visible; page: memorial; }
.folha.memorial .doc-rod { position: static; margin-top: 8mm; } .memorial h2 { font-size: 12pt; margin-top: 5mm; } .mem-tit { font-size: 17pt; color: #0f2a3d; margin: 3mm 0 1mm; }
@media print {
  @page { size: A4; margin: 0; }
  @page memorial { size: A4; margin: 14mm 0 14mm; }
  html, body { background: #fff !important; }
  .folha.memorial { padding-top: 0; padding-bottom: 0; }
  .barra-topo, #lateral, .doc-barra, details.caixa, .toast { display: none !important; }
  main { padding: 0 !important; } .corpo { display: block; max-width: none; }
  .doc-area { background: none; padding: 0; overflow: visible; border-radius: 0; }
  .doc { zoom: 1 !important; }
  .folha { margin: 0; box-shadow: none; break-after: page; page-break-after: always; }
  .doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* conferência */
.conferencia .conf-lista { list-style: none; margin: 0; padding: 0; }
.conf-lista li { color: var(--texto); display: flex; gap: .5rem; align-items: baseline; padding: .4rem .2rem; border-bottom: 1px solid var(--borda); font-size: .9rem; flex-wrap: wrap; }
.conf-lista li span { flex: none; width: 1.2rem; height: 1.2rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 700; color: #fff; }
.conf-lista li.erro span { background: #c23b3b; } .conf-lista li.aviso span { background: #c98500; }
.conf-lista li a { margin-left: auto; font-size: .82rem; white-space: nowrap; }
nav .passo small.pend { color: var(--erro-txt); font-weight: 700; }
.doc.rascunho .folha::after { content: "RASCUNHO"; position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%) rotate(-30deg); font-size: 80pt; font-weight: 800; color: rgba(194, 59, 59, .13); pointer-events: none; letter-spacing: .1em; }

.chip.weg { background: var(--weg-claro); border-color: var(--weg); color: var(--weg); font-weight: 750; letter-spacing: .04em; }

/* a proposta e o memorial são sempre claros, em qualquer tema da tela */
.doc { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --grade: #e6ebf0; --eixo: #b5c0cb; --faixa: #eef2f5; --texto: #0d1620; --texto-2: #4a5866; --texto-3: #7a8794; --superficie: #ffffff; --superficie-2: #f2f5f8; --borda: #dfe5eb; --borda-forte: #c6d0da; color-scheme: light; }
@media print { .secao.conferencia, .conferencia-ok, .caixa.erro { display: none !important; } }

/* guia e próximo passo */
.guia { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); margin: 0 0 1.2rem; box-shadow: var(--sombra); overflow: hidden; }
.guia > summary { list-style: none; cursor: pointer; display: flex; gap: .8rem; align-items: center; padding: 1rem 1.1rem; background: linear-gradient(100deg, var(--acento-claro), transparent 70%); }
.guia > summary::-webkit-details-marker { display: none; }
.guia > summary::after { content: "▾"; margin-left: auto; color: var(--texto-3); transition: transform .2s; }
.guia[open] > summary::after { transform: rotate(180deg); }
.guia summary b { display: block; font-size: 1.02rem; } .guia summary small { color: var(--texto-2); font-size: .82rem; }
.guia-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--acento-claro); color: var(--acento-txt); flex: none; }
.guia-ic .ico { width: 22px; height: 22px; }
.guia-passos { list-style: none; margin: 0; padding: .4rem 1.1rem .2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .7rem; counter-reset: none; }
.guia-passos > li { display: flex; gap: .7rem; padding: .8rem; border: 1px solid var(--borda); border-radius: 10px; background: var(--superficie-2); }
.gp-num { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 750; background: linear-gradient(135deg, var(--acento), var(--acento-2)); color: #04120a; flex: none; box-shadow: 0 0 12px var(--brilho); }
.gp-tx h3 { margin: 0 0 .3rem; font-size: .95rem; display: flex; gap: .35rem; align-items: center; } .gp-tx h3 .ico { color: var(--acento-txt); }
.gp-tx p { margin: 0 0 .35rem; font-size: .86rem; color: var(--texto-2); }
.gp-tx ul { margin: 0; padding-left: 1rem; font-size: .8rem; color: var(--texto-3); } .gp-tx ul li { margin: .15rem 0; }
.guia .linha-btns { padding: .3rem 1.1rem 1.1rem; }
.titulo-lista { margin: .4rem 0 .6rem; }
.prox { display: flex; gap: .9rem; align-items: center; padding: .95rem 1.1rem; margin: 0 0 1rem; border-radius: var(--raio); border: 1px solid var(--ok-borda); background: linear-gradient(100deg, var(--acento-claro), var(--superficie) 70%); box-shadow: var(--sombra); flex-wrap: wrap; }
.prox > .ico { width: 34px; height: 34px; color: var(--acento-txt); flex: none; }
.prox > div { flex: 1; min-width: 220px; } .prox b { display: block; font-size: 1.02rem; } .prox p { margin: .2rem 0; font-size: .86rem; color: var(--texto-2); } .prox small { color: var(--texto-3); font-size: .78rem; }
.prox-rot { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--acento-txt); font-weight: 700; }

/* ===== proposta: visual tecnológico (26/11/2026) ===== */
.doc { --navy: #0b1726; --navy-2: #13263b; --verde: #19a85a; --verde-neon: #2fd17a; font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; }
.folha { padding-top: 0; }
.doc-cab { position: relative; margin: 0 -16mm 6mm; padding: 6mm 16mm 4mm; border-bottom: 0; background: linear-gradient(90deg, var(--navy), var(--navy-2)); display: flex; align-items: center; gap: 4mm; }
.doc-cab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.2mm; background: linear-gradient(90deg, var(--verde-neon), #5b9cf0 60%, transparent); }
.doc-cab img { height: 8mm; filter: brightness(0) invert(1); opacity: .95; }
.doc-tag { color: #e6edf3; font-size: 10pt; font-weight: 650; letter-spacing: .02em; display: flex; align-items: center; gap: 2.5mm; margin-left: 2mm; }
.doc-tag b { display: inline-grid; place-items: center; min-width: 8mm; height: 6mm; border-radius: 1.5mm; background: var(--verde-neon); color: var(--navy); font-size: 9pt; }
.doc-num { margin-left: auto; color: #8fa3b7; font-size: 8pt; letter-spacing: .04em; }
.folha h2 { border-left: 0; padding-left: 0; display: flex; align-items: center; gap: 2.5mm; color: var(--navy); font-size: 14.5pt; letter-spacing: -.01em; }
.folha h2::before { content: ""; width: 3.2mm; height: 3.2mm; border-radius: .8mm; background: linear-gradient(135deg, var(--verde-neon), var(--verde)); box-shadow: 0 0 3mm rgba(47, 209, 122, .45); flex: none; }
.doc-pg { display: inline-grid; place-items: center; min-width: 7mm; height: 5mm; border-radius: 2.5mm; background: var(--navy); color: #fff; font-weight: 700; }
.doc-kpis > div { background: linear-gradient(180deg, #f4f8fb, #fff); border: 1px solid #dfe7ee; border-top: 1mm solid var(--verde-neon); border-radius: 2.5mm; }
.doc-kpis b { color: var(--navy); font-size: 15pt; letter-spacing: -.02em; }
.doc-tab { border-radius: 2mm; overflow: hidden; }
.doc-tab th { background: var(--navy); color: #fff; font-weight: 600; }
.doc-tab tbody tr:nth-child(even) td { background: #f7f9fb; }
.doc-tab tr.rec td { background: #e9f8ef !important; }
.doc-tab tfoot th { background: #e9f8ef; color: var(--navy); }
.rec-selo { display: inline-block; margin-top: 1mm; font-size: 7.5pt; font-weight: 700; color: #fff; background: var(--verde); border-radius: 1.5mm; padding: .3mm 2mm; letter-spacing: .03em; }
.doc-benef > div { border-top: 1mm solid var(--verde-neon); background: #f7faf8; }
.folha .destaque { background: linear-gradient(90deg, var(--navy), var(--navy-2)); color: #fff; border-left: 1.4mm solid var(--verde-neon); }

/* capa */
.capa-foto { height: 158mm; }
.capa-veu { background: linear-gradient(180deg, rgba(7, 17, 27, .15) 0%, rgba(7, 17, 27, .35) 45%, rgba(7, 17, 27, .92) 100%); }
.capa-grade { position: absolute; inset: 0; background-image: linear-gradient(rgba(47, 209, 122, .10) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 209, 122, .10) 1px, transparent 1px); background-size: 9mm 9mm; mask-image: linear-gradient(180deg, transparent 40%, #000 100%); -webkit-mask-image: linear-gradient(180deg, transparent 40%, #000 100%); }
.capa-selo { position: absolute; top: 12mm; left: 16mm; display: flex; align-items: center; gap: 2mm; padding: 2mm 4mm; border-radius: 99px; background: rgba(7, 17, 27, .6); border: 1px solid rgba(47, 209, 122, .6); color: #2fd17a; font-size: 9pt; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.capa-tit h1 { font-size: 30pt; letter-spacing: -.02em; }
.capa-tit small { text-transform: none; letter-spacing: .02em; font-size: 11.5pt; opacity: .85; }
.capa-linha { margin-top: 4mm; width: 46mm; height: 1.4mm; border-radius: 1mm; background: linear-gradient(90deg, #2fd17a, #5b9cf0); box-shadow: 0 0 4mm rgba(47, 209, 122, .6); }
.capa-baixo { gap: 7mm; padding-top: 0; }
.capa-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; margin-top: -11mm; position: relative; z-index: 2; }
.capa-chips .cc { background: var(--navy); border: 1px solid #1e3448; border-top: 1.2mm solid var(--verde-neon); border-radius: 3mm; padding: 3.5mm 4mm; color: #fff; box-shadow: 0 3mm 8mm rgba(7, 17, 27, .25); }
.capa-chips b { display: block; font-size: 17pt; letter-spacing: -.02em; color: #fff; } .capa-chips b small { font-size: 9pt; color: #8fa3b7; font-weight: 600; }
.capa-chips span { font-size: 8.5pt; color: #a3b3c3; }
.capa-dados { display: grid; grid-template-columns: 62mm 1fr; gap: 6mm; align-items: start; }
.capa-dados .capa-logo { height: 14mm; }
.capa-dados dl { margin: 0; display: grid; grid-template-columns: 26mm 1fr; gap: 2mm 3mm; font-size: 10.5pt; } .capa-dados dt { color: #7a8794; } .capa-dados dd { margin: 0; font-weight: 650; color: #0b1726; }

/* seu sistema */
.doc-sistema { border-radius: 4mm; overflow: hidden; box-shadow: 0 3mm 10mm rgba(7, 17, 27, .25); margin: 2mm 0 5mm; }
.doc-sistema svg { display: block; }
.doc-espec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; margin-bottom: 5mm; }
.doc-espec > div { border: 1px solid #dfe7ee; border-radius: 2.5mm; padding: 3mm 3.5mm; background: #fff; position: relative; overflow: hidden; }
.doc-espec > div::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1.1mm; background: linear-gradient(180deg, var(--verde-neon), #5b9cf0); }
.doc-espec span { display: block; font-size: 8pt; color: #7a8794; text-transform: uppercase; letter-spacing: .05em; }
.doc-espec b { display: block; font-size: 14pt; color: var(--navy); letter-spacing: -.01em; } .doc-espec small { font-size: 8.5pt; color: #52606d; }

/* etapas */
.doc-etapas { list-style: none; margin: 2mm 0 4mm; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2mm; counter-reset: et; }
.doc-etapas li { counter-increment: et; position: relative; padding: 8mm 2.5mm 3mm; border-radius: 2.5mm; background: #f4f8fb; border: 1px solid #dfe7ee; font-size: 8.5pt; }
.doc-etapas li::before { content: counter(et); position: absolute; top: 2mm; left: 2.5mm; width: 5mm; height: 5mm; border-radius: 1.3mm; display: grid; place-items: center; background: var(--navy); color: var(--verde-neon); font-weight: 800; font-size: 8pt; }
.doc-etapas b { display: block; color: var(--navy); font-size: 9.5pt; } .doc-etapas span { color: #52606d; }
