/* US Earnings Calendar - Modern Luxury Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Dark theme (Default) */
  --bg: #080c14;
  --bg-subtle: #0e1524;
  --bg-elevated: #151e30;
  --card-bg: rgba(21, 30, 48, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(56, 189, 248, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-emerald: #10b981;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-amber: #f59e0b;
  --accent-amber-subtle: rgba(245, 158, 11, 0.12);
  --accent-purple: #8b5cf6;
  --accent-purple-subtle: rgba(139, 92, 246, 0.14);
  --accent-rose: #f43f5e;
  
  --line: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(14, 21, 36, 0.85);
  --input-border: rgba(255, 255, 255, 0.12);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 28px rgba(56, 189, 248, 0.22);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-elevated: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(0, 0, 0, 0.08);
  --card-hover-border: rgba(59, 130, 246, 0.45);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --line: rgba(0, 0, 0, 0.07);
  --input-bg: #ffffff;
  --input-border: rgba(0, 0, 0, 0.14);
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 24px rgba(59, 130, 246, 0.16);
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4, .brand-title, .section-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* Background atmospheric glow effects */
.bg-glow-1 {
  position: fixed;
  top: -150px;
  left: 20%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-2 {
  position: fixed;
  top: 30%;
  right: -100px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.09) 0%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* Header & Nav */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  line-height: 1;
  min-width: 0;
  flex-shrink: 0;
}

.brand:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.brand-logo-img {
  height: 74px;
  width: auto;
  max-width: 380px;
  object-fit: contain;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}

/* Dark mode (default): show dark logo, hide light logo */
.brand-logo-img.logo-dark {
  display: block;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
}

.brand-logo-img.logo-light {
  display: none !important;
}

/* Light mode: show light logo, hide dark logo */
[data-theme="light"] .brand-logo-img.logo-dark {
  display: none !important;
}

[data-theme="light"] .brand-logo-img.logo-light {
  display: block !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

@media (max-width: 900px) {
  .brand-logo-img {
    height: 52px;
    max-width: 240px;
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: 10px 0 14px;
    margin-bottom: 12px;
  }
  .brand-logo-img {
    height: 38px;
    max-width: 165px;
  }
}

@media (max-width: 400px) {
  .brand-logo-img {
    height: 34px;
    max-width: 145px;
  }
}

@media (max-width: 340px) {
  .brand-logo-img {
    height: 30px;
    max-width: 125px;
  }
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2563eb, #10b981);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.brand-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.brand-title span {
  background: linear-gradient(135deg, #38bdf8, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  white-space: nowrap;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.icon-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 32px 0 36px;
  max-width: 960px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}

.hero p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

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

.stat-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  user-select: none;
}

.stat-tag.stat-tag-macro {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

/* Glassmorphism Card Container */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  border-color: var(--card-hover-border);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========================================================
   Two-Column Main Dashboard Layout
   ======================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.dashboard-col-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.dashboard-col-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-col-right .glass-card {
  margin-bottom: 0;
}

@media (max-width: 1080px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }
  .dashboard-col-left,
  .dashboard-col-right {
    height: auto !important;
    max-height: none !important;
  }
}

/* Watchlist Builder Styles */
.search-container {
  position: relative;
  margin-bottom: 16px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

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

.search-input {
  width: 100%;
  padding: 13px 48px 13px 44px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-lg);
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: var(--bg-elevated);
}

.search-shortcut {
  position: absolute;
  right: 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 2px 7px;
  border-radius: 4px;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 380px;
  overflow-y: auto;
  display: none;
}

.autocomplete-dropdown.is-open {
  display: block;
}

.search-item {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover,
.search-item.is-selected {
  background: rgba(59, 130, 246, 0.12);
}

.search-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticker-badge {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.company-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.company-industry {
  font-size: 12px;
  color: var(--text-dim);
}

.search-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.index-pill {
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.reporting-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-emerald);
  background: var(--accent-emerald-subtle);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Preset Packs Grid */
.preset-section {
  margin: 18px 0;
}

.preset-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
}

.preset-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.preset-btn.is-active,
.preset-btn.is-added {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
}

.preset-added-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #4ade80;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

/* Elegant Featured Preset Option */
.preset-btn-featured {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(16, 185, 129, 0.22)) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.55) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.2), inset 0 0 12px rgba(16, 185, 129, 0.12);
  padding: 8px 16px;
  position: relative;
}

[data-theme="light"] .preset-btn-featured {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(236, 253, 245, 0.95)) !important;
  border: 1.5px solid rgba(37, 99, 235, 0.45) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.16);
}

