/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Light Theme (default) ─── */
:root {
  --bg:           #f8f9fb;
  --bg-card:      #ffffff;
  --bg-card-alt:  #f3f4f6;
  --bg-input:     #ffffff;
  --bg-nav:       rgba(255,255,255,0.85);
  --border:       #e2e5ea;
  --border-hover: #cbd0d8;
  --text:         #1f2937;
  --text-heading: #0f172a;
  --text-muted:   #6b7280;
  --text-dim:     #9ca3af;
  --accent:       #ff2d20;
  --accent-soft:  rgba(255,45,32,0.08);
  --accent-border:rgba(255,45,32,0.2);
  --blue:         #2563eb;
  --teal:         #0d9488;
  --green:        #16a34a;
  --red:          #dc2626;
  --purple:       #7c3aed;
  --hover-row:    rgba(0,0,0,0.02);
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg:    0 10px 30px rgba(0,0,0,0.08);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    6px;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition:   all 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Dark Theme ─── */
[data-theme="dark"] {
  --bg:           #0a0a0f;
  --bg-card:      #111118;
  --bg-card-alt:  #16161f;
  --bg-input:     #1a1a25;
  --bg-nav:       rgba(10,10,15,0.85);
  --border:       #23232f;
  --border-hover: #35354a;
  --text:         #e4e4ed;
  --text-heading: #ffffff;
  --text-muted:   #6b6b80;
  --text-dim:     #44445a;
  --accent:       #ff2d20;
  --accent-soft:  rgba(255,45,32,0.12);
  --accent-border:rgba(255,45,32,0.25);
  --blue:         #3b82f6;
  --teal:         #14b8a6;
  --green:        #22c55e;
  --red:          #ef4444;
  --purple:       #a855f7;
  --hover-row:    rgba(255,255,255,0.02);
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:    0 10px 30px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Navbar ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

/* Secondary navigation bar (Investments sub-tabs) */
.sub-navbar {
  border-top: 1px solid var(--border);
  background: var(--bg-nav);
}
.sub-nav-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  height: 40px;
  display: flex;
  align-items: stretch;
  gap: 0;
}
.sub-nav-inner a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}
.sub-nav-inner a:hover {
  color: var(--text-heading);
}
.sub-nav-inner a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-inner > .nav-right { margin-left: auto; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text-heading);
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }

.brand-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  overflow: visible;
}
.brand-logo {
  display: inline-block;
  height: 28px;
  width: 150px;
  flex-shrink: 0;
  background: url('/logo/Clear market logo colored.svg') no-repeat center / contain;
}
[data-theme="dark"] .brand-logo {
  background-image: url('/logo/Clear market logo white.svg');
}
.nav-role-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--accent); color: #fff; padding: 2px 7px; border-radius: 4px;
}

/* ─── Agent Secondary Nav (Market) ─── */
.agent-subnav {
  position: sticky; top: 60px; z-index: 99;
  background: var(--bg-nav); backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.agent-subnav-inner {
  display: flex; align-items: center; gap: 4px;
  padding: 0 40px; height: 44px;
}
.agent-subnav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; font-family: var(--font);
  color: var(--text-muted); text-decoration: none; border-radius: 6px;
  transition: all 0.15s ease;
}
.agent-subnav-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.agent-subnav-link:hover { color: var(--text-heading); background: var(--bg-hover); }
.agent-subnav-link.active { color: var(--accent); background: var(--accent-soft); }
.agent-subnav ~ .app-content .discover-hero { top: 112px; }
.agent-subnav ~ .app-content .two-col-left { top: 112px; max-height: calc(100vh - 128px); }

.navbar:has(.sub-navbar) ~ .app-content .two-col-left { top: 108px; max-height: calc(100vh - 124px); }
.navbar:has(.sub-navbar) ~ .app-content .discover-hero { top: 108px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Notification Bell ─── */
.notif-wrap { position: relative; }
.notif-bell-btn {
  position: relative; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: var(--transition);
}
.notif-bell-btn:hover { border-color: var(--border-hover); background: var(--bg-card-alt); color: var(--text); }
.notif-bell-btn svg { width: 18px; height: 18px; }
.notif-badge {
  position: absolute; top: 0; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
  background: #ff2d20; color: #fff; border-radius: 100px;
  pointer-events: none;
}
@keyframes notifRing {
  0% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-14deg); }
  45% { transform: rotate(8deg); }
  60% { transform: rotate(-8deg); }
  75% { transform: rotate(2deg); }
  100% { transform: rotate(0); }
}
.notif-ring svg { animation: notifRing 0.6s ease; }
.notif-bell-btn.notif-ring svg { animation: notifRing 0.6s ease; }

