:root {
  --ink: #050505;
  --paper: #fff;
  --screen: #eef2f6;
  --line: 2px solid #111;
}

@font-face {
  font-family: "PdfFreeSerif";
  src: url("assets/fonts/FreeSerif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "PdfKalpurush";
  src: url("assets/fonts/Kalpurush.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Nikosh";
  src: url("assets/fonts/Nikosh.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Boishkhi";
  src: url("Boishkhi.ttf") format("truetype");
  font-weight: 400 700;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--screen);
  color: var(--ink);
  font-family: "Nikosh", "PdfKalpurush", "Nirmala UI", "PdfFreeSerif", "Boishkhi", "Siyam Rupali", "SolaimanLipi", Vrinda, sans-serif;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

.document {
  display: grid;
  gap: 28px;
  justify-items: center;
  padding: 28px;
}

.page {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.24);
}

.landscape {
  width: 1123px;
  height: 794px;
  padding: 0;
}

.portrait {
  width: 794px;
  height: 1123px;
  padding: 0;
}

.watermark {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
}

.khatian-mark {
  width: 560px;
  left: 305px;
  top: 190px;
}

.dcr-mark {
  width: 525px;
  left: 145px;
  top: 382px;
}

.page > *:not(.watermark) {
  position: relative;
  z-index: 1;
}

.khatian-header {
  position: absolute !important;
  top: 34px;
  left: 57px;
  width: 1009px;
  display: grid;
  grid-template-columns: 260px 1fr 315px;
  align-items: start;
}

.form-no {
  padding-top: 24px;
  font-size: 12px;
  line-height: 1.15;
}

h1 {
  margin: 19px 0 0;
  text-align: center;
  font-family: "PdfKalpurush", "PdfFreeSerif", "Nikosh", "Boishkhi", "Nirmala UI", sans-serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.qr-meta {
  display: grid;
  grid-template-columns: 82px 225px;
  column-gap: 8px;
  justify-content: end;
  font-size: 10px;
  line-height: 1.22;
  overflow: visible;
}

.qr-meta img {
  grid-row: 1 / 6;
  width: 82px;
  height: 82px;
  background: #fff;
  image-rendering: crisp-edges;
  object-fit: contain;
}

.qr-meta p {
  margin: 0;
  white-space: nowrap;
  overflow: visible;
}

.area-line {
  position: absolute !important;
  top: 122px;
  left: 57px;
  width: 1009px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  font-size: 12px;
  text-align: center;
}

.record-table {
  position: absolute !important;
  top: 156px;
  left: 57px;
  width: 100%;
  width: 1009px;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: "Nikosh", "PdfKalpurush", "Nirmala UI", "PdfFreeSerif", sans-serif;
  font-size: 10.35px;
  line-height: 1.24;
  letter-spacing: 0;
  word-spacing: 0.65px;
}

th,
td {
  border: var(--line);
  padding: 4px 5px;
  vertical-align: top;
}

th {
  text-align: center;
  font-weight: 400;
}

.record-table .c1 { width: 20%; }
.record-table .c2 { width: 3.5%; }
.record-table .c3 { width: 8%; }
.record-table .c4 { width: 4.5%; }
.record-table .c5 { width: 7%; }
.record-table .c6 { width: 12%; }
.record-table .c7 { width: 8.5%; }
.record-table .c8 { width: 15%; }
.record-table .c9 { width: 21.5%; }

.record-table thead tr:first-child th {
  height: 43px;
  line-height: 1.08;
  padding-top: 5px;
}

.serial th {
  height: 23px;
  padding: 2px 5px;
}

.main-row td {
  height: 250px;
  padding: 8px 6px;
  line-height: 1.24;
}

.main-row td:not(:first-child):not(:last-child) {
  text-align: center;
  padding-top: 12px;
}

.main-row td:first-child {
  font-family: "Nikosh", "PdfKalpurush", "Nirmala UI", sans-serif;
  font-size: 9.45px;
  line-height: 1.18;
  letter-spacing: 0;
  word-spacing: 0.55px;
  overflow-wrap: normal;
  word-break: normal;
}

.main-row td:last-child {
  font-size: 9.65px;
  line-height: 1.2;
  letter-spacing: 0;
  word-spacing: 0.5px;
}

.center {
  text-align: center;
}

.approval {
  position: absolute !important;
  top: 590px;
  left: 414px;
  width: 240px;
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.18;
}

.approval p {
  margin: 2px 0;
}

.sign-small {
  display: block;
  width: 26px;
  height: 22px;
  object-fit: cover;
  margin: 4px auto 0;
}

.seal {
  width: 112px;
  opacity: 0.92;
}

.approval .seal {
  position: absolute;
  right: -95px;
  top: 8px;
}

.line {
  height: 2px;
  background: #7e145d;
  margin: 4px auto;
  width: 152px;
}

.blue {
  color: #0736ff;
}

.pink {
  color: #b00078;
}

.page-no {
  position: absolute !important;
  right: 57px;
  bottom: 16px;
  z-index: 3;
  font: 700 18px Arial, sans-serif;
}

.notes {
  position: absolute !important;
  top: 182px;
  left: 57px;
  width: 1009px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.notes p {
  margin: 6px 0;
}

.dcr-header {
  position: absolute !important;
  top: 82px;
  left: 57px;
  width: 680px;
  text-align: center;
  line-height: 1.18;
  margin: 0;
  border-bottom: var(--line);
  padding: 0 0 36px;
}

.dcr-header p {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
}

.dcr-header h2 {
  margin: 12px 0 0;
  font-family: "PdfFreeSerif", "PdfKalpurush", "Nikosh", "Boishkhi", "Nirmala UI", sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
}

.dcr-table,
.land-table,
.fee-table {
  position: absolute !important;
  width: 606px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.18;
  margin: 0;
  left: 68px;
}

.dcr-table {
  top: 228px;
}

.dcr-table th {
  width: 21%;
  text-align: left;
}

.dcr-table td,
.dcr-table th {
  height: 40px;
  padding: 5px 9px;
}

.land-table,
.fee-table {
  text-align: center;
}

.land-table {
  top: 490px;
}

.fee-table {
  top: 612px;
}

.land-table th,
.land-table td,
.fee-table th,
.fee-table td {
  height: 32px;
  padding: 4px 6px;
  vertical-align: middle;
}

.land-table th:first-child,
.fee-table th:first-child {
  text-align: left;
  width: 20%;
}

.dcr-bottom {
  position: absolute !important;
  left: 68px;
  top: 724px;
  display: grid;
  grid-template-columns: 150px 1fr 185px;
  align-items: end;
  width: 606px;
  margin: 0;
  border-bottom: var(--line);
  padding: 0 0 12px;
}

figure {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
}

.qr-large {
  width: 104px;
  height: 104px;
  background: #fff;
  image-rendering: crisp-edges;
  object-fit: contain;
}

.dcr-seal {
  justify-self: center;
  width: 100px;
}

.official-sign {
  text-align: center;
  font-size: 12px;
  line-height: 1.25;
}

.official-sign p {
  margin: 0;
}

.official-sign img {
  width: 66px;
  height: 30px;
  object-fit: cover;
  filter: grayscale(1);
  margin: 6px 0 0;
}

.official-sign .line {
  width: 122px;
  margin-top: 2px;
}

.dcr-notes {
  position: absolute !important;
  left: 57px;
  top: 867px;
  width: 672px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.dcr-notes p {
  margin: 5px 0;
}

@media (max-width: 1180px) {
  .document {
    align-items: start;
    overflow-x: auto;
    justify-items: start;
  }
}

@media print {
  body {
    background: #fff;
  }

  .document {
    display: block;
    padding: 0;
  }

  .page {
    box-shadow: none;
    break-after: page;
  }

  .page:last-child {
    break-after: auto;
  }

  .landscape {
    page: landscape-page;
  }

  .portrait {
    page: portrait-page;
  }
}

@page landscape-page {
  size: A4 landscape;
  margin: 0;
}

@page portrait-page {
  size: A4 portrait;
  margin: 0;
}
