/* StealthPull — design tokens from onboarding landing page */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #161616;
  --border: #1a1a1a;
  --border-bright: #2a2a2a;
  --accent: #00ff88;
  --accent-dim: #00ff8820;
  --accent-hover: #00cc6e;
  --text: #e0e0e0;
  --text-dim: #666;
  --text-muted: #444;
  --text-bright: #ffffff;
  --red: #ff4444;
  --yellow: #ffcc00;
  --blue: #4488ff;
  --radius: 6px;
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,255,136,0.015) 2px, rgba(0,255,136,0.015) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* Grid background */
.grid-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -1;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(8px);
}
.nav-inner {
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  font-size: 1.1rem; font-weight: 700;
  color: var(--accent); text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--text-dim); font-weight: 400; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 6px 14px; border-radius: var(--radius);
  color: var(--text-dim); text-decoration: none;
  font-size: 0.9rem; transition: all 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--accent); background: var(--accent-dim); }
.nav-actions { margin-left: auto; display: flex; gap: 8px; }

/* Buttons */
.btn {
  padding: 8px 18px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-family: inherit;
}
.btn-primary {
  background: var(--accent); color: #000;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary {
  background: transparent; color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-dim); }
.btn-ghost {
  background: transparent; color: var(--text-dim);
  border-color: var(--border-bright);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-danger {
  background: transparent; color: var(--red);
  border-color: var(--red);
}
.btn-danger:hover { background: rgba(255,68,68,0.1); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn .spinner { animation: spin 0.8s linear infinite; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card:hover { border-color: var(--border-bright); }

/* Stat cards */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.stat-label { font-size: 0.78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text-bright); line-height: 1; }
.stat-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 4px; }
.stat-accent { color: var(--accent) !important; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
}
.badge-green { background: rgba(0,255,136,0.12); color: var(--accent); }
.badge-yellow { background: rgba(255,204,0,0.12); color: var(--yellow); }
.badge-red { background: rgba(255,68,68,0.12); color: var(--red); }
.badge-gray { background: var(--border); color: var(--text-dim); }
.badge-dot::before { content: '●'; font-size: 0.6em; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th {
  text-align: left; padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 0.83rem; color: var(--text-dim); margin-bottom: 6px; }
input, textarea, select {
  width: 100%; padding: 9px 12px;
  background: var(--surface-2); border: 1px solid var(--border-bright);
  border-radius: var(--radius); color: var(--text);
  font-family: inherit; font-size: 0.9rem;
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--surface); }

/* Section headers */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title { font-size: 1rem; font-weight: 600; color: var(--text-bright); }
.section-sub { font-size: 0.8rem; color: var(--text-dim); margin-top: 2px; }

/* Demand meter */
.demand-bar {
  display: flex; align-items: center; gap: 8px;
}
.demand-bar-track {
  flex: 1; height: 4px; background: var(--border);
  border-radius: 2px; overflow: hidden;
}
.demand-bar-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width 0.4s;
}
.demand-score { font-size: 0.8rem; color: var(--accent); font-weight: 600; min-width: 28px; }

/* Loading / skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Toast */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
}
.toast {
  padding: 12px 18px; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500;
  border: 1px solid; min-width: 220px;
  animation: slideIn 0.2s ease;
}
.toast-success { background: rgba(0,255,136,0.12); border-color: var(--accent); color: var(--accent); }
.toast-error { background: rgba(255,68,68,0.12); border-color: var(--red); color: var(--red); }
.toast-info { background: var(--surface); border-color: var(--border-bright); color: var(--text); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  z-index: 500; display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface); border: 1px solid var(--border-bright);
  border-radius: 10px; padding: 28px; width: 520px; max-width: 95vw;
  max-height: 85vh; overflow-y: auto;
}
.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--text-bright); }

/* Offer public page styles */
.offer-page { max-width: 680px; margin: 0 auto; padding: 60px 24px; }
.offer-tag {
  display: inline-block; padding: 4px 12px;
  background: var(--accent-dim); color: var(--accent);
  border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px;
}
.offer-headline { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; line-height: 1.2; color: var(--text-bright); margin-bottom: 16px; }
.offer-subheadline { font-size: 1.1rem; color: var(--text-dim); margin-bottom: 32px; line-height: 1.6; }
.offer-price-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.offer-price { font-size: 2.4rem; font-weight: 800; color: var(--accent); }
.offer-price-label { font-size: 0.8rem; color: var(--text-dim); }
.offer-bullets { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.offer-bullets li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.95rem; color: var(--text);
}
.offer-bullets li::before { content: '→'; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.offer-body { color: var(--text-dim); line-height: 1.8; margin-bottom: 32px; }
.offer-body p { margin-bottom: 14px; }
.offer-cta {
  width: 100%; padding: 16px; font-size: 1.1rem; font-weight: 700;
  background: var(--accent); color: #000; border: none;
  border-radius: var(--radius); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 0.15s; text-decoration: none;
}
.offer-cta:hover { background: var(--accent-hover); }
.offer-guarantee { text-align: center; margin-top: 16px; font-size: 0.8rem; color: var(--text-dim); }

/* Empty states */
.empty-state {
  text-align: center; padding: 60px 24px;
  color: var(--text-dim);
}
.empty-state .icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1rem; color: var(--text); margin-bottom: 6px; }

/* Pulse animation for scanning */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.scanning { animation: pulse 1.2s ease-in-out infinite; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}
