/* ==============================================================================
   GEOCRACIA RADAR NORMATIVO - DESIGN SYSTEM & ESTILOS LIGHT TECH PREMIUM
   Tema Claro: Fundo Branco / Cinza Claro, Alta Legibilidade e Elegância Institucional
   ============================================================================== */

:root {
  /* Cores Base e Superfícies (Tema Light Clean) */
  --bg-app: #f8fafc;              /* Slate-50: Fundo suave e moderno */
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-subnav: #ffffff;
  --bg-card: #ffffff;             /* Branco puro para cartões e modais */
  --bg-card-hover: #ffffff;
  --bg-card-elevated: #f1f5f9;    /* Slate-100 para caixas de código e callouts */
  --bg-input: #ffffff;
  --border-subtle: #e2e8f0;       /* Slate-200 */
  --border-strong: #cbd5e1;       /* Slate-300 */
  --border-glow: rgba(2, 132, 199, 0.25);

  /* Tipografia & Contrastes */
  --text-primary: #0f172a;        /* Slate-900: máxima legibilidade */
  --text-secondary: #334155;      /* Slate-700 */
  --text-muted: #64748b;          /* Slate-500 */
  --text-light: #475569;          /* Slate-600 */

  /* Identidade Visual Geocracia & Temas */
  --color-primary: #0284c7;       /* Azul Geocracia */
  --color-primary-dark: #0369a1;
  --color-primary-light: #e0f2fe;
  --color-primary-glow: rgba(2, 132, 199, 0.25);

  --color-emerald: #10b981;       /* Cadastros & Território */
  --color-emerald-light: #dcfce7;
  --color-emerald-text: #15803d;

  --color-purple: #8b5cf6;        /* Cidades Inteligentes */
  --color-purple-light: #f3e8ff;
  --color-purple-text: #6b21a8;

  --color-amber: #f59e0b;         /* Inteligência Artificial / Prazos */
  --color-amber-light: #fef3c7;
  --color-amber-text: #b45309;

  --color-pink: #ec4899;          /* Dados Abertos */
  --color-pink-light: #fce7f3;
  --color-pink-text: #be185d;

  --color-danger: #ef4444;

  /* Fontes */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Sombras & Efeitos Light */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --shadow-card-hover: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Transições Suaves */
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(at 0% 0%, rgba(2, 132, 199, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 50%);
  min-height: 100vh;
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==============================================================================
   HEADER PRINCIPAL
   ============================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

/* Animação do Radar */
.radar-ping-wrapper {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.radar-blip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.6);
  z-index: 2;
}

.radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 70%, rgba(2, 132, 199, 0.45) 100%);
  animation: radar-spin 2.5s linear infinite;
}

@keyframes radar-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.system-status-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: #047857;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.status-dot.pulsing {
  box-shadow: 0 0 8px #10b981;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Header Center: Barra de Busca Rápida */
.header-center {
  flex: 1;
  max-width: 520px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  background: #ffffff;
}

.search-icon {
  color: var(--text-muted);
  margin-right: 0.65rem;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: #e2e8f0;
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.clear-search-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  margin-left: 0.5rem;
}