.notif-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-height: 440px; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  z-index: 200; animation: fadeUp 0.15s ease;
}
.notif-dropdown.open { display: block; }
.notif-dd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 700; color: var(--text-heading);
}
.notif-mark-read {
  background: none; border: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--accent);
  font-family: var(--font);
}
.notif-mark-read:hover { text-decoration: underline; }
.notif-list { padding: 6px 0; }
.notif-item {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); transition: var(--transition);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-card-alt); }
.notif-item.read { opacity: 0.55; }
.ni-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.ni-success { background: rgba(22,163,74,0.08); color: #16a34a; }
.ni-info { background: rgba(37,99,235,0.08); color: #2563eb; }
.ni-warning { background: rgba(234,179,8,0.08); color: #ca8a04; }
.ni-body { flex: 1; min-width: 0; }
.ni-title { font-size: 12px; font-weight: 700; color: var(--text-heading); margin-bottom: 2px; }
.ni-text { font-size: 13px; color: var(--text); line-height: 1.4; }
.notif-action-btn {
  padding: 4px 12px; font-size: 11px; font-weight: 600; border-radius: 6px;
  cursor: pointer; font-family: var(--font); border: 1px solid var(--border);
  background: var(--bg-input); color: var(--text-muted); transition: all 0.2s;
}
.notif-action-btn.notif-btn-accept { background: #16a34a; color: #fff; border-color: #16a34a; }
.notif-action-btn.notif-btn-accept:hover { background: #15803d; }
.notif-action-btn.notif-btn-decline:hover { border-color: #dc2626; color: #dc2626; }
.notif-agent-req { background: rgba(37,99,235,0.04); }
.ni-time { font-size: 11px; color: var(--text-dim); margin-top: 3px; }
.notif-empty {
  padding: 40px 20px; text-align: center;
  font-size: 13px; color: var(--text-muted);
}

/* ─── Toast Notifications ─── */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; min-width: 300px; max-width: 420px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  pointer-events: auto;
  transform: translateX(120%); opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.toast-show { transform: translateX(0); opacity: 1; }
.toast-hide { transform: translateX(120%); opacity: 0; transition-duration: 0.25s; }
.toast-icon { flex-shrink: 0; }
.toast-icon svg { width: 20px; height: 20px; }
.toast-success .toast-icon { color: #16a34a; }
.toast-info .toast-icon { color: #2563eb; }
.toast-warning .toast-icon { color: #ca8a04; }
.toast-msg { flex: 1; font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; }
.toast-close {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--text-dim); padding: 0 2px;
  line-height: 1; transition: color 0.15s;
}
.toast-close:hover { color: var(--text); }

@media (max-width: 480px) {
  .toast-container { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; width: 100%; }
  .notif-dropdown { width: calc(100vw - 24px); right: -60px; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--text-heading); text-decoration: none; }

.nav-links-auth {
  gap: 6px;
}
.nav-links-auth a {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.15s ease;
}
.nav-links-auth a:hover {
  background: var(--bg-hover);
  color: var(--text-heading);
}

.nav-auth-guest {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-user {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: all 0.15s ease;
}
.nav-user-btn:hover {
  border-color: var(--accent-border);
  background: var(--bg-hover);
}
.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.nav-uname {
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.15s ease;
}
.nav-user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nud-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.1s;
}
.nud-item:hover {
  background: var(--bg-hover);
}
.nud-item svg { color: var(--text-dim); flex-shrink: 0; }
.nud-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.nud-logout { color: var(--red); }
.nud-logout svg { color: var(--red); }

/* ─── Theme Toggle ─── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border-hover); background: var(--bg-card-alt); }
.theme-toggle svg { width: 18px; height: 18px; color: var(--text-muted); }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(255,45,32,0.2);
}
.btn-primary:hover { background: #e6271c; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,45,32,0.25); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-card-alt); border-color: var(--border-hover); }

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

.btn-accent {
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #fff;
  border: none;
}
.btn-accent:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-outline-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-outline-danger:hover { background: rgba(220,38,38,0.06); }

.btn-sm { font-size: 13px; padding: 7px 14px; }
.btn-lg { font-size: 15px; padding: 13px 28px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ─── Landing Hero ─── */
.landing-hero {
  position: relative;
  overflow: hidden;
  padding: 100px 32px 80px;
  text-align: center;
  background: var(--bg);
}

/* ── Floating Stock Cards Background (Apple Stocks widget, theme-aware) ── */
.hero-stock-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  padding: 12px 16px;
  pointer-events: none;
  z-index: 0;
  align-content: start;
}
.hero-radial-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 55% 58% at 50% 46%,
    var(--bg) 0%,
    var(--bg) 30%,
    transparent 100%
  );
}
.hero-float-card {
  aspect-ratio: 1 / 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 10px 12px;
  opacity: 0.18;
  box-shadow: none;
  animation: heroCardFloat 14s ease-in-out infinite;
  will-change: transform;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-float-card:nth-child(odd)  { animation-direction: alternate; }
.hero-float-card:nth-child(even) { animation-direction: alternate-reverse; }
.hero-float-card:nth-child(3n)   { opacity: 0.14; }
.hero-float-card:nth-child(7n)   { opacity: 0.22; }

@keyframes heroCardFloat {
  0%   { transform: translateY(0); }
  25%  { transform: translateY(-5px); }
  50%  { transform: translateY(3px); }
  75%  { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

/* Row 1: ▲ SYMBOL ... +35.10 */
.hfc-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}
.hfc-sym {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 3px;
}
.hfc-arrow { font-size: 7px; }
.hfc-arrow.up   { color: var(--green); }
.hfc-arrow.down { color: var(--red); }
.hfc-abs {
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.hfc-abs.up   { color: var(--green); }
.hfc-abs.down { color: var(--red); }

/* Row 2: Company name ... -0.45% */
.hfc-row2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  line-height: 1.2;
}
.hfc-name {
  font-size: 8px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hfc-pct {
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.hfc-pct.up   { color: var(--green); }
.hfc-pct.down { color: var(--red); }

/* Sparkline with area fill */
.hfc-spark {
  width: 100%;
  flex: 1;
  min-height: 0;
  margin-top: 4px;
}

/* Big price at bottom */
.hfc-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  margin-top: auto;
  padding-top: 2px;
  letter-spacing: -0.02em;
}

@media (max-width: 1200px) {
  .hero-stock-bg { grid-template-columns: repeat(6, 1fr); }
  .hero-float-card:nth-child(n+31) { display: none; }
}
@media (max-width: 900px) {
  .hero-stock-bg { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .hero-float-card:nth-child(n+21) { display: none; }
}
@media (max-width: 600px) {
  .hero-stock-bg { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; }
  .hero-float-card:nth-child(n+13) { display: none; }
  .hero-float-card { padding: 6px 7px 8px; border-radius: 12px; }
  .hfc-sym { font-size: 8px; }
  .hfc-name { display: none; }
  .hfc-row2 { display: none; }
  .hfc-abs { font-size: 8px; }
  .hfc-price { font-size: 12px; }
}
@media (max-width: 400px) {
  .hero-stock-bg { grid-template-columns: repeat(2, 1fr); }
  .hero-float-card:nth-child(n+9) { display: none; }
}

.landing-hero .hero-glow {
  position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, rgba(255,45,32,0.06) 0%, rgba(124,58,237,0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 2;
}

.landing-hero .hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  z-index: 3;
}

.hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  background: var(--accent-soft);
}

.landing-hero h1 {
  font-size: clamp(36px,5vw,56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-heading);
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-hero .hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding: 20px 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-heading); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ─── Features Grid (Landing) ─── */
.features-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.features-section h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 12px;
}
.features-section .section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.feature-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-icon.red   { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
.feature-icon.blue  { background: rgba(37,99,235,0.08); color: var(--blue); border: 1px solid rgba(37,99,235,0.2); }
.feature-icon.teal  { background: rgba(13,148,136,0.08); color: var(--teal); border: 1px solid rgba(13,148,136,0.2); }
.feature-icon.purple { background: rgba(124,58,237,0.08); color: var(--purple); border: 1px solid rgba(124,58,237,0.2); }
.feature-icon.green { background: rgba(22,163,74,0.08); color: var(--green); border: 1px solid rgba(22,163,74,0.2); }

.feature-card h3 { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 6px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ─── Stock Screens ─── */
/* ─── Scripts Preview (landing) ─── */
.screens-section {
  padding: 80px 32px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.screens-section .section-header { text-align: center; margin-bottom: 48px; }
.screens-section .section-header h2 { font-size: 32px; font-weight: 800; color: var(--text-heading); margin-bottom: 12px; }
.screens-section .section-header p { font-size: 16px; color: var(--text-muted); max-width: 520px; margin: 0 auto; }

.spv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1100px; margin: 0 auto; }
.spv-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 28px 20px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text); transition: var(--transition);
}
.spv-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-3px); text-decoration: none; }
.spv-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.spv-icon.red { background: var(--accent-soft); }
.spv-icon.blue { background: rgba(37,99,235,0.08); }
.spv-icon.green { background: rgba(22,163,74,0.08); }
.spv-icon.purple { background: rgba(124,58,237,0.08); }
.spv-icon.teal { background: rgba(13,148,136,0.08); }
.spv-card h4 { font-size: 14px; font-weight: 700; color: var(--text-heading); margin: 0; line-height: 1.3; }
.spv-card p { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* ─── Sectors Preview (landing) ─── */
.sectors-section { padding: 80px 32px; }
.sectors-section .section-header { text-align: center; margin-bottom: 48px; }
.sectors-section .section-header h2 { font-size: 32px; font-weight: 800; color: var(--text-heading); margin-bottom: 12px; }
.sectors-section .section-header p { font-size: 16px; color: var(--text-muted); max-width: 480px; margin: 0 auto; }

.sec-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1100px; margin: 0 auto; }
.sec-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: var(--transition);
}
.sec-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.sec-card-name { font-size: 14px; font-weight: 700; color: var(--text-heading); line-height: 1.35; }
.sec-card-count { font-size: 12px; color: var(--text-dim); }

@media (max-width: 900px) {
  .spv-grid { grid-template-columns: repeat(2, 1fr); }
  .sec-preview { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .screens-section, .sectors-section { padding: 60px 20px; }
  .spv-grid { grid-template-columns: 1fr; }
  .sec-preview { grid-template-columns: 1fr; }
}

/* ─── How It Works ─── */
.how-section {
  padding: 80px 32px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.how-section .section-header {
  text-align: center;
  margin-bottom: 64px;
}
.how-section .section-header h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 12px;
}
.how-section .section-header p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}
.how-steps {
  display: flex;
  justify-content: center;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}
.how-step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  position: relative;
}
.how-step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}
.how-step-num.s1 { background: var(--accent-soft); color: var(--accent); border: 2px solid var(--accent-border); }
.how-step-num.s2 { background: rgba(37,99,235,0.08); color: var(--blue); border: 2px solid rgba(37,99,235,0.2); }
.how-step-num.s3 { background: rgba(22,163,74,0.08); color: var(--green); border: 2px solid rgba(22,163,74,0.2); }
.how-step h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
}
.how-step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.how-connector {
  position: absolute;
  top: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--border), var(--accent), var(--blue), var(--green), var(--border));
  z-index: 1;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 200px);
  opacity: 0.5;
}

