:root {
  --cert-black: #000;
  --cert-yellow: #fbd408;
  --cert-white: #fff;
  --cert-muted: rgba(255, 255, 255, 0.72);
  --cert-line: rgba(255, 255, 255, 0.16);
}

body.cert-page {
  min-height: 100vh;
  margin: 0;
  color: var(--cert-white);
  background:
    radial-gradient(circle at top left, rgba(251, 212, 8, 0.12), transparent 34rem),
    linear-gradient(135deg, #171717 0%, var(--cert-black) 54%, #0b0b0b 100%);
  font-family: "Open Sans", Arial, sans-serif;
}

.cert-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 32px 16px;
}

.cert-panel {
  width: min(100%, 1180px);
  margin: 0 auto;
  border: 1px solid var(--cert-line);
  border-radius: 8px;
  background: #0f0f0f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.cert-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 34px;
  align-items: center;
  padding: clamp(28px, 4vw, 58px);
}

.cert-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.cert-logo {
  max-width: 260px;
  max-height: 92px;
  object-fit: contain;
}

.cert-title {
  color: var(--cert-white);
  font-size: clamp(2rem, 4vw, 3.75rem);
  font-weight: 700;
  line-height: 1.16;
  margin: 0 0 22px;
  text-align: center;
  text-transform: uppercase;
}

.cert-title span {
  color: var(--cert-yellow);
}

.cert-copy {
  color: var(--cert-white);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.6;
  margin: 0 0 24px;
}

.cert-steps {
  color: var(--cert-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 24px 22px;
  padding: 0;
}

.cert-form {
  display: grid;
  gap: 16px;
}

.cert-field {
  display: flex;
  min-height: 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: var(--cert-white);
}

.cert-field-icon {
  width: 68px;
  display: grid;
  place-items: center;
  color: var(--cert-black);
  background: #f2f2f2;
  border-right: 1px solid #dedede;
  font-size: 1.2rem;
}

.cert-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #222;
  font-size: 1.12rem;
  padding: 0 18px;
}

.cert-input::placeholder {
  color: #626262;
}

.cert-button {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  color: var(--cert-black);
  background: var(--cert-yellow);
  font-size: 1.05rem;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cert-button:hover,
.cert-button:focus {
  color: var(--cert-black);
  background: #ffe245;
  box-shadow: 0 14px 30px rgba(251, 212, 8, 0.22);
  transform: translateY(-1px);
}

.cert-admin-link {
  color: var(--cert-muted);
  margin-top: 22px;
  text-align: center;
}

.cert-admin-link a {
  color: var(--cert-yellow);
  font-weight: 700;
}

.cert-visual {
  min-height: 430px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-orbit {
  width: min(100%, 430px);
  aspect-ratio: 1.25 / 1;
  position: relative;
}

.cert-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  border-radius: 50%;
  background: var(--cert-white);
  opacity: 0.96;
}

.cert-document {
  position: absolute;
  left: 14%;
  top: 12%;
  width: 48%;
  height: 72%;
  border: 8px solid #151515;
  border-radius: 8px;
  background: #f8f8f8;
  box-shadow: 18px 16px 0 #303030, 34px 28px 0 #fefefe;
  transform: rotate(-3deg);
}

.cert-document::before {
  content: "CERTIFICADO";
  position: absolute;
  inset: 0 0 auto;
  height: 70px;
  display: grid;
  place-items: center;
  color: var(--cert-black);
  background: var(--cert-yellow);
  font-weight: 800;
  letter-spacing: 1px;
}

.cert-lines,
.cert-lines::before,
.cert-lines::after {
  position: absolute;
  left: 28px;
  right: 28px;
  height: 8px;
  border-radius: 99px;
  background: #dedede;
}

.cert-lines {
  top: 106px;
}

.cert-lines::before,
.cert-lines::after {
  content: "";
  left: 0;
  right: 18%;
}

.cert-lines::before {
  top: 28px;
}

.cert-lines::after {
  top: 56px;
  right: 36%;
}

.cert-check {
  position: absolute;
  left: 28px;
  bottom: 38px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cert-black);
  background: var(--cert-yellow);
  font-size: 1.8rem;
  box-shadow: 0 0 0 7px rgba(251, 212, 8, 0.22);
}

