
.cnh-page {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    max-width: 1100px;
}
.cnh-intro { margin-bottom: 18px; }
.cnh-intro p {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 720px;
}
.cnh-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.cnh-toolbar input[type="text"] {
    flex: 1;
    min-width: 220px;
    padding: 8px 10px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    font-size: 13px;
}
.cnh-cat-group { margin-bottom: 28px; }
.cnh-cat-title {
    font-family: 'Georgia', serif;
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--card-border);
}
.cnh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.cnh-card {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 18px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    min-height: 130px;
    text-decoration: none;
}
.cnh-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}
.cnh-card.inativo { opacity: 0.55; background: #fafaf5; }
.cnh-card-title {
    font-family: 'Georgia', serif;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.3;
}
.cnh-card-desc {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cnh-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
}
.cnh-card-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.cnh-card-meta-item svg { width: 13px; height: 13px; }
.cnh-inactive-tag { color: #a04040; }
.cnh-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cnh-badge.aprovado { background: #e1f0e1; color: #2a6d2a; }
.cnh-badge.reprovado { background: #fbe2e0; color: #a04040; }
.cnh-badge.andamento { background: #fff4d6; color: #8a6900; }
.cnh-badge.nao-iniciado { background: #eee; color: #777; }

/* ─── Sub-página do curso ─────────────────────────────────────────────────── */
.cnh-curso-page {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px 60px 32px;
    max-width: 1000px;
}
.cnh-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px 0;
    margin-bottom: 18px;
    text-decoration: none;
}
.cnh-back:hover { color: var(--accent-dark); }
.cnh-curso-header {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.cnh-curso-info { flex: 1; min-width: 0; }
.cnh-curso-titulo {
    font-family: 'Georgia', serif;
    font-size: 26px;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.2;
}
.cnh-curso-cat {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--accent-dark);
    margin-bottom: 10px;
}
.cnh-curso-desc {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}
.cnh-curso-inativo { margin-top: 10px; color: #a04040; font-size: 12px; }
.cnh-curso-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cnh-danger { color: #a04040; }
.cnh-section-title {
    font-family: 'Georgia', serif;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cnh-video-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.cnh-video-row {
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 12px 14px;
    background: white;
    display: flex;
    align-items: center;
    gap: 14px;
}
.cnh-video-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.cnh-video-row.assistido .cnh-video-num { background: #2a6d2a; }
.cnh-video-info { flex: 1; min-width: 0; }
.cnh-video-titulo {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-weight: 500;
}
.cnh-video-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
.cnh-video-actions { display: flex; gap: 6px; flex-shrink: 0; }
.cnh-prova-box {
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 18px;
    background: #fdfcf7;
}
.cnh-prova-stats {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.6;
}
.cnh-prova-stats strong { color: var(--text-primary); }
.cnh-ok { color: #2a6d2a; }
.cnh-bad { color: #a04040; }
.cnh-muted { color: var(--text-secondary); }
.cnh-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    background: #fafaf5;
    border: 1px dashed var(--card-border);
    border-radius: 6px;
}

/* ─── Modal: player de vídeo ──────────────────────────────────────────────── */
.cnh-player-modal .modal { max-width: 880px; width: 92vw; }
.cnh-player-frame {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}
.cnh-player-frame iframe,
.cnh-player-frame video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.cnh-player-fallback { color: #bbb; padding: 30px; text-align: center; font-size: 13px; }
.cnh-player-fallback a { color: var(--accent-dark); }

/* ─── Modal: fazer prova ──────────────────────────────────────────────────── */
.cnh-prova-modal .modal { max-width: 700px; }
.cnh-prova-questao {
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 12px;
}
.cnh-prova-questao-num {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.cnh-prova-questao-enunciado {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
}
.cnh-prova-alternativa {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 13px;
}
.cnh-prova-alternativa:hover { background: #fafaf5; }
.cnh-prova-alternativa.selecionada { border-color: var(--accent); background: #fffbe6; }
.cnh-prova-alternativa.correta { background: #e1f0e1; }
.cnh-prova-alternativa.errada { background: #fbe2e0; }
.cnh-prova-alternativa input { margin: 0; }
.cnh-prova-resultado { padding: 18px; border-radius: 6px; margin-bottom: 16px; text-align: center; }
.cnh-prova-resultado.aprovado { background: #e1f0e1; color: #2a6d2a; border: 1px solid #87b387; }
.cnh-prova-resultado.reprovado { background: #fbe2e0; color: #a04040; border: 1px solid #d39998; }
.cnh-prova-resultado-nota { font-family: 'Georgia', serif; font-size: 34px; font-weight: 400; margin-bottom: 4px; }

/* ─── Modal: editor de prova ──────────────────────────────────────────────── */
.cnh-prova-editor-modal .modal { max-width: 740px; max-height: 90vh; display: flex; flex-direction: column; }
.cnh-prova-editor-questao {
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 10px;
    background: white;
}
.cnh-qpe-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.cnh-qpe-num { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; padding-top: 6px; }
.cnh-qpe-enunciado { flex: 1; padding: 8px 10px; border: 1px solid var(--card-border); border-radius: 4px; font-size: 13px; }
.cnh-qpe-tipo { padding: 8px; border: 1px solid var(--card-border); border-radius: 4px; font-size: 12px; }
.cnh-prova-editor-alt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cnh-prova-editor-alt-row input[type="text"] { flex: 1; padding: 6px 8px; border: 1px solid var(--card-border); border-radius: 4px; font-size: 13px; }
.cnh-alt-correta { font-size: 11px; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.cnh-modal-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    font-size: 13px;
}
.cnh-modal-input[type="number"] { width: 120px; }
textarea.cnh-modal-input { resize: vertical; }
.cnh-modal-hint { display: block; margin-top: 6px; color: var(--text-secondary); font-size: 11px; }
