/* =========================================================
   🌈 DESIGN SYSTEM UNIFICADO — SISTEMA IA FLASK
   Autor: Marcelo Carvalho
   Versão: 1.0
   Descrição: Base de estilo global e responsiva
   ========================================================= */

/* 🎨 Paleta e variáveis globais */
:root {
  --color-primary: #667eea;
  --color-secondary: #764ba2;
  --color-success: #4caf50;
  --color-warning: #ffc107;
  --color-danger: #dc3545;
  --color-bg: #f4f7f6;
  --color-surface: #ffffff;
  --color-text: #2c3e50;
  --color-muted: #6c757d;

  --font-base: 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.9rem;
  --font-size-lg: 1.25rem;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-strong: 0 8px 32px rgba(0,0,0,0.12);
  --transition-fast: all 0.25s ease-in-out;
}

/* 🌍 Base global */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

p {
  color: var(--color-muted);
  margin-bottom: 1rem;
}

/* 📦 Containers e cards */
.container-fluid {
  width: 100%;
  padding: 1.5rem;
  margin: 0 auto;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-strong);
}

/* 🧭 Navbar simples */
.navbar {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  border-bottom: 3px solid rgba(255,255,255,0.2);
}

/* 🔘 Botões */
.btn {
  display: inline-block;
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
  color: white;
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

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

/* 🧩 Grid padrão */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* 🧱 Utilitários */
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.shadow-sm { box-shadow: var(--shadow-card); }
.rounded { border-radius: var(--radius-md); }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }

/* 🖼️ Imagens responsivas */
img, video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* 📱 Responsividade geral */
@media (max-width: 992px) {
  .container-fluid { padding: 1rem; }
  .card { padding: 1rem; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  .btn, .btn-primary, .btn-success {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .grid-auto { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { font-size: 0.95rem; }
  .card { padding: 0.75rem; }
  .navbar { text-align: center; font-size: 0.95rem; }
}

/* 🌟 Animações suaves */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}