/* ==========================================================================
   GLOBAL.CSS - DESIGN SYSTEM MINIMALISTA (ESTILO MICROSOFT / GOOGLE)
   ========================================================================== */

:root {
  /* Cores Principais - Alta Eficácia */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f4;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  
  /* Cores de Destaque e Status */
  --color-blue: #1a73e8;       /* Royal Blue */
  --color-blue-hover: #1557b0;
  --color-teal: #008080;       /* Cyber Teal */
  --color-green: #0f9d58;      /* Safe/Low Risk */
  --color-orange: #f4b400;     /* Medium Risk */
  --color-red: #d93025;        /* High/Critical Risk */
  
  /* Estrutura e Bordas */
  --border-color: #dadce0;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  
  /* Sombras Sutis */
  --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  --shadow-md: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
  
  /* Transições rápidas para desempenho de UI */
  --transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Tema Escuro (Ativado via classe .dark-mode no body) */
.dark-mode {
  --bg-primary: #0f111a;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  
  --color-blue: #58a6ff;
  --color-blue-hover: #1f6feb;
  --color-teal: #39c5cf;
  --color-green: #3fb950;
  --color-orange: #d29922;
  --color-red: #f85149;
  
  --border-color: #30363d;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* Reset Resiliente e Responsivo (Mobile-First) */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 15px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Componentes de Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Cabeçalho Minimalista */
.navbar {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  background-color: #ffffff;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

/* Hero Section Simples e Eficiente */
.hero {
  padding: 3.5rem 0;
  text-align: center;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 1.5rem auto;
}

@media (min-width: 768px) {
  .hero {
    padding: 5rem 0;
  }
  .hero h1 {
    font-size: 3.2rem;
  }
}

/* Botões Modernos e Planos */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.625rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-blue {
  background-color: var(--color-blue);
  color: #ffffff;
}

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

.btn-flat {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-flat:hover {
  background-color: var(--bg-tertiary);
}

/* Seção de Pesquisa do CTRD */
.search-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 3rem 0;
}

@media (min-width: 992px) {
  .search-panel {
    grid-template-columns: 350px 1fr;
  }
}

/* Formulário e Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-blue);
}

/* Terminal de Respostas (Console) */
.terminal {
  background-color: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background-color: #161b22;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #30363d;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #c9d1d9;
  overflow-y: auto;
  max-height: 550px;
  min-height: 350px;
}

/* Estilos de Cartões */
.card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
}

/* Utilitários Gerais */
.text-muted { color: var(--text-secondary); }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
