/* ============================================================
   BANCO DE QUESTÕES — Camada visual "Avance Olímpico"
   Fase 1 (fundação): tipografia da marca + refino de cards/inputs.
   Escopo: #view-questoes (não afeta outras abas).
   Temas: body:not(.theme-light) = ESCURO | body.theme-light = CLARO
   Cores herdadas de #avanceBrandHardening: --av-roxo / --av-ouro
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600&family=Inter:wght@400;500&display=swap');

/* ---- Tipografia da marca ---- */
#view-questoes{
  font-family:'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
}
#view-questoes h1,
#view-questoes h2,
#view-questoes h3,
#view-questoes h4{
  font-family:'Poppins','Inter',sans-serif;
  letter-spacing:.01em;
}

/* ---- Refino de cards e inputs ---- */
#view-questoes input,
#view-questoes select,
#view-questoes textarea{
  border-radius:12px !important;
}
#view-questoes .rounded-2xl{ border-radius:18px !important; }
#view-questoes .rounded-xl{ border-radius:13px !important; }

/* Transição suave de borda nos painéis (direct children = painéis) */
#view-questoes > div{ transition:border-color .15s ease, box-shadow .15s ease; }

/* ---- Classes utilitárias de botão da marca (usadas na Fase 2) ---- */
#view-questoes .av-btn-roxo{
  background:var(--av-roxo) !important;
  color:#fff !important;
  border:1px solid var(--av-roxo) !important;
}
#view-questoes .av-btn-roxo:hover{ filter:brightness(1.1); }
#view-questoes .av-btn-ouro{
  background:var(--av-ouro) !important;
  color:#3a2c08 !important;
  border:1px solid var(--av-ouro) !important;
}
#view-questoes .av-btn-ouro:hover{ filter:brightness(1.05); }

/* Chip de filtro ativo (Fase 2) */
#view-questoes .av-chip{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; padding:3px 10px; border-radius:999px;
  background:rgba(91,31,126,.14); color:var(--av-roxo);
  border:1px solid rgba(91,31,126,.28);
}
body:not(.theme-light) #view-questoes .av-chip{
  background:rgba(155,111,212,.16); color:#D9C2F0; border-color:rgba(155,111,212,.34);
}

/* Card de questão selecionado (na mini-lista) — destaque roxo da marca */
#view-questoes .av-card-sel{
  border-color:var(--av-roxo) !important;
  border-width:2px !important;
}
body:not(.theme-light) #view-questoes .av-card-sel{
  border-color:#9460C4 !important;
  background:rgba(91,31,126,.12) !important;
}
body.theme-light #view-questoes .av-card-sel{
  background:rgba(91,31,126,.045) !important;
}

/* Badge de dificuldade (Fase 2) */
#view-questoes .av-dif-facil{ background:#E7F4E5; color:#2E6B2C; }
#view-questoes .av-dif-medio{ background:#FBF1D8; color:#7A5C12; }
#view-questoes .av-dif-dificil{ background:#F9E6E2; color:#9B3B27; }
body:not(.theme-light) #view-questoes .av-dif-facil{ background:#1C2B1C; color:#8FCB8C; }
body:not(.theme-light) #view-questoes .av-dif-medio{ background:#332A16; color:#E6C158; }
body:not(.theme-light) #view-questoes .av-dif-dificil{ background:#33201C; color:#E59B86; }

/* ===== Fase 3 — painéis admin ===== */
/* Números de status da migração com a cor da marca */
#view-questoes .av-metric-num{ color:var(--av-roxo) !important; }
body:not(.theme-light) #view-questoes .av-metric-num{ color:#C8A6E6 !important; }

/* Hover sutil e consistente nos painéis (assinatura roxa) */
#view-questoes > div.rounded-2xl:hover{ border-color:rgba(91,31,126,.45) !important; }
body:not(.theme-light) #view-questoes > div.rounded-2xl:hover{ border-color:rgba(155,111,212,.5) !important; }

/* ===== Fase 4 — cabeçalho da seção + acabamento ===== */
#view-questoes .av-bq-header{
  background:linear-gradient(135deg,#5B1F7E,#3C1457);
  border-radius:18px; padding:16px 20px; border:none;
}
#view-questoes .av-bq-header h2{ color:#fff !important; font-family:'Poppins','Inter',sans-serif; margin:0; }
#view-questoes .av-bq-header p{ color:rgba(255,255,255,.72) !important; margin:0; }
#view-questoes .av-logo-mark{
  width:42px; height:42px; border-radius:11px; background:rgba(255,255,255,.14);
  display:flex; align-items:center; justify-content:center; position:relative; flex:0 0 auto;
}
#view-questoes .av-logo-mark b{ color:#fff; font-family:'Poppins',sans-serif; font-size:22px; line-height:1; }
#view-questoes .av-logo-mark::after{
  content:""; position:absolute; left:8px; bottom:9px; width:11px; height:3px; background:var(--av-ouro); border-radius:1px;
}
#view-questoes .av-total-pill{
  background:rgba(255,255,255,.15); color:#fff; border-radius:999px;
  padding:8px 16px; font-size:13px; white-space:nowrap; align-self:flex-start;
}
#view-questoes .av-total-pill span{ color:var(--av-ouro); font-weight:600; }

/* Painel "Questões sob demanda" com a marca */
#view-questoes .av-ondemand{ border-color:rgba(91,31,126,.4) !important; background:rgba(91,31,126,.07) !important; }
body:not(.theme-light) #view-questoes .av-ondemand{ border-color:rgba(155,111,212,.4) !important; background:rgba(91,31,126,.16) !important; }

/* ===== Fase 5 — layout de 2 colunas (resultados + Minha lista) ===== */
#view-questoes .av-explore-grid{ display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:16px; align-items:start; }
@media (max-width:1100px){ #view-questoes .av-explore-grid{ grid-template-columns:1fr; } }
#view-questoes .av-results-col{ min-width:0; }
#view-questoes .av-side-col{ position:sticky; top:16px; }
@media (max-width:1100px){ #view-questoes .av-side-col{ position:static; } }
#view-questoes .av-side-card{ border-color:rgba(91,31,126,.35) !important; background:rgba(91,31,126,.05) !important; }
body:not(.theme-light) #view-questoes .av-side-card{ border-color:rgba(155,111,212,.34) !important; background:rgba(91,31,126,.16) !important; }

/* ===== Densidade — menos espaço desperdiçado ===== */
#view-questoes.space-y-6 > * + *{ margin-top:0.9rem !important; }
#view-questoes .p-6{ padding:1.1rem !important; }
#view-questoes .p-5{ padding:1rem !important; }
#view-questoes .mb-5{ margin-bottom:0.85rem !important; }
