body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: #f4f5f7; /* Fundo cinza claro */
}

/* =========================================
   SIDEBAR (Administrador)
   ========================================= */
.side-bar {
  width: 272px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(121, 12, 230, 0.3) transparent;
}

.sidebar-top { display: flex; justify-content: flex-start; padding-left: 10px; margin-bottom: 30px; margin-top: 10px; }

.sidebar-menu { display: flex; flex-direction: column; flex: 1; gap: 6px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 16px;
  text-decoration: none;
  color: #555555;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.menu-item img {
  width: 20px;
  height: 20px;
  opacity: 0.6;
}

.menu-item.active img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.menu-divider-admin { height: 1px; background-color: transparent; margin: 10px 0; }

.sidebar-footer-admin {
  margin-top: auto;
  background-color: #f6f0ff;
  border-radius: 8px;
  padding: 16px;
}

.footer-admin-info { display: flex; flex-direction: column; gap: 4px; }

.admin-nome-rodape { font-size: 14px; font-weight: 700; color: #000; }

.btn-encerrar-sessao {
  background: none;
  border: none;
  color: #790ce6;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}

/* =========================================
   BARRA SUPERIOR (BRANCA)
   ========================================= */
.main-content {
  flex: 1;
  margin-left: 272px;
  display: flex;
  flex-direction: column;
}

.top-bar-white {
  background-color: #ffffff;
  height: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pesquisa-wrapper { display: flex; align-items: center; background-color: #f5f5f5; border-radius: 35px; padding: 6px 10px 6px 20px; width: 100%; max-width: 500px; height: 48px; justify-content: space-between; }

.input-busca-real { border: none; background: transparent; font-size: 15px; color: #333; width: 100%; font-style: italic; }

.btn-filtrar { display: flex; align-items: center; gap: 8px; background: transparent; border: none; color: #790ce6; font-size: 15px; font-weight: 600; font-style: italic; cursor: pointer; padding: 5px 15px; border-left: 1px solid rgba(0, 0, 0, 0.1); }

/* =========================================
   CENTRAL DE MODERAÇÃO
   ========================================= */
.dashboard-wrapper {
  padding: 40px;
  max-width: 1400px;
}

.dash-header { margin-bottom: 30px; }

.dash-title { font-size: 28px; font-weight: 800; color: #000; margin: 0 0 8px 0; }

.dash-subtitle { font-size: 15px; color: #666; margin: 0; }

/* Métricas (Cards no topo) */
.metrics-row {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  flex: 1;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 25px 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-value { font-size: 32px; font-weight: 800; color: #000; margin: 0 0 5px 0; line-height: 1; }

.metric-label { font-size: 14px; color: #888; font-weight: 500; }

/* Linhas coloridas dos cards (Padrão Admin) */
.line-red    { border-left: 6px solid #e11d48; }

.line-orange { border-left: 6px solid #ea580c; }

.line-purple { border-left: 6px solid #790ce6; }

.line-green  { border-left: 6px solid #16a34a; }

/* Grid Inferior */
.dash-grid {
  display: flex;
  gap: 25px;
}

.dash-col-left { flex: 1.1; display: flex; flex-direction: column;}

.dash-col-right { flex: 1; display: flex; flex-direction: column; gap: 25px; }

.h-100 { height: 100%; }

/* Faz o card da esquerda esticar */

/* Painéis Padrões */
.card-painel {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 30px 35px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
}

.panel-header { margin-bottom: 25px; }

.panel-title { font-size: 18px; font-weight: 800; color: #000; margin: 0 0 4px 0; }

.panel-subtitle { font-size: 13px; color: #888; margin: 0; }

/* Listas */
.panel-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.list-item:last-child { border-bottom: none; padding-bottom: 0; }

.list-item-gray {
  background-color: #f9fafc;
  padding: 16px 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-texts { display: flex; flex-direction: column; gap: 4px; }

.item-title { font-size: 15px; font-weight: 700; color: #000; margin: 0; }

.item-desc { font-size: 13px; color: #666; margin: 0; }

/* Badges de Moderação */
.badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.badge-critico { background-color: #ffe4e6; color: #e11d48; }

/* Vermelho claro */
.badge-alto    { background-color: #ffedd5; color: #c2410c; }

/* Laranja escuro */
.badge-medio   { background-color: #fef3c7; color: #b45309; }

/* Amarelo/Laranja claro */

/* --- Card Escuro (Ações de Segurança) --- */
.card-painel-dark {
  background-color: #251446; /* Roxo muito escuro */
  border-radius: 16px;
  padding: 35px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.dark-title { font-size: 20px; font-weight: 800; color: #ffffff; margin: 0 0 15px 0; }

.dark-desc { font-size: 14px; color: #e2d5f8; line-height: 1.5; margin: 0 0 30px 0; }

.dark-btn-row {
  display: flex;
  gap: 15px;
}

/* Botões */
.mt-auto { margin-top: auto; padding-top: 30px; }

.mt-15 { margin-top: 20px; }

.panel-footer-btn-left { display: flex; justify-content: flex-start; }

.btn-primary {
  background-color: #790ce6;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary:hover { background-color: #6109b8; }

.btn-light-purple {
  background-color: #f3e8ff;
  color: #790ce6;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-light-purple:hover { background-color: #ead9ff; }

.btn-danger-solid {
  background-color: #d93d59; /* Rosa/Vermelho específico da imagem */
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-danger-solid:hover { background-color: #be334c; }

.btn-white-purple {
  background-color: #ffffff;
  color: #790ce6;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-white-purple:hover { background-color: #f0f0f0; }

@media (max-width: 1024px) {
  .dashboard-wrapper {
    padding: 30px 20px;
  }

/* Permite que as métricas superiores quebrem para 2 linhas (2 em cima, 2 em baixo) */
  .metrics-row {
    flex-wrap: wrap;
  }

.metric-card {
    min-width: 200px; /* Garante tamanho mínimo para o texto respirar */
  }

/* Empilha o bloco de Prioridade Imediata em cima e as Ações de Segurança em baixo */
  .dash-grid {
    flex-direction: column;
  }

/* Ajusta o padding da barra branca */
  .top-bar-white {
    padding: 0 20px;
  }
}

/* Ecrãs Pequenos (Telemóveis) - Abaixo de 768px */
@media (max-width: 768px) {
  /* Esconde a Sidebar na lateral */
  .side-bar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

/* Faz o conteúdo principal ocupar todo o ecrã */
  .main-content {
    margin-left: 0;
  }

/* Ajustes da barra de pesquisa e topo */
  .top-bar-white {
    padding: 0 15px;
    gap: 15px;
  }

.pesquisa-wrapper {
    padding: 6px 10px;
  }

.input-busca-real {
    font-size: 14px;
  }

/* Esconde o texto "Filtrar" no botão do mobile */
  .btn-filtrar span {
    display: none;
  }

/* Esconde os textos do perfil no topo para liberar espaço (deixa só o avatar) */
  .perfil-textos-top {
    display: none;
  }

/* Ajustes de tipografia do cabeçalho */
  .dash-title {
    font-size: 24px;
  }

.dash-subtitle {
    font-size: 14px;
  }

/* Força os cards de métricas a ocuparem toda a largura no mobile */
  .metrics-row {
    flex-direction: column;
  }

/* Ajustes nos painéis e botões */
  .card-painel,
  .card-painel-dark {
    padding: 20px 15px;
  }

/* Painel Escuro (Ações de Segurança): Força os botões a ficarem um por baixo do outro */
  .dark-btn-row {
    flex-direction: column;
    gap: 10px;
  }

.btn-primary,
  .btn-light-purple,
  .btn-danger-solid,
  .btn-white-purple {
    width: 100%;
    text-align: center;
  }
}