/*
 * PepXPO COA sheet styles. Copied verbatim from the original XPOCOA/styles.css
 * EXCEPT the old .toolbar/.version-label/.record-count rules, which the unified
 * app bar replaces. Everything affecting .page and its descendants is unchanged
 * so the html2canvas raster stays byte-identical.
 */
:root {
  --brand-deep: #000046;
  --brand-bright: #1cb5e0;
  --brand-mid: #0b6fa9;
  --brand-soft: #bfeefd;
  --brand-wash: rgba(28, 181, 224, 0.08);
  --blue: var(--brand-deep);
  --line: rgba(28, 181, 224, 0.48);
  --brand-gradient: linear-gradient(105deg, var(--brand-deep) 0%, #071b78 46%, var(--brand-bright) 100%);
  --line-soft: rgba(28, 181, 224, 0.24);
  --ink: #111111;
  --page-scale: 1;
}

* {
  box-sizing: border-box;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

body {
  margin: 0;
  background: #eef8fb;
  color: var(--ink);
  font-family: "Trebuchet MS", Arial, sans-serif;
}

.sheet-shell {
  display: grid;
  justify-content: center;
  min-height: calc(1536px * var(--page-scale) + 48px);
  overflow: auto;
  padding: 24px 12px;
}

.page {
  background:
    radial-gradient(circle at 46% 47%, var(--brand-wash), transparent 29%),
    #ffffff;
  border: 2px solid var(--blue);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  align-content: start;
  display: grid;
  grid-template-rows: 120px 102px 398px 672px 144px 74px;
  height: 1536px;
  overflow: hidden;
  padding: 18px 16px 8px;
  position: relative;
  transform-origin: top center;
  width: 1024px;
  zoom: var(--page-scale);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr 360px;
  overflow: hidden;
  position: relative;
}

.brand {
  /* box matches the logo's 3.125 aspect ratio (1400x448) so it fills exactly — html2canvas
     ignores object-fit:contain and would otherwise stretch it wider than the preview. */
  height: 106px;
  object-fit: contain;
  object-position: left top;
  width: 331px;
}

.contact {
  color: var(--blue);
  display: grid;
  font-size: 15px;
  gap: 12px;
  justify-content: start;
  line-height: 1.2;
  justify-self: end;
  padding-top: 4px;
  padding-right: 10px;
  position: relative;
  z-index: 2;
}

.contact > div {
  align-items: center;
  display: flex;
}

.icon {
  color: transparent;
  display: inline-grid;
  font-size: 0;
  height: 24px;
  margin-right: 16px;
  place-items: center;
  position: relative;
  top: 0;
  width: 28px;
}

.icon::before,
.icon::after {
  content: "";
  display: block;
  position: absolute;
}

.icon-web::before {
  border: 2px solid var(--brand-deep);
  border-radius: 50%;
  height: 21px;
  width: 21px;
}

.icon-web::after {
  border-bottom: 1.5px solid var(--brand-deep);
  border-left: 1.5px solid var(--brand-deep);
  border-right: 1.5px solid var(--brand-deep);
  border-radius: 50%;
  height: 21px;
  width: 9px;
}

.icon-mail::before {
  border: 2px solid var(--brand-deep);
  border-radius: 2px;
  height: 16px;
  width: 23px;
}

.icon-mail::after {
  border-bottom: 2px solid var(--brand-deep);
  border-right: 2px solid var(--brand-deep);
  height: 8px;
  top: 3px;
  transform: rotate(45deg);
  width: 8px;
}

.icon-lab::before {
  border: 2px solid var(--brand-deep);
  border-radius: 0 0 8px 8px;
  border-top: 0;
  height: 18px;
  top: 5px;
  width: 20px;
}

.icon-lab::after {
  border: 2px solid var(--brand-deep);
  border-bottom: 0;
  height: 9px;
  top: 0;
  width: 8px;
}

.dna {
  border: 8px double rgba(28, 181, 224, 0.18);
  border-left: 0;
  border-right: 0;
  display: none;
  height: 205px;
  opacity: 0.32;
  position: absolute;
  right: -30px;
  top: -42px;
  transform: rotate(28deg);
  width: 70px;
  z-index: 0;
}

.title {
  align-content: center;
  color: var(--blue);
  text-align: center;
}

.title h1 {
  /* solid brand color — NOT background-clip:text, which html2canvas renders as
     transparent (the title would vanish from the exported PDF/JPG). */
  color: var(--brand-deep);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 54px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.rule {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 12px auto 0;
  width: 720px;
}

.rule span {
  border-top: 2px solid var(--brand-mid);
  display: block;
  height: 1px;
  width: 330px;
}

.rule b {
  border: 2px solid var(--brand-mid);
  display: block;
  height: 14px;
  transform: rotate(45deg);
  width: 14px;
}

.info-panel {
  border: 2px solid var(--brand-deep);
  border-radius: 12px;
  contain: layout paint;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.info-panel dd,
.coa-table td {
  font-family: Arial, Helvetica, sans-serif;
}

.info-col + .info-col {
  border-left: 1px solid var(--line);
}

dl {
  display: grid;
  grid-template-columns: 190px 1fr;
  margin: 0;
  padding: 20px 28px 18px;
  row-gap: 18px;
}

dt {
  color: var(--blue);
  font-size: 19px;
  font-weight: 800;
}

dd {
  font-size: 19px;
  line-height: 1.3;
  margin: 0;
}

dd small {
  font-size: 17px;
}

sub {
  font-size: 62%;
  line-height: 0;
}

.sequence {
  font-size: 17px;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.long-sequence dl {
  row-gap: 15px;
}

.long-sequence dt,
.long-sequence dd {
  font-size: 18px;
}

.long-sequence .sequence {
  font-size: 16px;
  line-height: 1.2;
}

.coa-table {
  align-self: stretch;
  border-collapse: separate;
  border-spacing: 0;
  contain: layout paint;
  font-size: 15px;
  height: 660px;
  margin-top: 12px;
  table-layout: fixed;
  text-align: center;
  width: 100%;
}

.coa-table tbody tr:nth-child(even) td,
.coa-table tbody tr:nth-child(even) th {
  background: rgba(28, 181, 224, 0.025);
}

.coa-table thead th {
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  height: 34px;
  padding: 6px 8px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.coa-table thead th:first-child {
  border-top-left-radius: 8px;
}

.coa-table thead th:last-child {
  border-top-right-radius: 8px;
}

.coa-table tbody th {
  color: var(--blue);
  font-weight: 800;
  width: auto;
}

.coa-table td,
.coa-table tbody th {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  line-height: 1.18;
  padding: 4px 8px;
  vertical-align: middle;
}

.coa-table td div + div {
  margin-top: 3px;
}

.placeholder-value {
  color: #59616f;
  font-style: italic;
}

.coa-table tbody th {
  background: rgba(28, 181, 224, 0.035);
}

.coa-table tbody td:first-child,
.coa-table tbody th:first-child {
  border-left: 1px solid var(--line);
}

.coa-table tbody tr:last-child th:first-child {
  border-bottom-left-radius: 8px;
}

.coa-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

.test-col {
  width: 25%;
}

.solvent-col {
  width: 19%;
}

.spec-col {
  width: 21%;
}

.result-col {
  width: 35%;
}

.approval {
  display: grid;
  grid-template-columns: 188px 278px 320px 1fr;
  height: 134px;
  margin: 6px 6px 0;
  overflow: visible;
}

.approval > div {
  align-content: center;
  border-right: 1px solid var(--brand-mid);
  padding: 6px 22px;
}

.approval > div:last-child {
  border-right: 0;
}

.seal-wrap {
  display: grid;
  place-items: center;
}

.seal-wrap img {
  border-radius: 50%;
  height: 118px;
  object-fit: contain;
  width: 118px;
}

.approval h2 {
  color: var(--brand-deep);
  font-size: 13px;
  line-height: 1.1;
  margin: 0 0 7px;
}

.approval p {
  font-size: 12.5px;
  line-height: 1.16;
  margin: 0;
}

.approved p {
  max-width: 210px;
}

.review {
  display: grid;
  grid-template-rows: 18px 54px 48px;
}

.review p {
  align-self: start;
}

.fixed-signature {
  /* box matches the signature PNG aspect (194x46) at this height so html2canvas
     (which ignores object-fit) doesn't stretch it wider than the preview. */
  border-bottom: 1px solid var(--brand-mid);
  display: block;
  height: 48px;
  margin: 0;
  object-fit: contain;
  object-position: left bottom;
  padding: 0 0 4px 12px;
  width: 198px;
}

.review p b {
  color: var(--brand-deep);
}

.sig-date {
  align-content: center;
}

.sig-date p {
  font-size: 18px;
  margin-top: 24px;
}

.bottom {
  align-items: center;
  align-self: end;
  border-top: 1px solid var(--brand-mid);
  display: grid;
  grid-template-columns: 1fr 268px;
  height: 58px;
  margin: 0 2px;
}

.methods {
  color: var(--brand-deep);
  font-size: 11.8px;
  line-height: 1.5;
  padding: 5px 0;
}

.methods p {
  margin: 0;
}

.methods b {
  display: inline-block;
  min-width: 110px;
}

.methods span {
  margin: 0 20px;
}

.research {
  background: var(--brand-gradient);
  border-radius: 6px;
  color: #ffffff;
  font-size: 18px;
  margin-left: 20px;
  margin-bottom: 0;
  padding: 7px 18px;
  text-align: center;
}

@supports not (zoom: 1) {
  .page {
    transform: scale(var(--page-scale));
  }
}

@page {
  margin: 0;
  size: 1024px 1536px;
}

@media print {
  :root {
    --page-scale: 1 !important;
  }

  body {
    background: #ffffff;
  }

  .sheet-shell {
    min-height: 1536px;
    overflow: visible;
    padding: 0;
  }

  .page {
    border: 0;
    box-shadow: none;
    height: 1536px;
    width: 1024px;
    zoom: 1;
  }
}
