*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --p1:#F5A623; --p1-deep:#E07B00; --p1-light:rgba(245,166,35,0.15);
  --p2:#1A1A2E; --p3:#0F3460; --p4:#16213E;
  --p-green:#22C55E; --p-green-d:#16A34A; --p-green-bg:#F0FDF4; --p-green-border:#BBF7D0;
  --p-text-dark:#1A1A2E; --p-text-mid:#334155; --p-text-light:#64748B;
  --p-gray:#8892A4; --p-border:#E2E8F0; --p-bg-soft:#F8F9FC; --white:#FFFFFF;
  --dark:#1A1A2E; --dark2:#16213E; --mid:#0F3460; --sun:#F5A623; --sun-deep:#E07B00; --red:#EF4444;
}
body[data-palette="solar"] { --p1:#F5A623;--p1-deep:#E07B00;--p1-light:rgba(245,166,35,0.15);--p2:#1A1A2E;--p3:#0F3460;--p4:#16213E; }
body[data-palette="green"] { --p1:#10B981;--p1-deep:#059669;--p1-light:rgba(16,185,129,0.15);--p2:#064E3B;--p3:#065F46;--p4:#022c22; }
body[data-palette="blue"]  { --p1:#3B82F6;--p1-deep:#2563EB;--p1-light:rgba(59,130,246,0.15);--p2:#0F172A;--p3:#1E3A8A;--p4:#172554; }
body[data-palette="purple"]{ --p1:#A855F7;--p1-deep:#9333EA;--p1-light:rgba(168,85,247,0.15);--p2:#1E1B4B;--p3:#4338CA;--p4:#312E81; }
body[data-palette="red"]   { --p1:#EF4444;--p1-deep:#DC2626;--p1-light:rgba(239,68,68,0.15);--p2:#1C0A0A;--p3:#7F1D1D;--p4:#450A0A; }
body[data-palette="slate"] { --p1:#94A3B8;--p1-deep:#64748B;--p1-light:rgba(148,163,184,0.15);--p2:#0F172A;--p3:#1E293B;--p4:#020617; }

body { font-family:'DM Sans',sans-serif; background:var(--dark); color:var(--white); min-height:100vh; }

/* HEADER */
.editor-header { background:linear-gradient(135deg,var(--dark2) 0%,var(--mid) 100%); padding:14px 28px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(245,166,35,.2); position:sticky; top:0; z-index:100; }
.brand { display:flex; align-items:center; gap:12px; }
.sun-icon { width:34px; height:34px; background:var(--sun); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:15px; box-shadow:0 0 18px rgba(245,166,35,.4); }
.editor-header h1 { font-family:'Playfair Display',serif; font-size:17px; font-weight:700; }
.editor-header p { font-size:10px; color:var(--p-gray); margin-top:1px; }
.header-actions { display:flex; align-items:center; gap:9px; }
.btn-print { background:var(--sun); color:var(--dark); border:none; padding:9px 18px; border-radius:8px; font-family:'DM Sans',sans-serif; font-size:13px; font-weight:600; cursor:pointer; display:flex; align-items:center; gap:7px; transition:all .2s; }
.btn-print:hover { background:var(--sun-deep); transform:translateY(-1px); box-shadow:0 5px 16px rgba(245,166,35,.3); }
.palette-picker { display:flex; align-items:center; gap:5px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); border-radius:9px; padding:5px 10px; }
.palette-picker label { font-size:10px; color:var(--p-gray); text-transform:uppercase; letter-spacing:1px; font-weight:600; margin-right:3px; white-space:nowrap; }
.pal-btn { width:20px; height:20px; border-radius:50%; border:2px solid transparent; cursor:pointer; transition:transform .15s,border-color .15s; }
.pal-btn:hover { transform:scale(1.2); }
.pal-btn.active { border-color:white; box-shadow:0 0 0 2px rgba(255,255,255,.3); }
.pal-btn[data-pal="solar"]  { background:linear-gradient(135deg,#F5A623,#1A1A2E); }
.pal-btn[data-pal="green"]  { background:linear-gradient(135deg,#10B981,#064E3B); }
.pal-btn[data-pal="blue"]   { background:linear-gradient(135deg,#3B82F6,#0F172A); }
.pal-btn[data-pal="purple"] { background:linear-gradient(135deg,#A855F7,#1E1B4B); }
.pal-btn[data-pal="red"]    { background:linear-gradient(135deg,#EF4444,#1C0A0A); }
.pal-btn[data-pal="slate"]  { background:linear-gradient(135deg,#94A3B8,#0F172A); }
.btn-eco { background:transparent; color:rgba(255,255,255,.65); border:1px solid rgba(255,255,255,.2); padding:9px 14px; border-radius:8px; font-family:'DM Sans',sans-serif; font-size:12px; font-weight:500; cursor:pointer; display:flex; align-items:center; gap:6px; transition:all .2s; }
.btn-eco:hover { background:rgba(255,255,255,.08); color:white; }
.btn-eco.active { background:rgba(34,197,94,.15); border-color:#22C55E; color:#22C55E; }

.editor-body { display:grid; grid-template-columns:390px 1fr; min-height:calc(100vh - 62px); }

/* SIDEBAR */
.form-sidebar { background:var(--dark2); border-right:1px solid rgba(255,255,255,.07); overflow-y:auto; max-height:calc(100vh - 62px); padding-bottom:40px; }
.form-section { padding:13px 17px; border-bottom:1px solid rgba(255,255,255,.06); }
.form-section:last-child { border-bottom:none; }
.section-label { display:flex; align-items:center; gap:7px; margin-bottom:9px; }
.section-label .dot { width:6px; height:6px; border-radius:50%; background:var(--sun); }
.section-label span { font-size:9.5px; font-weight:600; letter-spacing:1.4px; text-transform:uppercase; color:var(--sun); }
.form-group { margin-bottom:8px; }
label { display:block; font-size:10.5px; color:var(--p-gray); margin-bottom:3px; font-weight:500; }
input[type=text],input[type=tel],input[type=email],input[type=number],input[type=date],textarea,select { width:100%; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:6px; padding:6px 9px; color:var(--white); font-family:'DM Sans',sans-serif; font-size:12px; transition:border-color .2s; outline:none; }
select { background:#1e2d4a; color:var(--white); }
select option { background:#1e2d4a; }
input:focus,textarea:focus { border-color:var(--sun); background:rgba(245,166,35,.05); }
textarea { resize:vertical; min-height:50px; }
.form-row-2 { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.calc-hint { font-size:9.5px; color:rgba(245,166,35,.55); margin-top:2px; }
.hint-box { background:rgba(245,166,35,.07); border:1px solid rgba(245,166,35,.2); border-radius:6px; padding:7px 9px; font-size:10.5px; color:rgba(255,255,255,.6); line-height:1.5; margin-bottom:8px; }
.hint-box strong { color:var(--sun); }

/* Garantia fixa */
.garantia-fixed { background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:6px; padding:7px 9px; margin-bottom:7px; }
.gf-row { display:flex; align-items:center; gap:6px; margin-bottom:4px; }
.gf-row:last-child { margin-bottom:0; }
.gf-badge { background:rgba(245,166,35,.12); border:1px solid rgba(245,166,35,.25); border-radius:4px; padding:1px 6px; font-size:9.5px; font-weight:700; color:var(--sun); flex-shrink:0; }
.gf-lbl { font-size:10px; color:rgba(255,255,255,.45); }

.logo-upload-area { border:2px dashed rgba(245,166,35,.3); border-radius:9px; padding:9px; text-align:center; cursor:pointer; transition:all .2s; background:rgba(245,166,35,.03); position:relative; }
.logo-upload-area:hover { border-color:var(--sun); background:rgba(245,166,35,.07); }
.logo-upload-area input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
.logo-upload-area .upload-icon { font-size:17px; }
.logo-upload-area .upload-text { font-size:10px; color:var(--p-gray); line-height:1.4; margin-top:2px; }
#logoPreview { max-width:100px; max-height:42px; object-fit:contain; display:none; margin:5px auto 0; }
.btn-remove-logo { display:none; margin-top:4px; width:100%; background:rgba(239,68,68,.1); border:1px solid rgba(239,68,68,.3); color:var(--red); padding:4px; border-radius:6px; font-size:11px; font-family:'DM Sans',sans-serif; font-weight:500; cursor:pointer; }

/* Salvar Configurações da Empresa */
.empresa-config-bar { display:flex; gap:6px; margin-top:10px; }
.btn-save-empresa { flex:1; background:linear-gradient(135deg,rgba(34,197,94,.18),rgba(34,197,94,.10)); border:1px solid rgba(34,197,94,.4); color:#4ade80; padding:7px 10px; border-radius:7px; font-family:'DM Sans',sans-serif; font-size:11.5px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; transition:all .2s; }
.btn-save-empresa:hover { background:rgba(34,197,94,.25); border-color:#4ade80; transform:translateY(-1px); }
.btn-save-empresa:active { transform:scale(.97); }
.btn-clear-empresa { background:rgba(239,68,68,.08); border:1px solid rgba(239,68,68,.25); color:#f87171; padding:7px 10px; border-radius:7px; font-family:'DM Sans',sans-serif; font-size:11.5px; font-weight:500; cursor:pointer; display:flex; align-items:center; gap:5px; transition:all .2s; white-space:nowrap; }
.btn-clear-empresa:hover { background:rgba(239,68,68,.18); border-color:#f87171; }
.config-saved-badge { display:none; align-items:center; gap:5px; font-size:10px; color:#4ade80; background:rgba(34,197,94,.1); border:1px solid rgba(34,197,94,.25); border-radius:6px; padding:4px 9px; margin-top:5px; animation: fadeInOut 2.5s ease forwards; }
@keyframes fadeInOut { 0%{opacity:0;transform:translateY(-4px)} 15%{opacity:1;transform:translateY(0)} 75%{opacity:1} 100%{opacity:0} }

/* Salvar Última Cotação */
.cotacao-config-bar { display:flex; gap:6px; margin-top:8px; }
.btn-save-cotacao { flex:1; background:linear-gradient(135deg,rgba(245,166,35,.20),rgba(245,166,35,.10)); border:1px solid rgba(245,166,35,.45); color:var(--sun); padding:7px 10px; border-radius:7px; font-family:'DM Sans',sans-serif; font-size:11.5px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; transition:all .2s; }
.btn-save-cotacao:hover { background:rgba(245,166,35,.28); border-color:var(--sun); transform:translateY(-1px); }
.btn-save-cotacao:active { transform:scale(.97); }
.btn-clear-cotacao { background:rgba(239,68,68,.08); border:1px solid rgba(239,68,68,.25); color:#f87171; padding:7px 10px; border-radius:7px; font-family:'DM Sans',sans-serif; font-size:11.5px; font-weight:500; cursor:pointer; display:flex; align-items:center; gap:5px; transition:all .2s; white-space:nowrap; }
.btn-clear-cotacao:hover { background:rgba(239,68,68,.18); border-color:#f87171; }
.cotacao-saved-badge { display:none; align-items:center; gap:5px; font-size:10px; color:var(--sun); background:rgba(245,166,35,.1); border:1px solid rgba(245,166,35,.3); border-radius:6px; padding:4px 9px; margin-top:5px; animation: fadeInOut 2.5s ease forwards; }
.auto-pref-row { display:flex; align-items:center; gap:7px; margin-top:9px; padding-top:9px; border-top:1px dashed rgba(255,255,255,.1); }
.auto-pref-row input[type=checkbox] { width:14px; height:14px; accent-color:var(--sun); cursor:pointer; flex-shrink:0; }
.auto-pref-row label { margin:0; font-size:10.5px; color:rgba(255,255,255,.55); cursor:pointer; line-height:1.4; }
.logo-size-row { display:flex; flex-direction:column; gap:5px; margin-top:6px; }
.logo-size-row label { font-size:10.5px; color:var(--p-gray); font-weight:500; margin:0; display:flex; justify-content:space-between; align-items:center; }
.logo-size-row label span { color:var(--sun); font-weight:600; font-size:10.5px; }
.logo-size-slider { -webkit-appearance:none; appearance:none; width:100%; height:5px; background:rgba(255,255,255,.12); border-radius:3px; outline:none; cursor:pointer; border:none; padding:0; }
.logo-size-slider::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:16px; height:16px; border-radius:50%; background:var(--sun); cursor:pointer; box-shadow:0 0 6px rgba(245,166,35,.5); }
.logo-size-slider::-moz-range-thumb { width:16px; height:16px; border-radius:50%; background:var(--sun); cursor:pointer; border:none; box-shadow:0 0 6px rgba(245,166,35,.5); }

.items-header { display:grid; grid-template-columns:1fr 60px auto; gap:7px; margin-bottom:4px; }
.items-header span { font-size:9.5px; color:var(--p-gray); font-weight:600; text-transform:uppercase; letter-spacing:.8px; }
.item-row { display:grid; grid-template-columns:1fr 60px auto; gap:7px; margin-bottom:4px; align-items:center; }
.item-row input { font-size:11.5px; padding:5px 8px; }
.btn-remove-item { background:rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.25); color:var(--red); width:26px; height:26px; border-radius:6px; cursor:pointer; font-size:15px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.btn-add-item { background:rgba(245,166,35,.08); border:1px dashed rgba(245,166,35,.35); color:var(--sun); padding:6px; border-radius:6px; cursor:pointer; font-size:11.5px; font-family:'DM Sans',sans-serif; font-weight:500; width:100%; margin-top:2px; }
.btn-add-item:hover { background:rgba(245,166,35,.16); }

.chk-toggle-row { display:flex; align-items:center; gap:7px; margin:9px 0; }
.chk-toggle-row input[type=checkbox] { width:14px; height:14px; accent-color:var(--sun); cursor:pointer; flex-shrink:0; }
.chk-toggle-row label { margin:0; font-size:10.5px; color:rgba(255,255,255,.6); cursor:pointer; line-height:1.4; }
.pagamento-subtitle { font-size:10px; font-weight:700; color:var(--sun); text-transform:uppercase; letter-spacing:1px; margin-bottom:6px; }
.pagamento-subtitle.with-divider { margin-top:14px; padding-top:12px; border-top:1px dashed rgba(255,255,255,.1); }
.add-plano-row { display:flex; gap:6px; margin-top:2px; margin-bottom:6px; }
.add-plano-row select { flex:1; }
.btn-add-plano { background:rgba(245,166,35,.08); border:1px dashed rgba(245,166,35,.35); color:var(--sun); padding:0 12px; border-radius:6px; cursor:pointer; font-size:11px; font-family:'DM Sans',sans-serif; font-weight:500; white-space:nowrap; }
.btn-add-plano:hover { background:rgba(245,166,35,.16); }
.plano-manual-row { display:grid; grid-template-columns:52px 1fr auto; gap:7px; margin-bottom:4px; align-items:center; }
.plano-manual-row .pmr-label { font-size:11px; font-weight:700; color:var(--sun); text-align:center; background:rgba(245,166,35,.08); border:1px solid rgba(245,166,35,.25); border-radius:6px; padding:5.5px 4px; }
.plano-manual-row input { font-size:11.5px; padding:5px 8px; }
.manual-planos-empty { font-size:10px; color:rgba(255,255,255,.35); padding:2px 0 6px; }

/* PREVIEW */
.preview-panel { background:#CBD5E1; overflow-y:auto; padding:24px; display:flex; flex-direction:column; align-items:center; gap:16px; }
.preview-label { font-size:9.5px; color:#64748B; letter-spacing:1.5px; text-transform:uppercase; font-weight:600; }

/* A4 BASE */
.a4-page { width:794px; background:white; box-shadow:0 8px 36px rgba(0,0,0,.25); border-radius:2px; position:relative; overflow:hidden; color:#1A1A2E; font-family:'DM Sans',sans-serif; }

/* PAGE 1 — CAPA */
.capa { height:1123px; display:flex; flex-direction:column; }
.capa-top { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 60%,var(--p4) 100%); flex:1; position:relative; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:60px; overflow:hidden; }
.capa-top::before { content:''; position:absolute; right:-120px; top:-120px; width:500px; height:500px; border-radius:50%; border:60px solid rgba(255,255,255,.04); }
.capa-top::after  { content:''; position:absolute; right:-60px; top:-60px; width:360px; height:360px; border-radius:50%; border:40px solid rgba(255,255,255,.07); }
.capa-sun-circle  { position:absolute; right:40px; top:40px; width:220px; height:220px; border-radius:50%; background:radial-gradient(circle,var(--p1-light) 0%,transparent 70%); border:2px solid var(--p1-light); }
.capa-content { position:relative; z-index:2; text-align:center; width:100%; }
.capa-logo-wrap { margin-bottom:22px; display:flex; justify-content:center; align-items:center; min-height:50px; }
#capLogoImg { object-fit:contain; display:none; margin:0 auto; height:auto; }
.capa-logo-placeholder { font-family:'Playfair Display',serif; font-size:24px; font-weight:900; color:var(--p1); }
.capa-tagline { font-size:10px; color:rgba(255,255,255,.5); letter-spacing:4px; text-transform:uppercase; margin-bottom:36px; font-weight:500; }
.capa-title-block { margin-bottom:36px; }
.capa-title-block .pre-title { font-size:9.5px; color:rgba(255,255,255,.35); letter-spacing:3px; text-transform:uppercase; margin-bottom:10px; }
.capa-title-block h2 { font-family:'Playfair Display',serif; font-size:54px; font-weight:900; color:white; line-height:1.0; letter-spacing:-1px; }
.capa-title-block h2 span { color:var(--p1); display:block; }
.capa-divider { width:52px; height:3px; background:var(--p1); margin:18px auto; border-radius:2px; }
.capa-client-block { background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius:11px; padding:16px 30px; display:inline-block; min-width:280px; }
.capa-client-block .lbl { font-size:8.5px; color:var(--p1); letter-spacing:2.5px; text-transform:uppercase; margin-bottom:5px; font-weight:600; }
.capa-client-block .client-name { font-family:'Playfair Display',serif; font-size:21px; color:white; font-weight:700; }
.capa-client-block .client-info { font-size:10.5px; color:rgba(255,255,255,.4); margin-top:4px; }
.capa-bottom { background:white; padding:16px 48px; display:flex; align-items:center; justify-content:space-between; }
.capa-bottom .date-info { font-size:10px; color:#8892A4; }
.capa-bottom .date-info strong { display:block; font-size:12px; color:#1A1A2E; font-weight:600; margin-top:2px; }
.validity-badge { background:linear-gradient(135deg,var(--p2),var(--p3)); color:white; padding:7px 14px; border-radius:7px; font-size:11.5px; font-weight:600; }
.validity-badge span { color:var(--p1); }

/* SHARED HEADER / FOOTER */
.prop-header { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 100%); padding:12px 34px; display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
.prop-header .logo-area { display:flex; align-items:center; gap:10px; }
.prop-header .logo-img { max-width:78px; max-height:32px; object-fit:contain; display:none; }
.prop-logo-text { font-family:'Playfair Display',serif; font-size:14px; color:var(--p1); font-weight:700; }
.prop-header .prop-num { text-align:right; }
.prop-header .prop-num .lbl { font-size:8.5px; color:rgba(255,255,255,.38); letter-spacing:2px; text-transform:uppercase; }
.prop-header .prop-num strong { display:block; font-size:12px; color:white; font-weight:600; margin-top:1px; }
.prop-footer { border-top:1px solid var(--p-border); padding:8px 34px; display:flex; align-items:center; justify-content:space-between; background:var(--p-bg-soft); flex-shrink:0; }
.prop-footer .footer-co { font-size:9.5px; color:var(--p-gray); }
.prop-footer .footer-co strong { display:block; color:var(--p-text-dark); font-size:10px; font-weight:600; }
.prop-footer .footer-contact { font-size:9.5px; color:var(--p-gray); text-align:right; }
.seal { display:flex; align-items:center; gap:4px; background:white; border:1px solid var(--p-border); border-radius:20px; padding:3px 9px; }
.seal .dot { width:5px; height:5px; border-radius:50%; background:var(--p-green); }
.seal span { font-size:9.5px; color:var(--p-text-mid); font-weight:500; }

/* PAGE 2 — PROPOSTA
   display:flex + flex-direction:column permite margin-top:auto nas assinaturas */
.proposta-page { height:1123px; display:flex; flex-direction:column; }
.proposta-page .prop-body { flex:1; padding:11px 34px; display:flex; flex-direction:column; overflow:hidden; }

.client-strip { display:grid; grid-template-columns:1fr 1fr 1fr; background:var(--p-bg-soft); border:1px solid var(--p-border); border-radius:7px; margin-bottom:9px; overflow:hidden; }
.client-strip .ci { padding:6px 10px; border-right:1px solid var(--p-border); }
.client-strip .ci:last-child { border-right:none; }
.ci .lbl { font-size:8.5px; color:var(--p-gray); letter-spacing:1.5px; text-transform:uppercase; font-weight:600; margin-bottom:2px; }
.ci .val { font-size:11px; color:var(--p-text-dark); font-weight:600; }

.pitch-outer { margin-bottom:9px; }
.pitch-box { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 100%); border-radius:8px; overflow:hidden; }
.pitch-top-bar { background:var(--p1); padding:5px 16px; display:flex; align-items:center; gap:7px; }
.pitch-top-bar .pt-icon { font-size:12px; }
.pitch-top-bar .pt-label { font-size:8.5px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:var(--p2); }
.pitch-inner { padding:10px 16px; }
.pitch-headline { font-family:'Playfair Display',serif; font-size:14px; color:white; font-weight:700; margin-bottom:7px; line-height:1.25; }
.pitch-headline span { color:var(--p1); }
.pitch-body { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.pitch-col { font-size:10px; color:rgba(255,255,255,.72); line-height:1.62; }
.pitch-col strong { color:var(--p1); font-weight:600; }
.pitch-highlights { display:flex; gap:5px; margin-top:8px; flex-wrap:wrap; }
.ph-badge { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:20px; padding:3px 9px; font-size:9px; color:white; font-weight:500; display:flex; align-items:center; gap:4px; }
.ph-badge strong { color:var(--p1); }

.sec-title { display:flex; align-items:center; gap:6px; margin-bottom:5px; }
.sec-title .bar { width:3px; height:11px; background:var(--p1); border-radius:2px; }
.sec-title h3 { font-size:9px; font-weight:700; color:var(--p-text-dark); text-transform:uppercase; letter-spacing:1.2px; }

.mat-table { width:100%; border-collapse:collapse; margin-bottom:9px; }
.mat-table thead th { background:var(--p2); color:white; padding:5px 9px; font-size:9px; font-weight:600; letter-spacing:1px; text-transform:uppercase; text-align:left; }
.mat-table thead th:last-child { text-align:center; width:55px; }
.mat-table tbody tr:nth-child(even) { background:var(--p-bg-soft); }
.mat-table tbody td { padding:4px 9px; font-size:10px; color:var(--p-text-mid); border-bottom:1px solid var(--p-border); }
.mat-table tbody td:last-child { text-align:center; font-weight:600; }

.results-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-bottom:9px; }
.total-card { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 100%); border-radius:7px; padding:10px 14px; }
.total-card .tc-lbl { font-size:8px; color:rgba(255,255,255,.45); text-transform:uppercase; letter-spacing:1.2px; font-weight:600; margin-bottom:2px; }
.total-card .tc-val { font-size:18px; color:var(--p1); font-weight:700; font-family:'Playfair Display',serif; }
.payback-card { background:linear-gradient(135deg,#052e16 0%,#14532d 100%); border-radius:7px; padding:10px 14px; }
.payback-card .pc-lbl { font-size:8px; color:rgba(255,255,255,.45); text-transform:uppercase; letter-spacing:1.2px; font-weight:600; margin-bottom:2px; }
.payback-card .pc-val { font-size:18px; color:#4ade80; font-weight:700; font-family:'Playfair Display',serif; }
.payback-card .pc-sub { font-size:9px; color:rgba(255,255,255,.4); margin-top:1px; }

.economy-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; margin-bottom:9px; }
.econ-card { background:var(--p-green-bg); border:1px solid var(--p-green-border); border-radius:6px; padding:7px 9px; position:relative; overflow:hidden; }
.econ-card::before { content:''; position:absolute; top:0; left:0; width:3px; height:100%; background:var(--p-green); }
.econ-card .ec-lbl { font-size:8px; color:var(--p-green-d); text-transform:uppercase; letter-spacing:.9px; font-weight:700; margin-bottom:2px; }
.econ-card .ec-val { font-size:11.5px; color:#14532D; font-weight:700; }
.econ-card .ec-sub { font-size:8px; color:#4ADE80; margin-top:1px; }

/* Assinaturas — margin-top:auto empurra para o fim da prop-body flex */
.sign-area { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:auto; padding-top:10px; }
.sign-box { border-top:1px dashed #CBD5E1; padding-top:6px; }
.sign-box .sign-lbl { font-size:8.5px; color:var(--p-gray); text-transform:uppercase; letter-spacing:1px; font-weight:600; }
.sign-box .sign-name { font-size:10.5px; color:var(--p-text-dark); font-weight:600; margin-top:28px; }

/* PAGE 3 — GRÁFICO + CONDIÇÕES */
.page3 { height:1123px; display:flex; flex-direction:column; }
.page3 .prop-body { flex:1; padding:11px 34px; overflow:hidden; }

.roi-stats-bar { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-bottom:8px; }
.roi-stat { background:white; border:1px solid var(--p-border); border-radius:6px; padding:7px 9px; text-align:center; }
.roi-stat .rs-val { font-size:13px; font-weight:700; color:var(--p2); font-family:'Playfair Display',serif; }
.roi-stat .rs-val.accent { color:var(--p-green); }
.roi-stat .rs-lbl { font-size:8px; color:var(--p-gray); text-transform:uppercase; letter-spacing:.8px; font-weight:600; margin-top:2px; }

.chart-wrap { background:var(--p-bg-soft); border:1px solid var(--p-border); border-radius:8px; padding:11px 13px; margin-bottom:8px; }
.chart-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:7px; }
.chart-header-left h3 { font-size:10px; font-weight:700; color:var(--p-text-dark); text-transform:uppercase; letter-spacing:1px; }
.chart-header-left p { font-size:9px; color:var(--p-text-light); margin-top:2px; }
.chart-legend { display:flex; gap:9px; flex-wrap:wrap; margin-top:2px; }
.chart-legend .leg { display:flex; align-items:center; gap:4px; font-size:9px; color:var(--p-text-light); font-weight:500; }
.chart-legend .leg-dot { width:8px; height:8px; border-radius:2px; }
canvas#retornoChart { width:100% !important; height:168px !important; }
.payback-line-label { font-size:9px; color:var(--p-text-light); text-align:center; margin-top:3px; }

/* Chart explanation */
.chart-explain { background:white; border:1px solid var(--p-border); border-radius:8px; overflow:hidden; margin-bottom:8px; }
.chart-explain-header { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 100%); padding:8px 13px; display:flex; align-items:center; gap:8px; }
.chart-explain-header .ce-icon { width:24px; height:24px; border-radius:6px; background:var(--p1); display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0; }
.chart-explain-header .ce-htitle { font-size:9.5px; font-weight:700; color:white; letter-spacing:.5px; }
.chart-explain-header .ce-hsub { font-size:8.5px; color:rgba(255,255,255,.5); margin-top:1px; }
.chart-explain-body { padding:9px 13px; }
.chart-explain-intro { font-size:9.5px; color:var(--p-text-mid); line-height:1.65; background:var(--p-bg-soft); border-radius:5px; padding:7px 9px; margin-bottom:8px; border-left:3px solid var(--p1); }
.chart-explain-intro strong { color:var(--p-text-dark); }
.chart-lines-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; margin-bottom:8px; }
.cline-card { border-radius:6px; border:1px solid var(--p-border); overflow:hidden; }
.cline-card-header { padding:5px 9px; display:flex; align-items:center; gap:5px; }
.cline-dot { width:9px; height:9px; border-radius:2px; flex-shrink:0; }
.cline-card-header .cline-name { font-size:8.5px; font-weight:700; color:white; }
.cline-card-body { background:white; padding:6px 9px; font-size:9px; color:var(--p-text-light); line-height:1.6; }
.cline-card-body strong { color:var(--p-text-dark); font-weight:600; }
.chart-payback-note { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 100%); border-radius:6px; padding:8px 11px; display:flex; align-items:flex-start; gap:8px; }
.chart-payback-note .cpn-icon { font-size:15px; flex-shrink:0; margin-top:1px; }
.chart-payback-note .cpn-body { font-size:9.5px; color:rgba(255,255,255,.8); line-height:1.6; }
.chart-payback-note .cpn-body strong { color:var(--p1); font-weight:700; }
.chart-payback-note .cpn-title { font-size:9.5px; font-weight:700; color:white; margin-bottom:3px; }

/* Conditions page 3 */
.info-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; margin-bottom:7px; }
.info-card { background:var(--p-bg-soft); border:1px solid var(--p-border); border-radius:6px; padding:7px 9px; position:relative; overflow:hidden; }
.info-card::before { content:''; position:absolute; top:0; left:0; width:3px; height:100%; background:var(--p1); }
.info-card .ic-lbl { font-size:8px; color:var(--p-gray); text-transform:uppercase; letter-spacing:1px; font-weight:600; margin-bottom:2px; }
.info-card .ic-val { font-size:10.5px; color:var(--p-text-dark); font-weight:700; }

/* Garantia box page 3 */
.garantia-box { background:var(--p-bg-soft); border:1px solid var(--p-border); border-radius:6px; padding:7px 9px; margin-bottom:7px; }
.garantia-box .gb-title { font-size:8px; color:var(--p-gray); text-transform:uppercase; letter-spacing:1px; font-weight:600; margin-bottom:5px; }
.garantia-box .gb-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; }
.gb-item { position:relative; padding-left:7px; }
.gb-item::before { content:''; position:absolute; top:0; left:0; width:2px; height:100%; border-radius:2px; }
.gb-item-modulos::before   { background:#F5A623; }
.gb-item-inversores::before{ background:#3B82F6; }
.gb-item-instalacao::before{ background:#10B981; }
.gb-item .gbi-val { font-size:11px; font-weight:700; color:var(--p-text-dark); }
.gb-item .gbi-lbl { font-size:8.5px; color:var(--p-text-light); margin-top:1px; }

.obs-box { background:#FFFBF0; border:1px solid rgba(245,166,35,.22); border-radius:6px; padding:7px 9px; }
.obs-box .obs-title { font-size:8px; color:#E07B00; font-weight:700; text-transform:uppercase; letter-spacing:1px; margin-bottom:2px; }
.obs-box .obs-text { font-size:10px; color:var(--p-text-light); line-height:1.6; }

/* PAGE 4 — FINANCIAMENTO */
.page4 { height:1123px; display:flex; flex-direction:column; }
.page4 .prop-body { flex:1; padding:11px 34px; display:flex; flex-direction:column; min-height:0; }
.fin-banner { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 100%); border-radius:8px; padding:13px 17px; margin-bottom:11px; display:grid; grid-template-columns:1fr auto; align-items:center; gap:13px; }
.fin-banner-text .fin-tag { font-size:8px; color:var(--p1); letter-spacing:2.5px; text-transform:uppercase; font-weight:700; margin-bottom:4px; }
.fin-banner-text h3 { font-family:'Playfair Display',serif; font-size:16px; color:white; font-weight:700; margin-bottom:5px; line-height:1.2; }
.fin-banner-text h3 span { color:var(--p1); }
.fin-banner-text p { font-size:10px; color:rgba(255,255,255,.6); line-height:1.55; }
.fin-banner-badge { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); border-radius:8px; padding:11px 15px; text-align:center; min-width:96px; }
.fin-banner-badge .fb-val { font-family:'Playfair Display',serif; font-size:19px; color:var(--p1); font-weight:700; }
.fin-banner-badge .fb-lbl { font-size:8px; color:rgba(255,255,255,.45); text-transform:uppercase; letter-spacing:1px; font-weight:600; margin-top:2px; }
.fin-params { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin-bottom:13px; }
.fin-param-card { background:var(--p-bg-soft); border:1px solid var(--p-border); border-radius:7px; padding:8px 11px; position:relative; overflow:hidden; }
.fin-param-card::before { content:''; position:absolute; top:0; left:0; width:100%; height:3px; background:var(--p1); }
.fin-param-card .fpc-lbl { font-size:8px; color:var(--p-gray); text-transform:uppercase; letter-spacing:1px; font-weight:600; margin-bottom:2px; }
.fin-param-card .fpc-val { font-size:12.5px; color:var(--p-text-dark); font-weight:700; }
.fin-cards-title { display:flex; align-items:center; gap:6px; margin-bottom:9px; }
.fin-cards-title .bar { width:3px; height:11px; background:var(--p1); border-radius:2px; }
.fin-cards-title h3 { font-size:9px; font-weight:700; color:var(--p-text-dark); text-transform:uppercase; letter-spacing:1.2px; }
.fin-cards-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:11px; margin-bottom:13px; }
.fin-card { border-radius:10px; overflow:hidden; border:1.5px solid var(--p-border); box-shadow:0 2px 8px rgba(0,0,0,.07); position:relative; }
.fin-card.highlight { border-color:var(--p1); }
.fin-card-header { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 100%); padding:11px 15px; display:flex; align-items:center; justify-content:space-between; }
.fin-card.highlight .fin-card-header { background:linear-gradient(135deg,var(--p1) 0%,var(--p1-deep) 100%); }
.fin-card-header .fch-prazo { font-family:'Playfair Display',serif; font-size:24px; font-weight:900; color:white; line-height:1; }
.fin-card-header .fch-sub { font-size:9px; color:rgba(255,255,255,.55); margin-top:2px; }
.fin-card.highlight .fin-card-header .fch-sub { color:rgba(0,0,0,.45); }
.fin-card-header .fch-right { text-align:right; }
.fin-card-header .fch-parcela-lbl { font-size:8px; color:rgba(255,255,255,.45); text-transform:uppercase; letter-spacing:1px; font-weight:600; }
.fin-card.highlight .fin-card-header .fch-parcela-lbl { color:rgba(0,0,0,.4); }
.fin-card-header .fch-parcela-val { font-family:'Playfair Display',serif; font-size:17px; color:white; font-weight:700; line-height:1.1; margin-top:2px; }
.best-badge { position:absolute; top:7px; right:7px; background:white; color:var(--p2); border-radius:20px; padding:2px 7px; font-size:8px; font-weight:700; display:none; }
.fin-card.highlight .best-badge { display:block; }
.fin-card-body { background:white; padding:11px 15px; }
.fin-detail-row { display:flex; align-items:center; justify-content:space-between; padding:3.5px 0; border-bottom:1px solid var(--p-border); }
.fin-detail-row:last-child { border-bottom:none; }
.fin-detail-row .fdr-lbl { font-size:10px; color:var(--p-text-light); }
.fin-detail-row .fdr-val { font-size:10px; color:var(--p-text-dark); font-weight:600; }
.fin-detail-row .fdr-val.red { color:#EF4444; }
.fin-detail-row .fdr-val.green { color:#16A34A; }
.fin-economy-note { background:var(--p-green-bg); border:1px solid var(--p-green-border); border-radius:7px; padding:8px 11px; display:flex; align-items:flex-start; gap:7px; }
.fin-economy-note .fen-icon { font-size:15px; flex-shrink:0; }
.fin-economy-note .fen-text { font-size:10px; color:#14532D; line-height:1.55; }
.fin-economy-note .fen-text strong { font-weight:700; }

/* PAGE 5 — CRONOGRAMA — grid 2×3 compacto */
.page5 { height:1123px; display:flex; flex-direction:column; }
.page5 .prop-body { flex:1; padding:11px 34px; overflow:hidden; display:flex; flex-direction:column; }

.timeline-hero { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 70%,var(--p4) 100%); border-radius:8px; padding:12px 16px; margin-bottom:10px; position:relative; overflow:hidden; flex-shrink:0; }
.timeline-hero::before { content:''; position:absolute; right:-35px; top:-35px; width:150px; height:150px; border-radius:50%; border:25px solid rgba(255,255,255,.05); }
.timeline-hero::after  { content:''; position:absolute; right:-8px; top:-8px; width:90px; height:90px; border-radius:50%; border:16px solid rgba(255,255,255,.07); }
.tl-hero-inner { position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.tl-hero-tag { font-size:8px; color:var(--p1); letter-spacing:2.5px; text-transform:uppercase; font-weight:700; margin-bottom:4px; }
.tl-hero-title { font-family:'Playfair Display',serif; font-size:15px; color:white; font-weight:700; margin-bottom:3px; line-height:1.2; }
.tl-hero-title span { color:var(--p1); }
.tl-hero-sub { font-size:9.5px; color:rgba(255,255,255,.5); line-height:1.55; max-width:400px; }
.tl-hero-badges { display:flex; gap:6px; margin-top:8px; flex-wrap:wrap; }
.tl-hero-badge { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); border-radius:20px; padding:2px 9px; font-size:8.5px; color:white; font-weight:500; display:flex; align-items:center; gap:4px; }
.tl-hero-badge strong { color:var(--p1); }
.tl-hero-right { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); border-radius:8px; padding:10px 14px; text-align:center; min-width:80px; flex-shrink:0; }
.tl-hero-right .thr-val { font-family:'Playfair Display',serif; font-size:22px; color:var(--p1); font-weight:700; line-height:1; }
.tl-hero-right .thr-lbl { font-size:8px; color:rgba(255,255,255,.45); text-transform:uppercase; letter-spacing:1px; font-weight:600; margin-top:3px; }
.tl-hero-right .thr-sub { font-size:7.5px; color:rgba(255,255,255,.28); margin-top:1px; }

/* Grid 2×3 → lista horizontal 1×6 */
.timeline-grid { display:flex; flex-direction:column; gap:6px; flex:1; }

.ts-card { background:white; border:1px solid var(--p-border); border-radius:7px; overflow:hidden; display:flex; flex-direction:row; flex-shrink:0; }
/* Coluna esquerda: step badge + ícone + dur */
.ts-card-left { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:0 12px; background:var(--p-bg-soft); border-right:1px solid var(--p-border); min-width:72px; flex-shrink:0; }
.ts-step-num { font-size:7px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:var(--p-gray); }
.ts-step-icon { font-size:18px; line-height:1; }
.ts-dur { border-radius:20px; padding:2px 7px; font-size:7.5px; font-weight:700; display:flex; align-items:center; gap:2px; white-space:nowrap; margin-top:2px; }
/* Coluna central: título + descrição */
.ts-card-center { padding:8px 14px; flex:1; border-right:1px solid var(--p-border); display:flex; flex-direction:column; justify-content:center; }
.ts-title { font-size:11px; font-weight:700; color:var(--p-text-dark); margin-bottom:2px; }
.ts-card-body { font-size:9px; color:var(--p-text-light); line-height:1.55; }
/* Coluna direita: bullets */
.ts-card-right { padding:8px 12px; display:flex; flex-direction:column; justify-content:center; gap:3px; min-width:190px; flex-shrink:0; }
.ts-bullet { font-size:8.5px; color:var(--p-text-mid); display:flex; align-items:center; gap:4px; }
.ts-bullet::before { content:'✓'; color:var(--p-green); font-weight:700; font-size:8px; flex-shrink:0; }

/* Step colors — horizontal layout */
.ts-s1 .ts-card-left { border-left:4px solid #F5A623; }
.ts-s1 .ts-dur { background:rgba(245,166,35,.1); border:1px solid rgba(245,166,35,.3); color:#E07B00; }
.ts-s1 .ts-step-num { color:#E07B00; }
.ts-s2 .ts-card-left { border-left:4px solid #3B82F6; }
.ts-s2 .ts-dur { background:rgba(59,130,246,.1); border:1px solid rgba(59,130,246,.3); color:#2563EB; }
.ts-s2 .ts-step-num { color:#2563EB; }
.ts-s3 .ts-card-left { border-left:4px solid #8B5CF6; }
.ts-s3 .ts-dur { background:rgba(139,92,246,.1); border:1px solid rgba(139,92,246,.3); color:#7C3AED; }
.ts-s3 .ts-step-num { color:#7C3AED; }
.ts-s4 .ts-card-left { border-left:4px solid #EF4444; }
.ts-s4 .ts-dur { background:rgba(239,68,68,.1); border:1px solid rgba(239,68,68,.3); color:#DC2626; }
.ts-s4 .ts-step-num { color:#DC2626; }
.ts-s5 .ts-card-left { border-left:4px solid #10B981; }
.ts-s5 .ts-dur { background:rgba(16,185,129,.1); border:1px solid rgba(16,185,129,.3); color:#059669; }
.ts-s5 .ts-step-num { color:#059669; }
.ts-s6 .ts-card { border:1.5px solid #22C55E; }
.ts-s6 .ts-card-left { border-left:4px solid #22C55E; background:linear-gradient(135deg,#052e16,#14532d); }
.ts-s6 .ts-step-num { color:#4ade80; }
.ts-s6 .ts-step-icon { filter:drop-shadow(0 0 4px rgba(34,197,94,.5)); }
.ts-s6 .ts-title { color:var(--p-text-dark); }
.ts-s6 .ts-dur { background:rgba(34,197,94,.15); border:1px solid rgba(34,197,94,.35); color:#16A34A; }
.ts-s6 .ts-card-center { background:linear-gradient(90deg,rgba(240,253,244,.8),white); }

.timeline-obs { background:var(--p-bg-soft); border:1px solid var(--p-border); border-radius:6px; padding:7px 10px; margin-top:8px; display:flex; align-items:flex-start; gap:6px; flex-shrink:0; }
.timeline-obs .to-icon { font-size:11px; flex-shrink:0; margin-top:1px; }
.timeline-obs .to-text { font-size:8.5px; color:var(--p-text-light); line-height:1.6; }
.timeline-obs .to-text strong { color:var(--p-text-dark); }

/* ECO MODE */
body.eco-mode .capa-top { background:white !important; border-bottom:3px solid #1A1A2E; }
body.eco-mode .capa-top::before,body.eco-mode .capa-top::after,body.eco-mode .capa-sun-circle { display:none; }
body.eco-mode .capa-tagline,.eco-mode .capa-client-block .client-info { color:#555 !important; }
body.eco-mode .capa-title-block .pre-title { color:#777 !important; }
body.eco-mode .capa-title-block h2 { color:#1A1A2E !important; }
body.eco-mode .capa-logo-placeholder { color:#1A1A2E !important; }
body.eco-mode .capa-client-block { background:white !important; border:1.5px solid #1A1A2E !important; }
body.eco-mode .capa-client-block .lbl { color:#1A1A2E !important; }
body.eco-mode .capa-client-block .client-name { color:#1A1A2E !important; }
body.eco-mode .validity-badge { background:white !important; border:1.5px solid #1A1A2E; color:#1A1A2E !important; }
body.eco-mode .validity-badge span { color:#1A1A2E !important; }
body.eco-mode .prop-header { background:white !important; border-bottom:2px solid #1A1A2E; }
body.eco-mode .prop-logo-text { color:#1A1A2E !important; }
body.eco-mode .prop-header .prop-num .lbl { color:#888 !important; }
body.eco-mode .prop-header .prop-num strong { color:#1A1A2E !important; }
body.eco-mode .pitch-box { background:white !important; border:1.5px solid #1A1A2E; }
body.eco-mode .pitch-top-bar { background:#f0f0f0 !important; }
body.eco-mode .pitch-top-bar .pt-label { color:#1A1A2E !important; }
body.eco-mode .pitch-headline { color:#1A1A2E !important; }
body.eco-mode .pitch-col { color:#444 !important; }
body.eco-mode .ph-badge { background:#f5f5f5 !important; border-color:#ccc !important; color:#1A1A2E !important; }
body.eco-mode .mat-table thead th { background:#e8e8e8 !important; color:#1A1A2E !important; }
body.eco-mode .total-card,body.eco-mode .payback-card { background:white !important; border:1.5px solid #1A1A2E; }
body.eco-mode .total-card .tc-lbl,body.eco-mode .payback-card .pc-lbl { color:#666 !important; }
body.eco-mode .total-card .tc-val { color:#1A1A2E !important; }
body.eco-mode .payback-card .pc-val { color:#16A34A !important; }
body.eco-mode .payback-card .pc-sub { color:#666 !important; }
body.eco-mode .roi-stats-bar { display:grid !important; }
body.eco-mode .roi-stat .rs-val { color:#1A1A2E !important; }
body.eco-mode .chart-wrap { background:white !important; }
body.eco-mode .chart-explain-header { background:#e8e8e8 !important; }
body.eco-mode .chart-explain-header .ce-htitle { color:#1A1A2E !important; }
body.eco-mode .chart-explain-header .ce-hsub { color:#666 !important; }
body.eco-mode .chart-payback-note { background:#e8e8e8 !important; border:1px solid #ccc; }
body.eco-mode .chart-payback-note .cpn-body { color:#333 !important; }
body.eco-mode .chart-payback-note .cpn-body strong { color:#1A1A2E !important; }
body.eco-mode .chart-payback-note .cpn-title { color:#1A1A2E !important; }
body.eco-mode .fin-banner { background:white !important; border:1.5px solid #1A1A2E; }
body.eco-mode .fin-banner-text .fin-tag { color:#1A1A2E !important; }
body.eco-mode .fin-banner-text h3 { color:#1A1A2E !important; }
body.eco-mode .fin-banner-text h3 span { color:#555 !important; }
body.eco-mode .fin-banner-text p { color:#555 !important; }
body.eco-mode .fin-banner-badge { background:#f5f5f5 !important; border-color:#ccc !important; }
body.eco-mode .fin-banner-badge .fb-val { color:#1A1A2E !important; }
body.eco-mode .fin-banner-badge .fb-lbl { color:#666 !important; }
body.eco-mode .fin-card-header { background:#e8e8e8 !important; }
body.eco-mode .fin-card-header .fch-prazo,body.eco-mode .fin-card-header .fch-parcela-val { color:#1A1A2E !important; }
body.eco-mode .fin-card-header .fch-sub,body.eco-mode .fin-card-header .fch-parcela-lbl { color:#555 !important; }
body.eco-mode .fin-card.highlight .fin-card-header { background:#d0d0d0 !important; }
body.eco-mode .best-badge { background:#1A1A2E !important; color:white !important; }
body.eco-mode .prop-footer { background:white !important; }
body.eco-mode .timeline-hero { background:white !important; border:1.5px solid #1A1A2E; }
body.eco-mode .tl-hero-tag { color:#1A1A2E !important; }
body.eco-mode .tl-hero-title { color:#1A1A2E !important; }
body.eco-mode .tl-hero-sub { color:#555 !important; }
body.eco-mode .tl-hero-badge { background:#f5f5f5 !important; border-color:#ccc !important; color:#1A1A2E !important; }
body.eco-mode .tl-hero-badge strong { color:#333 !important; }
body.eco-mode .tl-hero-right { background:#f5f5f5 !important; border-color:#ccc !important; }
body.eco-mode .tl-hero-right .thr-val { color:#1A1A2E !important; }
body.eco-mode .tl-hero-right .thr-lbl { color:#666 !important; }
body.eco-mode .ts-s6 .ts-card { border:1.5px solid #22C55E; }
body.eco-mode .ts-s6 .ts-card-left { background:#d0d0d0 !important; border-left-color:#16A34A; }
body.eco-mode .ts-s6 .ts-card-center { background:white !important; }
body.eco-mode .ts-s6 .ts-title { color:#1A1A2E !important; }
body.eco-mode .ts-s6 .ts-step-num { color:#16A34A !important; }

/* PAGE 6 — GERAÇÃO MENSAL */
.page6 { height:1123px; display:flex; flex-direction:column; }
.page6 .prop-body { flex:1; padding:14px 34px; display:flex; flex-direction:column; overflow:hidden; }

.gen-hero { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 100%); border-radius:10px; padding:14px 18px; margin-bottom:12px; display:flex; align-items:center; gap:16px; }
.gen-hero-icon { font-size:30px; flex-shrink:0; }
.gen-hero-text h3 { font-family:'Playfair Display',serif; font-size:15px; color:white; font-weight:700; margin-bottom:3px; }
.gen-hero-text h3 span { color:var(--p1); }
.gen-hero-text p { font-size:10px; color:rgba(255,255,255,.55); line-height:1.5; }
.gen-hero-stats { margin-left:auto; display:flex; gap:10px; flex-shrink:0; }
.gen-hero-stat { background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.1); border-radius:8px; padding:8px 12px; text-align:center; }
.gen-hero-stat .ghs-val { font-family:'Playfair Display',serif; font-size:15px; color:var(--p1); font-weight:700; }
.gen-hero-stat .ghs-lbl { font-size:8px; color:rgba(255,255,255,.4); text-transform:uppercase; letter-spacing:1px; margin-top:2px; }

.gen-chart-wrap { background:var(--p-bg-soft); border:1px solid var(--p-border); border-radius:9px; padding:12px 16px; margin-bottom:10px; display:flex; flex-direction:column; height:220px; flex-shrink:0; }
.gen-chart-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.gen-chart-header h3 { font-size:11px; font-weight:700; color:var(--p-text-dark); }
.gen-chart-header p { font-size:9px; color:var(--p-gray); margin-top:1px; }
.gen-chart-legend { display:flex; gap:12px; }
.gen-leg { display:flex; align-items:center; gap:5px; font-size:9px; color:var(--p-text-mid); }
.gen-leg-dot { width:10px; height:10px; border-radius:3px; }
.gen-canvas-wrap { flex:1; position:relative; min-height:0; min-height:120px; }
#geracaoChart { width:100% !important; }
    .gen-manual-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
    .gen-manual-grid .gm-cell{display:flex;flex-direction:column;gap:2px}
    .gen-manual-grid .gm-lbl{font-size:9px;font-weight:700;color:#64748B;text-transform:uppercase;letter-spacing:.3px}
    .gen-manual-grid .gm-cell input{width:100%;padding:5px 6px;font-size:11px;border:1px solid #e2e8f0;border-radius:6px;font-family:inherit}
    @media(max-width:520px){.gen-manual-grid{grid-template-columns:repeat(3,1fr)}}

.gen-placeholder { text-align:center; padding:50px 0; color:#94A3B8; font-size:10.5px; }

.gen-months-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:6px; margin-bottom:10px; }
.gen-month-card { background:var(--p-bg-soft); border:1px solid var(--p-border); border-radius:6px; padding:7px 6px; text-align:center; position:relative; overflow:hidden; }
.gen-month-card::before { content:''; position:absolute; bottom:0; left:0; right:0; background:var(--p1); opacity:0.12; transition:height .3s; }
.gmc-name { font-size:8px; font-weight:700; color:var(--p-gray); text-transform:uppercase; letter-spacing:.8px; margin-bottom:3px; }
.gmc-kwh { font-size:11px; font-weight:700; color:var(--p-text-dark); }
.gmc-days { font-size:7.5px; color:var(--p-gray); margin-top:1px; }
.gen-month-card.best-month { border-color:var(--p1); background:rgba(245,166,35,.06); }
.gen-month-card.best-month .gmc-kwh { color:var(--p1-deep); }
.gen-month-card.worst-month { border-color:#CBD5E1; }

.gen-info-row { display:grid; grid-template-columns:1fr 1fr 1fr 1fr; gap:7px; }
.gen-info-card { background:linear-gradient(135deg,var(--p2) 0%,var(--p3) 100%); border-radius:7px; padding:9px 12px; }
.gic-lbl { font-size:8px; color:rgba(255,255,255,.4); text-transform:uppercase; letter-spacing:1px; font-weight:600; margin-bottom:2px; }
.gic-val { font-size:14px; color:var(--p1); font-weight:700; font-family:'Playfair Display',serif; }
.gic-sub { font-size:8px; color:rgba(255,255,255,.3); margin-top:1px; }

body.eco-mode .gen-hero { background:white !important; border:1.5px solid #1A1A2E; }
body.eco-mode .gen-hero-text h3 { color:#1A1A2E !important; }
body.eco-mode .gen-hero-text p { color:#666 !important; }
body.eco-mode .gen-hero-stat { background:#f8f8f8 !important; border-color:#ccc; }
body.eco-mode .gen-info-card { background:white !important; border:1.5px solid #1A1A2E; }
body.eco-mode .gic-lbl { color:#888 !important; }
body.eco-mode .gic-sub { color:#aaa !important; }

/* A4 page badge indicator */
.a4-badge {
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  border-radius:20px;
  padding:3px 10px;
  font-size:9px;
  font-weight:700;
  color:rgba(255,255,255,.6);
  letter-spacing:1.2px;
  text-transform:uppercase;
  margin-left:8px;
}
.a4-badge::before { content:'📄'; font-size:10px; }

/* A4 page corner stamp (screen only) */
@media screen {
  .a4-page::after {
    content: 'A4';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(100,116,139,0.45);
    z-index: 10;
    pointer-events: none;
    font-family: 'DM Sans', sans-serif;
  }
}

@media print {
  body { background:white; margin:0; padding:0; }
  * { -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; color-adjust:exact !important; }
  .editor-header,
  .form-sidebar,
  .preview-label,
  .mobile-toggle-bar,
  .mob-preview-modal-overlay,
  .mob-print-bar,
  .a4-badge { display:none !important; }
  .editor-body { display:block !important; }

  /* Wrapper reset — sem transform, sem clipping */
  .a4-scale-wrap {
    display:block !important;
    width:210mm !important;
    height:297mm !important;
    overflow:visible !important;
    box-shadow:none !important;
    border-radius:0 !important;
    margin:0 !important;
    padding:0 !important;
    page-break-before:always;
    break-before:page;
    page-break-after:avoid;
    break-after:avoid;
    page-break-inside:avoid;
    break-inside:avoid;
  }
  .a4-scale-wrap:first-of-type {
    page-break-before:avoid;
    break-before:avoid;
  }

  /* Cada página A4 ocupa exatamente uma página impressa */
  .a4-page {
    width:210mm !important;
    height:297mm !important;
    min-height:297mm !important;
    max-height:297mm !important;
    transform:none !important;
    transform-origin:unset !important;
    margin:0 !important;
    padding:0 !important;
    box-shadow:none !important;
    border-radius:0 !important;
    overflow:hidden !important;
    page-break-inside:avoid;
    break-inside:avoid;
  }
  .a4-page::after { display:none !important; }

  /* ── MODO COMPLETO: oculta página resumo ── */
  body:not(.print-resumo) .a4-page.pg-resumo,
  body:not(.print-resumo) .a4-scale-wrap:has(.a4-page.pg-resumo) {
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    overflow:hidden !important;
    page-break-before:avoid !important;
    break-before:avoid !important;
  }

  /* ── MODO RESUMIDO: oculta tudo exceto capa e pg-resumo ── */
  body.print-resumo .a4-page.proposta-page,
  body.print-resumo .a4-page.page3,
  body.print-resumo .a4-page.page5,
  body.print-resumo .a4-page#page6Gen,
  body.print-resumo .a4-page#page4Fin {
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
  body.print-resumo .a4-scale-wrap:has(.a4-page.proposta-page),
  body.print-resumo .a4-scale-wrap:has(.a4-page.page3),
  body.print-resumo .a4-scale-wrap:has(.a4-page.page5),
  body.print-resumo .a4-scale-wrap:has(.a4-page#page6Gen),
  body.print-resumo .a4-scale-wrap:has(.a4-page#page4Fin) {
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    overflow:hidden !important;
    page-break-before:avoid !important;
    break-before:avoid !important;
    page-break-after:avoid !important;
    break-after:avoid !important;
  }
  body.print-resumo .a4-page.pg-resumo {
    display:flex !important;
    flex-direction:column !important;
  }

  .preview-panel {
    background:white !important;
    padding:0 !important;
    gap:0 !important;
    display:block !important;
    overflow:visible !important;
  }
}
@page { size:A4; margin:0; }
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,.1); border-radius:3px; }

/* ───── MOBILE TOGGLE BAR ───── */
.mobile-toggle-bar { display:none; }

/* ───── RESPONSIVE ───── */
@media (max-width: 900px) {
  .editor-header { padding:10px 14px; flex-wrap:wrap; gap:8px; }
  .editor-header h1 { font-size:15px; }
  .header-actions { flex-wrap:wrap; gap:6px; width:100%; }
  .palette-picker { flex-wrap:wrap; gap:4px; }
  .palette-picker label { display:none; }
  .btn-print { font-size:12px; padding:8px 14px; flex:1; justify-content:center; }
  .btn-eco { font-size:11px; padding:8px 10px; }

  .editor-body { grid-template-columns:1fr; min-height:auto; }

  .mobile-toggle-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:var(--dark2);
    border-bottom:1px solid rgba(255,255,255,.08);
    padding:0;
    position:sticky;
    top:0;
    z-index:90;
  }
  .mob-tab {
    flex:1;
    padding:11px 10px;
    text-align:center;
    font-size:12px;
    font-weight:600;
    color:var(--p-gray);
    cursor:pointer;
    border-bottom:2px solid transparent;
    transition:all .2s;
    font-family:'DM Sans',sans-serif;
    background:none;
    border-top:none;
    border-left:none;
    border-right:none;
  }
  .mob-tab.active { color:var(--sun); border-bottom-color:var(--sun); }

  .form-sidebar {
    max-height:none;
    overflow-y:auto;
    border-right:none;
    border-bottom:1px solid rgba(255,255,255,.07);
    display:none;
  }
  .form-sidebar.mob-visible { display:block; }

  .preview-panel { padding:12px 0 24px; gap:0; overflow-x:hidden; overflow-y:auto; display:flex; flex-direction:column; align-items:center; }
  .preview-panel.mob-hidden { display:none; }

  .a4-scale-wrap {
    display:block;
  }

  .form-row-2 { grid-template-columns:1fr; gap:6px; }
}

@media (max-width: 540px) {
  .editor-header { padding:8px 10px; }
  .brand p { display:none; }
  .btn-print span { display:none; }
  .form-section { padding:11px 13px; }
}
/* ── MOBILE PREVIEW TYPE MODAL ── */
.mob-preview-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.75); z-index:9998; display:flex; align-items:flex-end; justify-content:center; opacity:0; pointer-events:none; transition:opacity .25s; }
.mob-preview-modal-overlay.open { opacity:1; pointer-events:all; }
.mob-preview-modal { background:linear-gradient(160deg,#16213E 0%,#0F3460 100%); border:1px solid rgba(245,166,35,.2); border-radius:20px 20px 0 0; padding:24px 20px 32px; width:100%; max-width:480px; transform:translateY(100%); transition:transform .3s cubic-bezier(.32,.72,0,1); }
.mob-preview-modal-overlay.open .mob-preview-modal { transform:translateY(0); }
.mob-preview-modal h3 { font-family:'Playfair Display',serif; font-size:18px; font-weight:700; color:white; margin-bottom:5px; text-align:center; }
.mob-preview-modal p { font-size:11.5px; color:rgba(255,255,255,.45); text-align:center; margin-bottom:18px; }
.mob-preview-opts { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:6px; }
.mob-preview-opt { background:rgba(255,255,255,.04); border:2px solid rgba(255,255,255,.1); border-radius:12px; padding:16px 12px; cursor:pointer; text-align:center; transition:all .2s; }
.mob-preview-opt:active { transform:scale(.97); }
.mob-preview-opt.selected { background:rgba(245,166,35,.12); border-color:var(--sun); }
.mob-preview-opt .mpo-icon { font-size:26px; margin-bottom:7px; }
.mob-preview-opt .mpo-title { font-size:13px; font-weight:700; color:white; margin-bottom:4px; }
.mob-preview-opt .mpo-desc { font-size:9.5px; color:rgba(255,255,255,.4); line-height:1.5; }
.mob-preview-cancel { width:100%; background:transparent; border:1px solid rgba(255,255,255,.15); color:rgba(255,255,255,.5); padding:11px; border-radius:10px; font-family:'DM Sans',sans-serif; font-size:13px; cursor:pointer; margin-top:10px; }

/* ── MOBILE PRINT BUTTON IN PREVIEW TAB ── */
.mob-print-bar { display:none; }
@media (max-width: 900px) {
  .mob-print-bar {
    display:flex;
    align-items:center;
    justify-content:center;
    padding:10px 14px;
    background:var(--dark2);
    border-bottom:1px solid rgba(255,255,255,.07);
    gap:8px;
    position:sticky;
    top:44px; /* height of mobile toggle bar */
    z-index:89;
  }
  .mob-print-bar .btn-print-mob {
    flex:1;
    background:var(--sun);
    color:var(--dark);
    border:none;
    padding:11px 16px;
    border-radius:9px;
    font-family:'DM Sans',sans-serif;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    transition:all .2s;
  }
  .mob-print-bar .btn-print-mob:active { background:var(--sun-deep); transform:scale(.98); }
  /* Hide the main print button on mobile */
  .header-actions .btn-print { display:none !important; }
}

/* ── PRINT MODAL ── */
.print-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.72); z-index:9999; display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity .25s; }
.print-modal-overlay.open { opacity:1; pointer-events:all; }
.print-modal { background:linear-gradient(145deg,#16213E 0%,#0F3460 100%); border:1px solid rgba(245,166,35,.25); border-radius:16px; padding:32px 28px 28px; width:460px; max-width:calc(100vw - 32px); box-shadow:0 24px 80px rgba(0,0,0,.5); transform:translateY(18px) scale(.97); transition:transform .25s; }
.print-modal-overlay.open .print-modal { transform:translateY(0) scale(1); }
.print-modal-top { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; }
.print-modal-top h2 { font-family:'Playfair Display',serif; font-size:20px; font-weight:700; color:white; }
.print-modal-top p { font-size:11.5px; color:rgba(255,255,255,.5); margin-top:4px; }
.print-modal-close { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); color:rgba(255,255,255,.6); width:30px; height:30px; border-radius:8px; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all .15s; }
.print-modal-close:hover { background:rgba(239,68,68,.2); border-color:rgba(239,68,68,.4); color:#f87171; }
.print-options { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:18px; }
.print-opt { background:rgba(255,255,255,.04); border:2px solid rgba(255,255,255,.1); border-radius:12px; padding:18px 16px; cursor:pointer; transition:all .2s; text-align:center; }
.print-opt:hover { background:rgba(245,166,35,.08); border-color:rgba(245,166,35,.4); }
.print-opt.selected { background:rgba(245,166,35,.12); border-color:var(--sun); }
.print-opt-icon { font-size:28px; margin-bottom:8px; }
.print-opt-title { font-size:13px; font-weight:700; color:white; margin-bottom:5px; }
.print-opt-badge { display:inline-block; font-size:9px; font-weight:700; letter-spacing:1px; text-transform:uppercase; padding:2px 8px; border-radius:20px; margin-bottom:7px; }
.print-opt-badge.full { background:rgba(245,166,35,.15); color:var(--sun); border:1px solid rgba(245,166,35,.3); }
.print-opt-badge.resumo { background:rgba(34,197,94,.12); color:#4ade80; border:1px solid rgba(34,197,94,.25); }
.print-opt-desc { font-size:10.5px; color:rgba(255,255,255,.45); line-height:1.55; }
.print-opt-pages { margin-top:8px; font-size:9.5px; color:rgba(255,255,255,.3); }
.print-opt-pages span { color:rgba(255,255,255,.55); font-weight:600; }
.btn-confirmar-print { width:100%; background:linear-gradient(135deg,var(--sun),var(--sun-deep)); color:var(--dark); border:none; padding:12px; border-radius:10px; font-family:'DM Sans',sans-serif; font-size:14px; font-weight:700; cursor:pointer; transition:all .2s; display:flex; align-items:center; justify-content:center; gap:8px; }
.btn-confirmar-print:hover { transform:translateY(-1px); box-shadow:0 6px 20px rgba(245,166,35,.35); }

/* Resumo print mode — hide pages not in summary */
body.print-resumo .page3,
body.print-resumo .page4,
body.print-resumo .page5,
body.print-resumo .page6 { display:none !important; }
body.print-resumo #page6Gen { display:none !important; }
body.print-resumo #page4Fin { display:none !important; }
body.print-resumo .proposta-page { display:none !important; }

/* Página resumo sintética — só aparece no modo resumo */
.a4-page.pg-resumo { display:none; }
body.print-resumo .a4-page.pg-resumo { display:flex !important; flex-direction:column; }

/* ==========================================================================
   Legibilidade (ProSolar): fontes maiores nas páginas da proposta.
   Texto corrido ~11,5–12 px, rótulos ≥ 10 px, valores destacados maiores.
   ========================================================================== */
.a4-page .sec-title h3 { font-size:11.5px; letter-spacing:1px; }
.a4-page .sec-title .bar { height:14px; }
.a4-page .client-strip .lbl, .a4-page .ci .lbl { font-size:9.5px; }
.a4-page .client-strip .val, .a4-page .ci .val { font-size:12.5px; }
.a4-page .pitch-col { font-size:11.5px; line-height:1.55; }
.a4-page .pt-label { font-size:10.5px; }
.a4-page .ph-badge { font-size:10.5px; }
.a4-page .mat-table thead th { font-size:10.5px; padding:6px 10px; }
.a4-page .mat-table tbody td { font-size:11.5px; padding:4px 10px; }
.a4-page .tc-lbl, .a4-page .pc-lbl { font-size:10px; }
.a4-page .pc-sub { font-size:10.5px; }
.a4-page .econ-card .ec-lbl { font-size:10px; }
.a4-page .econ-card .ec-val { font-size:15px; }
.a4-page .econ-card .ec-sub { font-size:10px; color:#16A34A; }
.a4-page .sign-lbl { font-size:10px; }
.a4-page .sign-name { font-size:12px; }
.a4-page .prop-header .prop-num .lbl { font-size:10px; }
.a4-page .prop-header .prop-num strong { font-size:13px; }
.a4-page .prop-footer .footer-co, .a4-page .prop-footer .footer-contact { font-size:10.5px; }
.a4-page .prop-footer .footer-co strong { font-size:11px; }
.a4-page .capa-tagline { font-size:12px; }
.a4-page .pre-title { font-size:11px; }
.a4-page .client-info { font-size:12px; }
.a4-page .date-info { font-size:11px; }
.a4-page .rs-lbl, .a4-page .gic-lbl, .a4-page .gic-sub, .a4-page .ghs-lbl, .a4-page .ic-lbl { font-size:10px; }
.a4-page .ic-val { font-size:12px; }
.a4-page .leg, .a4-page .gen-leg { font-size:10.5px; }
.a4-page .cline-name { font-size:10.5px; }
.a4-page .cline-card-body, .a4-page .chart-explain-intro { font-size:11px; line-height:1.5; }
.a4-page .ce-htitle, .a4-page .cpn-title { font-size:11.5px; }
.a4-page .ce-hsub { font-size:10px; }
.a4-page .payback-line-label { font-size:10px; }
.a4-page .gmc-name { font-size:10.5px; }
.a4-page .gmc-kwh { font-size:13px; }
.a4-page .gmc-days { font-size:9.5px; }
.a4-page .gbi-val { font-size:13px; }
.a4-page .gbi-lbl, .a4-page .gb-title, .a4-page .obs-title { font-size:10px; }
.a4-page .obs-text { font-size:11.5px; line-height:1.5; }
.a4-page .ts-title { font-size:12.5px; }
.a4-page .ts-card-body { font-size:11px; line-height:1.45; }
.a4-page .ts-bullet { font-size:10.5px; }
.a4-page .ts-step-num, .a4-page .ts-dur { font-size:10px; }
.a4-page .tl-hero-tag, .a4-page .tl-hero-badge { font-size:10px; }
.a4-page .tl-hero-sub { font-size:11.5px; }
.a4-page .thr-lbl, .a4-page .thr-sub { font-size:10px; }
.a4-page .to-text { font-size:11px; }
/* ajustes automáticos da página 2 quando a lista de materiais é longa (ver ajustarPaginaProposta) */
.a4-page.aj-compacta .mat-table tbody td { font-size:10.5px; padding:2.5px 10px; }
.a4-page.aj-mais-compacta .mat-table tbody td { font-size:10px; padding:1px 10px; line-height:1.3; }
.a4-page.aj-mais-compacta .mat-table thead th { padding:4px 10px; }
.a4-page.aj-sem-selos .pitch-highlights { display:none; }
.a4-page.aj-sem-pitch .pitch-outer { display:none; }

/* ==========================================================================
   Página "Sua conta de luz": fatura sem e com energia solar
   ========================================================================== */
.page-fatura { height:1123px; display:flex; flex-direction:column; }
.page-fatura .prop-body { flex:1; padding:16px 34px; display:flex; flex-direction:column; overflow:hidden; }
.page-fatura .fat-intro { font-size:12px; color:var(--p-text-mid); line-height:1.55; margin:2px 0 14px; }
.fat-comparativo { display:grid; grid-template-columns:1fr 40px 1fr; align-items:stretch; gap:10px; margin-bottom:12px; }
.fat-card { border-radius:10px; padding:16px 18px 14px; display:flex; flex-direction:column; }
.fat-sem { background:#FEF2F2; border:1px solid #FECACA; }
.fat-com { background:var(--p-green-bg); border:1px solid var(--p-green-border); }
.fat-rot { font-size:11px; font-weight:700; letter-spacing:1px; text-transform:uppercase; }
.fat-sem .fat-rot { color:#B91C1C; }
.fat-com .fat-rot { color:var(--p-green-d); }
.fat-val { font-family:'Sora',sans-serif; font-size:30px; font-weight:700; margin-top:6px; letter-spacing:-.5px; }
.fat-sem .fat-val { color:#991B1B; }
.fat-com .fat-val { color:#14532D; }
.fat-sub { font-size:11px; color:var(--p-gray); }
.fat-barra { height:120px; margin-top:12px; display:flex; align-items:flex-end; border-bottom:2px solid rgba(0,0,0,.08); }
.fat-barra i { display:block; width:100%; border-radius:6px 6px 0 0; }
.fat-sem .fat-barra i { background:linear-gradient(180deg,#F87171,#DC2626); }
.fat-com .fat-barra i { background:linear-gradient(180deg,#4ADE80,#16A34A); min-height:4px; }
.fat-seta { display:flex; align-items:center; justify-content:center; font-size:26px; color:var(--p1); font-weight:700; }
.fat-economia { display:flex; align-items:center; justify-content:space-between; gap:12px; background:linear-gradient(135deg,var(--p2),var(--p3)); color:#fff; border-radius:10px; padding:14px 20px; margin-bottom:16px; }
.fat-economia span { display:block; font-size:11px; letter-spacing:1px; text-transform:uppercase; color:rgba(255,255,255,.7); }
.fat-economia b { font-family:'Sora',sans-serif; font-size:24px; color:var(--p1); }
.fat-economia em { font-style:normal; font-size:13px; font-weight:700; background:rgba(255,255,255,.12); padding:6px 12px; border-radius:20px; }
.fat-tabela { width:100%; border-collapse:collapse; margin-bottom:14px; }
.fat-tabela td { padding:6px 10px; font-size:12px; color:var(--p-text-mid); border-bottom:1px solid var(--p-border); }
.fat-tabela td:last-child { text-align:right; font-weight:600; color:var(--p-text-dark); white-space:nowrap; }
.fat-tabela tr.fat-total td { font-weight:700; color:var(--p-text-dark); background:var(--p-bg-soft); font-size:12.5px; }
.fat-tabela tr.fat-menos td:last-child { color:#16A34A; }
.fat-tabela small { color:var(--p-gray); font-size:10.5px; }
.fat-anual { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-bottom:12px; }
.fat-anual div { border:1px solid var(--p-border); border-radius:8px; padding:10px 12px; background:var(--p-bg-soft); }
.fat-anual span { display:block; font-size:10px; text-transform:uppercase; letter-spacing:.8px; color:var(--p-gray); font-weight:700; }
.fat-anual b { font-size:16px; color:var(--p-text-dark); }
.fat-anual .destaque { background:var(--p-green-bg); border-color:var(--p-green-border); }
.fat-anual .destaque b { color:#14532D; }
.fat-nota { font-size:10.5px; color:var(--p-gray); line-height:1.5; margin-top:auto; }
body.print-resumo .a4-page#pageFatura { display:none !important; }
.fat-tabela tr.fat-vale td { font-weight:700; color:var(--p-text-dark); }
.fat-tabela tr.fat-vale td:first-child::after { content:'  ✓ vale este'; font-size:10px; color:#16A34A; font-weight:700; }
.fat-tabela tr.fat-descartada td { color:var(--p-gray); }
.fat-tabela tr.fat-descartada td:last-child { text-decoration:line-through; color:var(--p-gray); font-weight:500; }

/* ===== Tipos de sistema na proposta ===== */
body[data-tipo="offgrid"] #previewPanel .so-rede,
body[data-tipo="offgrid"] #page6Gen { display: none !important; }
body:not([data-tipo="hibrido"]):not([data-tipo="offgrid"]) #previewPanel .so-bateria { display: none !important; }

/* ===== Página de baterias ===== */
.page-bateria { height: 1123px; display: flex; flex-direction: column; }
.page-bateria .prop-body { flex: 1; padding: 16px 34px; display: flex; flex-direction: column; gap: 11px; overflow: hidden; }
.bat-intro { font-size: 11.5px; color: var(--p-text-mid); line-height: 1.6; }
.bat-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bat-kpi { background: linear-gradient(135deg, var(--p2), var(--p3)); border-radius: 9px; padding: 11px 12px; }
.bat-kpi .k-lbl { font-size: 8.5px; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.bat-kpi .k-val { font: 700 19px 'Playfair Display', serif; color: var(--p1); margin-top: 3px; line-height: 1.1; }
.bat-kpi .k-sub { font-size: 9px; color: rgba(255,255,255,.6); margin-top: 3px; }
.bat-kpi.verde { background: var(--p-green-bg); border: 1px solid var(--p-green-border); }
.bat-kpi.verde .k-lbl { color: var(--p-green-d); }
.bat-kpi.verde .k-val { color: #14532D; }
.bat-kpi.verde .k-sub { color: #166534; }
.bat-tabela { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.bat-tabela th { background: var(--p2); color: #fff; font-size: 8.5px; text-transform: uppercase; letter-spacing: .6px; padding: 6px 8px; text-align: right; }
.bat-tabela th:first-child, .bat-tabela td:first-child { text-align: left; }
.bat-tabela td { padding: 5px 8px; border-bottom: 1px solid var(--p-border); text-align: right; color: var(--p-text-dark); }
.bat-tabela tr.total td { font-weight: 700; background: var(--p-bg-soft); }
.bat-tabela .motor { font-size: 8px; font-weight: 700; color: var(--p1-deep); background: rgba(245,166,35,.12); border-radius: 4px; padding: 1px 4px; margin-left: 4px; text-transform: uppercase; }
.bat-meses { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; align-items: end; height: 190px; padding: 8px 4px 0; border-bottom: 1px solid var(--p-border); }
.bat-mes { display: flex; gap: 2px; align-items: flex-end; height: 100%; justify-content: center; }
.bat-mes i { display: block; width: 42%; border-radius: 3px 3px 0 0; }
.bat-mes .g { background: var(--p1); }
.bat-mes .c { background: var(--p2); opacity: .55; }
.bat-mes.critico .g { background: #22C55E; }
.bat-mes.falta .g { background: #EF4444; }
.bat-meses-rot { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; font-size: 8.5px; color: var(--p-gray); text-align: center; margin-top: 3px; }
.bat-legenda { display: flex; gap: 14px; font-size: 9px; color: var(--p-text-mid); margin-top: 5px; }
.bat-legenda span { display: inline-flex; align-items: center; gap: 4px; }
.bat-legenda i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.bat-passos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bat-passo { border: 1px solid var(--p-border); border-radius: 9px; padding: 10px 11px; background: #fff; border-top: 3px solid var(--p1); }
.bat-passo b { display: block; font-size: 10.5px; color: var(--p-text-dark); margin-bottom: 3px; }
.bat-passo span { font-size: 9.5px; color: var(--p-text-mid); line-height: 1.5; }
.bat-nota { font-size: 9.5px; color: var(--p-text-mid); line-height: 1.6; background: var(--p-bg-soft); border-left: 3px solid var(--p1); border-radius: 6px; padding: 8px 11px; }
.bat-nota b { color: var(--p-text-dark); }
.resumo-bateria { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.resumo-bateria:empty { display: none; }
.resumo-bateria div { background: var(--p-bg-soft); border: 1px solid var(--p-border); border-radius: 7px; padding: 7px 10px; }
.resumo-bateria span { display: block; font-size: 8px; color: var(--p-gray); text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.resumo-bateria b { font-size: 13px; color: var(--p-text-dark); }
.bat-comparativo td:not(:first-child), .bat-comparativo th:not(:first-child) { text-align: center; width: 26%; }
.bat-comparativo .sim { color: #16A34A; font-weight: 800; font-size: 12px; }
.bat-comparativo .nao { color: #CBD5E1; font-weight: 800; }
.bat-comparativo td:last-child { background: rgba(34,197,94,.06); }
