/* CSS das paginas e componentes de Features/<contexto> (antes em <style> inline nos .razor).
   Carregado depois de todos os outros CSS: a ordem e a precedencia que o <style> inline tinha. */

/* ===== Features/Aprender/Atualizacoes/Pages/AtualizacaoDetalhePage.razor ===== */
    .nvd-artigo { max-width: 820px; margin: 0 auto; }


    .nvd-head { margin-bottom: 1.5rem; }

    .nvd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin-bottom: 0.9rem; }

    .nvd-meta__item { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--text-secondary,#6b7280); }

    .nvd-meta__item i { font-size: 0.85rem; }

    .nvd-meta__destaque { color: #b45309; font-weight: 600; }

    .nvd-pill { border-radius: 999px; font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.7rem; }


    .nvd-titulo { color: var(--text-primary,#111827); font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }


    .nvd-capa { display: block; width: 100%; border-radius: 16px; border: 1px solid var(--border-color,#e5e7eb); box-shadow: 0 12px 32px rgba(15,23,42,.10); margin: 0 0 1.75rem; aspect-ratio: 40 / 21; object-fit: cover; background: var(--bg-secondary,#f3f4f6); }


    .nvd-descricao { color: var(--text-primary,#374151); font-size: 1.05rem; line-height: 1.75; }

    .nvd-descricao > :first-child { margin-top: 0; }

    .nvd-descricao p { margin: 0 0 1rem; }

    .nvd-descricao :is(h2, h3) { color: var(--text-primary,#111827); font-weight: 700; line-height: 1.3; margin: 2rem 0 0.75rem; }

    .nvd-descricao h2 { font-size: 1.4rem; }

    .nvd-descricao h3 { font-size: 1.15rem; }

    .nvd-descricao ul, .nvd-descricao ol { margin: 0 0 1rem; padding-left: 1.4rem; }

    .nvd-descricao li { margin: 0.35rem 0; }

    .nvd-descricao a { color: var(--primary,#325bb3); }

    .nvd-descricao img { max-width: 100%; height: auto; border-radius: 12px; margin: 1rem 0; }

    /* Imagens alinhadas no editor (float) com o texto a correr ao lado; flow-root contém os floats. */
    .nvd-descricao { display: flow-root; }

    .nvd-descricao img[style*="float: left"], .nvd-descricao img[style*="float:left"] { margin: 0.25rem 1.5rem 1rem 0; }

    .nvd-descricao img[style*="float: right"], .nvd-descricao img[style*="float:right"] { margin: 0.25rem 0 1rem 1.5rem; }

    .nvd-descricao :is(h2, h3, hr, blockquote) { clear: both; }

    /* Num ecrã estreito o texto ao lado ficaria espremido: a imagem passa a ocupar a largura toda. */
    @media (max-width: 600px) {
        .nvd-descricao img[style*="float"] { float: none !important; display: block; width: 100% !important; height: auto !important; margin: 1rem 0 !important; }
    }

    .nvd-descricao hr { border: 0; border-top: 1px solid var(--border-color,#e5e7eb); margin: 2rem 0; }


    .nvd-descricao blockquote {
        position: relative;
        margin: 1.75rem 0;
        padding: 1.5rem 1.75rem 1.5rem 2.75rem;
        background: var(--bg-secondary,#f1f3ff);
        border-left: 4px solid var(--primary,#325bb3);
        border-radius: 16px;
        font-style: italic;
        font-size: 1.1rem;
        color: var(--text-primary,#1f2937);
    }

    .nvd-descricao blockquote::before {
        content: "\201C";
        position: absolute;
        top: 0.35rem;
        left: 0.9rem;
        font-size: 2.75rem;
        line-height: 1;
        font-style: normal;
        color: var(--primary,#325bb3);
        opacity: 0.35;
    }

    .nvd-descricao blockquote p { margin: 0 0 0.4rem; }

    .nvd-descricao blockquote p:last-child { margin-bottom: 0; }

    .nvd-descricao blockquote cite { display: block; margin-top: 0.6rem; font-style: normal; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary,#6b7280); }


    .nvd-video { max-width: 420px; margin-top: 1.5rem; }


    .nvd-locked { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 16px; color: var(--text-secondary,#6b7280); display: flex; flex-direction: column; gap: 0.6rem; padding: 3rem 1.5rem; text-align: center; }

    .nvd-locked i { color: var(--text-secondary,#9ca3af); font-size: 2.25rem; }

    .nvd-locked p { margin: 0; font-size: 0.9rem; }


    .nvd-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border-color,#e5e7eb); }

    .nvd-acao { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 1rem; border-radius: 999px; border: 0; background: var(--bg-secondary,#f3f4f6); color: var(--text-primary,#374151); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s; }

    .nvd-acao:hover { background: var(--border-color,#e5e7eb); }

    .nvd-acao--link { background: transparent; color: var(--primary,#325bb3); }

    .nvd-acao--link:hover { background: rgba(50,91,179,.08); }


    .nvd-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.75rem; }

    .nvd-nav__item { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem; border: 1px solid var(--border-color,#e5e7eb); border-radius: 12px; text-decoration: none; transition: border-color .15s, background .15s; }

    .nvd-nav__item:hover { border-color: var(--primary,#325bb3); background: var(--bg-secondary,#f9fafb); }

    .nvd-nav__item--next { text-align: right; align-items: flex-end; }

    .nvd-nav__kicker { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary,#9ca3af); }

    .nvd-nav__titulo { font-size: 0.92rem; font-weight: 600; color: var(--text-primary,#111827); }


    .nvd-outras { max-width: 820px; margin: 2.5rem auto 0; padding-top: 1.75rem; border-top: 1px solid var(--border-color,#e5e7eb); }

    .nvd-outras__titulo { font-size: 1.1rem; font-weight: 700; color: var(--text-primary,#111827); margin: 0 0 1rem; }

    .nvd-outras__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }

    .nvd-card { display: flex; flex-direction: column; border: 1px solid var(--border-color,#e5e7eb); border-radius: 12px; overflow: hidden; text-decoration: none; transition: border-color .15s, transform .15s; }

    .nvd-card:hover { border-color: var(--primary,#325bb3); transform: translateY(-2px); }

    .nvd-card__capa { height: 110px; display: grid; place-items: center; background: var(--bg-secondary,#f3f4f6); color: var(--text-secondary,#9ca3af); font-size: 1.5rem; }

    .nvd-card__capa img { width: 100%; height: 100%; object-fit: cover; }

    .nvd-card__corpo { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem 0.85rem 0.9rem; }

    .nvd-card__tipo { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--primary,#325bb3); }

    .nvd-card__titulo { font-size: 0.88rem; font-weight: 600; color: var(--text-primary,#111827); line-height: 1.3; }

    .nvd-card__data { font-size: 0.74rem; color: var(--text-secondary,#9ca3af); }


    .nvd-not-found { padding: 5rem 2rem; text-align: center; }

    .nvd-not-found i { color: var(--text-secondary,#d1d5db); display: block; font-size: 3.5rem; margin-bottom: 1rem; }

    .nvd-not-found h2 { color: var(--text-primary,#111827); font-size: 1.3rem; margin-bottom: 1rem; }


    @media (max-width: 640px) {

        .nvd-nav { grid-template-columns: 1fr; }

        .nvd-nav__item--next { text-align: left; align-items: flex-start; }
}


    /* Badges do tipo (reutiliza a paleta de features.css) */
    .nvd-pill.badge-func { background: rgba(99,102,241,.1); color: #6366f1; }

    .nvd-pill.badge-melhoria { background: rgba(16,185,129,.1); color: #10b981; }

    .nvd-pill.badge-correcao { background: rgba(245,158,11,.1); color: #f59e0b; }

    .nvd-pill.badge-seguranca { background: rgba(239,68,68,.1); color: #ef4444; }

/* ===== Features/Aprender/Certificados/Pages/CertificadoPublico.razor ===== */
.cert-pub-shell { align-items: center; display: flex; flex-direction: column; gap: 1.5rem; min-height: 60vh; padding: 3rem 1rem; position: relative; }


.cert-pub-confetti { inset: 0; overflow: hidden; pointer-events: none; position: absolute; z-index: 0; }

.cert-confetti-piece { animation: confetti-fall calc(3s + var(--delay)) ease-in forwards; background: hsl(calc(var(--delay) * 200), 80%, 60%); border-radius: 2px; height: 10px; left: var(--left); position: absolute; top: -10px; transform: rotate(45deg); width: 6px; }

@keyframes confetti-fall { to { top: 110%; opacity: 0; transform: rotate(720deg) translateX(50px); } }


.cert-pub-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.12); max-width: 680px; padding: 3rem 2.5rem; position: relative; text-align: center; width: 100%; z-index: 1; }


.cert-pub-header { align-items: center; display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.5rem; }

.cert-pub-logo { height: 40px; object-fit: contain; }

.cert-pub-subtitulo { color: #9ca3af; font-size: 0.78rem; font-weight: 600; letter-spacing: .05em; margin: 0; text-transform: uppercase; }


.cert-pub-seal-wrap { margin-bottom: 1rem; }

.cert-pub-seal { background: linear-gradient(135deg, #a855f7, #7c3aed); border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 3rem; height: 80px; width: 80px; box-shadow: 0 8px 24px rgba(168,85,247,.35); }


.cert-pub-certificado-titulo { color: #374151; font-size: 0.85rem; font-weight: 700; letter-spacing: .08em; margin: 0 0 0.75rem; text-transform: uppercase; }

.cert-pub-certifica { color: #9ca3af; font-size: 0.95rem; margin: 0 0 0.5rem; }

.cert-pub-nome { color: #111827; font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; margin: 0 0 0.75rem; }

.cert-pub-participou { color: #374151; font-size: 1rem; line-height: 1.5; margin: 0 0 0.4rem; }

.cert-pub-participou strong { color: #6366f1; }

.cert-pub-info { color: #9ca3af; font-size: 0.82rem; margin: 0 0 1.5rem; }


.cert-pub-skills { background: #faf5ff; border-radius: 12px; margin-bottom: 1.5rem; padding: 1rem; }

.cert-pub-skills-titulo { color: #7c3aed; font-size: 0.78rem; font-weight: 700; letter-spacing: .05em; margin: 0 0 0.75rem; text-transform: uppercase; }

.cert-pub-skills-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }

.cert-pub-skill-tag { align-items: center; background: rgba(168,85,247,.1); border-radius: 999px; color: #7c3aed; display: inline-flex; font-size: 0.8rem; font-weight: 600; gap: 0.3rem; padding: 0.25rem 0.7rem; }

.cert-pub-skill-tag i { font-size: 0.7rem; }


.cert-pub-footer { align-items: center; border-top: 1px solid #f3f4f6; display: flex; justify-content: space-between; margin-top: 1.5rem; padding-top: 1.25rem; }

.cert-pub-footer-info { display: flex; flex-direction: column; gap: 0.2rem; text-align: left; }

.cert-pub-emitido { color: #9ca3af; font-size: 0.72rem; }

.cert-pub-codigo { background: #f3f4f6; border-radius: 4px; color: #6b7280; font-size: 0.7rem; padding: 0.1rem 0.4rem; }

.cert-pub-brand { display: flex; flex-direction: column; align-items: flex-end; }

.cert-pub-brand span { color: #111827; font-size: 0.88rem; font-weight: 800; }

.cert-pub-brand small { color: #9ca3af; font-size: 0.7rem; }


.cert-pub-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; z-index: 1; }

.cert-pub-validate { color: #9ca3af; font-size: 0.75rem; text-align: center; z-index: 1; }


.cert-pub-invalid { padding: 5rem 2rem; text-align: center; }

.cert-pub-invalid i { color: #ef4444; display: block; font-size: 3.5rem; margin-bottom: 1rem; }

.cert-pub-invalid h2 { color: #111827; font-size: 1.3rem; margin-bottom: 0.5rem; }

.cert-pub-invalid p { color: #6b7280; margin-bottom: 1.5rem; }


.cert-pub-qrcode { margin-top: 1.5rem; text-align: center; }

.cert-pub-qrcode img { width: 120px; height: 120px; }

.cert-pub-qrcode p { color: #9ca3af; font-size: 0.75rem; margin-top: 0.3rem; }

/* ===== Features/Aprender/Certificados/Pages/CertificadosPage.razor ===== */
.cert-empty { padding: 5rem 2rem; text-align: center; }

.cert-empty-icon { background: rgba(168,85,247,.1); border-radius: 50%; color: #a855f7; display: inline-flex; font-size: 2.5rem; height: 80px; align-items: center; justify-content: center; margin-bottom: 1.25rem; width: 80px; }

.cert-empty h2 { color: var(--text-primary,#111827); font-size: 1.3rem; font-weight: 800; margin-bottom: 0.5rem; }

.cert-empty p { color: var(--text-secondary,#6b7280); max-width: 380px; margin: 0 auto; }


.cert-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }


.cert-card { background: var(--bg-card,#fff); border: 1px solid var(--border-color,#e5e7eb); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }


.cert-card-header { align-items: center; background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); color: #fff; display: flex; gap: 0.75rem; padding: 1rem 1.25rem; }

.cert-card-icon { background: rgba(255,255,255,.2); border-radius: 10px; font-size: 1.5rem; height: 44px; width: 44px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.cert-card-code { background: rgba(255,255,255,.2); border-radius: 4px; color: #fff; font-size: 0.72rem; padding: 0.1rem 0.4rem; }

.cert-card-data { color: rgba(255,255,255,.75); font-size: 0.75rem; margin: 0.2rem 0 0; }


.cert-card-body { flex: 1; padding: 1.1rem 1.25rem; }

.cert-card-evento { color: var(--text-primary,#111827); font-size: 1rem; font-weight: 800; line-height: 1.3; margin: 0 0 0.35rem; }

.cert-card-instrutor { color: var(--text-secondary,#6b7280); font-size: 0.82rem; margin: 0 0 0.75rem; }

.cert-card-instrutor i { color: var(--primary,#325bb3); }


.cert-skills { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.cert-skill-tag { background: rgba(168,85,247,.08); border-radius: 999px; color: #7c3aed; font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.6rem; }


.cert-card-actions { border-top: 1px solid var(--border-color,#e5e7eb); display: flex; gap: 0.5rem; padding: 0.75rem 1.25rem; flex-wrap: wrap; }

/* ===== Features/Aprender/Colecoes/Pages/ColecaoDetalhe.razor ===== */




    .chip-gratis { background: #d1fae5 !important; color: #065f46 !important; }

    .ev-not-found { padding: 5rem 2rem; text-align: center; }


    .col-materiais-lista { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.5rem; }

    .col-lista-titulo { align-items: center; color: var(--text-primary,#111827); display: flex; font-size: 1.05rem; font-weight: 700; gap: 0.5rem; margin: 0; }

    .col-lista-vazia { color: var(--text-secondary,#6b7280); font-size: 0.9rem; margin: 1rem 0 0; }

    .col-material-row { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 10px; color: var(--text-primary,#111827); display: flex; gap: 0.75rem; padding: 0.75rem 1rem; text-decoration: none; }

    .col-material-row:hover { background: var(--card-bg,#fff); border: 1px solid var(--border-color,#e5e7eb); color: var(--text-primary,#111827); }

    .col-material-chevron { color: var(--text-secondary,#9ca3af); }

    .col-material-capa { align-items: center; border-radius: 6px; display: flex; flex-shrink: 0; height: 32px; justify-content: center; width: 32px; }

    .crs-detalhe-capa { margin-bottom: 1rem; }


    .col-compra-box { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 12px; display: flex; gap: 1rem; justify-content: space-between; margin-top: 1.5rem; padding: 1.25rem; }

    .col-compra-label { color: var(--text-secondary,#6b7280); display: block; font-size: 0.8rem; }

    .col-compra-preco { color: var(--text-primary,#111827); display: block; font-size: 1.4rem; font-weight: 800; }



/* ===== Features/Aprender/Colecoes/Pages/ColecoesPage.razor ===== */
.mat-dl-btn { flex-shrink: 0; align-self: center; width: 36px; height: 36px; border-radius: 8px; background: var(--primary,#325bb3); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; }

.mat-price-badge { flex-shrink: 0; align-self: center; font-size: 0.9rem; font-weight: 800; color: var(--primary,#325bb3); }

/* ===== Features/Aprender/Compra/Pages/HistoricoPage.razor ===== */
.hc-icon-box { width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; background: rgba(59,130,246,.1); color: #3b82f6; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }

.hc-subtitulo { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .75rem; color: var(--text-primary); }
.hc-pagamento, .hc-data { background: var(--bg-secondary); color: var(--text-secondary); }
.hc-creditos, .hc-estado-espera { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.hc-estado-ok { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.hc-estado-nok { background: color-mix(in srgb, var(--error) 15%, transparent); color: var(--error); }
.hc-nota { margin: .4rem 0 0; font-size: .85rem; color: var(--text-secondary); }
.hc-value { flex-shrink: 0; align-self: center; font-size: 0.9rem; font-weight: 800; color: var(--primary,#325bb3); }

/* ===== Features/Aprender/Cursos/Pages/CursoDetalhe.razor ===== */
.crs-progresso-box { background: var(--bg-secondary,#f3f4f6); border-radius: 12px; margin-top: 1.5rem; padding: 1rem 1.25rem; }

.crs-progresso-head { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary,#6b7280); margin-bottom: 0.5rem; }


.crs-estrutura { margin-top: 1.5rem; }

.crs-modulo-publico { margin-top: 1.25rem; }

.crs-modulo-publico h3 { align-items: center; color: var(--text-primary,#111827); display: flex; font-size: 0.95rem; font-weight: 700; gap: 0.5rem; margin: 0 0 0.5rem; }

.crs-aulas-lista { display: flex; flex-direction: column; gap: 0.5rem; }

.crs-aula-row { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 10px; display: flex; gap: 0.5rem; padding: 0.5rem 0.5rem 0.5rem 1rem; }

.crs-aula-link { align-items: center; color: var(--text-primary,#111827); display: flex; flex: 1; gap: 0.75rem; text-decoration: none; }

.crs-aula-link:hover { color: var(--primary,#325bb3); }

.crs-aula-row.crs-aula-concluida { background: rgba(16,185,129,.08); }

.crs-aula-check { background: transparent; border: none; color: var(--text-secondary,#9ca3af); cursor: pointer; font-size: 1.3rem; padding: 0.25rem 0.5rem; }

.crs-aula-check.checked { color: #10b981; }

[data-theme="dark"] .crs-aula-row.crs-aula-concluida { background: rgba(16,185,129,.15); }

/* ===== Features/Aprender/Cursos/Pages/CursosPage.razor ===== */
.mat-icon-box { width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }

/* ===== Features/Aprender/Cursos/Pages/MeusCursosPage.razor ===== */
.crs-meu-curso-card { align-items: center; }

.crs-progresso-bar-sm { max-width: 260px; }

.crs-ver-certificado { align-self: center; flex-shrink: 0; white-space: nowrap; }

/* ===== Features/Aprender/Eventos/Pages/EventoDetalhe.razor ===== */
    .ev-banner-overlay { align-items: flex-end; background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0) 60%); bottom: 0; display: flex; left: 0; padding: 1.5rem; position: absolute; right: 0; top: 0; }

    .ev-banner-titulo { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.2; margin: 0; text-shadow: 0 2px 8px rgba(0,0,0,.35); }


    .ev-detalhe-layout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) 320px; }

    @media (max-width: 768px) {
 .ev-detalhe-layout { grid-template-columns: 1fr; }
 .ev-detalhe-sidebar { order: -1; }
}


    .ev-detalhe-titulo { color: var(--text-primary,#111827); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.2; margin: 1rem 0 1rem; }

    .ev-detalhe-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }


    .ev-detalhe-descricao { color: var(--text-primary,#111827); font-size: 0.95rem; line-height: 1.7; }


    .ev-skills-list { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }

    .ev-skills-list li { align-items: center; color: var(--text-primary,#374151); display: flex; font-size: 0.9rem; gap: 0.5rem; }


    .ev-sidebar-card { background: var(--bg-card,#fff); border: 1px solid var(--border-color,#e5e7eb); border-top: 2px solid var(--primary,#325bb3); border-radius: 14px; overflow: hidden; padding: 1.5rem; position: sticky; top: 1rem; }

    .ev-sidebar-preco { margin-bottom: 1rem; }

    .ev-preco-label { background: rgba(16,185,129,.1); border-radius: 999px; color: #10b981; font-size: 1rem; font-weight: 800; padding: 0.3rem 1rem; }

    .ev-preco-valor { color: var(--text-primary,#111827); font-size: 1.8rem; font-weight: 800; }

    .ev-sidebar-cert { align-items: center; background: rgba(168,85,247,.08); border-radius: 8px; color: #a855f7; display: flex; font-size: 0.85rem; font-weight: 700; gap: 0.5rem; margin-bottom: 1rem; padding: 0.6rem 0.75rem; }

    .ev-sidebar-info-row { align-items: center; color: var(--text-secondary,#6b7280); display: flex; font-size: 0.85rem; gap: 0.4rem; margin-bottom: 1.25rem; }

    .ev-cta-btn { border-radius: 10px; font-size: 1rem; font-weight: 700; padding: 0.75rem; width: 100%; }

    .ev-cta-inscrito { align-items: center; color: #10b981; display: flex; font-size: 0.95rem; font-weight: 700; gap: 0.5rem; margin-bottom: 0.75rem; }

    .ev-cta-cancel { border-radius: 10px; font-size: 0.85rem; padding: 0.5rem; width: 100%; }

    .ev-cta-encerrado { background: var(--bg-secondary,#f3f4f6); border-radius: 10px; color: var(--text-secondary,#9ca3af); font-size: 0.9rem; font-weight: 700; margin-bottom: 0.75rem; padding: 0.75rem; text-align: center; }


    .ev-sticky-cta { display: none; position: fixed; bottom: 64px; left: 0; right: 0; z-index: 90; background: var(--bg-card,#fff); border-top: 1px solid var(--border-color,#e5e7eb); align-items: center; justify-content: space-between; padding: 0.75rem 1rem; gap: 1rem; }

    @media (max-width: 768px) {
 .ev-sticky-cta { display: flex; }
}

/* ===== Features/Aprender/Materiais/Pages/MateriaisPage.razor ===== */
.mat-card-compravel:hover { border-color: var(--primary,#325bb3); box-shadow: 0 4px 16px rgba(0,0,0,.08); }

[data-theme="dark"] .mat-card-compravel:hover { box-shadow: 0 4px 16px rgba(0,0,0,.3); }

/* ===== Features/Aprender/Materiais/Pages/VisualizadorMaterial.razor ===== */
    /* PDF viewer — altura adequada para leitura */
    .mat-pdf-wrap {
        border-radius: 12px; overflow: hidden; position: relative;
        background: #525659;
        height: 78vh; min-height: 480px;
    }

    .mat-pdf-wrap iframe {
        position: absolute; top: 0; left: 0;
        width: 100%; height: 100%; border: none;
    }

    .mat-pdf-loading {
        position: absolute; inset: 0; z-index: 1;
        background: var(--bg-secondary,#f3f4f6);
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
        border-radius: 12px;
    }

    .mat-pdf-loading p { color: var(--text-secondary,#6b7280); font-size: 0.88rem; margin: 0; }


    /* Erro PDF — apresentação cuidada */
    .mat-pdf-error {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: var(--bg-secondary,#f9fafb);
        border: 2px dashed var(--border,#d1d5db);
        border-radius: 18px;
        padding: 5rem 2rem;
        margin: 1.5rem 0;
        min-height: 420px;
        text-align: center;
        transition: border-color .2s;
    }

    .mat-pdf-error:hover {
        border-color: var(--text-secondary,#9ca3af);
    }

    .mat-pdf-error-icon-box {
        position: relative;
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-tertiary,#f3f4f6);
        border-radius: 20px;
        margin-bottom: 1.5rem;
    }

    .mat-pdf-error-icon-box i {
        font-size: 2.4rem;
        color: var(--text-secondary,#9ca3af);
    }

    .mat-pdf-error-x {
        position: absolute;
        bottom: -4px;
        right: -6px;
        font-size: 0.95rem !important;
        color: #ef4444 !important;
        background: var(--bg-secondary,#f9fafb);
        border-radius: 999px;
        padding: 3px;
        box-shadow: 0 2px 6px rgba(0,0,0,.08);
    }

    .mat-pdf-error h3 {
        color: var(--text-primary,#111827);
        font-size: 1.15rem;
        font-weight: 700;
        margin: 0 0 0.5rem;
        letter-spacing: -.01em;
    }

    .mat-pdf-error-desc {
        color: var(--text-secondary,#6b7280);
        font-size: 0.88rem;
        margin: 0;
        max-width: 340px;
        line-height: 1.55;
    }

    .mat-pdf-error-hr {
        border: 0;
        border-top: 1px solid var(--border,#e5e7eb);
        width: 48px;
        margin: 1.25rem auto;
    }

    .mat-pdf-error-actions {
        display: flex;
        gap: 0.5rem;
    }

    .mat-pdf-error-btn {
        border-radius: 10px;
        font-size: 0.85rem;
        font-weight: 600;
        padding: 0.55rem 1.25rem;
    }


    /* Imagem */
    .mat-image-wrap {
        border-radius: 12px; overflow: hidden; position: relative;
        background: var(--bg-secondary,#f3f4f6); text-align: center;
    }

    .mat-image-wrap img { max-width: 100%; height: auto; display: block; margin: 0 auto; }


    /* Watermark (imagens) */
    .mat-watermark-overlay {
        position: absolute; bottom: 0; left: 0; right: 0;
        background: rgba(0,0,0,0.45); color: rgba(255,255,255,0.7);
        font-size: 0.72rem; text-align: center; padding: 4px 8px;
        pointer-events: none; z-index: 2;
    }


    /* Placeholder para ficheiros não visualizáveis */
    .mat-viewer-placeholder {
        align-items: center; background: var(--bg-secondary,#f3f4f6);
        border-radius: 14px; display: flex; flex-direction: column;
        gap: 1.25rem; justify-content: center; padding: 5rem 2rem; text-align: center;
    }

    .mat-viewer-placeholder i { color: #9ca3af; font-size: 4rem; }

    .mat-viewer-placeholder p { color: var(--text-secondary,#6b7280); font-size: 0.95rem; margin: 0; }

    .mat-dl-btn-large { border-radius: 10px; font-size: 0.95rem; font-weight: 700; padding: 0.7rem 1.75rem; }


    /* Layout desktop: visualizador + sidebar de metadados */
    .mat-detalhe-layout { display: flex; flex-direction: column; gap: 1.5rem; }

    @media (min-width: 1024px) {

        .mat-detalhe-layout { flex-direction: row; align-items: flex-start; gap: 2rem; }

        .mat-viewer-col { flex: 1; min-width: 0; }

        /* O scroll é do .app-content (já abaixo da barra de 60px): top pequeno e, se for mais alta que o ecrã, rola por dentro. */
        .mat-sidebar-col { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: 1rem; max-height: calc(100dvh - 60px - 2rem); overflow-y: auto; scrollbar-width: thin; }
}

    .mat-sidebar-col { display: flex; flex-direction: column; gap: 1.25rem; }


    .mat-sidebar-card { background: var(--bg-card,#fff); border: 1px solid var(--border-color,#e5e7eb); border-radius: 14px; padding: 1.5rem; }

    .mat-sidebar-header { align-items: flex-start; display: flex; gap: 1rem; margin-bottom: 1rem; }

    .mat-sidebar-icon-box { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 10px; color: var(--primary,#325bb3); display: flex; flex-shrink: 0; font-size: 1.4rem; height: 56px; justify-content: center; width: 56px; }

    .mat-sidebar-header-info { min-width: 0; }

    .mat-format-badge { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 999px; color: var(--text-secondary,#6b7280); display: inline-flex; font-size: 0.7rem; font-weight: 700; gap: 0.3rem; margin-bottom: 0.5rem; padding: 0.2rem 0.6rem; text-transform: uppercase; }

    .mat-sidebar-titulo { color: var(--text-primary,#111827); font-size: 1.15rem; font-weight: 800; line-height: 1.3; margin: 0; }


    .mat-sidebar-stats { border-top: 1px solid var(--border-color,#e5e7eb); border-bottom: 1px solid var(--border-color,#e5e7eb); display: flex; flex-direction: column; gap: 0.75rem; margin: 1rem 0; padding: 1rem 0; }

    .mat-sidebar-stat { align-items: center; display: flex; justify-content: space-between; }

    .mat-sidebar-stat-label { color: var(--text-secondary,#9ca3af); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }

    .mat-sidebar-stat-value { color: var(--text-primary,#111827); font-size: 0.85rem; font-weight: 700; }


    .mat-sidebar-descricao h3 { color: var(--text-primary,#111827); font-size: 0.85rem; font-weight: 700; margin: 0 0 0.5rem; }

    .mat-sidebar-descricao p { color: var(--text-secondary,#6b7280); font-size: 0.85rem; line-height: 1.6; margin: 0; }


    .mat-relacionados-card { padding: 1.25rem; }

    .mat-relacionados-titulo { align-items: center; color: var(--text-primary,#111827); display: flex; font-size: 0.9rem; font-weight: 800; gap: 0.5rem; margin: 0 0 1rem; }

    .mat-relacionados-titulo i { color: var(--primary,#325bb3); }

    .mat-relacionados-lista { display: flex; flex-direction: column; gap: 0.75rem; }

    .mat-relacionado-item { align-items: center; border-radius: 10px; display: flex; gap: 0.75rem; padding: 0.5rem; text-decoration: none; transition: background-color .15s; }

    .mat-relacionado-item:hover { background: var(--bg-secondary,#f3f4f6); }

    .mat-relacionado-icon { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 8px; color: var(--primary,#325bb3); display: flex; flex-shrink: 0; font-size: 1.1rem; height: 40px; justify-content: center; width: 40px; }

    .mat-relacionado-item:hover .mat-relacionado-icon { background: rgba(50,91,179,.12); }

    .mat-relacionado-info h5 { color: var(--text-primary,#111827); font-size: 0.82rem; font-weight: 700; line-height: 1.3; margin: 0; }

    .mat-relacionado-info small { color: var(--text-secondary,#9ca3af); font-size: 0.7rem; }


    [data-theme="dark"] .mat-pdf-wrap { background: #3a3c40; }

/* ===== Features/Aprender/Playlists/Pages/PlaylistDetalhe.razor ===== */
    .pld-header { align-items: flex-start; display: flex; gap: 1.25rem; }

    .pld-thumb { aspect-ratio: 16 / 9; background: var(--bg-secondary,#f3f4f6); border-radius: 14px; flex-shrink: 0; overflow: hidden; width: 220px; }

    .pld-thumb img { display: block; height: 100%; object-fit: cover; width: 100%; }

    .pld-thumb-placeholder { align-items: center; color: var(--text-secondary,#9ca3af); display: flex; font-size: 2rem; height: 100%; justify-content: center; width: 100%; }


    .pld-info { flex: 1; min-width: 0; }

    .pld-titulo { align-items: center; color: var(--text-primary,#111827); display: flex; font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 800; gap: 0.5rem; margin: 0 0 0.5rem; }

    .pld-desc { color: var(--text-secondary,#6b7280); font-size: 0.92rem; line-height: 1.6; margin: 0 0 0.75rem; }


    @media (max-width: 640px) {

        .pld-header { flex-direction: column; }

        .pld-thumb { width: 100%; }
}

/* ===== Features/Aprender/Videos/Pages/VideoDetalhe.razor ===== */
    /* Layout desktop: player + info na coluna principal, recomendados na sidebar */
    .vid-detalhe-page { display: flex; flex-direction: column; gap: 1.25rem; }

    @media (min-width: 900px) {

        .vid-detalhe-page { flex-direction: row; align-items: flex-start; gap: 2rem; }

        .vid-player-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }

        .vid-recomendados-col { width: 340px; flex-shrink: 0; position: sticky; top: 1rem; max-height: calc(100dvh - 60px - 2rem); overflow-y: auto; scrollbar-width: thin; }
}


    .vid-player-wrap { border-radius: 12px; overflow: hidden; padding-bottom: 56.25%; position: relative; background: #000; }

    .vid-player-wrap iframe { bottom: 0; height: 100%; left: 0; position: absolute; right: 0; top: 0; width: 100%; }

    .vid-locked-placeholder { align-items: center; background: #f3f4f6; bottom: 0; color: #6b7280; display: flex; flex-direction: column; gap: 0.75rem; justify-content: center; left: 0; position: absolute; right: 0; text-align: center; top: 0; }


    .vid-detalhe-info-card { background: var(--bg-card,#fff); border: 1px solid var(--border-color,#e5e7eb); border-radius: 14px; padding: 1.5rem; }


    /* Sidebar de recomendações */
    .vid-recomendados-card { background: var(--bg-card,#fff); border: 1px solid var(--border-color,#e5e7eb); border-top: 2px solid var(--primary,#325bb3); border-radius: 14px; padding: 1.25rem; }

    .vid-recomendados-titulo { align-items: center; color: var(--text-primary,#111827); display: flex; font-size: 0.95rem; font-weight: 800; gap: 0.5rem; margin: 0 0 1rem; }

    .vid-recomendados-vazio { color: var(--text-secondary,#6b7280); font-size: 0.85rem; margin: 0; }

    .vid-recomendados-lista { display: flex; flex-direction: column; gap: 1rem; }

    .vid-recomendado-item { display: flex; flex-direction: column; gap: 0.5rem; text-decoration: none; }

    .vid-recomendado-thumb { aspect-ratio: 16 / 9; background: var(--bg-secondary,#f3f4f6); border-radius: 10px; overflow: hidden; position: relative; }

    .vid-recomendado-thumb img { display: block; height: 100%; object-fit: cover; transition: transform .25s; width: 100%; }

    .vid-recomendado-item:hover .vid-recomendado-thumb img { transform: scale(1.05); }

    .vid-recomendado-thumb-placeholder { align-items: center; color: var(--text-secondary,#9ca3af); display: flex; font-size: 1.6rem; height: 100%; justify-content: center; width: 100%; }

    .vid-recomendado-duracao { background: rgba(0,0,0,.72); border-radius: 4px; bottom: 6px; color: #fff; font-size: 0.68rem; font-weight: 600; padding: 1px 6px; position: absolute; right: 6px; }

    .vid-recomendado-chip { background: rgba(50,91,179,.1); border-radius: 999px; color: var(--primary,#325bb3); display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; text-transform: uppercase; width: fit-content; }

    .vid-recomendado-nome { color: var(--text-primary,#111827); font-size: 0.85rem; font-weight: 700; line-height: 1.35; margin: 0.3rem 0 0; }

    .vid-recomendado-item:hover .vid-recomendado-nome { color: var(--primary,#325bb3); }

/* ===== Features/Aprender/Videos/Pages/VideosPage.razor ===== */
.vid-section-head { align-items: center; display: flex; gap: 0.5rem; margin-bottom: 1rem; }

.vid-section-head h2 { align-items: center; color: var(--text-primary,#111827); display: flex; font-size: 1.1rem; font-weight: 800; gap: 0.4rem; margin: 0; }


.vid-playlist-see-all { color: var(--primary,#325bb3); font-size: 0.82rem; font-weight: 600; margin-left: auto; text-decoration: none; }

.vid-playlist-see-all:hover { text-decoration: underline; }


.vid-playlist-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.vid-playlist-chip { align-items: center; background: var(--bg-secondary,#f3f4f6); border: 1px solid var(--border-color,#e5e7eb); border-radius: 999px; color: var(--text-secondary,#6b7280); cursor: pointer; display: inline-flex; font-size: 0.8rem; font-weight: 600; gap: 0.4rem; padding: 0.4rem 0.9rem; text-decoration: none; transition: all .15s; }

.vid-playlist-chip:hover { background: var(--primary,#325bb3); border-color: var(--primary,#325bb3); color: #fff; }

.vid-playlist-thumb { border-radius: 50%; height: 22px; object-fit: cover; width: 22px; }

/* ===== Regras escopadas por pagina (antes <style> residual com colisoes): :where(.pg-*) mantem a especificidade ===== */

/* ===== Features/Aprender/Certificados/Pages/CertificadosPage.razor ===== */
.pg-certificados-page { display: contents; }
:where(.pg-certificados-page) .btn-sm { font-size: 0.78rem; padding: 0.35rem 0.7rem; }


:where(.pg-certificados-page) .mt-3 { margin-top: 1rem; }

/* ===== Features/Aprender/Colecoes/Pages/ColecaoDetalhe.razor ===== */
.pg-colecao-detalhe { display: contents; }
:where(.pg-colecao-detalhe) .vid-detalhe-info { max-width: 860px; }


:where(.pg-colecao-detalhe) .vid-detalhe-titulo { color: var(--text-primary,#111827); font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 800; line-height: 1.25; margin: 0 0 0.75rem; }


:where(.pg-colecao-detalhe) .vid-detalhe-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }


:where(.pg-colecao-detalhe) .ev-meta-chip { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 999px; color: var(--text-secondary,#6b7280); display: inline-flex; font-size: 0.78rem; font-weight: 600; gap: 0.3rem; padding: 0.25rem 0.7rem; }


:where(.pg-colecao-detalhe) .ev-meta-chip i { color: var(--primary,#325bb3); }


:where(.pg-colecao-detalhe) .chip-gratis i { color: #065f46 !important; }


:where(.pg-colecao-detalhe) .vid-detalhe-descricao { color: var(--text-primary,#374151); font-size: 0.95rem; line-height: 1.7; margin-top: 1rem; }


:where(.pg-colecao-detalhe) .vid-detalhe-actions-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }


:where(.pg-colecao-detalhe) .vid-action-btn { border-radius: 10px; font-size: 0.88rem; font-weight: 600; padding: 0.6rem 1rem; }


:where(.pg-colecao-detalhe) .ev-not-found i { color: var(--text-secondary,#d1d5db); display: block; font-size: 3.5rem; margin-bottom: 1rem; }


:where(.pg-colecao-detalhe) .ev-not-found h2 { color: var(--text-primary,#111827); font-size: 1.3rem; margin-bottom: 1rem; }


:where(.pg-colecao-detalhe) .col-material-row i:first-child { color: var(--primary,#325bb3); font-size: 1.1rem; }


:where(.pg-colecao-detalhe) .col-material-row span { flex: 1; font-size: 0.9rem; font-weight: 600; }



[data-theme="dark"] :where(.pg-colecao-detalhe) .chip-gratis { background: rgba(16,185,129,.2) !important; color: #6ee7b7 !important; }


[data-theme="dark"] :where(.pg-colecao-detalhe) .chip-gratis i { color: #6ee7b7 !important; }

/* ===== Features/Aprender/Colecoes/Pages/ColecoesPage.razor ===== */
.pg-colecoes-page { display: contents; }
:where(.pg-colecoes-page) .ev-empty { padding:5rem 2rem; text-align:center; }


:where(.pg-colecoes-page) .ev-empty i { color:var(--text-secondary,#d1d5db); display:block; font-size:3.5rem; margin-bottom:1rem; }


:where(.pg-colecoes-page) .ev-empty h3 { color:var(--text-primary,#111827); font-size:1.1rem; margin-bottom:0.4rem; }


:where(.pg-colecoes-page) .ev-empty p { color:var(--text-secondary,#6b7280); font-size:0.88rem; }


:where(.pg-colecoes-page) .chip-lock { background: #fef3c7 !important; color: #92400e !important; }


[data-theme="dark"] :where(.pg-colecoes-page) .chip-lock { background: rgba(245,158,11,.2) !important; color: #fcd34d !important; }

/* ===== Features/Aprender/Compra/Pages/HistoricoPage.razor ===== */
.pg-historico-page { display: contents; }
:where(.pg-historico-page) .ev-empty { padding:5rem 2rem; text-align:center; }


:where(.pg-historico-page) .ev-empty i { color:var(--text-secondary,#d1d5db); display:block; font-size:3.5rem; margin-bottom:1rem; }


:where(.pg-historico-page) .ev-empty h3 { color:var(--text-primary,#111827); font-size:1.1rem; margin-bottom:0.4rem; }


:where(.pg-historico-page) .ev-empty p { color:var(--text-secondary,#6b7280); font-size:0.88rem; }

/* ===== Features/Aprender/Cursos/Pages/CursoDetalhe.razor ===== */
.pg-curso-detalhe { display: contents; }
:where(.pg-curso-detalhe) .vid-detalhe-info { max-width: 860px; }


:where(.pg-curso-detalhe) .vid-detalhe-titulo { color: var(--text-primary,#111827); font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 800; line-height: 1.25; margin: 0 0 0.75rem; }


:where(.pg-curso-detalhe) .vid-detalhe-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }


:where(.pg-curso-detalhe) .ev-meta-chip { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 999px; color: var(--text-secondary,#6b7280); display: inline-flex; font-size: 0.78rem; font-weight: 600; gap: 0.3rem; padding: 0.25rem 0.7rem; }


:where(.pg-curso-detalhe) .ev-meta-chip i { color: var(--primary,#325bb3); }


:where(.pg-curso-detalhe) .chip-gratis i { color: #065f46 !important; }


:where(.pg-curso-detalhe) .vid-detalhe-descricao { color: var(--text-primary,#374151); font-size: 0.95rem; line-height: 1.7; margin-top: 1rem; }


:where(.pg-curso-detalhe) .vid-detalhe-actions-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }


:where(.pg-curso-detalhe) .vid-action-btn { border-radius: 10px; font-size: 0.88rem; font-weight: 600; padding: 0.6rem 1rem; }


:where(.pg-curso-detalhe) .ev-not-found i { color: var(--text-secondary,#d1d5db); display: block; font-size: 3.5rem; margin-bottom: 1rem; }


:where(.pg-curso-detalhe) .ev-not-found h2 { color: var(--text-primary,#111827); font-size: 1.3rem; margin-bottom: 1rem; }


:where(.pg-curso-detalhe) .crs-progresso-bar { background: var(--border-color,#e5e7eb); border-radius: 999px; height: 8px; overflow: hidden; }


:where(.pg-curso-detalhe) .crs-progresso-fill { background: var(--primary,#325bb3); height: 100%; transition: width 0.3s ease; }


:where(.pg-curso-detalhe) .crs-modulo-publico h3 i { color: var(--primary,#325bb3); }


:where(.pg-curso-detalhe) .crs-aula-link i { color: var(--primary,#325bb3); font-size: 1.1rem; }


:where(.pg-curso-detalhe) .crs-aula-link span { font-size: 0.9rem; font-weight: 600; }



[data-theme="dark"] :where(.pg-curso-detalhe) .chip-gratis { background: rgba(16,185,129,.2) !important; color: #6ee7b7 !important; }


[data-theme="dark"] :where(.pg-curso-detalhe) .chip-gratis i { color: #6ee7b7 !important; }

/* ===== Features/Aprender/Cursos/Pages/CursosPage.razor ===== */
.pg-cursos-page { display: contents; }
:where(.pg-cursos-page) .mat-gen { background: rgba(107,114,128,.1); color: #6b7280; }


:where(.pg-cursos-page) .ev-empty { padding:5rem 2rem; text-align:center; }


:where(.pg-cursos-page) .ev-empty i { color:var(--text-secondary,#d1d5db); display:block; font-size:3.5rem; margin-bottom:1rem; }


:where(.pg-cursos-page) .ev-empty h3 { color:var(--text-primary,#111827); font-size:1.1rem; margin-bottom:0.4rem; }


:where(.pg-cursos-page) .ev-empty p { color:var(--text-secondary,#6b7280); font-size:0.88rem; }


:where(.pg-cursos-page) .chip-lock { background: #fef3c7 !important; color: #92400e !important; }


[data-theme="dark"] :where(.pg-cursos-page) .mat-gen { background: rgba(156,163,175,.2); color: #cbd5e1; }


[data-theme="dark"] :where(.pg-cursos-page) .chip-lock { background: rgba(245,158,11,.2) !important; color: #fcd34d !important; }

/* ===== Features/Aprender/Cursos/Pages/MeusCursosPage.razor ===== */
.pg-meus-cursos-page { display: contents; }
:where(.pg-meus-cursos-page) .mat-gen { background: rgba(107,114,128,.1); color: #6b7280; }


:where(.pg-meus-cursos-page) .ev-empty { padding:5rem 2rem; text-align:center; }


:where(.pg-meus-cursos-page) .ev-empty i { color:var(--text-secondary,#d1d5db); display:block; font-size:3.5rem; margin-bottom:1rem; }


:where(.pg-meus-cursos-page) .ev-empty h3 { color:var(--text-primary,#111827); font-size:1.1rem; margin-bottom:0.4rem; }


:where(.pg-meus-cursos-page) .ev-empty p { color:var(--text-secondary,#6b7280); font-size:0.88rem; }


:where(.pg-meus-cursos-page) .crs-progresso-bar { background: var(--border-color,#e5e7eb); border-radius: 999px; height: 8px; overflow: hidden; margin: 0.4rem 0; }


:where(.pg-meus-cursos-page) .crs-progresso-fill { background: var(--primary,#325bb3); height: 100%; }


[data-theme="dark"] :where(.pg-meus-cursos-page) .mat-gen { background: rgba(156,163,175,.2); color: #cbd5e1; }

/* ===== Features/Aprender/Eventos/Pages/EventoDetalhe.razor ===== */
.pg-evento-detalhe { display: contents; }
:where(.pg-evento-detalhe) .ev-banner { border-radius: 14px; height: 320px; margin-bottom: 0; overflow: hidden; position: relative; }


:where(.pg-evento-detalhe) .ev-banner img { height: 100%; object-fit: cover; width: 100%; }


:where(.pg-evento-detalhe) .ev-meta-chip { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 999px; color: var(--text-secondary,#6b7280); display: inline-flex; font-size: 0.78rem; font-weight: 600; gap: 0.3rem; padding: 0.25rem 0.7rem; }


:where(.pg-evento-detalhe) .ev-meta-chip i { color: var(--primary,#325bb3); }



:where(.pg-evento-detalhe) .ev-secao-card { background: var(--bg-card,#fff); border: 1px solid var(--border-color,#e5e7eb); border-radius: 14px; margin-bottom: 1.5rem; padding: 1.5rem; }


:where(.pg-evento-detalhe) .ev-secao-titulo { align-items: center; color: var(--primary,#325bb3); display: flex; font-size: 1.05rem; font-weight: 800; gap: 0.5rem; margin: 0 0 1rem; }


:where(.pg-evento-detalhe) .ev-skills-list li i { color: #10b981; flex-shrink: 0; }



:where(.pg-evento-detalhe) .ev-local-box { align-items: center; background: rgba(16,185,129,.08); border-radius: 10px; color: var(--text-primary,#374151); display: flex; font-size: 0.9rem; gap: 0.5rem; padding: 0.9rem 1rem; }


:where(.pg-evento-detalhe) .ev-local-box i { color: #10b981; flex-shrink: 0; font-size: 1.1rem; }


:where(.pg-evento-detalhe) .ev-link-acesso { align-items: center; color: var(--primary,#325bb3); display: inline-flex; font-size: 0.9rem; font-weight: 700; gap: 0.4rem; text-decoration: none; }


:where(.pg-evento-detalhe) .ev-link-acesso:hover { text-decoration: underline; }


:where(.pg-evento-detalhe) .ev-acesso-restrito { align-items: center; background: rgba(107,114,128,.06); border: 1px dashed var(--border-color,#d1d5db); border-radius: 10px; color: var(--text-secondary,#6b7280); display: flex; font-size: 0.85rem; font-style: italic; gap: 0.5rem; padding: 0.8rem 1rem; }


:where(.pg-evento-detalhe) .ev-acesso-restrito i { color: var(--text-secondary,#9ca3af); flex-shrink: 0; }


:where(.pg-evento-detalhe) .ev-sidebar-info-row i { color: var(--primary,#325bb3); }



:where(.pg-evento-detalhe) .ev-materiais-grid { display: flex; flex-direction: column; gap: 0.5rem; }


:where(.pg-evento-detalhe) .ev-material-item { align-items: center; background: var(--bg-card,#fff); border: 1px solid var(--border-color,#e5e7eb); border-radius: 10px; color: var(--text-primary,#111827); display: flex; gap: 0.75rem; padding: 0.75rem 1rem; text-decoration: none; transition: border-color .15s; }


:where(.pg-evento-detalhe) .ev-material-item:hover { border-color: var(--primary,#325bb3); }


:where(.pg-evento-detalhe) .ev-material-item i { color: var(--primary,#325bb3); font-size: 1.2rem; flex-shrink: 0; }


:where(.pg-evento-detalhe) .ev-material-item span { flex: 1; font-size: 0.88rem; font-weight: 700; }


:where(.pg-evento-detalhe) .ev-material-item small { color: var(--text-secondary,#9ca3af); font-size: 0.72rem; }


:where(.pg-evento-detalhe) .ev-not-found i { color: var(--text-secondary,#d1d5db); display: block; font-size: 3.5rem; margin-bottom: 1rem; }


:where(.pg-evento-detalhe) .ev-not-found h2 { color: var(--text-primary,#111827); font-size: 1.3rem; margin-bottom: 1rem; }

/* ===== Features/Aprender/Materiais/Pages/MateriaisPage.razor ===== */
.pg-materiais-page { display: contents; }
:where(.pg-materiais-page) .mat-pdf { background: rgba(239,68,68,.1); color: #ef4444; }


:where(.pg-materiais-page) .mat-doc { background: rgba(59,130,246,.1); color: #3b82f6; }


:where(.pg-materiais-page) .mat-xls { background: rgba(16,185,129,.1); color: #10b981; }


:where(.pg-materiais-page) .mat-gen { background: rgba(107,114,128,.1); color: #6b7280; }



:where(.pg-materiais-page) .ev-empty { padding:5rem 2rem; text-align:center; }


:where(.pg-materiais-page) .ev-empty i { color:var(--text-secondary,#d1d5db); display:block; font-size:3.5rem; margin-bottom:1rem; }


:where(.pg-materiais-page) .ev-empty h3 { color:var(--text-primary,#111827); font-size:1.1rem; margin-bottom:0.4rem; }


:where(.pg-materiais-page) .ev-empty p { color:var(--text-secondary,#6b7280); font-size:0.88rem; }



:where(.pg-materiais-page) .chip-lock { background: #fef3c7 !important; color: #92400e !important; }



[data-theme="dark"] :where(.pg-materiais-page) .mat-pdf { background: rgba(239,68,68,.2); color: #fca5a5; }


[data-theme="dark"] :where(.pg-materiais-page) .mat-doc { background: rgba(59,130,246,.2); color: #93c5fd; }


[data-theme="dark"] :where(.pg-materiais-page) .mat-xls { background: rgba(16,185,129,.2); color: #6ee7b7; }


[data-theme="dark"] :where(.pg-materiais-page) .mat-gen { background: rgba(156,163,175,.2); color: #cbd5e1; }


[data-theme="dark"] :where(.pg-materiais-page) .chip-lock { background: rgba(245,158,11,.2) !important; color: #fcd34d !important; }

/* ===== Features/Aprender/Materiais/Pages/VisualizadorMaterial.razor ===== */
.pg-visualizador-material { display: contents; }
/* Estilos partilhados */
:where(.pg-visualizador-material) .vid-detalhe-titulo { color: var(--text-primary,#111827); font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 800; line-height: 1.25; margin: 0 0 0.75rem; }


:where(.pg-visualizador-material) .vid-detalhe-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }


:where(.pg-visualizador-material) .ev-meta-chip { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 999px; color: var(--text-secondary,#6b7280); display: inline-flex; font-size: 0.78rem; font-weight: 600; gap: 0.3rem; padding: 0.25rem 0.7rem; }


:where(.pg-visualizador-material) .ev-meta-chip i { color: var(--primary,#325bb3); }


:where(.pg-visualizador-material) .chip-gratis i { color: #065f46 !important; }


:where(.pg-visualizador-material) .vid-detalhe-descricao { color: var(--text-primary,#374151); font-size: 0.95rem; line-height: 1.7; }


:where(.pg-visualizador-material) .vid-detalhe-actions-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }


:where(.pg-visualizador-material) .vid-action-btn { border-radius: 10px; font-size: 0.85rem; font-weight: 600; padding: 0.55rem 1rem; }


:where(.pg-visualizador-material) .ev-not-found i { color: var(--text-secondary,#d1d5db); display: block; font-size: 3.5rem; margin-bottom: 1rem; }


:where(.pg-visualizador-material) .ev-not-found h2 { color: var(--text-primary,#111827); font-size: 1.3rem; margin-bottom: 1rem; }


[data-theme="dark"] :where(.pg-visualizador-material) .mat-viewer-placeholder i { color: #6b7280; }


[data-theme="dark"] :where(.pg-visualizador-material) .chip-gratis { background: rgba(16,185,129,.2) !important; color: #6ee7b7 !important; }


[data-theme="dark"] :where(.pg-visualizador-material) .chip-gratis i { color: #6ee7b7 !important; }

/* ===== Features/Aprender/Playlists/Pages/PlaylistDetalhe.razor ===== */
.pg-playlist-detalhe { display: contents; }
:where(.pg-playlist-detalhe) .ev-empty { padding:5rem 2rem; text-align:center; }


:where(.pg-playlist-detalhe) .ev-empty i { color:var(--text-secondary,#d1d5db); display:block; font-size:3.5rem; margin-bottom:1rem; }


:where(.pg-playlist-detalhe) .ev-empty h3 { color:var(--text-primary,#111827); font-size:1.1rem; margin-bottom:0.4rem; }


:where(.pg-playlist-detalhe) .ev-empty p { color:var(--text-secondary,#6b7280); font-size:0.88rem; }


:where(.pg-playlist-detalhe) .ev-not-found i { color: var(--text-secondary,#d1d5db); display: block; font-size: 3.5rem; margin-bottom: 1rem; }


:where(.pg-playlist-detalhe) .ev-not-found h2 { color: var(--text-primary,#111827); font-size: 1.3rem; margin-bottom: 1rem; }



:where(.pg-playlist-detalhe) .chip-lock { background: #fef3c7 !important; color: #92400e !important; }


[data-theme="dark"] :where(.pg-playlist-detalhe) .chip-lock { background: rgba(245,158,11,.2) !important; color: #fcd34d !important; }

/* ===== Features/Aprender/Playlists/Pages/PlaylistsPage.razor ===== */
.pg-playlists-page { display: contents; }
:where(.pg-playlists-page) .ev-empty { padding:5rem 2rem; text-align:center; }


:where(.pg-playlists-page) .ev-empty i { color:var(--text-secondary,#d1d5db); display:block; font-size:3.5rem; margin-bottom:1rem; }


:where(.pg-playlists-page) .ev-empty h3 { color:var(--text-primary,#111827); font-size:1.1rem; margin-bottom:0.4rem; }


:where(.pg-playlists-page) .ev-empty p { color:var(--text-secondary,#6b7280); font-size:0.88rem; }



:where(.pg-playlists-page) .chip-lock { background: #fef3c7 !important; color: #92400e !important; }


[data-theme="dark"] :where(.pg-playlists-page) .chip-lock { background: rgba(245,158,11,.2) !important; color: #fcd34d !important; }

/* ===== Features/Aprender/Videos/Pages/VideoDetalhe.razor ===== */
.pg-video-detalhe { display: contents; }
:where(.pg-video-detalhe) .vid-detalhe-breadcrumb { align-items: center; color: var(--text-secondary,#9ca3af); display: flex; flex-wrap: wrap; font-size: 0.78rem; gap: 0.35rem; }


:where(.pg-video-detalhe) .vid-detalhe-breadcrumb a { color: var(--primary,#325bb3); text-decoration: none; }


:where(.pg-video-detalhe) .vid-detalhe-breadcrumb a:hover { text-decoration: underline; }


:where(.pg-video-detalhe) .vid-detalhe-breadcrumb i { font-size: 0.65rem; }


:where(.pg-video-detalhe) .vid-locked-placeholder i { color: #9ca3af; font-size: 2.5rem; }


:where(.pg-video-detalhe) .vid-locked-placeholder p { font-size: 0.9rem; margin: 0; }


:where(.pg-video-detalhe) .vid-detalhe-titulo { color: var(--text-primary,#111827); font-size: clamp(1rem, 2vw, 1.4rem); font-weight: 800; line-height: 1.3; margin: 0 0 0.75rem; }


:where(.pg-video-detalhe) .vid-detalhe-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }


:where(.pg-video-detalhe) .ev-meta-chip { align-items: center; background: var(--bg-secondary,#f3f4f6); border-radius: 999px; color: var(--text-secondary,#6b7280); display: inline-flex; font-size: 0.75rem; font-weight: 600; gap: 0.3rem; padding: 0.2rem 0.6rem; }


:where(.pg-video-detalhe) .ev-meta-chip i { color: var(--primary,#325bb3); }


:where(.pg-video-detalhe) .vid-detalhe-descricao { color: var(--text-primary,#374151); font-size: 0.9rem; line-height: 1.65; padding-top: 1rem; border-top: 1px solid var(--border-color,#e5e7eb); }


:where(.pg-video-detalhe) .vid-detalhe-actions-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }


:where(.pg-video-detalhe) .vid-action-btn { border-radius: 10px; font-size: 0.85rem; font-weight: 600; padding: 0.5rem 1rem; }


:where(.pg-video-detalhe) .vid-recomendados-titulo i { color: var(--primary,#325bb3); }


:where(.pg-video-detalhe) .ev-not-found i { color: var(--text-secondary,#d1d5db); display: block; font-size: 3.5rem; margin-bottom: 1rem; }


:where(.pg-video-detalhe) .ev-not-found h2 { color: var(--text-primary,#111827); font-size: 1.3rem; margin-bottom: 1rem; }

/* ===== Features/Aprender/Videos/Pages/VideosPage.razor ===== */
.pg-videos-page { display: contents; }
:where(.pg-videos-page) .ev-empty { padding:5rem 2rem; text-align:center; }


:where(.pg-videos-page) .ev-empty i { color:var(--text-secondary,#d1d5db); display:block; font-size:3.5rem; margin-bottom:1rem; }


:where(.pg-videos-page) .ev-empty h3 { color:var(--text-primary,#111827); font-size:1.1rem; margin-bottom:0.4rem; }


:where(.pg-videos-page) .ev-empty p { color:var(--text-secondary,#6b7280); font-size:0.88rem; }

/* ===== Features/Comercial/Partilhas/Components/BotaoPartilhar.razor (chip nas páginas do Aprender) ===== */
.partilhar-chip { align-items: center; background: transparent; border: 1px solid var(--border-color,#e5e7eb); border-radius: 999px; color: var(--primary,#325bb3); cursor: pointer; display: inline-flex; font-size: 0.78rem; font-weight: 700; gap: 0.3rem; padding: 0.25rem 0.75rem; }

.partilhar-chip:hover { background: color-mix(in srgb, var(--primary,#325bb3) 10%, transparent); border-color: var(--primary,#325bb3); }

/* ===== Descrições com texto rico (editor do Admin) em vídeos, materiais, cursos, coleções, playlists e eventos =====
   Global de propósito: o HTML vem de MarkupString e não recebe o atributo do CSS isolado das páginas. */
.texto-rico { display: flow-root; overflow-wrap: anywhere; }
.texto-rico > :first-child { margin-top: 0; }
.texto-rico > :last-child { margin-bottom: 0; }
.texto-rico p { margin: 0 0 0.85em; }
.texto-rico :is(h1, h2, h3, h4) { color: var(--text-primary,#111827); font-weight: 700; line-height: 1.3; margin: 1.4em 0 0.6em; clear: both; }
.texto-rico h1, .texto-rico h2 { font-size: 1.3em; }
.texto-rico h3, .texto-rico h4 { font-size: 1.12em; }
.texto-rico ul, .texto-rico ol { margin: 0 0 0.85em; padding-left: 1.4em; }
.texto-rico li { margin: 0.25em 0; }
.texto-rico a { color: var(--primary,#325bb3); text-decoration: underline; }
.texto-rico img { max-width: 100%; height: auto; border-radius: 10px; margin: 0.75em 0; }
.texto-rico img[style*="float: left"], .texto-rico img[style*="float:left"] { margin: 0.25em 1.25em 0.75em 0; }
.texto-rico img[style*="float: right"], .texto-rico img[style*="float:right"] { margin: 0.25em 0 0.75em 1.25em; }
.texto-rico hr { border: 0; border-top: 1px solid var(--border-color,#e5e7eb); margin: 1.5em 0; clear: both; }
.texto-rico blockquote { border-left: 3px solid var(--primary,#325bb3); color: var(--text-secondary,#6b7280); margin: 1em 0; padding: 0.25em 0 0.25em 1em; clear: both; }
.texto-rico table { border-collapse: collapse; margin: 0 0 1em; max-width: 100%; display: block; overflow-x: auto; }
.texto-rico :is(td, th) { border: 1px solid var(--border-color,#e5e7eb); padding: 0.4em 0.6em; }

@media (max-width: 600px) {
    .texto-rico img[style*="float"] { float: none !important; display: block; width: 100% !important; height: auto !important; margin: 0.75em 0 !important; }
}

/* ===================================================================
   APRENDER — Página inicial: saudação, cartão "continuar", contadores, cartões
   =================================================================== */
.aph-greet h1 { margin: 0 0 .25rem; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
.aph-greet p { margin: 0; color: var(--text-secondary); }

.aph-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }

.aph-continue { display: flex; gap: 1.1rem; padding: 1.5rem; border: 1px solid var(--border-color); border-radius: 16px; background: var(--card-bg); }
.aph-continue-icon { flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: var(--gradient-brand, var(--primary)); }
.aph-continue-body { min-width: 0; flex: 1; }
.aph-continue-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
.aph-continue-body h2 { margin: .25rem 0 .4rem; font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.aph-continue-body p { margin: 0 0 .9rem; color: var(--text-secondary); }
.aph-continue-progress { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; font-size: .85rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.aph-continue-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--border-color); overflow: hidden; }
.aph-continue-fill { height: 100%; border-radius: 999px; background: var(--primary); }
.aph-continue-cta { display: inline-flex; align-items: center; gap: .4rem; }

.aph-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.aph-stat { display: flex; flex-direction: column; justify-content: center; gap: .15rem; padding: 1rem; border: 1px solid var(--border-color); border-radius: 14px; background: var(--card-bg); text-decoration: none; color: var(--text-secondary); font-size: .85rem; }
a.aph-stat:hover { border-color: var(--primary); }
.aph-stat strong { font-size: 1.6rem; line-height: 1.1; color: var(--text-primary); }
.aph-stat-icon { font-size: 1.2rem; color: var(--primary); }

.aph-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.aph-card { display: flex; flex-direction: column; border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; background: var(--card-bg); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.aph-card:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .1); transform: translateY(-2px); }
.aph-card-thumb { aspect-ratio: 16 / 9; background: var(--panel-bg); overflow: hidden; }
.aph-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aph-card-body { padding: .9rem 1rem 1rem; }
.aph-card-body h3 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.aph-card-meta { font-size: .82rem; color: var(--text-secondary); }

@media (max-width: 900px) {
    .aph-top { grid-template-columns: 1fr; }
    .aph-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .aph-continue { flex-direction: column; padding: 1.1rem; }
    .aph-card-grid { grid-template-columns: 1fr; }
    .aph-greet h1 { font-size: 1.4rem; }
}

/* Colunas laterais fixas ao scroll: o overflow-x: hidden global do .main-body-wrap torna-o um contentor de scroll
   que nunca rola, e o sticky colava-se a ele em vez do .app-content. O clip corta o mesmo sem criar esse contentor. */
.main-body-wrap:has(.mat-sidebar-col, .ev-sidebar-card, .vid-recomendados-col, .nvd-lado) { overflow-x: clip; }

/* ===== Components/Shared/BotaoVoltarTopo.razor ===== */
.voltar-topo { display: none; }

/* Só no computador: no telemóvel aquele canto é da barra de navegação inferior. */
@media (min-width: 769px) {
    .voltar-topo {
        align-items: center; background: var(--primary,#325bb3); border: 0; border-radius: 12px; bottom: 28px;
        box-shadow: 0 4px 16px rgba(0,0,0,.25); color: #fff; cursor: pointer; display: flex; font-size: 1.1rem; height: 44px;
        justify-content: center; opacity: 0; position: fixed; right: 28px; transition: opacity .2s ease, visibility .2s ease;
        visibility: hidden; width: 44px; z-index: 90;
    }
    .voltar-topo[data-visivel] { opacity: 1; visibility: visible; }
    .voltar-topo:hover { filter: brightness(1.08); }
    .voltar-topo:focus-visible { outline: 2px solid var(--primary,#325bb3); outline-offset: 2px; }
}
