/* Certificados Emporium24k
   Mesmo tema do painel comercial (azul-marinho com verde-limão, fonte Poppins).
   A folha do certificado é a única área clara da tela: é ela que o vendedor confere. */
:root {
  color-scheme: dark;
  --fundo: #040b1c;
  --painel: #111828;
  --bloco: #192033;
  --bloco-2: #232c44;
  --linha: #232c42;
  --texto: #ffffff;
  --texto-2: #a3a8b8;
  --texto-3: #8990a3;
  --limao: #aef31f;
  --tinta: #0a1020;            /* texto sobre o verde-limão */
  --rosa-texto: #ff9cc1;
  --ouro: #d9b866;
  --prata: #c3c9d4;
  --raio: 16px;
  --raio-p: 12px;
  --fonte: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--fundo); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--fundo); color: var(--texto); font: 400 14px/1.5 var(--fonte); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, p { margin: 0; padding: 0; }
button, input { font: inherit; color: inherit; }
button, label, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--limao); }
:focus-visible { outline: 2px solid var(--limao); outline-offset: 2px; }
[hidden] { display: none !important; }
.pular { position: absolute; left: 12px; top: -64px; z-index: 60; background: var(--limao); color: var(--tinta); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.pular:focus { top: 12px; }
.sem-js { padding: 24px; text-align: center; }

/* ================= estrutura ================= */
.pagina { max-width: 1200px; margin: 0 auto; padding: 24px max(24px, env(safe-area-inset-right)) 28px max(24px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 20px; }
.topo { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.topo__logo { display: block; height: 60px; width: auto; flex: none; }
.topo__titulo { min-width: 0; padding-left: 18px; border-left: 1px solid var(--linha); }
.topo__titulo h1 { font-size: 22px; line-height: 30px; font-weight: 600; }
.topo__titulo p { color: var(--texto-2); font-size: 13px; line-height: 20px; text-wrap: pretty; }
.grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cartao { background: var(--painel); border-radius: var(--raio); padding: 20px; min-width: 0; container: cartao / inline-size; }
.cartao__cab { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; min-height: 32px; margin-bottom: 16px; }
.cartao__cab h2 { font-size: 18px; line-height: 26px; font-weight: 600; }
.etiqueta { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--bloco); color: var(--texto-2); font-size: 12px; white-space: nowrap; }
.rodape { color: var(--texto-3); font-size: 12.5px; text-align: center; }

/* ================= formulário ================= */
.form { display: flex; flex-direction: column; gap: 18px; }
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo__nome { font-size: 13px; color: var(--texto-2); }
.campo__linha { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-radius: 12px; background: var(--bloco); border: 1px solid transparent; color: var(--texto-3); transition: border-color .15s ease, color .15s ease; }
.campo__linha:focus-within { border-color: var(--limao); color: var(--texto); }
.campo__linha svg { flex: none; }
.campo input { flex: 1; min-width: 0; height: 100%; padding: 0; background: transparent; border: 0; outline: 0; color: var(--texto); font-size: 16px; text-overflow: ellipsis; }
.campo input::placeholder { color: var(--texto-3); opacity: 1; }
.campo input[type="date"] { color-scheme: dark; min-height: 28px; }
.campo--erro .campo__linha { border-color: rgba(226, 40, 121, .7); }
.campo__ver { flex: none; min-height: 36px; padding: 6px 10px; margin-right: -6px; border: 0; border-radius: 8px; background: none; color: var(--texto-2); font-size: 13px; font-weight: 500; transition: background-color .15s ease, color .15s ease; }
.campo__ver:hover { background: var(--bloco-2); color: var(--texto); }
.campo__dica { color: var(--texto-3); font-size: 12px; line-height: 1.45; }
.campo__erro { color: var(--rosa-texto); font-size: 12.5px; line-height: 1.45; }

/* tipos de peça: quatro opções de escolha única. Disco cheio = metal maciço; anel = banho. */
.tipos { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tipos__grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tipo { position: relative; display: block; min-width: 0; cursor: pointer; }
.tipo input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tipo__cx { display: flex; align-items: center; gap: 12px; height: 100%; min-height: 68px; padding: 12px 14px; border-radius: 12px; background: var(--bloco); border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease; }
.tipo:hover .tipo__cx { background: var(--bloco-2); }
.tipo input:checked + .tipo__cx { border-color: var(--limao); background: rgba(174, 243, 31, .08); }
.tipo input:focus-visible + .tipo__cx { outline: 2px solid var(--limao); outline-offset: 2px; }
.tipo__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tipo__txt b { font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; text-wrap: balance; }
.tipo__txt small { font-size: 12px; line-height: 18px; color: var(--texto-2); }
.tipo__marca { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--limao); color: var(--tinta); opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }
.tipo input:checked + .tipo__cx .tipo__marca { opacity: 1; transform: none; }
.metal { flex: none; width: 30px; height: 30px; border-radius: 50%; }
.metal--ouro { background: linear-gradient(135deg, #f3dd9c, #d9b866 45%, #a8873f); }
.metal--prata { background: linear-gradient(135deg, #f4f6f9, #c3c9d4 45%, #8d95a3); }
.metal--banho.metal--ouro { background: none; border: 6px solid var(--ouro); }
.metal--banho.metal--prata { background: none; border: 6px solid var(--prata); }

/* ================= saída: o que falta, ou os botões ================= */
.saida { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; border-top: 1px solid var(--linha); }
.saida__falta { color: var(--texto-2); font-size: 13px; line-height: 1.55; text-wrap: pretty; }
.saida__falta b { color: var(--texto); font-weight: 500; }
.saida__pronto { display: flex; flex-direction: column; gap: 12px; }
.saida__ok { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; min-width: 0; }
.saida__ok svg { flex: none; color: var(--limao); }
.saida__ok span { min-width: 0; overflow-wrap: anywhere; }
.saida__botoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.botao { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--bloco); color: var(--texto); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color .15s ease; }
.botao:hover { background: var(--bloco-2); }
.botao--claro { background: rgba(255, 255, 255, .1); }
.botao--claro:hover { background: rgba(255, 255, 255, .16); }
.botao--limao { background: var(--limao); color: var(--tinta); font-weight: 600; }
.botao--limao:hover { background: #c3f755; }
.botao--g { height: 52px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.botao--p { height: 36px; padding: 0 14px; align-self: flex-start; }
.botao:disabled { opacity: .6; cursor: default; }
.botao svg { flex: none; }
.nota { color: var(--texto-3); font-size: 12.5px; line-height: 1.55; text-wrap: pretty; }
.aviso { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--raio-p); background: rgba(174, 243, 31, .08); border: 1px solid rgba(174, 243, 31, .4); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.aviso--erro { background: rgba(226, 40, 121, .12); border-color: rgba(226, 40, 121, .5); color: var(--rosa-texto); }
.link { align-self: flex-start; min-height: 36px; padding: 6px 2px; border: 0; border-radius: 8px; background: none; color: var(--texto-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; transition: color .15s ease; }
.link:hover { color: var(--limao); }

/* ================= prévia ================= */
.cartao--previa { position: sticky; top: 16px; }
.folha { display: flex; justify-content: center; padding: 18px; border-radius: var(--raio-p); background: var(--bloco); }
.folha svg { display: block; width: 100%; max-width: max(260px, calc((100vh - 190px) * .7071)); height: auto; aspect-ratio: 595.2756 / 841.8898; background: #fff; border-radius: 3px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5); font-family: Helvetica, Arial, "Liberation Sans", sans-serif; }

@container cartao (max-width: 460px) {
  .tipos__grade, .saida__botoes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 880px) {
  .grade { grid-template-columns: minmax(0, 1fr); }
  .cartao--previa { position: static; }
  .folha svg { max-width: 520px; }
}
@media (max-width: 520px) {
  .pagina { padding: 16px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); gap: 16px; }
  .topo { gap: 14px; }
  .topo__logo { height: 48px; }
  .topo__titulo { padding-left: 14px; }
  .topo__titulo h1 { font-size: 20px; line-height: 28px; }
  .cartao { padding: 16px; }
  .folha { padding: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .saida__pronto:not([hidden]) { animation: surgir .22s ease-out; }
  @keyframes surgir { from { opacity: 0; transform: translateY(6px); } }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
