/* Tokens de cor, espaçamento e tipografia do MetasKids */
:root {
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-2: #1a1e25;
  --surface-3: #232833;
  --borda: #262b34;
  --borda-forte: #343b47;
  --texto: #e9ecf1;
  --texto-suave: #8b93a1;
  --texto-fraco: #5f6775;
  --roxo: #8b5cf6;
  --roxo-claro: #a78bfa;
  --roxo-fundo: rgba(139, 92, 246, 0.12);
  --verde: #22c55e;
  --verde-fundo: rgba(34, 197, 94, 0.12);
  --vermelho: #f43f5e;
  --vermelho-fundo: rgba(244, 63, 94, 0.12);
  --amarelo: #f59e0b;
  --amarelo-fundo: rgba(245, 158, 11, 0.12);
  --azul: #38bdf8;
  --azul-fundo: rgba(56, 189, 248, 0.12);
  --raio: 16px;
  --raio-sm: 10px;
  --raio-pill: 999px;
  --sombra: 0 10px 30px rgba(0, 0, 0, 0.35);
  --fonte: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Reset global */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--roxo-claro);
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}

/* Números alinhados em colunas */
.num {
  font-variant-numeric: tabular-nums;
}

/* Faixa de aviso do ambiente de homologação */
.faixa-hml {
  background: var(--vermelho);
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
}

/* Barra superior */
.topo {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borda);
}

.topo-interno {
  width: 94%;
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}

.topo-marca {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--texto);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.topo-marca b {
  color: var(--roxo-claro);
  font-weight: 800;
}

.marca-icone {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--roxo);
  color: #fff;
  font-size: 1rem;
}

.topo-titulo {
  color: var(--texto-suave);
  font-weight: 600;
  padding-left: 16px;
  border-left: 1px solid var(--borda);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topo-acoes {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* Container principal */
.container {
  width: 94%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 28px 0 56px;
}

.container-estreito {
  max-width: 40rem;
}

/* Cabeçalho de seção */
.secao {
  margin-top: 32px;
}

.secao:first-child {
  margin-top: 0;
}

.secao-topo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.secao-titulo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--texto);
}

.secao-sub {
  color: var(--texto-suave);
  font-size: 0.85rem;
}

