/* ============================================================
   New Co × TrustElevate — Investment Intelligence Platform
   Design tokens & base styles
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- Surfaces (deep navy / charcoal) ---- */
  --bg:        #070c17;
  --bg-2:      #0a1020;
  --surface:   #0e1729;
  --surface-2: #131f37;
  --surface-3: #1a2a48;
  --rail:      #0a101f;

  /* ---- Lines ---- */
  --border:        rgba(148,163,184,0.12);
  --border-strong: rgba(148,163,184,0.22);
  --border-faint:  rgba(148,163,184,0.07);

  /* ---- Text ---- */
  --text:   #eef2f9;
  --text-2: #9db0cd;
  --text-3: #61708c;

  /* ---- AI commercial analysis (electric blue) ---- */
  --ai:      #3b82f6;
  --ai-2:    #60a5fa;
  --ai-deep: #1d4ed8;
  --ai-bg:   rgba(59,130,246,0.13);
  --ai-line: rgba(59,130,246,0.35);

  /* ---- TrustElevate governance (emerald / jade) ---- */
  --trust:      #10c98b;
  --trust-2:    #34e0a5;
  --trust-deep: #0b9c6c;
  --trust-bg:   rgba(16,201,139,0.12);
  --trust-line: rgba(16,201,139,0.34);
  --trust-glow: rgba(16,201,139,0.20);

  /* ---- States ---- */
  --amber:    #f6a823;
  --amber-bg: rgba(246,168,35,0.13);
  --amber-line: rgba(246,168,35,0.34);
  --red:      #fb5d6d;
  --red-bg:   rgba(251,93,109,0.13);
  --red-line: rgba(251,93,109,0.34);
  --violet:   #9b8cff;
  --violet-bg: rgba(155,140,255,0.13);

  /* ---- Radii ---- */
  --r-xs: 6px;
  --r-sm: 9px;
  --r:    13px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* ---- Shadow ---- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow:    0 8px 24px -8px rgba(0,0,0,0.55);
  --shadow-lg: 0 24px 60px -16px rgba(0,0,0,0.65);

  /* ---- Type ---- */
  --font-sans: 'Manrope', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Manrope', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --sidebar-w: 252px;
  --topbar-h: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { height: 100%; }

::selection { background: rgba(16,201,139,0.3); }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.18);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.32); background-clip: content-box; }

h1,h2,h3,h4,h5 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.display { font-family: var(--font-display); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---- Utility layout ---- */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 2px; } .gap-4 { gap: 4px; } .gap-6 { gap: 6px; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.grow { flex: 1; } .wrap { flex-wrap: wrap; }
.mut { color: var(--text-2); } .faint { color: var(--text-3); }

/* ---- App scaffold ---- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100%; }

/* fade-in for screen transitions */
@keyframes scrIn {
  from { transform: translateY(8px); }
  to   { transform: translateY(0); }
}
.screen { animation: scrIn 0.34s cubic-bezier(.22,.8,.3,1) both; opacity: 1; }

@keyframes barGrow { from { width: 0 !important; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ringDraw { from { stroke-dashoffset: var(--circ); } }
@keyframes pulse {
  0%,100% { opacity: 1; } 50% { opacity: 0.45; }
}
.pulse-dot { animation: pulse 1.8s ease-in-out infinite; }

/* ---- Card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }

/* ---- Scrollable main ---- */
.main-scroll { overflow-y: auto; overflow-x: hidden; }

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