/**
 * Neptune Service Design System v4.0
 * Unified Glass & Depth Design Language
 * Single Source of Truth for all pages
 */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root, html.dark {
  /* ─── Surface & Canvas ─── */
  --bg-base:         #06090f;
  --bg-surface:      #0b111c;
  --bg-elevated:     #121927;
  --bg-card:         rgba(12, 20, 36, 0.72);
  --bg-card-hover:   rgba(18, 28, 50, 0.88);
  --bg-input:        rgba(6, 9, 22, 0.85);

  /* ─── Neptune Brand (Teal primary) ─── */
  --np-teal:         #06d6a0;
  --np-teal-dim:     rgba(6, 214, 160, 0.12);
  --np-teal-line:    rgba(6, 214, 160, 0.30);
  --np-teal-glow:    rgba(6, 214, 160, 0.25);
  --np-sky:          #0ea5e9;
  --np-sky-dim:      rgba(14, 165, 233, 0.12);
  --np-gold:         #f59e0b;
  --np-gold-soft:    #facc15;
  --np-gold-dim:     rgba(245, 158, 11, 0.12);
  --np-gold-line:    rgba(245, 158, 11, 0.30);
  --np-rose:         #f43f5e;
  --np-rose-dim:     rgba(244, 63, 94, 0.12);
  --np-rose-line:    rgba(244, 63, 94, 0.30);
  --np-mint:         #4ade80;
  --np-mint-dim:     rgba(74, 222, 128, 0.12);

  /* ─── Legacy Compat (kept for tool cards) ─── */
  --brand-primary:   #06d6a0;
  --brand-light:     #34e8b0;
  --brand-dark:      #04a07a;
  --brand-glow:      var(--np-teal-glow);
  --border-active:   var(--np-teal);
  --border-hover:    var(--np-teal-line);

  /* ─── Borders ─── */
  --border-subtle:   rgba(255, 255, 255, 0.06);
  --border-specular: rgba(255, 255, 255, 0.12);

  /* ─── Typography ─── */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-sans:    'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-dim:       #475569;

  /* ─── Category Chromatic System ─── */
  --cat-finance: #f59e0b;
  --cat-finance-bg: rgba(245, 158, 11, 0.12);
  --cat-finance-border: rgba(245, 158, 11, 0.25);
  --cat-math: #06b6d4;
  --cat-math-bg: rgba(6, 182, 212, 0.12);
  --cat-math-border: rgba(6, 182, 212, 0.25);
  --cat-dev: #10b981;
  --cat-dev-bg: rgba(16, 185, 129, 0.12);
  --cat-dev-border: rgba(16, 185, 129, 0.25);
  --cat-text: #a855f7;
  --cat-text-bg: rgba(168, 85, 247, 0.12);
  --cat-text-border: rgba(168, 85, 247, 0.25);
  --cat-health: #f43f5e;
  --cat-health-bg: rgba(244, 63, 94, 0.12);
  --cat-health-border: rgba(244, 63, 94, 0.25);
  --cat-home: #84cc16;
  --cat-home-bg: rgba(132, 204, 22, 0.12);
  --cat-home-border: rgba(132, 204, 22, 0.25);
  --cat-utilities: #64748b;
  --cat-utilities-bg: rgba(100, 116, 139, 0.12);
  --cat-utilities-border: rgba(100, 116, 139, 0.25);

  /* ─── Elevation ─── */
  --shadow-sm: 0 2px 8px -2px rgba(0,0,0,0.5);
  --shadow-md: 0 12px 24px -8px rgba(0,0,0,0.65);
  --shadow-lg: 0 20px 40px -12px rgba(0,0,0,0.8);
  --shadow-glow: 0 0 30px -5px var(--np-teal-glow);

  /* ─── Border Radius Scale ─── */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-2xl: 32px;
  --r-pill: 9999px;
}

html.light {
  /* Surface & Canvas (Light Theme) */
  --bg-base: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-elevated: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --bg-input: #f8fafc;
  
  /* Borders & Specular Glows */
  --border-subtle: rgba(15, 23, 42, 0.1);
  --border-specular: rgba(15, 23, 42, 0.15);
  --border-hover: rgba(14, 165, 233, 0.5);
  --border-active: #0284c7;

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  /* Brand Accent */
  --brand-primary: #0284c7;
  --brand-light: #0ea5e9;
  --brand-dark: #0369a1;
  --brand-glow: rgba(14, 165, 233, 0.15);

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 12px 24px -8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 25px -5px rgba(14, 165, 233, 0.2);
}

