/* ============================================================
   D Digital CRM — Design Tokens & Base
   Tema dark corporativo · alto contraste · minimalista
   Marca: #000 #FFF #004AAD (azul) #FECF00 (amarelo)
   ============================================================ */

:root {
  /* Brand */
  --brand-blue: #004AAD;
  --brand-blue-600: #0556c6;
  --brand-blue-400: #2f7ce8;
  --brand-blue-300: #5b9bf0;
  --brand-yellow: #FECF00;
  --brand-yellow-soft: #ffe066;

  /* Neutrals — cool near-black */
  --bg: #0a0c10;
  --bg-grid: #0c0f14;
  --surface: #11141a;
  --surface-2: #161a22;
  --elevated: #1b2029;
  --hover: #20262f;

  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f3f5f8;
  --text-2: #aeb6c2;
  --text-3: #6c7686;
  --text-dim: #4a525f;

  /* Accent translucency */
  --blue-ghost: rgba(47, 124, 232, 0.12);
  --blue-ghost-2: rgba(47, 124, 232, 0.20);
  --yellow-ghost: rgba(254, 207, 0, 0.12);

  --success: #2fcf7a;
  --success-ghost: rgba(47, 207, 122, 0.12);
  --danger: #f0556b;

  /* Type */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px rgba(47, 124, 232, 0.30);

  --maxw: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow: hidden;
}

#root { height: 100vh; height: 100dvh; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }

::selection { background: var(--brand-yellow); color: #000; }

/* Scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-dim); background-clip: padding-box; }

/* Focus */
:focus-visible { outline: none; box-shadow: var(--ring); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* App background texture — faint grid */
.app-bg::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% -10%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 90% 70% at 70% -10%, #000 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Utility ---------- */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.grow { flex: 1; }
.mono { font-family: 'Sora', monospace; font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- Brand mark (CSS squares) ---------- */
.mark { display: inline-grid; grid-template-columns: 1fr; gap: 3px; width: 22px; }
.mark i { display: block; height: 12px; border-radius: 2px; }
.mark i:first-child { background: var(--brand-yellow); }
.mark i:last-child { background: var(--brand-blue); }

/* fade/slide entrance */
/* Entrance animations — transform-only so content is NEVER hidden if a
   host pauses the animation timeline (opacity stays 1 at all times). */
@keyframes fadeUp { from { transform: translateY(9px); } to { transform: none; } }
@keyframes fadeIn { from { transform: none; } to { transform: none; } }
@keyframes popIn { from { transform: scale(0.96); } to { transform: none; } }
.fade-up { animation: fadeUp 0.42s cubic-bezier(0.22,1,0.36,1) both; }
.fade-in { animation: fadeIn 0.3s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
