/* ============================================
   APEX-HUNTER SaaS - Linear + Stripe Design System
   Clean · Precision · Enterprise-grade
   ============================================ */

:root {
  /* Primary palette */
  --primary: #635BFF;
  --primary-hover: #7B75FF;
  --primary-light: rgba(99,91,255,0.12);
  --primary-dark: #4F47CC;

  /* Neutrals */
  --bg: #0A0A0D;
  --bg-secondary: #131418;
  --bg-tertiary: #1A1D23;
  --bg-inverse: #0D0E12;

  /* Text */
  --text: #E8ECF1;
  --text-secondary: #8B92A0;
  --text-tertiary: #5D6370;
  --text-inverse: #E8ECF1;

  /* Borders */
  --border: #1E2028;
  --border-hover: #2D3039;
  --border-light: #1A1C22;

  /* Shadows — Linear-grade micro-lift system */
  --shadow-xs: 0 1px 1px rgba(0,0,0,0.25);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.30);
  --shadow: 0 1px 4px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.45), 0 4px 10px rgba(0,0,0,0.30);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.30);
  --shadow-card-hover: 0 4px 20px rgba(0,0,0,0.40), 0 2px 8px rgba(0,0,0,0.30);

  /* Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;

  /* Transitions */
  --transition-fast: all 0.12s ease;
  --transition: all 0.18s ease;
  --transition-slow: all 0.3s ease;

  /* Typography */
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', 'Fira Code', monospace;

  /* Success / Warning / Error */
  --success: #00D924;
  --warning: #F59E0B;
  --error: #EF4444;

  /* Focus ring — Linear-style */
  --focus-ring: 0 0 0 2px rgba(99,91,255,0.25);

  /* Dark mode overrides */
  --dark-bg: #0A0A0D;
  --dark-bg-secondary: #131418;
  --dark-bg-tertiary: #1A1D23;
  --dark-border: #1E2028;
  --dark-text: #E8ECF1;
  --dark-text-secondary: #8B92A0;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ===== Typography ===== */
h1, h2, h3, h4 { color: var(--text); font-weight: 700; letter-spacing: -0.3px; }
h1 { font-size: 48px; line-height: 1.1; }
h2 { font-size: 32px; line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; }

/* ===== Navigation Bar ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 13, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex; align-items: center;
  padding: 0 32px;
}
.navbar.scrolled {
  box-shadow: var(--shadow);
}
.navbar .nav-inner {
  max-width: 1200px; margin: 0 auto;
  width: 100%; display: flex; align-items: center;
  justify-content: space-between;
}
.navbar .logo {
  font-size: 18px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.3px;
}
.navbar .logo .logo-icon {
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 700;
}
.navbar .nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.navbar .nav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 4px 0;
}
.navbar .nav-links a:hover,
.navbar .nav-links a.active { color: var(--text); }
.navbar .nav-actions { display: flex; align-items: center; gap: 12px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  border: none; font-family: inherit;
  line-height: 1.4;
}
.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--bg-secondary);
}
.btn-sm { padding: 6px 16px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* ===== Cards ===== */
.card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  padding: 28px;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
  border-color: var(--border);
}
.card-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.card-title { font-size: 16px; font-weight: 600; }

/* Micro-card — compact, extra-subtle shadow */
.card-micro {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  padding: 18px;
  transition: var(--transition-fast);
}
.card-micro:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
  border-color: var(--border);
}

/* ===== Form Elements ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
.form-input::placeholder { color: var(--text-tertiary); }
.form-select {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  background: var(--bg);
  color: var(--text); cursor: pointer;
  transition: var(--transition);
}
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: rgba(0, 217, 36, 0.1); color: #00A81D; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #C2780A; }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #D63A3A; }
.badge-s { background: rgba(239, 68, 68, 0.1); color: #D63A3A; }
.badge-a { background: rgba(99, 91, 255, 0.1); color: var(--primary); }
.badge-b { background: rgba(0, 217, 36, 0.1); color: #00A81D; }
.badge-c { background: var(--bg-tertiary); color: var(--text-secondary); }

/* ===== Tables ===== */
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 12px 16px; font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}
.table td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.table tr:hover td { background: var(--bg-secondary); }
.table tr:last-child td { border-bottom: none; }

/* ===== Progress Bar ===== */
.progress {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px; overflow: hidden;
}
.progress .fill {
  height: 100%; border-radius: 3px;
  transition: width 0.6s ease;
}
.progress .fill.primary,
.progress .fill.gold { background: var(--primary); }
.progress .fill.success { background: var(--success); }

