/* ==========================================================================
   POA CONCURSOS - DESIGN SYSTEM PROFISSIONAL & EXCLUSIVO
   Plataforma de Alta Performance para Questões de Legislação
   ========================================================================== */

:root {
  /* Paleta Exclusiva Poa Concursos */
  --poa-navy: #091e3a;
  --poa-blue: #1d4ed8;
  --poa-blue-hover: #1e40af;
  --poa-blue-light: #eff6ff;
  --poa-cyan: #0284c7;
  --poa-cyan-light: #e0f2fe;
  --poa-emerald: #059669;
  --poa-emerald-light: #ecfdf5;
  --poa-amber: #d97706;
  --poa-amber-light: #fffbeb;
  --poa-coral: #e11d48;
  --poa-coral-light: #ffe4e6;

  /* Superfícies e Bordas */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Tipografia */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Efeitos e Elevação */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 12px -2px rgba(15, 23, 42, 0.08), 0 3px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 14px 28px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -4px rgba(15, 23, 42, 0.04);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modo Escuro (Dark Mode) */
body.dark-mode {
  --bg-page: #0b1120;
  --bg-card: #131c31;
  --bg-subtle: #1a253e;
  --border-color: #273553;
  --border-light: #1e293b;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --poa-navy: #38bdf8;
  --poa-blue: #3b82f6;
  --poa-blue-light: rgba(59, 130, 246, 0.16);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 28px -5px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   HEADER / BARRA SUPERIOR (POA CONCURSOS)
   ========================================================================== */
.poa-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* Marca Exclusiva Poa Concursos */
.brand-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  line-height: 1;
}

.brand-icon-emblem {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.3);
  transition: transform 0.25s ease;
}

.brand-logo:hover .brand-icon-emblem {
  transform: rotate(-4deg) scale(1.05);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.logo-poa {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--poa-navy);
}

body.dark-mode .logo-poa {
  color: #ffffff;
}

.logo-concursos {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--poa-blue);
  margin-top: -2px;
}

.brand-tag {
  background: var(--poa-blue-light);
  color: var(--poa-blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(29, 78, 216, 0.2);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Navegação Horizontal */
.poa-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 68px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0 0.95rem;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--poa-blue);
}

.nav-link.active {
  color: var(--poa-blue);
  font-weight: 700;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.6rem;
  right: 0.6rem;
  height: 3px;
  background-color: var(--poa-blue);
  border-radius: 3px 3px 0 0;
}

.nav-link svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

/* Ações do Usuário */
.user-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon-header {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-header:hover {
  background-color: var(--bg-subtle);
  color: var(--poa-blue);
  border-color: var(--poa-blue);
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
}

.user-profile-pill:hover {
  border-color: var(--poa-blue);
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.15);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #091e3a, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.user-name-short {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   SUBHEADER / BREADCRUMB & METADADOS DA QUESTÃO
   ========================================================================== */
.subheader-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
}

.subheader-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.breadcrumbs-tags {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.tag-meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--poa-blue);
  background: var(--poa-blue-light);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(29, 78, 216, 0.15);
}

.tag-meta:hover {
  background: #dbeafe;
}

.tag-separator {
  color: var(--text-light);
  font-weight: 300;
}

.tools-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-quick {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-quick:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.btn-quick.active {
  background: #fffbeb;
  color: #b45309;
  border-color: #f59e0b;
}

/* ==========================================================================
   LAYOUT PRINCIPAL (GRID 2 COLUNAS: QUESTÃO + MAPA LATERAL)
   ========================================================================== */
.main-wrapper {
  max-width: 1440px;
  margin: 1.75rem auto 3.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 1.75rem;
  flex: 1;
  width: 100%;
}

@media (max-width: 1080px) {
  .main-wrapper {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CARD PRINCIPAL DA QUESTÃO
   ========================================================================== */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Topo do Card de Questão */
.question-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
}

.question-number-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.q-badge-num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--poa-navy);
}

body.dark-mode .q-badge-num {
  color: #38bdf8;
}

