/* ===================================================================
   SEMED Gov. Edison Lobão (MA) — Plataforma de Planejamento de Robótica
   Identidade institucional: azul SEMED + verde + amarelo
   =================================================================== */

:root {
  /* Cores institucionais SEMED */
  --semed-azul: #1E3A8A;       /* RoboFeed navy-royal (era azul SEMED #003B71) */
  --semed-azul-claro: #2563EB; /* RoboFeed azul primário (hover/destaque) */
  --semed-amarelo: #FBBF24;    /* RoboFeed faísca (CTA principal) */
  --semed-verde: #10B981;      /* RoboFeed sucesso */
  --semed-vermelho: #EF4444;   /* RoboFeed alerta */

  /* Neutros */
  --branco: #FFFFFF;
  --cinza-fundo: #F4F6F9;
  --cinza-borda: #DDE3EC;
  --cinza-texto: #4A5568;
  --cinza-texto-claro: #718096;
  --cinza-escuro: #1A202C;

  /* Status */
  --status-rascunho: #B45309;
  --status-rascunho-bg: #FEF3C7;
  --status-enviado: #1D4ED8;
  --status-enviado-bg: #DBEAFE;
  --status-aprovado: #166534;
  --status-aprovado-bg: #DCFCE7;
  --status-ressalva: #B45309;
  --status-ressalva-bg: #FEF3C7;
  --status-devolvido: #991B1B;
  --status-devolvido-bg: #FEE2E2;

  /* Tipografia */
  --fonte-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fonte-titulo: 'Space Grotesk', 'Inter', sans-serif;

  /* ===== Identidade RoboFeed (06/07/2026) — aliases novos ===== */
  --rf-azul: #2563EB;
  --rf-navy: #0F1D35;
  --rf-navy-2: #16294A;
  --rf-faisca: #FBBF24;
  --rf-verde: #10B981;
  --rf-fundo: #F8FAFC;

  /* Sombras */
  --sombra-card: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --sombra-elevada: 0 10px 25px rgba(15, 29, 53, 0.15);

  /* Bordas */
  --raio: 8px;
  --raio-grande: 12px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--fonte-base);
  color: var(--cinza-escuro);
  background: var(--cinza-fundo);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--semed-azul); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ====== HEADER INSTITUCIONAL ====== */
.semed-header {
  background: var(--semed-azul);
  color: var(--branco);
  padding: 0;
  border-bottom: 4px solid var(--semed-amarelo);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.semed-header-faixa {
  background: var(--semed-amarelo);
  color: var(--semed-azul);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  padding: 4px 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.semed-header-conteudo {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.semed-logo-bloco {
  display: flex;
  align-items: center;
  gap: 16px;
}
.semed-brasao {
  width: 56px;
  height: 56px;
  background: var(--branco);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--semed-amarelo);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.1);
  flex-shrink: 0;
  padding: 6px;
  transition: transform 0.2s ease;
}
.semed-brasao:hover { transform: scale(1.04); }
.semed-brasao svg {
  width: 100%;
  height: 100%;
  display: block;
}
/* Variante com o avatar do RoboFeed: o robô já tem fundo navy redondo próprio,
   então removemos o selo branco/borda/padding pra ele preencher limpo. */
.semed-brasao--robo {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.semed-brasao--robo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}
.semed-logo-texto h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.semed-logo-texto p {
  font-size: 0.78rem;
  opacity: 0.9;
  margin-top: 2px;
}
.semed-usuario-bloco {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}
.semed-usuario-avatar {
  width: 40px;
  height: 40px;
  background: var(--semed-amarelo);
  color: var(--semed-azul);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.semed-usuario-info {
  text-align: right;
  line-height: 1.2;
}
.semed-usuario-info strong { display: block; font-size: 0.92rem; }
.semed-usuario-info small { font-size: 0.75rem; opacity: 0.85; }

.semed-nav {
  background: var(--semed-azul-claro);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.semed-nav-conteudo {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.semed-nav a {
  color: var(--branco);
  padding: 12px 20px;
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.semed-nav a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.semed-nav a.ativo {
  background: rgba(255,255,255,0.12);
  border-bottom-color: var(--semed-amarelo);
}

/* ====== CONTEÚDO ====== */
main { max-width: 1280px; margin: 0 auto; padding: 32px 24px; }
.pagina-titulo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--semed-azul);
  margin-bottom: 4px;
}
.pagina-subtitulo {
  color: var(--cinza-texto);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* ====== CARD ====== */
.card {
  background: var(--branco);
  border-radius: var(--raio-grande);
  padding: 24px;
  box-shadow: var(--sombra-card);
  margin-bottom: 16px;
  border: 1px solid var(--cinza-borda);
}
.card-titulo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--semed-azul);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--cinza-borda);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-titulo .num {
  background: var(--semed-azul);
  color: var(--branco);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ====== FORMULÁRIO ====== */
.campo { margin-bottom: 16px; }
.campo label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--cinza-escuro);
  margin-bottom: 6px;
}
.campo .obrigatorio { color: var(--semed-vermelho); }
.campo input[type="text"],
.campo input[type="email"],
.campo input[type="password"],
.campo input[type="date"],
.campo input[type="number"],
.campo select,
.campo textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--cinza-borda);
  border-radius: var(--raio);
  font-family: var(--fonte-base);
  font-size: 0.95rem;
  background: var(--branco);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--semed-azul);
  box-shadow: 0 0 0 3px rgba(0, 59, 113, 0.12);
}
.campo textarea { min-height: 90px; resize: vertical; }
.campo small { display: block; color: var(--cinza-texto-claro); margin-top: 4px; font-size: 0.8rem; }

.linha-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.linha-campos-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 720px) {
  .linha-campos, .linha-campos-3 { grid-template-columns: 1fr; }
}

/* Checkboxes em grade */
.checks-grade {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px 16px;
}
.checks-grade label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.checks-grade label:hover { background: var(--cinza-fundo); }
.checks-grade input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--semed-azul);
  cursor: pointer;
}

.bloco-eixos {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px;
  background: var(--cinza-fundo);
  border-radius: var(--raio);
  margin-bottom: 12px;
}
.bloco-eixos label { font-weight: 600; }

/* Tabela com checkbox + descrição */
.tabela-recursos {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.tabela-recursos th {
  background: var(--cinza-fundo);
  text-align: left;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--semed-azul);
  border-bottom: 2px solid var(--cinza-borda);
}
.tabela-recursos td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--cinza-borda);
  font-size: 0.9rem;
}
.tabela-recursos tr.subgrupo td {
  background: linear-gradient(to right, var(--semed-azul) 4px, var(--cinza-fundo) 4px);
  font-weight: 700;
  color: var(--semed-azul);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-left: 16px;
}
.tabela-recursos input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--semed-azul); }
.tabela-recursos input[type="number"] { width: 70px; padding: 6px; }

/* ====== BOTÕES ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--raio);
  font-family: var(--fonte-base);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primario {
  background: var(--semed-azul);
  color: var(--branco);
}
.btn-primario:hover {
  background: var(--semed-azul-claro);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 59, 113, 0.25);
}
.btn-secundario {
  background: var(--branco);
  color: var(--semed-azul);
  border: 1.5px solid var(--semed-azul);
}
.btn-secundario:hover { background: var(--cinza-fundo); text-decoration: none; }
.btn-amarelo {
  background: var(--semed-amarelo);
  color: var(--semed-azul);
  font-weight: 700;
}
.btn-amarelo:hover { background: #FFB300; text-decoration: none; }
.btn-verde {
  background: var(--semed-verde);
  color: var(--branco);
}
.btn-verde:hover { background: #1B5E20; text-decoration: none; }
.btn-vermelho {
  background: var(--semed-vermelho);
  color: var(--branco);
}
.btn-vermelho:hover { background: #B71C1C; text-decoration: none; }
.btn-google {
  background: var(--branco);
  color: #3C4043;
  border: 1.5px solid #DADCE0;
  font-weight: 500;
}
.btn-google:hover { background: #F8F9FA; text-decoration: none; }
.btn-google::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFC107' d='M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z'/%3E%3Cpath fill='%23FF3D00' d='M6.306 14.691l6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z'/%3E%3Cpath fill='%234CAF50' d='M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238A11.91 11.91 0 0 1 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z'/%3E%3Cpath fill='%231976D2' d='M43.611 20.083H42V20H24v8h11.303a12.04 12.04 0 0 1-4.087 5.571l.003-.002 6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z'/%3E%3C/svg%3E");
  background-size: contain;
}
.btn-bloco { width: 100%; }
.btn-pequeno { padding: 6px 12px; font-size: 0.82rem; }
.btn-grupo { display: flex; gap: 8px; flex-wrap: wrap; }

/* ====== STATUS BADGE ====== */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status::before { content: '●'; font-size: 0.6rem; }
.status-rascunho { background: var(--status-rascunho-bg); color: var(--status-rascunho); }
.status-enviado { background: var(--status-enviado-bg); color: var(--status-enviado); }
.status-aprovado { background: var(--status-aprovado-bg); color: var(--status-aprovado); }
.status-ressalva { background: var(--status-ressalva-bg); color: var(--status-ressalva); }
.status-devolvido { background: var(--status-devolvido-bg); color: var(--status-devolvido); }

/* ====== TABELAS ====== */
.tabela {
  width: 100%;
  background: var(--branco);
  border-radius: var(--raio-grande);
  overflow: hidden;
  border-collapse: collapse;
  box-shadow: var(--sombra-card);
}
.tabela thead { background: var(--semed-azul); color: var(--branco); }
.tabela th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.tabela td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--cinza-borda);
  font-size: 0.92rem;
}
.tabela tbody tr:hover { background: var(--cinza-fundo); }
.tabela tbody tr:last-child td { border-bottom: none; }

