:root {
  --brown: #7b5f48;
  --brown-dark: #2b211b;
  --brown-hover: #654c39;
  --beige: #f7f3ef;
  --beige-strong: #f1e7dc;
  --green: #2f6b2f;
  --green-soft: #eef8ee;
  --purple: #6f5aa8;
  --purple-soft: #f0edfb;
  --text: #2f2f2f;
  --muted: #6a625c;
  --line: #eee4dc;
  --danger: #9b2c2c;
  --danger-soft: #fff0f0;
  --warning: #9a6500;
  --warning-soft: #fff7e6;
  --shadow: 0 14px 36px rgba(43, 33, 27, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(182, 138, 78, .07), transparent 48%),
    radial-gradient(ellipse at 92% 100%, rgba(141, 163, 131, .06), transparent 52%),
    #f4eee3;
  color: var(--text);
}

a,
button,
input,
select,
textarea {
  font-family: inherit;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: linear-gradient(180deg, #f1e9d9 0%, #eee4d1 100%);
  border-right: 1px solid #e2d7c3;
  color: var(--brown-dark);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid rgba(75, 55, 30, 0.08);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brown-dark);
  color: #faf6ee;
  font-size: 21px;
  font-weight: 800;
  font-family: Georgia, serif;
  font-style: italic;
  box-shadow: 0 1px 2px rgba(43, 33, 27, 0.18);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--brown-dark);
}