.q-badge-subject {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #e2e8f0;
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

body.dark-mode .q-badge-subject {
  background: #334155;
  color: #cbd5e1;
}

.difficulty-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.difficulty-facil { background: #dcfce7; color: #15803d; }
.difficulty-media { background: #fef9c3; color: #a16207; }
.difficulty-dificil { background: #fee2e2; color: #b91c1c; }

/* Corpo da Questão */
.question-body {
  padding: 2rem;
}

.question-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.pill-meta-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.pill-meta-info strong {
  color: var(--text-secondary);
}

.question-enunciado {
  font-size: var(--font-size-base);
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 2.25rem;
  font-weight: 450;
  text-align: justify;
}

/* ==========================================================================
   LISTA DE ALTERNATIVAS COM TESOURA EXCLUSIVA (RISCAR)
   ========================================================================== */
.alternativas-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-bottom: 2.25rem;
}

.alternativa-row {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  user-select: none;
}

.alternativa-row:hover {
  border-color: #93c5fd;
  background-color: #fafcff;
}

body.dark-mode .alternativa-row:hover {
  background-color: #1a253e;
  border-color: #3b82f6;
}

/* Botão da Tesoura (Riscar Opção) */
.btn-scissor {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 2px;
}

.btn-scissor:hover {
  background: #ffe4e6;
  color: var(--poa-coral);
  border-color: #fca5a5;
  transform: scale(1.08);
}

.btn-scissor svg {
  width: 17px;
  height: 17px;
}

/* Círculo com a Letra (A, B, C, D, E) */
.letra-circle {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--poa-blue);
  border-radius: 50%;
  color: var(--poa-blue);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  transition: var(--transition);
  margin-top: 2px;
}

.alternativa-text {
  flex: 1;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--text-primary);
  padding-top: 4px;
}

/* Estado Selecionado pelo Aluno (Antes de Responder) */
.alternativa-row.selected {
  border-color: var(--poa-blue);
  background-color: var(--poa-blue-light);
  box-shadow: 0 0 0 1.5px var(--poa-blue);
}

body.dark-mode .alternativa-row.selected {
  background-color: rgba(59, 130, 246, 0.18);
}

.alternativa-row.selected .letra-circle {
  background-color: var(--poa-blue);
  color: #ffffff;
}

/* Estado Riscado / Eliminado com a Tesoura */
.alternativa-row.struck-through {
  background-color: var(--bg-subtle);
  border-color: var(--border-light);
  opacity: 0.5;
}

.alternativa-row.struck-through .alternativa-text {
  text-decoration: line-through;
  color: var(--text-light);
}

.alternativa-row.struck-through .btn-scissor {
  background: #fee2e2;
  color: var(--poa-coral);
  border-color: var(--poa-coral);
}

.alternativa-row.struck-through .letra-circle {
  border-color: var(--text-light);
  color: var(--text-light);
}

/* ==========================================================================
   ESTADOS DE FEEDBACK (PÓS-RESPOSTA)
   ========================================================================== */
.alternativa-row.is-correct-answer {
  background-color: #ecfdf5 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 1.5px #10b981 !important;
}

body.dark-mode .alternativa-row.is-correct-answer {
  background-color: rgba(16, 185, 129, 0.22) !important;
}

.alternativa-row.is-correct-answer .letra-circle {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
}

.alternativa-row.is-wrong-answer {
  background-color: #fef2f2 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1.5px #ef4444 !important;
}

body.dark-mode .alternativa-row.is-wrong-answer {
  background-color: rgba(239, 68, 68, 0.22) !important;
}

.alternativa-row.is-wrong-answer .letra-circle {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

/* Banner de Feedback de Resultado */
.feedback-banner {
  padding: 1.15rem 1.4rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: fadeIn 0.3s ease-out;
}

.feedback-banner.success {
  background: #def7ec;
  border: 1px solid #31c48d;
  color: #03543f;
}

body.dark-mode .feedback-banner.success {
  background: rgba(49, 196, 141, 0.2);
  color: #6ee7b7;
}

.feedback-banner.error {
  background: #fde8e8;
  border: 1px solid #f98080;
  color: #9b1c1c;
}

body.dark-mode .feedback-banner.error {
  background: rgba(249, 128, 128, 0.2);
  color: #fca5a5;
}

.feedback-banner svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.feedback-content h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.feedback-content p {
  font-size: 0.88rem;
}

/* ==========================================================================
   BARRA DE BOTÕES DE AÇÃO
   ========================================================================== */
.question-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.action-buttons-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-responder {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
  color: #ffffff;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.7rem 1.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.btn-responder:hover:not(:disabled) {
  background: linear-gradient(135deg, #1e40af, #0369a1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.35);
}

.btn-responder:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary-action {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.68rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-secondary-action:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.btn-secondary-action.active {
  background: var(--poa-blue-light);
  color: var(--poa-blue);
  border-color: var(--poa-blue);
}

.action-buttons-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-nav-quest {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.68rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-nav-quest:hover:not(:disabled) {
  border-color: var(--poa-blue);
  color: var(--poa-blue);
  background: var(--bg-subtle);
}

.btn-nav-quest:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   SEÇÕES EXPANSÍVEIS (PROFESSOR, ESTATÍSTICAS, ANOTAÇÕES)
   ========================================================================== */
.collapsible-container {
  margin-top: 1.75rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 1.75rem;
  animation: slideDown 0.3s ease;
}

.collapsible-container.hidden {
  display: none;
}

/* Comentário do Professor */
.professor-box {
  background: var(--bg-page);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.65rem;
}

body.dark-mode .professor-box {
  background: #1a253e;
  border-color: #334155;
}

.professor-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.prof-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #091e3a, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.prof-info h5 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.prof-info span {
  font-size: 0.82rem;
  color: var(--poa-blue);
  font-weight: 600;
}

.prof-fundamentacao {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-primary);
  white-space: pre-line;
  margin-bottom: 1.5rem;
}

.prof-analise-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.analise-alternativa-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border-left: 4px solid #94a3b8;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.analise-alternativa-item.item-correta {
  border-left-color: #10b981;
  background: #f0fdf4;
}

body.dark-mode .analise-alternativa-item.item-correta {
  background: rgba(16, 185, 129, 0.12);
}

.analise-alternativa-item.item-incorreta {
  border-left-color: #ef4444;
}

.prof-dica-card {
  margin-top: 1.5rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #92400e;
  line-height: 1.55;
}

body.dark-mode .prof-dica-card {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

/* Estatísticas */
.stats-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.stats-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 1.5rem;
  text-align: center;
}

.stat-metric {
  display: flex;
  flex-direction: column;
}

.stat-metric-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--poa-blue);
}