/* ─── Market Pulse ─── */
.pulse-section {
  padding: 80px 32px;
  overflow: hidden;
}
.pulse-section .section-header {
  text-align: center;
  margin-bottom: 48px;
}
.pulse-section .section-header h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 12px;
}
.pulse-section .section-header p {
  font-size: 16px;
  color: var(--text-muted);
}
.pulse-track {
  display: flex;
  gap: 16px;
  animation: pulse-scroll 30s linear infinite;
  width: max-content;
}
.pulse-track:hover { animation-play-state: paused; }
@keyframes pulse-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.pulse-card {
  flex-shrink: 0;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.pulse-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pulse-card .pc-symbol {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 2px;
}
.pulse-card .pc-name {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pulse-card .pc-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 4px;
}
.pulse-card .pc-change {
  font-size: 13px;
  font-weight: 600;
}
.pulse-card .pc-change.up { color: var(--green); }
.pulse-card .pc-change.down { color: var(--red); }

/* ─── Data Sources / Built For ─── */
.sources-section {
  padding: 80px 32px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sources-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.sources-text h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 16px;
  line-height: 1.2;
}
.sources-text p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.sources-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}
.source-badge:hover { border-color: var(--accent-border); background: var(--accent-soft); }
.source-badge .sb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: badge-pulse 2s ease-in-out infinite;
}
.source-badge .sb-dot.live { background: var(--green); }
.source-badge .sb-dot.soon { background: var(--text-dim); }
@keyframes badge-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.sources-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sv-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}
.sv-card:hover { border-color: var(--accent-border); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sv-card .sv-num {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}
.sv-card .sv-num.accent { color: var(--accent); }
.sv-card .sv-num.blue { color: var(--blue); }
.sv-card .sv-num.purple { color: var(--purple); }
.sv-card .sv-num.green { color: var(--green); }
.sv-card .sv-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── CTA Section ─── */
.cta-section {
  padding: 100px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section .cta-glow {
  position: absolute;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(255,45,32,0.05) 0%, rgba(37,99,235,0.03) 40%, transparent 70%);
  pointer-events: none;
}
.cta-section .cta-inner {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}
.cta-section h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 16px;
  line-height: 1.15;
}
.cta-section p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.7;
}
.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive additions for new sections ─── */
@media (max-width: 768px) {
  .how-steps { flex-direction: column; gap: 32px; align-items: center; }
  .how-connector { display: none; }
  .sources-inner { grid-template-columns: 1fr; gap: 40px; }
  .sources-visual { grid-template-columns: 1fr 1fr; }
  .pulse-section { padding: 60px 20px; }
  .how-section, .sources-section { padding: 60px 20px; }
  .cta-section { padding: 60px 20px; }
  .cta-section h2 { font-size: 28px; }
}

/* ─── Auth Pages ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-page .site-footer { margin-top: auto; flex-shrink: 0; }
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}
.auth-box h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.auth-box .auth-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,45,32,0.08);
}
.form-group input::placeholder { color: var(--text-dim); }

.auth-box .btn { width: 100%; justify-content: center; margin-top: 4px; }
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-role-tabs {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 3px;
  margin-bottom: 24px;
  gap: 2px;
}
.auth-role-tab {
  flex: 1;
  padding: 9px 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-xs) - 2px);
  cursor: pointer;
  transition: all 0.2s ease;
}
.auth-role-tab:hover { color: var(--text); }
.auth-role-tab.active {
  background: var(--bg-card);
  color: var(--text-heading);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.auth-copyright {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  padding: 16px 20px 24px;
  margin: 0;
}
.auth-error {
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 16px;
  display: none;
}
.auth-error.show { display: block; }

/* ─── Main Layout ─── */
main {
  max-width: 100%;
  padding: 24px 32px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  scroll-margin-top: 80px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.4s ease both;
}
.card:hover { border-color: var(--border-hover); }
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.card-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}
.card-icon svg { width: 20px; height: 20px; color: var(--accent); }
.card-icon.icon-results { background: rgba(37,99,235,0.08); border-color: rgba(37,99,235,0.2); }
.card-icon.icon-results svg { color: var(--blue); }
.card-icon.icon-saved { background: rgba(13,148,136,0.08); border-color: rgba(13,148,136,0.2); }
.card-icon.icon-saved svg { color: var(--teal); }

.card-header h2 { font-size: 18px; font-weight: 700; color: var(--text-heading); margin-bottom: 2px; }
.card-sub { font-size: 13px; color: var(--text-muted); }

/* ─── Scripts Page ─── */
.scripts-page { max-width: 100%; }
.scripts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.scripts-header h1 { margin-top: 0; }

.screen-category { margin-bottom: 36px; }
.sc-header { margin-bottom: 14px; }
.sc-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 2px;
}
.sc-header p {
  font-size: 13px;
  color: var(--text-dim);
}
.sc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.screen-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font);
  box-shadow: var(--shadow-sm);
}
.screen-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.screen-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.screen-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 10px;
}
.sc-formula {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-card-alt);
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.sc-run {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.screen-card:hover .sc-run { text-decoration: underline; }

/* Script Banner */
.script-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255,45,32,0.04), rgba(255,45,32,0.08));
  border: 1px solid rgba(255,45,32,0.15);
  border-radius: var(--radius-xs);
  margin-bottom: 20px;
}
.sb-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sb-body { flex: 1; min-width: 0; }
.sb-name { font-size: 14px; font-weight: 800; color: var(--text-heading); margin-bottom: 4px; }
.sb-formula {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
  line-height: 1.4;
}
.sb-clear {
  background: none; border: none; cursor: pointer; color: var(--text-dim);
  padding: 4px; border-radius: 4px; transition: var(--transition); flex-shrink: 0;
}
.sb-clear:hover { color: var(--accent); background: rgba(255,45,32,0.08); }

.custom-screen-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.csp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.csp-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.results-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
}
.results-header .save-row { margin-bottom: 0; }

/* Refine Results Toolbar */
.refine-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; margin-bottom: 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-xs);
  flex-wrap: wrap;
}
.refine-left, .refine-right {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.refine-search-wrap {
  position: relative;
}
.refine-search-wrap svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-dim);
}
.refine-input {
  padding: 7px 12px 7px 34px; font-size: 13px; font-family: var(--font);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--bg-input); color: var(--text); width: 200px;
}
.refine-input:focus { border-color: var(--accent); outline: none; }
.refine-select {
  padding: 7px 28px 7px 10px; font-size: 12px; font-weight: 600; font-family: var(--font);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--bg-input); color: var(--text); cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.refine-select:focus { border-color: var(--accent); outline: none; }
.refine-count {
  font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap;
}
.refine-clear {
  padding: 6px 12px; font-size: 11px; font-weight: 600; font-family: var(--font);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: none; color: var(--text-muted); cursor: pointer;
  transition: var(--transition);
}
.refine-clear:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 768px) {
  .refine-bar { flex-direction: column; align-items: stretch; }
  .refine-left, .refine-right { flex-direction: column; }
  .refine-input { width: 100%; }
}

.saved-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .scripts-header { flex-direction: column; }
  .sc-grid { grid-template-columns: 1fr; }
}

/* ─── Filter Grid ─── */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px 20px;
  margin-bottom: 24px;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
}
.filter-group input,
.filter-group select {
  font-family: var(--font); font-size: 14px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.filter-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5l3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,45,32,0.08);
}
.filter-group input::placeholder { color: var(--text-dim); }

.filter-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-text { font-size: 13px; color: var(--text-muted); margin-left: 4px; }

/* ─── Save Row ─── */
.save-row { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.save-row input {
  flex: 1; min-width: 240px;
  font-family: var(--font); font-size: 14px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.save-row input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,0.08); }
.save-row input::placeholder { color: var(--text-dim); }

.count-badge {
  font-size: 13px; font-weight: 600;
  color: var(--blue);
  background: rgba(37,99,235,0.08);
  padding: 2px 10px; border-radius: 100px; margin-left: 8px;
}
.count-badge:empty { display: none; }

/* ─── Table ─── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { position: sticky; top: 0; z-index: 1; }
th {
  background: var(--bg-card-alt);
  font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; color: var(--text); }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover td { background: var(--hover-row); }
tbody tr:last-child td { border-bottom: none; }

td .ticker-name { font-weight: 700; color: var(--text-heading); text-decoration: none; }
td a.ticker-name:hover { color: var(--accent); }
td .market-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
td .market-tag.nse { background: rgba(124,58,237,0.08); color: var(--purple); }
td .market-tag.bse { background: rgba(13,148,136,0.08); color: var(--teal); }
td .market-tag.nyse { background: rgba(37,99,235,0.08); color: var(--blue); }
td .sector-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 4px; background: var(--bg-card-alt); color: var(--text-muted); }

.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }
td.empty-cell { text-align: center; padding: 40px 14px; color: var(--text-dim); font-style: italic; }

/* ─── Saved Lists ─── */
.saved-lists { display: flex; flex-direction: column; gap: 10px; }
.saved-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card-alt);
  transition: var(--transition);
}
.saved-item:hover { border-color: var(--border-hover); }
.saved-item .name { font-weight: 700; font-size: 15px; color: var(--text-heading); margin-bottom: 3px; }
.saved-item .meta { font-size: 12px; color: var(--text-muted); }
.saved-actions { display: flex; gap: 8px; }
.saved-empty { text-align: center; padding: 32px 16px; color: var(--text-dim); font-size: 14px; }

/* ─── Footer ─── */
/* old footer reset */
footer { border-top: none; padding: 0; text-align: left; }

