/* =====================================================
   StockViber — Global Styles
   Dark-mode fintech aesthetic
   ===================================================== */

:root {
  --bg-base:      #070b14;
  --bg-surface:   #0d1321;
  --bg-card:      #111827;
  --bg-card-hover:#152033;
  --bg-input:     #0d1825;
  --border:       #1e2d40;
  --border-light: #243548;

  --accent:       #00d4aa;
  --accent-dim:   rgba(0, 212, 170, 0.15);
  --accent-blue:  #3b82f6;
  --accent-blue-dim: rgba(59, 130, 246, 0.15);
  --accent-purple:#8b5cf6;

  --text-primary:   #e8f0fe;
  --text-secondary: #7a92aa;
  --text-muted:     #4a6070;

  --green:          #22c55e;
  --green-dim:      rgba(34, 197, 94, 0.15);
  --red:            #ef4444;
  --red-dim:        rgba(239, 68, 68, 0.15);
  --yellow:         #f59e0b;
  --orange:         #f97316;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(0,212,170,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ─── Typography ─────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }

.text-gradient {
  background: linear-gradient(135deg, #00d4aa 0%, #3b82f6 60%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Layout ─────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ─── Navbar ─────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #00d4aa, #3b82f6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-links a:hover { color: var(--text-primary); background: var(--border); }
.nav-links a.active { color: var(--accent); }

.nav-actions { display: flex; gap: 8px; align-items: center; }

/* ─── Navbar universal search ────────────────────────── */
.nav-search {
  position: relative;
  width: 260px;
  flex-shrink: 0;
}

.nav-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  padding: 7px 14px 7px 34px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,212,170,0.12);
}

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

.nav-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
  user-select: none;
}

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 300;
  overflow: hidden;
  min-width: 280px;
}

.search-dropdown.open { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item:focus { background: var(--bg-card-hover); outline: none; }

.search-result-ticker {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  min-width: 64px;
  flex-shrink: 0;
}

.search-result-name {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.search-result-exchange {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-loading, .search-no-results {
  padding: 14px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ─── Price alert badges ─────────────────────────────── */
.alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.45);
  color: var(--yellow);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  animation: alert-pulse 2s ease-in-out infinite;
}

.alert-set-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.35);
  color: var(--accent-blue);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
}

@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(245,158,11,0);  }
}

/* ─── WebSocket live price flash ─────────────────────── */
@keyframes flash-up {
  0%   { background: rgba(34,197,94,0.35); border-radius: 4px; }
  100% { background: transparent; }
}

@keyframes flash-down {
  0%   { background: rgba(239,68,68,0.35); border-radius: 4px; }
  100% { background: transparent; }
}

.price-flash-up   { animation: flash-up   0.7s ease-out forwards; }
.price-flash-down { animation: flash-down 0.7s ease-out forwards; }

/* WS connection indicator dot in navbar */
.ws-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
  transition: background 0.4s;
  flex-shrink: 0;
}

.ws-dot.connected { background: var(--accent); box-shadow: 0 0 6px rgba(0,212,170,0.6); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.3s;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4aa, #3b82f6);
  color: #000;
  box-shadow: 0 0 20px rgba(0,212,170,0.25);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0,212,170,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
}

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

.btn-sm { font-size: 12px; padding: 6px 14px; }
.btn-lg { font-size: 16px; padding: 14px 32px; border-radius: var(--radius-md); }
.btn-xl { font-size: 17px; padding: 17px 40px; border-radius: var(--radius-md); }

.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }

/* ─── Cards ──────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-sm { padding: 16px; border-radius: var(--radius-md); }
.card-hover { transition: all 0.2s; }
.card-hover:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

/* ─── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-fire  { background: rgba(249,115,22,0.2); color: var(--orange); border: 1px solid rgba(249,115,22,0.3); }
.badge-hot   { background: rgba(239,68,68,0.15); color: var(--red);    border: 1px solid rgba(239,68,68,0.25); }
.badge-warm  { background: rgba(245,158,11,0.15); color: var(--yellow);  border: 1px solid rgba(245,158,11,0.25); }
.badge-cool  { background: var(--accent-blue-dim); color: var(--accent-blue); border: 1px solid rgba(59,130,246,0.2); }
.badge-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.badge-accent{ background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,212,170,0.25); }

/* ─── Price indicators ───────────────────────────────── */
.positive { color: var(--green); }
.negative { color: var(--red); }

