/* ============================================================
   ARIUS FINANCE — Design System
   "Você coloca seus números. O app faz as contas."
   Direção: dark SaaS técnico — roxo + âmbar, números em mono.
   Consistente com a identidade visual da família Arius
   (ariustelas, arius-crm): Bricolage Grotesque + Manrope + JetBrains Mono.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Base */
  --bg: #0a0a0b;
  --bg-elevated: #0f0f11;
  --surface: #111113;
  --surface-2: #1a1a1e;
  --surface-3: #232328;

  /* Text */
  --text: #fafafa;
  --text-soft: #e4e4e7;
  --text-muted: #a1a1aa;
  --text-faint: #6b6b74;

  /* Brand — violeta */
  --violet: #7c3aed;
  --violet-light: #a78bfa;
  --violet-dim: #5b3aa0;
  --violet-glow: rgba(124, 58, 237, 0.35);
  --violet-pale: rgba(124, 58, 237, 0.12);

  /* Accent — âmbar */
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-deep: #b45309;
  --amber-pale: rgba(245, 158, 11, 0.14);

  /* Signal */
  --good: #34d399;
  --good-pale: rgba(52, 211, 153, 0.14);
  --bad: #f87171;
  --bad-pale: rgba(248, 113, 113, 0.14);

  /* Structure */
  --line: #27272a;
  --line-soft: #1e1e22;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  --glow-violet: 0 0 0 1px rgba(124,58,237,0.4), 0 8px 32px rgba(124,58,237,0.25);

  /* Type */
  --font-display: 'Bricolage Grotesque Variable', 'Bricolage Grotesque', sans-serif;
  --font-body: 'Manrope Variable', 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Layout */
  --nav-h: 72px;
  --sidebar-w: 232px;
  --max-w: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

/* Atmosphere: violet mesh glow + fine grain, not flat black */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(680px circle at 12% -10%, rgba(124,58,237,0.20), transparent 60%),
    radial-gradient(520px circle at 100% 0%, rgba(245,158,11,0.10), transparent 55%);
}
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
.font-display { font-family: var(--font-display); }

.num-hero {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- Marca ---------- */
.brand-logo { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(124,58,237,0.5)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: var(--r-pill);
  border: none;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--violet-light), var(--violet));
  color: #fff;
  box-shadow: var(--glow-violet);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-gold {
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  color: #1a1206;
  box-shadow: 0 8px 24px rgba(245,158,11,0.25);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text-soft);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--violet-light); color: var(--text); }

.btn-block { width: 100%; }
.btn-sm { padding: 10px 16px; font-size: 13px; }

.btn-icon {
  width: 44px; height: 44px; padding: 0; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1.5px solid var(--line); color: var(--text-soft);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.field input, .field select {
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color-scheme: dark;
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus, .field select:focus {
  border-color: var(--violet-light);
  box-shadow: 0 0 0 3px var(--violet-pale);
}
.field-error input { border-color: var(--bad); }
.field-hint { font-size: 12px; color: var(--bad); min-height: 14px; }

.field-prefix { position: relative; }
.field-prefix span {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); font-weight: 600; pointer-events: none;
}
.field-prefix input { padding-left: 40px; }

/* ---------- Tags / badges ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700;
}
.tag-good { background: var(--good-pale); color: var(--good); }
.tag-warn { background: var(--amber-pale); color: var(--amber-light); }
.tag-bad { background: var(--bad-pale); color: var(--bad); }
.tag-neutral { background: var(--surface-3); color: var(--text-muted); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