/* ─── Animations ─── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.6s linear infinite;
  vertical-align: middle; margin-right: 6px;
}

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

/* ─── Search Bar ─── */
.search-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto 40px;
}
.search-wrap input {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  padding: 14px 20px 14px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,45,32,0.08), var(--shadow-md); }
.search-wrap input::placeholder { color: var(--text-dim); }
.search-wrap .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-dim);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  text-align: left;
}
.search-results.show { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.1s ease;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card-alt); text-decoration: none; }
.search-result-item .sr-left { display: flex; flex-direction: column; gap: 2px; }
.search-result-item .sr-symbol { font-weight: 700; font-size: 14px; color: var(--text-heading); }
.search-result-item .sr-name { font-size: 12px; color: var(--text-muted); }
.search-result-item .sr-right { text-align: right; }
.search-result-item .sr-price { font-weight: 600; font-size: 14px; color: var(--text-heading); }
.search-result-item .sr-change { font-size: 12px; }
.search-result-item .sr-market { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 3px; }
.sr-market.nse { background: rgba(124,58,237,0.08); color: var(--purple); }
.sr-market.bse { background: rgba(13,148,136,0.08); color: var(--teal); }
.search-empty { padding: 20px; text-align: center; color: var(--text-dim); font-size: 14px; }

/* Nav search (smaller, inline) */
.nav-search {
  position: relative;
  width: 220px;
}
.nav-search input {
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 12px 8px 34px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}
.nav-search input:focus { border-color: var(--accent); background: var(--bg-card); }
.nav-search input::placeholder { color: var(--text-dim); }
.nav-search .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-dim);
  pointer-events: none;
}
.nav-search .search-results { top: calc(100% + 4px); min-width: 340px; right: 0; left: auto; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .landing-hero { padding: 60px 20px 50px; }
  .landing-hero h1 { font-size: 32px; }
  .hero-stats { flex-direction: column; gap: 16px; padding: 20px 28px; }
  .stat-divider { width: 60px; height: 1px; }
  main { padding: 20px 16px 60px; }
  .card { padding: 20px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .auth-box { padding: 28px 24px; }
}

@media (max-width: 480px) {
  .filter-grid { grid-template-columns: 1fr; }
  .save-row { flex-direction: column; }
  .save-row input { min-width: 0; }
}

/* ═══════════════════════════════════════════
   MUTUAL FUNDS
   ═══════════════════════════════════════════ */

/* ─── MF Listing Page ─── */
.mf-page { max-width: 100%; padding: 24px 32px 60px; }
.mf-page-header { margin-bottom: 32px; }
.mf-page-header h1 { font-size: 28px; font-weight: 800; color: var(--text-heading); margin-bottom: 4px; }
.mf-page-header p { color: var(--text-muted); font-size: 14px; }

.mf-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; }

.mf-sidebar { position: sticky; top: 80px; align-self: start; }
.mf-filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.mf-filter-card h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 16px; }
.mf-filter-group { margin-bottom: 16px; }
.mf-filter-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.mf-filter-group select,
.mf-filter-group input {
  width: 100%; padding: 7px 10px; font-size: 13px; font-family: var(--font);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-xs);
  color: var(--text); transition: var(--transition);
}
.mf-filter-group select:focus,
.mf-filter-group input:focus { border-color: var(--accent); outline: none; }
.mf-filter-actions { display: flex; gap: 8px; margin-top: 12px; }
.mf-filter-actions .btn { flex: 1; font-size: 13px; padding: 8px 0; }

.mf-results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mf-results-header .mf-count { font-size: 13px; color: var(--text-muted); }
.mf-sort-wrap { display: flex; align-items: center; gap: 8px; }
.mf-sort-wrap label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.mf-sort-wrap select {
  padding: 5px 8px; font-size: 12px; font-family: var(--font);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xs);
  color: var(--text);
}

.mf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }

.mf-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: var(--transition);
}
.mf-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.mf-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mf-card-name { font-size: 14px; font-weight: 700; color: var(--text-heading); line-height: 1.35; flex: 1; }
.mf-card-nav { font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.mf-card-meta { font-size: 11px; color: var(--text-dim); display: flex; gap: 8px; flex-wrap: wrap; }
.mf-card-meta span { background: var(--bg-card-alt); padding: 2px 8px; border-radius: 4px; }
.mf-card-returns { display: flex; gap: 6px; flex-wrap: wrap; }
.mf-ret-badge {
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 4px; white-space: nowrap;
}
.mf-ret-badge.pos { background: rgba(22,163,74,.08); color: #16a34a; }
.mf-ret-badge.neg { background: rgba(220,38,38,.08); color: #dc2626; }
.mf-ret-badge.neutral { background: var(--bg-card-alt); color: var(--text-dim); }

.mf-empty { text-align: center; padding: 60px 20px; color: var(--text-dim); font-size: 14px; }

/* ─── MF Detail Page ─── */
.mf-detail { max-width: 100%; padding: 24px 32px 60px; }
/* Breadcrumb bar (shared across stock & MF detail pages) */
.breadcrumb {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 10px 40px; font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 0;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb .sep { margin: 0 8px; color: var(--text-dim); }

.bc-back {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  color: var(--text-muted); padding: 2px 4px 2px 0;
  border-radius: 6px; transition: color 0.15s, background 0.15s;
}
.bc-back svg { width: 16px; height: 16px; flex-shrink: 0; }
.bc-back:hover { color: var(--accent); }
.bc-divider {
  width: 1px; height: 16px; background: var(--border);
  margin: 0 14px; flex-shrink: 0;
}

/* ─── Page Layout: Main + Sidebar (shared) ─── */
.page-layout { display: flex; gap: 28px; padding: 24px 40px; align-items: flex-start; }
.main-col { flex: 1; min-width: 0; }
.side-col { width: 220px; flex-shrink: 0; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }

/* ─── Actions Card ─── */
.actions-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.action-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 9px 12px; font-size: 13px; font-weight: 600; font-family: var(--font);
  border-radius: var(--radius-xs); cursor: pointer; transition: var(--transition); border: 1px solid var(--border);
}
.action-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.action-btn.btn-follow { background: var(--accent); color: #fff; border-color: var(--accent); }
.action-btn.btn-follow:hover:not(:disabled) { opacity: 0.9; }
.action-btn.btn-follow.following { background: var(--bg); color: var(--accent); border-color: var(--accent); }
.action-btn.btn-portfolio { background: var(--bg); color: var(--text); }
.action-btn.btn-portfolio:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.action-btn.btn-portfolio.added { background: rgba(22,163,74,.06); color: #16a34a; border-color: #16a34a; }
.action-btn.btn-share { background: var(--bg); color: var(--text-muted); }
.action-btn.btn-share:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.action-btn.btn-alert { background: var(--bg); color: var(--text-muted); }
.action-btn.btn-alert:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.action-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ─── Portfolio Popover ─── */
.portfolio-popover-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 500;
  align-items: center; justify-content: center;
}
.portfolio-popover-overlay.open { display: flex; }
.portfolio-popover {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2); width: 420px; max-width: 92vw;
  padding: 28px; animation: fadeUp 0.2s ease;
}
.pp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.pp-header h3 { font-size: 17px; font-weight: 700; color: var(--text-heading); }
.pp-close { background: none; border: none; cursor: pointer; color: var(--text-dim); padding: 4px; border-radius: 6px; }
.pp-close:hover { background: var(--bg-hover); color: var(--text); }
.pp-stock-info { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--bg); border-radius: var(--radius-xs); margin-bottom: 18px; }
.pp-stock-sym { font-weight: 800; font-size: 14px; color: var(--text-heading); }
.pp-stock-price { font-size: 13px; color: var(--text-muted); margin-left: auto; }
.pp-form { display: flex; flex-direction: column; gap: 14px; }
.pp-field { display: flex; flex-direction: column; gap: 5px; }
.pp-field label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.pp-field input, .pp-field select {
  padding: 10px 12px; font-size: 14px; font-family: var(--font);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--bg-input); color: var(--text);
}
.pp-field input:focus, .pp-field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(255,45,32,0.08); }
.pp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pp-total { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-heading); font-weight: 600; }
.pp-actions { display: flex; gap: 10px; margin-top: 6px; }
.pp-actions .btn { flex: 1; justify-content: center; }