.preset-btn-featured:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  transform: translateY(-2px) scale(1.02);
}

.preset-btn-featured .preset-icon {
  font-size: 15px;
  display: inline-block;
  animation: sparkle 2.5s infinite ease-in-out;
}

.featured-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #38bdf8, #34d399);
  color: #0b0f19;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.35);
  margin-left: 4px;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.2) rotate(10deg); filter: brightness(1.3); }
}

/* Bulk Add Bar */
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  font-size: 13px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-link:hover {
  color: #60a5fa;
}

.bulk-input-drawer {
  display: none;
  margin-top: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.bulk-input-drawer.is-open {
  display: block;
  animation: fadeIn 0.2s ease;
}

.bulk-textarea {
  width: 100%;
  height: 80px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-main);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  resize: vertical;
  outline: none;
  margin-bottom: 10px;
}

.bulk-textarea:focus {
  border-color: var(--accent-primary);
}

/* Active Watchlist Tags */
.watchlist-active-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.watchlist-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.watchlist-count strong {
  color: var(--text-main);
}

.watchlist-actions {
  display: flex;
  gap: 8px;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 48px;
  padding: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  max-height: 180px;
  overflow-y: auto;
}

.chips-empty {
  color: var(--text-dim);
  font-size: 14px;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.15s ease;
  animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chip:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.chip-ticker {
  font-family: var(--font-mono);
  color: #38bdf8;
  font-weight: 700;
}

.chip-logo {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  background: #ffffff;
  padding: 1px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chip-price {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
}

.chip-price.price-up {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

.chip-price.price-down {
  background: rgba(244, 63, 94, 0.16);
  color: #fb7185;
}

.chip-pct {
  font-size: 9.5px;
  opacity: 0.9;
}

.chip-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.15s ease;
}

.chip-remove:hover {
  color: var(--accent-rose);
}

/* Subscription Hub & CTA Cards */
.sub-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.sub-cta-card {
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.sub-cta-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.sub-cta-card.primary-apple {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
}

.sub-cta-card.primary-google {
  border-color: rgba(66, 133, 244, 0.3);
  background: linear-gradient(145deg, rgba(23, 37, 84, 0.8), rgba(15, 23, 42, 0.95));
}

.sub-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.sub-card-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  display: grid;
  place-items: center;
}

.sub-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.sub-card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sub-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.45;
}

.btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  width: 100%;
}

.btn:hover {
  background: var(--bg-elevated);
  border-color: var(--text-main);
}

.btn.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn.btn-google {
  background: #ffffff;
  color: #1f2937;
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.btn.btn-google:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

.btn.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  width: auto;
}

/* Feed URL Box */
.feed-url-box {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.feed-url-text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #38bdf8;
  word-break: break-all;
  flex: 1;
  min-width: 180px;
}

/* Options / Alarm Selector */
.feed-options {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.feed-select {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
}

/* ========================================================
   Right Column: Full-Height & Fullscreen Live Schedule & Calendar
   ======================================================== */
.sticky-preview {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
  overflow: hidden;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 1080px) {
  .sticky-preview {
    height: 650px;
    max-height: 85vh;
  }
}

/* Fullscreen Mode (Takes Full Space of Screen) */
.sticky-preview.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  z-index: 99999 !important;
  border-radius: 0 !important;
  padding: 16px 24px !important;
  background: var(--bg) !important;
  backdrop-filter: blur(24px) !important;
  box-shadow: none !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-title-area {
  flex: 1;
  min-width: 200px;
}

#preview-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  line-height: 1.3;
}

.preview-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* View Switcher: Calendar vs List */
.view-switcher {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.view-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.view-btn:hover {
  color: var(--text-main);
}

.view-btn.is-active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Calendar View Toggle Button */
.fullscreen-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fullscreen-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.sticky-preview.is-fullscreen .fullscreen-btn {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.sticky-preview.is-fullscreen .fullscreen-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* Compact Mode (Side-column): STRICTLY List View Only */
.sticky-preview:not(.is-fullscreen) #calendar-month-controls,
.sticky-preview:not(.is-fullscreen) #calendar-grid-view {
  display: none !important;
}

.sticky-preview:not(.is-fullscreen) #filter-tabs {
  display: flex !important;
}

