/**
 * TGA Intelligence Hub shared theme
 * Linear/Vercel-like dark zinc + cool teal accent (not Selvaro emerald).
 * Link from every Hub page after Tailwind CDN.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lexend:wght@400;500;600;700&display=swap');

:root {
  --hub-bg: #0f1117;
  --hub-fg: #fafafa;
  --hub-card: #16161b;
  --hub-muted: #1e1e24;
  --hub-muted-fg: #a1a1aa;
  --hub-border: rgba(255, 255, 255, 0.08);
  --hub-border-subtle: rgba(255, 255, 255, 0.06);
  --hub-accent: #38bdf8;
  --hub-accent-hover: #7dd3fc;
  --hub-accent-dim: rgba(56, 189, 248, 0.12);
  --hub-accent-glow: rgba(56, 189, 248, 0.25);
  --hub-danger: #f87171;
  --hub-success: #34d399;
  --hub-radius: 0.625rem;
}

* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, .font-display {
  font-family: 'Lexend', 'Inter', sans-serif;
}

.hub-bg,
.ambient-bg,
body.ambient-bg {
  background: var(--hub-bg) !important;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(56, 189, 248, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 85% 85%, rgba(56, 189, 248, 0.03) 0%, transparent 50%) !important;
  color: var(--hub-fg);
  min-height: 100vh;
}

/* Soften leftover slate panels toward zinc cards */
.bg-slate-800\/50,
.bg-slate-800\/40,
.bg-slate-800\/30,
.bg-slate-900\/80,
.bg-slate-900\/50 {
  background-color: rgba(22, 22, 27, 0.65) !important;
}

.border-slate-700\/50,
.border-slate-700,
.border-slate-800,
.border-slate-600\/50,
.border-slate-600 {
  border-color: var(--hub-border-subtle) !important;
}

.text-slate-400,
.text-slate-500 {
  color: var(--hub-muted-fg) !important;
}

.hub-nav {
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hub-border-subtle);
}

.glass-panel {
  background: rgba(22, 22, 27, 0.6);
  border: 1px solid var(--hub-border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--hub-radius);
}

.hub-card {
  background: var(--hub-card);
  border: 1px solid var(--hub-border-subtle);
  border-radius: var(--hub-radius);
}

.stat-card {
  background: var(--hub-muted);
  border: 1px solid var(--hub-border-subtle);
  border-radius: var(--hub-radius);
}

.hero-card {
  background: rgba(22, 22, 27, 0.6);
  border: 1px solid var(--hub-border-subtle);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
  border-radius: var(--hub-radius);
}

.hero-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(22, 22, 27, 0.85);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.08), 0 8px 32px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.tool-card {
  background: rgba(22, 22, 27, 0.5);
  border: 1px solid var(--hub-border-subtle);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  border-radius: var(--hub-radius);
}

.tool-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(22, 22, 27, 0.75);
}

.tool-card:hover .tool-icon {
  color: var(--hub-accent);
}

.icon-glow {
  background: var(--hub-accent-dim);
  color: var(--hub-accent);
}

.btn-primary {
  background: var(--hub-accent);
  color: #0c1222;
  font-weight: 600;
  border-radius: var(--hub-radius);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: var(--hub-accent-hover);
  box-shadow: 0 4px 16px var(--hub-accent-glow);
}

.btn-secondary {
  background: var(--hub-muted);
  color: var(--hub-fg);
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background: #27272a;
  border-color: rgba(255, 255, 255, 0.12);
}

.hub-input {
  background: rgba(15, 17, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--hub-radius);
  color: var(--hub-fg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hub-input::placeholder {
  color: #71717a;
}

.hub-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.sidebar-link {
  transition: background-color 0.15s ease, color 0.15s ease;
  border-radius: var(--hub-radius);
}

.sidebar-link:hover {
  background-color: var(--hub-accent-dim);
  color: #e0f2fe;
}

.sidebar-link.active {
  background-color: var(--hub-accent-dim);
  color: #e0f2fe;
}

.accent-line {
  width: 40px;
  height: 2px;
  background: var(--hub-accent);
  border-radius: 1px;
  opacity: 0.8;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Map common Tailwind indigo/violet leftovers when pages still use those classes */
.text-indigo-400,
.text-indigo-300,
.text-violet-400 {
  color: var(--hub-accent) !important;
}

.border-indigo-500,
.border-indigo-500\/50,
.focus\:border-indigo-500:focus,
.focus\:border-indigo-500\/50:focus {
  border-color: rgba(56, 189, 248, 0.45) !important;
}

.focus\:ring-indigo-500:focus,
.focus\:ring-indigo-500\/20:focus {
  --tw-ring-color: rgba(56, 189, 248, 0.2) !important;
}

.bg-indigo-600,
.bg-indigo-500,
.from-indigo-500,
.to-violet-600,
.hover\:bg-indigo-500:hover,
.hover\:bg-indigo-400:hover {
  background-color: var(--hub-accent) !important;
  background-image: none !important;
  color: #0c1222 !important;
}

.hover\:from-indigo-400:hover,
.hover\:to-violet-500:hover {
  background-color: var(--hub-accent-hover) !important;
  background-image: none !important;
}

.shadow-indigo-500\/25,
.shadow-indigo-500\/20,
.shadow-lg.shadow-indigo-500\/25 {
  --tw-shadow-color: var(--hub-accent-glow) !important;
}

.bg-emerald-600,
.hover\:bg-emerald-500:hover {
  background-color: #2dd4bf !important;
  color: #0c1222 !important;
}
