/* ===== Tokens (herda de Global.css se existirem) ===== */
:root{
  --bg: var(--page-bg, #F7F5ED);
  --card: var(--card, #fff);
  --text: var(--text, #1f2937);
  --muted: var(--muted, #6b7280);
  --brand: var(--brand, #2563eb);
  --ok: var(--ok, #16a34a);
  --err: var(--err, #dc2626);
  --border: var(--border, #e7e7e7);
  --radius-lg: var(--radius-lg, 16px);
  --shadow: var(--shadow, 0 6px 20px rgba(0,0,0,.06));
}

/* ===== Layout da seção (igual outras páginas) ===== */
.ss-section{ max-width: 1040px; margin: 92px auto 40px; padding: 0 16px; }
.ss-section-head{ margin-bottom: 14px; }
.ss-title{ margin:0; font-size: clamp(1.6rem, 2.4vw, 2.2rem); color: var(--text); }
.ss-subtitle{ margin: 6px 0 0; color: var(--muted); }

/* ===== Grid de cards no catálogo ===== */
.cards-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
  background: color-mix(in srgb, var(--bg) 90%, #fff);
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* Card padrão (mesmo raio e sombra das outras páginas) */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 14px;
  display:flex; flex-direction:column; gap:10px;
}
.card-title{ margin:0; font-weight: 700; color: var(--text); }
.card-meta{ margin:0; color: var(--muted); }
.card-actions{ margin-top: 4px; }

/* Painéis (caixas maiores) */
.panel{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-top: 18px;
}
.panel-head,
.panel-body,
.panel-foot{ padding: 14px 16px; }
.panel-head{ border-bottom: 1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.panel-foot{ border-top: 1px solid var(--border); }
.panel-title{ margin:0; }
.panel-meta{ color: var(--muted); }

.hidden{ display:none !important; }

/* Questões */
#simQuestions{ padding: 6px 0 0; }
.questao{
  background:#fff; border:1px solid var(--border); border-radius:12px;
  padding:12px; margin:12px 0;
}
.questao p{ margin:0 0 8px; }
.questao label{ display:block; padding:8px 10px; border-radius:10px; border:1px solid transparent; cursor:pointer; }
.questao label:hover{ background:#f8fafc; }
.questao input{ margin-right:8px; }

.feedback{ margin-top:8px; font-weight:700; }
.feedback.ok{ color:var(--ok); }
.feedback.err{ color:var(--err); }
.questao.correct label[aria-checked="true"]{ border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); background: color-mix(in srgb, var(--ok) 10%, #fff); }
.questao.incorrect label[aria-checked="true"]{ border-color: color-mix(in srgb, var(--err) 40%, var(--border)); background: color-mix(in srgb, var(--err) 10%, #fff); }

.sim-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 10px; }

/* Resultado */
.score-line{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.progress{ width:100%; height:10px; background:#eef2ff; border-radius:999px; margin:10px 0 4px; overflow:hidden; }
.progress-bar{ height:100%; background: var(--brand); width:0%; transition: width .35s ease; }
.gabarito summary{ cursor:pointer; }

/* Histórico */
.hist-table{ width:100%; border-collapse: collapse; background:#fff; border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.hist-table th, .hist-table td{ border-bottom:1px solid var(--border); padding:10px 12px; text-align:left; }
.hist-table thead th{ background:#fafafa; }
.hist-actions{ display:flex; justify-content:flex-end; margin-top:10px; }

/* Botões – mapeados para seu padrão global */
.btn{
  appearance:none; border:1px solid var(--border); background:#fff; color:var(--text);
  padding:10px 14px; border-radius:12px; cursor:pointer; font-weight:600; line-height:1;
}
.btn:disabled{ opacity:.55; cursor:not-allowed; }
.btn-primary{ background: var(--brand); color:#fff; border-color: transparent; }
.btn-outline{ background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-ghost{ background: transparent; }