/* ===== Tags ===== */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.tag-primary {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(99, 91, 255, 0.15);
}

/* ===== Simple Animations (no glow/particles) ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.fade-in { animation: fadeIn 0.5s ease forwards; }
.slide-in { animation: slideIn 0.4s ease forwards; }
.scale-in { animation: scaleIn 0.3s ease forwards; }

/* ===== Page Transition ===== */
.page-transition {
  animation: fadeIn 0.35s ease;
}

/* ===== Grids ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ===== Stats Card ===== */
.stat-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.stat-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
  border-color: var(--border);
}
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 12px;
  background: var(--primary-light);
}
.stat-card .label {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 4px;
}
.stat-card .value {
  font-size: 30px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}
.stat-card .change { font-size: 12px; font-weight: 600; margin-top: 4px; }
.stat-card .change.up { color: #00A81D; }
.stat-card .change.down { color: #D63A3A; }

/* Number roll animation */
.num-roll {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}
@keyframes numTick {
  0% { transform: translateY(0); opacity: 1; }
  20% { transform: translateY(-2px); opacity: 0.6; }
  80% { transform: translateY(2px); opacity: 0.6; }
  100% { transform: translateY(0); opacity: 1; }
}
.num-roll.ticking { animation: numTick 0.3s ease; }

/* ===== Hover Lift Utility ===== */
.hover-lift {
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
  border: 1px solid transparent;
}
.hover-lift:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

/* ===== Focus ring utility ===== */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--primary);
}

/* ===== Toast Notification ===== */
@keyframes toastIn {
  0% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}
.toast {
  position: fixed; top: 80px; right: 24px;
  background: #1A1D24;
  border: 1px solid #2D3039;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  color: #E8ECF1;
  font-size: 14px;
  z-index: 5000;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
}
.toast.hiding { animation: toastOut 0.25s ease forwards; }

/* ===== Skeleton Loading ===== */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
  background-size: 800px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Removed: .pulse-dot, .neon-glow, .gradient-text, .shimmer (gold),
   .float-particle, .ripple-ring, .radial-tray-wrapper, #particleCanvas,
   .beam-tl, .beam-br, .chat-float, .exit-overlay, .scroll-indicator,
   .platform-wall, .live-bar, .modal-overlay */