/* ====== ALERTS ====== */
.alerta {
  padding: 12px 16px;
  border-radius: var(--raio);
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  border-left: 4px solid;
}
.alerta-info { background: #E0F2FE; border-color: #0EA5E9; color: #075985; }
.alerta-sucesso { background: #DCFCE7; border-color: var(--semed-verde); color: #166534; }
.alerta-aviso { background: #FEF3C7; border-color: var(--semed-amarelo); color: #92400E; }
.alerta-erro { background: #FEE2E2; border-color: var(--semed-vermelho); color: #991B1B; }

/* ====== FOOTER ====== */
.semed-footer {
  background: var(--semed-azul);
  color: var(--branco);
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 48px;
  border-top: 4px solid var(--semed-amarelo);
}
.semed-footer p { opacity: 0.85; }
.semed-footer strong { color: var(--semed-amarelo); }

/* ====== TELAS DE LOGIN/AUTENTICAÇÃO ====== */
.tela-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(0, 59, 113, 0.92), rgba(30, 91, 168, 0.85)),
    radial-gradient(circle at 20% 30%, rgba(255, 193, 7, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(46, 125, 50, 0.15), transparent 50%);
  background-color: var(--semed-azul);
}
.caixa-auth {
  background: var(--branco);
  padding: 40px 32px;
  border-radius: var(--raio-grande);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--sombra-elevada);
  border-top: 5px solid var(--semed-amarelo);
}
.caixa-auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.caixa-auth-brasao {
  width: 84px;
  height: 84px;
  background: var(--semed-azul);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 4px solid var(--semed-amarelo);
  color: var(--branco);
  font-weight: 800;
  font-size: 1.2rem;
  text-align: center;
  line-height: 1;
}
.caixa-auth h1 {
  font-size: 1.4rem;
  color: var(--semed-azul);
  margin-bottom: 4px;
}
.caixa-auth-subtitulo {
  color: var(--cinza-texto);
  font-size: 0.88rem;
}
.divisor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--cinza-texto-claro);
  font-size: 0.82rem;
}
.divisor::before, .divisor::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cinza-borda);
}
.link-rodape {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
}

/* ====== UTILITÁRIOS ====== */
.flex-entre { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mt-12 { margin-top: 12px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.muted { color: var(--cinza-texto-claro); }
.bold { font-weight: 700; }

/* ====== BARRA DE AÇÕES STICKY (FORMULÁRIO) ====== */
.barra-acoes {
  position: sticky;
  bottom: 0;
  background: var(--branco);
  border-top: 1px solid var(--cinza-borda);
  padding: 14px 24px;
  margin: 24px -24px -32px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 10;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
}
@media (max-width: 720px) {
  .barra-acoes { flex-direction: column; }
  .barra-acoes .btn-grupo { width: 100%; }
  .barra-acoes .btn { flex: 1; }
}

/* ====== CARDS DE PLANO (PAINEL) ====== */
.cards-planos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.card-plano {
  background: var(--branco);
  border-radius: var(--raio-grande);
  padding: 20px;
  border: 1px solid var(--cinza-borda);
  box-shadow: var(--sombra-card);
  border-left: 4px solid var(--semed-azul);
  transition: transform 0.18s, box-shadow 0.18s;
}
.card-plano:hover { transform: translateY(-2px); box-shadow: var(--sombra-elevada); }
.card-plano-semana {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--semed-azul);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.card-plano-titulo {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 8px 0 4px;
  color: var(--cinza-escuro);
}
.card-plano-meta {
  font-size: 0.85rem;
  color: var(--cinza-texto);
  margin-bottom: 12px;
}
.card-plano-rodape {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--cinza-borda);
}

/* ====== KPI CARDS (ADMIN) ====== */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--branco);
  border-radius: var(--raio-grande);
  padding: 20px;
  box-shadow: var(--sombra-card);
  border-top: 4px solid var(--semed-azul);
}
.kpi.kpi-amarelo { border-top-color: var(--semed-amarelo); }
.kpi.kpi-verde { border-top-color: var(--semed-verde); }
.kpi.kpi-vermelho { border-top-color: var(--semed-vermelho); }
.kpi-rotulo {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cinza-texto-claro);
  font-weight: 600;
}
.kpi-valor {
  font-size: 2rem;
  font-weight: 800;
  color: var(--semed-azul);
  margin-top: 4px;
  line-height: 1;
}
.kpi-detalhe {
  font-size: 0.82rem;
  color: var(--cinza-texto);
  margin-top: 8px;
}


/* ============================================================
   MOBILE FOUNDATION — adaptação responsiva (4 breakpoints)
   ============================================================
   Estratégia: telas pequenas têm padding/fontes/spacings menores,
   header SEMED stack vertical, nav vira scroll horizontal compacto,
   inputs ≥16px pra evitar autozoom no iOS, botões ≥44px pra touch,
   barra de ações vira sticky no rodapé.
   ============================================================ */

/* iOS anti-autozoom — TODO input/textarea ≥ 16px em tablet/mobile */
@media (max-width: 768px) {
  .campo input,
  .campo select,
  .campo textarea,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="url"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ============================================================
   TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  main { padding: 20px 16px; }
  .semed-header-conteudo { padding: 14px 16px; gap: 14px; }
  .semed-nav-conteudo { padding: 0 16px; }
  .pagina-titulo { font-size: 1.4rem; }
  .semed-logo-texto h1 { font-size: 0.98rem; }
}

/* ============================================================
   MOBILE (≤ 640px) — celular padrão
   ============================================================ */
