/* BRAC Bank statement — pixel replica of the source PDF (595 x 842 pt, A4) */
/* Fonts are embedded in fonts.css (base64 subsets from the source PDF). */

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

html { background: #e8e8ec; }

body {
  font-family: "RC Statement", "Roboto Condensed", Arial, sans-serif;
  font-kerning: none;
  color: #000;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

#pages { display: block; }

.sheet {
  position: relative;
  width: 595pt;
  height: 842pt;
  margin: 8mm auto;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2pt 14pt rgba(0, 0, 0, 0.18);
}

.sheet img { position: absolute; display: block; }

/* Absolutely positioned text positioned on its baseline. */
.t {
  position: absolute;
  white-space: pre;
  line-height: 0;
  transform: translateY(-0.3418em);
}
.tc { left: 0; width: 595pt; text-align: center; }


/* Ledger / summary rows */
.row { position: absolute; left: 36pt; width: 523.02pt; }
.row .cell {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 5pt;
  font-size: 8.5pt;
  line-height: 1;
  white-space: pre;
}
.row .cell > span { transform: translateY(0.0615em); }

/* Ledger rows reflow: text may wrap and the renderer grows the row to fit. */
.row.ledger .cell { white-space: pre-wrap; overflow-wrap: anywhere; }

.row .cell.date,
.row .cell.particulars { justify-content: flex-start; }
.row .cell.chq { justify-content: flex-start; }
.row .cell.withdraw,
.row .cell.deposit,
.row .cell.balance { justify-content: flex-end; }

.row.head .cell {
  justify-content: center;
  font-size: 9pt;
  font-weight: 700;
}
.row.head .cell.date { justify-content: center; }

.row .cell.total { font-size: 9pt; font-weight: 700; justify-content: flex-end; }
.row .cell.total.blank { justify-content: flex-start; }

.summary-row .cell { font-size: 9pt; }
.summary-row .cell.label { background: #f2f2f2; font-weight: 700; }
.summary-row .cell.value { background: #fff; }
.summary-row .cell.value.right { justify-content: flex-end; }


/* Off-screen probe used to measure how many visual lines a row needs. */
.measure-stage {
  position: absolute;
  left: -2000pt;
  top: 0;
  width: 600pt;
  visibility: hidden;
  pointer-events: none;
}
.m-row { display: flex; width: 523.02pt; }
.m-cell {
  box-sizing: border-box;
  padding: 0 5pt;
  font-size: 8.5pt;
  line-height: 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Rules */
.ln { position: absolute; background: #a6a6a6; }
.ln.black { background: #000; }

.box { position: absolute; border: 0.5pt solid #000; }

@media print {
  @page { size: A4; margin: 0; }
  html { background: #fff; }
  body { background: #fff; }
  .sheet {
    margin: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
}

/* ---------- V2 variant ---------- */
.v2-qr { }
.v2-cap { position: absolute; text-align: center; font-size: 6.5pt; line-height: 1.15; color: #333; }
.v2-bank {
  position: absolute;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7.5pt;
  line-height: 9.7pt;
  color: #000;
}
.v2-bl { white-space: pre-wrap; }
.v2-k { display: inline-block; min-width: 30pt; }
.v2-reward {
  position: absolute;
  padding: 4pt 10pt;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
  line-height: 14pt;
  border: 0;
  background-repeat: no-repeat;
  background-image:
    repeating-linear-gradient(90deg, #000 0 4.5pt, transparent 4.5pt 6.5pt, #000 6.5pt 7.5pt, transparent 7.5pt 10.5pt),
    repeating-linear-gradient(90deg, #000 0 4.5pt, transparent 4.5pt 6.5pt, #000 6.5pt 7.5pt, transparent 7.5pt 10.5pt),
    repeating-linear-gradient(0deg, #000 0 4.5pt, transparent 4.5pt 6.5pt, #000 6.5pt 7.5pt, transparent 7.5pt 10.5pt),
    repeating-linear-gradient(0deg, #000 0 4.5pt, transparent 4.5pt 6.5pt, #000 6.5pt 7.5pt, transparent 7.5pt 10.5pt);
  background-size: 100% 1.2pt, 100% 1.2pt, 1.2pt 100%, 1.2pt 100%;
  background-position: left top, left bottom, left top, right top;
}
.v2-rr { white-space: nowrap; }
.v2-sign { position: absolute; border-top: 1pt dashed #000; }

.v2-k { display: inline-block; min-width: 29.2pt; box-sizing: border-box; padding-right: 2.2pt; white-space: nowrap; }
.v2-sig-label { text-align: center; font-size: 9pt; font-weight: 700; white-space: nowrap; }
.v2-proud { image-rendering: auto; }

.v2-rw-head { text-align: center; font-size: 10pt; font-weight: 700; text-decoration: underline; }
.v2-rr { display: grid; grid-template-columns: 224pt 14pt 1fr; }
.v2-rw-c { text-align: center; }
.v2-rw-v { white-space: nowrap; padding-left: 44pt; text-align: center; }
