:root {
  --ink: #16212f;
  --muted: #607087;
  --line: #d8b76a;
  --accent: #8b1e24;
  --blue: #155f8b;
  --paper: #fffdf8;
  --bg: #f3f6f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans", "Nirmala UI", "Mangal", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: var(--blue);
}

.page {
  width: min(1120px, calc(100% - 28px));
  margin: 28px auto;
}

.panel {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(22, 33, 47, .08);
  padding: 24px;
}

.brand {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.brand h1 {
  font-size: clamp(22px, 3vw, 34px);
  margin: 0 0 6px;
  line-height: 1.15;
}

.brand p,
.hint {
  color: var(--muted);
  margin: 0;
}

.lookup {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #bdc8d8;
  border-radius: 6px;
  padding: 12px 13px;
  background: #fff;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

button,
.button {
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.button.secondary,
button.secondary {
  background: #32445a;
}

.button.light,
button.light {
  background: #eef3f8;
  color: var(--ink);
}

.error {
  border-left: 4px solid #b3261e;
  background: #fff2f0;
  padding: 12px 14px;
  margin-top: 14px;
}

.success {
  border-left: 4px solid #197642;
  background: #edf9f2;
  padding: 12px 14px;
  margin: 14px 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.grid .wide {
  grid-column: 1 / -1;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid #e4eaf2;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f7f9fc;
  color: #40526a;
}

.certificate-wrap {
  background: #e8edf3;
  padding: 18px;
  overflow: auto;
}

.certificate-wrap + .certificate-wrap {
  margin-top: 24px;
}

.certificate {
  width: 794px;
  height: 1123px;
  margin: 0 auto;
  background-color: #fff;
  background-image:
    radial-gradient(circle at 5% 34%, transparent 0 54px, rgba(8, 127, 140, .055) 55px 61px, transparent 62px 86px, rgba(216, 183, 106, .05) 87px 91px, transparent 92px),
    radial-gradient(circle at 95% 69%, transparent 0 62px, rgba(8, 127, 140, .055) 63px 70px, transparent 71px 98px, rgba(216, 183, 106, .05) 99px 104px, transparent 105px),
    radial-gradient(circle, rgba(8, 127, 140, .06) 0 1.4px, transparent 1.7px),
    linear-gradient(135deg, #f7fbfd 0%, #ffffff 48%, #f5faf8 100%);
  background-size: auto, auto, 48px 48px, 102% 102%;
  background-position: center, center, 0 0, center;
  background-repeat: no-repeat, no-repeat, repeat, no-repeat;
  position: relative;
  box-shadow: 0 16px 48px rgba(22, 33, 47, .16);
  overflow: hidden;
  color: #000;
  font-family: Georgia, "Times New Roman", "Nirmala UI", "Mangal", serif;
  padding: 0;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

/* Automatic A4 background: empty top strip, fine border and bottom strip. */
.certificate::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, #0b2e4f, #087f8c) top / 100% 56px no-repeat,
    linear-gradient(#d8b76a, #d8b76a) 0 56px / 100% 4px no-repeat,
    linear-gradient(#d8b76a, #d8b76a) 0 calc(100% - 46px) / 100% 4px no-repeat,
    linear-gradient(90deg, #0b2e4f, #087f8c) bottom / 100% 46px no-repeat;
}

.certificate::after {
  content: "";
  position: absolute;
  inset: 78px 29px 55px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(11, 89, 109, .22);
  border-radius: 9px;
  box-shadow: 0 0 0 7px rgba(8, 127, 140, .025);
}

.cert-bg-img {
  position: absolute;
  inset: -1%;
  width: 102%;
  height: 102%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  visibility: hidden;
}

.cert-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cert-contact {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 9px;
  min-height: 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: Arial, "Nirmala UI", sans-serif;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 600;
  color: #fff;
  gap: 10px;
}

.cert-contact span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cert-contact span:first-child { justify-content: flex-start; }
.cert-contact span:last-child { justify-content: flex-end; }
.cert-contact a { color: inherit; text-decoration: none; }

.cert-contact img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 22px;
  filter: brightness(0) invert(1);
}

.cert-brand-row {
  position: absolute;
  left: 70px;
  right: 70px;
  top: 70px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cert-logo {
  width: auto;
  max-width: 180px;
  max-height: 128px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.cert-seal {
  width: 110px;
  height: 110px;
  display: block;
  margin: 0 auto -15px;
}

.cert-qr {
  width: 84px;
  height: 84px;
}

.cert-crossref-doi {
  width: 120px;
  height: auto;
  flex: 0 0 auto;
}

.cert-meta-row {
  position: absolute;
  left: 66px;
  right: 66px;
  top: 342px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 18px;
  font-weight: 700;
  font-family: Georgia, "Times New Roman", "Nirmala UI", serif;
}

.cert-meta-row > * {
  flex: 1 1 0;
  min-width: 0;
}

.cert-meta-row > *:last-child {
  text-align: right;
}

.cert-main-title {
  position: absolute;
  left: 50px;
  right: 50px;
  top: 211px;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 27px;
  line-height: 1.24;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.cert-publication-icon {
  position: absolute;
  left: 361px;
  top: 394px;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.cert-heading {
  position: absolute;
  left: 125px;
  right: 75px;
  top: 468px;
  text-align: center;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 42px;
  font-weight: 700;
  text-decoration: none;
}

.cert-copy {
  position: absolute;
  left: 130px;
  right: 76px;
  text-align: center;
  font-size: 18px;
  line-height: 1.28;
  font-family: Georgia, "Times New Roman", "Nirmala UI", "Mangal", serif;
  letter-spacing: 0;
}

.cert-board {
  top: 545px;
}

.cert-board-journal {
  top: 580px;
}

.cert-award {
  top: 610px;
}
.cert-subtitle {
  position: absolute;
  left: 90px;
  right: 90px;
  top: 300px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}
.cert-author {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 654px;
  text-align: center;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
}

.cert-recognition {
  top: 700px;
}

.cert-paper {
  position: absolute;
  left: 35px;
  right: 35px;
  top: 723px;
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
  font-family: "Nirmala UI", "Mangal", Georgia, serif;
}

.cert-published,
.cert-volume-line,
.cert-online,
.cert-doi {
  position: absolute;
  left: 80px;
  right: 80px;
  text-align: center;
  font-size: 17px;
  line-height: 1.28;
  font-family: Georgia, "Times New Roman", "Nirmala UI", "Mangal", serif;
  letter-spacing: 0;
}

.cert-published {
  top: 780px;
}

.cert-volume-line {
  top: 810px;
}

.cert-online {
  top: 840px;
}

.cert-doi-row {
  top: 870px;
}

.cert-doi {
  position: static;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 15px;
  flex: 0 1 auto;
}

.cert-online a,
.cert-doi a {
  color: #0645ad;
  text-decoration: underline;
}

.cert-doi-row {
  position: absolute;
  left: 140px;
  right: 10px;
  top: 860px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.cert-footer-line {
  position: absolute;
  left: 200px;
  right: 110px;
  bottom: 126px;
  display: grid;
  grid-template-columns: 110px 1fr 180px;
  align-items: end;
  gap: 30px;
}

.cert-verification-marks {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.cert-signature-block {
  text-align: center;
}

.cert-sign-img {
  width: 36px;
  height: 35px;
  display: block;
  margin: 0 auto 5px;
  border-bottom: 3px solid #111;
  padding-bottom: 0px;
}

.cert-editor {
  font-size: 20px;
  font-weight: 700;
}

.cert-publisher {
  position: absolute;
  left: 70px;
  right: 70px;
  bottom: 28px;
  text-align: center;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 20px;
  font-weight: 700;
}

/* =========================================================
   VIJACT DISTINCTIVE CERTIFICATE LAYOUT
   Editorial masthead + highlighted recipient presentation
   ========================================================= */
.certificate {
  --vijact-navy: #103c5b;
  --vijact-teal: #078795;
  --vijact-gold: #e5b64f;
  --vijact-coral: #e66f51;
  background-image:
    linear-gradient(145deg, rgba(8, 135, 149, .06) 0 15%, transparent 15.2%),
    linear-gradient(325deg, rgba(230, 111, 81, .045) 0 13%, transparent 13.2%),
    radial-gradient(circle, rgba(8, 127, 140, .055) 0 1.2px, transparent 1.6px),
    linear-gradient(135deg, #f8fcfd 0%, #fff 50%, #f7fbf9 100%);
  background-size: auto, auto, 48px 48px, 100% 100%;
}

.certificate::before {
  inset: 0;
  background:
    linear-gradient(90deg, var(--vijact-navy), var(--vijact-teal)) top / 100% 56px no-repeat,
    linear-gradient(var(--vijact-gold), var(--vijact-gold)) 0 56px / 100% 4px no-repeat,
    linear-gradient(var(--vijact-coral), var(--vijact-coral)) left 60px / 9px calc(100% - 101px) no-repeat,
    linear-gradient(90deg, var(--vijact-navy), var(--vijact-teal)) bottom / 100% 37px no-repeat;
}

.certificate::after {
  inset: 72px 27px 49px 29px;
  border: 1px solid rgba(16, 60, 91, .25);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  box-shadow: 7px 7px 0 rgba(8, 135, 149, .035);
}

.cert-contact {
  left: 29px;
  right: 29px;
  top: 9px;
  min-height: 38px;
  font-size: 13px;
  color: #fff;
}

.cert-brand-row {
  left: 62px;
  right: auto;
  top: 78px;
  width: 155px;
  height: 145px;
}

.cert-logo {
  max-width: 155px;
  max-height: 145px;
}

.cert-main-title {
  left: 244px;
  right: 54px;
  top: 91px;
  min-height: 78px;
  font-size: 25px;
  line-height: 1.2;
  color: var(--vijact-navy);
  text-align: left;
  justify-content: flex-start;
  text-wrap: balance;
}

.cert-subtitle {
  left: 244px;
  right: 54px;
  top: 181px;
  font-size: 11px;
  line-height: 1.3;
  color: #526778;
  text-align: left;
}

.cert-meta-row {
  left: 78px;
  right: 55px;
  top: 245px;
  gap: 24px;
  font-size: 15px;
}

.cert-meta-row > * {
  padding: 10px 16px;
  border: 1px solid rgba(8, 135, 149, .2);
  border-radius: 7px;
  background: rgba(235, 248, 248, .78);
  color: var(--vijact-navy);
}

.cert-publication-icon {
  display: none;
}

.cert-heading {
  left: 90px;
  right: 65px;
  top: 332px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--vijact-navy);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cert-heading::after {
  content: "";
  display: block;
  width: 115px;
  height: 4px;
  margin: 13px auto 0;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--vijact-gold), var(--vijact-coral));
}

.cert-copy {
  left: 105px;
  right: 80px;
  font-size: 17px;
  line-height: 1.32;
}

.cert-board { top: 415px; }
.cert-board-journal { top: 450px; }
.cert-award { top: 486px; }

.cert-author {
  left: 112px;
  right: 87px;
  top: 532px;
  min-height: 58px;
  padding: 13px 20px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 5px solid var(--vijact-coral);
  border-right: 5px solid var(--vijact-gold);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(230, 111, 81, .09), rgba(8, 135, 149, .09));
  color: var(--vijact-navy);
  font-size: 22px;
}

.cert-recognition { top: 610px; }

.cert-paper {
  left: 90px;
  right: 65px;
  top: 645px;
  min-height: 65px;
  font-size: 17px;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-wrap: balance;
}

.cert-published { top: 728px; }
.cert-volume-line { top: 758px; }
.cert-online { top: 788px; }

.cert-doi-row {
  left: 120px;
  right: 55px;
  top: 820px;
}

.cert-footer-line {
  left: 140px;
  right: 74px;
  bottom: 89px;
  grid-template-columns: 105px 1fr 180px;
  gap: 38px;
}

.cert-qr { width: 78px; height: 78px; }
.cert-seal { width: 104px; height: 104px; }
.cert-sign-img { width: 108px; }
.cert-editor { color: var(--vijact-navy); font-size: 18px; }

.cert-publisher {
  bottom: 8px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: 1.2px;
}

@media (max-width: 720px) {
  .lookup,
  .grid,
  .brand {
    grid-template-columns: 1fr;
    display: grid;
  }

  .certificate-wrap {
    padding: 8px;
  }

  .certificate {
    transform: scale(.43);
    transform-origin: top left;
    margin-bottom: -630px;
  }
}

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

  .no-print {
    display: none !important;
  }

  .page,
  .certificate-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .certificate {
    width: 210mm;
    height: 297mm;
    box-shadow: none;
    page-break-inside: avoid;
    overflow: hidden;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .certificate-wrap {
    break-after: page;
    page-break-after: always;
  }

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

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

/* Ivory, navy and gold PNG certificate theme. No SVG dependency. */
.certificate { background: #fffdf7; --vijact-teal: #103c5b; --vijact-gold: #c6a355; --vijact-coral: #c6a355; }
.certificate::before, .certificate::after { content: none; }
.cert-bg-img { inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: 1; visibility: visible; }
.cert-author { background: rgba(198,163,85,.08); }
@media print { .certificate { transform: none; margin-bottom: 0; } }

/* IJSNR editorial identity */
.ijsnr-seal { display:flex; flex-direction:column; align-items:center; justify-content:center; width:120px; height:120px; border:3px double #c6a355; border-radius:50%; color:#103c5b; background:#fffdf7; text-align:center; gap:8px; }
.ijsnr-seal span {font-size:19px; font-weight:bold;}
.ijsnr-seal small {font:10px/1.5 Arial,sans-serif;letter-spacing:1px;}
.ijsnr-editor-role {font:13px/1.5 Arial,sans-serif;color:#526778;}
.cert-editor {font-size:16px;}
.cert-contact {font-size:11px;}
.cert-main-title {font-size:25px;}