.cert-person {
  position: absolute;
  right: 9%;
  bottom: 10%;
  width: 92px;
  height: 210px;
}

.cert-person::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
}

.cert-person::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 58px;
  width: 68px;
  height: 102px;
  border-radius: 36px 36px 14px 14px;
  background: var(--cert-yellow);
  box-shadow: 0 102px 0 -20px #fff;
}

.cert-gear {
  position: absolute;
  left: 6%;
  top: 6%;
  color: var(--cert-yellow);
  font-size: 3rem;
}

.cert-gear.small {
  left: 23%;
  top: 2%;
  color: var(--cert-white);
  font-size: 2.45rem;
}

.result-wrap {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 32px 16px;
}

.result-card {
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 8px;
  background: var(--cert-white);
  color: var(--cert-black);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.result-card-header {
  padding: clamp(28px, 4vw, 52px) clamp(24px, 4vw, 44px) 22px;
  border-bottom: 1px solid #202020;
  background: var(--cert-white);
}

.result-card-body {
  padding: clamp(24px, 4vw, 42px);
}

.result-title {
  color: var(--cert-black);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  margin: 0;
}

.result-meta {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(260px, 1.4fr) minmax(110px, 0.42fr) minmax(130px, 0.58fr);
  gap: 18px 28px;
  align-items: center;
  margin-bottom: 32px;
  color: var(--cert-black);
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.result-meta-label {
  font-weight: 700;
}

.result-meta-value {
  font-weight: 300;
  letter-spacing: 0.04em;
}

.btn-cert-primary {
  color: var(--cert-black);
  background: var(--cert-yellow);
  border-color: var(--cert-yellow);
  font-weight: 700;
}

.btn-cert-primary:hover {
  color: var(--cert-black);
  background: #ffe245;
  border-color: #ffe245;
}

.btn-cert-outline {
  color: var(--cert-yellow);
  border-color: var(--cert-yellow);
}

.btn-cert-outline:hover {
  color: var(--cert-black);
  background: var(--cert-yellow);
  border-color: var(--cert-yellow);
}

.records-table {
  width: 100%;
  margin: 0;
  color: var(--cert-black);
  border-collapse: collapse;
  font-size: clamp(0.95rem, 1.8vw, 1.18rem);
}

.records-table thead {
  background: #f6f6f6;
  border-bottom: 2px solid var(--cert-black);
}

.records-table th,
.records-table td {
  padding: 16px 14px;
  text-align: center;
  vertical-align: middle;
}

.records-table th {
  font-weight: 700;
}

.records-table tbody tr {
  border-bottom: 1px solid #dddddd;
}

.records-table td {
  font-weight: 300;
  letter-spacing: 0.03em;
}

.records-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.records-share {
  min-width: 54px;
  border: 0;
  border-radius: 6px;
  padding: 11px 14px;
  color: var(--cert-black);
  background: #f7f7f7;
}

.result-footer-actions {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 16px;
  padding-top: 30px;
}

.btn-cert-muted {
  color: var(--cert-white);
  background: #6f777d;
  border-color: #6f777d;
  font-weight: 700;
}

.btn-cert-muted:hover {
  color: var(--cert-white);
  background: #5c646a;
  border-color: #5c646a;
}

.result-empty-icon {
  color: var(--cert-yellow);
}

@media print {
  body.cert-page {
    background: var(--cert-white);
  }

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

  .cert-shell,
  .result-wrap {
    min-height: 0;
    padding: 0;
  }

  .result-card {
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 900px) {
  .cert-hero {
    grid-template-columns: 1fr;
  }

  .cert-visual {
    min-height: 320px;
    order: -1;
  }

  .result-meta {
    grid-template-columns: 1fr 1fr;
  }

  .records-table {
    min-width: 780px;
  }
}

@media (max-width: 560px) {
  .cert-shell {
    padding: 12px;
  }

  .cert-hero {
    padding: 24px 18px;
  }

  .cert-brand {
    margin-bottom: 24px;
  }

  .cert-field-icon {
    width: 54px;
  }

  .result-card-header,
  .result-card-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .result-meta {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-footer-actions {
    flex-direction: column;
  }

  .result-footer-actions .btn {
    width: 100%;
  }
}
