/* ══════════════════════════════════════════════
   Spectrum Dados — Design Tokens v4.0
   ══════════════════════════════════════════════ */

:root {
  /* ── Primárias ── */
  --dark: #1a2332;
  --teal: #2a9d8f;
  --teal-dark: #1a7a6e;
  --turquoise: #4ECDC4;

  /* ── Fundos ── */
  --bg: #F0FAF8;
  --bg-card: #FFFFFF;
  --bg-subtle: #f8fffe;
  --bg-field: #F8F9FB;

  /* ── Texto ── */
  --text: #1a2332;
  --text-secondary: #6b7c8f;
  --text-muted: #94a3b8;
  --text-faint: #c5cfd8;

  /* ── Bordas ── */
  --border: #e2e8f0;
  --border-subtle: #e8f0ee;

  /* ── Feedback ── */
  --warn-bg: #fffbeb;
  --warn-text: #92400e;
  --warn: #F59E0B;
  --danger: #dc2626;
  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;
  --success: #16a34a;
  --success-bg: #ECFDF5;
  --success-border: #A7F3D0;

  /* ── Border radius ── */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* ── Transições ── */
  --tr: 0.2s ease;

  /* ── Fonts ── */
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'DM Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace;

  /* ── Layout ── */
  --topbar-h: 52px;
  --tabs-h: 40px;
  --header-h: calc(var(--topbar-h) + var(--tabs-h));

  /* ── Compat legado (temporário até Fase 5) ── */
  --navy: var(--dark);
  --card: var(--bg-card);
  --text2: var(--text-secondary);
  --muted: var(--text-muted);
  --r: var(--r-sm);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: var(--font); font-size: inherit; }
table { border-collapse: collapse; width: 100%; }
img, svg { display: block; max-width: 100%; }

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

/* ── Selection ── */
::selection { background: rgba(42,157,143,0.15); color: var(--dark); }

/* ── Focus ── */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ── SR-only ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Keyframes ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