/* ================= Base Resets & Atmosphere ================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 165, 233, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(168, 85, 247, 0.06), transparent 60%),
    radial-gradient(ellipse 50% 30% at 10% 90%, rgba(16, 185, 129, 0.05), transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

/* ================= Typography & Hierarchy ================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.25;
}

.font-mono {
  font-family: var(--font-mono);
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 20%, #cbd5e1 60%, var(--brand-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
  background: linear-gradient(135deg, var(--brand-light) 0%, #a855f7 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================= Layout & Container Utilities ================= */
.suite-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 640px) {
  .suite-container {
    padding: 0 1rem;
  }
}

/* ================= Glassmorphism & Specular Surfaces ================= */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-specular);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-md);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), 0 0 25px -8px var(--brand-glow);
}

/* Mouse-Tracking Spotlight Glow */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.07), transparent 75%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

.spotlight-card:hover::before {
  opacity: 1;
}

/* ================= Tool Card Styles ================= */
.tool-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-specular);
  border-radius: 1.25rem;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  position: relative;
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 0 20px -5px rgba(56, 189, 248, 0.2);
}

.tool-card-icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.tool-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 0.85rem;
  margin-bottom: 0.35rem;
  line-height: 1.3;
  color: var(--text-primary);
  transition: color 0.15s ease;
}

.tool-card:hover .tool-card-title {
  color: var(--brand-light);
}

.tool-card-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card-footer {
  margin-top: 1.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.tool-card-action {
  font-weight: 600;
  color: var(--brand-light);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: transform 0.15s ease;
}

.tool-card:hover .tool-card-action {
  transform: translateX(3px);
}

/* Category Badges */
.badge-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-cat-finance { background: var(--cat-finance-bg); color: var(--cat-finance); border: 1px solid var(--cat-finance-border); }
.badge-cat-math { background: var(--cat-math-bg); color: var(--cat-math); border: 1px solid var(--cat-math-border); }
.badge-cat-dev { background: var(--cat-dev-bg); color: var(--cat-dev); border: 1px solid var(--cat-dev-border); }
.badge-cat-text { background: var(--cat-text-bg); color: var(--cat-text); border: 1px solid var(--cat-text-border); }
.badge-cat-health { background: var(--cat-health-bg); color: var(--cat-health); border: 1px solid var(--cat-health-border); }
.badge-cat-home { background: var(--cat-home-bg); color: var(--cat-home); border: 1px solid var(--cat-home-border); }
.badge-cat-utilities { background: var(--cat-utilities-bg); color: var(--cat-utilities); border: 1px solid var(--cat-utilities-border); }

/* Favorite Pin Button */
.fav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 0.5rem;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.fav-btn:hover {
  color: #fbbf24;
  transform: scale(1.15);
}

.fav-btn.is-fav {
  color: #f59e0b;
}

/* ================= Omnisearch Modal & Command Palette ================= */
.omni-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.omni-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.omni-modal {
  width: 100%;
  max-width: 680px;
  background: var(--bg-surface);
  border: 1px solid var(--border-specular);
  box-shadow: var(--shadow-lg), 0 0 50px -10px rgba(14, 165, 233, 0.3);
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.96) translateY(-10px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.omni-backdrop.active .omni-modal {
  transform: scale(1) translateY(0);
}

.omni-search-bar {
  display: flex;
  align-items: center;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  gap: 0.85rem;
}

.omni-search-icon {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.omni-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.omni-input::placeholder {
  color: var(--text-muted);
}

.omni-esc-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  color: var(--text-muted);
}

.omni-results-list {
  max-height: 420px;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.omni-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.omni-item:hover, .omni-item.active {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.omni-item-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.omni-item-icon {
  font-size: 1.35rem;
}

.omni-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
}

.omni-item-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.omni-footer {
  padding: 0.65rem 1.25rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.omni-shortcuts {
  display: flex;
  gap: 0.75rem;
}

.omni-shortcuts kbd {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  color: var(--text-secondary);
}

/* ================= Category Tabs & Filter Chips ================= */
.cat-filter-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.cat-filter-container::-webkit-scrollbar {
  display: none;
}

.cat-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.cat-tab-btn.active {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
  color: #ffffff;
  border-color: var(--brand-light);
  box-shadow: 0 4px 15px -3px var(--brand-glow);
}

.cat-tab-count {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
}

/* ================= View Mode & Stats Shelf ================= */
.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.view-mode-toggle {
  display: flex;
  background: var(--bg-elevated);
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
}

.view-mode-btn {
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-mode-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-specular);
}

/* Dense List Mode */
.tools-grid.dense-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tools-grid.dense-list .tool-card {
  flex-direction: row;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-radius: 0.85rem;
}

.tools-grid.dense-list .tool-card-icon-wrap {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.1rem;
}

.tools-grid.dense-list .tool-card-body {
  flex: 1;
  margin-left: 1rem;
}

.tools-grid.dense-list .tool-card-title {
  margin: 0;
  font-size: 0.95rem;
}

.tools-grid.dense-list .tool-card-desc {
  display: none;
}

.tools-grid.dense-list .tool-card-footer {
  margin: 0;
  padding: 0;
  border: none;
  gap: 1rem;
}

/* ================= Toast Notification ================= */
.suite-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.suite-toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow-lg), 0 0 20px -5px rgba(56, 189, 248, 0.4);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  pointer-events: auto;
  animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= Universal Floating Tool Enhancer ================= */
.tool-top-bar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(6, 9, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tool-breadcrumbs a {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.tool-breadcrumbs a:hover {
  color: var(--brand-light);
}

.tool-action-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ================= Custom Scrollbar ================= */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  border: 2px solid var(--bg-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--np-teal);
}


/* ═══════════════════════════════════════════════════════════
   NEPTUNE UNIFIED COMPONENT LIBRARY v4.0
   Use these classes across all pages for visual consistency.
   ═══════════════════════════════════════════════════════════ */

/* ─── Body default ─── */
body {
  font-family: var(--font-sans);
}

/* ─── Responsive Heading Scale ─── */
.np-h1 { font-family: var(--font-display); font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; color: var(--text-primary); }
.np-h2 { font-family: var(--font-display); font-size: clamp(1.35rem, 3.5vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--text-primary); }
.np-h3 { font-family: var(--font-display); font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 700; line-height: 1.25; color: var(--text-primary); }

/* ─── Section Patterns ─── */
.np-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--np-teal);
  margin-bottom: 10px;
}
.np-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--np-teal);
  opacity: 0.7;
}
.np-section { margin-bottom: 2.5rem; }
.np-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 1.25rem; flex-wrap: wrap; }

