@font-face{
  font-family:'Roboto';
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url('assets/fonts/roboto-latin.woff2') format('woff2');
}
:root{
  --green:#0a4b2d;
  --green2:#12643c;
  --ink:#1c1c1c;
  --line:#d8d8d8;
  --app-bg:#eef1f4;
  --brand:#15703d;
  --brand-dark:#0c4f2c;
  --brand-light:#2f9d57;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:'Roboto',"Segoe UI",Helvetica,Arial,sans-serif;
  background:var(--app-bg);color:var(--ink);
}

/* ---------- app chrome ---------- */
.app{max-width:1240px;margin:0 auto;padding:24px 16px 60px}
.appbar{display:flex;align-items:center;gap:14px;margin-bottom:20px}
.appbar img{height:46px}
.appbar h1{font-size:20px;margin:0;color:var(--green);font-weight:700;letter-spacing:.3px}
.appbar .sub{font-size:13px;color:#666;margin-top:2px}

.panel{background:#fff;border:1px solid #e3e6ea;border-radius:12px;padding:22px;
  box-shadow:0 1px 3px rgba(0,0,0,.05);margin-bottom:22px}
.drop{border:2px dashed #b9c2cc;border-radius:12px;padding:34px;text-align:center;
  transition:.15s;cursor:pointer;background:#fafbfc}
.drop.drag{border-color:var(--green);background:#f0f7f2}
.drop h3{margin:0 0 6px;color:#333;font-size:17px}
.drop p{margin:4px 0;color:#777;font-size:13px}
.drop .pick{display:inline-block;margin-top:12px;background:var(--green);color:#fff;
  padding:9px 20px;border-radius:8px;font-size:14px;font-weight:600}
.filerow{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px;font-size:14px}
.filerow .name{font-weight:600}
.uploaded{text-align:center;margin-top:16px;font-size:15px;color:#333}
.uploaded .name{font-weight:700;color:var(--green)}
.gen{text-align:center;margin-top:16px}
.ready{margin-top:16px;text-align:center;background:#eef7f1;border:1px solid #bcdcc7;
  color:#1c6b3f;border-radius:8px;padding:11px 14px;font-size:14px;font-weight:600}
.downloadbar{margin-top:8px;justify-content:space-between}
.downloadbar .sub{font-size:14px}
.btn{background:var(--green);color:#fff;border:0;border-radius:8px;padding:10px 22px;
  font-size:14px;font-weight:600;cursor:pointer}
.btn:disabled{opacity:.5;cursor:default}
.btn.ghost{background:#fff;color:var(--green);border:1px solid var(--green)}
.btn.big{padding:13px 30px;font-size:15px}
.actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.warn{background:#fff8e6;border:1px solid #f2d98a;border-radius:8px;padding:10px 14px;
  color:#8a6d1a;font-size:13px;margin-top:12px}
.err{background:#fdecea;border:1px solid #f5b5ae;color:#a3271c;border-radius:8px;
  padding:12px 14px;font-size:14px;margin-top:12px}
.spin{display:inline-block;width:16px;height:16px;border:3px solid #cfe3d7;border-top-color:var(--green);
  border-radius:50%;animation:sp 0.8s linear infinite;vertical-align:-3px;margin-right:8px}
@keyframes sp{to{transform:rotate(360deg)}}
.hint{color:#888;font-size:12.5px;margin-top:10px;line-height:1.5}
.hint code{background:#eef1f4;padding:1px 6px;border-radius:4px;font-size:12px}

/* ---------- report preview ---------- */
.preview-wrap{overflow-x:auto;padding-bottom:10px}
.pages{display:flex;flex-direction:column;gap:26px;align-items:center}

/* A4 landscape @96dpi */
.page{
  width:1123px;height:794px;background:#fff;position:relative;
  font-family:'Roboto',"Segoe UI",Helvetica,Arial,sans-serif;color:#1a1a1a;
  box-shadow:0 4px 18px rgba(0,0,0,.12);flex:0 0 auto;overflow:hidden;
}
.page .frame{position:absolute;inset:14px;border:1px dashed #9a9a9a}
.page .inner{position:absolute;inset:14px;padding:34px 44px;z-index:1}
/* full-page-width decorative bands (logo / header / footer artwork) */
.pg-top{position:absolute;top:0;left:0;width:100%;height:auto;z-index:0;pointer-events:none}
.pg-bot{position:absolute;bottom:0;left:0;width:100%;height:auto;z-index:0;pointer-events:none}

/* ---------- page 1 (redesigned) ---------- */
.p1page{--brand:#15703d;--brand-dark:#0c4f2c;--brand-light:#2f9d57}
.p1page .frame{display:none}
.inner.p1{padding:150px 56px 150px;font-family:'Roboto',"Segoe UI",Arial,Helvetica,sans-serif;color:#1a1a1a}

/* page-1 badge overlaid top-right (logo + corner artwork come from band images) */
.p1-badge{position:absolute;top:34px;right:54px;height:92px;width:auto;z-index:2}

/* main two-column body */
.p1-main{display:flex;gap:40px}
.p1-col-l{flex:1 1 auto;min-width:0}
.p1-col-r{flex:0 0 340px}
.p1-title{font-weight:800;line-height:1.04;letter-spacing:.5px}
.p1-title .g,.p1-title .k{display:block;font-size:56px;white-space:nowrap}
.p1-title .g{color:var(--brand)}
.p1-title .k{color:#1a1a1a}
.p1-rule{width:150px;height:5px;background:var(--brand);border-radius:2px;margin:20px 0 30px}
.p1-sub{color:var(--brand);font-size:29px;font-weight:700;margin-bottom:26px}
.p1-quote{position:relative;border-left:3px solid var(--brand);padding:44px 46px 8px 28px;max-width:600px}
.p1-quote p{font-size:19px;line-height:1.55;color:#2b2b2b;margin:0 0 16px}
.p1-quote p:last-of-type{margin-bottom:0}
.p1-quote .qm{position:absolute;color:var(--brand);font-family:Georgia,"Times New Roman",serif;
  font-weight:700;line-height:1}
.p1-quote .qm.open{top:2px;left:22px;font-size:58px}
.p1-quote .qm.close{right:14px;bottom:-18px;font-size:58px}

/* customer card */
.p1-card{background:#f1f3f4;border-radius:20px;padding:34px 30px}
.p1-cust{display:flex;align-items:center;gap:14px}
.p1-cust .ic-cust{width:50px;height:50px;flex:0 0 auto}
.p1-cust .lab{font-size:20px;font-weight:700;letter-spacing:1.2px;color:#1a1a1a}
.p1-custname{font-size:33px;font-weight:800;color:var(--brand);line-height:1.12;margin-top:22px}
.p1-divider{height:2px;background:var(--brand-dark);opacity:.9;margin:26px 0}
.p1-tagline{display:flex;align-items:center;gap:18px}
.p1-tagline .ic-grow{width:58px;height:58px;flex:0 0 auto}
.p1-tagline .txt{font-size:18px;font-weight:700;letter-spacing:.4px;line-height:1.28;color:#1a1a1a}

.fitbox{height:100%;overflow:hidden}
.fitinner{width:100%}

/* ---------- shared report chrome (pages 2-4) ---------- */
.rpage .frame{display:none}
.inner.rcol{display:flex;flex-direction:column;padding:30px 40px 20px;
  font-family:'Roboto',"Segoe UI",Arial,Helvetica,sans-serif;color:#1a1a1a}
.tcorner{position:absolute;top:0;right:0;width:250px;height:30px;z-index:1;
  background:var(--brand-dark);clip-path:polygon(100% 0,100% 100%,0 0)}
.rhead{display:flex;justify-content:space-between;align-items:baseline;
  border-bottom:2.5px solid var(--brand);padding-bottom:8px;margin-bottom:14px}
.rh-l{font-size:19px;font-weight:800;color:var(--brand);letter-spacing:.3px}
.rh-r{font-size:16px;font-weight:600;color:#1a1a1a;text-transform:uppercase}
.rh-r b{font-weight:800}
.rfoot{display:flex;justify-content:space-between;align-items:center;
  border-top:1px solid #d5d5d5;padding-top:8px;margin-top:12px;font-size:12.5px;color:#666}

/* ---------- page 2 ---------- */
.p2body{flex:1;min-height:0;display:grid;grid-template-columns:474px 1fr;gap:30px}
.p2-left{display:flex;flex-direction:column;min-height:0}
.kpis{display:flex;gap:16px;margin-bottom:14px}
.kpi{flex:1;display:flex;align-items:center;gap:11px;border:1.5px solid #d7ded9;
  border-radius:12px;padding:9px 14px;background:#fafbfa}
.kpi .num{font-size:38px;font-weight:800;color:var(--brand);line-height:1}
.kpi .lab{font-size:13px;font-weight:700;letter-spacing:.2px;color:#1a1a1a;
  text-transform:uppercase;line-height:1.15}
.p2-tablewrap{flex:1;min-height:0}
table.ig{width:100%;border-collapse:collapse;font-size:12.5px}
table.ig th{background:var(--brand);color:#fff;text-align:left;padding:7px 10px;
  font-weight:700;text-transform:uppercase;letter-spacing:.2px}
table.ig th.sno,table.ig td.sno{text-align:center;width:44px}
table.ig th.r,table.ig td.r{text-align:right;white-space:nowrap}
table.ig td{padding:4.5px 10px;border-bottom:1px solid #e9e9e9}
table.ig td.sno{background:#e9f2ec;font-weight:600;color:#2a2a2a}
table.ig tbody tr:nth-child(even) td{background:#f4f6f5}
table.ig tbody tr:nth-child(even) td.sno{background:#dfeae2}
table.ig td.r{font-weight:700}
table.ig tr.total td{background:#dfeae2;color:#0c3f26;font-weight:800;
  border:0;border-top:2px solid var(--brand)}
table.ig tr.total td:nth-child(2){text-align:center;letter-spacing:.5px}
.p2-right{min-height:0}
.charts{display:flex;flex-direction:column;gap:1px}
.chart-title{text-align:right;font-size:15px;font-weight:700;letter-spacing:.4px;margin:2px 0;padding-right:8px}
.chart-title.gap{margin-top:8px}
.clegend{display:flex;align-items:center;justify-content:center;gap:8px;
  font-size:12px;font-weight:700;color:#333;margin:1px 0 3px}
.clegend .sw{width:22px;height:11px;border-radius:2px;display:inline-block}
.clegend .sw.blue{background:#3b83c9}
.clegend .sw.green{background:var(--brand)}

/* ---------- page 3 ---------- */
.p3-h{font-size:22px;font-weight:800;color:#1a1a1a;margin:2px 0 6px}
.p3-intro{font-size:14px;line-height:1.5;color:#333;margin-bottom:16px}
.p3-cols{flex:1;min-height:0}
.p3-colrow{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;align-items:start}
.p3-panel{background:#f4f5f6;border-radius:12px;padding:14px 18px}
.p3-item{display:flex;align-items:center;gap:12px;padding:6px 0}
.p3-badge{flex:0 0 auto;width:26px;height:26px;border-radius:6px;background:var(--brand);
  color:#fff;font-size:12.5px;font-weight:700;display:flex;align-items:center;justify-content:center}
.p3-name{font-size:13px;font-weight:600;color:#222}
/* page-3 grouped-by-category layout */
.p3-cat{margin-bottom:14px}
.p3-cat:last-child{margin-bottom:0}
.p3-cat-h{font-size:13.5px;font-weight:800;color:var(--brand);text-transform:uppercase;
  letter-spacing:.5px;padding-bottom:5px;margin-bottom:6px;border-bottom:1.5px solid #cfe0d6}
.p3-cat-item{font-size:12.5px;color:#222;line-height:1.5;padding:2px 0 2px 17px;position:relative}
.p3-cat-item:before{content:"\00BB";position:absolute;left:0;color:var(--brand);font-weight:800}
.p3-banner{background:#dfece4;border-radius:10px;padding:14px 20px;text-align:center;
  font-size:16px;color:#1c5c39;margin-top:10px}
.p3-banner .ph{font-weight:700;letter-spacing:.2px}
.p3-banner .star{color:var(--brand-light);margin:0 20px;font-size:14px;vertical-align:middle}

/* ---------- page 4 ---------- */
.inner.p4col{padding-bottom:160px}   /* clear the footer band image */
/* page-4 footer inset to the page margins (not full-bleed), slightly shorter */
.p4-foot{position:absolute;left:40px;bottom:24px;width:calc(100% - 80px);height:auto;z-index:0;pointer-events:none}
.p4-grid{min-height:0;display:grid;grid-template-columns:1fr 1px 1fr;
  gap:30px;margin:auto 0}   /* centers the heading+cards block between header & footer */
.p4-col{display:flex;flex-direction:column;gap:20px;min-width:0}
.p4-div{background:#cfcfcf}
.p4-coltitle{font-size:20px;font-weight:800;color:#1a1a1a;letter-spacing:.3px;margin-bottom:8px}
.p4-item{display:flex;gap:16px;align-items:center;border:1.5px solid var(--brand);
  border-radius:18px;padding:14px 18px}
.p4-ico{flex:0 0 auto;width:90px;height:90px}
.p4-t{font-size:15px;font-weight:800;color:#1a1a1a;letter-spacing:.2px;margin-bottom:5px}
.p4-b{list-style:none;margin:0;padding:0}
.p4-b li{font-size:12.5px;color:#333;line-height:1.6;padding-left:18px;position:relative}
.p4-b li:before{content:"\00BB";position:absolute;left:0;color:var(--brand);font-weight:800;font-size:14px}
/* page 4 branded footer band */
.p4-band{display:flex;align-items:center;gap:22px;background:#f2f3f4;border-radius:16px;
  padding:12px 24px;margin-top:14px}
.pb-brand{display:flex;align-items:center}
.pb-logo{height:56px;width:auto}
.pb-badge{height:50px}
.pb-sep{width:2px;height:54px;background:#cfd4d1}
.pb-cut{font-size:12px;font-weight:800;color:var(--brand-dark);line-height:1.08;text-align:center}
.pb-cut .big{font-size:16px}
.pb-contact{display:flex;flex-direction:column;gap:6px;margin-left:auto;align-items:flex-end}
.pb-phone{display:flex;align-items:center;gap:8px;font-size:24px;font-weight:800;color:var(--brand)}
.pb-phone svg{width:25px;height:25px}
.pb-social{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:700;color:#333}
.pb-social svg{width:19px;height:19px}
.b{font-weight:700}

@media print{.app>*:not(.preview-wrap){display:none}}
