/* ═══════════════════════════════════════════════════════════════
   Certificados — lista, edição, escolha de formato e histórico
   ═══════════════════════════════════════════════════════════════ */
.cert-ajuda {
  font-size: .8rem; color: var(--muted); background: #f8fafc; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; line-height: 1.5;
}
.cert-toolbar { gap: 8px; flex-wrap: wrap; }
.cert-file { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; }
.cert-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cert-btn-red { color: var(--red); border-color: #fecaca; }
.cert-muted { color: var(--muted); font-size: .78rem; }
.cert-local { max-width: 260px; font-size: .78rem; }
.cert-tag { display: inline-block; font-size: .7rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; margin: 1px 0; white-space: nowrap; }
.cert-tag-ok   { background: var(--green-l); color: #166534; }
.cert-tag-err  { background: var(--red-l); color: #991b1b; }
.cert-tag-warn { background: var(--amber-l); color: #92400e; }
.cert-row-err td { background: #fffafa; }
.cert-rodape {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  font-size: .85rem; color: var(--text);
}
.cert-txt-err { color: var(--red); }
.cert-txt-warn { color: var(--amber); font-weight: 600; }
.cert-modal { width: 560px; max-width: 95vw; }
.cert-modal-sm { width: 380px; max-width: 95vw; }
.cert-form { color: var(--text); }
.cert-form label { margin-top: 12px; font-size: .8rem; }
.cert-form label:first-child { margin-top: 0; }
.cert-form .form-control { width: 100%; margin-top: 4px; }
.cert-form .form-control:disabled { background: #f3f4f6; color: var(--subtle); }
.cert-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cert-formato-quem { font-size: .88rem; color: var(--text); font-weight: 600; margin-bottom: 14px; }
.cert-formato-btns { display: flex; gap: 10px; }
.cert-formato-btns button { flex: 1; padding: 12px; font-size: .9rem; }
.cert-aguarde { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 20px; color: var(--text); text-align: center; }
.cert-spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: cert-gira .8s linear infinite; }
@keyframes cert-gira { to { transform: rotate(360deg); } }
@media (max-width: 640px) { .cert-form-row { grid-template-columns: 1fr; } }