/* ─── Sidebar Cards ─── */
.side-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.side-card-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); padding: 12px 14px 8px; }
.side-card ul { list-style: none; margin: 0; padding: 0; }
.side-card li a { display: block; padding: 7px 14px; font-size: 12px; color: var(--text); text-decoration: none; border-left: 3px solid transparent; transition: var(--transition); }
.side-card li a:hover { color: var(--accent); background: var(--bg-card-alt, rgba(0,0,0,0.02)); }
.side-card li a.active { color: var(--accent); font-weight: 600; border-left-color: var(--accent); background: var(--bg-card-alt, rgba(0,0,0,0.02)); }
.side-card .side-link { display: flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 12px; color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.side-card .side-link:hover { color: var(--accent); }
.side-card .side-link .arrow { font-size: 10px; }

@media (max-width: 768px) {
  .page-layout { flex-direction: column; padding: 16px 20px; }
  .side-col { width: 100%; position: static; max-height: none; }
  .side-card ul { display: flex; flex-wrap: wrap; }
  .side-card li a { padding: 6px 12px; border-left: none; border-bottom: 2px solid transparent; }
  .side-card li a.active { border-left: none; border-bottom-color: var(--accent); }
}

.mf-detail-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.mf-detail-header h1 { font-size: 22px; font-weight: 800; color: var(--text-heading); margin-bottom: 8px; line-height: 1.35; }
.mf-detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.mf-badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 100px; background: var(--bg-card-alt); color: var(--text-muted);
}
.mf-badge.accent { background: var(--accent-soft); color: var(--accent); }

.mf-nav-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.mf-nav-big { font-size: 32px; font-weight: 800; color: var(--text-heading); }
.mf-nav-change { font-size: 14px; font-weight: 600; }
.mf-nav-change.pos { color: #16a34a; }
.mf-nav-change.neg { color: #dc2626; }
.mf-nav-date { font-size: 12px; color: var(--text-dim); }

.mf-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }

/* NAV Chart */
.mf-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.mf-chart-card h2 { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 12px; }
.mf-chart-filters { display: flex; gap: 6px; margin-bottom: 16px; }
.mf-chart-filters button {
  padding: 5px 12px; font-size: 12px; font-weight: 600; font-family: var(--font);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--bg); color: var(--text-muted); cursor: pointer;
  transition: var(--transition);
}
.mf-chart-filters button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mf-chart-wrap { position: relative; width: 100%; height: 280px; }
.mf-chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* Returns Grid */
.mf-returns-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.mf-returns-card h2 { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 16px; }
.mf-returns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.mf-return-item {
  text-align: center; padding: 16px 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.mf-return-item .label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; margin-bottom: 6px; }
.mf-return-item .value { font-size: 20px; font-weight: 800; }
.mf-return-item .value.pos { color: #16a34a; }
.mf-return-item .value.neg { color: #dc2626; }
.mf-return-item .value.na { color: var(--text-dim); }

/* Fund Info */
.mf-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  grid-column: 1 / -1;
}
.mf-info-card h2 { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 16px; }
.mf-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.mf-info-item .label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; margin-bottom: 2px; }
.mf-info-item .val { font-size: 14px; font-weight: 600; color: var(--text-heading); word-break: break-all; }

