/* ============================================================
   Letter styling — shared by the on-screen preview and the
   PDF/print export so they look identical.
   Matches the JB&RSC letterhead body (printed on letterhead paper:
   the top area is intentionally left blank).
   ============================================================ */

.page {
  /* A4 */
  width: 210mm;
  min-height: 297mm;
  box-sizing: border-box;
  background: #ffffff;
  color: #000000;
  /* top blank for the pre-printed letterhead, generous side margins */
  padding: 55mm 25mm 25mm 25mm;
  font-family: "Calibri", "Carlito", "Segoe UI", Arial, sans-serif;
  font-size: 13pt;
  line-height: 1.5;
}

.page .ref-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 12pt;
  margin-bottom: 18mm;
}

.page .blank {
  display: inline-block;
  border-bottom: 1px solid #000;
  min-width: 32mm;
  height: 1em;
  vertical-align: baseline;
}
.page .blank.short { min-width: 18mm; }

.page .title {
  text-align: center;
  font-size: 16pt;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin: 0 0 9mm 0;
  letter-spacing: 0.3px;
}

.page .body {
  text-align: justify;
  margin: 0 0 7mm 0;
}

.page .sign {
  margin-top: 22mm;
}
.page .sign p { margin: 0; }
.page .sign .sign-name {
  font-weight: 700;
  font-style: italic;
  font-size: 14pt;
}
.page .sign .sign-title {
  font-weight: 700;
}

/* ============================================================
   Sanction Order draft (NTC) — has an embedded letterhead, a
   bordered table, and must stay on one A4 page, so it uses
   tighter spacing than the default letter.
   ============================================================ */

.page.sanction {
  padding: 9mm 18mm 10mm 18mm; /* header sits at the very top, not blank */
  font-size: 11.5pt;
  line-height: 1.36;
}

.letterhead {
  position: relative;
  text-align: center;
  padding: 0 0 4px 0;
  border-bottom: 3px solid #000;
  margin-bottom: 4mm;
  min-height: 26mm;
}
.letterhead .seal {
  position: absolute; left: 2mm; top: 1mm;
  width: 22mm; height: auto;
}
.letterhead .flame {
  position: absolute; right: 6mm; top: 0;
  width: 13mm; height: auto;
}
.lh-office { font-size: 10.5pt; font-weight: 700; letter-spacing: 0.5px; }
.lh-ed {
  display: inline-block;
  background: #000; color: #fff;
  font-weight: 800; font-size: 14pt;
  font-variant: small-caps;
  padding: 0 12px; letter-spacing: 1.5px;
  margin: 1px 0;
}
.lh-centre {
  font-size: 12.5pt; font-weight: 800;
  color: #000; font-variant: small-caps;
  letter-spacing: 0.3px; margin-top: 2px;
}
.lh-college { font-size: 11.5pt; font-weight: 600; }
.lh-tel { font-size: 8.5pt; margin-top: 1px; }

.page.sanction .ref-row { margin-bottom: 4mm; }

.page.sanction .title {
  color: #000;
  margin: 0 0 3mm 0;
  font-size: 15pt;
}

.page.sanction .body { margin: 0 0 3mm 0; }
.page.sanction .body.tight { margin: 0 0 2mm 0; }

.sanction-tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 3mm 0 3mm 0;
  font-size: 11pt;
}
.sanction-tbl th, .sanction-tbl td {
  border: 1px solid #000;
  padding: 3px 6px;
  text-align: center;
  vertical-align: middle;
}
.sanction-tbl th { font-weight: 700; }
.sanction-tbl tbody td { height: 9mm; }

/* Signature block: pushed to the right with blank space above for a handwritten sign */
.page.sanction .sign.right {
  width: 78mm;
  margin: 4mm 8mm 3mm auto;  /* auto left margin pushes the block rightward */
  text-align: center;
}
.page.sanction .sign.right .sign-space { height: 18mm; }  /* room to sign */
.page.sanction .sign.right .sign-title { font-weight: 700; font-style: normal; font-size: 12pt; }

.copy-list { margin: 1mm 0 0 0; padding-left: 10mm; }
.copy-list li { margin: 0; }