/* Saudação do topo das páginas */
.saudacao {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.saudacao h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.saudacao p {
  margin: 2px 0 0;
  color: var(--texto-suave);
}

/* Grades */
.grade {
  display: grid;
  gap: 16px;
  align-items: start;
}

.grade-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Cartões */
.card {
  background: var(--surface);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 20px;
}

.card-titulo {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-sub {
  color: var(--texto-suave);
  font-size: 0.85rem;
  margin: 0 0 16px;
}

.card-destaque {
  background: linear-gradient(135deg, #2a1d52 0%, #17131f 60%);
  border-color: #3b2c6e;
}

/* Indicadores numéricos */
.stat-rotulo {
  color: var(--texto-suave);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-valor {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.stat-valor-sm {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stat-rodape {
  color: var(--texto-suave);
  font-size: 0.85rem;
  margin-top: 6px;
}

.txt-verde {
  color: var(--verde);
}

.txt-vermelho {
  color: var(--vermelho);
}

.txt-amarelo {
  color: var(--amarelo);
}

.txt-suave {
  color: var(--texto-suave);
}

/* Barra de progresso */
.progresso {
  height: 8px;
  background: var(--surface-3);
  border-radius: var(--raio-pill);
  overflow: hidden;
  margin-top: 14px;
}

.progresso-barra {
  height: 100%;
  background: linear-gradient(90deg, var(--roxo) 0%, var(--roxo-claro) 100%);
  border-radius: var(--raio-pill);
  transition: width 0.6s ease;
}

.progresso-barra.completa {
  background: linear-gradient(90deg, #16a34a 0%, var(--verde) 100%);
}

/* Linha de informação chave/valor */
.linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--borda);
  font-size: 0.9rem;
}

.linha:last-child {
  border-bottom: none;
}

.linha span {
  color: var(--texto-suave);
}

.linha strong {
  font-variant-numeric: tabular-nums;
}

.linha-total {
  font-size: 1.05rem;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--raio-sm);
  padding: 11px 18px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primario {
  background: var(--roxo);
  color: #fff;
}

.btn-primario:hover:not(:disabled) {
  background: #7c4dee;
}

.btn-secundario {
  background: var(--surface-3);
  color: var(--texto);
  border-color: var(--borda-forte);
}

.btn-secundario:hover:not(:disabled) {
  background: #2b3140;
}

.btn-fantasma {
  background: transparent;
  color: var(--texto-suave);
  border-color: var(--borda);
}

.btn-fantasma:hover {
  color: var(--texto);
  border-color: var(--borda-forte);
}

.btn-sucesso {
  background: var(--verde);
  color: #06210f;
}

.btn-perigo {
  background: var(--vermelho);
  color: #fff;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.8rem;
}

.btn-bloco {
  width: 100%;
}

.grupo-botoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Formulários */
.campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.campo label,
.rotulo {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--texto-suave);
}

.campo-ajuda {
  font-size: 0.8rem;
  color: var(--texto-fraco);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  background: var(--surface-2);
  color: var(--texto);
  border: 1px solid var(--borda-forte);
  border-radius: var(--raio-sm);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--roxo);
  box-shadow: 0 0 0 3px var(--roxo-fundo);
}

input[readonly] {
  color: var(--roxo-claro);
  background: var(--roxo-fundo);
}

input[type="date"] {
  color-scheme: dark;
}

input[type="file"] {
  padding: 8px;
  font-size: 0.85rem;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.form-linha {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.form-linha > * {
  flex: 1 1 10rem;
}

.form-linha > .btn {
  flex: 0 0 auto;
}

.form-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-inline input,
.form-inline select {
  padding: 8px 10px;
  font-size: 0.85rem;
}

.campo-senha {
  position: relative;
}

.campo-senha input {
  padding-right: 46px;
}

.olho {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--texto-suave);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
}

.prefixo-wrap {
  display: flex;
}

.prefixo {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--surface-3);
  border: 1px solid var(--borda-forte);
  border-right: none;
  border-radius: var(--raio-sm) 0 0 var(--raio-sm);
  color: var(--texto-suave);
  font-size: 0.85rem;
  font-weight: 700;
}

.prefixo-wrap input {
  border-radius: 0 var(--raio-sm) var(--raio-sm) 0;
}

/* Mensagens de retorno */
.msg {
  border-radius: var(--raio-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: opacity 0.4s ease;
}

.msg-sucesso {
  background: var(--verde-fundo);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.msg-erro {
  background: var(--vermelho-fundo);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.msg-aviso {
  background: var(--amarelo-fundo);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

/* Etiquetas */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--raio-pill);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-verde {
  background: var(--verde-fundo);
  color: var(--verde);
}

.badge-vermelho {
  background: var(--vermelho-fundo);
  color: var(--vermelho);
}

.badge-amarelo {
  background: var(--amarelo-fundo);
  color: var(--amarelo);
}

.badge-roxo {
  background: var(--roxo-fundo);
  color: var(--roxo-claro);
}

.badge-cinza {
  background: var(--surface-3);
  color: var(--texto-suave);
}

/* Avatares */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  border: 2px solid var(--borda-forte);
  flex-shrink: 0;
}

.avatar-sm {
  width: 30px;
  height: 30px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
}

.pessoa {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pessoa strong {
  display: block;
}

.pessoa small {
  display: block;
  color: var(--texto-suave);
}

/* Lista de registros (feed) */
.lista {
  display: flex;
  flex-direction: column;
}

.lista-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--borda);
}

.lista-item:last-child {
  border-bottom: none;
}

.lista-data {
  flex-shrink: 0;
  width: 3.2rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--texto-suave);
  line-height: 1.2;
}

.lista-data small {
  display: block;
  font-weight: 500;
  color: var(--texto-fraco);
}

.lista-info {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
}

.lista-info strong {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.lista-info small {
  display: block;
  color: var(--texto-suave);
  font-size: 0.8rem;
}

/* Notas (estrelas) */
.nota {
  flex-shrink: 0;
  min-width: 3rem;
  text-align: center;
  padding: 4px 10px;
  border-radius: var(--raio-pill);
  font-weight: 800;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.nota-pos {
  background: var(--verde-fundo);
  color: var(--verde);
}

.nota-neg {
  background: var(--vermelho-fundo);
  color: var(--vermelho);
}

.nota-zero {
  background: var(--surface-3);
  color: var(--texto-suave);
}

.nota-pend {
  background: var(--amarelo-fundo);
  color: var(--amarelo);
}

/* Atalhos do painel */
.atalhos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 12px;
}

.atalho {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  color: var(--texto);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.atalho:hover {
  border-color: var(--borda-forte);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.atalho-icone {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 1.15rem;
  background: var(--surface-3);
}

.atalho-roxo .atalho-icone {
  background: var(--roxo-fundo);
}

.atalho-verde .atalho-icone {
  background: var(--verde-fundo);
}

.atalho-vermelho .atalho-icone {
  background: var(--vermelho-fundo);
}

.atalho-amarelo .atalho-icone {
  background: var(--amarelo-fundo);
}

.atalho-azul .atalho-icone {
  background: var(--azul-fundo);
}

.atalho small {
  color: var(--texto-suave);
  font-weight: 500;
  font-size: 0.75rem;
  margin-top: -6px;
}

/* Cartão de filho na visão do admin */
.filho-card-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.filho-valores {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.filho-meta {
  color: var(--texto-suave);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* Bloco de validação de tarefas */
.valida-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.valida-item {
  background: var(--surface-2);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 16px;
}

.valida-item.urgente {
  border-color: rgba(245, 158, 11, 0.45);
}

.valida-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.valida-desc {
  font-weight: 600;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}

.valida-autor {
  color: var(--texto-fraco);
  font-size: 0.8rem;
}

.escala {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.escala-grupo {
  display: flex;
  gap: 6px;
}

.escala-sep {
  width: 1px;
  background: var(--borda-forte);
  margin: 0 4px;
}

.escala label {
  cursor: pointer;
}

.escala input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.escala label span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 38px;
  padding: 0 8px;
  border-radius: var(--raio-sm);
  border: 1px solid var(--borda-forte);
  background: var(--surface);
  font-weight: 800;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.escala .pos input:checked + span {
  background: var(--verde);
  border-color: var(--verde);
  color: #06210f;
}

.escala .zero input:checked + span {
  background: var(--texto-suave);
  border-color: var(--texto-suave);
  color: var(--bg);
}

.escala .neg input:checked + span {
  background: var(--vermelho);
  border-color: var(--vermelho);
  color: #fff;
}

.escala .pos span {
  color: var(--verde);
}

.escala .neg span {
  color: var(--vermelho);
}

.valida-item textarea {
  display: none;
  margin-top: 10px;
  min-height: 60px;
}

.valida-barra {
  position: sticky;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px;
  background: rgba(20, 23, 28, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--borda-forte);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
}

/* Desafios */
.desafio {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--raio);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(245, 158, 11, 0.03) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.desafio + .desafio {
  margin-top: 10px;
}

.desafio-icone {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.desafio-info {
  flex: 1;
  min-width: 0;
}

.desafio-info strong {
  display: block;
  overflow-wrap: anywhere;
}

.desafio-info small {
  color: var(--texto-suave);
}

.desafio-pontos {
  font-weight: 800;
  color: var(--amarelo);
  white-space: nowrap;
}

/* Novidades desde o último acesso */
.novidades {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.10) 0%, var(--surface) 70%);
  margin-bottom: 20px;
}

.novidades-resumo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
}

/* Projeção do mês */
.projecao {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--borda-forte);
  font-size: 0.88rem;
  color: var(--texto-suave);
}

.projecao strong {
  color: var(--texto);
  font-variant-numeric: tabular-nums;
}

.projecao p {
  margin: 4px 0;
}

/* Utilitários de espaçamento e layout */
.espaco-topo {
  margin-top: 12px;
}

.secao-topo-compacto {
  margin-bottom: 0;
}

.projecao-simples {
  border-top: none;
  margin-top: 4px;
  padding-top: 0;
}

.form-contents {
  display: contents;
}

/* Estado vazio */
.vazio {
  text-align: center;
  color: var(--texto-suave);
  padding: 28px 12px;
  font-size: 0.9rem;
}

/* Tabelas */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.tabela th {
  text-align: left;
  color: var(--texto-suave);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--borda-forte);
  white-space: nowrap;
}

.tabela td {
  padding: 12px;
  border-bottom: 1px solid var(--borda);
  vertical-align: middle;
}

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

.tabela .col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tabela .acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Modais */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal.aberto {
  display: flex;
}

.modal-caixa {
  width: 100%;
  max-width: 28rem;
  background: var(--surface);
  border: 1px solid var(--borda-forte);
  border-radius: var(--raio);
  padding: 24px;
  box-shadow: var(--sombra);
}

.modal-caixa h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.modal-caixa p {
  color: var(--texto-suave);
  margin: 0 0 16px;
  font-size: 0.9rem;
}

.modal-valor {
  font-size: 2rem;
  font-weight: 800;
  color: var(--texto);
  font-variant-numeric: tabular-nums;
}

.modal-acoes {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.foto-grande {
  width: 100%;
  border-radius: var(--raio-sm);
  margin-bottom: 12px;
}

.camera-video {
  width: 100%;
  border-radius: var(--raio-sm);
  background: #000;
  margin-bottom: 12px;
}

/* Perfil do filho com troca de foto */
.perfil-foto {
  position: relative;
  cursor: pointer;
}

.perfil-acoes {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.input-oculto {
  display: none;
}

/* Overlay de carregamento ao enviar foto */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(11, 13, 16, 0.88);
  color: var(--texto-suave);
  font-weight: 600;
}

#loading-overlay.visible {
  display: flex;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--surface-3);
  border-top-color: var(--roxo);
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
}

@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

/* Telas centralizadas (início, login e acesso negado) */
.tela-centro {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(139, 92, 246, 0.18) 0%, transparent 70%), var(--bg);
}

.caixa-centro {
  width: 100%;
  max-width: 24rem;
  text-align: center;
}

.marca-grande {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--roxo);
  color: #fff;
  font-size: 2rem;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.35);
}

.caixa-centro h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.caixa-centro h1 b {
  color: var(--roxo-claro);
}

.caixa-centro .lema {
  color: var(--texto-suave);
  margin: 6px 0 28px;
}

.caixa-centro form {
  text-align: left;
}

.alerta-pendente {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: var(--raio-pill);
  background: var(--amarelo-fundo);
  color: var(--amarelo);
  font-size: 0.8rem;
  font-weight: 700;
}

.ponto-pulso {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amarelo);
  animation: pulso 1.4s ease-in-out infinite;
}

