:root {
  --brand: #c8102e;
  --brand-dark: #8b1e2d;
  --surface: #ffffff;
  --surface-soft: #f8f9fc;
  --surface-muted: #eef2f7;
  --page: #f5f7fb;
  --text: #181818;
  --text-muted: #666666;
  --border: #dde3ec;
  --success: #167a36;
  --danger: #b52222;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(0, 0, 0, .09);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
[hidden] { display: none !important; }

.app-shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.brand { color: var(--brand); font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.brand span { font-weight: 400; }
.student-summary { display: flex; align-items: center; gap: 8px; min-width: 260px; }

.toolbar, .fixed-activity-buttons, .button-row, .teacher-tabs, .activity-manager-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar { margin: 10px 0 22px; }
.centered { justify-content: center; }

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 44px;
  padding: 11px 16px;
  font-weight: 700;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.btn:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: #ececec; color: inherit; border-color: #cfcfcf; }
.btn-teacher { background: var(--brand-dark); color: #fff; }
.btn-tab { background: #fff; border-color: var(--border); color: var(--brand-dark); }
.btn-tab.active, .fixed-activity-btn.active-fixed { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-small { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.btn-danger-text { background: transparent; color: var(--brand); border: 0; min-height: 36px; padding: 5px 8px; }
.fixed-activity-btn.locked { opacity: .55; }

.section { margin: 26px 0; }
h1, h2, h3 { letter-spacing: .2px; }
h2 { margin: 0 0 12px; color: var(--brand-dark); font-size: 24px; font-weight: 600; }

.sum-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  border: 2px solid currentColor;
  overflow: auto;
}
.sum-col { min-width: 110px; border-right: 2px solid currentColor; }
.sum-col:last-child { border-right: 0; }
.sum-letter { padding: 4px; text-align: center; background: #e8edf5; border-bottom: 2px solid currentColor; font-size: 19px; }
.sum-values { min-height: 160px; padding: 8px 10px; text-align: right; background: var(--surface-muted); font-size: 18px; line-height: 1.55; }
.answer-box { padding: 7px; background: var(--surface); border-top: 2px solid currentColor; }
.answer {
  width: 100%;
  min-height: 38px;
  border: 1px solid #bbb;
  border-radius: 7px;
  padding: 7px 8px;
  background: #fff;
  text-align: center;
  font-size: 17px;
}
.answer:focus, input:focus, select:focus, textarea:focus { outline: 2px solid rgba(200,16,46,.18); outline-offset: 1px; border-color: var(--brand) !important; }

.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.op-table { border: 2px solid currentColor; }
.op-row { display: grid; grid-template-columns: 54px 1fr 140px; align-items: center; min-height: 42px; border-bottom: 1px solid currentColor; }
.op-row:last-child { border-bottom: 0; }
.op-letter { height: 100%; display: grid; place-items: center; background: #e8edf5; border-right: 2px solid currentColor; font-size: 18px; }
.expression { height: 100%; display: grid; place-items: center; padding: 7px; background: var(--surface-muted); font-size: 18px; }
.op-answer { height: 100%; padding: 5px; background: #fff; border-left: 2px solid currentColor; }

.status, .inline-status { border-radius: 10px; font-size: 14px; }
.status { display: none; margin: 18px 0 0; padding: 12px 14px; background: #f2f2f2; }
.inline-status { margin-top: 12px; min-height: 20px; }
.status.show { display: block; }
.status.error, .inline-status.error { color: var(--danger); font-weight: 700; }
.status.success, .inline-status.success { color: var(--success); font-weight: 700; }

.view { display: none; }
.view.active { display: block; }
.finish-area { text-align: center; margin: 35px 0 20px; }
.results { display: none; margin-top: 28px; border-top: 3px solid var(--brand); padding-top: 22px; }
.results.show { display: block; }
.results-title { text-align: left; color: inherit; font-weight: 700; }
.score-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.score-card { padding: 14px; border: 1px solid #ddd; border-radius: 12px; background: #fff; }
.score-card b { display: block; margin-top: 4px; font-size: 22px; }
.feedback { margin-top: 18px; padding: 16px; border-radius: 12px; background: #fbecef; line-height: 1.5; }
.key { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.key-block { overflow: hidden; border: 1px solid #ddd; border-radius: 12px; }
.key-block h3 { margin: 0; padding: 10px 12px; background: #f0f0f0; font-size: 17px; }
.key-list { padding: 10px 12px; line-height: 1.75; font-size: 14px; }
.correct { color: var(--success); font-weight: 700; }
.wrong { color: var(--danger); font-weight: 700; }

.week-title {
  padding: 18px 22px;
  margin-bottom: 12px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: var(--shadow);
}
.week-title h2 { margin: 0; color: #fff; font-size: 28px; font-weight: 700; }
.week-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 14px; margin-top: 20px; }
.week-item { min-height: 130px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 5px 18px rgba(0,0,0,.08); }
.week-expression { color: #2b3445; font-size: 20px; font-weight: 700; }
.week-answer-row { display: flex; align-items: center; gap: 8px; }
.week-answer-row label { color: #555; font-size: 13px; }
.week-answer-row input { flex: 1; min-width: 0; }
.week-results-note { margin-top: 18px; padding: 14px; border-radius: 12px; background: #f1f4f8; }
.week-results-note:empty { display: none; }

.screen { position: fixed; inset: 0; z-index: 1000; }
.login-screen { display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, #fff8f0, #fbe3d0); }
.login-card-modern {
  width: min(430px, 100%);
  padding: 42px;
  text-align: center;
  border: 1px solid #e1e6ef;
  border-top: 8px solid var(--brand);
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.login-card-modern h1 { margin: 0; color: var(--brand); font-size: 34px; }
.login-card-modern h2 { margin-top: 10px; color: var(--brand-dark); }
.modern-btn { width: 88%; margin: 7px auto; }
.form-grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; text-align: left; }

.teacher-screen { position: fixed; inset: 0; z-index: 1100; overflow: auto; padding: 30px; background: linear-gradient(135deg, #fff8f0, #fbe3d0); }
.panel-modern { background: #fff; border: 1px solid #e1e6ef; border-top: 8px solid var(--brand-dark); border-radius: 22px; box-shadow: 0 15px 40px rgba(0,0,0,.12); }
.teacher-login-card { width: min(420px, 100%); margin: 60px auto; padding: 35px; text-align: center; }
.teacher-login-card h1 { color: var(--brand-dark); }
.teacher-panel { width: min(1100px, 100%); margin: 0 auto; padding: 30px; }
.teacher-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.prof-title { margin: 0; color: var(--brand); font-size: 26px; }
.teacher-tabs { margin: 22px 0; }
.teacher-tab-panel { display: none; }
.teacher-tab-panel.active { display: block; }
.teacher-tab-panel > h2 { padding-bottom: 10px; border-bottom: 2px solid #e5e9f2; text-align: left; color: var(--brand); font-weight: 700; }
.subsection-title { margin-top: 28px !important; }

.card { background: #fff; border: 1px solid #e1e6ef; border-radius: 14px; padding: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.form-card, .fixed-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; text-align: left; font-weight: 700; }
.field-help { color: var(--text-muted); font-size: 13px; font-weight: 400; line-height: 1.45; }
input, select, textarea { width: 100%; border: 1px solid #d6dce8; border-radius: 8px; padding: 10px; background: #fff; color: inherit; }
textarea { min-height: 180px; resize: vertical; }
.fixed-form textarea { min-height: 300px; }
.check-field { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.check-field input { width: auto; margin: 0; }

.turmas-prof-select-wrap { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 16px; background: var(--surface-soft); border: 1px solid #e1e6ef; border-radius: 14px; }
.turmas-prof-select { flex: 1; max-width: 420px; }
.turma-alunos-painel { overflow: hidden; background: #fff; border: 1px solid #e1e6ef; border-radius: 14px; }
.turma-alunos-cabecalho { padding: 15px 18px; background: #f1f4f8; color: var(--brand-dark); font-weight: 700; border-bottom: 1px solid #e1e6ef; }
.turma-alunos-linha { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid #edf0f5; }
.turma-alunos-linha:last-child { border-bottom: 0; }
.turma-numero { width: 32px; flex: none; font-weight: 700; color: #555; }
.turma-nome { flex: 1; }
.excluir-link { border: 0; background: transparent; color: var(--brand); font-weight: 700; }
.excluir-link:hover { text-decoration: underline; }

.activity-manager { display: grid; gap: 12px; margin-top: 18px; }
.activity-manager-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--surface-soft); border: 1px solid #e1e6ef; border-radius: 12px; }
.activity-manager-info { flex: 1; }
.activity-manager-info strong { color: var(--brand-dark); }
.empty-state { color: var(--text-muted); }
.turma-card { margin-top: 18px; background: #f1f4f8; border-top: 4px solid var(--brand); }
.turma-card h3 { margin-top: 0; color: var(--brand-dark); }

@media (max-width: 900px) {
  .two-cols { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: 1fr 1fr; }
  .key { grid-template-columns: 1fr 1fr; }
  .sum-grid { grid-template-columns: repeat(7, 120px); }
  .week-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}
@media (max-width: 650px) {
  .app-shell { width: min(100% - 24px, 1400px); }
  .brand { font-size: 24px; }
  .form-grid-two { grid-template-columns: 1fr; }
  .score-grid, .key, .week-grid { grid-template-columns: 1fr; }
  .op-row { grid-template-columns: 46px 1fr 105px; }
  .teacher-screen { padding: 14px; }
  .teacher-panel { padding: 18px; }
  .activity-manager-row { align-items: flex-start; flex-direction: column; }
  .activity-manager-actions { width: 100%; }
  .login-card-modern { padding: 30px 20px; }
}

@page { size: A4 landscape; margin: 7mm; }
@media print {
  html, body { width: 100%; margin: 0 !important; padding: 0 !important; background: #fff !important; color: #000 !important; }
  .app-shell { width: 100%; max-width: none !important; margin: 0 !important; padding: 0 !important; font-size: 10px; }
  .toolbar, .status, .results, .finish-area, .screen, .teacher-screen { display: none !important; }
  .view { display: none !important; }
  .view.active { display: block !important; }
  .app-header { margin-bottom: 5px; padding-bottom: 5px; border-bottom-width: 1px; flex-wrap: nowrap; }
  .brand { font-size: 17px; }
  .section { margin: 5px 0 !important; break-inside: avoid; page-break-inside: avoid; }
  h2 { font-size: 13px; margin: 0 0 3px; }
  .sum-grid { grid-template-columns: repeat(7, 1fr) !important; overflow: visible; border-width: 1px; }
  .sum-col { min-width: 0 !important; border-right-width: 1px; }
  .sum-letter { font-size: 11px; padding: 1px; border-bottom-width: 1px; }
  .sum-values { font-size: 10px; line-height: 1.15; min-height: 0 !important; padding: 2px 5px; }
  .answer-box { padding: 2px; border-top-width: 1px; }
  .answer { min-height: 20px; height: 20px; font-size: 10px; padding: 1px 3px; border-radius: 2px; }
  .two-cols { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .op-table { border-width: 1px; }
  .op-row { grid-template-columns: 28px 1fr 82px; min-height: 22px; border-bottom-width: 1px; }
  .op-letter { font-size: 10px; border-right-width: 1px; }
  .expression { font-size: 10px; padding: 2px; }
  .op-answer { padding: 1px; border-left-width: 1px; }
  #weekView .week-title { margin: 0 0 4px; padding: 6px 8px; box-shadow: none; }
  #weekView .week-title h2 { font-size: 14px; }
  #weekView .week-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 0; margin-top: 4px; border: 1px solid #222; }
  #weekView .week-item { min-height: 43px !important; padding: 3px 5px !important; gap: 2px; border: 0 !important; border-right: 1px solid #555 !important; border-bottom: 1px solid #555 !important; border-radius: 0; box-shadow: none; }
  #weekView .week-item:nth-child(4n) { border-right: 0 !important; }
  #weekView .week-expression { font-size: 9.5px; line-height: 1.1; }
  #weekView .week-answer-row { gap: 3px; }
  #weekView .week-answer-row label { font-size: 8px; }
  #weekView .week-answer-row input { height: 18px !important; min-height: 18px !important; font-size: 9px !important; }
  #weekView .week-results-note { display: none; }
}

/* =========================================================
   V2 Cloudflare — camada visual da plataforma
   ========================================================= */
:root {
  --brand-soft: #fff1f3;
  --brand-wash: #fff8f0;
  --blue: #1c72a2;
  --blue-soft: #edf7fc;
  --warning: #a86500;
  --warning-soft: #fff7df;
  --success-soft: #eaf7ee;
  --danger-soft: #fff0f0;
}
body { min-height: 100vh; }
.muted-text { color: var(--text-muted); font-size: 13px; }
.eyebrow { display: inline-block; margin-bottom: 6px; color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
.eyebrow.light { color: rgba(255,255,255,.82); }
.login-subtitle { color: var(--text-muted); line-height: 1.55; }
.brand-symbol { width: 82px; height: 82px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 24px; background: var(--brand-soft); color: var(--brand); font-weight: 900; letter-spacing: 2px; box-shadow: inset 0 0 0 1px rgba(200,16,46,.08); }
.cloud-badge { width: fit-content; margin: 18px auto 0; padding: 7px 11px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 700; }
.student-preview { margin: 18px 0; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); }
.student-preview span { display: block; color: var(--text-muted); font-size: 12px; }
.student-preview strong { display: block; margin-top: 4px; color: var(--brand-dark); font-size: 19px; }
.loading-card { border-top-color: var(--blue); }
.loading-mark { color: var(--blue); font-size: 30px; font-weight: 900; letter-spacing: 5px; }
.loading-bar { height: 6px; overflow: hidden; margin-top: 18px; border-radius: 999px; background: #e9edf3; }
.loading-bar span { display: block; width: 35%; height: 100%; border-radius: inherit; background: var(--brand); animation: loading-slide 1.1s ease-in-out infinite alternate; }
@keyframes loading-slide { from { transform: translateX(0); } to { transform: translateX(185%); } }

.app-header-modern { position: sticky; top: 0; z-index: 20; margin: 0 -16px 12px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--border); background: rgba(245,247,251,.96); backdrop-filter: blur(12px); }
.header-context { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12px; }
.student-summary-modern { justify-content: flex-end; }
.student-summary-modern small, .student-summary-modern strong { display: block; }
.student-summary-modern small { color: var(--text-muted); font-size: 11px; }
.student-summary-modern strong { margin-top: 2px; }
.student-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--brand-soft); font-size: 20px; }
.student-toolbar { position: sticky; top: 80px; z-index: 18; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: 0 5px 18px rgba(0,0,0,.05); backdrop-filter: blur(10px); }

.student-dashboard { padding-bottom: 20px; }
.student-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 30px; border-radius: 22px; background: linear-gradient(135deg, #fff, #fff5f6); border: 1px solid #f2d9de; box-shadow: var(--shadow); }
.student-hero h1 { margin: 0; color: var(--brand-dark); font-size: clamp(28px, 4vw, 42px); }
.student-hero p { margin-bottom: 0; color: var(--text-muted); }
.student-progress-summary { min-width: 160px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--border); text-align: center; }
.student-progress-summary span { display: block; color: var(--text-muted); font-size: 12px; }
.student-progress-summary strong { display: block; margin-top: 3px; color: var(--brand); font-size: 32px; }
.dashboard-section { margin-top: 28px; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading-row h2 { margin: 0; }
.student-activity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 16px; }
.student-activity-card { min-height: 250px; display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 7px 20px rgba(0,0,0,.055); transition: transform .18s ease, box-shadow .18s ease; }
.student-activity-card:not(.is-disabled):hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.09); }
.student-activity-card.is-disabled { background: #fafafa; }
.activity-card-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); font-size: 22px; }
.training-card .activity-card-icon { background: var(--blue-soft); }
.activity-card-content { flex: 1; }
.activity-card-content h3 { margin: 10px 0 7px; color: #29303d; font-size: 20px; }
.activity-card-content p { margin: 0; color: var(--text-muted); line-height: 1.5; font-size: 14px; }
.activity-card-top, .activity-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.activity-meta { margin-top: 13px; justify-content: flex-start; color: var(--text-muted); font-size: 12px; }
.score-mini { color: var(--success); font-size: 12px; font-weight: 800; }
.status-pill, .badge-soft, .result-chip { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; font-weight: 800; }
.status-pill { padding: 5px 9px; font-size: 11px; }
.status-published { background: var(--success-soft); color: var(--success); }
.status-locked { background: #f0f1f4; color: #606978; }
.status-scheduled { background: var(--warning-soft); color: var(--warning); }
.status-training { background: var(--blue-soft); color: var(--blue); }
.status-on-dark { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.badge-soft { padding: 5px 9px; background: var(--surface-muted); color: #596273; font-size: 11px; }
.result-chip { min-width: 64px; justify-content: center; padding: 7px 10px; background: var(--success-soft); color: var(--success); font-size: 13px; }

.history-panel { padding: 0; overflow: hidden; }
.history-list { display: grid; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid #edf0f5; }
.history-row:last-child { border-bottom: 0; }
.history-row strong, .history-row span { display: block; }
.history-row span { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.history-score { text-align: right; }
.history-score strong { color: var(--brand-dark); font-size: 20px; }
.empty-state-inline { display: grid; gap: 5px; padding: 22px; color: var(--text-muted); text-align: center; }
.empty-state-inline strong { color: #394150; }

.activity-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 20px 0; padding: 22px; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.activity-banner h1 { margin: 0; color: var(--brand-dark); }
.activity-banner-fixed { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.finish-main { min-width: 270px; box-shadow: 0 10px 22px rgba(200,16,46,.22); }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.highlight-score { border-color: rgba(200,16,46,.3); background: var(--brand-soft); }
.key-full { grid-column: 1 / -1; }
.answer-policy-note { grid-column: 1 / -1; color: #555; }
.answer.answer-correct { border: 2px solid #2c8a4b !important; background: #f1fbf4; }
.answer.answer-wrong { border: 2px solid #c73535 !important; background: #fff5f5; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }

.teacher-workspace { width: min(1440px, 100%); }
.teacher-tabs { position: sticky; top: 0; z-index: 5; padding: 10px 0; background: #fff; }
.teacher-tab-panel { min-height: 420px; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(135px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.kpi-card { display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 5px 16px rgba(0,0,0,.045); }
.kpi-card > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); font-size: 20px; }
.kpi-card small, .kpi-card strong { display: block; }
.kpi-card small { color: var(--text-muted); }
.kpi-card strong { margin-top: 4px; color: #252b36; font-size: 25px; }
.teacher-dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.dashboard-card-wide { margin-top: 16px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.card-heading h3 { margin: 0; color: #303746; }
.performance-row { display: grid; grid-template-columns: 145px 1fr 62px; gap: 12px; align-items: center; padding: 10px 0; }
.performance-label strong, .performance-label span { display: block; }
.performance-label span { color: var(--text-muted); font-size: 11px; }
.performance-progress { width: 100%; height: 11px; accent-color: var(--brand); }
.performance-value { text-align: right; }
.attention-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf0f5; }
.attention-row:last-child { border-bottom: 0; }
.attention-rank { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--warning-soft); color: var(--warning); font-weight: 900; }
.attention-row strong, .attention-row span { display: block; }
.attention-row span { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.recent-list { display: grid; }
.recent-row { display: grid; grid-template-columns: minmax(220px, 1fr) 80px 145px; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #edf0f5; }
.recent-row:last-child { border-bottom: 0; }
.recent-row strong, .recent-row span { display: block; }
.recent-row span, .recent-row time { color: var(--text-muted); font-size: 12px; }

.form-grid-four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.turma-alunos-cabecalho { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.turma-alunos-cabecalho strong, .turma-alunos-cabecalho span { display: block; }
.turma-alunos-cabecalho span { margin-top: 2px; color: var(--text-muted); font-size: 11px; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); border-color: #f3cccc; }
.activity-manager-cloud { border-left: 4px solid var(--brand); background: #fff; }
.activity-title-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.compact-select { width: auto; min-width: 125px; padding: 8px 9px; }
.report-filters { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; margin-bottom: 16px; }
.report-kpis { margin-bottom: 16px; }
.compact-kpi { min-height: 76px; }
.compact-kpi strong { font-size: 21px; }
.report-table-wrap { overflow: auto; padding: 0; }
.report-table { width: 100%; border-collapse: collapse; min-width: 960px; font-size: 13px; }
.report-table th { position: sticky; top: 0; padding: 11px 12px; background: #f1f4f8; color: #4a5363; text-align: left; white-space: nowrap; }
.report-table td { padding: 11px 12px; border-top: 1px solid #edf0f5; }
.report-table tbody tr:nth-child(even) { background: #fbfcfe; }
.analysis-preview-card { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, #fff, var(--blue-soft)); }
.analysis-icon { width: 70px; height: 70px; flex: none; display: grid; place-items: center; border-radius: 20px; background: #fff; font-size: 32px; box-shadow: 0 8px 20px rgba(28,114,162,.12); }
.analysis-preview-card h3 { margin: 0 0 7px; color: var(--blue); }
.analysis-preview-card p { margin: 0; color: var(--text-muted); line-height: 1.55; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .teacher-dashboard-grid { grid-template-columns: 1fr; }
  .form-grid-four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .student-hero, .activity-banner, .activity-banner-fixed, .results-heading { align-items: flex-start; flex-direction: column; }
  .student-progress-summary { width: 100%; }
  .student-toolbar { top: 88px; overflow-x: auto; flex-wrap: nowrap; }
  .student-toolbar .btn { flex: 0 0 auto; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-four, .report-filters { grid-template-columns: 1fr; }
  .recent-row { grid-template-columns: 1fr auto; }
  .recent-row time { grid-column: 1 / -1; }
  .performance-row { grid-template-columns: 110px 1fr 55px; }
  .analysis-preview-card { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 460px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .student-activity-grid { grid-template-columns: 1fr; }
  .app-header-modern { position: static; }
  .student-toolbar { top: 0; }
}

@media print {
  body.teacher-report-print .teacher-screen { display: block !important; position: static !important; padding: 0 !important; background: #fff !important; overflow: visible !important; }
  body.teacher-report-print #painelProfessorNovo { display: block !important; max-width: none !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; }
  body.teacher-report-print .teacher-panel-header,
  body.teacher-report-print .teacher-tabs,
  body.teacher-report-print #teacherGlobalStatus,
  body.teacher-report-print #dashboardProf,
  body.teacher-report-print #cad,
  body.teacher-report-print #turmas,
  body.teacher-report-print #inserir,
  body.teacher-report-print #analise,
  body.teacher-report-print #printTeacherReportBtn,
  body.teacher-report-print .app-footer { display: none !important; }
  body.teacher-report-print #rel { display: block !important; }
  body.teacher-report-print .report-filters { display: none !important; }
  body.teacher-report-print .report-table-wrap { overflow: visible !important; border: 0 !important; box-shadow: none !important; }
  body.teacher-report-print .report-table { min-width: 0 !important; font-size: 9px; }
  body.teacher-report-print .report-table th,
  body.teacher-report-print .report-table td { padding: 4px 5px; }
  body.teacher-report-print .report-kpis { grid-template-columns: repeat(5, 1fr) !important; }
}


/* v2.0.2 — telas de acesso alinhadas ao HTML de referência */
.reference-home-card {
  width: min(430px, calc(100vw - 48px));
  min-height: 326px;
  padding: 43px 50px 40px;
  border: 1px solid #dfe5ec;
  border-top: 1px solid #dfe5ec;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 17px 38px rgba(85, 51, 28, .12);
}
.reference-home-card h1 {
  margin: 0;
  color: #d20a2f;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  white-space: nowrap;
}
.reference-home-card h2 {
  margin: 10px 0 22px;
  color: #9d1729;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 400;
}
.reference-home-card .modern-btn {
  display: block;
  width: 287px;
  max-width: 100%;
  min-height: 54px;
  margin: 0 auto 20px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  box-shadow: 0 8px 14px rgba(83, 26, 34, .18);
}
.reference-home-card .modern-btn:last-child { margin-bottom: 0; }
.reference-home-card .btn-primary { background: #d70a32; }
.reference-home-card .btn-teacher { background: #9f1e2d; }

.teacher-screen.teacher-auth-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}
.reference-teacher-login {
  width: min(430px, calc(100vw - 48px));
  min-height: 294px;
  margin: 0;
  padding: 35px;
  border: 1px solid #dfe5ec;
  border-top: 1px solid #dfe5ec;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 17px 38px rgba(85, 51, 28, .12);
}
.reference-teacher-login h1 {
  margin: 0 0 20px;
  color: #8b1e2d;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 400;
  white-space: nowrap;
}
.teacher-password-prompt {
  margin: 0 0 15px;
  color: #181818;
  font-size: 16px;
  line-height: 1.3;
}
.teacher-password-input {
  width: 100%;
  height: 41px;
  padding: 8px 12px;
  border: 1px solid #d6dce8;
  border-radius: 7px;
  background: #fff;
}
.teacher-login-actions {
  margin-top: 18px;
  gap: 5px;
}
.teacher-login-actions .btn {
  min-height: 44px;
  padding: 10px 15px;
  border: 0;
  border-radius: 11px;
  background: #d70a32;
  color: #fff;
}
.teacher-login-actions .btn:hover { background: #c3092e; }
.reference-teacher-login .inline-status:empty { min-height: 0; margin-top: 0; }

@media (max-width: 520px) {
  .reference-home-card {
    min-height: 0;
    padding: 36px 24px;
  }
  .reference-home-card h1 {
    font-size: clamp(27px, 8vw, 34px);
    white-space: normal;
  }
  .reference-home-card h2 { font-size: 22px; }
  .reference-teacher-login {
    min-height: 0;
    padding: 35px 24px 28px;
  }
  .reference-teacher-login h1 {
    font-size: clamp(22px, 7vw, 32px);
    white-space: nowrap;
  }
}

/* v2.0.5 — seletores compactos, sem cortar os textos padrão */
.student-login-card {
  width: min(650px, calc(100vw - 48px));
  padding: 42px 38px;
}
.student-login-card .form-grid-two {
  grid-template-columns: 285px 265px;
  justify-content: center;
  gap: 16px;
}
.student-login-card .field {
  min-width: 0;
}
.student-login-card .field:first-child select {
  width: 285px;
}
.student-login-card .field:last-child select {
  width: 265px;
}
.student-login-card select {
  max-width: 100%;
  white-space: nowrap;
  text-overflow: clip;
}
@media (max-width: 700px) {
  .student-login-card {
    width: min(560px, calc(100vw - 28px));
    padding: 34px 22px;
  }
  .student-login-card .form-grid-two {
    grid-template-columns: 1fr;
  }
  .student-login-card .field:first-child select,
  .student-login-card .field:last-child select {
    width: 100%;
  }
}

/* v2.1.0 — relatórios detalhados, ordenação e lixeira de tentativas */
.report-mode-actions { align-items: center; justify-content: flex-end; }
.report-mode-btn.active { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.report-table { min-width: 1080px; }
.report-table th { padding: 0; }
.report-sort-btn {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}
.report-sort-btn:hover, .report-sort-btn.active { color: var(--brand-dark); background: #f8e9ec; }
.report-sort-btn span { min-width: 14px; color: var(--brand); font-size: 10px; text-align: center; }
.report-student-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.report-student-link:hover { color: var(--brand); }
.report-action-col { width: 1%; white-space: nowrap; text-align: center !important; }
.btn-restore { background: #e8f5ec; color: var(--success); border-color: #b8dcc4; }

body.modal-open { overflow: hidden; }
.report-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24, 24, 24, .48);
  backdrop-filter: blur(3px);
}
.report-modal {
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .25);
}
.report-modal-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.report-modal-header h2 { margin: 3px 0 0; }
.modal-close-btn {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid #d8dde6;
  border-radius: 12px;
  background: #f7f8fa;
  color: #343b48;
  font-size: 27px;
  line-height: 1;
}
.modal-close-btn:hover { background: #eceff4; }
.report-modal-body { overflow: auto; padding: 22px 24px 28px; }
.modal-loading { padding: 45px 20px; color: var(--text-muted); text-align: center; }
.student-report-profile {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.student-report-profile > div,
.attempt-kpis > div {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}
.student-report-profile span,
.attempt-kpis span { display: block; color: var(--text-muted); font-size: 11px; }
.student-report-profile strong,
.attempt-kpis strong { display: block; margin-top: 4px; color: #272e39; font-size: 17px; }
.student-attempt-list { display: grid; gap: 16px; }
.student-attempt-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
}
.student-attempt-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #fff, #fff5f6);
}
.student-attempt-heading h3 { margin: 3px 0 0; color: var(--brand-dark); }
.student-attempt-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; }
.attempt-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px;
}
.attempt-answers { border-top: 1px solid var(--border); }
.attempt-answers summary {
  padding: 13px 18px;
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 800;
  background: #fafbfc;
}
.attempt-answer-table-wrap { overflow: auto; }
.attempt-answer-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
.attempt-answer-table th { padding: 10px 12px; background: #f1f4f8; color: #4a5363; text-align: left; white-space: nowrap; }
.attempt-answer-table td { padding: 10px 12px; border-top: 1px solid #edf0f5; }
.attempt-answer-table tr.answer-ok td:last-child { color: var(--success); font-weight: 800; }
.attempt-answer-table tr.answer-wrong td:last-child { color: var(--danger); font-weight: 800; }

@media (max-width: 760px) {
  .report-modal-backdrop { padding: 10px; }
  .report-modal { max-height: calc(100vh - 20px); border-radius: 14px; }
  .report-modal-header, .report-modal-body { padding-left: 15px; padding-right: 15px; }
  .student-report-profile { grid-template-columns: 1fr; }
  .student-attempt-heading { align-items: flex-start; flex-direction: column; }
  .attempt-kpis { grid-template-columns: 1fr 1fr; }
  .report-mode-actions { width: 100%; justify-content: flex-start; }
}

@media print {
  body.teacher-report-print .report-mode-actions,
  body.teacher-report-print #reportActionStatus,
  body.teacher-report-print .report-action-col,
  body.teacher-report-print .report-modal-backdrop { display: none !important; }
}

/* v2.2.0 — relatórios PDF, seleção múltipla e Área do Professor wide */
.teacher-screen:not(.teacher-auth-mode) { padding: 12px; }
.teacher-workspace {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 24px);
  margin: 0;
  padding: 26px 30px;
  border-radius: 18px;
}
.teacher-screen:not(.teacher-auth-mode) .teacher-panel { width: 100%; max-width: none; }

/* Corrige a regra genérica .attention-row span e centraliza o ranking. */
.attention-row .attention-rank {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  margin-top: 0;
  padding: 0;
  color: var(--warning);
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.report-table { min-width: 1260px; }
.report-select-col { width: 42px; min-width: 42px; text-align: center !important; }
.report-select-col input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.report-row-actions, .student-attempt-actions, .report-modal-header-actions { display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; }
.btn-pdf { background: #edf5fb; color: #155c85; border-color: #bfd9e9; }
.btn-pdf:hover { background: #dcecf7; }
.report-action-col { min-width: 158px; }
.report-row-actions { justify-content: center; }

.student-report-profile.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.student-activity-groups { display: grid; gap: 22px; }
.student-activity-group { display: grid; gap: 12px; }
.student-activity-group-title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 12px;
  padding: 0 2px 8px;
  border-bottom: 2px solid #f0d6db;
}
.student-activity-group-title .eyebrow { grid-column: 1; }
.student-activity-group-title h3 { grid-column: 1; margin: 0; color: var(--brand-dark); font-size: 19px; }
.student-activity-group-title .badge-soft { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

.delete-attempt-backdrop { z-index: 3200; }
.delete-attempt-modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .28);
}
.delete-attempt-body { overflow: auto; padding: 20px 24px 24px; }
.delete-attempt-body > p { margin: 0 0 14px; line-height: 1.5; }
.delete-attempt-options { display: grid; gap: 10px; }
.delete-attempt-option {
  display: grid;
  grid-template-columns: 22px 110px 1fr;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
}
.delete-attempt-option:hover { border-color: #e3a8b2; background: #fff8f9; }
.delete-attempt-option:has(input:checked) { border-color: #d76a7e; background: #fff3f5; box-shadow: 0 0 0 2px rgba(200, 16, 46, .08); }
.delete-attempt-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }
.delete-attempt-number { color: var(--brand-dark); font-weight: 900; }
.delete-attempt-score strong, .delete-attempt-score small { display: block; }
.delete-attempt-score strong { color: #252b36; }
.delete-attempt-score small { margin-top: 3px; color: var(--text-muted); }
.delete-attempt-actions { justify-content: flex-end; margin-top: 17px; }

@media (max-width: 900px) {
  .teacher-screen:not(.teacher-auth-mode) { padding: 6px; }
  .teacher-workspace { min-height: calc(100vh - 12px); padding: 18px; border-radius: 14px; }
  .student-report-profile.four-columns { grid-template-columns: 1fr 1fr; }
  .report-modal-header-actions { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 650px) {
  .student-report-profile.four-columns { grid-template-columns: 1fr; }
  .student-attempt-actions { width: 100%; flex-wrap: wrap; }
  .student-attempt-actions .btn { flex: 1; }
  .delete-attempt-option { grid-template-columns: 22px 1fr; }
  .delete-attempt-number { grid-column: 2; }
  .delete-attempt-score { grid-column: 2; }
  .delete-attempt-actions { justify-content: stretch; flex-direction: column; }
  .delete-attempt-actions .btn { width: 100%; }
}

/* v2.3.1 — pré-visualização PDF e gerenciamento detalhado de atividades */
.attention-row .attention-rank {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 32px !important;
  text-align: center !important;
}
.activity-list-heading { margin-top: 24px; align-items: center; }
.activity-list-heading .subsection-title { margin: 0; }
.activity-mode-actions { justify-content: flex-end; }
.activity-manager-row.activity-clickable { cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.activity-manager-row.activity-clickable:hover { border-color: #d9a5ae; box-shadow: 0 8px 24px rgba(95, 35, 46, .08); transform: translateY(-1px); }
.activity-manager-row.activity-in-trash { border-left-color: #9aa3b2; background: #fafbfc; }
.activity-manager-info .activity-open-hint { display: block; margin-top: 5px; color: #7a8290; font-size: 12px; }
.activity-detail-backdrop { z-index: 3300; }
.activity-detail-modal { width: min(1180px, 100%); }
.activity-detail-summary { display: grid; grid-template-columns: minmax(250px, 1.5fr) repeat(4, minmax(115px, .7fr)); gap: 10px; margin-bottom: 18px; }
.activity-detail-summary > div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.activity-detail-summary span, .activity-detail-summary strong { display: block; }
.activity-detail-summary span { color: var(--text-muted); font-size: 12px; }
.activity-detail-summary strong { margin-top: 4px; color: #202631; }
.activity-question-table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.activity-question-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.activity-question-table th { padding: 10px 12px; background: #f1f4f8; color: #4a5363; text-align: left; font-size: 12px; }
.activity-question-table td { padding: 9px 12px; border-top: 1px solid #edf0f5; }
.activity-question-table tbody tr:nth-child(even) { background: #fbfcfe; }
.activity-question-answer { font-weight: 800; }
.activity-edit-form { display: grid; gap: 14px; }
.activity-edit-form .form-grid-four { margin: 0; }
.activity-edit-questions textarea { min-height: 310px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.activity-edit-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff6dd; color: #6f5616; font-size: 13px; line-height: 1.45; }
.activity-modal-actions-bottom { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.pdf-preview-backdrop { z-index: 3600; padding: 16px; }
.pdf-preview-modal { width: min(1540px, calc(100vw - 24px)); height: min(94vh, 980px); max-height: 94vh; }
.pdf-preview-modal .report-modal-header > div:first-child { flex: 1 1 auto; min-width: 0; }
.pdf-preview-modal #pdfPreviewTitle { white-space: nowrap; font-size: clamp(17px, 1.55vw, 24px); line-height: 1.15; }
.pdf-preview-body { flex: 1; min-height: 0; padding: 0; background: #4a4f58; }
.pdf-preview-body iframe { display: block; width: 100%; height: 100%; min-height: 70vh; border: 0; background: #fff; }

@media (max-width: 900px) {
  .activity-detail-summary { grid-template-columns: 1fr 1fr; }
  .activity-detail-summary > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .activity-detail-summary { grid-template-columns: 1fr; }
  .activity-detail-summary > div:first-child { grid-column: auto; }
  .activity-mode-actions { width: 100%; justify-content: flex-start; }
  .pdf-preview-backdrop { padding: 6px; }
  .pdf-preview-modal { height: calc(100vh - 12px); max-height: calc(100vh - 12px); }
}

/* v2.4.0 — motor matemático flexível e planejamento pedagógico */
.curriculum-panel { border: 1px solid var(--border); background: #f8fafc; border-radius: 14px; padding: 16px; display: grid; gap: 14px; }
.curriculum-panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; }
.curriculum-panel-heading h3 { margin: 2px 0 0; color: #273142; }
.curriculum-recommendation { border-radius: 10px; background: #fff; border: 1px dashed #cbd5e1; padding: 11px 13px; font-size: 13px; color: #475569; line-height: 1.45; }
.curriculum-recommendation strong { color: var(--brand-dark); }
.math-syntax-help { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.math-syntax-help summary { cursor: pointer; padding: 13px 15px; font-weight: 800; color: var(--brand-dark); background: #fafbfc; }
.math-syntax-help[open] summary { border-bottom: 1px solid var(--border); }
.math-syntax-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.math-syntax-grid > div { background: #f8fafc; border: 1px solid #e4e9f1; border-radius: 10px; padding: 11px; display: grid; gap: 5px; }
.math-syntax-grid strong { color: #273142; }
.math-syntax-grid span { color: #5f6b7a; font-size: 13px; line-height: 1.4; }
.math-syntax-help > .field-help { display: block; padding: 0 14px 14px; }
.math-syntax-help code { background: #eef2f7; border-radius: 5px; padding: 2px 5px; }
.fixed-form #novaAtividadeQuestoes { min-height: 360px; font-family: "Segoe UI", Arial, sans-serif; line-height: 1.55; }
.activity-curriculum-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.activity-curriculum-badges .badge-soft { font-size: 11px; }
.activity-question-type { white-space: nowrap; }
#weekView .week-grid { grid-template-columns: repeat(2, minmax(300px, 1fr)); }
#weekView .week-item { min-height: 112px; }
#weekView .week-expression { word-break: break-word; overflow-wrap: anywhere; }
#weekView .week-answer-row input { min-width: 0; }
@media (max-width: 980px) {
  .math-syntax-grid { grid-template-columns: 1fr 1fr; }
  #weekView .week-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .math-syntax-grid { grid-template-columns: 1fr; }
  .curriculum-panel { padding: 12px; }
}
@media print {
  #weekView .week-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
.activity-curriculum-summary { margin: 2px 0 6px; color: #7b2735; font-size: 12px; font-weight: 700; }
.week-question-number { color: var(--brand-dark); font-weight: 800; }
.question-figure { display:block; max-width:min(100%, 540px); height:auto; margin:12px 0; border-radius:8px; }
.placement-notice { padding:16px 20px; grid-column:1 / -1; }