@media (max-width: 640px) {
  html { font-size: 15px; }
  body { line-height: 1.45; }
  main { padding: 14px 10px; }

  /* HEADER — stack vertical */
  .semed-header-faixa {
    font-size: 0.62rem;
    padding: 4px 6px;
    line-height: 1.3;
    letter-spacing: 0.3px;
  }
  .semed-header-conteudo {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 10px 8px;
    gap: 10px;
  }
  .semed-logo-bloco {
    justify-content: center;
    gap: 10px;
  }
  .semed-brasao {
    width: 42px;
    height: 42px;
    font-size: 0.78rem;
    border-width: 2px;
    flex-shrink: 0;
  }
  .semed-logo-texto h1 {
    font-size: 0.88rem;
    line-height: 1.15;
  }
  .semed-logo-texto p { font-size: 0.68rem; margin-top: 1px; }

  .semed-usuario-bloco {
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 8px;
    gap: 8px;
  }
  .semed-usuario-avatar { width: 34px; height: 34px; font-size: 0.78rem; }
  .semed-usuario-info { font-size: 0.75rem; }
  .semed-usuario-info strong { font-size: 0.8rem; }
  .semed-usuario-info small { font-size: 0.66rem; }

  /* NAV — scroll horizontal compacto */
  .semed-nav-conteudo {
    padding: 0 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .semed-nav-conteudo::-webkit-scrollbar { display: none; }
  .semed-nav a {
    padding: 10px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-bottom-width: 2px;
  }
  .semed-nav a[style*="margin-left:auto"],
  .semed-nav a[href*="logout"] { margin-left: 0 !important; }

  /* PÁGINA */
  .pagina-titulo { font-size: 1.2rem; line-height: 1.25; }
  .pagina-subtitulo { font-size: 0.82rem; margin-bottom: 14px; }
  .flex-entre {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
  }

  /* CARD — padding menor */
  .card {
    padding: 14px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
  }
  .card-titulo {
    font-size: 0.98rem;
    margin-bottom: 10px;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .card-titulo .num {
    width: 24px;
    height: 24px;
    font-size: 0.76rem;
  }
  .card-titulo small { font-size: 0.72rem !important; }

  /* CAMPO */
  .campo { margin-bottom: 12px; }
  .campo label { font-size: 0.84rem; }
  .campo textarea { min-height: 80px; }

  /* BOTÕES — touch target ≥44px */
  .btn,
  button.btn,
  a.btn {
    min-height: 44px;
    padding: 11px 14px;
    font-size: 0.9rem;
    line-height: 1.2;
  }
  .btn.btn-pequeno {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.82rem;
  }
  .btn-grupo {
    flex-wrap: wrap;
    gap: 8px;
  }
  .btn-grupo .btn { flex: 1 1 auto; }

  /* BARRA DE AÇÕES — sticky no rodapé do mobile */
  .barra-acoes {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.97);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 10px 12px !important;
    margin: 12px -10px -14px;
    border-top: 1px solid var(--cinza-borda);
    z-index: 50;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
  }

  /* FOOTER */
  .semed-footer {
    padding: 14px 12px;
    font-size: 0.72rem;
  }
  .semed-footer p { margin: 2px 0; }

  /* HABILIDADES BNCC — grid quebra em vertical */
  .hab-item {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .hab-item input[type="text"] {
    text-align: left !important;
    padding: 10px !important;
  }

  /* CAPA DA AULA — grid 220px 1fr vira coluna única */
  .card > div[style*="grid-template-columns: 220px"],
  .card > div[style*="grid-template-columns:220px"] {
    display: block !important;
  }

  /* GRID DE RECURSOS — cards mais compactos */
  .rec-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .rec-card { padding: 8px 10px; }
  .rec-icone { width: 48px !important; height: 48px !important; }
  .rec-nome { font-size: 0.85rem; }

  /* SOFTWARES — 2 colunas em mobile */
  .soft-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
  .soft-card { padding: 10px 8px; }
  .soft-nome { font-size: 0.78rem; }

  /* CATEGORIA BLOCO (Recursos) — padding interno menor */
  .rec-categoria-bloco {
    padding: 10px 12px 12px !important;
    margin: 12px 0 !important;
  }

  /* TABS Visual ⇄ Código (Fluxograma/Blocos) */
  .aba { padding: 8px 10px; font-size: 0.82rem; }

  /* ALERTAS */
  .alerta { padding: 12px; font-size: 0.85rem; }
}

/* ============================================================
   MOBILE SMALL (≤ 380px) — iPhone SE 1ª/2ª geração
   ============================================================ */
@media (max-width: 380px) {
  html { font-size: 14px; }
  main { padding: 12px 8px; }
  .semed-logo-texto h1 { font-size: 0.8rem; }
  .semed-logo-texto p { font-size: 0.62rem; }
  .card { padding: 12px 10px; }
  .card-titulo { font-size: 0.92rem; }
  .pagina-titulo { font-size: 1.1rem; }
  .semed-nav a { padding: 9px 10px; font-size: 0.74rem; }

  /* SOFTWARES — vira 1 coluna em tela super pequena */
  .soft-grid { grid-template-columns: 1fr !important; }
}


/* ============================================================
   BOTTOM NAVIGATION — estilo app nativo (só mobile)
   ============================================================ */
.bottom-nav {
  display: none; /* só aparece em mobile */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.98);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  padding: 6px 4px max(6px, env(safe-area-inset-bottom));
  z-index: 1000;
  justify-content: space-around;
  align-items: stretch;
}
.bottom-nav .bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  color: var(--cinza-texto);
  font-size: 0.66rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
  min-width: 0; /* permite text-overflow */
}
.bottom-nav .bn-item:hover { text-decoration: none; }
.bottom-nav .bn-item .bn-icone {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.bottom-nav .bn-item .bn-label {
  font-size: 0.65rem;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.bottom-nav .bn-item:active .bn-icone { transform: scale(0.85); }
.bottom-nav .bn-item.ativo {
  color: var(--semed-azul);
  background: linear-gradient(135deg, rgba(0,59,113,0.08), rgba(255,193,7,0.08));
}
.bottom-nav .bn-item.ativo .bn-icone { transform: scale(1.1); }
.bottom-nav .bn-item.ativo .bn-label { font-weight: 700; }


/* ============================================================
   POLIMENTO VISUAL MOBILE — só aparece em ≤ 640px
   ============================================================ */
@media (max-width: 640px) {
  /* Bottom nav ATIVA — esconde nav original e adiciona padding no rodapé */
  .bottom-nav { display: flex; }
  .semed-nav { display: none; }
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }

  /* Reposiciona barra-acoes ACIMA do bottom-nav */
  .barra-acoes {
    bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  }

  /* HEADER mais clean com gradient sutil */
  .semed-header {
    background: linear-gradient(180deg, #003B71 0%, #0A4787 100%);
  }
  .semed-brasao {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }

  /* CARDS — sombra mais suave + transição no toque */
  .card {
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.15s ease;
  }
  .card:active { transform: scale(0.995); }

  /* BOTÕES — microinterações no toque */
  .btn,
  button.btn,
  a.btn {
    transition: transform 0.1s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .btn:active,
  button.btn:active,
  a.btn:active {
    transform: scale(0.96);
  }

  /* INPUTS — bordas mais arredondadas, focus mais elegante */
  .campo input,
  .campo select,
  .campo textarea {
    border-radius: 10px;
    border-color: #E2E8F0;
    transition: all 0.2s ease;
  }
  .campo input:focus,
  .campo select:focus,
  .campo textarea:focus {
    border-color: var(--semed-azul);
    box-shadow: 0 0 0 4px rgba(0,59,113,0.1);
  }

  /* REC-CARD (componentes) — versão mobile horizontal mais "appfeed" */
  .rec-card {
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
  }
  .rec-card:active { transform: scale(0.98); }
  .rec-card.sel {
    box-shadow: 0 2px 8px rgba(37,99,235,0.18);
  }

  /* SOFT-CARD (softwares) */
  .soft-card {
    border-radius: 12px;
    transition: all 0.2s ease;
  }
  .soft-card:active { transform: scale(0.95); }

  /* PÁGINA — animação fade in suave ao carregar */
  main {
    animation: fadeInUp 0.35s ease-out;
  }
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ALERTAS — bordas mais arredondadas */
  .alerta {
    border-radius: 12px;
    border-left-width: 4px;
  }

  /* FOOTER — esconder em mobile (bottom nav substitui informação) */
  .semed-footer {
    display: none;
  }

  /* HABILIDADES BNCC — badge do código + textarea melhor distribuídos */
  .hab-item {
    padding: 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  }
  .hab-item input[type="text"][name="hab_codigo[]"] {
    border-radius: 8px !important;
    height: 40px;
  }

  /* CARD-TITULO — visual mais leve */
  .card-titulo {
    border-bottom-color: rgba(0,59,113,0.1);
  }

  /* Inputs com placeholder mais leve */
  input::placeholder,
  textarea::placeholder { color: #94A3B8; opacity: 1; }

  /* Selecione/desmarque tudo nos cards — mais sutil */
  .rec-card input[type="checkbox"],
  .soft-card input[type="checkbox"] {
    accent-color: var(--semed-azul);
  }
}

/* Botão "voltar ao topo" — flutuante em mobile */
.btn-voltar-topo {
  display: none;
  position: fixed;
  right: 16px;
  bottom: calc(90px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  background: var(--semed-azul);
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,59,113,0.25);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  transition: all 0.2s ease;
}
.btn-voltar-topo.visivel { display: flex; align-items: center; justify-content: center; }
.btn-voltar-topo:active { transform: scale(0.9); }
@media (min-width: 641px) {
  .btn-voltar-topo { display: none !important; }
}


/* ╔══════════════════════════════════════════════════════════════════════
   ║  FOUNDATION PREMIUM — Design System completo
   ║  Tokens modernos + componentes refinados (estilo Notion/Linear/Vercel)
   ║  Cor brand: azul SEMED #003B71 (mantido) · Densidade confortável
   ╚══════════════════════════════════════════════════════════════════════ */

:root {
  /* ─── Cores · Azul SEMED scale ─── */
  --azul-50:  #EFF6FF;
  --azul-100: #DBEAFE;
  --azul-200: #BFDBFE;
  --azul-300: #93C5FD;
  --azul-400: #1E5BA8;
  --azul-500: #003B71;   /* SEMED — cor principal */
  --azul-600: #002C56;   /* hover/active */
  --azul-700: #001F3D;
  --azul-800: #001428;
  --azul-900: #000A14;

  /* ─── Cores · Neutros (slate scale) ─── */
  --neutro-0:   #FFFFFF;
  --neutro-50:  #F8FAFC;
  --neutro-100: #F1F5F9;
  --neutro-200: #E2E8F0;
  --neutro-300: #CBD5E1;
  --neutro-400: #94A3B8;
  --neutro-500: #64748B;
  --neutro-600: #475569;
  --neutro-700: #334155;
  --neutro-800: #1E293B;
  --neutro-900: #0F172A;

  /* ─── Cores · Semânticas ─── */
  --sucesso-50: #DCFCE7;
  --sucesso-500: #15803D;
  --sucesso-700: #14532D;
  --aviso-50: #FEF3C7;
  --aviso-500: #B45309;
  --aviso-700: #78350F;
  --erro-50: #FEE2E2;
  --erro-500: #DC2626;
  --erro-700: #991B1B;
  --info-50: #DBEAFE;
  --info-500: #2563EB;
  --info-700: #1E40AF;

  /* ─── Sombras refinadas (estilo Vercel/Tailwind) ─── */
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 8px rgba(15,23,42,0.04), 0 12px 24px rgba(15,23,42,0.06);
  --shadow-lg: 0 16px 32px rgba(15,23,42,0.08), 0 24px 48px rgba(15,23,42,0.08);
  --shadow-xl: 0 24px 48px rgba(15,23,42,0.12), 0 32px 64px rgba(15,23,42,0.1);
  --shadow-focus: 0 0 0 4px rgba(0,59,113,0.12);

  /* ─── Border radius scale ─── */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ─── Spacing scale (rem) ─── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* ─── Tipografia scale ─── */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;

  /* ─── Z-index scale ─── */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 500;
  --z-modal: 1000;
  --z-bottomnav: 1100;
}

/* ─── Body com tipografia premium ─── */
body {
  background: var(--neutro-50);
  color: var(--neutro-900);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01", "ss03";
  text-rendering: optimizeLegibility;
}

/* ─── HEADER SEMED refinado ─── */
.semed-header {
  background: linear-gradient(180deg, #003B71 0%, #0A4787 100%);
  border-bottom: 4px solid var(--amarelo-500, var(--semed-amarelo));
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 12px rgba(0,59,113,0.08);
}
.semed-header-faixa {
  background: var(--amarelo-500, var(--semed-amarelo));
  color: var(--azul-500);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.6px;
}
.semed-brasao {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  border-width: 2px;
}
.semed-logo-texto h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-feature-settings: "cv11", "ss01";
}
.semed-logo-texto p {
  font-size: var(--fs-xs);
  opacity: 0.78;
  letter-spacing: 0.02em;
  margin-top: 3px;
}
@media (max-width: 640px) {
  .semed-logo-texto h1 { font-size: 1.15rem; }
  .semed-brasao {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    padding: 5px;
  }
}

/* Nav superior — visual mais clean */
.semed-nav {
  background: rgba(0,59,113,0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.semed-nav a {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.15s ease;
}
.semed-nav a:hover { background: rgba(255,255,255,0.1); }
.semed-nav a.ativo {
  background: rgba(255,255,255,0.14);
  border-bottom-color: var(--amarelo-500, var(--semed-amarelo));
}

/* ─── PÁGINA — hierarquia premium ─── */
.pagina-titulo {
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--azul-500);
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}
.pagina-subtitulo {
  font-size: var(--fs-md);
  color: var(--neutro-500);
  line-height: 1.5;
  margin-bottom: var(--space-6);
}

/* ─── CARD — densidade confortável + sombras refinadas ─── */
.card {
  background: var(--neutro-0);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
  border: 1px solid var(--neutro-200);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--neutro-300);
}

.card-titulo {
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--neutro-900);
  letter-spacing: -0.012em;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--neutro-200);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.card-titulo .num {
  background: var(--azul-500);
  color: var(--neutro-0);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,59,113,0.15);
  flex-shrink: 0;
}
.card-titulo small {
  font-size: var(--fs-sm) !important;
  color: var(--neutro-500);
  font-weight: 400 !important;
}

/* ─── FORMULÁRIO — inputs refinados ─── */
.campo {
  margin-bottom: var(--space-5);
}
.campo label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--neutro-700);
  letter-spacing: 0.005em;
  margin-bottom: var(--space-2);
  display: block;
}
.campo input[type="text"],
.campo input[type="email"],
.campo input[type="password"],
.campo input[type="date"],
.campo input[type="number"],
.campo input[type="url"],
.campo input[type="search"],
.campo select,
.campo textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--neutro-200);
  border-radius: var(--radius-md);
  background: var(--neutro-0);
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--neutro-900);
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.campo input:hover:not(:focus),
.campo select:hover:not(:focus),
.campo textarea:hover:not(:focus) {
  border-color: var(--neutro-300);
}
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--azul-500);
  box-shadow: var(--shadow-focus);
}
.campo textarea {
  min-height: 100px;
  line-height: 1.6;
}
.campo input::placeholder,
.campo textarea::placeholder {
  color: var(--neutro-400);
  opacity: 1;
}
.campo small {
  color: var(--neutro-500);
  font-size: var(--fs-xs);
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* ─── BOTÕES — estados consistentes + microinterações ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  border: 1px solid transparent;
  background: transparent;
  color: var(--neutro-700);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.btn:active { transform: scale(0.98); }
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Variantes */
.btn-primario,
button[type="submit"]:not(.btn-secundario):not(.btn-vermelho):not(.btn-amarelo):not(.btn-pequeno),
.btn[class*="primario"] {
  background: var(--azul-500);
  color: var(--neutro-0);
  box-shadow: 0 1px 2px rgba(0,59,113,0.12);
}
.btn-primario:hover,
button[type="submit"]:hover:not(.btn-secundario):not(.btn-vermelho) {
  background: var(--azul-600);
  box-shadow: 0 4px 12px rgba(0,59,113,0.2);
  transform: translateY(-1px);
}
.btn-secundario {
  background: var(--neutro-0);
  color: var(--neutro-700);
  border-color: var(--neutro-200);
  box-shadow: var(--shadow-xs);
}
.btn-secundario:hover {
  background: var(--neutro-50);
  border-color: var(--neutro-300);
  color: var(--neutro-900);
}
.btn-vermelho {
  background: var(--erro-500);
  color: var(--neutro-0);
  box-shadow: 0 1px 2px rgba(220,38,38,0.12);
}
.btn-vermelho:hover {
  background: var(--erro-700);
  box-shadow: 0 4px 12px rgba(220,38,38,0.2);
}
.btn-amarelo {
  background: var(--amarelo-500, #FFC107);
  color: var(--azul-500);
  box-shadow: 0 1px 2px rgba(255,193,7,0.2);
  font-weight: 700;
}
.btn-amarelo:hover {
  background: #F59E0B;
  box-shadow: 0 4px 12px rgba(255,193,7,0.3);
  transform: translateY(-1px);
}
.btn-pequeno {
  padding: 7px 12px;
  font-size: var(--fs-xs);
  min-height: 32px;
}

/* ─── ALERTAS refinados ─── */
.alerta {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
  line-height: 1.55;
  border: 1px solid;
  border-left-width: 4px;
}
.alerta-info {
  background: var(--info-50);
  color: var(--info-700);
  border-color: var(--info-500);
}
.alerta-sucesso {
  background: var(--sucesso-50);
  color: var(--sucesso-700);
  border-color: var(--sucesso-500);
}
.alerta-aviso {
  background: var(--aviso-50);
  color: var(--aviso-700);
  border-color: var(--aviso-500);
}
.alerta-erro {
  background: var(--erro-50);
  color: var(--erro-700);
  border-color: var(--erro-500);
}

/* ─── STATUS BADGES refinados ─── */
.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* ─── MAIN com max-width refinado ─── */
main {
  max-width: 1200px;
  padding: var(--space-8) var(--space-6);
}

/* ─── FOOTER limpo ─── */
.semed-footer {
  background: var(--neutro-900);
  color: var(--neutro-400);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  border-top: 4px solid var(--amarelo-500, var(--semed-amarelo));
}
.semed-footer p {
  font-size: var(--fs-xs);
  margin: var(--space-1) 0;
  line-height: 1.6;
}
.semed-footer strong { color: var(--neutro-0); }
/* ─── CHIP DO MUNICÍPIO no header ─── */
/* Aparece à direita pra mostrar em qual contexto institucional o usuário está,
   sem misturar com a brand neutra (RoboFeed) no logo principal */
.municipio-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,193,7,0.4);
  border-radius: 999px;
  color: var(--branco);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease;
  flex-shrink: 1;
  min-width: 0;
}
.municipio-chip:hover { background: rgba(255,255,255,0.18); }
.municipio-chip__icone { font-size: 0.85rem; }
.municipio-chip__texto {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .municipio-chip {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    max-width: none;
    margin-top: 4px;
    font-size: 0.7rem;
    padding: 4px 10px;
  }
}

