/* Reset, tipografia, cores e espaçamento. */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --primary: #1f2937;
  --primary-text: #ffffff;
  --accent: #2563eb;
  --accent-bg: #eff6ff;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --success: #059669;
  --success-bg: #ecfdf5;
  --focus: #2563eb;
  --overlay: rgba(17, 20, 24, 0.45);
  --shadow: 0 10px 30px rgba(17, 20, 24, 0.12);

  --p1: #dc2626;
  --p2: #d97706;
  --p3: #6b7280;

  --radius: 8px;
  --radius-sm: 6px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --sidebar-w: 224px;
  --topbar-h: 56px;
  --content-max: 1200px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --surface: #1a1e24;
    --surface-2: #20252d;
    --border: #2c323b;
    --border-strong: #3b424d;
    --text: #e6e8eb;
    --text-muted: #9aa3ae;
    --text-faint: #6b7280;
    --primary: #e6e8eb;
    --primary-text: #111418;
    --accent: #60a5fa;
    --accent-bg: #1a2436;
    --danger: #f87171;
    --danger-bg: #2a1616;
    --warning: #fbbf24;
    --warning-bg: #3a2e0f;
    --success: #34d399;
    --success-bg: #0f2a20;
    --focus: #60a5fa;
    --overlay: rgba(0, 0, 0, 0.6);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --p1: #f87171;
    --p2: #fbbf24;
    --p3: #9aa3ae;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

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

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

[hidden] { display: none !important; }

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 12px; }
.danger-text { color: var(--danger); }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: var(--space-2); }
.col { display: flex; flex-direction: column; gap: var(--space-2); }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }

.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;
}