/* ─── Forms ──────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.02em; }

.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-input::placeholder { color: var(--text-muted); }

.form-input.error { border-color: var(--red); }
.form-error { font-size: 12px; color: var(--red); margin-top: 2px; }

/* ─── Search bar ─────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap .search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 16px;
}

.search-wrap .form-input {
  padding-left: 42px;
}

/* ─── Table ──────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

thead th {
  background: var(--bg-surface);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--text-secondary); }
thead th.sort-asc::after  { content: ' ↑'; color: var(--accent); }
thead th.sort-desc::after { content: ' ↓'; color: var(--accent); }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }

tbody td {
  padding: 14px 16px;
  font-size: 14px;
  white-space: nowrap;
  vertical-align: middle;
}

/* ─── Filter tabs ────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-tab:hover { color: var(--text-primary); border-color: var(--border-light); }
.filter-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Dashboard sidebar ──────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; padding-top: 64px; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-nav { padding: 0 12px; flex: 1; }

.sidebar-section { margin-bottom: 32px; }

.sidebar-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
  border: 1px solid transparent;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(0,212,170,0.2);
}

.sidebar-link .icon { font-size: 18px; width: 22px; text-align: center; }

.main-content {
  flex: 1;
  margin-left: 220px;
  padding: 32px;
  min-width: 0;
}

/* ─── Stat cards ─────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.stat-sub   { font-size: 12px; color: var(--text-muted); }

/* ─── Vibe score ring ────────────────────────────────── */
.score-ring {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.score-ring svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.score-ring .score-num { font-size: 11px; font-weight: 800; position: relative; z-index: 1; }

/* ─── Sparkline canvas ───────────────────────────────── */
canvas.sparkline { display: block; }

/* ─── Watch button ───────────────────────────────────── */
.watch-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 5px 10px;
  font-size: 16px;
  transition: all 0.2s;
  cursor: pointer;
}

.watch-btn:hover, .watch-btn.active {
  color: var(--yellow);
  border-color: var(--yellow);
  background: rgba(245,158,11,0.1);
}

/* ─── Toast ──────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  animation: slideIn 0.3s ease;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.info    { border-left: 3px solid var(--accent); }

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ─── Hero section ───────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 100px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(0,212,170,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 90% 50%, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,170,0.25);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero-headline {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  max-width: 800px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.hero-stat-num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ─── Dashboard preview card ─────────────────────────── */
.dashboard-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 60px rgba(0,212,170,0.05);
  position: relative;
  overflow: hidden;
}

.dashboard-preview::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,170,0.4), transparent);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.preview-dot { width: 10px; height: 10px; border-radius: 50%; }

.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  margin-bottom: 6px;
  gap: 8px;
}

.preview-ticker { font-size: 13px; font-weight: 800; color: var(--accent); min-width: 48px; }
.preview-name   { font-size: 12px; color: var(--text-muted); flex: 1; }
.preview-price  { font-size: 13px; font-weight: 700; }
.preview-change { font-size: 12px; font-weight: 700; }

/* ─── Section headings ───────────────────────────────── */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 16px; }
.section-sub { font-size: 17px; color: var(--text-secondary); max-width: 560px; line-height: 1.7; }

/* ─── How it works ───────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.step-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0,212,170,0.08);
  transform: translateY(-4px);
}

.step-num {
  font-size: 56px;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.1;
  position: absolute;
  top: 12px;
  right: 20px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.step-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.step-title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.step-desc  { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ─── Features ───────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 48px; }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 16px;
  transition: all 0.2s;
}

.feature-card:hover { border-color: var(--border-light); background: var(--bg-card-hover); }
.feature-icon { font-size: 28px; flex-shrink: 0; }
.feature-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-desc  { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ─── Sample stocks blurred section ──────────────────── */
.stocks-preview-section { padding: 80px 0; }

.sample-table-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.blur-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 220px;
  background: linear-gradient(to bottom, rgba(7,11,20,0) 0%, rgba(7,11,20,0.95) 60%, var(--bg-base) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 32px;
  gap: 16px;
}

.lock-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ─── CTA section ────────────────────────────────────── */
.cta-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,212,170,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 60px;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 60px rgba(0,212,170,0.06);
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.signup-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── Footer ─────────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 8px;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-secondary); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.footer-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 700px;
}