/* ─── Override mobile do Foundation Premium ─── */
@media (max-width: 640px) {
  .card {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
  }
  .card-titulo {
    font-size: var(--fs-md);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
  }
  .card-titulo .num {
    width: 28px;
    height: 28px;
    font-size: var(--fs-xs);
    border-radius: var(--radius-sm);
  }
  .pagina-titulo {
    font-size: var(--fs-2xl);
    letter-spacing: -0.018em;
  }
  .pagina-subtitulo {
    font-size: var(--fs-sm);
  }
  main {
    padding: var(--space-4) var(--space-3);
  }
}

/* ╔══════════════════════════════════════════════════════════════════════
   ║ LANDING PÚBLICA ROBOFEED — só renderiza pra visitante não logado
   ║ Sem dependência do _layout_app.html (que tem header autenticado).
   ║ Mobile-first; breakpoints 640 / 900.
   ╚══════════════════════════════════════════════════════════════════════ */

/* ===== Topo (brand + nav) ===== */
.landing-topo {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--neutro-200, #E5E7EB);
}
.landing-topo__brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: #003B71;
  font-weight: 800; font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.landing-topo__brand:hover { opacity: .85; }
.landing-topo__nav { display: flex; align-items: center; gap: 22px; }
.landing-topo__nav a {
  color: var(--neutro-700, #374151);
  text-decoration: none; font-size: 0.94rem; font-weight: 500;
  transition: color .15s;
}
.landing-topo__nav a:hover { color: #003B71; }
.landing-topo__entrar {
  padding: 8px 18px;
  border: 1.5px solid #003B71;
  border-radius: 999px;
  color: #003B71 !important;
  font-weight: 600 !important;
}
.landing-topo__entrar:hover {
  background: #003B71;
  color: #fff !important;
}
@media (max-width: 640px) {
  .landing-topo { padding: 12px 16px; }
  .landing-topo__brand span { display: none; }
  .landing-topo__nav { gap: 14px; }
  .landing-topo__nav a:not(.landing-topo__entrar) { display: none; }
}

/* ===== Hero ===== */
.landing-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 24px 64px;
}
.landing-hero__chip {
  display: inline-block;
  padding: 6px 14px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid #FCD34D;
}
.landing-hero__titulo {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #0F172A;
  margin: 0 0 20px;
  font-weight: 800;
}
.landing-hero__titulo-grifo {
  background: linear-gradient(120deg, #003B71 0%, #2563EB 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-hero__subtitulo {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--neutro-600, #4B5563);
  margin: 0 0 32px;
  max-width: 520px;
}
.landing-hero__ctas {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-bottom: 16px;
}
.landing-hero__rodape {
  font-size: 0.85rem;
  color: var(--neutro-500, #6B7280);
  margin: 12px 0 0;
}

/* CTAs (reaproveitados em outras seções) */
.landing-cta-primario {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  background: #003B71;
  color: #fff !important;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700; font-size: 1rem;
  box-shadow: 0 4px 14px rgba(0,59,113,0.25);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.landing-cta-primario:hover {
  background: #00284D;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,59,113,0.32);
}
.landing-cta-primario--escuro {
  background: #FBBF24;
  color: #003B71 !important;
  box-shadow: 0 4px 14px rgba(251,191,36,0.35);
}
.landing-cta-primario--escuro:hover {
  background: #F59E0B;
  box-shadow: 0 8px 20px rgba(251,191,36,0.45);
}
.landing-cta-primario--xl {
  padding: 18px 36px;
  font-size: 1.1rem;
  border-radius: 14px;
}
.landing-cta-secundario {
  display: inline-flex; align-items: center;
  padding: 14px 22px;
  color: #003B71 !important;
  text-decoration: none;
  font-weight: 600;
  border-radius: 12px;
  border: 1.5px solid var(--neutro-300, #D1D5DB);
  background: #fff;
  transition: border-color .15s, background .15s;
}
.landing-cta-secundario:hover {
  border-color: #003B71;
  background: #F8FAFC;
}

/* Mockup da aula no hero */
.landing-hero__mockup {
  display: flex; justify-content: center;
}
.landing-mockup-card {
  width: 100%; max-width: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.18), 0 4px 16px rgba(15,23,42,0.06);
  border: 1px solid var(--neutro-200, #E5E7EB);
  overflow: hidden;
  transform: rotate(-1.5deg);
  transition: transform .3s;
}
.landing-mockup-card:hover { transform: rotate(0deg) scale(1.02); }
.landing-mockup-card__hdr {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  background: var(--neutro-100, #F3F4F6);
  border-bottom: 1px solid var(--neutro-200, #E5E7EB);
}
.landing-mockup-card__dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.landing-mockup-card__dot--r { background: #EF4444; }
.landing-mockup-card__dot--y { background: #FBBF24; }
.landing-mockup-card__dot--g { background: #10B981; }
.landing-mockup-card__url {
  margin-left: 12px;
  font-size: 0.78rem;
  color: var(--neutro-500, #6B7280);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.landing-mockup-card__body { padding: 24px; }
.landing-mockup-pill {
  display: inline-block;
  padding: 4px 10px;
  background: #EFF6FF;
  color: #1E40AF;
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  margin-bottom: 12px;
}
.landing-mockup-card__body h3 {
  font-size: 1.25rem;
  color: #0F172A;
  margin: 0 0 6px;
  font-weight: 700;
}
.landing-mockup-card__meta {
  color: var(--neutro-500, #6B7280);
  font-size: 0.85rem;
  font-family: ui-monospace, monospace;
  margin: 0 0 16px;
}
.landing-mockup-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px;
}
.landing-mockup-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem; font-weight: 500;
}
.landing-mockup-chip--azul { background: #DBEAFE; color: #1E40AF; }
.landing-mockup-chip--amarelo { background: #FEF3C7; color: #92400E; }
.landing-mockup-bar {
  height: 6px; background: var(--neutro-200, #E5E7EB);
  border-radius: 999px; overflow: hidden;
  margin-bottom: 10px;
}
.landing-mockup-bar__fill {
  width: 72%; height: 100%;
  background: linear-gradient(90deg, #003B71, #2563EB);
}
.landing-mockup-card__body small {
  color: var(--neutro-500, #6B7280);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 56px 20px 40px;
  }
  .landing-hero__mockup { order: -1; }
  .landing-mockup-card { transform: rotate(0deg); max-width: 420px; }
}
@media (max-width: 640px) {
  .landing-hero { padding: 32px 16px 24px; gap: 32px; }
  .landing-hero__subtitulo { font-size: 1rem; }
  .landing-hero__ctas { flex-direction: column; align-items: stretch; }
  .landing-cta-primario, .landing-cta-secundario { justify-content: center; }
}

/* ===== Como funciona ===== */
.landing-como {
  background: var(--neutro-50, #F9FAFB);
  padding: 80px 24px;
  border-top: 1px solid var(--neutro-200, #E5E7EB);
  border-bottom: 1px solid var(--neutro-200, #E5E7EB);
}
.landing-como__hdr { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.landing-como__hdr h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: #0F172A;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-weight: 800;
}
.landing-como__hdr p {
  font-size: 1.1rem;
  color: var(--neutro-600, #4B5563);
  margin: 0;
}
.landing-como__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.landing-bloco {
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--neutro-200, #E5E7EB);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform .2s, box-shadow .2s;
}
.landing-bloco:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,59,113,0.08);
}
.landing-bloco__icone {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: #EFF6FF;
  border-radius: 14px;
  font-size: 1.8rem;
  margin-bottom: 18px;
}
.landing-bloco h3 {
  font-size: 1.2rem;
  color: #0F172A;
  margin: 0 0 10px;
  font-weight: 700;
}
.landing-bloco p {
  font-size: 0.96rem;
  color: var(--neutro-600, #4B5563);
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 900px) {
  .landing-como__grid { grid-template-columns: 1fr; gap: 16px; max-width: 480px; }
  .landing-como { padding: 56px 20px; }
}

/* ===== Prova social ===== */
.landing-prova {
  padding: 80px 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.landing-prova__hdr { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.landing-prova__chip {
  display: inline-block;
  padding: 6px 14px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid #FCD34D;
}
.landing-prova__hdr h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.4rem);
  color: #0F172A;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 800;
}
.landing-prova__hdr p {
  font-size: 1.05rem;
  color: var(--neutro-600, #4B5563);
  margin: 0;
  line-height: 1.55;
}
.landing-prova__metricas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}
.landing-metrica {
  text-align: center;
  padding: 28px 16px;
  background: #fff;
  border: 1px solid var(--neutro-200, #E5E7EB);
  border-radius: 14px;
}
.landing-metrica strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #003B71;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}
.landing-metrica span {
  font-size: 0.88rem;
  color: var(--neutro-600, #4B5563);
}
.landing-depoimento {
  background: linear-gradient(135deg, #003B71 0%, #1E3A8A 100%);
  color: #fff;
  padding: 40px;
  border-radius: 18px;
  margin: 0;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,59,113,0.25);
}
.landing-depoimento::before {
  content: "“";
  position: absolute;
  top: 8px; left: 28px;
  font-size: 5rem;
  color: #FBBF24;
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.6;
}
.landing-depoimento p {
  font-size: 1.15rem;
  line-height: 1.55;
  margin: 0 0 18px;
  position: relative;
  z-index: 1;
}
.landing-depoimento footer {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.85);
}
.landing-depoimento footer strong { color: #FBBF24; }
@media (max-width: 900px) {
  .landing-prova { padding: 56px 20px; }
  .landing-prova__metricas { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .landing-depoimento { padding: 28px; }
  .landing-depoimento p { font-size: 1rem; }
}

/* ===== CTA Secretaria ===== */
.landing-secretaria {
  background: var(--neutro-50, #F9FAFB);
  padding: 64px 24px;
  border-top: 1px solid var(--neutro-200, #E5E7EB);
}
.landing-secretaria__caixa {
  max-width: 720px;
  margin: 0 auto;
  background: #0F172A;
  color: #fff;
  padding: 48px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 16px 50px rgba(15,23,42,0.18);
}
.landing-secretaria__caixa h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  font-weight: 800;
}
.landing-secretaria__caixa p {
  font-size: 1.02rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 28px;
}
.landing-secretaria__caixa small {
  display: block;
  margin-top: 14px;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
}
@media (max-width: 640px) {
  .landing-secretaria { padding: 40px 16px; }
  .landing-secretaria__caixa { padding: 32px 20px; }
}

/* ===== CTA Final ===== */
.landing-cta-final {
  text-align: center;
  padding: 88px 24px;
}
.landing-cta-final h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #0F172A;
  letter-spacing: -0.022em;
  margin: 0 0 28px;
  line-height: 1.1;
  font-weight: 800;
}
.landing-cta-final small {
  display: block;
  margin-top: 16px;
  color: var(--neutro-500, #6B7280);
  font-size: 0.88rem;
}
@media (max-width: 640px) {
  .landing-cta-final { padding: 56px 16px; }
}

/* ===== Footer ===== */
.landing-footer {
  background: #0F172A;
  color: rgba(255,255,255,0.7);
  padding: 56px 24px 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  max-width: none;
}
.landing-footer__col h4 {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.landing-footer__col a {
  display: block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.94rem;
  margin-bottom: 8px;
  transition: color .15s;
}
.landing-footer__col a:hover { color: #FBBF24; }
.landing-footer__col p {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
  max-width: 360px;
}
.landing-footer__brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.landing-footer__legal {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}
@media (max-width: 900px) {
  .landing-footer { grid-template-columns: 1fr 1fr; padding: 40px 20px 24px; gap: 28px; }
  .landing-footer__col:first-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .landing-footer { grid-template-columns: 1fr; }
}

/* ╔══════════════════════════════════════════════════════════════════════
   ║ AUTH ROBOFEED — cadastro + onboarding (brand neutro)
   ╚══════════════════════════════════════════════════════════════════════ */

/* Brasão RoboFeed na caixa de auth (substitui o "SEMED" amarelo) */
.caixa-auth-brasao--robofeed {
  width: 64px; height: 64px;
  background: transparent;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  padding: 0;
  box-shadow: 0 4px 18px rgba(0,59,113,0.20);
}
.caixa-auth-brasao--robofeed svg {
  width: 64px; height: 64px;
  border-radius: 14px;
}

/* Caixa mais larga pro onboarding (3 fieldsets) */
.caixa-auth--ampla {
  max-width: 560px;
}

/* Fundo neutro (não a gradient navy do login institucional) */
.tela-auth--robofeed {
  background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%);
}

/* Divisor "ou cadastre-se com e-mail" */
.divisor {
  display: flex; align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--neutro-500, #6B7280);
  font-size: 0.85rem;
}
.divisor::before, .divisor::after {
  content: ""; flex: 1;
  height: 1px;
  background: var(--neutro-200, #E5E7EB);
}

/* Botão Google estilizado pro padrão RoboFeed */
.btn-google {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  background: #fff;
  color: #1F2937;
  border: 1.5px solid var(--neutro-300, #D1D5DB);
  font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
.btn-google:hover {
  border-color: var(--neutro-400, #9CA3AF);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.btn-google::before {
  content: "";
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><path fill='%23FFC107' d='M43.6 20.5H42V20H24v8h11.3c-1.6 4.7-6.1 8-11.3 8-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.9 1.2 8 3.1l5.7-5.7C34 6.1 29.3 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.3-.4-3.5z'/><path fill='%23FF3D00' d='M6.3 14.7l6.6 4.8C14.7 16 19 13 24 13c3.1 0 5.9 1.2 8 3.1l5.7-5.7C34 6.1 29.3 4 24 4 16.3 4 9.7 8.3 6.3 14.7z'/><path fill='%234CAF50' d='M24 44c5.2 0 9.9-2 13.5-5.2l-6.2-5.2c-2 1.5-4.5 2.4-7.3 2.4-5.2 0-9.6-3.3-11.3-8l-6.5 5C9.5 39.6 16.2 44 24 44z'/><path fill='%231976D2' d='M43.6 20.5H42V20H24v8h11.3c-.8 2.2-2.2 4.1-4 5.6l6.2 5.2C41.4 36 44 30.5 44 24c0-1.2-.1-2.3-.4-3.5z'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ----- Onboarding ----- */
.onboarding-form { display: block; }
.onb-bloco {
  border: none;
  padding: 0;
  margin: 0 0 28px;
}
.onb-pergunta {
  font-size: 1rem;
  font-weight: 700;
  color: #0F172A;
  padding: 0;
  margin-bottom: 6px;
}
.onb-ajuda {
  font-size: 0.88rem;
  color: var(--neutro-600, #4B5563);
  margin: 0 0 10px;
  line-height: 1.45;
}
.onb-bloco input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1.5px solid var(--neutro-300, #D1D5DB);
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.onb-bloco input[type="text"]:focus {
  outline: none;
  border-color: #003B71;
  box-shadow: 0 0 0 3px rgba(0,59,113,0.12);
}
.onb-opcoes {
  display: grid; gap: 10px;
}
.onb-radio {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 4px 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--neutro-200, #E5E7EB);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: #fff;
}
.onb-radio:hover { border-color: #93C5FD; background: #F8FAFC; }
.onb-radio input[type="radio"] {
  grid-row: 1 / span 2;
  margin-top: 4px;
  width: 18px; height: 18px;
  accent-color: #003B71;
}
.onb-radio:has(input:checked) {
  border-color: #003B71;
  background: #EFF6FF;
}
.onb-radio__titulo {
  font-weight: 700;
  color: #0F172A;
  font-size: 0.98rem;
}
.onb-radio__desc {
  font-size: 0.85rem;
  color: var(--neutro-600, #4B5563);
  line-height: 1.45;
}

/* ╔══════════════════════════════════════════════════════════════════════
   ║ BANCO NACIONAL + PERFIL PÚBLICO (Sprint A3 + A5)
   ╚══════════════════════════════════════════════════════════════════════ */

/* Container central */
.bn-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* ===== Hero do Banco Nacional ===== */
.bn-hero {
  background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%);
  padding: 56px 24px 48px;
  border-bottom: 1px solid var(--neutro-200, #E5E7EB);
}
.bn-hero__conteudo {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}
.bn-hero__chip {
  display: inline-block;
  padding: 6px 14px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid #FCD34D;
}
.bn-hero__titulo {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0F172A;
  font-weight: 800;
  margin: 0 0 14px;
}
.bn-hero__subtitulo {
  font-size: 1rem;
  color: var(--neutro-600, #4B5563);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto 28px;
}
.bn-hero__stats {
  display: inline-flex;
  gap: 28px;
  padding: 14px 28px;
  background: #fff;
  border: 1px solid var(--neutro-200, #E5E7EB);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bn-stat strong {
  display: block;
  font-size: 1.6rem;
  color: #003B71;
  font-weight: 800;
  line-height: 1;
}
.bn-stat span {
  font-size: 0.82rem;
  color: var(--neutro-600, #4B5563);
  margin-top: 4px;
  display: inline-block;
}

/* ===== Filtros ===== */
.bn-filtros {
  background: #fff;
  border: 1px solid var(--neutro-200, #E5E7EB);
  border-radius: 14px;
  padding: 18px;
  margin: 24px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bn-busca {
  position: relative;
  margin-bottom: 14px;
}
.bn-busca span {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem; pointer-events: none;
}
.bn-busca input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--neutro-300, #D1D5DB);
  border-radius: 10px;
  font-size: 1rem;
}
.bn-busca input:focus {
  outline: none; border-color: #003B71;
  box-shadow: 0 0 0 3px rgba(0,59,113,0.12);
}
.bn-chips-linha {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center;
  margin-top: 10px;
}
.bn-chips-label {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--neutro-700, #374151);
  margin-right: 6px;
}

/* ===== Grid de cards ===== */
.bn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.bn-card {
  background: #fff;
  border: 1px solid var(--neutro-200, #E5E7EB);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  display: flex; flex-direction: column;
}
.bn-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,59,113,0.10);
  border-color: #93C5FD;
}
.bn-card__capa {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--neutro-100, #F3F4F6);
  overflow: hidden;
}
.bn-card__capa img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.bn-card__body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column;
  gap: 6px; flex: 1;
}
.bn-card__titulo {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}
.bn-card__titulo a {
  color: #0F172A;
  text-decoration: none;
}
.bn-card__titulo a:hover { color: #003B71; }
.bn-card__autor {
  font-size: 0.85rem;
  color: var(--neutro-600, #4B5563);
  margin: 0;
}
.bn-card__autor a {
  color: #003B71;
  font-weight: 600;
  text-decoration: none;
}
.bn-card__autor a:hover { text-decoration: underline; }
.bn-card__autor small {
  color: var(--neutro-500, #6B7280);
  font-weight: 400;
}
.bn-card__resumo {
  font-size: 0.86rem;
  color: var(--neutro-700, #374151);
  line-height: 1.45;
  margin: 4px 0 0;
}
.bn-card__rodape {
  display: flex; align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--neutro-100, #F3F4F6);
}
.bn-card__curtidas {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--neutro-600, #4B5563);
}
.bn-card__curtidas.cheio { color: #EF4444; }
.bn-card__meta {
  font-size: 0.82rem;
  color: var(--neutro-500, #6B7280);
}

/* ===== Aula OFICIAL RoboFeed ===== */
.bn-card--oficial {
  border-color: #10B981;
  box-shadow: 0 0 0 1px #10B981, 0 4px 16px rgba(16,185,129,0.18);
}
.bn-card--oficial:hover {
  border-color: #059669;
  box-shadow: 0 0 0 1px #059669, 0 12px 32px rgba(16,185,129,0.25);
}
.bn-card__capa { position: relative; }
.bn-card__selo-oficial {
  position: absolute;
  top: 10px; left: 10px;
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  text-transform: uppercase;
}

/* ===== Estado vazio ===== */
.bn-vazio {
  text-align: center;
  padding: 64px 24px;
  background: #fff;
  border: 2px dashed var(--neutro-200, #E5E7EB);
  border-radius: 16px;
  margin: 32px 0;
}
.bn-vazio__icone {
  font-size: 3rem;
  margin-bottom: 12px;
}
.bn-vazio h3 {
  font-size: 1.15rem;
  color: #0F172A;
  margin: 0 0 8px;
}
.bn-vazio p {
  color: var(--neutro-600, #4B5563);
  margin: 0;
}
.bn-vazio a {
  color: #003B71;
  font-weight: 700;
}

/* ===== Footer curto público ===== */
.bn-footer {
  text-align: center;
  padding: 32px 24px;
  background: #F8FAFC;
  border-top: 1px solid var(--neutro-200, #E5E7EB);
  color: var(--neutro-600, #4B5563);
  font-size: 0.88rem;
}
.bn-footer p { margin: 4px 0; }
.bn-footer a {
  color: #003B71;
  font-weight: 600;
  text-decoration: none;
}
.bn-footer a:hover { text-decoration: underline; }

/* ===== Perfil público (header) ===== */
.perfil-hdr {
  background: linear-gradient(135deg, #003B71 0%, #1E3A8A 100%);
  color: #fff;
  padding: 56px 24px 40px;
}
.perfil-hdr__interno {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.perfil-hdr__avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 4px solid #FBBF24;
  object-fit: cover;
  flex-shrink: 0;
  background: #fff;
}
.perfil-hdr__avatar--iniciais {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 800;
  color: #003B71;
  background: #FBBF24;
}
.perfil-hdr__info h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #fff;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
  font-weight: 800;
}
.perfil-hdr__papel {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  margin: 0 0 8px;
}
.perfil-hdr__bio {
  color: rgba(255,255,255,0.92);
  font-size: 0.92rem;
  margin: 0 0 14px;
}
.perfil-hdr__metricas {
  display: flex; gap: 22px;
  color: rgba(255,255,255,0.88);
  font-size: 0.92rem;
}
.perfil-hdr__metricas strong {
  color: #FBBF24;
  font-size: 1.05rem;
}
@media (max-width: 640px) {
  .perfil-hdr__interno { flex-direction: column; text-align: center; gap: 18px; }
  .perfil-hdr__metricas { justify-content: center; flex-wrap: wrap; }
}

/* Título de seção dentro de container public */
.perfil-secao-titulo {
  font-size: 1.2rem;
  color: #0F172A;
  margin: 32px 0 16px;
  font-weight: 700;
}

/* Utilitário — esconder elementos só em desktop (Feed é mobile-only) */
@media (min-width: 900px) {
  .link-mobile-only { display: none !important; }
}

/* ╔══════════════════════════════════════════════════════════════════════
   ║ FEED — TikTok-style full-screen scroll vertical (Sprint B0b)
   ║ MOBILE-ONLY: rota /aulas/feed redireciona pra /banco-nacional em desktop.
   ╚══════════════════════════════════════════════════════════════════════ */

/* Topbar flutuante minimal */
.feed-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  z-index: 100;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.feed-topbar > * { pointer-events: auto; }
.feed-topbar__brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; text-decoration: none;
  font-weight: 800; font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.feed-topbar__nav { display: flex; gap: 14px; align-items: center; }
.feed-topbar__nav a {
  color: #fff; text-decoration: none;
  font-size: 1.4rem;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}
.feed-topbar__cta {
  background: #FBBF24 !important;
  color: #003B71 !important;
  font-size: 0.88rem !important;
  width: auto !important; padding: 0 14px !important;
  font-weight: 700;
}

/* Stack de cards — scroll-snap vertical full-screen */
.feed-stack {
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.feed-stack::-webkit-scrollbar { display: none; }

.feed-card {
  position: relative;
  height: 100vh; height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #000;
  display: flex; flex-direction: column;
}

/* Capa em background full-screen */
.feed-card__capa {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Foto quadrada: mostra a imagem INTEIRA (sem cortar) sobre um fundo borrado dela
   mesma — preenche a tela alta sem barras feias. (Mobile; no desktop o modo
   vitrine já trata.) */
.feed-card__capa--foto { object-fit: contain; }
.feed-card__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.18);
  filter: blur(34px) brightness(0.55) saturate(1.1);
  z-index: 0;
  pointer-events: none;
}

/* Overlay gradiente preto pra contraste do texto */
.feed-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
              rgba(0,0,0,0.35) 0%,
              rgba(0,0,0,0) 30%,
              rgba(0,0,0,0) 50%,
              rgba(0,0,0,0.85) 100%);
  z-index: 2;
}

/* Info bottom-left */
.feed-card__info {
  position: absolute;
  left: 0; right: 80px; bottom: 0;
  padding: 24px 20px 32px;
  color: #fff;
  z-index: 3;
}
.feed-card__autor-link {
  display: inline-flex; align-items: center;
  gap: 10px;
  text-decoration: none; color: #fff;
  margin-bottom: 12px;
}
.feed-card__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid #FBBF24;
  object-fit: cover;
  flex-shrink: 0;
}
.feed-card__avatar--ini {
  display: flex; align-items: center; justify-content: center;
  background: #FBBF24;
  color: #003B71;
  font-weight: 800;
  font-size: 0.95rem;
}
.feed-card__autor-info strong {
  display: block;
  font-size: 0.95rem; font-weight: 700;
}
.feed-card__autor-info small {
  font-size: 0.78rem;
  opacity: 0.85;
}
.feed-card__titulo {
  font-size: 1.35rem; line-height: 1.25;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  /* só o título no card: até 3 linhas, com reticências se passar */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-card__resumo {
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 14px;
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  /* resumo: 3 linhas justificadas, reticências automáticas */
  text-align: justify;
  text-justify: inter-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-card__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.feed-card__tag {
  padding: 4px 10px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Ações verticais bottom-right (TikTok style) */
.feed-card__acoes {
  position: absolute;
  right: 12px; bottom: 28px;
  display: flex; flex-direction: column;
  gap: 18px;
  z-index: 3;
}
.feed-acao {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  background: none; border: none;
  color: #fff; text-decoration: none;
  cursor: pointer;
  padding: 4px 6px;
  font-family: inherit;
}
.feed-acao__icone {
  font-size: 1.75rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  transition: transform .15s;
}
.feed-acao:hover .feed-acao__icone,
.feed-acao:active .feed-acao__icone {
  transform: scale(1.15);
}
.feed-acao__num {
  font-size: 0.78rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.feed-acao--curtir.curtido .feed-acao__icone {
  animation: feedHeartPop 0.4s ease;
}
.feed-acao--curtir.curtido .feed-acao__icone {
  filter: drop-shadow(0 0 8px rgba(239,68,68,0.6));
}
/* Coração SVG da barra: contorno branco -> vermelho preenchido quando curtido (estilo Instagram) */
.feed-acao__icone--coracao { display: inline-flex; }
.ico-coracao {
  width: 1.9rem; height: 1.9rem; display: block;
  fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round;
  transition: fill .18s ease, stroke .18s ease, transform .15s;
}
.feed-acao--curtir.curtido .ico-coracao {
  fill: #ef4444; stroke: #ef4444;
}
/* Ícones de linha brancos (2D) da barra de ações: olho (Ver), avião (Enviar)... */
.ico-olho, .ico-enviar {
  width: 1.9rem; height: 1.9rem; display: block;
  fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.feed-acao--wa .feed-acao__icone {
  color: #25D366;
}

@keyframes feedHeartPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Double-tap heart pop */
.feed-card__heart-pop {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 6rem;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
}
/* Coração branco grande do double-tap (igual Instagram) */
.feed-card__heart-pop svg {
  width: 120px; height: 120px;
  fill: #fff;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.35));
}
.feed-card__heart-pop.animar {
  animation: feedHeartBig 0.8s ease-out;
}
@keyframes feedHeartBig {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* Hint scroll na primeira aula */
.feed-card__hint {
  position: absolute;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: #fff;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  animation: feedHintBounce 2s ease-in-out infinite;
}
@keyframes feedHintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.85; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* Cards vazio / final — sem capa, centralizado */
.feed-card--vazio, .feed-card--final {
  background: linear-gradient(135deg, #003B71 0%, #1E3A8A 100%);
  align-items: center; justify-content: center;
  text-align: center;
  color: #fff;
  padding: 24px;
}
.feed-vazio {
  max-width: 360px;
  margin: 0 auto;
}
.feed-vazio h2 {
  font-size: 1.4rem;
  margin: 16px 0 8px;
  color: #fff;
}
.feed-vazio p {
  color: rgba(255,255,255,0.85);
  margin: 0 0 18px;
}

/* Desktop ajustes — cards ocupam mesma área (centro vertical) */
@media (min-width: 700px) {
  .feed-card__titulo { font-size: 1.6rem; }
  .feed-card__info { right: 100px; padding: 32px 28px 40px; }
  .feed-acao__icone { font-size: 2rem; }
}

/* ===== Botão WhatsApp no perfil público ===== */
.perfil-hdr__wa {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px;
  padding: 10px 18px;
  background: #25D366;
  color: #fff !important;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(37,211,102,0.4);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.perfil-hdr__wa:hover {
  background: #1FBA57;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37,211,102,0.5);
}
.perfil-hdr__wa svg { flex-shrink: 0; }

/* ╔══════════════════════════════════════════════════════════════════════
   ║ CARD AVALIAÇÃO (8) — reforma com pills + subgrupos + cor tonal verde
   ║ Mobile-first; pills ≥44px de toque; grid 3/2/1 colunas em ≥900 / ≥640 / <640.
   ╚══════════════════════════════════════════════════════════════════════ */
.aval-card {
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border-color: #A7F3D0;
}
.aval-card .num {
  background: #10B981;
  color: #FFFFFF;
}

/* ===== Seção (Instrumentos / Critérios / Observações) ===== */
.aval-secao { margin-top: 24px; }
.aval-secao:first-of-type { margin-top: 16px; }

.aval-secao-cabecalho {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.aval-secao-cabecalho h3 {
  font-size: 1.05rem;
  margin: 0;
  color: #064E3B;
  font-weight: 800;
}
.aval-contador {
  display: inline-block;
  padding: 3px 10px;
  background: #FFFFFF;
  border: 1px solid #A7F3D0;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #047857;
}
.aval-secao-desc {
  font-size: 0.88rem;
  color: #065F46;
  margin: 0 0 14px;
  line-height: 1.45;
}

/* ===== Subgrupo (Formais/Informais; Cognitivos/Socio) ===== */
.aval-subgrupo {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(167,243,208,0.6);
  border-radius: 12px;
}
.aval-subgrupo-header {
  display: flex; align-items: baseline; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(167,243,208,0.8);
}
.aval-subgrupo-header strong {
  color: #065F46;
  font-size: 0.95rem;
}
.aval-subgrupo-header small {
  color: #047857;
  font-size: 0.8rem;
}

/* ===== Grid de pills — responsivo ===== */
.aval-pills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ===== Pill individual ===== */
.aval-pill {
  position: relative;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 1.5px solid #D1D5DB;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
  min-height: 44px;
  user-select: none;
}
.aval-pill:hover {
  border-color: #6EE7B7;
  background: #F0FDF4;
}
.aval-pill:active { transform: scale(0.98); }
.aval-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.aval-pill-icone {
  font-size: 1.3rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.aval-pill-conteudo {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  gap: 2px;
}
.aval-pill-titulo {
  font-weight: 600;
  font-size: 0.92rem;
  color: #1F2937;
  line-height: 1.3;
}
.aval-pill-desc {
  font-size: 0.78rem;
  color: #6B7280;
  line-height: 1.35;
}
.aval-pill-check {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  background: transparent;
  color: transparent;
  border-radius: 50%;
  font-size: 0.8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}

/* Estado selecionado */
.aval-pill.selecionada {
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border-color: #10B981;
  box-shadow: 0 2px 8px rgba(16,185,129,0.15);
}
.aval-pill.selecionada .aval-pill-titulo { color: #064E3B; }
.aval-pill.selecionada .aval-pill-desc   { color: #065F46; }
.aval-pill.selecionada .aval-pill-check {
  background: #10B981;
  color: #FFFFFF;
}

/* ===== Textarea observações no padrão do card ===== */
.aval-card textarea[name="aval_observacoes"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #A7F3D0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #FFFFFF;
  resize: vertical;
}
.aval-card textarea[name="aval_observacoes"]:focus {
  outline: none;
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

/* ===== Botão IA do card ===== */
.aval-ia-bloco {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.7);
  border: 1.5px dashed #10B981;
  border-radius: 12px;
}
.aval-btn-ia {
  background: linear-gradient(135deg, #10B981, #047857);
  color: #FFFFFF !important;
  border: none;
  font-weight: 700;
}
.aval-btn-ia:hover {
  background: linear-gradient(135deg, #059669, #065F46);
}

/* ===== Responsivo ===== */
@media (max-width: 900px) {
  .aval-pills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .aval-pills-grid { grid-template-columns: 1fr; }
  .aval-pill { padding: 14px 14px 14px 16px; }
  .aval-pill-titulo { font-size: 0.95rem; }
  .aval-secao-cabecalho h3 { font-size: 1rem; }
}

/* ╔══════════════════════════════════════════════════════════════════════
   ║ MATERIAL COMPLEMENTAR + LINKS (jogos/apps) — visualização da aula
   ╚══════════════════════════════════════════════════════════════════════ */

/* === Material Complementar (PDF/Word/PPT/Excel) — lista de cards baixáveis === */
.ver-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.ver-material-item {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #BAE6FD;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ver-material-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14,165,233,0.18);
  border-color: #0EA5E9;
}
/* Linha com ícone + nome + ação (abaixo da capa, quando houver). */
.ver-material-linha {
  display: flex; align-items: center; gap: 14px;
}
/* Capa grande de prévia (1ª página do PDF) — clicável, ABRE o documento completo. */
.ver-material-capa {
  position: relative;
  display: block; width: 100%; padding: 0;
  background: #fff; cursor: pointer;
  border-radius: 10px; overflow: hidden;
  border: 1px solid #BAE6FD;
  line-height: 0; text-decoration: none;
}
.ver-material-capa img {
  width: 100%; height: 230px;
  object-fit: cover; object-position: top center;
  display: block;
  transition: transform .25s ease;
}
.ver-material-capa:hover img { transform: scale(1.03); }
.ver-material-lupa {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(30,58,138,0.92); color: #fff;
  font-size: 0.78rem; font-weight: 700;
  padding: 5px 11px; border-radius: 999px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .18s, transform .18s;
  pointer-events: none;
}
.ver-material-capa:hover .ver-material-lupa,
.ver-material-capa:focus-visible .ver-material-lupa { opacity: 1; transform: translateY(0); }
/* Botão "Baixar PDF" separado (quando há capa). */
.ver-material-baixar-btn {
  flex-shrink: 0;
  background: #0EA5E9; color: #fff;
  font-size: 0.82rem; font-weight: 700;
  padding: 8px 14px; border-radius: 9px;
  text-decoration: none; white-space: nowrap;
  transition: background .15s;
}
.ver-material-baixar-btn:hover { background: #0284C7; }
.ver-material-icone {
  font-size: 2rem; line-height: 1;
  flex-shrink: 0;
}
.ver-material-info {
  flex: 1; min-width: 0;
}
.ver-material-nome {
  font-weight: 700;
  color: #0C4A6E;
  font-size: 0.95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ver-material-meta {
  font-size: 0.78rem;
  color: #0369A1;
  margin-top: 2px;
}
.ver-material-baixar {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0EA5E9;
  flex-shrink: 0;
}

/* === Jogos, Apps e Links Externos — botões coloridos === */
.ver-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.ver-link-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: transform .15s, box-shadow .15s;
  position: relative;
}
.ver-link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}
.ver-link-icone {
  font-size: 1.9rem;
  line-height: 1;
  flex-shrink: 0;
}
.ver-link-conteudo {
  flex: 1; min-width: 0;
}
.ver-link-tipo {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
  margin-bottom: 2px;
}
.ver-link-titulo {
  font-weight: 700;
  font-size: 0.98rem;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ver-link-seta {
  font-size: 1.2rem;
  opacity: 0.75;
  flex-shrink: 0;
}

/* Wrap pra incluir card colorido + justificativa abaixo */
.ver-link-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ver-link-just {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #4C1D95;
  padding: 10px 12px;
  background: #FAF5FF;
  border: 1px solid #E9D5FF;
  border-left: 4px solid #7C3AED;
  border-radius: 0 8px 8px 0;
}
.ver-link-just strong { color: #5B21B6; }

/* Mobile — empilha 1 coluna pros 2 grids acima */
@media (max-width: 640px) {
  .ver-material-grid, .ver-links-grid { grid-template-columns: 1fr; }
}

/* Chips estilo do banco municipal — usados também no nacional */
.chip-filtro {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--neutro-100, #F3F4F6);
  color: var(--neutro-700, #374151);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.chip-filtro:hover {
  background: #EFF6FF;
  color: #003B71;
}
.chip-filtro.ativo {
  background: #003B71;
  color: #fff;
  border-color: #003B71;
}

/* ============================================================
   BARRA DE NAVEGAÇÃO SOCIAL (app shell) — só mobile (<=860px)
   Amarra Feed/Explorar/Salvos/Perfil dando cara de app nativo.
   ============================================================ */
.social-tabbar { display: none; }

@media (max-width: 860px) {
  .social-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
    display: flex; justify-content: space-around; align-items: stretch;
    background: #0F1D35; border-top: 1px solid #243a63;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 14px rgba(0,0,0,.22);
  }
  .social-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 0 7px; text-decoration: none; color: #9fb0cc;
    font-size: .64rem; font-weight: 700; letter-spacing: .2px;
    -webkit-tap-highlight-color: transparent;
  }
  .social-tab.ativo { color: #FBBF24; }
  .social-tab__ic { font-size: 1.3rem; line-height: 1; }

  /* páginas roláveis: respiro pra não ficar conteúdo atrás da barra */
  body.com-tabbar { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }

  /* feed full-screen: sobe título e ações pra não ficarem atrás da barra */
  body.feed-page .feed-card__info  { bottom: calc(58px + env(safe-area-inset-bottom)); }
  body.feed-page .feed-card__acoes { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* Ícones SVG da barra social (substituem os emojis) */
.social-tab__ic { line-height: 0; position: relative; }
.social-tab__ic svg { width: 25px; height: 25px; display: block; }
.social-tab__lb { font-size: .64rem; }
/* Badge de notificações não-lidas (NOTIF-1) */
.social-tab__badge {
  position: absolute; top: -6px; right: -9px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #EF4444; color: #fff; border-radius: 999px;
  font-size: .62rem; font-weight: 800; line-height: 16px; text-align: center;
  border: 2px solid #0F1D35;
}

/* ============================================================
   FAIXA "VER COMO" (impersonation) — super admin visualizando como outro
   ============================================================ */
.imperson-banner {
  position: sticky; top: 0; z-index: 5000;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #B45309; color: #fff;
  padding: 8px 16px; font-size: .86rem; font-weight: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.imperson-banner__txt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.imperson-banner__ro { font-style: normal; opacity: .85; font-weight: 500; }
.imperson-banner__sair {
  flex: 0 0 auto; background: #fff; color: #92400E; text-decoration: none;
  font-weight: 800; padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.imperson-banner__sair:hover { background: #FEF3C7; }
@media (max-width: 640px) {
  .imperson-banner { font-size: .78rem; padding: 7px 12px; }
  .imperson-banner__ro { display: none; }
}

/* ============================================================
   Sino de notificações (DESKTOP) — fica no semed-usuario-bloco,
   à esquerda do avatar. No mobile a .social-tabbar já mostra
   "Avisos", então escondemos abaixo de 760px pra não duplicar.
   ============================================================ */
.semed-sino {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  text-decoration: none;
  margin-right: 12px;
  transition: background 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}
.semed-sino:hover  { background: rgba(255, 255, 255, 0.28); }
.semed-sino:active { transform: scale(0.94); }
.semed-sino svg    { display: block; }
.semed-sino__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #EF4444;
  color: #FFFFFF;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #1E3A8A;  /* anel pra destacar contra o header navy */
}
@media (max-width: 760px) {
  .semed-sino { display: none; }   /* no mobile, "Avisos" mora na tabbar */
}

/* ============================================================
   MODO VITRINE — RoboFeed no DESKTOP (≥860px) · 11/06/2026
   No celular o feed é TikTok (scroll vertical, full-bleed) — INTOCADO.
   No desktop vira vitrine: paginação HORIZONTAL com setas/teclado,
   card split: mídia contida à esquerda + painel navy à direita.
   ============================================================ */
@media (min-width: 860px) {
  body.feed-page .feed-stack {
    display: flex; flex-direction: row;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
  }
  body.feed-page .feed-card {
    min-width: 100%; width: 100%;
    scroll-snap-align: start; scroll-snap-stop: always;
    display: grid;
    grid-template-columns: minmax(0, 58%) minmax(0, 42%);
    grid-template-rows: 1fr auto;
    background: linear-gradient(135deg, #0F1D35 0%, #1E3A8A 130%);
  }
  /* ESQUERDA: capa/vídeo inteiro, sem esticar nem cortar */
  body.feed-page .feed-card__capa {
    position: static;
    grid-column: 1; grid-row: 1 / -1;
    width: 100%; height: 100vh; height: 100dvh;
    object-fit: contain;
    background: #0A1426;
  }
  body.feed-page .feed-card__overlay { display: none; }
  body.feed-page .feed-card__bg { display: none; }   /* desktop vitrine não usa fundo borrado */
  body.feed-page .feed-card__heart-pop { grid-column: 1; grid-row: 1 / -1; }
  body.feed-page .feed-card__som { left: 24px; right: auto; top: auto; bottom: 24px; }

  /* DIREITA (linha 1): painel de informações centrado */
  body.feed-page .feed-card__info {
    position: static;
    grid-column: 2; grid-row: 1;
    align-self: center;
    max-width: 540px;
    padding: 48px 56px 24px;
  }
  body.feed-page .feed-card__titulo {
    font-size: 2.1rem; line-height: 1.18; margin: 14px 0;
  }
  body.feed-page .feed-card__tags { margin-top: 10px; }

  /* DIREITA (linha 2): ações viram fileira sob o painel */
  body.feed-page .feed-card__acoes {
    position: static;
    grid-column: 2; grid-row: 2;
    display: flex; flex-direction: row; gap: 28px;
    padding: 0 56px 48px;
    align-items: center;
  }

  /* Setas laterais */
  body.feed-page .vitrine-seta {
    position: fixed; top: 50%; transform: translateY(-50%);
    z-index: 90;
    width: 56px; height: 56px; border-radius: 50%;
    border: none; cursor: pointer;
    background: rgba(255,255,255,0.92); color: #1E3A8A;
    font-size: 1.9rem; line-height: 1; font-weight: 700;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    transition: transform .15s ease, background .15s ease;
    display: flex; align-items: center; justify-content: center;
  }
  body.feed-page .vitrine-seta:hover { background: #FBBF24; transform: translateY(-50%) scale(1.08); }
  body.feed-page .vitrine-seta--esq { left: 22px; }
  body.feed-page .vitrine-seta--dir { right: 22px; }

  /* Contador "3 / 25" */
  body.feed-page .vitrine-contador {
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
    z-index: 90;
    background: rgba(0,0,0,0.55); color: #fff;
    padding: 6px 16px; border-radius: 999px;
    font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em;
  }
}
/* Abaixo de 860px (mobile TikTok): setas e contador não existem */
@media (max-width: 859.98px) {
  body.feed-page .vitrine-seta,
  body.feed-page .vitrine-contador { display: none !important; }
}

/* ===== Hint do feed por dispositivo (11/06): ⬇️ no mobile, ➡️ na vitrine desktop ===== */
.feed-hint--desktop { display: none; }
@media (min-width: 860px) {
  .feed-hint--mobile { display: none; }
  .feed-hint--desktop { display: inline; }
  /* na vitrine o hint pulsa na horizontal, perto da seta direita */
  body.feed-page .feed-card__hint {
    top: auto; bottom: 28px; left: auto; right: 96px;
    transform: none;
    animation: feedHintNudgeX 2s ease-in-out infinite;
  }
  @keyframes feedHintNudgeX {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
  }
}

/* ============================================================
   DRAWER DE COMENTÁRIOS — estilo Instagram (11/06/2026)
   Mobile: bottom-sheet que sobe sobre o feed.
   Desktop (vitrine ≥860px): painel lateral direito.
   ============================================================ */
.cmt-backdrop {
  position: fixed; inset: 0; z-index: 9400;
  background: rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.cmt-backdrop.aberto { opacity: 1; pointer-events: auto; }

.cmt-drawer {
  position: fixed; z-index: 9500;
  left: 0; right: 0; bottom: 0;
  height: 68dvh;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
  display: flex; flex-direction: column;
  transform: translateY(105%);
  transition: transform .28s ease;
}
.cmt-drawer.aberto { transform: translateY(0); }

.cmt-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid #EEF2F7;
}
.cmt-head__titulo { font-weight: 800; color: #0F172A; }
.cmt-head__fechar {
  background: none; border: none; font-size: 1.15rem;
  color: #94A3B8; cursor: pointer; padding: 4px 8px;
}

.cmt-lista { flex: 1; overflow-y: auto; padding: 6px 18px; }
.cmt-vazio { color: #64748B; text-align: center; padding: 26px 0; }

.cmt-item { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid #F1F5F9; }
.cmt-item__avatar {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%;
  background: #1E3A8A; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .74rem; overflow: hidden;
}
.cmt-item__avatar img { width: 100%; height: 100%; object-fit: cover; }
.cmt-item__corpo { flex: 1; min-width: 0; }
.cmt-item__meta { font-size: .82rem; color: #94A3B8; }
.cmt-item__meta strong { color: #0F172A; }
.cmt-item__texto { margin: 3px 0 0; white-space: pre-wrap; word-wrap: break-word; font-size: .93rem; color: #1F2937; }
.cmt-item__remover { background: none; border: none; cursor: pointer; color: #B91C1C; font-size: .95rem; flex: 0 0 auto; }

.cmt-composer {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #EEF2F7; background: #fff;
}
.cmt-composer input {
  flex: 1; border: 1px solid #CBD5E1; border-radius: 999px;
  padding: 11px 16px; font-size: .95rem; font-family: inherit;
}
.cmt-composer button {
  background: #2563EB; color: #fff; border: none;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 1rem; cursor: pointer; flex: 0 0 auto;
}
.cmt-composer--login { justify-content: center; font-size: .9rem; color: #475569; }
.cmt-composer--login a { color: #1E3A8A; font-weight: 700; }

/* Desktop (vitrine): vira painel lateral direito, altura cheia */
@media (min-width: 860px) {
  .cmt-drawer {
    left: auto; top: 0; right: 0; bottom: 0;
    height: 100dvh; width: 420px; max-width: 92vw;
    border-radius: 16px 0 0 16px;
    transform: translateX(105%);
  }
  .cmt-drawer.aberto { transform: translateX(0); }
}
