/* ============================================================
   LabNetCol — Páginas de autenticação e perfil
   ============================================================ */

.auth-pagina {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--cor-fundo-card);
  border: 1px solid var(--cor-primaria);
  border-radius: var(--raio-borda);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.auth-card-largo {
  max-width: 1050px;
}

.auth-titulo {
  font-size: 1.8rem;
  color: var(--cor-primaria);
  margin: 0 0 0.5rem;
  text-align: center;
}

.auth-subtitulo {
  color: var(--cor-texto-suave);
  text-align: center;
  margin: -0.5rem 0 0.5rem;
}

.auth-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cor-texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.auth-input {
  display: block;
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid #444;
  border-radius: var(--raio-borda);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s;
  margin-bottom: 0.6rem;
}

.auth-input:focus {
  outline: none;
  border-color: var(--cor-primaria);
}

.auth-btn {
  display: block;
  width: 100%;
  padding: 0.7rem;
  border: none;
  border-radius: var(--raio-borda);
  background: var(--cor-primaria);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--fonte-principal);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s;
  margin-top: 0.4rem;
}

.auth-btn:hover:not(:disabled) { opacity: 0.85; }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
a.auth-btn { color: #ffffff; }

.auth-links {
  text-align: center;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--cor-texto-suave);
}

.auth-links a { color: var(--cor-primaria); }

.auth-info {
  font-size: 0.88rem;
  color: var(--cor-texto-suave);
  text-align: center;
  line-height: 1.5;
  margin: 0.2rem 0;
}

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--cor-texto-suave);
}

.empty-state-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.empty-state-titulo {
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.empty-state-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  max-width: 300px;
  line-height: 1.5;
}

.auth-erro {
  padding: 0.6rem 1rem;
  border-radius: var(--raio-borda);
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid var(--cor-erro);
  color: var(--cor-erro);
  font-size: 0.9rem;
}

.auth-sucesso {
  padding: 0.6rem 1rem;
  border-radius: var(--raio-borda);
  background: rgba(0, 200, 100, 0.1);
  border: 1px solid var(--cor-sucesso);
  color: var(--cor-sucesso);
  font-size: 0.9rem;
  text-align: center;
}

/* ── Credenciais após registo ── */