.sticky-preview:not(.is-fullscreen) #timeline-container {
  display: flex !important;
  flex-direction: column !important;
}

/* Fullscreen Mode: STRICTLY Calendar Grid View */
.sticky-preview.is-fullscreen #calendar-month-controls {
  display: flex !important;
}

.sticky-preview.is-fullscreen #calendar-grid-view {
  display: flex !important;
}

.sticky-preview.is-fullscreen #filter-tabs,
.sticky-preview.is-fullscreen #timeline-container {
  display: none !important;
}

/* Calendar Month Header & Navigation */
.calendar-month-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 10px;
}

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

.cal-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-nav-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated);
}

.cal-month-label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  min-width: 140px;
  text-align: center;
}

.cal-today-btn {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  background: var(--bg-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-today-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated);
}

.calendar-legends {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
}

.legend-badge {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-badge.earnings-legend {
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.1);
}

.legend-badge.macro-legend {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

/* ========================================================
   Google Calendar Month Grid View
   ======================================================== */
.calendar-month-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  min-height: 380px;
}

.cal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 0;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
  background: var(--line);
  gap: 1px;
}

.cal-day-cell {
  min-height: 82px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  background: var(--bg-subtle);
  transition: background 0.15s ease;
  position: relative;
  overflow: hidden;
}

.cal-day-cell.is-other-month {
  opacity: 0.35;
  background: rgba(0, 0, 0, 0.15);
}

.cal-day-cell:hover {
  background: rgba(56, 189, 248, 0.04);
}

.cal-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.cal-day-num {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.cal-day-cell.is-today .cal-day-num {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  flex: 1;
  overflow: hidden;
}

/* Event Pills (Google Calendar Style) */
.cal-event-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1.5px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1.35;
}

.cal-event-pill:hover {
  filter: brightness(1.25);
  transform: translateY(-1px);
}

/* Macro event pill (amber/gold) */
.cal-event-pill.is-macro {
  background: rgba(245, 158, 11, 0.18);
  border-left: 2.5px solid #f59e0b;
  color: #fde68a;
}

/* Stock Earnings event pill (purple/indigo) */
.cal-event-pill.is-earnings {
  background: rgba(139, 92, 246, 0.22);
  border-left: 2.5px solid #8b5cf6;
  color: #ddd6fe;
}

.cal-more-pill {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 1px 3px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.cal-more-pill:hover {
  color: #38bdf8;
}

/* Fullscreen Mode Layout Enhancements */
.sticky-preview.is-fullscreen .calendar-month-container {
  flex: 1;
  height: calc(100vh - 120px) !important;
  max-height: calc(100vh - 120px) !important;
  display: flex !important;
  flex-direction: column !important;
}

.sticky-preview.is-fullscreen .cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr;
  height: calc(100% - 34px);
}

.sticky-preview.is-fullscreen .cal-day-cell {
  min-height: 0;
  height: 100%;
  padding: 6px 8px;
}

.sticky-preview.is-fullscreen .cal-day-num {
  font-size: 13px;
  width: 26px;
  height: 26px;
}

.sticky-preview.is-fullscreen .cal-event-pill {
  font-size: 11px;
  padding: 2.5px 6px;
}

/* Light Theme Overrides for Calendar */
[data-theme="light"] .cal-event-pill.is-macro {
  background: #fef3c7;
  color: #92400e;
  border-left: 2.5px solid #d97706;
}

[data-theme="light"] .cal-event-pill.is-earnings {
  background: #ede9fe;
  color: #5b21b6;
  border-left: 2.5px solid #7c3aed;
}

[data-theme="light"] .cal-day-cell.is-other-month {
  opacity: 0.45;
  background: #f1f5f9;
}

[data-theme="light"] .cal-more-pill {
  color: #64748b;
}

[data-theme="light"] .cal-more-pill:hover {
  color: #2563eb;
}