/* Header Actions: Botões de Transparência, API, Portal e Alertas */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-header-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.btn-header-link:hover {
  background: #f8fafc;
  border-color: var(--border-strong);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.btn-header-link .btn-icon {
  font-size: 0.95rem;
}

.btn-newsletter-highlight {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.btn-newsletter-highlight:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.btn-refresh {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.btn-refresh:hover {
  background: #f8fafc;
  color: var(--color-primary);
  border-color: var(--border-strong);
}

.btn-refresh.spinning svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-pro {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.45rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-pro:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* ==============================================================================
   SUB-NAVBAR COM TABS
   ============================================================================== */
.sub-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--bg-subnav);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.nav-tabs {
  display: flex;
  gap: 0.25rem;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: #f8fafc;
}

.nav-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: #f0f9ff;
}

.tab-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: #f1f5f9;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.pro-tag {
  font-size: 0.6rem;
  font-weight: 800;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.sub-navbar-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ==============================================================================
   MÉTRICAS STRIP
   ============================================================================== */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1.25rem 2rem 0.5rem 2rem;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.metric-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.bg-cyan { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.bg-emerald { background: #dcfce7; color: #059669; border: 1px solid #bbf7d0; }
.bg-amber { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.bg-purple { background: #f3e8ff; color: #7c3aed; border: 1px solid #e9d5ff; }

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ==============================================================================
   ÁREA PRINCIPAL DE CONTEÚDO & FILTROS
   ============================================================================== */
.main-content {
  flex: 1;
  padding: 1.25rem 2rem 2.5rem 2rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Painel de Filtros */
.filter-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}

.theme-chips-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.theme-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #f8fafc;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.theme-chip:hover {
  background: #f1f5f9;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.theme-chip.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.chip-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Linha Secundária de Filtros */
.secondary-filters-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.filter-select {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.filter-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

/* ==============================================================================
   FEED DE ATOS NORMATIVOS (CARDS)
   ============================================================================== */
.feed-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.feed-count-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.feed-count-text strong {
  color: var(--text-primary);
}

.acts-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.act-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 5px solid #0284c7; /* Cor padrão caso não especificado */
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.6rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.act-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* ==============================================================================
   CATEGORIZAÇÃO POR CORES DOS CARDS (EIXOS TEMÁTICOS GEOCRACIA)
   ============================================================================== */
/* 1. Geoinformação & SIG (Azul Oceano) */
.act-card.theme-border-geoinformacao {
  border-left: 6px solid #0284c7 !important;
}
.act-card.theme-border-geoinformacao:hover {
  border-color: #7dd3fc;
  box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.14), 0 4px 6px -2px rgba(2, 132, 199, 0.06);
}

/* 2. Cadastros & Governança Territorial (Verde Esmeralda) */
.act-card.theme-border-cadastros {
  border-left: 6px solid #10b981 !important;
}
.act-card.theme-border-cadastros:hover {
  border-color: #86efac;
  box-shadow: 0 10px 25px -4px rgba(16, 185, 129, 0.14), 0 4px 6px -2px rgba(16, 185, 129, 0.06);
}

/* 3. Cidades Inteligentes & IoT (Roxo Violeta) */
.act-card.theme-border-cidades_inteligentes {
  border-left: 6px solid #8b5cf6 !important;
}
.act-card.theme-border-cidades_inteligentes:hover {
  border-color: #c4b5fd;
  box-shadow: 0 10px 25px -4px rgba(139, 92, 246, 0.14), 0 4px 6px -2px rgba(139, 92, 246, 0.06);
}

/* 4. Inteligência Artificial no Setor Público (Âmbar / Laranja) */
.act-card.theme-border-inteligencia_artificial {
  border-left: 6px solid #f59e0b !important;
}
.act-card.theme-border-inteligencia_artificial:hover {
  border-color: #fcd34d;
  box-shadow: 0 10px 25px -4px rgba(245, 158, 11, 0.14), 0 4px 6px -2px rgba(245, 158, 11, 0.06);
}

/* 5. Dados Abertos & Governo Digital (Rosa / Magenta) */
.act-card.theme-border-dados_abertos {
  border-left: 6px solid #ec4899 !important;
}
.act-card.theme-border-dados_abertos:hover {
  border-color: #f9a8d4;
  box-shadow: 0 10px 25px -4px rgba(236, 72, 153, 0.14), 0 4px 6px -2px rgba(236, 72, 153, 0.06);
}

/* Card em Destaque */
.act-card.destaque {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* ==============================================================================
   CABEÇALHO DO CARD & BADGES
   ============================================================================== */
.act-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.act-meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Badge do Assunto Principal no Topo */
.theme-primary-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.theme-primary-badge.geoinformacao {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.theme-primary-badge.cadastros {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.theme-primary-badge.cidades_inteligentes {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}
.theme-primary-badge.inteligencia_artificial {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.theme-primary-badge.dados_abertos {
  background: #fce7f3;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.badge-act-type {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.badge-esfera {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-esfera.federal {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.badge-esfera.municipal {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-esfera.estadual {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #f3e8ff;
}

.badge-uf-pill {
  font-size: 0.68rem;
  font-weight: 800;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.act-date-pill, .act-date-edition {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-muted);
}

.act-score-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.badge-impact {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-impact.alto {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-impact.medio {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

.badge-impact.baixo {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* ==============================================================================
   CONTEÚDO DO CARD: TÍTULO, ÓRGÃO E RESUMO IA
   ============================================================================== */
.act-card-title, .act-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.act-card-orgao, .act-orgao {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.act-card-summary, .act-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--color-primary);
  border-radius: 8px;
  padding: 0.85rem 1.15rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.act-card-summary strong, .act-summary strong {
  color: var(--text-primary);
}

/* ==============================================================================
   RODAPÉ DO CARD: TAGS TEMÁTICAS COLORIDAS, PRAZOS & AÇÕES
   ============================================================================== */
.act-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Lista de Tags com Espaçamento Visível e Flex */
.act-themes-list, .act-tags-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Pílula Individual de Tema com Cores de Assunto */
.theme-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  border-width: 1px;
  border-style: solid;
  transition: var(--transition);
  white-space: nowrap;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.theme-tag:hover {
  transform: translateY(-1px);
}

.theme-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Cores específicas de cada tag no rodapé do card */
.theme-tag.geoinformacao {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.theme-tag.cadastros {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.theme-tag.cidades_inteligentes {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #6b21a8;
}

.theme-tag.inteligencia_artificial {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.theme-tag.dados_abertos {
  background: #fdf2f8;
  border-color: #fbcfe8;
  color: #be185d;
}

/* Fallback de compatibilidade caso classe term-tag seja usada */
.term-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}

/* Badge de Prazos */
.act-deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.act-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.btn-read-more, .btn-view-act {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  color: var(--color-primary);
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-read-more:hover, .btn-view-act:hover {
  background: #f0f9ff;
  color: var(--color-primary-dark);
  border-color: #7dd3fc;
  transform: translateX(2px);
}

.act-source-link {
  font-size: 0.75rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.act-source-link:hover {
  text-decoration: underline;
}

/* ==============================================================================
   MODAIS (LEITURA, FONTES, TERMOS E PRO)
   ============================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text-primary);
  animation: modal-slide-in 0.25s ease;
}

@keyframes modal-slide-in {
  from { transform: translateY(15px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.modal-kicker {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.modal-close-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  background: #f8fafc;
}

/* Detalhes do Ato (Leitura) */
.modal-act-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.modal-act-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.modal-act-orgao {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.modal-act-summary-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.modal-act-summary-box h4 {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0369a1;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.modal-act-summary-box p {
  font-size: 0.88rem;
  color: #0c4a6e;
}

.modal-full-text-container {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-height: 340px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* ==============================================================================
   MODAL: FONTES CONECTADAS
   ============================================================================== */
.modal-fontes {
  max-width: 860px;
}

.modal-intro-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.fontes-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.2rem;
  margin-bottom: 1.5rem;
}

.fsb-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-indicator-badge.live {
  font-size: 0.75rem;
  font-weight: 800;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.fsb-text {
  font-size: 0.82rem;
  color: #065f46;
  font-weight: 500;
}

.btn-secondary-sm {
  background: #ffffff;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary-sm:hover {
  background: #d1fae5;
}

.fontes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fonte-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.fonte-card.planned {
  background: #f8fafc;
  opacity: 0.85;
}

.fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fc-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.fc-badge.federal { background: #eff6ff; color: #1d4ed8; }
.fc-badge.municipal { background: #ecfdf5; color: #047857; }
.fc-badge.estadual { background: #faf5ff; color: #7e22ce; }

.fc-status-pill.online {
  font-size: 0.7rem;
  font-weight: 700;
  color: #10b981;
}

.fc-status-pill.roadmap {
  font-size: 0.68rem;
  font-weight: 700;
  color: #8b5cf6;
}

.fonte-card h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.fc-origin {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.fc-details {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.76rem;
  margin-top: 0.25rem;
  padding-top: 0.65rem;
  border-top: 1px solid #f1f5f9;
}

.fc-detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.fcd-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.fcd-val {
  color: var(--text-secondary);
}

.fc-link {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.fontes-methodology-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}

.fontes-methodology-box h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.fontes-methodology-box p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==============================================================================
   MODAL: TERMOS DE USO
   ============================================================================== */
.modal-termos {
  max-width: 800px;
}

.termos-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.termos-section h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.termos-section p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==============================================================================
   MODAL: CAMADA PRO
   ============================================================================== */
.modal-pro {
  max-width: 760px;
}

.pro-crown-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid #bae6fd;
}

.pro-modal-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.pro-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.pro-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pro-feature-item {
  display: flex;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.pfi-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.pfi-content h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.pfi-content p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.pro-pricing-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pricing-info {
  display: flex;
  flex-direction: column;
}

.price-tier {
  font-size: 0.75rem;
  font-weight: 800;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-val {
  font-size: 1.85rem;
  font-weight: 900;
  color: #14532d;
  font-family: var(--font-mono);
}

.price-val small {
  font-size: 0.9rem;
  font-weight: 600;
  color: #166534;
}

.price-sub {
  font-size: 0.75rem;
  color: #166534;
}

.btn-primary-glow {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-primary-glow:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

/* ==============================================================================
   ABA: SÍNTESE DIÁRIA & ANÁLISE
   ============================================================================== */
.sintese-header-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

.sintese-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.sintese-badge {
  font-size: 0.7rem;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.sintese-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sintese-header-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.sintese-executive-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.sintese-destaques-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.sintese-chart-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
}

.sintese-chart-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.theme-bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.theme-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-bar-label {
  width: 220px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.theme-bar-track {
  flex: 1;
  height: 10px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.theme-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-bar-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  width: 30px;
  text-align: right;
}

/* ==============================================================================
   ABA: MONITOR DE PRAZOS (PRO)
   ============================================================================== */
.prazos-header-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prazos-header-left h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.prazos-header-left p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.prazos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.prazo-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prazo-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.prazo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prazo-badge {
  font-size: 0.7rem;
  font-weight: 800;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.prazo-orgao {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.prazo-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
}

.prazo-desc {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ==============================================================================
   ABA: PERGUNTE À IA (RAG REGULATÓRIO)
   ============================================================================== */
.ia-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.ia-search-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
}

.ia-search-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.ia-search-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.ia-input-wrapper {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ia-input {
  flex: 1;
  background: #f8fafc;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  font-size: 0.92rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.ia-input:focus {
  background: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-submit-ia {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 1.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
}

.btn-submit-ia:hover {
  background: var(--color-primary-dark);
}

.ia-suggestions-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.suggestions-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.suggestion-chip {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.suggestion-chip:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: var(--color-primary);
}

.ia-answer-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ia-answer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.ia-model-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
}

.ia-answer-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.ia-answer-body h3 {
  color: var(--text-primary);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.ia-answer-body strong {
  color: var(--text-primary);
}

.ia-answer-body ul {
  margin: 0.75rem 0 0.75rem 1.5rem;
}

.ia-sources-section h4 {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.ia-sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.ia-source-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ia-source-card:hover {
  background: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
  transform: translateY(-1px);
}

.ia-source-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.ia-source-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==============================================================================
   FOOTER INSTITUCIONAL LIGHT
   ============================================================================== */
.app-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem 1.5rem 2rem;
  margin-top: auto;
  color: var(--text-secondary);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.footer-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.footer-links-group {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.footer-col a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-status-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: #059669;
  font-weight: 600;
  margin-top: 0.4rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==============================================================================
   TOAST NOTIFICATIONS
   ============================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #0f172a;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: toast-in 0.25s ease;
  max-width: 380px;
}

.toast.success { background: #065f46; border-left: 4px solid #34d399; }
.toast.info { background: #0f172a; border-left: 4px solid var(--color-primary); }
.toast.warning { background: #78350f; border-left: 4px solid #f59e0b; }

@keyframes toast-in {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==============================================================================
   ESTILOS MODERNOS DO ARQUIVO PESQUISÁVEL (TENDÊNCIA MODERNA DE BUSCA)
   ============================================================================== */
.search-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 50%, #f8fafc 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.search-hero-card::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.search-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid #7dd3fc;
}

.search-coverage-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.search-hero-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.search-hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 820px;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

/* Super Command Search Bar */
.modern-search-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.modern-search-bar {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem 0.4rem 1.15rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: var(--transition);
  gap: 0.85rem;
}

.modern-search-bar:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15), 0 8px 20px rgba(2, 132, 199, 0.08);
}

.search-icon-wrapper {
  color: var(--color-primary);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.modern-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: transparent;
  padding: 0.5rem 0;
}

.modern-search-input::placeholder {
  color: #94a3b8;
  font-size: 0.95rem;
}

.btn-clear-modern-search {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 0.35rem;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-clear-modern-search:hover {
  color: #ef4444;
}

.search-shortcut-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search-shortcut-badge kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  font-family: var(--font-mono);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* Modos de Busca */
.search-modes-strip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.modes-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
}

.modes-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.mode-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--text-primary);
}

.mode-pill.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

/* Trending Chips */
.search-trending-strip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(2, 132, 199, 0.2);
}

.trending-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.trending-chips-list {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.trending-chip {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.28rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.trending-chip:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
  transform: translateY(-1px);
}

/* Facetas em Barra */
.modern-facets-bar {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.facet-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.facet-row-themes {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.facet-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.facet-cluster-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.facet-pills-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.facet-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.facet-pill-item:hover {
  background: #f1f5f9;
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.facet-pill-item.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.pill-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.facet-pill-item.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Active Applied Filter Tags */
.applied-filters-strip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.applied-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #166534;
}

.applied-tags-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.applied-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid #86efac;
  border-radius: var(--radius-full);
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #15803d;
  cursor: pointer;
  transition: var(--transition);
}

.applied-filter-chip:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.btn-clear-applied {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: #15803d;
  cursor: pointer;
  margin-left: auto;
  text-decoration: underline;
}

.btn-clear-applied:hover {
  color: #dc2626;
}

/* Search Results Header & Controls */
.search-results-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-stats-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-results-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.latency-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.search-controls-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.view-mode-selector {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
}

.view-mode-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.view-mode-btn:hover {
  color: var(--text-primary);
}

.view-mode-btn.active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Search Term Highlighting */
mark.search-highlight {
  background-color: #fef08a;
  color: #854d0e;
  padding: 0.1em 0.25em;
  border-radius: 3px;
  font-weight: 700;
}

/* Cards View */
.pesquisa-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.pesquisa-act-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.pesquisa-act-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.pesquisa-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.pesquisa-card-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pesquisa-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.pesquisa-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 0.45rem;
}

.pesquisa-card-orgao {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pesquisa-card-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.15rem;
}

.pesquisa-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.prazo-tag-chip {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: var(--radius-full);
  padding: 0.2rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.pesquisa-card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-card-action {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-card-action:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

/* Analytical Table View */
.pesquisa-table-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.pesquisa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.pesquisa-table thead th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.pesquisa-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: var(--transition);
}

.pesquisa-table tbody tr:hover {
  background: #f0f9ff;
}

.pesquisa-table td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

.td-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.td-orgao {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.table-act-title {
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.table-act-summary {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.td-prazo {
  font-size: 0.76rem;
  color: #92400e;
  font-weight: 700;
}

.btn-table-action {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-table-action:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.pesquisa-empty-state {
  background: #ffffff;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
}

.pesquisa-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.pesquisa-empty-state h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.pesquisa-empty-state p {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ==============================================================================
   ESTILOS MODERNOS DA SÍNTESE DIÁRIA & ANÁLISE
   ============================================================================== */
.sintese-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.sintese-action-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-gerar-sintese {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: var(--transition);
}

.btn-gerar-sintese:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.sintese-sync-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #15803d;
}

.sintese-action-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sintese-hero-panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sintese-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.sintese-pre-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.sintese-main-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sintese-date-badge-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-dia {
  background: #0f172a;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.badge-hora {
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

/* KPI Strip */
.sintese-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.sintese-kpi-item {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sintese-kpi-item.highlight-today {
  background: #f0fdf4;
  border-color: #86efac;
}

.sintese-kpi-item.highlight-today .kpi-num {
  color: #15803d;
}

.kpi-num {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.kpi-txt {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Lead Box */
.sintese-lead-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 5px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.35rem 1.75rem;
  position: relative;
}

.quote-icon {
  position: absolute;
  top: -10px;
  right: 15px;
  font-size: 3.5rem;
  color: rgba(2, 132, 199, 0.12);
  font-family: Georgia, serif;
  line-height: 1;
}

.sintese-lead-text {
  font-size: 1.05rem;
  color: #0369a1;
  line-height: 1.7;
  font-weight: 500;
}

/* Section Blocks */
.sintese-section-block {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sintese-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sintese-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.sintese-destaques-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.sintese-pontos-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sintese-ponto-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
}

.ponto-bullet {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ponto-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tendências */
.sintese-tendencias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.tendencia-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tendencia-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tendencia-tema {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.tendencia-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

.tendencia-tag.alta { background: #fee2e2; color: #dc2626; }
.tendencia-tag.emergente { background: #fef3c7; color: #d97706; }
.tendencia-tag.moderada { background: #dbeafe; color: #1d4ed8; }

.tendencia-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Modern Featured Cards Grid */
.sintese-destaques-modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.15rem;
}

.destaque-card-modern {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.destaque-card-modern:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.destaque-card-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.destaque-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.destaque-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.destaque-orgao {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.destaque-resumo {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.destaque-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid #f1f5f9;
}

.destaque-prazo-chip {
  background: #fef3c7;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.destaque-read-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* ==============================================================================
   ESTILOS MODERNOS DO PERGUNTE À IA (AI COPILOT RAG)
   ============================================================================== */
.ia-chat-interface {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ia-copilot-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
}

.ia-copilot-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #38bdf8;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.ia-copilot-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.ia-copilot-desc {
  font-size: 0.92rem;
  color: #cbd5e1;
  max-width: 620px;
  line-height: 1.6;
}

.ia-header-badges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.ia-trust-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Starters Card */
.ia-starters-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.starters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.starters-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.starters-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.starters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.starter-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.starter-card:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.starter-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.starter-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.starter-info strong {
  font-size: 0.88rem;
  color: var(--text-primary);
}

.starter-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Chat Stream */
.ia-chat-stream {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 120px;
}

.ia-chat-row {
  display: flex;
  gap: 0.85rem;
  width: 100%;
}

.ia-chat-row.user-row {
  justify-content: flex-end;
}

.ia-chat-row.assistant-row {
  justify-content: flex-start;
}

.ia-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.user-avatar {
  background: #e2e8f0;
}

.assistant-avatar {
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
}

.ia-user-bubble {
  background: #0284c7;
  color: #ffffff;
  border-radius: 16px 16px 2px 16px;
  padding: 1rem 1.35rem;
  max-width: 75%;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.ia-user-bubble .bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
}

.ia-user-bubble .bubble-content {
  font-size: 0.95rem;
  line-height: 1.6;
}

.ia-assistant-bubble {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 2px 16px 16px 16px;
  padding: 1.5rem 1.75rem;
  max-width: 90%;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ia-assistant-bubble.thinking {
  background: #f8fafc;
  border-style: dashed;
}

.ia-thinking-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0;
}

.ia-assistant-bubble .bubble-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}

.bubble-author {
  font-weight: 800;
  color: var(--color-primary);
}

.bubble-badge {
  background: #dcfce7;
  color: #15803d;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.bubble-time {
  color: var(--text-muted);
  margin-left: auto;
}

/* Markdown Rendering in Chat */
.ia-markdown-rendered {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.ia-markdown-rendered .md-h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.ia-markdown-rendered .md-h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0369a1;
  margin-top: 1.15rem;
  margin-bottom: 0.35rem;
}

.ia-markdown-rendered strong {
  color: var(--text-primary);
  font-weight: 700;
}

.citation-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.3rem;
  font-family: var(--font-mono);
}

.md-code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.md-quote {
  background: #f8fafc;
  border-left: 4px solid var(--color-primary);
  padding: 0.85rem 1.15rem;
  margin: 1rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-radius: 0 8px 8px 0;
}

.md-ul {
  margin: 0.65rem 0 0.85rem 1.5rem;
}

.md-li {
  margin-bottom: 0.35rem;
}

.md-link {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
}

.md-p {
  margin-bottom: 0.75rem;
}

/* Fontes Citadas na Resposta */
.ia-sources-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.ia-sources-box-header {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.ia-sources-pills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.ia-source-item-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ia-source-item-card:hover {
  border-color: var(--color-primary);
  background: #f0f9ff;
  transform: translateY(-1px);
}

.source-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.source-idx {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0369a1;
  font-family: var(--font-mono);
}

.source-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.source-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
}

.source-orgao {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.source-action {
  font-size: 0.72rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-top: auto;
}

/* Follow-up Prompts */
.ia-followup-strip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-subtle);
}

.followup-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.followup-chips {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.followup-chip {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.followup-chip:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.ia-message-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-msg-action {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-msg-action:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

/* Chat Input Bar */
.ia-chat-input-bar {
  position: sticky;
  bottom: 1rem;
  z-index: 50;
}

.ia-input-box-wrapper {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.15rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: var(--transition);
}

.ia-input-box-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15), 0 12px 30px rgba(15, 23, 42, 0.12);
}

.ia-chat-textarea {
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  resize: none;
  background: transparent;
  width: 100%;
  line-height: 1.5;
}

.ia-input-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.45rem;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ia-input-meta {
  font-size: 0.72rem;
  color: #94a3b8;
}

.ia-input-meta kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.ia-input-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-clear-chat {
  background: transparent;
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-clear-chat:hover {
  color: #ef4444;
}

/* ==============================================================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ============================================================================== */
@media (max-width: 1024px) {
  .app-header {
    flex-wrap: wrap;
    padding: 0.75rem 1.25rem;
  }
  .header-center {
    order: 3;
    width: 100%;
    max-width: 100%;
  }
  .header-right {
    flex-wrap: wrap;
  }
  .main-content {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .system-status-pill {
    display: none;
  }
  .sub-navbar {
    padding: 0 1rem;
  }
  .metrics-strip {
    padding: 1rem 1rem 0 1rem;
  }
  .pro-features-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    flex-direction: column;
    gap: 2rem;
  }
}