.auth-credenciais {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-aviso {
  padding: 0.7rem 1rem;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid #ca8a04;
  border-radius: var(--raio-borda);
  color: #ca8a04;
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-tipo-badge {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cor-primaria);
  margin: 0;
}

.auth-cred-linha {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.8rem;
  background: #111;
  border-radius: var(--raio-borda);
  border: 1px solid #333;
}

.auth-cred-etiqueta {
  font-size: 0.75rem;
  color: var(--cor-texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 130px;
  flex-shrink: 0;
}

.auth-cred-valor {
  font-family: monospace;
  font-size: 1.05rem;
  color: var(--cor-texto);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-cred-rec {
  color: var(--cor-secundaria);
}

.auth-rec-nota {
  font-size: 0.82rem;
  color: var(--cor-texto-suave);
  line-height: 1.5;
  margin: 0;
  padding: 0.6rem 0.8rem;
  background: #111;
  border-radius: var(--raio-borda);
  border-left: 3px solid var(--cor-secundaria);
}

/* ── Blocos de credencial (nova conta) ── */

.auth-cred-bloco {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.auth-cred-bloco-rec {
  border-left: 3px solid var(--cor-secundaria);
  padding-left: 0.75rem;
}

.auth-cred-input {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #f0f9ff;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: var(--raio-borda);
  padding: 0.6rem 0.9rem;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
}

.auth-cred-input:focus {
  outline: none;
  border-color: var(--cor-primaria);
  background: #1e293b;
}

.auth-cred-input-rec {
  color: var(--cor-secundaria);
  border-color: #4c3050;
}

.auth-cred-nota {
  font-size: 0.78rem;
  color: var(--cor-texto-suave);
  margin: 0;
}

/* ── Página de educandos ── */

.edu-add-linha {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.edu-add-input {
  flex: 1;
  margin-bottom: 0;
  font-family: monospace;
  letter-spacing: 0.08em;
}

.edu-add-btn {
  width: auto;
  padding: 0.6rem 1.2rem;
  white-space: nowrap;
  margin-top: 0;
}

.edu-lista {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.edu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: #1e293b;
  border-radius: var(--raio-borda);
  border: 1px solid #334155;
}

.edu-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.edu-item-nome {
  font-weight: 600;
  color: #f1f5f9;
}

.edu-item-cod {
  font-size: 0.78rem;
  color: var(--cor-texto-suave);
  font-family: monospace;
}

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

.edu-item-hist {
  background: transparent;
  border: 1px solid #334155;
  color: var(--cor-texto-suave);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}

.edu-item-hist:hover { border-color: var(--cor-primaria); color: var(--cor-primaria); }

/* ── Breadcrumb de resolução de ficha ───────────────────────── */
.ficha-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.ficha-breadcrumb-voltar {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: var(--cor-texto-suave);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: border-color 0.12s, color 0.12s;
}
.ficha-breadcrumb-voltar:hover { border-color: var(--cor-primaria); color: var(--cor-primaria); }

.ficha-breadcrumb-exercicio {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  background: #f1f5f9;
  border-radius: 5px;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edu-item-remover {
  background: transparent;
  border: none;
  color: var(--cor-erro);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
}

.edu-item-remover:hover { background: rgba(239,68,68,0.1); }

.edu-item-bloco {
  list-style: none;
  display: flex;
  flex-direction: column;
}

/* ── Painel de histórico do educando ── */

.edu-dash {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: #1e3a5f;
  border: 1px solid #2563eb;
  border-radius: 7px;
  font-size: 0.82rem;
  color: #bfdbfe;
}

.edu-dash-stat { display: flex; gap: 0.3rem; align-items: center; }
.edu-dash-stat strong { color: #e2e8f0; }
.edu-dash-ok strong { color: #86efac; }
.edu-dash-err strong { color: #fca5a5; }
.edu-dash-label { color: #93c5fd; font-weight: 600; }

.edu-dash-30d {
  background: #172554;
  border-color: #1d4ed8;
  margin-top: 0.4rem;
}

.edu-hist-painel {
  padding: 0.8rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-top: none;
  border-radius: 0 0 var(--raio-borda) var(--raio-borda);
}

.edu-hist-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.edu-hist-tabela th {
  text-align: left;
  padding: 0.35rem 0.5rem;
  color: var(--cor-texto-suave);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #334155;
}

/* Larguras das colunas: Exercício | Data | Pont. | Resultado */
.edu-hist-tabela th:nth-child(1),
.edu-hist-tabela td:nth-child(1) { width: 50%; }
.edu-hist-tabela th:nth-child(2),
.edu-hist-tabela td:nth-child(2) { width: 28%; }
.edu-hist-tabela th:nth-child(3),
.edu-hist-tabela td:nth-child(3) { width: 10%; text-align: right; }
.edu-hist-tabela th:nth-child(4),
.edu-hist-tabela td:nth-child(4) { width: 12%; text-align: center; }

.edu-hist-tabela td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #1e293b;
  color: #e2e8f0;
}

.edu-hist-data { color: #94a3b8; font-size: 0.8rem; }
.edu-hist-ok  { color: var(--cor-sucesso); font-weight: 700; }
.edu-hist-err { color: var(--cor-erro);    font-weight: 700; }
.edu-hist-int { color: #d97706; font-weight: 700; }

.edu-hist-row-click { cursor: pointer; }
.edu-hist-row-click:hover td { background: rgba(255, 255, 255, 0.13); }
.edu-hist-passos-row td { padding: 0; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }

/* ── Página de perfil ── */

.perfil-tipo-badge {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cor-primaria);
  margin: 0 0 0.2rem 0;
}

.perfil-separador {
  border: none;
  border-top: 1px solid #333;
  margin: 0.8rem 0;
}

/* ── Gráfico de evolução no painel do EE ── */
.edu-grafico-wrap {
  margin-top: 0.75rem;
  background: #0f172a;
  border: 1px solid #1e3a5f;
  border-radius: 7px;
  padding: 0.5rem 0.6rem 0.3rem;
}

.edu-grafico-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.edu-grafico-titulo {
  font-size: 0.75rem;
  font-weight: 600;
  color: #93c5fd;
}

.edu-periodo-toggle {
  display: flex;
  gap: 4px;
}

.edu-tog, .edu-tog-ativo {
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.7rem;
  cursor: pointer;
}

.edu-tog       { background: #1e293b; color: #94a3b8; }
.edu-tog:hover { background: #263244; }
.edu-tog-ativo { background: #2563eb; color: #fff; border-color: #2563eb; }

.edu-svg-wrap { display: block; }

.edu-grafico-leg {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

.edu-leg-tot { color: #60a5fa; font-weight: 600; }
.edu-leg-ok  { color: #4ade80; font-weight: 600; }

/* ── Tabela por tema no painel do EE ── */
.edu-temas-wrap {
  margin-top: 0.75rem;
}

.edu-temas-titulo {
  font-size: 0.72rem;
  font-weight: 700;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.edu-temas-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.edu-temas-tabela th {
  text-align: left;
  padding: 0.25rem 0.4rem;
  color: #64748b;
  font-size: 0.68rem;
  text-transform: uppercase;
  border-bottom: 1px solid #1e293b;
}

.edu-temas-tabela td {
  padding: 0.25rem 0.4rem;
  color: #cbd5e1;
  border-bottom: 1px solid #0f172a;
}

.edu-tn { text-align: center; }
.edu-tok  { color: #86efac; font-weight: 600; }
.edu-terr { color: #fca5a5; font-weight: 600; }
.edu-taxa { font-weight: 700; }
.edu-taxa-boa { color: #86efac; }
.edu-taxa-med { color: #fcd34d; }
.edu-taxa-ma  { color: #fca5a5; }

/* ── Página de administração ── */

.admin-pagina {
  padding: 1.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-painel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--raio-borda);
  padding: 1.75rem 2rem;
}

.admin-titulo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cor-texto);
  margin: 0 0 1.25rem;
}

.admin-spinner {
  text-align: center;
  color: var(--cor-texto-suave);
  font-size: 0.9rem;
  padding: 2rem 0;
}

.admin-erro-bar { margin-bottom: 0.75rem; }

.admin-contagem {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--cor-texto-suave);
}

.admin-btn-reload {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--cor-texto-suave);
  font-size: 1rem;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  line-height: 1;
}

.admin-btn-reload:hover { background: #f0f6ff; color: var(--cor-primaria); }

.admin-abas {
  display: flex;
  gap: 4px;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0;
}

.admin-aba, .admin-aba-ativa {
  padding: 0.45rem 1.4rem;
  border-radius: var(--raio-borda) var(--raio-borda) 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--fonte-principal);
  margin-bottom: -2px;
}

.admin-aba       { background: transparent; color: var(--cor-texto-suave); }
.admin-aba:hover { color: var(--cor-primaria); background: #f0f6ff; }
.admin-aba-ativa { background: #fff; color: var(--cor-primaria); border-color: #e2e8f0; border-bottom-color: #fff; }

.admin-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-tabela th {
  text-align: left;
  padding: 0.4rem 0.65rem;
  color: var(--cor-texto-suave);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  background: #f8fafc;
}

.admin-tabela td {
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--cor-texto);
  vertical-align: middle;
}

.admin-tabela tr:hover td { background: #f0f6ff; }

.admin-num   { text-align: center; color: #94a3b8; font-size: 0.8rem; }
.admin-email { color: var(--cor-texto-suave); font-size: 0.82rem; }
.admin-cod   { font-family: monospace; letter-spacing: 0.05em; color: #1d4ed8; font-weight: 600; }

.admin-filtros {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.admin-filtro-texto {
  flex: 1;
  min-width: 180px;
  margin-bottom: 0;
}

.admin-filtro-sel {
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  min-width: 150px;
}

.admin-acoes {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-sel {
  padding: 0.25rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: var(--cor-texto);
  font-size: 0.8rem;
  font-family: var(--fonte-principal);
  cursor: pointer;
}

.admin-sel:focus { outline: none; border-color: var(--cor-primaria); }

.admin-btn-rem {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  line-height: 1;
}

.admin-btn-rem:hover { background: #fee2e2; }

/* Badges de tipo de utilizador */
.admin-badge {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.admin-badge-aluno  { background: #dbeafe; color: #1d4ed8; }
.admin-badge-prof   { background: #dcfce7; color: #15803d; }
.admin-badge-ee     { background: #fef9c3; color: #a16207; }
.admin-badge-form   { background: #f3e8ff; color: #7e22ce; }
.admin-badge-admin  { background: #fee2e2; color: #b91c1c; }
.admin-badge-interm { background: #e0f2fe; color: #0369a1; }
.admin-badge-master { background: #fdf4ff; color: #7e22ce; }

.admin-sub-nenhuma    { color: #94a3b8; font-size: 0.85rem; }
.admin-sub-cel        { white-space: nowrap; vertical-align: middle; }
.admin-sub-data-input {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.15rem 0.3rem;
  color: #334155;
  background: #f8fafc;
  cursor: pointer;
  width: 8.5rem;
}
.admin-sub-data-input:focus { outline: none; border-color: var(--cor-primaria); }

/* ── Fichas de trabalho ─────────────────────────────────────── */

.ficha-cabecalho {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ficha-sec-titulo {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.6rem;
}

/* Badges de estado da ficha */
.ficha-badge-pub {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: #dcfce7;
  color: #15803d;
  white-space: nowrap;
}

.ficha-badge-rasc {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #64748b;
  white-space: nowrap;
}

/* Linha com checkbox "Publicar" + botão Guardar */
.ficha-guardar-linha {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.ficha-pub-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #334155;
  cursor: pointer;
}

/* Filtros do picker de exercícios */
.ficha-picker-filtros {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.ficha-picker-sel   { width: auto; margin: 0; }
.ficha-picker-tema  { margin: 0; max-width: 14rem; }
.ficha-picker-dica  { font-size: 0.78rem; font-weight: 600; color: #d14700; white-space: nowrap; align-self: center; }

.ficha-picker-pesquisar {
  margin-bottom: 0.75rem;
}

/* Botões do picker */
.ficha-btn-add {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border: none;
  border-radius: 6px;
  background: var(--cor-primaria);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.ficha-btn-add:hover  { opacity: 0.88; }
.ficha-btn-add:disabled { opacity: 0.5; cursor: default; }

.ficha-btn-ja {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  cursor: default;
  white-space: nowrap;
}

/* Paginação do picker */
.ficha-paginacao {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ficha-pag-info {
  font-size: 0.82rem;
  color: #64748b;
}

/* ── Vista aluno — barra de progresso e ícones ────────────── */

.ficha-prog-wrap {
  margin: 0.5rem 0 0.75rem;
}

.ficha-prog-texto {
  font-size: 0.88rem;
  color: #475569;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.ficha-barra-fundo {
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.ficha-barra-fill {
  height: 100%;
  background: var(--cor-primaria);
  border-radius: 9999px;
  transition: width 0.3s ease;
  min-width: 2px;
}

.ficha-ok-icon   { color: var(--cor-sucesso); font-weight: 700; }
.ficha-pend-icon { color: #94a3b8; }

.ficha-ok-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cor-sucesso);
  white-space: nowrap;
}

.ficha-btn-resolver {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border: 1.5px solid var(--cor-primaria);
  border-radius: 6px;
  color: var(--cor-primaria);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.ficha-btn-resolver:hover {
  background: var(--cor-primaria);
  color: #fff;
}

/* ── Tabela de progresso dos alunos ─────────────────────── */
.ficha-prog-tabela {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.88rem;
}

.ficha-prog-tabela th,
.ficha-prog-tabela td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.ficha-prog-tabela th {
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
}

.ficha-prog-tabela tr:last-child td { border-bottom: none; }

.ficha-prog-cel {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ficha-barra-pequena {
  width: 80px;
  height: 6px;
  border-radius: 3px;
}

.ficha-pont-cel {
  font-weight: 700;
  color: var(--cor-primaria);
  text-align: right;
}

/* ── Tentativas (vista do aluno) ─────────────────────────── */
.ficha-tent-restantes {
  font-size: 0.73rem;
  color: #64748b;
  margin-top: 0.18rem;
}

.ficha-tent-esgotadas {
  font-size: 0.73rem;
  color: #dc2626;
  font-weight: 600;
  margin-top: 0.18rem;
}

.ficha-tent-badge-bloq {
  font-size: 0.78rem;
  font-weight: 700;
  color: #dc2626;
  white-space: nowrap;
}

/* ── Passos do aluno — histórico detalhado ────────────────── */
.passo-correcto {
  background: #f0fdf4;
  border-left: 3px solid #22c55e;
  padding: 0.25rem 0.6rem;
  margin: 0.15rem 0;
  border-radius: 0 4px 4px 0;
  font-size: 0.85rem;
  color: #166534;
}

.passo-errado {
  background: #fff1f2;
  border-left: 3px solid #fca5a5;
  padding: 0.25rem 0.6rem;
  margin: 0.15rem 0;
  border-radius: 0 4px 4px 0;
  font-size: 0.85rem;
  color: #9f1239;
}

.hist-passos-lista {
  margin: 0.4rem 0 0.6rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hist-passos-label {
  font-size: 0.78rem;
  color: #64748b;
  font-style: italic;
  margin-bottom: 0.2rem;
}

.hist-ver-passos-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  text-decoration: underline;
}

/* -- Histórico: link "Ver resolução" ---------------------------------------- */

.hist-ver-btn {
  margin-left: 0.4rem;
  font-size: 0.75rem;
  color: #6366f1;
  text-decoration: none;
  opacity: 0.7;
}
.hist-ver-btn:hover { opacity: 1; text-decoration: underline; }

/* -- Página de replay da resolução ------------------------------------------ */

.resolucao-pag {
  max-width: 700px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #fff;
}

.resolucao-back {
  background: none;
  border: none;
  color: #6366f1;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.2rem;
  text-decoration: underline;
}

.resolucao-titulo {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.resolucao-info {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.resolucao-passos {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.resolucao-passo-ok,
.resolucao-passo-err {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border-left: 4px solid transparent;
}

.resolucao-passo-ok {
  background: #f0fdf4;
  border-left-color: #22c55e;
}

.resolucao-passo-err {
  background: #fff1f2;
  border-left-color: #fca5a5;
}

.resolucao-num {
  font-size: 0.78rem;
  color: #94a3b8;
  min-width: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.resolucao-svg-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
}

.passo-svg { display: block; }
.passo-texto-raw {
  font-family: monospace;
  font-size: 0.88rem;
  color: #475569;
}