/* ===== Sidebar ===== */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: 240px; height: 100vh;
  background: #1A1D24;
  border-right: 1px solid var(--dark-border);
  z-index: 999;
  display: flex; flex-direction: column;
}
.sidebar .logo {
  padding: 20px;
  font-size: 16px; font-weight: 700; color: #E8ECF1;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--dark-border);
}
.sidebar .nav-items { flex: 1; padding: 8px 0; overflow-y: auto; }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: var(--dark-text-secondary);
  font-size: 14px; font-weight: 500;
  transition: var(--transition);
  cursor: pointer; text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar .nav-item:hover {
  color: #E8ECF1;
  background: rgba(255, 255, 255, 0.04);
}
.sidebar .nav-item.active {
  color: #FFFFFF;
  background: rgba(99, 91, 255, 0.1);
  border-left-color: var(--primary);
}
.sidebar .nav-item .icon { font-size: 16px; width: 24px; text-align: center; }
.sidebar .user-section {
  padding: 16px 20px;
  border-top: 1px solid var(--dark-border);
}
.sidebar .user-section .user-info {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.sidebar .user-section .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.sidebar .user-section .name { color: #E8ECF1; font-size: 13px; font-weight: 600; }
.sidebar .user-section .plan { color: var(--dark-text-secondary); font-size: 11px; }

/* ===== Main Content Area ===== */
.main-content {
  margin-left: 240px;
  min-height: 100vh;
  padding: 24px;
  padding-top: 84px;
}
.main-content .page-header { margin-bottom: 24px; }
.main-content .page-header h1 { font-size: 24px; font-weight: 700; }
.main-content .page-header p {
  color: var(--text-secondary);
  font-size: 14px; margin-top: 4px;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000; display: none;
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 480px; max-width: 90vw; max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s ease;
}
.modal .modal-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.modal .modal-close {
  float: right; background: none; border: none;
  font-size: 20px; cursor: pointer; color: var(--text-tertiary);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .navbar .nav-links { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 16px; padding-top: 80px; }
  .container { padding: 0 16px; }
}
@media (max-width: 480px) {
  .navbar { height: 52px; }
  .navbar .logo { font-size: 14px; }
  .btn { padding: 8px 16px; font-size: 13px; width: 100%; }
  .btn-sm { padding: 6px 12px; font-size: 11px; }
  .card { padding: 16px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 22px; }
  .modal { width: 95vw; max-width: 95vw; padding: 20px; }
  .badge { font-size: 10px; padding: 2px 6px; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 8px 6px; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }
  .container { padding: 0 12px; }
  .main-content { padding: 12px; padding-top: 64px; }
}
@media (max-width: 360px) {
  .stat-card .stat-value { font-size: 18px; }
  .stat-card .stat-label { font-size: 11px; }
  .card { padding: 12px; }
  .btn { font-size: 12px; padding: 6px 12px; }
  h1 { font-size: 20px; }
  h2 { font-size: 18px; }
}

/* ============================================
   Homepage Upgrade: Hero Trust, Live Bar, Logo Wall,
   Media Mentions, Security Badges
   ============================================ */

/* Hero trust row */
.hero-trust {
  margin-top: 20px; font-size: 13px; color: #6B7280;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hero-trust .dot { color: #3B3D48; }

/* Live data scrolling bar */
.live-data-bar {
  background: rgba(99,91,255,0.04); border-top: 1px solid rgba(99,91,255,0.08);
  border-bottom: 1px solid rgba(99,91,255,0.08);
  padding: 10px 0; position: relative; overflow: hidden;
  max-width: 100vw;
}
.live-pulse {
  position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: #00D924;
  box-shadow: 0 0 8px rgba(0,217,36,0.5); z-index: 2;
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.live-track {
  display: flex; gap: 48px; padding-left: 48px;
  animation: liveScroll 40s linear infinite;
  white-space: nowrap;
}
.live-item {
  font-size: 12px; color: rgba(232,236,241,0.7);
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  flex-shrink: 0;
}
@keyframes liveScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.live-data-bar:hover .live-track { animation-play-state: paused; }

/* Stats sub-label */
.stat-sub {
  font-size: 11px; color: #6B7280; margin-top: 4px;
}
.stat-sub.up { color: #00A81D; }

/* Logo wall */
.logo-wall {
  max-width: 1080px; margin: 0 auto; padding: 48px 24px; text-align: center;
}
.logo-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: #4B5563; margin-bottom: 28px;
}
.logo-track {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: center;
}
.logo-item {
  font-size: 15px; font-weight: 600; color: rgba(232,236,241,0.3);
  padding: 10px 18px; border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px; transition: all 0.3s; letter-spacing: 0.5px;
}
.logo-item:hover { color: rgba(232,236,241,0.7); border-color: rgba(255,255,255,0.15); }

/* Media mentions grid */
.media-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; max-width: 1080px; margin: 0 auto; padding: 0 24px 80px;
}
.media-card {
  background: #131418; border: 1px solid #1E2028;
  border-radius: 12px; padding: 24px 20px; text-align: center;
  transition: all 0.2s;
}
.media-card:hover {
  border-color: #635BFF; transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99,91,255,0.08);
}
.media-logo {
  font-size: 18px; font-weight: 700; color: #E8ECF1;
  margin-bottom: 10px; letter-spacing: -0.3px;
}
.media-card p {
  font-size: 13px; color: #6B7280; line-height: 1.6;
}

/* Security badges */
.security-badges {
  display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
  padding: 40px 24px 20px; max-width: 1080px; margin: 0 auto;
}
.sec-badge {
  font-size: 12px; font-weight: 600; color: #6B7280;
  padding: 8px 18px; border: 1px solid #1E2028; border-radius: 20px;
  transition: all 0.2s;
}
.sec-badge:hover { border-color: #635BFF; color: #E8ECF1; }

/* Responsive for new homepage sections */
@media (max-width: 768px) {
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-item { font-size: 13px; padding: 8px 14px; }
  .live-item { font-size: 11px; }
}
@media (max-width: 480px) {
  .media-grid { grid-template-columns: 1fr; padding: 0 12px 40px; }
  .security-badges { gap: 10px; }
  .sec-badge { font-size: 11px; padding: 6px 12px; }
  .logo-wall { padding: 32px 12px; }
  .logo-track { gap: 10px; }
  .hero-trust { font-size: 11px; flex-wrap: wrap; }
}