/* Macro Event Card in Timeline */
.event-card.event-card-macro {
  border-left: 3px solid #f59e0b;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, var(--bg-elevated) 35%);
}

.event-card.event-card-macro:hover {
  border-color: #f59e0b;
  transform: translateX(3px);
}

/* Day Details Modal */
.day-details-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.day-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.day-modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.day-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.day-modal-header h4 {
  font-size: 17px;
  font-weight: 700;
}

.day-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.day-modal-close:hover {
  color: var(--text-main);
}

.day-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-event-item {
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-event-item.is-macro {
  border-left: 3px solid #f59e0b;
}

.modal-event-item.is-earnings {
  border-left: 3px solid #8b5cf6;
}

.modal-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-event-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-event-time {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-event-details {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Filter Tabs for List View */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  color: var(--text-main);
}

.filter-tab.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* List Timeline View - Strict Vertical Column */
.sticky-preview .timeline-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
  overflow-y: auto !important;
  padding-right: 6px;
  flex: 1 1 0px !important;
  min-height: 0 !important;
}

/* Custom sleek scrollbar for timeline */
.sticky-preview .timeline-grid::-webkit-scrollbar {
  width: 5px;
}
.sticky-preview .timeline-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 9999px;
}
.sticky-preview .timeline-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}
.sticky-preview .timeline-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

/* Compact side-column event cards */
.event-card {
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: start;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.event-card:hover {
  border-color: var(--accent-primary);
  transform: translateX(3px);
}

.event-date-col {
  display: flex;
  flex-direction: column;
}

.event-relative {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-emerald);
}

.event-date {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  white-space: nowrap;
}

.event-main-col {
  min-width: 0;
}

.event-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.event-symbol {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: 0.02em;
}

