/* ===========================================================================
   Módulo Questões — banco de questões de múltipla escolha (tema dark).
   =========================================================================== */
.questoes-module-root {
  padding: 8px 4px 48px;
  color: var(--text-1, #e6e8ec);
}
.questoes-loading { padding: 40px; text-align: center; color: var(--text-3, #94a3b8); }

.questoes-head { margin: 4px 4px 20px; }
.questoes-title { font-size: 1.6rem; font-weight: 700; margin: 0; }
.questoes-subtitle { margin: 4px 0 0; color: var(--text-3, #94a3b8); font-size: 0.9rem; }

/* --- Tabs --- */
.questoes-tabs {
  display: flex;
  gap: 4px;
  margin: 0 4px 20px;
  border-bottom: 1px solid var(--border-soft, rgba(100,116,139,0.25));
}
.questoes-tab {
  background: transparent;
  border: none;
  color: var(--text-3, #94a3b8);
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.questoes-tab:hover { color: var(--text-1, #e6e8ec); }
.questoes-tab.is-active { color: var(--accent, #2edb7f); border-bottom-color: var(--accent, #2edb7f); }
.questoes-tab-body { margin: 0 4px; }

.questoes-empty { padding: 48px 16px; text-align: center; color: var(--text-3, #94a3b8); }

/* --- Botões genéricos --- */
.questoes-btn-primary {
  background: linear-gradient(135deg, var(--accent, #2edb7f), #26c473);
  color: #06170f;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.questoes-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(46,219,127,0.25); }
.questoes-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.questoes-btn-ghost {
  background: transparent;
  border: 1px solid var(--border-soft, rgba(100,116,139,0.4));
  color: var(--text-2, #cbd5e1);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.questoes-btn-ghost:hover { background: var(--bg-2, #23262d); }

/* --- Aba Praticar: filtros --- */
.questoes-praticar-total { color: var(--text-3, #94a3b8); font-size: 0.88rem; margin-bottom: 16px; }
.questoes-filtro-grupo { margin-bottom: 16px; }
.questoes-filtro-titulo { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3, #94a3b8); margin-bottom: 8px; }
.questoes-filtro-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.questoes-chip {
  background: var(--bg-2, #23262d);
  border: 1px solid var(--border-soft, rgba(100,116,139,0.3));
  color: var(--text-2, #cbd5e1);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}
.questoes-chip:hover { border-color: var(--accent, #2edb7f); }
.questoes-chip.is-active { background: rgba(46,219,127,0.15); border-color: var(--accent, #2edb7f); color: var(--accent, #2edb7f); }
.questoes-chip-n { opacity: 0.65; font-size: 0.76rem; }
.questoes-btn-iniciar { margin-top: 12px; }

/* --- Aba Gerenciar / Lixeira --- */
.questoes-lista-gerenciar { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.questoes-lista-gerenciar li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-1, #1d2026); border: 1px solid var(--border-soft, rgba(100,116,139,0.2));
  border-radius: 10px; padding: 12px 16px;
}
.questoes-gerenciar-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.questoes-gerenciar-meta { font-size: 0.78rem; color: var(--text-3, #94a3b8); }

/* --- Aba Criar --- */
.questoes-criar-form { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.questoes-criar-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-2, #cbd5e1); }
.questoes-criar-form input, .questoes-criar-form textarea, .questoes-criar-form select {
  background: var(--bg-1, #1d2026); border: 1px solid var(--border-soft, rgba(100,116,139,0.4));
  border-radius: 8px; color: var(--text-1, #e6e8ec); padding: 8px 10px; font-family: inherit; font-size: 0.9rem;
}
.questoes-criar-alt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
.questoes-criar-meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* --- Aba Importar --- */
.questoes-import-section { margin-bottom: 28px; max-width: 720px; }
.questoes-import-section h3 { font-size: 1rem; margin: 0 0 6px; }
.questoes-import-hint { color: var(--text-3, #94a3b8); font-size: 0.85rem; margin-bottom: 12px; }
.questoes-import-details { margin-top: 12px; }
.questoes-import-details summary { cursor: pointer; color: var(--accent, #2edb7f); font-size: 0.85rem; }
.questoes-import-prompt-preview {
  white-space: pre-wrap; background: var(--bg-1, #1d2026); border: 1px solid var(--border-soft, rgba(100,116,139,0.3));
  border-radius: 8px; padding: 12px; font-size: 0.78rem; color: var(--text-2, #cbd5e1); margin-top: 8px; max-height: 320px; overflow-y: auto;
}
.questoes-import-textarea {
  width: 100%; background: var(--bg-1, #1d2026); border: 1px solid var(--border-soft, rgba(100,116,139,0.4));
  border-radius: 8px; color: var(--text-1, #e6e8ec); padding: 10px; font-family: var(--font-mono, monospace); font-size: 0.8rem;
  margin-bottom: 10px; resize: vertical;
}
.questoes-import-erro { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; padding: 12px; color: #fca5a5; font-size: 0.85rem; margin-top: 12px; }
.questoes-import-erro ul { margin: 8px 0 0 18px; }
.questoes-import-ok { background: rgba(46,219,127,0.08); border: 1px solid rgba(46,219,127,0.3); border-radius: 8px; padding: 14px; margin-top: 12px; }
.questoes-import-preview-lista { list-style: none; padding: 0; margin: 10px 0 14px; display: flex; flex-direction: column; gap: 6px; font-size: 0.83rem; }
.questoes-import-tag { background: var(--bg-2, #23262d); border-radius: 999px; padding: 1px 8px; font-size: 0.72rem; margin-left: 6px; color: var(--text-3, #94a3b8); }

/* ===========================================================================
   Sessão de prática (overlay full-screen)
   =========================================================================== */
.questoes-practice-overlay {
  position: fixed; inset: 0; background: rgba(6,10,16,0.92); z-index: 1000;
  display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 24px 16px;
}
.questoes-practice-overlay.hidden { display: none; }
.questoes-practice-modal {
  background: var(--bg-0, #14161b); border: 1px solid var(--border-soft, rgba(100,116,139,0.25));
  border-radius: 18px; width: 100%; max-width: 1200px; max-height: calc(100vh - 48px);
  overflow-y: auto; padding: 0 0 24px;
}
.questoes-practice-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border-soft, rgba(100,116,139,0.15));
}
.qp-header-left { display: flex; flex-direction: column; gap: 6px; flex: 1; margin-right: 16px; }
.qp-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.qp-progress-bar-wrap { height: 4px; background: var(--bg-2, #23262d); border-radius: 999px; overflow: hidden; width: 160px; }
.qp-progress-bar-fill { height: 100%; background: var(--accent, #2edb7f); border-radius: 999px; transition: width 0.3s ease; }
.questoes-practice-progress { color: var(--text-3, #94a3b8); font-size: 0.82rem; font-weight: 600; }

.qp-streak-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.3);
  color: #fbbf24; font-weight: 700; font-size: 0.85rem; padding: 4px 10px; border-radius: 999px;
  transition: transform 0.2s ease;
}
.qp-streak-chip.hidden { display: none; }
.qp-streak-pop { animation: qp-pop 0.3s ease; }
@keyframes qp-pop { 0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }

.qp-mute-btn {
  background: transparent; border: none; color: var(--text-3, #94a3b8); font-size: 1.05rem; cursor: pointer;
  padding: 2px 4px; border-radius: 6px; transition: background 0.15s;
}
.qp-mute-btn:hover { background: var(--bg-2, #23262d); }

.questoes-practice-close { background: transparent; border: none; color: var(--text-3, #94a3b8); font-size: 1.1rem; cursor: pointer; }
.questoes-practice-close:hover { color: var(--text-1, #e6e8ec); }
.questoes-practice-body {
  padding: 24px 28px; display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.15fr);
  grid-template-areas: "main alts" "footer footer";
  gap: 8px 32px; align-items: start;
}
.qp-main-col { grid-area: main; }
@media (max-width: 720px) {
  .questoes-practice-body { grid-template-columns: 1fr; grid-template-areas: "main" "alts" "footer"; }
}

/* --- Cronômetro por questão (contagem crescente, só informativo) --- */
.qp-timer-wrap { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--text-3, #94a3b8); }
.qp-timer-wrap.hidden { display: none; }
.qp-timer-icon { font-size: 0.9rem; }
.qp-timer-num {
  font-family: var(--font-mono, monospace); font-size: 0.85rem; font-weight: 700;
  color: var(--text-2, #cbd5e1);
}

/* --- Banner de feedback (frase motivacional variada) --- */
.qp-feedback-banner {
  font-weight: 700; font-size: 0.95rem; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px;
}
.qp-feedback-banner.hidden { display: none; }
.qp-feedback-banner.is-correto { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.qp-feedback-banner.is-errado { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.qp-banner-pop { animation: qp-banner-in 0.35s ease; }
@keyframes qp-banner-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.questoes-enunciado { font-size: 1.05rem; font-weight: 600; line-height: 1.5; margin: 0; color: var(--text-1, #e6e8ec); }

/* --- Navegador de questões (grade numérica clicável) --- */
.qp-navegador-wrap {
  padding: 10px 24px; border-bottom: 1px solid var(--border-soft, rgba(100,116,139,0.15));
  overflow-x: auto;
}
.qp-navegador { display: flex; gap: 6px; }
.qp-nav-item {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border-soft, rgba(100,116,139,0.35)); background: var(--bg-1, #1d2026);
  color: var(--text-3, #94a3b8); font-size: 0.78rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s ease;
}
.qp-nav-item:hover { border-color: var(--accent, #2edb7f); color: var(--text-1, #e6e8ec); }
.qp-nav-item.is-current { border-color: var(--accent, #2edb7f); box-shadow: 0 0 0 2px rgba(46,219,127,0.25); color: var(--text-1, #e6e8ec); }
.qp-nav-item.is-correct { background: rgba(34,197,94,0.15); border-color: #22c55e; color: #4ade80; }
.qp-nav-item.is-wrong { background: rgba(239,68,68,0.15); border-color: #ef4444; color: #f87171; }
/* Modo prova: só sinaliza "respondida", sem revelar certo/errado. */
.qp-nav-item.is-answered { background: rgba(148,163,184,0.15); border-color: var(--text-3, #94a3b8); color: var(--text-2, #cbd5e1); }

/* --- Alternativa selecionada no modo prova (sem indicar certo/errado) --- */
.questoes-alt.is-selected-prova { border-color: var(--accent, #2edb7f); box-shadow: 0 0 0 2px rgba(46,219,127,0.2); }

/* --- Banner de nota/aprovação (resultado do modo prova) --- */
.qp-prova-banner {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
}
.qp-prova-banner strong { font-size: 1.15rem; }
.qp-prova-banner.is-aprovado { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.qp-prova-banner.is-reprovado { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.qp-prova-banner span { font-size: 0.88rem; font-weight: 500; }

/* --- Quebra por disciplina (resultado do modo simulado) --- */
.qp-simulado-breakdown { text-align: left; margin-bottom: 24px; }
.qp-simulado-breakdown h3 { font-size: 0.95rem; margin: 0 0 10px; }
.qp-simulado-breakdown-lista { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.qp-simulado-breakdown-item { display: flex; flex-direction: column; gap: 4px; }
.qp-simulado-breakdown-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; }
.qp-simulado-peso { color: var(--text-3, #94a3b8); font-size: 0.75rem; font-weight: 500; }
.qp-simulado-breakdown-bar {
  height: 6px; border-radius: 999px; background: var(--bg-1, #1d2026);
  border: 1px solid var(--border-soft, rgba(100,116,139,0.2)); overflow: hidden;
}
.qp-simulado-breakdown-bar-fill { height: 100%; border-radius: 999px; background: var(--accent, #2edb7f); }

/* --- Seletor de dificuldade (classificação manual) --- */
.qp-dificuldade-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.qp-dificuldade-label { font-size: 0.78rem; color: var(--text-3, #94a3b8); }
.qp-dificuldade-btn {
  background: transparent; border: 1px solid var(--border-soft, rgba(100,116,139,0.35));
  color: var(--text-3, #94a3b8); border-radius: 999px; padding: 4px 12px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s ease;
}
.qp-dificuldade-btn:hover { border-color: var(--text-2, #cbd5e1); color: var(--text-1, #e6e8ec); }
.qp-dificuldade-btn[data-nivel="facil"].is-active { background: rgba(34,197,94,0.15); border-color: #22c55e; color: #4ade80; }
.qp-dificuldade-btn[data-nivel="medio"].is-active { background: rgba(251,191,36,0.15); border-color: #fbbf24; color: #fbbf24; }
.qp-dificuldade-btn[data-nivel="dificil"].is-active { background: rgba(239,68,68,0.15); border-color: #ef4444; color: #f87171; }

/* --- Histórico de tentativas anteriores nesta questão específica --- */
.qp-historico-wrap:empty { margin: 0; }
.qp-historico-toggle {
  background: transparent; border: none; color: var(--text-3, #94a3b8); font-size: 0.78rem;
  cursor: pointer; padding: 0; margin-top: 10px; text-align: left;
}
.qp-historico-toggle:hover { color: var(--text-2, #cbd5e1); }
.qp-historico-ver { color: var(--accent, #2edb7f); text-decoration: underline; margin-left: 2px; }
.qp-historico-lista {
  list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px;
  max-height: 140px; overflow-y: auto;
}
.qp-historico-lista.hidden { display: none; }
.qp-historico-item {
  display: flex; justify-content: space-between; gap: 10px; font-size: 0.76rem;
  color: var(--text-3, #94a3b8); background: var(--bg-1, #1d2026); border-radius: 6px; padding: 4px 8px;
}
.qp-historico-item-data { color: var(--text-2, #cbd5e1); white-space: nowrap; }
.qp-historico-item-resultado { font-weight: 700; white-space: nowrap; }
.qp-historico-item.is-correto .qp-historico-item-resultado { color: #4ade80; }
.qp-historico-item.is-errado .qp-historico-item-resultado { color: #f87171; }

.questoes-alternativas { grid-area: alts; display: flex; flex-direction: column; gap: 14px; }
.questoes-alt {
  position: relative;
  display: block; text-align: left; width: 100%;
  background: var(--bg-1, #1d2026); border: 1.5px solid var(--border-soft, rgba(100,116,139,0.3));
  border-radius: 12px; padding: 16px 48px 16px 20px; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.questoes-alt:hover:not(.is-answered) { border-color: var(--accent, #2edb7f); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.22); }
.questoes-alt-letra {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--bg-2, #23262d);
  font-weight: 700; font-size: 0.8rem; color: var(--text-3, #94a3b8); margin-right: 10px; flex-shrink: 0;
}
.questoes-alt-texto { color: var(--text-1, #e6e8ec); line-height: 1.6; }
.questoes-alt.is-answered { cursor: default; }
.questoes-alt.is-correct { border-color: #22c55e; background: rgba(34,197,94,0.08); }
.questoes-alt.is-wrong { border-color: #ef4444; background: rgba(239,68,68,0.08); }
.questoes-alt-feedback { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
.questoes-alt-feedback.hidden { display: none; }
.questoes-alt-feedback-label { font-weight: 700; font-size: 0.82rem; }
.questoes-alt.is-correct .questoes-alt-feedback-label { color: #4ade80; }
.questoes-alt.is-wrong .questoes-alt-feedback-label { color: #f87171; }
.questoes-alt-explicacao { margin: 6px 0 0; color: var(--text-2, #cbd5e1); font-size: 0.85rem; line-height: 1.5; }
.questoes-alt.questoes-alt-irrelevante { opacity: 0.6; }

/* --- Eliminar alternativa (técnica de eliminação) — apoio visual de
   raciocínio, some assim que a questão é respondida.
   A tesoura fica FORA da caixa da alternativa: quando estava dentro
   (canto superior direito), a mira errada marcava a resposta em vez de
   riscar — e numa questão isso custa caro. --- */
.questoes-alt-row {
  /* o gap entre alternativas já vem de .questoes-alternativas */
  display: flex; align-items: center; gap: 8px;
}
.questoes-alt-row > .questoes-alt {
  /* `width: 100%` da regra base + a tesoura ao lado estouravam a linha e
     jogavam o botão pra fora da tela. No flex, quem manda é o flex-basis. */
  flex: 1 1 auto; width: auto !important; min-width: 0; margin-bottom: 0;
  /* sem o espaço reservado pra borracha que vivia dentro */
  padding-right: 20px;
}
.questoes-alt-eliminar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  /* Presença de botão desde o início: se for invisível até o hover, o
     aluno não descobre que a eliminação existe. */
  background: var(--bg-1, #1d2026);
  border: 1px solid var(--border-soft, rgba(100,116,139,0.3));
  cursor: pointer; color: var(--text-2, #cbd5e1);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
/* flex-shrink do container esmagava o ícone pra largura 0 (a altura
   continuava 17px, então sobrava um botão "vazio"). */
.questoes-alt-eliminar svg { width: 17px !important; height: 17px !important; flex: 0 0 17px; }
.questoes-alt-eliminar:hover {
  color: #fecaca; background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.55); transform: translateY(-1px);
}
.questoes-alt-eliminar:focus-visible {
  outline: 2px solid var(--accent, #2edb7f); outline-offset: 2px;
}
.questoes-alt-row.is-eliminada .questoes-alt-eliminar {
  color: #fecaca; background: rgba(239,68,68,0.22); border-color: rgba(239,68,68,0.6);
}
/* Some junto com o resto quando a questão já foi respondida */
.questoes-alt.is-answered ~ .questoes-alt-eliminar,
.questoes-alt-row:has(.questoes-alt.is-answered) .questoes-alt-eliminar {
  visibility: hidden; pointer-events: none;
}
.questoes-alt.is-eliminada .questoes-alt-letra,
.questoes-alt.is-eliminada .questoes-alt-texto { text-decoration: line-through; opacity: 0.5; }
.questoes-alt.is-answered .questoes-alt-eliminar { display: none; }

/* --- Link pra expandir as explicações das alternativas não relevantes
   (nem marcada, nem correta) — mantém a tela de resposta mais enxuta por
   padrão, sem perder a opção de ler tudo se quiser. --- */
.qp-ver-todas-explicacoes {
  background: transparent; border: none; color: var(--text-3, #94a3b8);
  font-size: 0.8rem; text-decoration: underline; cursor: pointer; padding: 4px 0; align-self: center;
}
.qp-ver-todas-explicacoes:hover { color: var(--text-1, #e6e8ec); }
.qp-ver-todas-explicacoes.hidden { display: none; }

.questoes-practice-footer { grid-area: footer; display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }

/* --- Resultado final --- */
/* .questoes-practice-body é um grid de 2 colunas (main/alts) pro modo de
   pergunta; sem grid-column explícito, o resultado (um bloco só) caía na
   1ª coluna (mais estreita) em vez de ocupar a largura toda do modal. */
.questoes-resultado { grid-column: 1 / -1; text-align: center; }
.questoes-resultado-titulo { font-size: 1.3rem; margin: 0 0 8px; }
.questoes-resultado-streak { color: #fbbf24; font-size: 0.9rem; margin: 0 0 20px; }

.qp-registrar-tempo {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg-1, #1d2026); border: 1px solid var(--border-soft, rgba(100,116,139,0.25));
  border-radius: 10px; padding: 10px 16px; margin: 0 0 20px; font-size: 0.85rem; color: var(--text-2, #cbd5e1);
}
.qp-registrar-tempo-info strong { color: var(--text-1, #e6e8ec); }
.qp-registrar-tempo-ok { color: #4ade80; font-weight: 600; font-size: 0.85rem; }

/* --- Confete (canvas full-viewport, some sozinho após a animação) --- */
.questoes-confete-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 1100; }
.questoes-resultado-top { display: flex; align-items: center; justify-content: center; gap: 32px; margin-bottom: 32px; }
.questoes-donut-wrap { position: relative; width: 120px; height: 120px; }
.questoes-donut { width: 120px; height: 120px; transform: rotate(-90deg); }
.questoes-donut-track { fill: none; stroke: var(--bg-2, #23262d); stroke-width: 10; }
.questoes-donut-fill { fill: none; stroke: var(--accent, #2edb7f); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.questoes-donut-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.questoes-donut-label strong { font-size: 1.3rem; }
.questoes-donut-label span { font-size: 0.85rem; color: var(--text-3, #94a3b8); }
.questoes-resultado-counts { text-align: left; font-size: 0.9rem; }
.questoes-resultado-counts p { margin: 6px 0; display: flex; align-items: center; gap: 8px; }
.questoes-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.questoes-dot-ok { background: #22c55e; }
.questoes-dot-erro { background: #ef4444; }

/* --- Desempenho por dificuldade (tela de resultado) --- */
.qp-dificuldade-resumo { text-align: left; margin-bottom: 24px; }
.qp-dificuldade-resumo h3 { font-size: 0.95rem; margin: 0 0 10px; }
.qp-dificuldade-resumo-lista { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.qp-dificuldade-resumo-item { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.qp-dificuldade-resumo-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.qp-dificuldade-resumo-item[data-nivel="facil"] .qp-dificuldade-resumo-dot { background: #22c55e; }
.qp-dificuldade-resumo-item[data-nivel="medio"] .qp-dificuldade-resumo-dot { background: #fbbf24; }
.qp-dificuldade-resumo-item[data-nivel="dificil"] .qp-dificuldade-resumo-dot { background: #ef4444; }
.qp-dificuldade-resumo-dica { text-align: center; margin-bottom: 24px; }

.questoes-resultado-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; text-align: left; margin-bottom: 28px; }
.questoes-resultado-cols h3 { font-size: 0.95rem; margin: 0 0 10px; }
.questoes-resumo-lista { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.questoes-resumo-lista li { display: flex; justify-content: space-between; }
.questoes-resumo-pct { color: var(--text-3, #94a3b8); font-weight: 600; }
.questoes-resultado-hint { color: var(--text-3, #94a3b8); font-size: 0.82rem; margin: 0 0 10px; }
.questoes-temas-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.questoes-tema-chip {
  background: var(--bg-2, #23262d); border: 1px solid var(--border-soft, rgba(100,116,139,0.3));
  color: var(--text-2, #cbd5e1); border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; cursor: pointer;
}
.questoes-tema-chip.is-selected { background: rgba(46,219,127,0.15); border-color: var(--accent, #2edb7f); color: var(--accent, #2edb7f); }
.questoes-resultado-actions { display: flex; justify-content: center; gap: 12px; }

/* ===========================================================================
   Popover "Questões" no tópico do Editais (reaproveita .editais-popover-backdrop
   e .editais-popover como base de posicionamento/caixa — ver editais.css).
   =========================================================================== */
/* Override do backdrop base — centraliza verticalmente e dá mais respiro,
   só pro popover de Questões (não mexe nos outros popovers do Editais que
   também usam .editais-popover-backdrop). */
.questoes-popover-backdrop { align-items: center; padding: 24px 16px; }
.questoes-popover-panel { max-height: calc(100vh - 48px); width: 560px; }
.questoes-popover-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-subtle, rgba(100,116,139,0.2));
  color: var(--text-1, #e6e8ec); font-size: 1rem;
}
.questoes-popover-close { background: transparent; border: none; color: var(--text-3, #94a3b8); font-size: 1rem; cursor: pointer; }
.questoes-popover-close:hover { color: var(--text-1, #e6e8ec); }
.questoes-popover-body { padding: 22px; overflow-y: auto; }
.questoes-popover-lista { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.questoes-popover-lista li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-2, #23262d); border-radius: 8px; padding: 8px 10px; font-size: 0.83rem; color: var(--text-2, #cbd5e1);
}
.questoes-popover-unlink { background: transparent; border: none; color: var(--text-3, #94a3b8); cursor: pointer; font-size: 0.85rem; }
.questoes-popover-unlink:hover { color: #f87171; }

/* --- Estado vazio (nenhuma questão vinculada ainda) --- */
.qp-menu-vazio { text-align: center; padding: 20px 8px; }
.qp-menu-vazio-texto { color: var(--text-3, #94a3b8); font-size: 0.88rem; margin: 0 0 16px; }

/* --- Card de estatísticas (resolvidas/acertos/erros/tempo) --- */
.qp-stats-card { display: flex; align-items: center; gap: 20px; margin-bottom: 6px; }
.qp-stats-donut-wrap { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.qp-stats-donut { width: 84px; height: 84px; transform: rotate(-90deg); }
.qp-stats-donut-acertos { fill: none; stroke: #22c55e; stroke-width: 10; }
.qp-stats-donut-erros { fill: none; stroke: #ef4444; stroke-width: 10; }
.qp-stats-donut-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.qp-stats-donut-label strong { font-size: 1rem; color: var(--text-1, #e6e8ec); }
.qp-stats-donut-label span { font-size: 0.68rem; color: var(--text-3, #94a3b8); }
.qp-stats-numbers { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.qp-stat { display: flex; flex-direction: column; }
.qp-stat-num { font-size: 1.15rem; font-weight: 700; color: var(--text-1, #e6e8ec); }
.qp-stat-label { font-size: 0.72rem; color: var(--text-3, #94a3b8); }
.qp-stat-ok .qp-stat-num { color: #4ade80; }
.qp-stat-erro .qp-stat-num { color: #f87171; }
.qp-stats-tempo { color: var(--text-3, #94a3b8); font-size: 0.78rem; margin: 10px 0 18px; }
.qp-stats-tempo strong { color: var(--text-2, #cbd5e1); }

/* --- Seletor de quantidade por sessão (5/10/20/Todas) --- */
.qp-qtd-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.qp-qtd-label { color: var(--text-3, #94a3b8); font-size: 0.78rem; margin-right: 2px; }
.qp-qtd-btn {
  background: var(--bg-2, #23262d); border: 1px solid transparent; color: var(--text-2, #cbd5e1);
  border-radius: 999px; padding: 3px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.qp-qtd-btn:hover { background: var(--bg-1, #1a1d23); }
.qp-qtd-btn.is-active { background: var(--accent, #2edb7f); border-color: var(--accent, #2edb7f); color: #05130a; }

/* --- Menu de ações (Continuar / Só as que errei / Nova sessão / Importar) --- */
.qp-menu-actions { display: flex; flex-direction: column; gap: 8px; }
.questoes-menu-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; }
.qp-menu-btn-n {
  background: rgba(255,255,255,0.1); border-radius: 999px; padding: 1px 8px; font-size: 0.75rem; font-weight: 700;
}

/* --- Rodapé: zerar histórico + gerenciar vinculadas (ambos secundários,
   fora do fluxo principal de ação) --- */
.qp-menu-footer { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--bg-2, #23262d); display: flex; flex-direction: column; gap: 10px; }
.qp-reset-btn {
  background: transparent; border: none; color: var(--text-3, #94a3b8); font-size: 0.78rem; cursor: pointer;
  text-align: left; padding: 0; width: fit-content;
}
.qp-reset-btn:hover { color: #f87171; }
.qp-vinculadas-details { margin-top: 0; }
.qp-vinculadas-details summary { color: var(--text-3, #94a3b8); font-size: 0.78rem; cursor: pointer; }
.qp-vinculadas-details summary:hover { color: var(--text-2, #cbd5e1); }

/* ===========================================================================
   Aba "Cadernos" — Pastas > Cadernos (organização estilo TEC Concursos).
   =========================================================================== */
.questoes-cadernos-head { display: flex; gap: 10px; margin-bottom: 18px; }
.questoes-link-btn {
  background: transparent; border: none; color: var(--accent, #2edb7f); font-size: 0.85rem;
  font-weight: 600; cursor: pointer; padding: 2px 0;
}
.questoes-link-btn:hover { text-decoration: underline; }
.questoes-icon-btn {
  background: transparent; border: none; color: var(--text-3, #94a3b8); cursor: pointer; font-size: 0.9rem;
  padding: 2px 6px; border-radius: 6px; transition: background 0.15s;
}
.questoes-icon-btn:hover { background: var(--bg-2, #23262d); color: var(--text-1, #e6e8ec); }

.questoes-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--text-3, #94a3b8); font-size: 0.88rem; }

/* --- Pastas (lista enxuta, estilo TEC: ícone + nome + metadados, sem
   card/fundo por linha — só um separador fino e destaque no hover) --- */
.questoes-pastas-lista { display: flex; flex-direction: column; }
.questoes-pasta-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px 14px; padding: 12px 6px; border-bottom: 1px solid var(--border-soft, rgba(100,116,139,0.15));
  border-radius: 8px; transition: background 0.12s ease;
}
.questoes-pasta-row:hover { background: var(--bg-1, #1d2026); }
.questoes-pasta-info { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.questoes-pasta-icon { color: var(--accent, #2edb7f); flex-shrink: 0; display: inline-flex; }
.questoes-pasta-icon svg { width: 18px; height: 18px; }
.questoes-pasta-nome { background: transparent; border: none; color: var(--text-1, #e6e8ec); font-size: 0.95rem; font-weight: 700; cursor: pointer; padding: 0; text-align: left; }
.questoes-pasta-nome:hover { color: var(--accent, #2edb7f); text-decoration: underline; }
.questoes-pasta-count { color: var(--text-3, #94a3b8); font-size: 0.8rem; white-space: nowrap; }
.questoes-pasta-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.questoes-pasta-desempenho { flex-basis: 100%; margin: 4px 6px 10px; }
.questoes-pasta-desempenho.hidden { display: none; }

/* --- Cadernos (mesmo padrão de lista enxuta das pastas) --- */
.questoes-cadernos-lista { display: flex; flex-direction: column; }
.questoes-caderno-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  padding: 12px 6px; border-bottom: 1px solid var(--border-soft, rgba(100,116,139,0.15));
  border-radius: 8px; transition: background 0.12s ease;
}
.questoes-caderno-row:hover { background: var(--bg-1, #1d2026); }
.questoes-caderno-icon { color: var(--accent, #2edb7f); flex-shrink: 0; display: inline-flex; }
.questoes-caderno-icon svg { width: 18px; height: 18px; }
.questoes-caderno-nome { background: transparent; border: none; color: var(--text-1, #e6e8ec); font-size: 0.92rem; font-weight: 700; cursor: pointer; padding: 0; }
.questoes-caderno-nome:hover { color: var(--accent, #2edb7f); text-decoration: underline; }
.questoes-caderno-resumo { color: var(--text-3, #94a3b8); font-size: 0.8rem; flex: 1; min-width: 160px; }

.questoes-caderno-itens-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.questoes-caderno-itens-head h3 { font-size: 1rem; margin: 0; }
.questoes-adicionar-busca { margin-bottom: 14px; }
.questoes-adicionar-busca .questoes-popover-lista { margin-top: 10px; max-height: 220px; }

/* --- Favoritar questão (aba Gerenciar) --- */
.questoes-btn-favorita { background: transparent; border: none; font-size: 1.1rem; cursor: pointer; color: var(--text-3, #94a3b8); line-height: 1; }
.questoes-btn-favorita.is-favorita { color: #fbbf24; }

/* --- Modal simples de nome (Nova pasta / Renomear) --- */
.questoes-prompt-panel { width: 380px; }
.questoes-prompt-input {
  width: 100%; background: var(--bg-1, #1d2026); border: 1px solid var(--border-soft, rgba(100,116,139,0.4));
  border-radius: 8px; color: var(--text-1, #e6e8ec); padding: 9px 12px; font-size: 0.9rem; font-family: inherit;
  box-sizing: border-box;
}
.questoes-prompt-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* --- Wizard "Novo caderno" --- */
.questoes-wizard-layout {
  display: grid; grid-template-columns: 160px 1fr 260px; gap: 20px; align-items: start;
  min-height: 320px;
}
@media (max-width: 860px) {
  .questoes-wizard-layout { grid-template-columns: 1fr; }
}
.questoes-wizard-sidebar { display: flex; flex-direction: column; gap: 2px; }
.questoes-wizard-tab {
  background: transparent; border: none; text-align: left; color: var(--text-3, #94a3b8);
  padding: 9px 10px; border-radius: 8px; font-size: 0.86rem; font-weight: 600; cursor: pointer;
}
.questoes-wizard-tab:hover { background: var(--bg-2, #23262d); color: var(--text-1, #e6e8ec); }
.questoes-wizard-tab.is-active { background: rgba(46,219,127,0.12); color: var(--accent, #2edb7f); }
.questoes-wizard-valores {
  background: var(--bg-1, #1d2026); border: 1px solid var(--border-soft, rgba(100,116,139,0.2));
  border-radius: 10px; padding: 16px; min-height: 200px;
}
.questoes-wizard-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.questoes-wizard-ativos h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3, #94a3b8); margin: 0 0 10px; }
.questoes-filtros-ativos-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.questoes-filtros-ativos-chip {
  background: rgba(46,219,127,0.12); border: 1px solid var(--accent, #2edb7f); color: var(--accent, #2edb7f);
  border-radius: 999px; padding: 4px 10px; font-size: 0.78rem; cursor: pointer;
}
.questoes-wizard-contador { color: var(--text-2, #cbd5e1); font-size: 0.88rem; font-weight: 600; }
.questoes-wizard-footer {
  display: flex; gap: 10px; align-items: center; margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--border-soft, rgba(100,116,139,0.2)); flex-wrap: wrap;
}
.questoes-wizard-footer .questoes-prompt-input { width: auto; flex: 1; min-width: 180px; }