.footer-copy { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* ─── Auth page ──────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  position: relative;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 50% at 50% 0%, rgba(0,212,170,0.08) 0%, transparent 70%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 48px;
  position: relative;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 30%; right: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.auth-logo { display: flex; justify-content: center; margin-bottom: 32px; }
.auth-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; text-align: center; }
.auth-sub { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 32px; }
.auth-switch { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-muted); }
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ─── Dashboard header ───────────────────────────────── */
.page-header { margin-bottom: 28px; }
.page-title  { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.page-sub    { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

/* ─── Ticker badge ───────────────────────────────────── */
.ticker-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,170,0.2);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  letter-spacing: 0.03em;
}

/* ─── Detail page ────────────────────────────────────── */
.detail-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.detail-price { font-size: 48px; font-weight: 900; letter-spacing: -0.04em; }
.detail-change { font-size: 20px; font-weight: 700; }

.why-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.why-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.why-list li::before { content: '→'; color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* ─── Watchlist empty state ──────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; margin-bottom: 24px; }

/* ─── Account page ───────────────────────────────────── */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.account-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: #000;
  margin-bottom: 16px;
}

/* ─── Rank badge ─────────────────────────────────────── */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.rank-1 { background: rgba(245,158,11,0.15); color: var(--yellow); border-color: rgba(245,158,11,0.3); }
.rank-2 { background: rgba(156,163,175,0.15); color: #9ca3af; border-color: rgba(156,163,175,0.3); }
.rank-3 { background: rgba(180,120,60,0.15); color: #b47c3c; border-color: rgba(180,120,60,0.3); }

/* ─── Mobile nav menu (legacy – kept for landing page) ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--bg-base);
  z-index: 99;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
}
.mobile-menu a:hover { color: var(--text-primary); background: var(--bg-card); }

/* ─── Hamburger (app pages) ──────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.25s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile search icon button */
.nav-search-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.nav-search-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Sidebar overlay ─────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* ─── Desktop vs mobile action areas ─────────────────── */
.nav-mobile-right    { display: none; }
.nav-desktop-actions { display: flex; }

/* ─── Bottom navigation bar (mobile) ─────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 95;
  background: rgba(7,11,20,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  /* Support notched phones */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 8px 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item:hover  { color: var(--text-secondary); }
.bottom-nav-icon { font-size: 21px; line-height: 1; }

/* ─── Mobile card view (dashboard table alternative) ──── */
.mobile-cards { display: none; }
.mobile-stock-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-stock-card:active { background: var(--bg-card-hover); border-color: var(--border-light); }
.mobile-stock-card-left { flex: 1; min-width: 0; }
.mobile-stock-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.mobile-stock-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; flex-wrap: wrap; }
.mobile-stock-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-stock-sub  { font-size: 11px; color: var(--text-muted); }

/* ─── Divider ────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ─── Grid helpers ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

/* ─── Alert ──────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: var(--green-dim); border: 1px solid rgba(34,197,94,0.3); color: var(--green); }
.alert-error   { background: var(--red-dim);   border: 1px solid rgba(239,68,68,0.3);  color: var(--red); }
.alert-info    { background: var(--accent-dim); border: 1px solid rgba(0,212,170,0.3); color: var(--accent); }

/* ─── Section spacing ────────────────────────────────── */
.section { padding: 80px 0; }
.section-lg { padding: 100px 0; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — TABLET + MOBILE
   ═══════════════════════════════════════════════════════ */

/* ── Tablet (≤ 1024px) ───────────────────────────────── */
@media (max-width: 1024px) {
  .steps           { grid-template-columns: 1fr 1fr; }
  .account-grid    { grid-template-columns: 1fr; }
  .nav-search      { width: 200px; }

  .sidebar         { width: 180px; }
  .main-content    { margin-left: 180px; }
}

/* ── Mobile (≤ 768px) ────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Navbar ──────────────────────────────────────────── */
  .nav-links           { display: none; }
  .hamburger           { display: flex; }    /* landing page burger */
  .nav-hamburger       { display: flex; }    /* app page burger */
  .nav-search-btn      { display: flex; }    /* search icon */
  .nav-mobile-right    { display: flex; }    /* mobile action cluster */
  .nav-desktop-actions { display: none; }    /* hide desktop actions on mobile */

  /* Hide inline search bar on mobile; it becomes a slide-down panel */
  .navbar .nav-search { display: none; }

  /* Mobile search panel: slides down below navbar when open */
  .nav-search.mobile-panel {
    display: block;
    position: fixed;
    top: 64px; left: 0; right: 0;
    z-index: 200;
    width: 100% !important;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-light);
    padding: 12px 16px 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
    pointer-events: none;
  }
  .nav-search.mobile-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-search.mobile-panel .search-dropdown {
    position: static;
    margin-top: 6px;
    box-shadow: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  }

  /* ── Sidebar ─────────────────────────────────────────── */
  .sidebar {
    transform: translateX(-100%);
    z-index: 90;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }

  /* ── Main content ────────────────────────────────────── */
  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    /* leave space for the fixed bottom nav */
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  /* ── Bottom nav ──────────────────────────────────────── */
  .bottom-nav { display: block; }

  /* ── Toast: full-width above bottom nav ──────────────── */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: calc(72px + 8px + env(safe-area-inset-bottom, 0px));
  }
  .toast { min-width: 0; width: 100%; }

  /* ── Dashboard: hide table, show mobile cards ────────── */
  .table-wrap   { display: none; }
  .mobile-cards { display: block; }

  /* ── Watchlist grid: single column ──────────────────────*/
  #watchlistGrid { grid-template-columns: 1fr !important; }

  /* ── Stock detail ────────────────────────────────────── */
  .detail-price  { font-size: 34px; }
  .detail-change { font-size: 17px; }
  .detail-hero   { padding: 20px !important; }

  /* Stock detail hero: stack vertically */
  .detail-hero > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Grids ───────────────────────────────────────────── */
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-grid       { grid-template-columns: 1fr 1fr; }

  /* ── Landing page ────────────────────────────────────── */
  .hero-stats   { gap: 24px; flex-wrap: wrap; }
  .hero-headline { font-size: clamp(28px, 8vw, 42px); }
  .hero-sub     { font-size: 16px; }
  .steps        { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .cta-card     { padding: 32px 20px; }
  .form-row     { grid-template-columns: 1fr; }
  .section      { padding: 56px 0; }
  .section-lg   { padding: 64px 0; }

  /* ── Footer ──────────────────────────────────────────── */
  .footer-top    { flex-direction: column; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* ── Auth ────────────────────────────────────────────── */
  .auth-card     { padding: 32px 20px; }

  /* ── Filter tabs: tighter on mobile ─────────────────── */
  .filter-tab    { padding: 8px 12px; font-size: 12px; }

  /* ── Page header: stack vertically ──────────────────── */
  .page-header[style*="justify-content:space-between"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  /* Hide the desktop text search filter on dashboard (replaced by navbar search) */
  .search-wrap   { display: none; }
}

/* ── Small mobile (≤ 480px) ──────────────────────────── */
@media (max-width: 480px) {
  .container        { padding: 0 14px; }
  .main-content     { padding: 16px 12px; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .stat-grid        { grid-template-columns: 1fr 1fr; }
  .stat-value       { font-size: 24px; }
  .hero-actions     { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats       { flex-direction: column; gap: 16px; }
  .detail-price     { font-size: 30px; }
  .auth-card        { padding: 24px 16px; }
  .bottom-nav-item  { font-size: 9px; padding: 10px 4px 8px; }
  .bottom-nav-icon  { font-size: 18px; }

  /* Period buttons: wrap on tiny screens */
  #periodButtons    { justify-content: flex-start; flex-wrap: wrap; }
}

/* ─── Animated pulse ─────────────────────────────────── */
@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: pulse-green 2s ease-in-out infinite;
}

/* ─── Page transition ────────────────────────────────── */
.page-fade { animation: fadeIn 0.3s ease; }

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

/* ─── Glow line ──────────────────────────────────────── */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-blue), transparent);
  margin: 0;
  opacity: 0.4;
}