@keyframes pulso {
  50% {
    opacity: 0.25;
  }
}

.rodape {
  margin-top: 40px;
  color: var(--texto-fraco);
  font-size: 0.8rem;
  text-align: center;
}

.rodape img {
  height: 26px;
  opacity: 0.7;
  display: block;
  margin: 0 auto 6px;
}

.barra-tempo {
  height: 4px;
  background: var(--surface-3);
  border-radius: var(--raio-pill);
  overflow: hidden;
  margin-top: 20px;
}

.barra-tempo div {
  height: 100%;
  width: 0;
  background: var(--vermelho);
  animation: encher 3s linear forwards;
}

@keyframes encher {
  to {
    width: 100%;
  }
}

/* Ranking e gráfico */
.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--borda);
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-pos {
  width: 28px;
  font-weight: 800;
  color: var(--texto-suave);
  text-align: center;
}

.ranking-item .badge {
  margin-left: auto;
}

.ranking-item.primeiro .ranking-pos {
  color: var(--amarelo);
}

.grafico-caixa {
  position: relative;
  height: 260px;
}

details.historico summary {
  cursor: pointer;
  color: var(--roxo-claro);
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 14px;
  list-style: none;
}

details.historico summary::-webkit-details-marker {
  display: none;
}

details.historico[open] summary {
  margin-bottom: 6px;
}