.subtitle {
  font-size: 10px;
  color: #7a6b5a;
  margin-top: 5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.menu a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  position: relative;
  color: #4a3c2e;
  text-decoration: none;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 4px;
  font-weight: 500;
  font-size: 13.5px;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.menu-icon {
  width: 18px;
  min-width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-size: 12px;
  line-height: 1;
  opacity: .68;
  text-align: center;
  border-radius: 6px;
  background: transparent;
}

.menu-text {
  display: block;
  flex: initial;
  min-width: 0;
  line-height: 1.2;
  margin-left: 0;
}

.menu-label {
  display: block;
  color: #a39584;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 19px 10px 6px;
  text-transform: uppercase;
}

.menu-label:first-child {
  margin-top: 0;
}

.menu a:hover,
.menu a.active {
  background: rgba(75, 55, 30, 0.06);
  color: var(--brown-dark);
}

.menu a.active {
  background: var(--brown-dark);
  color: #faf6ee;
  box-shadow: 0 1px 2px rgba(43, 33, 27, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.menu a.active .menu-icon {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.menu a.active::before {
  content: "";
  position: absolute;
  left: -6px;
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: var(--purple);
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.focus-week-card {
  padding: 13px;
  border: 1px solid rgba(75, 55, 30, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.focus-week-card strong {
  display: block;
  color: var(--brown-dark);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
}

.focus-week-card p {
  margin: 0;
  color: #7a6b5a;
  font-size: 12px;
  line-height: 1.45;
}

.logout {
  display: inline-flex;
  color: var(--brown);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 32px 36px 64px;
}

.top {
  margin-bottom: 28px;
}

.top h1 {
  margin: 0 0 8px;
  color: var(--brown-dark);
  font-size: 34px;
  line-height: 1.15;
}

.top p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.box,
.card {
  background: #fbf8f2;
  border: 1px solid #e2d7c3;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 1px 0 rgba(75,55,30,.05), 0 6px 24px -12px rgba(75,55,30,.12);
}

.box h2 {
  margin: 0 0 18px;
  font-size: 22px;
  color: var(--brown-dark);
  line-height: 1.25;
}

.box h3 {
  margin: 0 0 14px;
  color: var(--brown-dark);
  font-size: 15px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #3d332c;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 16px;
  border: 1px solid #ddd2c8;
  border-radius: 14px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #9b7b5d;
  box-shadow: 0 0 0 4px rgba(123, 95, 72, 0.1);
}

button {
  width: 100%;
  border: none;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--brown);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--brown-hover);
}

.mensagem {
  background: var(--green-soft);
  color: var(--green);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 14px;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}

th {
  color: var(--brown);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.table-title {
  color: var(--brown-dark);
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--beige-strong);
  color: var(--brown);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}

.badge.atrasada,
.nivel-critico,
.desempenho-baixo {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.hoje,
.nivel-atencao,
.desempenho-medio {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.feita,
.nivel-excelente,
.desempenho-bom {
  background: var(--green-soft);
  color: var(--green);
}

.badge.futura {
  background: #eef3ff;
  color: #365b9b;
}

.nivel-bom {
  background: #edf7f0;
  color: #3f7a4c;
}

.delete {
  color: var(--danger);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.action {
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.empty {
  color: #7a716b;
  font-size: 15px;
  padding: 18px 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card span {
  display: block;
  color: var(--brown);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.card strong {
  display: block;
  font-size: 34px;
  color: var(--brown-dark);
  line-height: 1;
}

.card small {
  display: block;
  margin-top: 8px;
  color: #7a716b;
  line-height: 1.5;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brown);
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  border: none;
}

.button-link:visited {
  color: #fff;
}

.button-link:hover {
  background: var(--brown-hover);
  color: #fff;
}

.button-link.secondary {
  background: #fff;
  color: var(--brown);
  border: 1px solid #dfd0c4;
}

.button-link.secondary:visited {
  color: var(--brown);
}

.button-link.secondary:hover {
  background: var(--beige-strong);
  color: var(--brown-dark);
}

.button-link.compact {
  padding: 11px 15px;
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: var(--beige-strong);
  color: #6f543f;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.helper-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 22px;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--beige);
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.login-box h1 {
  font-size: 32px;
  margin: 0 0 10px;
  color: var(--brown-dark);
  line-height: 1.2;
}

.login-box p {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 15px;
}

.erro {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 14px;
}

.review-cards {
  margin-bottom: 24px;
}

.revisoes-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.revisoes-page .top {
  margin-bottom: 0;
}

.revisoes-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  background:
    radial-gradient(120% 200% at 100% 0%, rgba(141, 163, 131, .14), transparent 55%),
    radial-gradient(140% 220% at 0% 100%, rgba(111, 90, 168, .11), transparent 55%),
    linear-gradient(180deg, #fbf8f2 0%, #faf6ee 100%);
  border: 1px solid #e2d7c3;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 1px 0 rgba(75,55,30,.05), 0 16px 36px -18px rgba(75,55,30,.18);
}

.revisoes-hero-copy {
  max-width: 820px;
}

.revisoes-hero h1 {
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.05;
}

.revisoes-hero-panel {
  min-width: 280px;
  display: grid;
  align-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: #fff;
  padding: 24px;
}

.revisoes-hero-panel span,
.revisoes-hero-panel small {
  display: block;
  color: #efe3d8;
  font-size: 13px;
}

.revisoes-hero-panel strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 42px;
  line-height: 1;
}

.review-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.review-metric {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  padding: 20px 54px 18px 20px;
}

.review-metric::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  opacity: .74;
  z-index: 0;
}

.review-metric span,
.review-metric strong,
.review-metric small {
  position: relative;
  z-index: 1;
}

.review-metric-alert::after {
  background: var(--danger-soft);
}

.review-metric-today::after {
  background: var(--warning-soft);
}

.review-metric-future::after {
  background: var(--purple-soft);
}

.review-metric-done::after {
  background: var(--green-soft);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.review-filters {
  margin-bottom: 0;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  background: rgba(251, 248, 242, .82);
  border: 1px solid #e2d7c3;
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(75,55,30,.04);
}

.filters a {
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brown);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.review-filters a {
  background: transparent;
  box-shadow: none;
  color: #4a3c2e;
  padding: 9px 14px;
}

.filters a.active,
.filters a:hover {
  background: var(--brown);
  color: #ffffff;
}

.review-filters a.active,
.review-filters a:hover {
  background: var(--brown);
  color: #faf6ee;
}

.review-list-panel {
  background: linear-gradient(180deg, #fff 0%, #fffcfa 100%);
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-item {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) minmax(0, 1.4fr) minmax(180px, auto);
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(111, 90, 168, .24);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(75,55,30,.04);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.review-item:hover {
  transform: translateY(-1px);
  background: #fffaf6;
}

.review-item-atrasada {
  border-left-color: #d9968f;
}

.review-item-hoje {
  border-left-color: #d8b46d;
}

.review-item-futura {
  border-left-color: #8c7ba8;
}

.review-item-feita {
  border-left-color: #88b58d;
}

.review-status {
  display: grid;
  gap: 7px;
  align-content: center;
}

.review-status strong {
  color: var(--brown-dark);
  font-size: 14px;
}

.review-status small {
  color: var(--brown);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.review-main h3 {
  margin: 0;
  color: var(--brown-dark);
  font-size: 17px;
  line-height: 1.35;
}

.review-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.review-action {
  display: flex;
  justify-content: flex-end;
}

.review-done-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--brown);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(123, 95, 72, 0.12);
}

.review-done-action:hover {
  background: var(--brown-hover);
  color: #fff;
}

.review-done-text {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.review-empty-state {
  display: grid;
  gap: 6px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
}

.review-empty-state strong {
  color: var(--brown-dark);
  font-size: 16px;
}

.review-empty-state span {
  font-size: 14px;
  line-height: 1.5;
}

/* ── Questões page ─────────────────────────────────────────────────── */

.questoes-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.questoes-page .top {
  margin-bottom: 0;
}

/* Hero */
.questoes-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  background:
    radial-gradient(120% 200% at 100% 0%, rgba(141, 163, 131, .14), transparent 55%),
    radial-gradient(140% 220% at 0% 100%, rgba(182, 138, 78, .10), transparent 55%),
    linear-gradient(180deg, #fbf8f2 0%, #faf6ee 100%);
  border: 1px solid #e2d7c3;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 1px 0 rgba(75,55,30,.05), 0 16px 36px -18px rgba(75,55,30,.18);
}

.questoes-hero-copy {
  max-width: 820px;
}

.questoes-hero h1 {
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.05;
  margin-bottom: 10px;
}

.questoes-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.questoes-hero-panel {
  min-width: 260px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: #fff;
  padding: 26px 28px;
}

.questoes-hero-panel span,
.questoes-hero-panel small {
  display: block;
  color: #efe3d8;
  font-size: 13px;
}

.questoes-hero-panel strong {
  display: block;
  font-size: 46px;
  line-height: 1;
  margin: 8px 0 12px;
}

.hero-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
  margin-bottom: 10px;
}

.hero-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(141,163,131,.7), #a8d5a8);
  min-width: 2px;
  transition: width .5s ease;
}

/* Métricas */
.questoes-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.questoes-metric {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  padding: 20px 54px 18px 20px;
}

.questoes-metric::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  opacity: .74;
  z-index: 0;
  background: var(--beige-strong);
}

.questoes-metric span,
.questoes-metric strong,
.questoes-metric small {
  position: relative;
  z-index: 1;
}

.questoes-metric-acertos::after  { background: var(--green-soft); }
.questoes-metric-erros::after    { background: var(--danger-soft); }
.questoes-metric-aproveitamento::after { background: var(--purple-soft); }

.questoes-metric strong {
  font-size: 30px;
}

/* Grade principal */
.questoes-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Formulário */
.questoes-form-box {
  padding: 24px;
}

.questoes-form-box h2 {
  margin-bottom: 6px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row-2 input {
  margin-bottom: 0;
}

.form-row-2 + label {
  margin-top: 16px;
}

.label-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}

/* Lista */
.questoes-list-box {
  padding: 24px;
}

.questoes-list-box h2 {
  margin-bottom: 6px;
}

/* Tabela de questões */
.questoes-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 4px;
}

.questoes-table {
  width: 100%;
  border-collapse: collapse;
}

.questoes-table th {
  color: var(--brown);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.questoes-row {
  border-bottom: 1px solid var(--line);
  transition: background .12s ease;
}

.questoes-row:last-child {
  border-bottom: none;
}

.questoes-row:hover {
  background: #fffaf6;
}

.questoes-row td {
  padding: 14px 12px;
  font-size: 14px;
  vertical-align: middle;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }

.row-disciplina {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--brown);
  margin-bottom: 3px;
}

.row-conteudo {
  display: block;
  color: var(--brown-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.row-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--brown-dark);
}

.acertos-num { color: var(--green); }
.erros-num   { color: var(--danger); }

/* Barra de aproveitamento na tabela */
.col-aproveitamento { min-width: 150px; }

.aproveitamento-wrap {
  display: grid;
  gap: 6px;
}

.aproveitamento-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--brown-dark);
}

.aproveitamento-bar-track {
  height: 7px;
  border-radius: 999px;
  background: #f0e7df;
  overflow: hidden;
}

.aproveitamento-bar-fill {
  height: 100%;
  border-radius: inherit;
  min-width: 2px;
  transition: width .4s ease;
}

.aproveitamento-bar-fill.nivel-excelente { background: var(--green); }
.aproveitamento-bar-fill.nivel-bom       { background: #3f9e58; }
.aproveitamento-bar-fill.nivel-atencao   { background: var(--warning); }
.aproveitamento-bar-fill.nivel-critico   { background: var(--danger); }

/* Badges de nível */
.nivel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11.5px;
  white-space: nowrap;
}

.nivel-badge.nivel-excelente {
  background: var(--green-soft);
  color: var(--green);
}

.nivel-badge.nivel-bom {
  background: #edf7f0;
  color: #3f7a4c;
}

.nivel-badge.nivel-atencao {
  background: var(--warning-soft);
  color: var(--warning);
}

.nivel-badge.nivel-critico {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Botão excluir */
.btn-excluir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background .12s ease, color .12s ease;
}

.btn-excluir:hover {
  background: var(--danger);
  color: #fff;
}

/* Estado vazio */
.questoes-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
}

.questoes-empty-icon {
  font-size: 36px;
  opacity: .35;
  line-height: 1;
  margin-bottom: 4px;
}

.questoes-empty-state strong {
  color: var(--brown-dark);
  font-size: 17px;
}

.questoes-empty-state span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 420px;
}

/* Coluna de conteúdo na tabela */
.col-conteudo { min-width: 200px; }
.col-acao     { width: 48px; }

/* Tabela de registros — refinamento de espaçamento */
.questoes-table th {
  background: #fbf8f2;
}

.questoes-row td {
  padding: 16px 12px;
}

/* ── Pontos de atenção ──────────────────────────────────────────────── */

.questoes-insights {
  display: grid;
  gap: 18px;
}

.insights-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.insights-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--brown-dark);
}

.insights-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.insight-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbf8f2;
  box-shadow: 0 1px 0 rgba(75,55,30,.04), 0 4px 16px -8px rgba(75,55,30,.08);
  transition: transform .12s ease;
}

.insight-card:hover {
  transform: translateY(-1px);
}

.insight-neutro  { background: #fbf8f2; border-color: #e2d7c3; }
.insight-excelente { background: var(--green-soft); border-color: #c2dfc4; }
.insight-bom     { background: #edf7f0; border-color: #b8dfc0; }
.insight-atencao { background: var(--warning-soft); border-color: #f0d99a; }
.insight-critico { background: var(--danger-soft); border-color: #f0b8b8; }

.insight-icon {
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
  opacity: .72;
  margin-top: 2px;
}

.insight-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.insight-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brown);
  margin-bottom: 2px;
}

.insight-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--brown-dark);
  line-height: 1.1;
}

.insight-value-sm {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
}

.insight-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.insight-critico .insight-desc { color: #7a2424; }
.insight-atencao .insight-desc { color: #7a5000; }
.insight-excelente .insight-desc,
.insight-bom .insight-desc     { color: #2a5e36; }

/* ── Desempenho por conteúdo ────────────────────────────────────────── */

.questoes-por-conteudo {
  padding: 24px;
}

.questoes-por-conteudo h2 {
  margin-bottom: 6px;
}

.dc-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 4px;
}

.dc-table {
  width: 100%;
}

.dc-row-critico td:first-child {
  border-left: 3px solid #d9968f;
}

.dc-row-atencao td:first-child {
  border-left: 3px solid #d8b46d;
}

.dc-row-bom td:first-child {
  border-left: 3px solid #88b58d;
}

.dc-row-excelente td:first-child {
  border-left: 3px solid var(--green);
}

/* ── Responsivo ─────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .questoes-hero {
    flex-direction: column;
    gap: 20px;
  }

  .questoes-hero-panel {
    min-width: unset;
    width: 100%;
  }

  .questoes-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .questoes-grid {
    grid-template-columns: 1fr;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .questoes-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Conteúdos page ─────────────────────────────────────────────────── */

.conteudos-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.conteudos-page .top {
  margin-bottom: 0;
}

/* Hero */
.conteudos-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  background:
    radial-gradient(120% 200% at 100% 0%, rgba(111, 90, 168, .10), transparent 55%),
    radial-gradient(140% 220% at 0% 100%, rgba(182, 138, 78, .10), transparent 55%),
    linear-gradient(180deg, #fbf8f2 0%, #faf6ee 100%);
  border: 1px solid #e2d7c3;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 1px 0 rgba(75,55,30,.05), 0 16px 36px -18px rgba(75,55,30,.18);
}

.conteudos-hero-copy {
  max-width: 820px;
}

.conteudos-hero h1 {
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.05;
  margin-bottom: 10px;
}

.conteudos-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.conteudos-hero-panel {
  min-width: 260px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: #fff;
  padding: 26px 28px;
}

.conteudos-hero-panel span,
.conteudos-hero-panel small {
  display: block;
  color: #efe3d8;
  font-size: 13px;
}

.conteudos-hero-panel strong {
  display: block;
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  margin: 8px 0 10px;
}

/* Métricas */
.conteudos-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.conteudos-metric {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  padding: 20px 54px 18px 20px;
}

.conteudos-metric::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  opacity: .74;
  z-index: 0;
  background: var(--beige-strong);
}

.conteudos-metric span,
.conteudos-metric strong,
.conteudos-metric small {
  position: relative;
  z-index: 1;
}

.conteudos-metric-disciplinas::after { background: var(--purple-soft); }
.conteudos-metric-pendentes::after   { background: var(--warning-soft); }
.conteudos-metric-questoes::after    { background: var(--green-soft); }

.conteudos-metric strong {
  font-size: 30px;
}

/* Grade principal */
.conteudos-grid {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.conteudos-form-box {
  padding: 24px;
}

.conteudos-form-box h2 {
  margin-bottom: 6px;
}

.conteudos-list-box {
  padding: 24px;
}

.conteudos-list-box h2 {
  margin-bottom: 6px;
}

/* Tabela de conteúdos */
.conteudos-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 4px;
}

.conteudos-table {
  width: 100%;
  border-collapse: collapse;
}

.conteudos-table th {
  background: #fbf8f2;
  color: var(--brown);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.conteudos-row {
  border-bottom: 1px solid var(--line);
  transition: background .12s ease;
}

.conteudos-row:last-child {
  border-bottom: none;
}

.conteudos-row:hover {
  background: #fffaf6;
}

.conteudos-row td {
  padding: 14px 12px;
  font-size: 14px;
  vertical-align: middle;
}

.col-data .data-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* Dificuldade badges */
.dif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--beige-strong);
  color: var(--brown);
}

.dif-facil  { background: var(--green-soft);   color: var(--green); }
.dif-media  { background: var(--warning-soft);  color: var(--warning); }
.dif-dificil { background: var(--danger-soft);  color: var(--danger); }

/* Revisão badges */
.rev-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.rev-feita    { background: var(--green-soft);   color: var(--green); }
.rev-pendente { background: var(--warning-soft);  color: var(--warning); }
.rev-atrasada { background: var(--danger-soft);   color: var(--danger); }

/* Prática (questões + aproveitamento) */
.col-pratica { min-width: 160px; }

.pratica-sem {
  font-size: 13px;
  color: #b0a59d;
  font-style: italic;
}

.pratica-wrap {
  display: grid;
  gap: 6px;
}

.pratica-info {
  font-size: 13px;
  color: var(--muted);
}

.pratica-pct {
  font-weight: 700;
}

.pratica-pct.nivel-pct-excelente { color: var(--green); }
.pratica-pct.nivel-pct-bom       { color: #3f7a4c; }
.pratica-pct.nivel-pct-atencao   { color: var(--warning); }
.pratica-pct.nivel-pct-critico   { color: var(--danger); }

/* Ações na tabela */
.col-acoes { width: 72px; }

.acoes-wrap {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

.btn-editar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0ecf7;
  color: var(--purple);
  text-decoration: none;
  font-size: 14px;
  transition: background .12s ease, color .12s ease;
}

.btn-editar:hover {
  background: var(--purple);
  color: #fff;
}

/* Visão por disciplina */
.visao-disciplina {
  padding: 24px;
}

.visao-disciplina h2 {
  margin-bottom: 6px;
}

.vd-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 4px;
}

.vd-table {
  width: 100%;
  border-collapse: collapse;
}

.vd-table th {
  background: #fbf8f2;
  color: var(--brown);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.vd-row {
  border-bottom: 1px solid var(--line);
  transition: background .12s ease;
}

.vd-row:last-child { border-bottom: none; }

.vd-row:hover { background: #fffaf6; }

.vd-row td {
  padding: 14px 12px;
  font-size: 14px;
  vertical-align: middle;
}

.vd-row td:first-child {
  border-left: 3px solid transparent;
}

.vd-row-excelente td:first-child { border-left-color: var(--green); }
.vd-row-bom       td:first-child { border-left-color: #88b58d; }
.vd-row-atencao   td:first-child { border-left-color: #d8b46d; }
.vd-row-critico   td:first-child { border-left-color: #d9968f; }
.vd-row-neutro    td:first-child { border-left-color: var(--line); }

.vd-nome {
  font-weight: 700;
  color: var(--brown-dark);
  font-size: 14px;
}

.sem-pratica-text {
  font-size: 13px;
  color: #b0a59d;
  font-style: italic;
}

/* Responsivo */
@media (max-width: 1100px) {
  .conteudos-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .conteudos-hero {
    flex-direction: column;
    gap: 20px;
  }

  .conteudos-hero-panel {
    min-width: unset;
    width: 100%;
  }

  .conteudos-grid {
    grid-template-columns: 1fr;
  }

  .form-row-2 select,
  .form-row-2 input[type="date"] {
    margin-bottom: 0;
  }
}

@media (max-width: 600px) {
  .conteudos-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Disciplinas page ───────────────────────────────────────────────── */

/* Corrige margin em select dentro de form-row-2 (global, aplicável a todos) */
.form-row-2 select {
  margin-bottom: 0;
}

/* Badge neutro para nivel-badge (em construção / sem dados) */
.nivel-badge.nivel-neutro {
  background: var(--beige-strong);
  color: var(--brown);
}

.disciplinas-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.disciplinas-page .top {
  margin-bottom: 0;
}

/* Hero */
.disciplinas-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  background:
    radial-gradient(120% 200% at 100% 0%, rgba(182, 138, 78, .12), transparent 55%),
    radial-gradient(140% 220% at 0% 100%, rgba(141, 163, 131, .12), transparent 55%),
    linear-gradient(180deg, #fbf8f2 0%, #faf6ee 100%);
  border: 1px solid #e2d7c3;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 1px 0 rgba(75,55,30,.05), 0 16px 36px -18px rgba(75,55,30,.18);
}

.disciplinas-hero-copy {
  max-width: 820px;
}

.disciplinas-hero h1 {
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.05;
  margin-bottom: 10px;
}

.disciplinas-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.disciplinas-hero-panel {
  min-width: 260px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: #fff;
  padding: 26px 28px;
}

.disciplinas-hero-panel span,
.disciplinas-hero-panel small {
  display: block;
  color: #efe3d8;
  font-size: 13px;
}

.disciplinas-hero-panel strong {
  display: block;
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  margin: 8px 0 10px;
}

/* Métricas */
.disciplinas-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.disciplinas-metric {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  padding: 20px 54px 18px 20px;
}

.disciplinas-metric::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  opacity: .74;
  z-index: 0;
  background: var(--beige-strong);
}

.disciplinas-metric span,
.disciplinas-metric strong,
.disciplinas-metric small {
  position: relative;
  z-index: 1;
}

.disciplinas-metric-conteudo::after  { background: var(--green-soft); }
.disciplinas-metric-total::after     { background: var(--purple-soft); }
.disciplinas-metric-questoes::after  { background: var(--warning-soft); }

.disciplinas-metric strong {
  font-size: 30px;
}

/* Grade principal */
.disciplinas-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.disciplinas-form-box {
  padding: 24px;
}

.disciplinas-form-box h2 {
  margin-bottom: 6px;
}

/* Botão dentro do form de disciplinas precisa de margem superior */
.btn-cadastrar-disc {
  margin-top: 16px;
}

.disciplinas-list-box {
  padding: 24px;
}

.disciplinas-list-box h2 {
  margin-bottom: 6px;
}

/* Tabela de disciplinas */
.disciplinas-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 4px;
}

.disciplinas-table {
  width: 100%;
  border-collapse: collapse;
}

.disciplinas-table th {
  background: #fbf8f2;
  color: var(--brown);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.disciplinas-row {
  border-bottom: 1px solid var(--line);
  transition: background .12s ease;
}

.disciplinas-row:last-child {
  border-bottom: none;
}

.disciplinas-row:hover {
  background: #fffaf6;
}

.disciplinas-row td {
  padding: 15px 12px;
  font-size: 14px;
  vertical-align: middle;
}

/* Borda lateral colorida por status na tabela */
.disc-row-excelente { border-left: 3px solid var(--green); }
.disc-row-bom       { border-left: 3px solid #88b58d; }
.disc-row-atencao   { border-left: 3px solid #d8b46d; }
.disc-row-critico   { border-left: 3px solid #d9968f; }
.disc-row-neutro    { border-left: 3px solid var(--line); }

.col-disc-nome { min-width: 180px; }

.disc-nome {
  display: block;
  font-weight: 700;
  color: var(--brown-dark);
  font-size: 14px;
  line-height: 1.3;
}

.disc-area {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Badges de prioridade */
.prioridade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.prio-alta  { background: var(--danger-soft);  color: var(--danger); }
.prio-media { background: var(--warning-soft); color: var(--warning); }
.prio-baixa { background: #f0ecf7;             color: var(--purple); }

/* Mapa das disciplinas */
.mapa-disciplinas {
  display: grid;
  gap: 18px;
}

.mapa-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.mapa-card {
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 1px 0 rgba(75,55,30,.04), 0 6px 24px -12px rgba(75,55,30,.10);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .12s ease;
  border-left: 4px solid var(--line);
}

.mapa-card:hover {
  transform: translateY(-2px);
}

.mapa-card-excelente { border-left-color: var(--green); }
.mapa-card-bom       { border-left-color: #88b58d; }
.mapa-card-atencao   { border-left-color: #d8b46d; }
.mapa-card-critico   { border-left-color: #d9968f; }
.mapa-card-neutro    { border-left-color: #e2d7c3; }

.mapa-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.mapa-card-nome {
  font-size: 16px;
  font-weight: 700;
  color: var(--brown-dark);
  line-height: 1.3;
}

.mapa-card-area {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.mapa-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mapa-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.mapa-stat strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--brown-dark);
  line-height: 1;
}

.mapa-stat span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
}

.mapa-bar-track {
  height: 7px;
  border-radius: 999px;
  background: #f0e7df;
  overflow: hidden;
}

.mapa-bar-fill {
  height: 100%;
  border-radius: inherit;
  min-width: 2px;
  transition: width .4s ease;
}

.mapa-bar-fill.nivel-excelente { background: var(--green); }
.mapa-bar-fill.nivel-bom       { background: #3f9e58; }
.mapa-bar-fill.nivel-atencao   { background: var(--warning); }
.mapa-bar-fill.nivel-critico   { background: var(--danger); }

.mapa-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* Responsivo */
@media (max-width: 1200px) {
  .mapa-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .disciplinas-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .disciplinas-hero {
    flex-direction: column;
    gap: 20px;
  }

  .disciplinas-hero-panel {
    min-width: unset;
    width: 100%;
  }

  .disciplinas-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .disciplinas-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .mapa-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.dashboard-page .top {
  margin-bottom: 0;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: stretch;
  background:
    radial-gradient(120% 200% at 100% 0%, rgba(141, 163, 131, .16), transparent 55%),
    radial-gradient(140% 220% at 0% 100%, rgba(111, 90, 168, .12), transparent 55%),
    linear-gradient(180deg, #fbf8f2 0%, #faf6ee 100%);
  border: 1px solid #e2d7c3;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 1px 0 rgba(75,55,30,.05), 0 16px 36px -18px rgba(75,55,30,.18);
}

.hero-copy {
  max-width: 900px;
  flex: 1 1 auto;
}

.dashboard-hero h1 {
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-panel {
  min-width: 360px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: #fff;
  padding: 22px;
}

.score-ring {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--green-soft) var(--score), rgba(255,255,255,0.18) 0);
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--brown-dark);
}

.score-ring strong,
.score-ring span {
  position: relative;
  z-index: 1;
}

.score-ring strong {
  color: #fff;
  font-size: 27px;
  line-height: 1;
}

.score-ring span {
  color: #eadfd6;
  font-size: 12px;
  font-weight: 700;
  margin-top: 36px;
  position: absolute;
}

.hero-score span,
.hero-score small {
  display: block;
  color: #efe3d8;
  font-size: 13px;
}

.hero-score strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 32px;
  line-height: 1;
}

.dashboard-cards {
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 16px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 24px 58px 22px 22px;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--beige-strong);
  opacity: .72;
  z-index: 0;
  pointer-events: none;
}

.metric-card span,
.metric-card strong,
.metric-card small {
  position: relative;
  z-index: 1;
}

.metric-card-today::after {
  background: #edf7f0;
}

.metric-card-alert::after {
  background: var(--danger-soft);
}

.metric-card-accent::after {
  background: var(--purple-soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.75fr);
  gap: 22px;
  align-items: start;
}

.dashboard-section {
  margin-top: 0;
  overflow: hidden;
}

.box-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin: -4px -4px 18px;
  padding: 4px;
}

.box-header h2 {
  margin-bottom: 6px;
}

.box-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.focus-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.task-list,
.summary-list,
.activity-column {
  display: grid;
  gap: 12px;
}

.task-item,
.activity-item,
.summary-list div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffcfa;
  padding: 14px;
}

.task-item {
  display: grid;
  gap: 8px;
}

.task-item-alert {
  border-color: #f3caca;
  background: #fffafa;
}

.task-item strong,
.activity-item strong {
  color: var(--brown-dark);
  font-size: 14px;
  line-height: 1.35;
}

.task-item small,
.activity-item small {
  color: var(--muted);
  line-height: 1.5;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.summary-list span {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.summary-list strong {
  color: var(--brown-dark);
  font-size: 24px;
}

.progress-cell {
  display: grid;
  grid-template-columns: 62px minmax(110px, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 190px;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #f0e7df;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(43, 33, 27, 0.08);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9f836a, var(--green));
}

.progress-excelente span,
.progress-bom span {
  background: linear-gradient(90deg, #88b58d, var(--green));
}

.progress-atencao span {
  background: linear-gradient(90deg, #d8b46d, var(--warning));
}

.progress-critico span {
  background: linear-gradient(90deg, #d9968f, var(--danger));
}

.performance-table {
  min-width: 920px;
}

.performance-table thead th {
  background: #faf6ee;
  border-bottom: 1px solid #e8dacf;
}

.performance-table tbody tr {
  transition: background 0.2s ease, transform 0.2s ease;
}

.performance-table tbody tr:hover {
  background: #fffaf6;
}

.performance-table tbody td:first-child {
  border-left: 3px solid rgba(111, 90, 168, 0.22);
}

.attention-grid {
  display: grid;
}

.attention-panel {
  border-top: 3px solid rgba(111, 90, 168, 0.28);
  background: linear-gradient(180deg, #fff 0%, #fffcfa 100%);
}

.attention-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.attention-card {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffcfa;
  padding: 14px;
}

.attention-card span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--beige-strong);
  color: var(--brown);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.attention-card strong {
  display: block;
  color: var(--brown-dark);
  font-size: 15px;
  line-height: 1.35;
}

.attention-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.attention-danger {
  border-color: #f0c9c9;
  background: #fffafa;
}

.attention-danger span {
  background: var(--danger-soft);
  color: var(--danger);
}

.attention-warning {
  border-color: #f1dfba;
  background: #fffdf7;
}

.attention-warning span {
  background: var(--warning-soft);
  color: var(--warning);
}

.attention-success {
  border-color: #cfe8d4;
  background: #fbfffc;
}

.attention-success span {
  background: var(--green-soft);
  color: var(--green);
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.activity-column {
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffcfa 0%, #fff 100%);
  padding: 18px;
  height: 100%;
}

.activity-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.activity-heading span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
}

.activity-column h3 {
  margin: 0;
  color: var(--brown-dark);
  font-size: 15px;
}

.activity-item {
  display: grid;
  gap: 8px;
  background: #fff;
  min-height: 104px;
  align-content: space-between;
}

.activity-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--beige-strong);
  color: var(--brown);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.compact-empty {
  padding: 12px 0;
  font-size: 14px;
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.import-upload,
.import-model {
  min-height: 100%;
}

.import-model-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 8px;
}

.import-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.step-card {
  background: #faf7f4;
  border: 1px solid #efe4db;
  border-radius: 18px;
  padding: 18px;
}

.step-card span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brown);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-card strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 8px;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.import-rules {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 18px;
  border-top: 1px solid #efe4db;
  padding-top: 22px;
  margin-top: 8px;
}

.import-rules strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 14px;
}

.import-rules ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 1180px) {
  .dashboard-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .review-item {
    grid-template-columns: minmax(140px, 0.45fr) minmax(0, 1fr);
  }

  .review-action {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 1300px) {
  .activity-grid,
  .attention-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .review-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .questoes-page .review-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .questoes-page .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-basis: auto;
  }

  .grid,
  .cards,
  .focus-columns,
  .import-layout,
  .import-steps,
  .import-rules {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 24px;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  .dashboard-hero,
  .revisoes-hero,
  .box-header,
  .import-model-header {
    flex-direction: column;
  }

  .hero-score,
  .hero-panel,
  .revisoes-hero-panel,
  .button-link {
    width: 100%;
  }

  .hero-panel {
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .top h1 {
    font-size: 28px;
  }

  .box,
  .card,
  .dashboard-hero {
    border-radius: 18px;
    padding: 20px;
  }

  .questoes-page .review-cards {
    grid-template-columns: 1fr;
  }

  .review-metrics,
  .review-item {
    grid-template-columns: 1fr;
  }

  .review-filters {
    width: 100%;
    border-radius: 18px;
  }

  .review-filters a {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero-actions,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .score-ring {
    margin: 0 auto;
  }

  .progress-cell {
    grid-template-columns: 1fr;
    min-width: 130px;
  }
}