.stat-metric-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stats-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.stat-bar-letter {
  font-weight: 700;
  width: 22px;
}

.stat-bar-track {
  flex: 1;
  height: 12px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

body.dark-mode .stat-bar-track {
  background: #334155;
}

.stat-bar-fill {
  height: 100%;
  background: var(--poa-blue);
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-bar-fill.bar-correct {
  background: #10b981;
}

.stat-bar-pct {
  width: 48px;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Anotações Pessoais */
.notes-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.notes-textarea {
  width: 100%;
  height: 110px;
  padding: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  resize: vertical;
  margin-bottom: 0.85rem;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--poa-blue);
}

/* ==========================================================================
   SIDEBAR LATERAL (MAPA DE QUESTÕES, SIMULADO & FILTROS)
   ========================================================================== */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Cronômetro / Modo Simulado */
.timer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.1rem;
}

.timer-digits {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--poa-navy);
  letter-spacing: 0.05em;
}

body.dark-mode .timer-digits {
  color: #38bdf8;
}

.timer-controls {
  display: flex;
  gap: 0.45rem;
}

.btn-timer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-timer:hover {
  border-color: var(--poa-blue);
  color: var(--poa-blue);
}

/* Barra de Placar */
.score-summary-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.score-chip {
  padding: 0.6rem 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}