/* Seletor de escudos no cadastro de filho */
.escudos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.escudos label {
  cursor: pointer;
}

.escudos input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.escudos img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--borda-forte);
  transition: border-color 0.12s ease;
}

.escudos input:checked + img {
  border-color: var(--roxo);
  box-shadow: 0 0 0 3px var(--roxo-fundo);
}

/* Tarefas no formulário de registro */
.tarefa-grupo {
  position: relative;
  margin-bottom: 12px;
}

.tarefa-grupo .btn-remover {
  position: absolute;
  right: 6px;
  top: 6px;
}

.tarefa-grupo input {
  padding-right: 48px;
}

.contador-limite {
  font-size: 0.8rem;
  color: var(--texto-suave);
  font-variant-numeric: tabular-nums;
}

/* Breakpoint notebook 1366px (escala 125%/150% do Windows) */
@media (max-width: 1366px) {
  .container {
    padding-top: 22px;
  }

  .stat-valor {
    font-size: 1.75rem;
  }
}

/* Breakpoint celular 768px */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .topo-titulo {
    display: none;
  }

  .grade-2 {
    grid-template-columns: 1fr;
  }

  .saudacao h1 {
    font-size: 1.3rem;
  }

  .stat-valor {
    font-size: 1.6rem;
  }

  .card {
    padding: 16px;
  }

  .atalhos {
    grid-template-columns: repeat(2, 1fr);
  }

  .escala-sep {
    display: none;
  }

  .escala label span {
    min-width: 38px;
  }

  .form-linha > * {
    flex-basis: 100%;
  }

  .modal-acoes {
    flex-direction: column-reverse;
  }

  .modal-acoes .btn {
    width: 100%;
  }

  .form-inline {
    flex-wrap: wrap;
  }
}