/* ============================================================
   Check List / Certificate draft (NTC) — a form-style page with
   label/value rows, no letterhead. One A4 page.
   ============================================================ */

.page.checklist {
  padding: 16mm 20mm 16mm 20mm;
  font-size: 12pt;
  line-height: 1.5;
}
.page.checklist .cl-title {
  text-align: center;
  font-size: 15pt;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  margin: 0 0 8mm 0;
}

.cl-grid {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  column-gap: 4mm;
  row-gap: 5mm;
  align-items: end;
  margin-bottom: 7mm;
}
.cl-grid .cl-label { white-space: nowrap; }
.cl-grid .cl-val {
  border-bottom: 1px solid #000;
  min-height: 1.25em;
  padding: 0 2mm 1px 2mm;
}
.cl-grid .cl-val.center { text-align: center; }
.cl-grid .cl-val.bold { font-weight: 700; }

.page.checklist .body { text-align: left; margin: 0 0 3mm 0; }
.page.checklist .body.tight { margin: 0 0 2mm 0; }
.page.checklist .cl-indent { padding-left: 14mm; }

.cl-bullets {
  list-style: none;
  margin: 1mm 0 5mm 0;
  padding-left: 16mm;
}
.cl-bullets li { position: relative; margin: 1.5mm 0; }
.cl-bullets li::before {
  content: "\25CF"; /* ● */
  position: absolute; left: -6mm; top: 0; font-size: 8pt;
}

.ln-val {
  display: inline-block;
  min-width: 36mm;
  text-align: center;
  text-decoration: none;
  border-bottom: 1px solid #000;
}

.cl-sign {
  display: flex;
  justify-content: space-between;
  margin-top: 42mm; /* blank room to sign/stamp */
  font-weight: 700;
}
.cl-sign .cl-sig { width: 46%; }
.cl-sign .cl-sig .ln {
  display: inline-block;
  min-width: 30mm;
  border-bottom: 1px solid #000;
}
.cl-sign .cl-sig-role { margin-top: 2px; }

/* ============================================================
   Complaint Reply draft — formal letter to THE SECRETARY with the
   embedded letterhead. One A4 page.
   ============================================================ */

.page.complaint {
  position: relative;
  padding: 9mm 22mm 14mm 22mm;
  font-size: 11.5pt;
  line-height: 1.4;
}
.page.complaint .ref-row { margin-bottom: 4mm; }

.page.complaint .cmp-to { margin: 0 0 1mm 0; }
.page.complaint .cmp-recipient { margin: 0 0 4mm 24mm; }
.page.complaint .cmp-recipient p { margin: 0; }
.page.complaint .cmp-recipient .bold { font-weight: 700; }

.page.complaint .cmp-subject {
  margin: 0 0 4mm 0;
  font-weight: 700;
  line-height: 1.35;
}
.page.complaint .cmp-subject .lbl { margin-right: 6mm; }

.page.complaint .body { text-align: justify; margin: 0 0 3mm 0; }
.page.complaint .body.tight { margin: 0 0 1.5mm 0; }
.page.complaint .body.indent { text-indent: 12mm; }

.page.complaint .cmp-sign {
  width: 95mm;
  margin: 16mm 6mm 4mm auto; /* push the block to the right; room to sign above */
  text-align: center;
}
.page.complaint .cmp-sign .sign-title { font-weight: 700; font-style: normal; font-size: 12pt; }
.page.complaint .cmp-sign p { margin: 0; }

.page.complaint .copy-list { padding-left: 12mm; }
.page.complaint .copy-list li { margin: 0.5mm 0; }

.page.complaint .cmp-footer {
  position: absolute;
  bottom: 7mm; right: 22mm;
  font-size: 10pt; color: #333;
}

/* Patient-feedback report table (CM Complaint Report) */
.report-tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 3mm 0 4mm 0;
  font-size: 10.5pt;
}
.report-tbl th, .report-tbl td {
  border: 1px solid #000;
  padding: 3px 6px;
  text-align: left;
  vertical-align: top;
}
.report-tbl th { font-weight: 700; }
.report-tbl td.span { min-height: 6mm; }