/* ─── Neptune Card ─── */
.np-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-specular);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s ease;
}
.np-card-sm { border-radius: var(--r-md); padding: 1rem 1.25rem; }
.np-card-xl { border-radius: var(--r-xl); padding: 2rem 2.25rem; }

a.np-card:hover, .np-card.hoverable:hover {
  border-color: var(--np-teal-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--np-teal-line);
}

/* Gold variant */
.np-card-gold {
  border-color: var(--np-gold-line);
  background: linear-gradient(150deg, rgba(20,16,8,0.85) 0%, var(--bg-card) 100%);
}

/* ─── Neptune Buttons ─── */
.np-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: none;
  min-height: 44px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.np-btn-primary {
  background: linear-gradient(135deg, var(--np-teal), #04a07a);
  color: #04120d;
  box-shadow: 0 4px 18px var(--np-teal-glow);
}
.np-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--np-teal-glow);
  filter: brightness(1.08);
}

.np-btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.np-btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--np-teal-line);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.np-btn-gold {
  background: linear-gradient(135deg, var(--np-gold-soft), var(--np-gold) 50%, #d97706);
  color: #1a0f00;
  box-shadow: 0 4px 16px rgba(245,158,11,0.25);
}
.np-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245,158,11,0.38);
}

.np-btn-danger {
  background: var(--np-rose-dim);
  border: 1px solid var(--np-rose-line);
  color: #fca5a5;
}
.np-btn-danger:hover {
  background: rgba(244,63,94,0.2);
  border-color: rgba(244,63,94,0.5);
  color: #fee2e2;
  transform: translateY(-2px);
}

.np-btn-sky {
  background: var(--np-sky-dim);
  border: 1px solid rgba(14,165,233,0.3);
  color: #7dd3fc;
}
.np-btn-sky:hover {
  background: rgba(14,165,233,0.2);
  border-color: rgba(14,165,233,0.5);
  color: #e0f2fe;
  transform: translateY(-2px);
}

/* ─── Neptune Inputs ─── */
.np-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.np-input,
.np-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-font-smoothing: antialiased;
  appearance: none;
}