/* ─── Landing: MF Section ─── */
.mf-landing-section {
  padding: 80px 32px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mf-landing-section .section-header { text-align: center; margin-bottom: 48px; }
.mf-landing-section .section-header h2 { font-size: 32px; font-weight: 800; color: var(--text-heading); margin-bottom: 12px; }
.mf-landing-section .section-header p { font-size: 16px; color: var(--text-muted); max-width: 540px; margin: 0 auto; }

/* MF Preview Cards (landing) */
.mf-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; }
.mpv-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition);
}
.mpv-card:hover { box-shadow: var(--shadow-md); }
.mpv-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.mpv-cat-name { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-heading); }
.mpv-cat-link { font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.mpv-cat-link:hover { text-decoration: underline; }
.mpv-card-body { display: flex; flex-direction: column; }
.mpv-fund {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  text-decoration: none; color: inherit; transition: var(--transition);
  border-bottom: 1px solid var(--border);
}
.mpv-fund:last-child { border-bottom: none; }
.mpv-fund:hover { background: var(--bg-card-alt); }
.mpv-rank {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--text-dim);
  background: var(--bg-card-alt); border: 1px solid var(--border);
}
.mpv-fund-info { flex: 1; min-width: 0; }
.mpv-fund-name { font-size: 13px; font-weight: 700; color: var(--text-heading); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpv-fund-house { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.mpv-fund-ret { text-align: right; flex-shrink: 0; }
.mpv-ret-val { font-size: 15px; font-weight: 800; }
.mpv-ret-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.mpv-fund-ret.pos .mpv-ret-val { color: #16a34a; }
.mpv-fund-ret.neg .mpv-ret-val { color: #dc2626; }

.mf-landing-actions { text-align: center; margin-top: 36px; }

/* ─── Landing: MF Stats in Sources ─── */
.mf-stat-row { display: flex; gap: 16px; justify-content: center; margin-top: 24px; }

/* ─── Search MF Results ─── */
.search-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim); padding: 6px 14px 4px; background: var(--bg-card-alt);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 900px) {
  .mf-layout { grid-template-columns: 1fr; }
  .mf-sidebar { position: static; }
  .mf-detail-grid { grid-template-columns: 1fr; }
  .mf-preview { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .mf-page, .mf-detail { padding: 70px 16px 40px; }
  .mf-grid { grid-template-columns: 1fr; }
  .mf-preview { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   Footer – Dark Redesign with Toggle
   ═══════════════════════════════════════════════════════════════════ */

.site-footer {
  background: #1a1a1a; color: #a3a3a3; margin-top: 60px;
}
[data-theme="dark"] .site-footer { background: #111111; }

.ft-toggle-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ft-brand {
  font-size: 14px; font-weight: 800; color: #fff; letter-spacing: -0.01em;
}
.ft-toggle-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.ft-toggle-btn:hover { background: rgba(255,255,255,0.12); }
.ft-chevron {
  width: 16px; height: 16px; color: #a3a3a3;
  transition: transform 0.3s ease;
}
.ft-toggle-btn.collapsed .ft-chevron { transform: rotate(180deg); }

.ft-body {
  max-height: 400px; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
  opacity: 1; padding: 40px 32px 32px;
}
.ft-body.collapsed {
  max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0;
}

.ft-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
  max-width: 100%;
}
.ft-col h4 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #737373; margin-bottom: 16px;
}
.ft-col a {
  display: block; font-size: 14px; color: #a3a3a3;
  text-decoration: none; padding: 4px 0; transition: color 0.15s;
}
.ft-col a:hover { color: #fff; }

.ft-bottom {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}
.ft-bottom p { font-size: 12px; color: #525252; margin: 0; }

@media (max-width: 768px) {
  .ft-cols { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .ft-body { padding: 28px 20px 24px; }
  .ft-toggle-bar { padding: 14px 20px; }
}
@media (max-width: 480px) {
  .ft-cols { grid-template-columns: 1fr; gap: 24px; }
}

/* ═══════════════════════════════════════════════════════════════════
   Agent Signup Page
   ═══════════════════════════════════════════════════════════════════ */

.agent-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   Invite Page
   ═══════════════════════════════════════════════════════════════════ */

.invite-header { text-align: center; margin-bottom: 24px; }
.input-readonly {
  background: var(--bg-card-alt) !important;
  color: var(--text-muted);
  cursor: default;
}

/* ═══════════════════════════════════════════════════════════════════
   Agent Dashboard
   ═══════════════════════════════════════════════════════════════════ */

.agent-dash { padding: 24px 32px 40px; max-width: 100%; }
.agent-welcome {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 8px;
}

/* Stats Bar */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.stat-card.accent { border-color: var(--accent-border); background: var(--accent-soft); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-val { font-size: 24px; font-weight: 800; margin-top: 6px; color: var(--text-heading); }
.stat-card.accent .stat-val { color: var(--accent); }

/* Tabs */
.dash-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.dash-tab {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.dash-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.dash-tab:hover:not(.active) { color: var(--text); }

/* Panel */
.dash-panel { min-height: 300px; }
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.panel-header h2 { font-size: 20px; font-weight: 700; }
.panel-header h3 { font-size: 18px; font-weight: 700; }
.empty-msg { text-align: center; padding: 40px; color: var(--text-muted); }

/* Table */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dash-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.dash-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.dash-table tr:hover td { background: var(--hover-row); }
.dash-table .cust-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.dash-table .cust-link:hover { text-decoration: underline; }
.action-cell { white-space: nowrap; }
.txn-scheme { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-green { background: rgba(22,163,74,0.1); color: #16a34a; }
.badge-yellow { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-gray { background: rgba(100,116,139,0.1); color: #64748b; }
.badge-red { background: rgba(220,38,38,0.1); color: #dc2626; }
.badge-blue { background: rgba(37,99,235,0.1); color: #2563eb; }

/* Icon Buttons */
.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
  margin-left: 4px;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon-danger:hover { border-color: var(--red); color: var(--red); }

/* Portfolio Cards */
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.pf-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pf-top h4 { font-size: 16px; }
.pf-link { color: var(--accent); text-decoration: none; font-weight: 700; }
.pf-link:hover { text-decoration: underline; }
.pf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.pf-stats > div { display: flex; flex-direction: column; gap: 2px; }
.pf-label { font-size: 11px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; letter-spacing: 0.03em; }
.pf-notes { margin-top: 10px; font-size: 13px; color: var(--text-muted); }

/* Holdings */
.holdings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.holding-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.holding-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.holding-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.holding-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; font-size: 13px; }
.holding-stats > div { display: flex; flex-direction: column; }
.holding-stats span:first-child { font-size: 10px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }

/* Summary Bar */
.summary-bar {
  display: flex;
  gap: 32px;
  padding: 16px 20px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Invite Link */
.invite-link-box { display: flex; gap: 8px; margin-bottom: 8px; }
.invite-link-box input { flex: 1; }
.invite-expires { font-size: 12px; color: var(--text-muted); }

/* MF Search in Modal */
.mf-search-results {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  margin-top: 4px;
}
.mf-search-results:empty { border: none; }
.mf-result-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.1s;
}
.mf-result-item:hover { background: var(--accent-soft); }
.mf-selected {
  padding: 8px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 8px;
}

/* Analytics */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.analytics-card.full-width { grid-column: 1 / -1; }
.analytics-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.analytics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.analytics-row:last-child { border-bottom: none; }
.analytics-row .rank { color: var(--text-muted); font-weight: 700; width: 32px; }
.analytics-row .scheme-name { flex: 1; margin: 0 12px; }
.analytics-row .scheme-val { font-weight: 700; white-space: nowrap; }

@media (max-width: 900px) {
  .analytics-grid { grid-template-columns: 1fr; }
  .agent-dash { padding: 70px 16px 32px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .dash-stats { grid-template-columns: 1fr; }
  .holdings-grid { grid-template-columns: 1fr; }
  .summary-bar { flex-direction: column; gap: 8px; }
  .dash-table { font-size: 12px; }
  .dash-table th, .dash-table td { padding: 6px 8px; }
}

/* ═══════════════════════════════════════════════════════════════════
   App Sidebar – Left Navigation for post-login pages
   ═══════════════════════════════════════════════════════════════════ */

/* Top-bar active link */
.nav-links-auth a.active {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

/* Dashboard page */
.app-content { padding: 24px 32px; min-height: 100vh; }
.app-content h1 { font-size: 24px; font-weight: 800; margin-top: 0; margin-bottom: 8px; }
.app-content .page-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }

/* ═══ Dashboard — Bento Grid ═══ */
.dash-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.dash-header h1 { margin-bottom: 2px; }
.dash-date { font-size: 12px; color: var(--text-dim); white-space: nowrap; font-weight: 500; margin-left: auto; }

.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bento-8 { grid-column: span 8; }
.bento-6 { grid-column: span 6; }
.bento-4 { grid-column: span 4; }
.bento-3 { grid-column: span 3; }
.bento-12 { grid-column: span 12; }

.b-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
  position: relative; overflow: visible;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.b-card:hover { border-color: var(--accent-border); box-shadow: 0 8px 32px rgba(0,0,0,0.06); }
[data-theme="dark"] .b-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.25); }

/* Lock body during drag/resize */
.bg-body-dragging { -webkit-user-select: none; user-select: none; cursor: grabbing; }

/* Drag handle */
.bg-drag-handle { cursor: grab; -webkit-user-select: none; user-select: none; }
.bg-body-dragging .bg-drag-handle { cursor: grabbing; }

/* Resize handle — right edge */
.bg-resize-handle {
  position: absolute; top: 8px; bottom: 8px; width: 6px;
  cursor: ew-resize; z-index: 5; border-radius: 3px;
  background: var(--accent); opacity: 0;
  transition: opacity 0.15s;
}
.b-card:hover .bg-resize-handle { opacity: 0.18; }
.bg-resize-handle:hover { opacity: 0.4 !important; }
.bg-resize-e { right: -3px; }

/* Placeholder left behind while dragging */
.bg-dragging {
  opacity: 0 !important;
  pointer-events: none;
}

/* Floating ghost */
.bg-ghost {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  opacity: 0.85;
  will-change: transform;
}
.bg-ghost-active {
  box-shadow: 0 24px 48px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
  opacity: 0.92;
}
[data-theme="dark"] .bg-ghost-active {
  box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}

/* Card while resizing */
.bg-resizing {
  z-index: 10;
  box-shadow: 0 0 0 2px var(--accent);
}

/* Reset button */
.bg-reset-btn {
  background: none; border: 1px solid var(--border);
  border-radius: 8px; width: 32px; height: 32px;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.bg-reset-btn:hover { color: var(--accent); border-color: var(--accent); }
.bg-reset-btn svg { width: 16px; height: 16px; }

.b-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.b-card-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-dim);
  display: flex; align-items: center; gap: 6px;
}
.b-card-title svg { width: 14px; height: 14px; opacity: 0.5; }
.b-card-link {
  font-size: 11px; font-weight: 600; color: var(--accent);
  text-decoration: none;
}
.b-card-link:hover { text-decoration: underline; }

/* Portfolio Hero */
.hero-pf { display: flex; align-items: center; gap: 32px; }
.hero-pf-left { flex: 1; }
.hero-pf-pnl { font-size: 40px; font-weight: 900; line-height: 1.1; color: var(--text-heading); }
.hero-pf-pnl.up { color: #16a34a; }
.hero-pf-pnl.down { color: #dc2626; }
.hero-pf-pnl-pct { font-size: 16px; font-weight: 700; margin-left: 8px; opacity: 0.75; }
.hero-pf-row { display: flex; gap: 32px; margin-top: 16px; }
.hero-pf-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-pf-stat-label { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.3px; }
.hero-pf-stat-val { font-size: 18px; font-weight: 800; color: var(--text-heading); }

/* Donut ring */
.alloc-body { display: flex; flex-direction: column; align-items: center; padding: 12px 0 4px; }
.hero-ring-wrap { flex-shrink: 0; position: relative; width: 120px; height: 120px; }
.hero-ring {
  width: 120px; height: 120px; border-radius: 50%;
  background: conic-gradient(#2563eb 0% 50%, #16a34a 50% 80%, #f59e0b 80% 100%);
  display: flex; align-items: center; justify-content: center;
}
.hero-ring-inner {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--bg-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero-ring-count { font-size: 22px; font-weight: 900; color: var(--text-heading); line-height: 1; }
.hero-ring-label { font-size: 10px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; margin-top: 2px; }
.hero-ring-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ring-leg { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); }
.ring-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Quick stats card */
.qstat-grid { display: flex; flex-direction: column; gap: 14px; }
.qstat-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--bg-card-alt);
}
.qstat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
}
.qstat-icon.qi-stocks { background: rgba(37,99,235,0.1); color: #2563eb; }
.qstat-icon.qi-mf { background: rgba(22,163,74,0.1); color: #16a34a; }
.qstat-icon.qi-other { background: rgba(245,158,11,0.1); color: #f59e0b; }
.qstat-icon.qi-top { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.qstat-body { flex: 1; min-width: 0; }
.qstat-label { font-size: 11px; color: var(--text-dim); font-weight: 500; }
.qstat-val { font-size: 15px; font-weight: 800; color: var(--text-heading); }
.qstat-val .qstat-accent { color: var(--accent); font-weight: 600; }

/* Compact watchlist rows */
.watch-list { display: flex; flex-direction: column; gap: 0; }
.watch-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  text-decoration: none; color: inherit;
  transition: background 0.12s;
}
.watch-row:nth-child(even) { background: var(--bg-card-alt); }
.watch-row:hover { background: var(--accent-bg, rgba(37,99,235,0.06)); }
.wr-rank { font-size: 11px; font-weight: 700; color: var(--text-dim); width: 18px; text-align: center; flex-shrink: 0; }
.wr-sym { font-size: 13px; font-weight: 800; color: var(--text-heading); white-space: nowrap; }
.wr-name { font-size: 11px; color: var(--text-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-price { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.wr-chg { font-size: 12px; font-weight: 700; white-space: nowrap; min-width: 64px; text-align: right; }
.wr-chg.up { color: #16a34a; }
.wr-chg.down { color: #dc2626; }
.wr-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.wr-badge.pos { background: rgba(22,163,74,0.08); color: #16a34a; }
.wr-badge.neg { background: rgba(220,38,38,0.08); color: #dc2626; }

.watch-empty {
  text-align: center; padding: 28px 16px; font-size: 12px;
  color: var(--text-dim); opacity: 0.7;
}
.watch-empty a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* Market compact list */
.mkt-list { display: flex; flex-direction: column; gap: 0; }
.mkt-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: inherit;
  transition: background 0.12s;
}
.mkt-row:nth-child(even) { background: var(--bg-card-alt); }
.mkt-row:hover { background: var(--accent-bg, rgba(37,99,235,0.06)); }
.mkt-rank {
  font-size: 10px; font-weight: 800; color: var(--text-dim);
  width: 18px; flex-shrink: 0; text-align: center;
}
.mkt-sym { font-size: 12px; font-weight: 800; color: var(--text-heading); white-space: nowrap; }
.mkt-name { font-size: 10px; color: var(--text-dim); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-val { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.mkt-chg { font-size: 11px; font-weight: 800; white-space: nowrap; min-width: 56px; text-align: right; }
.mkt-chg.up { color: #16a34a; }
.mkt-chg.down { color: #dc2626; }

/* News horizontal scroll */
.news-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.news-scroll::-webkit-scrollbar { height: 4px; }
.news-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.news-tile {
  flex: 0 0 320px; scroll-snap-align: start;
  padding: 18px 20px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--border);
}
.news-tile.nt-up { border-left-color: #16a34a; }
.news-tile.nt-down { border-left-color: #dc2626; }
.news-tile.nt-mf { border-left-color: #2563eb; }
.news-tile h4 { font-size: 13px; font-weight: 700; color: var(--text-heading); margin-bottom: 8px; }
.news-tile p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.news-tile a { color: var(--accent); font-weight: 600; text-decoration: none; }
.news-tile a:hover { text-decoration: underline; }

/* Dashboard Announcements */
.dash-ann-list { display: flex; flex-direction: column; gap: 16px; max-height: 340px; overflow-y: auto; }
.dash-ann-list::-webkit-scrollbar { width: 3px; }
.dash-ann-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.dash-ann-stock { border-left: 3px solid var(--accent); padding-left: 14px; }
.dash-ann-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.dash-ann-sym { font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; }
.dash-ann-sym:hover { text-decoration: underline; }
.dash-ann-name { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-ann-items { display: flex; flex-direction: column; gap: 6px; }
.dash-ann-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--text-muted); line-height: 1.4;
  padding: 6px 10px; border-radius: 8px;
  background: var(--bg-card-inner, var(--bg-body));
  text-decoration: none;
  transition: background 0.15s;
}
a.dash-ann-item:hover { background: var(--bg-hover, var(--border)); }
.dash-ann-icon { flex-shrink: 0; font-size: 14px; line-height: 1.3; }
.dash-ann-text { flex: 1; min-width: 0; color: var(--text-body); }
.dash-ann-date { flex-shrink: 0; font-size: 10px; color: var(--text-dim); white-space: nowrap; margin-left: auto; }
.dash-ann-empty { padding: 24px 0; text-align: center; }
.dash-ann-empty p { font-size: 13px; color: var(--text-dim); }

/* Dashboard News Articles */
.dash-news-articles { max-height: 480px; overflow-y: auto; }
.dash-news-articles::-webkit-scrollbar { width: 3px; }
.dash-news-articles::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Shimmer skeleton */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skel {
  border-radius: 8px; overflow: hidden;
  background: linear-gradient(90deg, var(--bg-card-alt) 25%, var(--bg-card) 50%, var(--bg-card-alt) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
}
.skel-line { height: 14px; margin-bottom: 10px; border-radius: 6px; }
.skel-line.w60 { width: 60%; }
.skel-line.w80 { width: 80%; }
.skel-line.w40 { width: 40%; }
.skel-lg { height: 40px; width: 50%; margin-bottom: 12px; }
.skel-row { display: flex; gap: 10px; padding: 10px 0; }
.skel-row .skel { flex: 1; height: 14px; }

.dash-empty {
  text-align: center; padding: 28px 16px; font-size: 12px;
  color: var(--text-dim); border: 1px dashed var(--border);
  border-radius: 12px;
}
.dash-empty a { color: var(--accent); font-weight: 600; }

@media (max-width: 1024px) {
  .bento-8, .bento-6 { grid-column: span 6; }
  .bento-4 { grid-column: span 6; }
  .bento-3 { grid-column: span 6; }
  .hero-pf { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-ring-wrap { width: 100px; height: 100px; }
  .hero-ring { width: 100px; height: 100px; }
  .hero-ring-inner { width: 66px; height: 66px; }
}
@media (max-width: 700px) {
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .bento-8, .bento-6, .bento-4, .bento-3, .bento-12 { grid-column: span 1; }
  .b-card { padding: 18px; border-radius: 14px; }
  .hero-pf-pnl { font-size: 28px; }
  .hero-pf-stat-val { font-size: 15px; }
  .hero-pf-row { gap: 16px; flex-wrap: wrap; }
  .dash-header { flex-direction: column; gap: 4px; }
  .news-tile { flex: 0 0 260px; }
  .bg-resize-handle { display: none; }
  .bg-drag-handle { cursor: default; }
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.placeholder-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.placeholder-card .ph-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  stroke: var(--text-dim);
  opacity: 0.5;
}
.placeholder-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.placeholder-card p { font-size: 13px; color: var(--text-muted); }

/* ── Stocks Browse Page ── */
.stocks-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stocks-search-wrap {
  position: relative;
  width: 280px;
}
.stocks-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-dim);
  pointer-events: none;
}
.stocks-search-wrap input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
}
.stocks-search-wrap input:focus { border-color: var(--accent); }

.stocks-filters-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stocks-filters-bar select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
}
.stocks-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.stock-browse-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.stock-browse-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.sbc-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.sbc-sym {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}
.sbc-name {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 10px;
}
.sbc-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sbc-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
}
.sbc-chg {
  font-size: 12px;
  font-weight: 700;
}
.sbc-chg.up { color: var(--green); }
.sbc-chg.down { color: var(--red); }

/* ─── Stock Tabs ─── */
/* ═══ 2-Column Layout: vertical tabs left, content right ═══ */
.two-col {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
.two-col-nav {
  position: sticky; top: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.two-col-nav .tc-heading {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-dim);
  padding: 10px 12px 6px; margin: 0;
}
.tc-tab {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: var(--text-muted); background: none; border: none;
  cursor: pointer; text-align: left; width: 100%;
  transition: background 0.12s, color 0.12s;
}
.tc-tab svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.5; }
.tc-tab:hover { background: var(--bg-card-alt); color: var(--text); }
.tc-tab.active {
  background: var(--accent); color: #fff;
}
.tc-tab.active svg { opacity: 1; }
.tc-tab .tc-badge {
  margin-left: auto; font-size: 10px; font-weight: 800;
  background: rgba(255,255,255,0.2); padding: 1px 7px;
  border-radius: 100px; min-width: 20px; text-align: center;
}
.tc-tab:not(.active) .tc-badge { background: var(--bg-card-alt); color: var(--text-dim); }

.two-col-left {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 12px;
  align-self: start;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.two-col-left::-webkit-scrollbar { width: 3px; }
.two-col-left::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.two-col-left .two-col-nav {
  position: static;
}
.nav-filter-card {
  padding: 16px;
}
.nav-filter-card .mf-filter-group { margin-bottom: 12px; }
.nav-filter-card .mf-filter-group select,
.nav-filter-card .mf-filter-group input { font-size: 12px; padding: 6px 8px; }
.nav-filter-card .mf-filter-actions { gap: 6px; }
.nav-filter-card .mf-filter-actions .btn { font-size: 12px; padding: 6px 0; }

.two-col-content { min-width: 0; }

.stock-tab-panel { display: none; }
.stock-tab-panel.active { display: block; }

/* Legacy horizontal tabs (keep for backward compat if needed) */
.stock-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}
.stock-tab {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font);
}
.stock-tab:hover {
  color: var(--text-heading);
}
.stock-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.stock-tab-panel { display: none; }
.stock-tab-panel.active { display: block; }

/* ─── Discover Tab ─── */
.discover-hero {
  text-align: center;
  padding: 36px 40px 40px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 100%, rgba(255,45,32,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(37,99,235,0.05) 0%, transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  position: sticky;
  top: 68px;
  z-index: 20;
  overflow: visible;
  transition: padding 0.35s cubic-bezier(.4,0,.2,1),
              border-radius 0.35s cubic-bezier(.4,0,.2,1),
              box-shadow 0.35s ease;
}
[data-theme="dark"] .discover-hero {
  background:
    radial-gradient(ellipse 80% 60% at 20% 100%, rgba(255,45,32,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(96,165,250,0.06) 0%, transparent 60%),
    var(--bg-card);
}
.discover-hero.scrolled {
  padding: 12px 24px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.dh-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.dh-deco-1 {
  width: 220px; height: 220px;
  top: -100px; right: -50px;
  background: radial-gradient(circle, rgba(255,45,32,0.06), transparent 70%);
}
.dh-deco-2 {
  width: 150px; height: 150px;
  bottom: -60px; left: -30px;
  background: radial-gradient(circle, rgba(37,99,235,0.05), transparent 70%);
}
.dh-deco-3 {
  width: 80px; height: 80px;
  top: 16px; left: 28%;
  background: radial-gradient(circle, rgba(22,163,74,0.04), transparent 70%);
}
.discover-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 6px;
  position: relative;
  max-height: 40px; opacity: 1;
  transition: max-height 0.35s cubic-bezier(.4,0,.2,1),
              opacity 0.25s ease,
              margin 0.35s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.discover-hero.scrolled .discover-title {
  max-height: 0; opacity: 0; margin-bottom: 0;
}
.discover-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 22px;
  position: relative;
  max-height: 30px; opacity: 1;
  transition: max-height 0.35s cubic-bezier(.4,0,.2,1),
              opacity 0.25s ease,
              margin 0.35s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.discover-hero.scrolled .discover-sub {
  max-height: 0; opacity: 0; margin-bottom: 0;
}
.discover-search {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  z-index: 1;
  transition: max-width 0.35s cubic-bezier(.4,0,.2,1);
}
.discover-hero.scrolled .discover-search {
  max-width: 100%;
}
.discover-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-dim);
  pointer-events: none;
  z-index: 1;
  transition: width 0.25s ease, height 0.25s ease, left 0.25s ease;
}
.discover-search input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  font-size: 16px;
  font-family: var(--font);
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: padding 0.3s cubic-bezier(.4,0,.2,1), font-size 0.3s ease,
              border-color 0.2s ease, box-shadow 0.2s ease, border-radius 0.3s ease;
  box-sizing: border-box;
}
.discover-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.12), var(--shadow-md);
}
.discover-hero.scrolled .discover-search input {
  padding: 10px 16px 10px 42px;
  font-size: 14px;
  border-radius: 10px;
}
.discover-hero.scrolled .discover-search-icon {
  width: 16px; height: 16px; left: 14px;
}
.discover-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}
.discover-results.show { display: block; }
.discover-results .search-group-label {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.discover-results .search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border-subtle, var(--border));
  transition: background 0.1s;
}
.discover-results .search-result-item:last-child { border-bottom: none; }
.discover-results .search-result-item:hover { background: var(--bg-hover); }
.discover-results .sr-left { text-align: left; }
.discover-results .sr-symbol { font-weight: 700; font-size: 14px; }
.discover-results .sr-name { display: block; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.discover-results .sr-right { text-align: right; flex-shrink: 0; margin-left: 16px; }
.discover-results .sr-price { font-weight: 600; font-size: 14px; }
.discover-results .sr-change { font-size: 12px; font-weight: 600; }
.discover-results .sr-change.pos { color: var(--green); }
.discover-results .sr-change.neg { color: var(--red); }
.discover-results .search-empty { padding: 24px; text-align: center; color: var(--text-dim); font-size: 14px; }
.discover-results .sr-market { font-size: 10px; padding: 1px 5px; border-radius: 3px; font-weight: 600; margin-left: 4px; }
.discover-results .sr-market.nse { background: rgba(34,197,94,0.12); color: #16a34a; }
.discover-results .sr-market.bse { background: rgba(59,130,246,0.12); color: #2563eb; }

.discover-sections {
  max-width: 100%;
}
.discover-section {
  margin-bottom: 32px;
}
.discover-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

/* ─── Following Tab ─── */
.following-header {
  margin-bottom: 20px;
}
.following-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.following-empty p { font-size: 16px; font-weight: 500; }

/* ─── Following Table ─── */
.follow-table-wrap { overflow-x: auto; }
.fw-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.fw-table thead th {
  text-align: left; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
  color: var(--text-dim); padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap; position: sticky; top: 0;
  background: var(--bg-body);
}
.fw-table thead th.num { text-align: right; }
.fw-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s; }
.fw-table tbody tr:hover { background: var(--bg-hover, rgba(0,0,0,0.02)); }
[data-theme="dark"] .fw-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.fw-table td { padding: 10px 12px; white-space: nowrap; color: var(--text-body); }
.fw-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.fw-table td.up { color: #16a34a; font-weight: 600; }
.fw-table td.down { color: #dc2626; font-weight: 600; }
.fw-sym { font-weight: 700; color: var(--accent); text-decoration: none; }
.fw-sym:hover { text-decoration: underline; }
.fw-name { color: var(--text-muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.fw-market { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.fw-market.nse { background: #e8f5e9; color: #2e7d32; }
.fw-market.bse { background: #fce4ec; color: #c62828; }
[data-theme="dark"] .fw-market.nse { background: rgba(46,125,50,0.2); }
[data-theme="dark"] .fw-market.bse { background: rgba(198,40,40,0.2); }
.fw-sector { color: var(--text-dim); font-size: 11px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.fw-unfollow {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 14px; padding: 4px 8px;
  border-radius: 4px; transition: background 0.12s, color 0.12s;
}
.fw-unfollow:hover { background: #fce4ec; color: #dc2626; }
[data-theme="dark"] .fw-unfollow:hover { background: rgba(220,38,38,0.15); }

/* ─── News Tab ─── */
.news-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.news-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
}
.news-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
}
.news-body strong {
  color: var(--accent);
  font-weight: 700;
}
.news-card.news-muted {
  background: transparent;
  border-style: dashed;
  opacity: 0.7;
}
.news-card.news-muted p {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

/* ─── Yahoo Finance News Articles ─── */
.yf-article {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: background 0.12s;
}
.yf-article:last-child { border-bottom: none; }
.yf-article:hover { background: var(--bg-hover, rgba(0,0,0,0.015)); margin: 0 -20px; padding: 16px 20px; border-radius: 8px; }
[data-theme="dark"] .yf-article:hover { background: rgba(255,255,255,0.025); }
.yf-article-body { flex: 1; min-width: 0; }
.yf-article-title { font-size: 14px; font-weight: 600; color: var(--text-heading); line-height: 1.4; margin-bottom: 4px; }
.yf-article:hover .yf-article-title { color: var(--accent); }
.yf-article-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yf-article-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-dim); }
.yf-source {
  font-weight: 600; padding: 1px 6px; border-radius: 4px;
  background: var(--bg-hover, rgba(0,0,0,0.04));
}
.yf-time { opacity: 0.7; }
.yf-arrow { flex-shrink: 0; font-size: 22px; color: var(--text-dim); opacity: 0.3; padding-top: 2px; transition: opacity 0.12s; }
.yf-article:hover .yf-arrow { opacity: 0.7; color: var(--accent); }
.yf-empty { text-align: center; padding: 40px 20px; }
.yf-empty p { font-size: 14px; color: var(--text-dim); }

/* News time filters */
.yf-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.sec .yf-filters { margin-bottom: 16px; }
.yf-filter {
  background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px;
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; transition: all 0.15s;
}
.yf-filter:hover { border-color: var(--accent); color: var(--accent); }
.yf-filter.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}

@media (max-width: 600px) {
  .stocks-header { flex-direction: column; }
  .stocks-search-wrap { width: 100%; }
  .stocks-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .stock-tab { padding: 10px 14px; font-size: 13px; }
  .two-col { grid-template-columns: 1fr; }
  .two-col-nav {
    position: static; flex-direction: row; overflow-x: auto;
    border-radius: 10px; gap: 0; padding: 4px;
  }
  .two-col-nav .tc-heading { display: none; }
  .two-col-left { position: static; }
  .nav-filter-card { display: none !important; }
  .tc-tab { white-space: nowrap; padding: 8px 14px; border-radius: 8px; font-size: 12px; }
  .discover-hero { padding: 20px 16px 24px; position: static; }
  .discover-title { font-size: 18px; }
  .discover-search input { font-size: 14px; padding: 12px 16px 12px 42px; }
}

/* Responsive – post-login top nav */
@media (max-width: 768px) {
  .app-content { padding: 16px; }
  main { padding: 16px 16px 60px; }
  .breadcrumb { padding: 10px 16px; }
  .bc-back span { display: none; }
  .bc-divider { margin: 0 10px; }
}
