/* Estilos do módulo certificates: lista, certificado A4 paisagem e verificação pública. */

/* ── Lista e progresso ── */
.cert-next { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cert-next-ic, .cert-item-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.cert-next-ic svg, .cert-item-ic svg { width: 26px; height: 26px; }
.cert-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 26px; }
.cert-lv { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cert-lv .n { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cert-lv.on { border-color: var(--brand-2); box-shadow: inset 0 0 0 1px var(--brand-2); }
.cert-lv.on .n { color: var(--brand-2); }
.cert-lv .ico { width: 14px; height: 14px; vertical-align: -2px; color: var(--ok); }
.cert-h2 { font-size: 20px; margin: 0 0 12px; }
.cert-list { display: flex; flex-direction: column; gap: 10px; }
.cert-item { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; }
.cert-item-ic { background: var(--bg-2); color: var(--text); }
.cert-item-ic.gold { background: var(--brand); color: var(--brand-ink); }
.cert-item-tx { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.cert-item-tx b { font-size: 16px; }
.cert-item-tx code { font-size: 12px; }
@media (max-width: 560px) { .cert-item-act { width: 100%; } .cert-item-act .btn { flex: 1; } }

/* ── Página do certificado ── */
.cert-page { min-height: 100vh; background: #2a2c31; padding: 16px 16px 40px; color: #f1f1f3; }
.cert-bar { max-width: 1120px; margin: 0 auto 16px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cert-stage { max-width: 1120px; margin: 0 auto; }
.cert-tip { max-width: 1120px; margin: 14px auto 0; color: #a9abb4; text-align: center; }

.cert-sheet {
  container-type: inline-size; width: 100%; aspect-ratio: 297 / 210; background: #fffdf6; color: #16171a;
  box-shadow: 0 20px 60px rgba(0,0,0,.45); position: relative; overflow: hidden; page: cert;
  font-family: "Inter", system-ui, sans-serif;
  background-image: radial-gradient(circle at 50% 42%, #fffef9 0, #fffdf6 45%, #f7f1df 100%);
}
.cs-frame { position: absolute; inset: 2.6cqw; border: .35cqw solid #16171a; display: flex; flex-direction: column; padding: 2.6cqw 4cqw 2.2cqw; }
.cs-frame::before { content: ""; position: absolute; inset: .7cqw; border: .12cqw solid #c9a227; pointer-events: none; }
.cs-frame::after { content: ""; position: absolute; left: -.35cqw; right: -.35cqw; top: -2.6cqw; height: 1.2cqw;
  background: repeating-linear-gradient(-45deg, #ffc21a 0 1.4cqw, #16171a 1.4cqw 2.8cqw); }
.cs-corner { position: absolute; width: 3.4cqw; height: 3.4cqw; border: .35cqw solid #c9a227; }
.cs-corner.tl { top: 1.4cqw; left: 1.4cqw; border-right: 0; border-bottom: 0; }
.cs-corner.tr { top: 1.4cqw; right: 1.4cqw; border-left: 0; border-bottom: 0; }
.cs-corner.bl { bottom: 1.4cqw; left: 1.4cqw; border-right: 0; border-top: 0; }
.cs-corner.br { bottom: 1.4cqw; right: 1.4cqw; border-left: 0; border-top: 0; }
.cs-wm { position: absolute; right: 3cqw; top: 50%; transform: translateY(-50%); width: 26cqw; height: 26cqw; opacity: .035; pointer-events: none; }
.cs-wm svg { width: 100%; height: 100%; filter: grayscale(1) brightness(0); }

.cs-top { display: flex; justify-content: space-between; align-items: center; gap: 2cqw; position: relative; }
.cs-brand { display: flex; align-items: center; gap: 1cqw; }
.cs-logo { width: 3.8cqw; height: 3.8cqw; border-radius: .9cqw; background: #ffc21a; display: grid; place-items: center; }
.cs-logo svg { width: 78%; height: 78%; }
.cs-brand b { display: block; font-family: var(--font-display); font-size: 2cqw; letter-spacing: -.02em; line-height: 1; }
.cs-brand small { display: block; font-size: 1cqw; color: #6b6d74; margin-top: .25cqw; letter-spacing: .06em; text-transform: uppercase; }
.cs-org { font-family: var(--font-display); font-weight: 700; font-size: 1.5cqw; text-align: right; max-width: 45%; color: #3b3d44; }

.cs-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; padding: 0 4cqw; }
.cs-kicker { font-family: var(--font-display); font-weight: 700; font-size: 4.6cqw; letter-spacing: .32em; text-transform: uppercase; line-height: 1; margin-right: -.32em; }
.cs-kind { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 2.2cqw; color: #9a7a12; margin-top: .6cqw; }
.cs-cert { margin: 2.2cqw 0 .4cqw; font-size: 1.4cqw; color: #4b4d55; letter-spacing: .04em; }
.cs-name { font-family: Georgia, "Times New Roman", serif; font-size: 4.4cqw; line-height: 1.1; padding: 0 3cqw .6cqw; border-bottom: .14cqw solid #c9a227; max-width: 90%; overflow-wrap: anywhere; }
.cs-text { font-size: 1.55cqw; line-height: 1.55; color: #2b2d33; max-width: 76cqw; margin: 1.8cqw 0 0; }
.cs-text b { color: #16171a; }
.cs-sub { color: #6b6d74; }
.cs-date { margin: 1.2cqw 0 0; font-size: 1.3cqw; color: #4b4d55; }
.cs-medal { position: absolute; left: 0; top: 50%; transform: translateY(-60%); width: 9cqw; height: 9cqw; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff3b8, #e8b600 55%, #a57d00); box-shadow: 0 0 0 .5cqw #fffdf6, 0 0 0 .75cqw #c9a227; }
.cs-medal span { font-family: var(--font-display); font-weight: 800; font-size: 3.2cqw; color: #3a2c00; }
.cs-medal.m2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c4c8cf 55%, #858a93); }
.cs-medal.m2 span { color: #2d3036; }
.cs-medal.m3 { background: radial-gradient(circle at 35% 30%, #ffe0c2, #cd8a4c 55%, #8a5427); }
.cs-medal.m3 span { color: #3a1f08; }

.cs-foot { display: grid; grid-template-columns: 1fr 1fr auto; gap: 4cqw; align-items: end; position: relative; }
.cs-sign { text-align: center; display: flex; flex-direction: column; gap: .2cqw; }
.cs-line { border-top: .1cqw solid #16171a; margin-bottom: .6cqw; }
.cs-sign b { font-size: 1.35cqw; }
.cs-sign span { font-size: 1.05cqw; color: #6b6d74; }
.cs-verify { display: flex; align-items: center; gap: 1.2cqw; }
.cs-verify img { width: 7.4cqw; height: 7.4cqw; }
.cs-verify div { display: flex; flex-direction: column; gap: .15cqw; }
.cs-verify span { font-size: .95cqw; color: #6b6d74; }
.cs-verify b { font-family: var(--font-display); font-size: 1.5cqw; letter-spacing: .06em; }
.cs-verify .cs-url { font-size: .85cqw; max-width: 17cqw; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .cert-page { padding: 12px 8px 30px; }
  .cert-bar .btn { flex: 1; }
  .cert-bar > .row { width: 100%; }
}

/* Impressão: só a folha, A4 paisagem sem margem */
@page cert { size: A4 landscape; margin: 0; }
@media print {
  html, body { background: #fff !important; }
  body:has(.cert-page) .no-print, body:has(.cert-page) .toasts { display: none !important; }
  .cert-page { background: none; padding: 0; min-height: 0; }
  .cert-stage { max-width: none; }
  .cert-sheet { width: 297mm; height: 210mm; aspect-ratio: auto; box-shadow: none; break-inside: avoid;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Verificação pública ── */
.vf-wrap { padding: 30px 16px 50px; display: flex; justify-content: center; }
.vf-card { width: 100%; max-width: 480px; background: #17181c; border: 1px solid #26282e; border-radius: 20px; padding: 30px 26px; text-align: center; display: flex; flex-direction: column; gap: 12px; color: #f1f1f3; }
.vf-card h1 { font-size: 26px; margin: 0; }
.vf-card p { color: #a9abb4; margin: 0; }
.vf-card.ok { border-color: #1f5a37; box-shadow: 0 0 0 1px #1f5a37, 0 20px 50px rgba(0,0,0,.35); }
.vf-card.bad { border-color: #5a1f25; }
.vf-ic { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 4px; display: grid; place-items: center; background: #3ccf7a; color: #0f1013; }
.vf-ic svg { width: 32px; height: 32px; stroke-width: 3; }
.vf-card.bad .vf-ic { background: #ff6b6b; }
.vf-ic.neutral { background: var(--brand); }
.vf-tag { align-self: center; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #3ccf7a; }
.vf-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; text-align: left; margin: 8px 0 6px; background: #111215; border-radius: 12px; padding: 14px 16px; }
.vf-dl dt { color: #8b8e98; font-size: 13px; }
.vf-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.vf-input { text-align: center; font-family: var(--font-display); font-size: 20px; letter-spacing: .08em; text-transform: uppercase; }
.vf-other { color: #a9abb4 !important; }