/* ─── Price chart period buttons ─────────────────────── */
.period-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.period-btn:hover {
  border-color: var(--border-light);
  color: var(--text-secondary);
}
.period-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(0, 212, 170, 0.3);
}

/* ─── Chart loading state ────────────────────────────── */
.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 13px;
  gap: 8px;
}

/* ─── News feed ──────────────────────────────────────── */
.news-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:hover { opacity: 0.85; }
.news-item:hover .news-headline { color: var(--accent); }

.news-thumb {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.news-body { flex: 1; min-width: 0; }

.news-headline {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-source {
  color: var(--accent);
  font-weight: 600;
}

/* =====================================================
   Pro / Subscription styles
   ===================================================== */

/* ── Pro badge (sidebar nav, account page) ── */
.pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #00d4aa22, #3b82f622);
  border: 1px solid #00d4aa44;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
}

.period-btn-pro {
  opacity: 0.55;
  border-style: dashed !important;
}
.period-btn-pro:hover {
  opacity: 0.85;
  border-color: var(--accent-blue) !important;
  color: var(--accent-blue) !important;
}

.pro-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--accent-blue-dim);
  border: 1px solid var(--accent-blue);
  border-radius: 50%;
  font-size: 9px;
  color: var(--accent-blue);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Nav item with Pro lock ── */
