/* Printable certificate. Always rendered on white, A4 landscape-friendly. */
.certificate { background: #fff; color: #111; padding: 18px; border: 1px solid #ccc; border-radius: 6px; font-size: 11.5px; line-height: 1.35; min-width: 680px; }
.certificate h1 { font-size: 17px; margin: 0; }
.certificate h3 { font-size: 12px; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; background: #16202f; color: #fff; padding: 4px 6px; }
.cert-h2 { font-size: 14px; margin: 14px 0 6px; }
.cert-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid #16202f; padding-bottom: 10px; margin-bottom: 10px; }
.cert-company { font-size: 15px; font-weight: 700; }
.cert-title { text-align: right; }
.cert-no { font-size: 13px; font-weight: 700; margin-top: 4px; }
.draft-flag { margin-top: 6px; display: inline-block; border: 2px solid #b42318; color: #b42318; padding: 2px 8px; font-weight: 700; }
.cert-section { margin-bottom: 10px; break-inside: avoid; }
.cert-section.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cert-kv { width: 100%; border-collapse: collapse; }
.cert-kv th, .cert-kv td { border: 1px solid #bbb; padding: 3px 6px; text-align: left; vertical-align: top; font-size: 11px; text-transform: none; letter-spacing: 0; color: #111; }
.cert-kv th { width: 45%; background: #f1f3f6; font-weight: 600; }
.cert-schedule { width: 100%; border-collapse: collapse; }
.cert-schedule th, .cert-schedule td { border: 1px solid #bbb; padding: 2px 3px; font-size: 9.5px; text-align: center; color: #111; text-transform: none; letter-spacing: 0; }
.cert-schedule th { background: #f1f3f6; font-weight: 600; }
.cert-schedule td:nth-child(2) { text-align: left; }
.cert-schedule tr.fail td { background: #fde8e6; }
.cert-inspect { width: 100%; border-collapse: collapse; }
.cert-inspect td { border: 1px solid #bbb; padding: 3px 6px; font-size: 10.5px; color: #111; }
.cert-inspect td:first-child { width: 40px; }
.cert-inspect .outcome { width: 60px; text-align: center; font-weight: 700; }
.overall { border: 2px solid #111; padding: 8px; }
.overall-value { font-size: 18px; font-weight: 800; }
.overall.unsat .overall-value { color: #b42318; }
.overall.sat .overall-value { color: #1a7f4b; }
.sig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.sig-block { border: 1px solid #bbb; padding: 8px; min-height: 110px; }
.sig-block img { max-height: 70px; max-width: 100%; display: block; }
.sig-empty { height: 60px; }
.sig-role { font-weight: 700; font-size: 11px; margin-bottom: 4px; }
.cert-foot { border-top: 1px solid #ccc; padding-top: 8px; margin-top: 10px; color: #444; }
.cert-foot .bad { color: #b42318; }
.certificate .muted { color: #555; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .certificate { border: 0; padding: 0; min-width: 0; }
  .cert-host { overflow: visible; }
}