/* Ticker identity with logo */
.ticker-identity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ticker-logo {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #ffffff;
  padding: 1px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Live Price Badges */
.live-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.live-price-badge.price-up {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.live-price-badge.price-down {
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.live-price-badge .price-val {
  font-weight: 800;
}

.live-price-badge .price-pct {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.95;
}

/* Calendar Month Grid Pill Logo */
.cal-pill-logo {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  background: #ffffff;
  padding: 0.5px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Event Title Line: Maximized readability, 1 line max, show rest on hover */
.event-title-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
  display: block;
  margin-bottom: 3px;
}

.event-title-text {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  letter-spacing: -0.01em;
  line-height: 1.35;
  transition: color 0.15s ease;
  cursor: pointer;
}

/* Elevated glassmorphic tooltip appearing on hover */
.event-title-wrapper:hover::after {
  content: attr(data-full-title);
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  background: var(--bg-elevated);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  white-space: normal;
  width: max-content;
  max-width: 360px;
  z-index: 1000;
  pointer-events: none;
  line-height: 1.4;
  animation: fadeIn 0.15s ease;
}

[data-theme="light"] .event-title-wrapper:hover::after {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
}

.event-title-wrapper:hover .event-title-text {
  color: #38bdf8;
}

.event-company {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.time-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.time-pill.pre-market {
  background: var(--accent-amber-subtle);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.time-pill.after-hours {
  background: var(--accent-purple-subtle);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.time-pill.regular {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.event-meta-row {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.event-meta-item strong {
  color: var(--text-main);
  font-weight: 600;
}

.event-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.event-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.link-btn {
  font-size: 11px;
  font-weight: 500;
  padding: 3.5px 8.5px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.link-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
}

/* Unscheduled section */
.unscheduled-card {
  margin-top: 14px;
  background: rgba(14, 21, 36, 0.55);
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.unscheduled-card strong {
  color: var(--text-main);
}

.unscheduled-tickers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.unscheduled-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 7px;
  background: var(--bg-elevated);
  border-radius: 4px;
  color: var(--text-dim);
}

/* Index Calendars Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.index-card {
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.15s ease;
}

.index-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-2px);
}

.index-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.index-card-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  display: grid;
  place-items: center;
}

.index-card-info h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.index-card-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.index-card-actions {
  display: flex;
  gap: 8px;
}

/* Subscription Guide Accordion */
.guide-card {
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.guide-step {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.guide-step-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-step ol {
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Footer */
footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

footer a {
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

footer a:hover {
  border-color: var(--accent-primary);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.25s ease;
  pointer-events: auto;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.5);
}

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

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

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-wrapper { padding: 0 16px 64px; }
  .hero { padding: 20px 0 24px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; margin-bottom: 18px; }
  .hero-badge { font-size: 11.5px; padding: 4px 12px; margin-bottom: 12px; }
  .stat-tag { font-size: 11.5px; padding: 4px 10px; }
  .glass-card { padding: 16px 14px; border-radius: var(--radius-lg); }
  .event-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }
  .event-date-col {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  .event-actions {
    justify-content: flex-start;
  }
  .status-pill {
    display: none !important;
  }
  .preview-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .preview-top-actions {
    width: 100%;
  }
  .fullscreen-btn {
    width: 100%;
    justify-content: center;
    padding: 8px 14px;
  }
  .watchlist-active-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .watchlist-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* ==========================================================================
   Authentication & Cloud Watchlist Sync Styles
   ========================================================================== */

/* Navbar Auth Controls */
.nav-auth-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(16, 185, 129, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--text-main);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-nav-auth:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.3));
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  max-width: 260px;
  white-space: nowrap;
  flex-shrink: 0;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-emerald);
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .nav-actions {
    gap: 8px;
  }
  .btn-nav-auth {
    padding: 6px 11px;
    font-size: 12px;
    gap: 4px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 16px;
  }
  .user-profile-badge {
    padding: 3px 8px 3px 5px;
    max-width: 160px;
  }
  .user-name {
    max-width: 65px;
  }
}

.btn-signout {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  margin-left: 4px;
}

.btn-signout:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.12);
}

/* Watchlist Cloud Sync Status */
.watchlist-status-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cloud-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cloud-sync-badge:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.cloud-sync-badge .sync-info-icon {
  font-size: 11px;
  opacity: 0.65;
  margin-left: 1px;
  transition: opacity 0.15s ease;
}

.cloud-sync-badge:hover .sync-info-icon {
  opacity: 1;
}

.cloud-sync-badge.is-synced {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.cloud-sync-badge.is-synced:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.cloud-sync-badge.is-syncing {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.cloud-sync-badge.is-error {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.35);
}

.btn-cloud-save {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-primary);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-cloud-save:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

/* Watchlist Storage & Sync Modal */
.sync-modal-card {
  max-width: 480px;
  text-align: left;
}

.sync-modal-card .auth-modal-header {
  text-align: center;
}

.sync-details-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.sync-status-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.sync-status-card.is-active {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.05);
}

.sync-status-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.sync-status-info {
  flex: 1;
}

.sync-status-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.sync-status-title-row strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.status-pill-active {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-pill-inactive {
  background: rgba(100, 116, 139, 0.16);
  color: var(--text-dim);
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.sync-status-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.sync-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 700;
}

/* Feed URL Gated State */
.feed-url-gate {
  font-size: 12px;
  color: var(--accent-amber);
}

.inline-auth-link {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  display: inline;
}

.inline-auth-link:hover {
  color: var(--accent-primary-hover);
}

/* Auth Modal Dialog */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 32px 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), var(--shadow-glow);
  text-align: center;
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.auth-modal-close:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.auth-modal-header {
  margin-bottom: 20px;
}

.auth-modal-icon {
  font-size: 38px;
  margin-bottom: 10px;
}

.auth-modal-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.auth-modal-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-modal-benefits {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 22px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
}

.auth-benefit-icon {
  font-size: 16px;
}

.auth-error-msg {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  text-align: left;
}

.auth-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-google-oauth {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-google-oauth:hover {
  background: #f9fafb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.btn-apple-oauth {
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .btn-apple-oauth {
  background: #000000;
  color: #ffffff;
}

.btn-apple-oauth:hover {
  background: #171717;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.oauth-icon {
  flex-shrink: 0;
}

.auth-modal-footer {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ==========================================================================
   Major US Indices Trends & VIX Fear Gauge Strip
   ========================================================================== */

.market-strip-section {
  margin-bottom: 0;
  padding: 16px 18px 18px;
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.market-strip-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 35%, #f59e0b 70%, #f43f5e 100%);
  opacity: 0.8;
}

.market-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 8px;
}

.market-strip-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-strip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-emerald);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pulse-emerald {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.market-strip-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.market-strip-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-meta-time {
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.icon-btn-tiny {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

[data-theme="light"] .icon-btn-tiny {
  background: #f1f5f9;
}

.icon-btn-tiny:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--text-main);
  transform: rotate(90deg);
}

.market-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.market-strip-grid .vix-fear-card {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .market-strip-grid {
    grid-template-columns: 1fr;
  }
}

.market-loading-card {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Individual Index Card */
.market-index-card {
  background: rgba(14, 21, 36, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] .market-index-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.07);
}

.market-index-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.market-index-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 4px;
}

.market-index-ident {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.market-index-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

[data-theme="light"] .market-index-icon {
  background: #f1f5f9;
}

.market-index-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  white-space: nowrap;
}

.market-index-fullname {
  display: none;
}

.market-index-pill {
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 2px 5px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.market-index-pill.is-up {
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.market-index-pill.is-down {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(251, 113, 133, 0.45);
}

.market-index-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.market-index-price {
  font-size: 18.5px;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #ffffff;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .market-index-price {
  color: #0f172a;
  text-shadow: none;
}

.market-index-diff {
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.market-index-diff.is-up {
  color: #34d399;
}

.market-index-diff.is-down {
  color: #fb7185;
}

/* Sparkline Wrap - Pro Financial Curve */
.market-sparkline-wrap {
  width: 100%;
  height: 44px;
  margin-bottom: 8px;
  position: relative;
}

.sparkline-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.sparkline-prev-label {
  font-size: 8.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.sparkline-pulse-glow {
  animation: sparkPulse 2s infinite ease-in-out;
}

@keyframes sparkPulse {
  0%, 100% {
    r: 5px;
    opacity: 0.25;
  }
  50% {
    r: 9px;
    opacity: 0.65;
  }
}

/* Day Range Bar */
.market-range-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 9.5px;
  font-family: var(--font-mono);
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.range-val-group {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  white-space: nowrap;
}

.range-prefix {
  color: #94a3b8;
  font-weight: 800;
  font-size: 9.5px;
}

.range-num {
  color: #ffffff;
  font-weight: 900;
  font-size: 10.5px;
}

[data-theme="light"] .range-num {
  color: #0f172a;
}

.market-range-track {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  position: relative;
  overflow: visible;
}

[data-theme="light"] .market-range-track {
  background: rgba(0, 0, 0, 0.08);
}

.market-range-pin {
  position: absolute;
  top: -3.5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
  transform: translateX(-50%);
  transition: left 0.4s ease;
}

/* ==========================================================================
   VIX & Fear and Greed Gauge Card (CNN & Moomoo Standard)
   ========================================================================== */

.vix-fear-card {
  background: radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 0.8) 0%, rgba(14, 21, 36, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] .vix-fear-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

.vix-fear-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.vix-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.vix-card-title-group {
  display: flex;
  flex-direction: column;
}

.vix-card-heading {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.vix-card-subheading {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

.vix-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.vix-price-badge.is-up {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.vix-price-badge.is-down {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.45);
}

/* Semicircular Dial Area */
.fg-dial-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin: 4px auto 8px auto;
  width: 100%;
}

/* Score Callout Bubble (Matching Sample 1) */
.fg-now-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  z-index: 2;
}

.fg-score-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  font-family: var(--font-mono);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.fg-score-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.fg-now-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fg-category-label {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.fg-gauge-svg {
  width: 100%;
  max-width: 240px;
  height: auto;
  overflow: visible;
  display: block;
}

.fg-dial-label {
  font-size: 10px;
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fg-label-fear {
  fill: #f87171;
}

.fg-label-greed {
  fill: #34d399;
}

.fg-needle-arm {
  transform-origin: 125px 112px;
  transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Moomoo Volatility Scale Section (Matching Sample 2) */
.moomoo-scale-section {
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  margin-top: 6px;
}

.moomoo-scale-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.moomoo-pill {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 4px 3px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .moomoo-scale-bar {
    gap: 4px;
  }
  .moomoo-pill {
    flex: 1 1 calc(33.333% - 4px);
    font-size: 9.5px;
    padding: 5px 4px;
  }
}

@media (max-width: 380px) {
  .moomoo-pill {
    flex: 1 1 calc(50% - 4px);
    font-size: 9px;
  }
}

[data-theme="light"] .moomoo-pill {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

.m-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--zone-c);
}

.moomoo-pill.is-active {
  background: var(--zone-c);
  color: #080c14;
  border-color: var(--zone-c);
  font-weight: 900;
  box-shadow: 0 0 12px var(--zone-c);
}

.moomoo-pill.is-active .m-dot {
  background: #080c14;
}

.moomoo-desc-text {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.4;
  text-align: center;
  font-weight: 500;
}

[data-theme="light"] .moomoo-desc-text {
  color: #475569;
}

/* ==========================================================================
   Sector & Index Explorer Design System (Modern Luxury)
   ========================================================================== */

.watchlist-filter-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.index-filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.index-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.index-filter-pill:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--text-main);
  transform: translateY(-1px);
}

.index-filter-pill.is-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(56, 189, 248, 0.2));
  border-color: #38bdf8;
  color: #f8fafc;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.22);
  font-weight: 700;
}

[data-theme="light"] .index-filter-pill.is-active {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(224, 242, 254, 0.95));
  border-color: #0284c7;
  color: #0369a1;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.18);
}

.sector-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sector-select-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.sector-select-icon {
  position: absolute;
  left: 12px;
  pointer-events: none;
  font-size: 13px;
  opacity: 0.8;
}

.sector-filter-select {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border-radius: var(--radius-md);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  transition: all 0.15s ease;
}

.sector-filter-select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.btn-browse-sectors {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(59, 130, 246, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-browse-sectors:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-browse-sectors {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7;
}

[data-theme="light"] .btn-browse-sectors:hover {
  background: rgba(2, 132, 199, 0.15);
  color: #0369a1;
}

.filter-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 12px;
}

.filter-status-text {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
}

[data-theme="light"] .filter-status-text {
  color: #1e293b;
}

.filter-badge-count {
  font-size: 11px;
  color: var(--text-dim);
}

.filter-status-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-xs {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

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

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

/* Sector Pills in Search Results and Cards */
.sector-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

[data-theme="light"] .sector-pill {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.22);
}

/* Preset Category Tabs */
.preset-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-category-tabs {
  display: inline-flex;
  gap: 3px;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
}

.preset-cat-tab {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-cat-tab:hover {
  color: var(--text-main);
}

.preset-cat-tab.is-active {
  background: var(--bg-elevated);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .preset-cat-tab.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Sector & Index Directory Modal */
.sector-modal-card {
  max-width: 920px !important;
  width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px !important;
}

.sector-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.sector-modal-header .auth-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.sector-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.sector-modal-indices {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-index-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-index-btn:hover {
  border-color: #38bdf8;
  color: var(--text-main);
}

.modal-index-btn.is-active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
}

.sector-modal-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 280px;
  display: flex;
  align-items: center;
}

.sector-modal-search-icon {
  position: absolute;
  left: 10px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0.6;
}

.sector-modal-search {
  width: 100%;
  padding: 6px 10px 6px 30px;
  font-family: inherit;
  font-size: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-main);
}

.sector-modal-search:focus {
  outline: none;
  border-color: #38bdf8;
}

.sector-modal-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
  scrollbar-width: thin;
}

.modal-sector-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.modal-sector-chip:hover {
  border-color: var(--accent-primary);
  color: var(--text-main);
}

.modal-sector-chip.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(59, 130, 246, 0.25));
  border-color: #38bdf8;
  color: #f8fafc;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.sector-modal-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.sector-summary-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-main);
}

.sector-active-badge {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.sector-modal-grid-container {
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
  padding-right: 4px;
}

.sector-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.sector-stock-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  cursor: pointer;
}

.sector-stock-card:hover {
  background: var(--bg-elevated);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.sector-stock-card.is-added {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

.stock-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.stock-card-sym {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #60a5fa;
  min-width: 48px;
}

.stock-card-meta {
  min-width: 0;
}

.stock-card-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.stock-card-industry {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.stock-card-btn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.stock-card-btn-add {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.stock-card-btn-add:hover {
  background: #38bdf8;
  color: #0b111e;
}

.stock-card-btn-added {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.sector-modal-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-footer-tip {
  font-size: 12px;
  color: var(--text-dim);
}