/* ============================================================
   Letter of Thanks — embedded letterhead, centered serif title,
   short body, signature image + signatory block. One A4 page.
   ============================================================ */

.page.thanks {
  padding: 9mm 22mm 16mm 22mm;
  font-size: 12pt;
  line-height: 1.6;
}
.page.thanks .thx-title {
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 18pt;
  letter-spacing: 0.5px;
  margin: 16mm 0 9mm 0;
}
.page.thanks .body { text-align: justify; margin: 0 0 5mm 0; }
.page.thanks .body.indent { text-indent: 12mm; }

.page.thanks .thx-sign { margin-top: 16mm; text-align: left; }
.page.thanks .thx-sign .sign-space { height: 22mm; } /* blank room to sign by hand */
.page.thanks .thx-sign .sig-title { font-weight: 700; margin: 0; }
.page.thanks .thx-sign p { margin: 0; }

/* ============================================================
   Application for Ethical Approval — plain request letter,
   NO letterhead/header. One A4 page.
   ============================================================ */

.page.ethical {
  padding: 30mm 25mm 25mm 25mm;
  font-size: 12.5pt;
  line-height: 1.6;
}
.page.ethical .body { margin: 0 0 4mm 0; text-align: justify; }
.page.ethical .ea-indent { margin-left: 25mm; }      /* align with the Subject text */
.page.ethical .subj { margin: 5mm 0; }
.page.ethical .subj-lbl { display: inline-block; min-width: 25mm; } /* "Subject:" + 2 tabs */
.page.ethical .ea-sign { margin-top: 2mm; }
.page.ethical .ea-sign p { margin: 0; }
.page.ethical .ea-sign .ea-space { height: 16mm; } /* room for a handwritten sign */

.page.ethical .ndc-title {
  text-align: center;
  font-weight: 800;
  font-size: 15pt;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin: 4mm 0 8mm 0;
}
.page.ethical .ndc-topic { text-align: center; margin: 3mm 0; }

/* ============================================================
   Relieving / Joining Charge Reports — single LANDSCAPE A4 page,
   two columns: officer's charge report (left) + ED forwarding
   letter (right). No letterhead.
   ============================================================ */

.page.charge.landscape {
  width: 297mm;
  height: 205mm;
  min-height: 205mm;
  padding: 12mm 16mm 12mm 16mm;
  font-size: 10.5pt;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}
.page.charge.landscape .charge-title {
  text-align: center;
  font-weight: 800;
  font-size: 13.5pt;
  text-decoration: underline;
  text-underline-offset: 3px;
  letter-spacing: 0.3px;
  margin: 0 0 7mm 0;
}
.charge-cols { flex: 1; display: flex; gap: 14mm; min-height: 0; }
.charge-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page.charge.landscape .body { text-align: justify; margin: 0; }

.charge-officer { margin-top: 22mm; }
.charge-officer .sign-line { border-top: 1px solid #000; width: 64mm; margin-bottom: 1.5mm; }
.charge-officer p { margin: 0; font-weight: 700; font-size: 10pt; }
.charge-hod { margin: 18mm 0 0 0; font-weight: 700; font-size: 10.5pt; } /* closer to the officer signature */

.charge-office { font-weight: 700; font-size: 10.5pt; line-height: 1.35; margin: 0 0 5mm 0; }
.page.charge.landscape .ref-row {
  display: flex; justify-content: space-between;
  align-items: flex-end; font-size: 10pt; margin: 0 0 5mm 0;
}
.charge-lbl { margin: 3mm 0 1mm 0; }
.charge-block { margin: 0 0 4mm 10mm; }
.charge-block p { margin: 0; }
.charge-to { margin: 1mm 0 5mm 0; padding-left: 12mm; }
.charge-to li { margin: 0.4mm 0; }
.charge-ed { margin: auto 0 0 0; text-align: center; }
.charge-ed p { margin: 0; }

/* On screen we show the page as a floating sheet. The export CSS
   overrides the shadow/margins (see main.js buildPrintDocument). */
