/* Certificados do aluno. Funciona no celular (uma coluna) e no computador (>= 1024px, com a barra do topo). */
.cf { padding: 0 16px calc(96px + env(safe-area-inset-bottom)); max-width: 1400px; margin: 0 auto; }
.cf-topo, .cf-cab-desk { display: none; }
.cf-card { background: var(--bg-card); border: 1px solid rgba(80,110,230,.28); border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.cf-tit { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; color: var(--text-strong); margin-bottom: 14px; }
.cf-tit small { font-size: 14px; font-weight: 600; color: var(--text-dim); }
.cf-tit .ic { display: grid; place-items: center; width: 30px; height: 30px; font-size: 20px; }
.cf-ordem { margin-left: auto; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-soft); background: none; border: 0; cursor: pointer; }
.cf-vazio { padding: 18px; font-size: 13px; color: var(--text-dim); text-align: center; }

/* kpis + banner */
.cf-kpis { display: flex; gap: 12px; margin: 4px 0 14px; }
.cf-kpi { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-card); border: 1px solid rgba(80,110,230,.28); }
.cf-kpi .ic { font-size: 30px; } .cf-kpi b { display: block; font-size: 22px; font-weight: 900; color: var(--text-strong); } .cf-kpi small { font-size: 12px; color: var(--text-soft); }
.cf-cta { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 14px; border-radius: 18px; background: linear-gradient(135deg, #0a1236, #0d1a54); border: 1px solid rgba(80,110,230,.4); }
.cf-cta .cap { font-size: 40px; } .cf-cta div { flex: 1; min-width: 0; } .cf-cta b { display: block; font-size: 16px; color: #fff; } .cf-cta small { font-size: 13px; color: rgba(190,200,240,.85); }
.cf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 800; padding: 11px 18px; border-radius: 10px; border: 0; cursor: pointer; white-space: nowrap; color: #1a1205; background: linear-gradient(135deg, #fbbf24, #f5a800); text-decoration: none; }
.cf-btn.az { color: #fff; background: #2a4fe0; }

/* filtros */
.cf-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.cf-abas { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-aba { font: inherit; font-size: 13px; font-weight: 700; padding: 10px 16px; border-radius: 10px; cursor: pointer; color: var(--text-soft); background: var(--bg-card); border: 1px solid var(--surface-3); }
.cf-aba.on { color: #1a1205; background: #f5a800; border-color: #f5a800; box-shadow: 0 0 16px rgba(245,168,0,.3); }
.cf-busca, .cf-area { height: 42px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--surface-3); color: var(--text); font: inherit; font-size: 13px; padding: 0 12px; }
.cf-busca { flex: 1; min-width: 160px; } .cf-area { min-width: 140px; }

/* certificado (sempre claro) */
.cf-cert { --u: 10px; position: relative; font-size: var(--u); width: 100%; aspect-ratio: 1.62 / 1; overflow: hidden; border-radius: 8px; color: #24305e; text-align: center; font-family: Inter, sans-serif;
  background: radial-gradient(ellipse at 50% 40%, #fffdf6, #f4ecd6); border: 1px solid #d8c58a; container-type: inline-size; }
.cf-cert::before, .cf-cert::after { content: ''; position: absolute; width: 14%; aspect-ratio: 1; background: linear-gradient(135deg, #1f3a93, #0d1f63); }
.cf-cert::before { top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); } .cf-cert::after { bottom: 0; right: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.cf-cert .in { position: absolute; inset: 4% 6%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4cqw; }
.cf-cert img { height: 7cqw; width: auto; } .cf-cert h5 { margin: 0; font-size: 5.6cqw; font-weight: 900; letter-spacing: .14em; color: #1d2d6b; } .cf-cert h5 + i { font-style: normal; font-size: 2cqw; letter-spacing: .3em; color: #b8902f; margin-top: -1cqw; }
.cf-cert .q { font-size: 2cqw; color: #4a5580; } .cf-cert .nome { font-family: 'Great Vibes', 'Brush Script MT', cursive; font-size: 8.6cqw; line-height: 1.1; color: #1d2d6b; }
.cf-cert .tx { max-width: 76%; font-size: 2.1cqw; line-height: 1.45; color: #4a5580; } .cf-cert .tx b { color: #1d2d6b; }
.cf-cert .ass { display: flex; justify-content: space-between; align-items: flex-end; width: 78%; margin-top: 1cqw; }
.cf-cert .ass span { width: 30%; border-top: 1px solid #8b93b8; padding-top: .6cqw; font-size: 1.5cqw; color: #4a5580; }
.cf-cert .selo { display: grid; place-items: center; width: 9cqw; height: 9cqw; border-radius: 50%; font-size: 4.4cqw; color: #7a5a10; background: radial-gradient(circle at 35% 30%, #ffe08a, #d6a032 70%); box-shadow: 0 .5cqw 1.5cqw rgba(120,80,0,.35); }
.cf-cert.and { background: linear-gradient(180deg, #7b5fe0 0, #a894ee 24%, #f6f2ff 25%); border-color: #b8a8f0; } .cf-cert.and.verde { background: linear-gradient(180deg, #2f9e6a 0, #8fd3b0 24%, #f2fbf6 25%); border-color: #9fd8bb; }
.cf-cert.and h5 { font-size: 4.6cqw; } .cf-cert.and .in { justify-content: flex-start; padding-top: 1cqw; }

/* cartões dos conquistados */
.cf-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.cf-item { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--bg-elevated); border: 1px solid var(--surface-2); }
.cf-item-t { display: flex; align-items: flex-start; gap: 8px; } .cf-item-t b { flex: 1; font-size: 14px; color: var(--text-strong); line-height: 1.25; }
.cf-item small { display: block; font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.cf-tag { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; color: #34d399; border: 1px solid #34d399; }
.cf-tag.pend { color: #fbbf24; border-color: #fbbf24; }
.cf-acoes { display: flex; gap: 6px; margin-top: 4px; } .cf-acoes button { flex: 1; white-space: nowrap; font: inherit; font-size: 11px; font-weight: 700; padding: 8px 2px; border-radius: 8px; cursor: pointer; color: var(--text); background: transparent; border: 1px solid var(--surface-3); }
.cf-acoes button:hover { border-color: #f5a800; color: #fbbf24; }
.cf-mais { display: block; margin: 14px auto 0; }

/* em andamento / próximos */
.cf-baixo { display: grid; grid-template-columns: 1fr; gap: 0; }
.cf-and { display: grid; grid-template-columns: 1fr; gap: 14px; }
.cf-and .cf-item .prog { display: flex; align-items: center; gap: 10px; } .cf-barra { flex: 1; height: 7px; border-radius: 5px; background: var(--surface-2); overflow: hidden; } .cf-barra i { display: block; height: 100%; border-radius: 5px; background: #2a7bff; }
.cf-prox { display: flex; flex-direction: column; } .cf-prox-it { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--surface-2); } .cf-prox-it:last-child { border: 0; }
.cf-prox-it .ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; font-size: 19px; color: #fff; }
.cf-prox-it div { flex: 1; min-width: 0; } .cf-prox-it b { display: block; font-size: 14px; color: var(--text-strong); } .cf-prox-it small { font-size: 12px; color: var(--text-dim); }
.cf-link { margin-left: auto; font-size: 12px; font-weight: 700; color: #7fa6ff; text-decoration: none; padding: 6px 12px; border: 1px solid rgba(80,110,230,.5); border-radius: 8px; }

/* janela de visualização */
.cf-modal { position: fixed; inset: 0; z-index: 9000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(4,8,24,.82); }
.cf-modal.on { display: flex; } .cf-modal-in { width: min(900px, 100%); } .cf-modal .cf-cert { --u: 18px; border-radius: 10px; }
.cf-modal-bar { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 10px; } .cf-modal-bar button { font: inherit; font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 9px; cursor: pointer; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); }
.cf-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 9500; padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 700; color: #1a1205; background: #fbbf24; display: none; } .cf-toast.on { display: block; }

@media (min-width: 640px) { .cf-grid, .cf-and { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .student-header, .bottom-nav { display: none !important; }
  .cf { padding: 0 28px 48px; }
  .cf-topo { display: flex; align-items: center; gap: 16px; padding: 16px 0 6px; }
  .cf-topo form { flex: 1; max-width: 680px; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 16px; border-radius: 12px; background: var(--bg-card); border: 1px solid rgba(80,110,230,.4); }
  .cf-topo input { flex: 1; background: none; border: 0; outline: 0; font: inherit; font-size: 14px; color: var(--text); }
  .cf-sino { position: relative; margin-left: auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-size: 20px; text-decoration: none; background: var(--bg-card); border: 1px solid rgba(80,110,230,.4); }
  .cf-sino i { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-style: normal; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; color: #fff; background: #ef4444; }
  .cf-perfil { display: flex; align-items: center; gap: 12px; text-decoration: none; } .cf-perfil b { display: block; font-size: 14px; color: var(--text-strong); } .cf-perfil small { font-size: 12px; color: var(--text-dim); } .cf-perfil em { font-style: normal; color: var(--text-dim); }
  .cf-perfil .av { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-weight: 900; color: #fff; background: linear-gradient(135deg, #8b5cf6, #3b82f6) center / cover; border: 2px solid rgba(245,168,0,.7); }
  .cf-cab-desk { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 14px 0 18px; }
  .cf-migalha { font-size: 14px; color: var(--text-soft); margin-bottom: 8px; } .cf-migalha b { color: var(--text-strong); font-weight: 600; }
  .cf-h1 { display: flex; align-items: center; gap: 14px; } .cf-h1 .ic { font-size: 40px; } .cf-h1 h1 { margin: 0; font-size: 34px; font-weight: 900; color: #fff; } .cf-h1 h1 span { color: #f5a800; }
  .cf-h1 p { margin: 4px 0 0; font-size: 15px; color: var(--text-soft); }
  .cf-kpis { margin: 0; flex: none; padding: 14px 20px; border-radius: 16px; background: var(--bg-card); border: 1px solid rgba(80,110,230,.3); gap: 24px; }
  .cf-kpis .cf-kpi { padding: 0; border: 0; background: none; } .cf-kpis .cf-kpi + .cf-kpi { padding-left: 24px; border-left: 1px solid var(--surface-3); } .cf-kpi b { font-size: 24px; }
  .cf-kpis-m { display: none; }
  .cf-cta { padding: 18px 24px; } .cf-cta .cap { font-size: 52px; } .cf-cta b { font-size: 18px; }
  .cf-card { padding: 20px 22px; border-radius: 20px; }
  .cf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cf-baixo { grid-template-columns: 1.55fr 1fr; gap: 16px; } .cf-baixo .cf-card { margin-bottom: 0; }
  .cf-and { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-filtros .cf-busca { flex: none; width: 270px; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .cf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cf-baixo { grid-template-columns: 1fr; } .cf-baixo .cf-card { margin-bottom: 14px; } }
@media (max-width: 1023px) { .cf-kpis-d { display: none; } }
@media (max-width: 767px) {
  .cf-cta { flex-wrap: wrap; } .cf-cta div { flex: 1 1 calc(100% - 70px); } .cf-cta .cf-btn { width: 100%; }
  .cf-filtros .cf-busca, .cf-filtros .cf-area { flex: 1 1 100%; width: 100%; }
}

/* certificados bloqueados */
.cf-prev { position: relative; }
.cf-bloq .cf-prev .cf-cert { filter: blur(5px) grayscale(.5); opacity: .75; pointer-events: none; user-select: none; }
.cf-cad { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; background: rgba(6,10,34,.55); }
.cf-cad span { font-size: 34px; } .cf-cad b { font-size: 14px; color: #fff; }
.cf-bloq .cf-tag { color: #aab4d8; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.06); }
