/* ===============================
   BASE
================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eee;
  font-family: "Times New Roman", serif;
}

/* ===============================
   PAGE (A4 CERTIFICATE)
================================ */
.page {
  width: 210mm;
  height: 297mm;
  margin: auto;
  padding: 10mm;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

#printBtn {
  text-align: center;
  margin-left: 10%;
}

/* 🔥 IMAGE WATERMARK — EXACT LIKE YOUR IMAGE */
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/watermark.jpg") no-repeat center 58%;
  background-size: 40%;
  opacity: 0.10; /* VERY LITE */
  pointer-events: none;
  z-index: 0;
  bottom: 20%;
}

/* content above watermark */
.page > * {
  position: relative;
  z-index: 1;
}

/* ===============================
   TOP LOGO ROW
================================ */
.page > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3mm;
}

.top-logo {
  width: 100%;
  height: auto;
}

.iso-logo {
  width: 100%;
  height: auto;
}

/* ===============================
   TOP RIGHT INFO
================================ */
.top-right {
  align-self: flex-end;
  padding-right: 2rem;
  text-align: center;
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 35px;
}

.top-right p {
  margin: 3px 0;
}

/* ===============================
   TITLE
================================ */
h2 {
  font-size: 24px;
  text-transform: uppercase;
  color: #000;
  border-bottom: 4px solid #000;
  display: inline-block;
  margin: 10px auto 5px;
}

h4{
  border-bottom: 3px solid #000;
  display: inline-block;
}

/* ===============================
   CERTIFICATE CONTENT
================================ */
.certificate-text {
  font-size: 18px;
  line-height: 1.85;
  text-align: justify;
}

.certificate-text p {
  text-indent: 50px;
  margin-bottom: 5px;
  margin-top: 0;

}
.bold {
  font-weight: bold;
  text-transform: uppercase;
}
.viewTitle{
  font-weight: bold;
}

/* ===============================
   SIGNATURE
================================ */
.signature {
  margin-top: 3%;
  margin-bottom: 20px;
  font-size: 18px;
}
.signature p {
  margin: 2px 0 10px;
}

/* ===============================
   FOOTER
================================ */
.content {
  font-size: 16px;
  gap: 5px;
  width:auto;
  padding-left: 2%;
  padding-top: 5px;
}

.top-info {
  flex: 0 0 85%;
  /* text-align: center; */
  line-height: 30px;
}

.qr {
  width: 95px;
  height: 95px;
  flex: 0 0 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

/* ===== SIGNATURE STYLE ===== */
.signature-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 35px;
}

.sign-left {
  font-size: 14px;
   margin-left: 30px;
}

.sign-right {
  text-align: center;
  margin-right: 43px;
}

.md-sign {
  height: 60px;
  display: block;
  margin: 0 auto 5px;
}

/* ===== PRINT OVERFLOW FIX ===== */
@media print {
  #attendanceContainer table {
    page-break-inside: avoid;
  }

  .signature-section,
  .content {
    page-break-inside: avoid;
  }

  #attendanceContainer {
    overflow: visible !important;
  }
}


/* ===============================
   ACTION BUTTON
================================ */
.actions button {
  font-size: 14px;
  background-color: #0b61ff;
  color: #fff;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
}

/* ===============================
   PRINT — SINGLE PAGE FIX
================================ */
@media print {
  html,
  body {
    width: 210mm;
    height: 297mm;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body * {
    visibility: hidden;
  }

  .page,
  .page * {
    visibility: visible;
  }
  
  .page {
    position: absolute;
    top: 0;
    left: 0;
    width: 210mm;
    height: 297mm;
    margin: 0;
    padding: 15mm;
    box-shadow: none;
  }

  .actions {
    display: none;
  }
}

@page {
  size: A4;
  margin: 0;
}
/* COMPANY SEAL POSITION FIX */
.company-seal {
  text-align: center;
  margin-top: -140px;   
  margin-bottom: 30px; 
}

.company-seal img {
  height: 110px;
}