.nav-item-pro {
  position: relative;
}
.nav-item-pro .nav-link {
  opacity: 0.55;
}
.nav-item-pro .nav-link:hover {
  opacity: 0.85;
}
.nav-item-pro-label {
  font-size: 9px;
  color: var(--accent-blue);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 2px;
}

/* ── Upgrade gate backdrop ── */
.upgrade-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}

.upgrade-gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  max-width: 440px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
}

.upgrade-gate-glow {
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.upgrade-gate-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.upgrade-gate-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.upgrade-gate-features {
  list-style: none;
  margin: 20px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.upgrade-gate-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.ugf-check {
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.btn-upgrade-gate {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: #000;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-upgrade-gate:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-upgrade-later {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-upgrade-later:hover {
  border-color: var(--border-light);
  color: var(--text-secondary);
}

/* ── Gated feature overlay (inside sections) ── */
.feature-gate-wrap {
  position: relative;
}
.feature-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
}
.feature-gate-overlay .fgo-icon { font-size: 28px; }
.feature-gate-overlay .fgo-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.feature-gate-overlay .fgo-sub {
  font-size: 13px;
  color: var(--text-secondary);
}
.fgo-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: #000;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

/* ── Upgrade page pricing cards ── */
.pricing-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
}

.pricing-header {
  text-align: center;
  margin-bottom: 48px;
}

.pricing-header h1 {
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.pricing-header p {
  font-size: 16px;
  color: var(--text-secondary);
}

.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

@media (max-width: 600px) {
  .pricing-cards { grid-template-columns: 1fr; }
  .pricing-header h1 { font-size: 26px; }
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.pricing-card:hover {
  transform: translateY(-3px);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(0, 212, 170, 0.12);
}

.pricing-card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: #000;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
}

.pricing-card-tier {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.pricing-card-price {
  font-size: 44px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-card-price sup {
  font-size: 22px;
  vertical-align: top;
  margin-top: 8px;
}

.pricing-card-cadence {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-card-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 20px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-features li .pf-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-size: 13px;
}

.pf-check { color: var(--accent); font-weight: 800; }
.pf-lock  { color: var(--text-muted); }

.btn-pricing-cta {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-pricing-cta:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-pricing-cta.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: #000;
  border: none;
}

.btn-pricing-cta.secondary {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

/* ── Portfolio page ── */
.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 900px) { .portfolio-summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .portfolio-summary { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.port-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.port-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}

.port-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.port-stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.portfolio-chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 28px;
  height: 220px;
}

.holdings-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.holdings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.holdings-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 10px 14px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.holdings-table th:first-child { text-align: left; }

.holdings-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.holdings-table td:first-child { text-align: left; }

.holdings-table tr:last-child td { border-bottom: none; }

.holdings-table tr:hover td { background: var(--bg-card-hover); }

.holdings-table .ht-ticker {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
}

.holdings-table .ht-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.holdings-table .ht-remove:hover {
  color: var(--red);
  background: var(--red-dim);
}

.add-holding-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.add-holding-form label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: block;
  margin-bottom: 6px;
}

.add-holding-form input {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  width: 140px;
  outline: none;
  transition: border-color 0.15s;
}
.add-holding-form input:focus { border-color: var(--accent); }

.add-holding-form .btn-add-holding {
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  height: 38px;
  transition: opacity 0.15s;
}
.add-holding-form .btn-add-holding:hover { opacity: 0.85; }

.portfolio-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.portfolio-empty .pe-icon { font-size: 40px; margin-bottom: 12px; }
.portfolio-empty .pe-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ── Success page ── */
.success-card {
  max-width: 480px;
  margin: 80px auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.success-glow {
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.success-icon { font-size: 56px; margin-bottom: 16px; }
.success-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.success-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

