/* ============================================================
   main.css — Variáveis CSS, reset e tipografia
   ============================================================ */

:root {
  /* Cores de status — Projetos */
  --status-planejamento: #94a3b8;
  --status-andamento: #22c55e;
  --status-pausado: #f59e0b;
  --status-concluido: #3b82f6;
  --status-cancelado: #6b7280;

  /* Cores de status — Tarefas */
  --status-a-fazer: #94a3b8;
  --status-em-andamento: #3b82f6;
  --status-aguardando: #f59e0b;
  --status-concluida: #22c55e;
  --status-cancelada: #6b7280;

  /* Cores de prioridade */
  --prio-urgente: #ef4444;
  --prio-alta: #f97316;
  --prio-media: #3b82f6;
  --prio-baixa: #94a3b8;

  /* Cores institucionais SETUR */
  --brand-primary: #1e40af;
  --brand-secondary: #0ea5e9;
  --brand-accent: #06b6d4;

  /* Neutros */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #1e293b;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #3b82f6;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);

  /* Tipografia */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Espaçamentos */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Raios */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Sidebar */
  --sidebar-width: 240px;
  --header-height: 56px;
}

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

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

img { max-width: 100%; display: block; }

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Scrollbar customizada (Webkit) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Tipografia */
h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h3 { font-size: 1rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: .875rem; font-weight: 600; }

p { line-height: 1.6; }

.text-sm { font-size: .8125rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--text-secondary); }
.text-danger { color: var(--prio-urgente); }
.text-success { color: var(--status-andamento); }
.text-warning { color: var(--status-pausado); }
.font-mono { font-family: var(--font-mono); font-size: .8125rem; }

/* Loading */
.loading-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast de notificação */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 9999;
}
.toast {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-sidebar);
  color: #fff;
  font-size: .875rem;
  box-shadow: var(--shadow-lg);
  animation: slideIn .2s ease;
  max-width: 320px;
}
.toast.success { background: #166534; }
.toast.error { background: #991b1b; }
.toast.warning { background: #92400e; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  html { font-size: 15px; }
}