.np-input::placeholder { color: var(--text-muted); }

.np-input:hover, .np-select:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(6,9,22,0.95);
}

.np-input:focus, .np-select:focus {
  outline: none;
  border-color: var(--np-teal);
  box-shadow: 0 0 0 3px var(--np-teal-glow);
  background: rgba(6,9,22,0.95);
}

.np-input:disabled, .np-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Autofill dark fix */
.np-input:-webkit-autofill,
.np-input:-webkit-autofill:hover,
.np-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px rgba(6,9,22,0.95) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
}

.np-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-primary);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.np-textarea:focus {
  outline: none;
  border-color: var(--np-teal);
  box-shadow: 0 0 0 3px var(--np-teal-glow);
}

.np-form-group { margin-bottom: 1.25rem; }

/* ─── Neptune Badges ─── */
.np-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.np-badge-teal {
  background: var(--np-teal-dim);
  border: 1px solid var(--np-teal-line);
  color: var(--np-teal);
}

.np-badge-gold {
  background: var(--np-gold-dim);
  border: 1px solid var(--np-gold-line);
  color: var(--np-gold-soft);
}

.np-badge-sky {
  background: var(--np-sky-dim);
  border: 1px solid rgba(14,165,233,0.3);
  color: #7dd3fc;
}

.np-badge-rose {
  background: var(--np-rose-dim);
  border: 1px solid var(--np-rose-line);
  color: #fda4af;
}

/* Live pulsing dot badge */
.np-badge-live {
  background: var(--np-teal-dim);
  border: 1px solid var(--np-teal-line);
  color: var(--np-teal);
}
.np-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--np-teal);
  animation: npPulse 2.2s ease-in-out infinite;
}
@keyframes npPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6, 214, 160, 0.6); }
  60%       { box-shadow: 0 0 0 7px rgba(6, 214, 160, 0); }
}

/* ─── Neptune Alerts ─── */
.np-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  line-height: 1.55;
}

.np-alert-success {
  background: rgba(6,214,160,0.1);
  border: 1px solid rgba(6,214,160,0.3);
  color: #6ee7b7;
}

.np-alert-error {
  background: var(--np-rose-dim);
  border: 1px solid var(--np-rose-line);
  color: #fca5a5;
}

.np-alert-warn {
  background: var(--np-gold-dim);
  border: 1px solid var(--np-gold-line);
  color: #fde68a;
}

.np-alert-info {
  background: var(--np-sky-dim);
  border: 1px solid rgba(14,165,233,0.3);
  color: #7dd3fc;
}

/* ─── Responsive Table Scroll ─── */
.np-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
}

.np-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.np-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.np-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}

.np-table tr:last-child td { border-bottom: none; }
.np-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── Divider ─── */
.np-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  margin: 1.25rem 0;
}

.np-divider-gold {
  background: linear-gradient(90deg, transparent, var(--np-gold-line), transparent);
}

/* ─── Scrollable Panel Fade ─── */
.np-scroll-panel {
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.np-scroll-panel::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: block;
  background: linear-gradient(to bottom, transparent, var(--bg-base));
  pointer-events: none;
  flex-shrink: 0;
}

/* ─── Gradient Text Utilities ─── */
.np-text-gradient-teal {
  background: linear-gradient(135deg, var(--np-teal) 0%, var(--np-sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.np-text-gradient-gold {
  background: linear-gradient(135deg, var(--np-gold-soft) 0%, var(--np-gold) 55%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Load Animations ─── */
@keyframes npFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes npFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.np-anim { animation: npFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.np-anim-d1 { animation-delay: 0.05s; }
.np-anim-d2 { animation-delay: 0.12s; }
.np-anim-d3 { animation-delay: 0.19s; }
.np-anim-d4 { animation-delay: 0.26s; }
.np-anim-d5 { animation-delay: 0.33s; }

/* ─── Count-Up Number ─── */
.np-count { font-family: var(--font-mono); }

/* ─── Most Popular Badge ─── */
.np-popular-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--np-teal), #04a07a);
  color: #03120d;
  font-size: 0.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  white-space: nowrap;
  box-shadow: 0 4px 12px var(--np-teal-glow);
}

/* ─── Page Container ─── */
.np-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 640px) {
  .np-container { padding: 0 1rem; }
  .np-card-xl { padding: 1.25rem 1rem; }
  .np-btn { padding: 12px 18px; }
}