.score-chip.chip-acertos { background: #dcfce7; color: #15803d; }
.score-chip.chip-erros { background: #fee2e2; color: #b91c1c; }
.score-chip.chip-total { background: #e0f2fe; color: #0369a1; }

.score-chip strong {
  font-size: 1.25rem;
  font-weight: 800;
}

.score-chip span {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
}

/* Grade de Questões (1 a 20) */
.questoes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}

.grid-q-btn {
  aspect-ratio: 1;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.grid-q-btn:hover {
  border-color: var(--poa-blue);
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(29, 78, 216, 0.15);
}

.grid-q-btn.current {
  border-color: var(--poa-blue);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.4);
}

.grid-q-btn.acertou {
  background-color: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.grid-q-btn.errou {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.grid-q-btn.marcada-revisao::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
}

/* Legenda do Mapa */
.grid-legenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.legenda-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot-legenda {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-pendente { background: #cbd5e1; }
.dot-acerto { background: #10b981; }
.dot-erro { background: #ef4444; }
.dot-revisao { background: #f59e0b; }

/* Filtro Rápido por Disciplina / Lei */
.filter-select {
  width: 100%;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.88rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.filter-select:focus {
  outline: none;
  border-color: var(--poa-blue);
}

/* ==========================================================================
   SELETOR DE NÍVEIS DE ESTUDO (JORNADA DA APROVAÇÃO)
   🥉 Aspirante | 🥈 Competidor | 🥇 Nomeado Pro
   ========================================================================== */
.levels-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.levels-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.levels-label-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.levels-title-tag {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.levels-segmented-control {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.25rem;
  gap: 0.25rem;
}

.level-pill-btn {
  background: transparent;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.level-pill-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.6);
}

body.dark-mode .level-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Estado Ativo: Todos */
.level-pill-btn.active[data-level="all"] {
  background: var(--bg-card);
  color: var(--poa-blue);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

/* Estado Ativo: Aspirante (Bronze / Âmbar Suave) */
.level-pill-btn.active[data-level="Aspirante"] {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  box-shadow: 0 2px 5px rgba(217, 119, 6, 0.15);
  font-weight: 800;
}

body.dark-mode .level-pill-btn.active[data-level="Aspirante"] {
  background: rgba(217, 119, 6, 0.2);
  color: #fde68a;
  border-color: rgba(217, 119, 6, 0.4);
}

/* Estado Ativo: Competidor (Prata / Azul Royal) */
.level-pill-btn.active[data-level="Competidor"] {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  box-shadow: 0 2px 5px rgba(29, 78, 216, 0.15);
  font-weight: 800;
}

body.dark-mode .level-pill-btn.active[data-level="Competidor"] {
  background: rgba(29, 78, 216, 0.22);
  color: #93c5fd;
  border-color: rgba(29, 78, 216, 0.4);
}

/* Estado Ativo: Nomeado Pro (Ouro / Dourado Premium) */
.level-pill-btn.active[data-level="Nomeado Pro"] {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
  border: 1px solid #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  font-weight: 800;
}

body.dark-mode .level-pill-btn.active[data-level="Nomeado Pro"] {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
  color: #fef08a;
  border-color: #f59e0b;
}

.level-badge-count {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
}

body.dark-mode .level-badge-count {
  background: rgba(255, 255, 255, 0.12);
}

/* Banner de Explicação do Nível Ativo */
.level-description-bar {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.level-description-bar strong {
  color: var(--text-secondary);
}

/* Badges de Nível no Card da Questão */
.q-level-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.q-level-aspirante {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.q-level-competidor {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.q-level-nomeado-pro {
  background: #fae8ff;
  color: #86198f;
  border: 1px solid #f0abfc;
  box-shadow: 0 0 8px rgba(217, 70, 239, 0.2);
}

body.dark-mode .q-level-aspirante { background: rgba(245, 158, 11, 0.2); color: #fde68a; border-color: rgba(245, 158, 11, 0.3); }
body.dark-mode .q-level-competidor { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border-color: rgba(59, 130, 246, 0.3); }
body.dark-mode .q-level-nomeado-pro { background: rgba(217, 70, 239, 0.2); color: #f5d0fe; border-color: rgba(217, 70, 239, 0.3); }

/* Destaque quando no Modo Nomeado Pro */
body.mode-nomeado-pro .question-card {
  border-color: #f59e0b;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.poa-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 1.75rem 0;
  margin-top: auto;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 2000px; }
}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }
  .poa-nav {
    display: none;
  }
  .main-wrapper {
    margin: 1rem auto;
    padding: 0 1rem;
  }
  .question-body {
    padding: 1.25rem;
  }
  .question-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .action-buttons-left, .action-buttons-right {
    width: 100%;
    justify-content: space-between;
  }
  .btn-responder {
    flex: 1;
    justify-content: center;
  }
}
