.gps-main {
  max-width: 860px;
}

.cert-toolbar {
  position: sticky;
  top: 62px;
  z-index: 90;
  background: #f0f4f8;
  padding: 10px 0 8px;
  margin-bottom: 8px;
}

.cert-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.cert-mail {
  max-width: 820px;
  margin: 0 auto 16px;
  background: #fff;
  border: 1px solid #d6e0ef;
  border-radius: 10px;
  padding: 14px 16px;
}

.cert-mail-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.cert-mail-row .gps-input {
  flex: 1;
}

.cert-mail-row .btn {
  white-space: nowrap;
}

#alertDocumento {
  max-width: 820px;
  margin: 0 auto 18px;
}

.cert-sheet {
  background: #fff;
  max-width: 820px;
  margin: 0 auto 40px;
  padding: 36px 48px 28px;
  box-shadow: 0 2px 18px rgba(11, 61, 145, 0.12);
  color: #222;
  font-family: 'Times New Roman', Times, serif;
}

.cert-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
  border-bottom: 2px solid #2c3e50;
  padding-bottom: 12px;
  margin-bottom: 28px;
}

.cert-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-brand img {
  height: 52px;
  width: 52px;
  object-fit: contain;
}

.cert-brand strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.cert-brand span {
  font-size: 0.78rem;
  color: #555;
}

.cert-nit-bar {
  grid-column: 1 / -1;
  background: #4a5568;
  color: #fff;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 100%, 0 100%);
}

.cert-num {
  justify-self: end;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
}

.cert-title {
  text-align: center;
  font-size: 1.55rem;
  letter-spacing: 0.18em;
  margin: 28px 0 24px;
  font-weight: 700;
}

.cert-body {
  text-align: justify;
  line-height: 1.55;
  font-size: 1.02rem;
  margin-bottom: 18px;
}

.cert-table {
  width: 72%;
  margin: 22px auto 28px;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 0.92rem;
}

.cert-table th,
.cert-table td {
  border: 1px solid #222;
  padding: 7px 10px;
}

.cert-table th {
  text-align: left;
  width: 42%;
  background: #f7f7f7;
}

.cert-note {
  font-size: 0.95rem;
  text-align: justify;
  line-height: 1.5;
}

.cert-close {
  margin-top: 22px;
}

.cert-sign-row {
  min-height: 150px;
  margin: 12px 0 28px;
}

.cert-sign {
  position: relative;
  max-width: 320px;
}

.cert-firma {
  display: block;
  height: 72px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  margin: 8px 0 4px;
}

.cert-stamp {
  position: absolute;
  left: 170px;
  top: 0;
  width: 120px;
  height: 120px;
  border: 3px solid #1a365d;
  border-radius: 50%;
  color: #1a365d;
  font-family: Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  white-space: pre-line;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-12deg);
  opacity: 0.85;
  line-height: 1.25;
}

.cert-sign-name {
  margin: 4px 0 0;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
}

.cert-sign-role,
.cert-sign-phone {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
}

.cert-footer {
  border-top: 2px solid #2c3e50;
  padding-top: 10px;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: #333;
}

@media print {
  body {
    background: #fff;
  }
  .no-print,
  .gps-header {
    display: none !important;
  }
  .gps-main {
    max-width: none;
    padding: 0;
    margin: 0;
  }
  .cert-sheet {
    box-shadow: none;
    max-width: none;
    margin: 0;
    padding: 12mm 16mm;
  }
}
