/* ============================================================
   intelligence.css — Dark dashboard styles (intelligence.html)
   Depends on: base.css (load base.css first)
   ============================================================ */

/* ── Page base (dark) ── */
body {
  background: var(--dark-bg);
  color: var(--dark-text);
  overflow-x: hidden;
}

/* ── Scrollbar (dark override) ── */
::-webkit-scrollbar-track { background: var(--dark-surface); }
::-webkit-scrollbar-thumb { background: var(--dark-border); }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ── Sidebar ── */
#sidebar {
  width: 220px;
  transition: width 0.25s ease;
  flex-shrink: 0;
  background: var(--dark-surface);
  border-right: 1px solid var(--dark-border);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
#sidebar.collapsed { width: 60px; }
#sidebar.collapsed .nav-label,
#sidebar.collapsed .sidebar-logo-text,
#sidebar.collapsed .sidebar-section-label { display: none; }
#sidebar.collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }

.sidebar-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dark-muted);
  padding: 2px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark-muted);
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.nav-item:hover  { background: rgba(255,255,255,0.04); color: var(--dark-text); }
.nav-item.active { background: rgba(181,232,83,0.08); color: var(--accent-light); }

/* ── Cards (dark) ── */
.card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
}
.card-hover { transition: border-color 0.15s, box-shadow 0.15s; cursor: pointer; }
.card-hover:hover { border-color: #3a3a3a; box-shadow: 0 4px 28px rgba(0,0,0,0.5); }

/* ── Stat tiles (dark) ── */
.stat-tile {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

/* ── Top bar ── */
.dash-topbar {
  background: var(--dark-surface);
  border-bottom: 1px solid var(--dark-border);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* ── Search input (dark) ── */
.si-input {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  color: var(--dark-text);
  padding: 8px 14px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  font-family: var(--font-sans);
}
.si-input:focus { border-color: var(--accent-light); }
.si-input::placeholder { color: #444; }

/* ── Live badge ── */
.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(181,232,83,0.08);
  border: 1px solid rgba(181,232,83,0.2);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}
.live-badge span { font-size: 11px; font-weight: 700; color: var(--accent-light); }

/* ── Tab pills (dark) ── */
.tab-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--dark-border);
  color: var(--dark-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.tab-pill:hover  { border-color: var(--accent-light); color: var(--accent-light); }
.tab-pill.active { background: var(--accent-light); color: var(--dark-bg); border-color: var(--accent-light); }

/* ── Filter chips (dark) ── */
.filter-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--dark-border);
  color: var(--dark-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.filter-chip:hover  { border-color: var(--accent-light); color: var(--accent-light); }
.filter-chip.active { background: var(--accent-light); color: var(--dark-bg); border-color: var(--accent-light); }

/* ── Ghost button (dark) ── */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--dark-border);
  color: var(--dark-muted);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  font-family: var(--font-sans);
}
.btn-ghost:hover { border-color: var(--accent-light); color: var(--accent-light); }

/* ── Chart volume bars ── */
.chart-placeholder { display: flex; align-items: flex-end; gap: 3px; padding: 4px 0; }
.chart-bar { border-radius: 2px 2px 0 0; flex-shrink: 0; transition: background 0.15s; }
.chart-bar.up   { background: var(--accent-light); }
.chart-bar.down { background: var(--dark-danger); }
.chart-bar.dim  { background: var(--dark-border); }
.chart-bar:hover { opacity: 0.8; }

/* ── Insider table rows (dark) ── */
.it-row {
  display: grid;
  padding: 10px 16px;
  border-bottom: 1px solid var(--dark-card);
  transition: background 0.12s;
  cursor: pointer;
}
.it-row:hover { background: #1e1e1e; }
.it-row:last-child { border-bottom: none; }
.it-header { background: var(--dark-surface); }

/* ── Mover rows (dark) ── */
.mover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  transition: background 0.12s;
  cursor: pointer;
  border-bottom: 1px solid #1e1e1e;
}
.mover-row:last-child { border-bottom: none; }
.mover-row:hover { background: #1e1e1e; }

/* ── Sector bars ── */
.sector-bar-track { flex: 1; height: 6px; background: var(--dark-border); border-radius: 3px; overflow: hidden; }
.sector-bar-fill  { height: 100%; border-radius: 3px; transition: width 0.4s ease; }

/* ── Insider bubble chart ── */
#bubble-chart { position: relative; width: 100%; height: 300px; }

.bubble {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}
.bubble:hover { transform: scale(1.08); box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.bubble.buy  { background: radial-gradient(circle at 35% 35%, #d4f57a, #b5e853); color: #0d0d0d; }
.bubble.sell { background: radial-gradient(circle at 35% 35%, #ff7070, #ff4d4d); color: #fff; }

/* ── Ticker pill (dark override) ── */
.ticker-pill {
  background: #1e1e1e;
  border: 1px solid var(--dark-border);
  color: var(--accent-light);
}

/* ── Utility replacements (formerly Tailwind CDN) ── */

/* Layout */
body.flex, .flex  { display: flex; }
.flex-col         { flex-direction: column; }
.flex-1           { flex: 1 1 0%; }
.flex-shrink-0    { flex-shrink: 0; }
.flex-wrap        { flex-wrap: wrap; }
.items-center     { align-items: center; }
.justify-between  { justify-content: space-between; }
.justify-center   { justify-content: center; }
.inline           { display: inline; }
.h-screen         { height: 100vh; }
.w-full           { width: 100%; }

/* Gap */
.gap-1    { gap: 4px; }
.gap-1\.5 { gap: 6px; }
.gap-2    { gap: 8px; }
.gap-3    { gap: 12px; }
.gap-4    { gap: 16px; }

/* Padding */
.p-3   { padding: 12px; }
.px-2  { padding-left: 8px;  padding-right: 8px; }
.px-4  { padding-left: 16px; padding-right: 16px; }
.py-2  { padding-top: 8px;   padding-bottom: 8px; }
.py-4  { padding-top: 16px;  padding-bottom: 16px; }
.py-5  { padding-top: 20px;  padding-bottom: 20px; }

/* Margin */
.mb-1  { margin-bottom: 4px; }
.mb-2  { margin-bottom: 8px; }
.mb-4  { margin-bottom: 16px; }
.mb-5  { margin-bottom: 20px; }
.mt-4  { margin-top: 16px; }
.mr-1  { margin-right: 4px; }

/* Icon sizing */
.w-3 { width: 12px; }
.h-3 { height: 12px; }
.w-4 { width: 16px; }
.h-4 { height: 16px; }
.w-8 { width: 32px; }
.h-8 { height: 32px; }

/* Typography */
.text-xs  { font-size: 12px; }
.text-sm  { font-size: 14px; }
.object-contain { object-fit: contain; }

/* Colors */
.text-accent  { color: var(--accent-light); }
.text-danger  { color: var(--dark-danger); }
.text-muted   { color: var(--dark-muted); }
.hover\:text-accent:hover { color: var(--accent-light); }

/* Space-y (nav item spacing) */
.space-y-0\.5 > * + * { margin-top: 2px; }

/* Transitions */
.transition-colors { transition: color 0.15s; }

/* Borders */
.border-t { border-top: 1px solid var(--dark-border); }
.border-b { border-bottom: 1px solid var(--dark-border); }
.border-r { border-right: 1px solid var(--dark-border); }

/* Backgrounds */
.bg-bg-surface { background: var(--dark-surface); }

/* Pulse animation (replaces animate-pulse) */
@keyframes tailwindPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-pulse { animation: tailwindPulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* ── Premium filter chips (locked) ── */
.filter-chip.premium-chip { opacity: 0.65; }
.filter-chip.premium-chip:hover { border-color: #b5e853; color: #b5e853; opacity: 1; }
.lock-icon { font-size: 10px; }

/* ── Premium upsell modal ── */
.premium-overlay {
  display: none;               /* shown via JS when modal triggers */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 900;
  align-items: center;
  justify-content: center;
}

.premium-modal {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  padding: 36px 32px 28px;
  max-width: 420px;
  width: calc(100% - 32px);
  position: relative;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.premium-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: transparent;
  border: none;
  color: #666;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.premium-close:hover { color: #ccc; }

.premium-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.premium-title {
  font-size: 20px;
  font-weight: 800;
  color: #f0f0f0;
  margin-bottom: 10px;
}

.premium-desc {
  font-size: 13px;
  color: #999;
  line-height: 1.6;
  margin-bottom: 18px;
}

.premium-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  text-align: left;
  display: inline-block;
}
.premium-perks li {
  font-size: 13px;
  color: #b5e853;
  margin-bottom: 7px;
}

.premium-cta {
  display: block;
  background: #b5e853;
  color: #0d0d0d;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  margin-bottom: 14px;
  transition: background 0.15s;
}
.premium-cta:hover { background: #c8f06a; }

.premium-free-note {
  font-size: 11px;
  color: #555;
}
