/* ============================================================================
   Market Environment v2 – Premium Dashboard Styling
   ============================================================================ */

/* Smooth scroll for the whole page */
html {
  scroll-behavior: smooth;
}

/* ---- Section ---- */
.market-env-section {
  margin: 3rem 0;
  padding: 0 0.5rem;
}

.market-env-section .section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.market-env-subtitle {
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ---- Ticker Search ---- */
.market-env-search {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 0.75rem;
  flex-wrap: wrap;
  position: relative;
}

.market-env-search input {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #f1f5f9;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 1rem;
  width: 240px;
  text-transform: uppercase;
  transition: border-color 0.2s;
}

.market-env-search input::placeholder {
  text-transform: none;
  color: #64748b;
}

.market-env-search input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* ---- Autocomplete Dropdown ---- */
.me-autocomplete-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  max-height: 340px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 100;
  margin-top: 4px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.me-ac-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}

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

.me-ac-item:hover,
.me-ac-item.active {
  background: rgba(139, 92, 246, 0.12);
}

.me-ac-ticker {
  font-weight: 700;
  color: #8b5cf6;
  font-size: 0.9rem;
  min-width: 55px;
  letter-spacing: 0.02em;
}

.me-ac-name {
  color: #94a3b8;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-env-btn {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.market-env-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  transform: translateY(-1px);
}

.market-env-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.market-env-btn .spinner {
  display: none;
  animation: me-spin 1s linear infinite;
}

.market-env-btn.loading .spinner {
  display: inline-block;
}
.market-env-btn.loading .btn-icon {
  display: none;
}

@keyframes me-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================================
   Loading Animation (pulsing ring + steps)
   ============================================================================ */

.market-env-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}

.loading-pulse {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #8b5cf6;
}

.pulse-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(139, 92, 246, 0.3);
  border-radius: 50%;
  animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.loading-title {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
}

.loading-sub {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

.loading-steps {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.loading-steps .step {
  font-size: 0.8rem;
  color: #475569;
  transition: color 0.3s;
}

.loading-steps .step.active {
  color: #8b5cf6;
  font-weight: 600;
}

.loading-steps .step i {
  margin-right: 0.3rem;
}

/* ============================================================================
   Ticker Hero
   ============================================================================ */

.me-hero {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  animation: fadeInUp 0.5s ease;
}

.me-hero-ticker {
  font-size: 2.5rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.05em;
}

.me-hero-sector {
  font-size: 0.95rem;
  color: #8b5cf6;
  margin-top: 0.15rem;
}

.me-hero-sector i {
  margin-right: 0.3rem;
}

.me-hero-timestamp {
  font-size: 0.78rem;
  color: #475569;
  margin-top: 0.3rem;
}

.me-hero-timestamp i {
  margin-right: 0.3rem;
}

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

/* ============================================================================
   Gauge / Barometer
   ============================================================================ */

.me-gauge-container {
  max-width: 500px;
  margin: 1.5rem auto 1rem;
  animation: fadeInUp 0.6s ease;
}

.me-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.4rem;
  padding: 0 2px;
}

.me-gauge-label-off {
  color: #8b5cf6;
}
.me-gauge-label-on {
  color: #06b6d4;
}

.me-gauge-track {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(
    90deg,
    #8b5cf6 0%,
    #7c3aed 20%,
    #6366f1 40%,
    #818cf8 60%,
    #22d3ee 80%,
    #06b6d4 100%
  );
  overflow: visible;
}

.me-gauge-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 7px 0 0 7px;
  background: transparent;
  width: 0%;
  transition: width 0s;
}

.me-gauge-fill.animated {
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.me-gauge-needle {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 24px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  transform: translateX(-2px);
  left: 50%;
  transition: left 0s;
}

.me-gauge-needle.animated {
  transition: left 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.me-gauge-value {
  text-align: center;
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #e2e8f0;
}

/* ============================================================================
   Signal Stats Bar
   ============================================================================ */

.me-signal-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.25rem 0 2rem;
  animation: fadeInUp 0.7s ease;
}

.me-stat {
  text-align: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  min-width: 90px;
}

.me-stat.risk-on {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.me-stat.risk-off {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.me-stat.neutral {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.me-stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.me-stat.risk-on .me-stat-num {
  color: #06b6d4;
}
.me-stat.risk-off .me-stat-num {
  color: #8b5cf6;
}
.me-stat.neutral .me-stat-num {
  color: #818cf8;
}

.me-stat-label {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================================
   Indicator Cards (v4 – responsive full-width grid)
   ============================================================================ */

.market-env-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease;
}

/* First 4 cards: 2 per row (span 3 each) */
.market-env-grid .indicator-card:nth-child(-n + 4) {
  grid-column: span 3;
}
/* Last 3 cards: 3 per row (span 2 each) */
.market-env-grid .indicator-card:nth-child(n + 5) {
  grid-column: span 2;
}

/* Extra-wide screens: all 7 visible with generous room */
@media (min-width: 1600px) {
  .market-env-grid {
    gap: 1.5rem;
  }
}

/* Large screens: keep 2-2-3 layout */
@media (max-width: 1200px) and (min-width: 769px) {
  .market-env-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .market-env-grid .indicator-card:nth-child(-n + 4) {
    grid-column: span 3;
  }
  .market-env-grid .indicator-card:nth-child(n + 5) {
    grid-column: span 2;
  }
}

.indicator-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  transition: all 0.25s;
}

.indicator-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.indicator-card.risk-on {
  border-left: 3px solid #06b6d4;
}
.indicator-card.risk-off {
  border-left: 3px solid #8b5cf6;
}
.indicator-card.neutral-signal {
  border-left: 3px solid #6366f1;
}

.indicator-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.indicator-name {
  font-size: 0.88rem;
  color: #94a3b8;
  font-weight: 600;
}

.indicator-symbol {
  font-size: 0.78rem;
  color: #8b5cf6;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
}

/* Price + Return row */
.indicator-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.indicator-price {
  font-size: 1.55rem;
  font-weight: 700;
  color: #f1f5f9;
}

.indicator-return {
  font-size: 1rem;
  font-weight: 600;
}

.indicator-return.positive {
  color: #06b6d4;
}
.indicator-return.negative {
  color: #8b5cf6;
}

/* Mini bar chart */
.mini-bar-track {
  position: relative;
  height: 6px;
  background: rgba(100, 116, 139, 0.15);
  border-radius: 3px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.mini-bar-zero {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(148, 163, 184, 0.3);
}

.mini-bar-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}

/* MA section */
.indicator-ma-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.indicator-ma-label {
  font-size: 0.78rem;
  color: #64748b;
}

.indicator-ma-vs {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.indicator-ma-vs.above {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.1);
}

.indicator-ma-vs.below {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

/* MA Dot indicator */
.ma-dot-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.ma-dot-label-left,
.ma-dot-label-right {
  font-size: 0.62rem;
  color: #475569;
  min-width: 24px;
}

.ma-dot-label-right {
  text-align: right;
}

.ma-dot-track {
  flex: 1;
  position: relative;
  height: 4px;
  background: rgba(100, 116, 139, 0.15);
  border-radius: 2px;
}

.ma-dot-center {
  position: absolute;
  left: 50%;
  top: -2px;
  width: 1px;
  height: 8px;
  background: rgba(148, 163, 184, 0.25);
}

.ma-dot {
  position: absolute;
  top: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateX(-5px);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  transition: left 0.8s ease;
}

/* Card footer */
.indicator-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.indicator-signal {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
}

.indicator-signal.risk-on {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
}
.indicator-signal.risk-off {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}
.indicator-signal.neutral {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}
.indicator-signal.neutral-signal {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.indicator-signal.sm {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
}

.indicator-trend-badge {
  font-size: 0.72rem;
  color: #64748b;
  background: rgba(100, 116, 139, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.indicator-explanation {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Summary Table – removed (v3) */

/* Weight badge on indicator cards */
.indicator-weight-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

/* ============================================================================
   AI Conclusion Card (v3 – clean & prominent)
   ============================================================================ */

.me-ai-conclusion {
  position: relative;
  background: rgba(30, 41, 59, 0.65);
  border-radius: 20px;
  padding: 2rem 2.25rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.85s ease;
  overflow: hidden;
}

.me-ai-conclusion::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1, #3b82f6, #8b5cf6);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.me-ai-conclusion-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.me-ai-conclusion-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
}

.me-ai-conclusion-title {
  display: flex;
  flex-direction: column;
}

.me-ai-conclusion-title > span:first-child {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
}

.me-ai-conclusion-sector {
  font-size: 0.75rem;
  color: #64748b;
}

.me-ai-conclusion-body {
  color: #e2e8f0;
  line-height: 1.8;
  font-size: 1rem;
}

.me-ai-conclusion-body p {
  margin: 0 0 0.5rem;
}

.me-ai-conclusion-body h2,
.me-ai-conclusion-body h3 {
  color: #f1f5f9;
  font-size: 1.05rem;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.me-ai-conclusion-body strong {
  color: #f1f5f9;
}

.me-ai-conclusion-body ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.me-ai-conclusion-body li {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.me-ai-conclusion-body em {
  color: #a5b4fc;
}

.me-ai-conclusion-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.72rem;
  color: #475569;
}

.me-ai-conclusion-footer i {
  margin-right: 0.3rem;
}

/* ============================================================================
   AI Insights – Standalone Section Heading
   ============================================================================ */

.me-ai-heading-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 3rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.me-ai-heading-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.me-ai-heading-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.02em;
  margin: 0;
}

.me-ai-heading-ticker {
  font-size: 0.82rem;
  font-weight: 600;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
}

/* ============================================================================
   AI Insights – Section Blocks (Hero, Fundamentals, News, Strategy)
   ============================================================================ */

.me-ai-section {
  position: relative;
  background: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.65),
    rgba(15, 23, 42, 0.8)
  );
  border-radius: 20px;
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.me-ai-section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.25),
    rgba(99, 102, 241, 0.1),
    rgba(139, 92, 246, 0.15)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Section header inside each block */
.me-ai-section-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.me-ai-section-header i {
  font-size: 1.1rem;
  color: #8b5cf6;
}

.me-ai-section-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Hero section – no extra header needed */
.me-ai-section--hero {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Fundamentals section spacing */
.me-ai-section--fundamentals .me-ai-fundamentals-grid {
  margin-top: 0.5rem;
}

/* News section */
.me-ai-section--news .me-ai-news-card {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

/* Strategy section */
.me-ai-section--strategy .me-ai-strategy-row {
  margin-top: 0.25rem;
}

/* Section footer (timestamp / disclaimer) */
.me-ai-section-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  color: #475569;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 10px;
}

.me-ai-section-footer i {
  margin-right: 0.3rem;
}

/* Stagger animations for AI sections */
.me-ai-heading-row.me-reveal {
  transition-delay: 0s;
}
.me-ai-section--hero.me-reveal {
  transition-delay: 0.1s;
}
.me-ai-section--fundamentals.me-reveal {
  transition-delay: 0.15s;
}
.me-ai-section--news.me-reveal {
  transition-delay: 0.2s;
}
.me-ai-section--strategy.me-reveal {
  transition-delay: 0.25s;
}
.me-ai-section-footer.me-reveal {
  transition-delay: 0.3s;
}

.me-ai-premium-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #818cf8;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

/* Signal badge pills */
.me-ai-signal-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.me-ai-signal-badge.bullish {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.me-ai-signal-badge.bearish {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.me-ai-signal-badge.neutral {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ============================================================================
   AI Insights – Hero Summary Row (Score · VIX · Backdrop)
   ============================================================================ */

.me-ai-hero-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 1rem;
  margin-bottom: 0;
}

.me-ai-hero-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.me-ai-hero-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.me-ai-hero-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Score Ring */
.me-ai-score-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.me-ai-score-ring svg {
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.25));
}

.me-ai-ring-anim {
  transition: stroke-dashoffset 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.me-ai-score-num {
  position: absolute;
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* VIX Gauge */
.me-ai-vix-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.me-ai-vix-gauge {
  width: 100%;
  max-width: 140px;
  position: relative;
  height: 10px;
  margin: 0.25rem 0;
}

.me-ai-vix-zones {
  display: flex;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
}

.me-ai-vix-zones .z {
  flex: 1;
}

.me-ai-vix-zones .z.green {
  background: rgba(52, 211, 153, 0.4);
}

.me-ai-vix-zones .z.yellow {
  background: rgba(245, 158, 11, 0.4);
}

.me-ai-vix-zones .z.orange {
  background: rgba(251, 146, 60, 0.4);
}

.me-ai-vix-zones .z.red {
  background: rgba(248, 113, 113, 0.4);
}

.me-ai-vix-needle {
  position: absolute;
  top: -3px;
  width: 4px;
  height: 16px;
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  transition: left 1s ease;
}

/* Backdrop */
.me-ai-hero-wide {
  justify-content: center;
}

.me-ai-backdrop-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.me-ai-backdrop-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.me-ai-backdrop-text {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.5;
  text-align: left;
}

/* ============================================================================
   AI Insights – Section Labels
   ============================================================================ */

.me-ai-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b5cf6;
  margin: 1.5rem 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.me-ai-section-label i {
  font-size: 0.85rem;
}

/* ============================================================================
   AI Insights – Fundamentals Mini-Cards
   ============================================================================ */

.me-ai-fundamentals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.me-ai-fund-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.me-ai-fund-icon {
  font-size: 0.85rem;
  color: #8b5cf6;
  opacity: 0.7;
}

.me-ai-fund-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.me-ai-fund-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.me-ai-fund-value .up {
  color: #34d399;
}

.me-ai-fund-value .down {
  color: #8b5cf6;
}

.me-ai-fund-big {
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.me-ai-fund-date {
  font-size: 1rem;
  font-weight: 700;
  color: #a5b4fc;
}

.me-ai-fund-sub {
  font-size: 0.7rem;
  color: #64748b;
}

/* Mini bars */
.me-ai-fund-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.me-ai-fund-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.me-ai-fund-fill.green {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.me-ai-fund-fill.red {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.me-ai-fund-fill.purple {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.me-ai-fund-fill.cyan {
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.me-ai-fund-fill.amber {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.me-ai-fund-fill.orange {
  background: linear-gradient(90deg, #818cf8, #a78bfa);
}

/* Margins stacked rows */
.me-ai-margins-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.me-ai-margin-row {
  display: grid;
  grid-template-columns: 42px 1fr 40px;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.me-ai-margin-row span:last-child {
  text-align: right;
  font-weight: 600;
  color: #e2e8f0;
}

/* ============================================================================
   AI Insights – News Card
   ============================================================================ */

.me-ai-news-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}

.me-ai-news-card h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #a5b4fc;
  margin: 0 0 0.6rem;
}

.me-ai-news-card h4 i {
  margin-right: 0.4rem;
}

.me-ai-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.me-ai-news-list li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.me-ai-news-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6366f1;
}

/* ============================================================================
   AI Insights – Strategy & Verdict Boxes
   ============================================================================ */

.me-ai-strategy-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.me-ai-strat-card {
  background: rgba(15, 23, 42, 0.55);
  border-radius: 14px;
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  border: 1.5px solid rgba(99, 102, 241, 0.12);
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.me-ai-strat-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.me-ai-strat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}

.me-ai-strat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
}

.me-ai-strat-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.4;
}

.me-ai-strat-reason {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* Signal card variants */
.me-ai-strat-card.bullish {
  border-color: rgba(52, 211, 153, 0.25);
  background: linear-gradient(
    160deg,
    rgba(52, 211, 153, 0.08),
    rgba(15, 23, 42, 0.55)
  );
}

.me-ai-strat-card.bullish .me-ai-strat-icon {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.me-ai-strat-card.bullish .me-ai-strat-value {
  color: #34d399;
}

.me-ai-strat-card.bearish {
  border-color: rgba(139, 92, 246, 0.25);
  background: linear-gradient(
    160deg,
    rgba(139, 92, 246, 0.08),
    rgba(15, 23, 42, 0.55)
  );
}

.me-ai-strat-card.bearish .me-ai-strat-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.me-ai-strat-card.bearish .me-ai-strat-value {
  color: #8b5cf6;
}

.me-ai-strat-card.neutral {
  border-color: rgba(59, 130, 246, 0.25);
  background: linear-gradient(
    160deg,
    rgba(59, 130, 246, 0.08),
    rgba(15, 23, 42, 0.55)
  );
}

.me-ai-strat-card.neutral .me-ai-strat-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.me-ai-strat-card.neutral .me-ai-strat-value {
  color: #3b82f6;
}

/* Risk card */
.me-ai-strat-card.risk .me-ai-strat-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

/* Targets card */
.me-ai-strat-card.targets .me-ai-strat-icon {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.me-ai-strat-card.targets .me-ai-strat-value {
  color: #a5b4fc;
}

/* ============================================================================
   AI Insights – Responsive
   ============================================================================ */

@media (max-width: 768px) {
  .me-ai-hero-row {
    grid-template-columns: 1fr 1fr;
  }

  .me-ai-hero-wide {
    grid-column: 1 / -1;
  }

  .me-ai-fundamentals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .me-ai-strategy-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .me-ai-hero-row {
    grid-template-columns: 1fr;
  }

  .me-ai-fundamentals-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================================
   Error / States
   ============================================================================ */

.market-env-error {
  text-align: center;
  padding: 2rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 12px;
}

.market-env-error i {
  margin-right: 0.4rem;
}

/* ============================================================================
   Login-required prompt
   ============================================================================ */

.me-login-prompt {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.06),
    rgba(139, 92, 246, 0.06)
  );
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 16px;
  max-width: 440px;
  margin: 1.5rem auto 0;
}

.me-login-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.2rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.me-login-icon i {
  font-size: 1.6rem;
  color: #fff;
}

.me-login-prompt h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 0.5rem;
}

.me-login-prompt p {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.me-login-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.me-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.me-login-btn.primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}

.me-login-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.me-login-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.me-login-btn.secondary:hover {
  background: rgba(139, 92, 246, 0.12);
  transform: translateY(-1px);
}

/* ============================================================================
   Responsive
   ============================================================================ */

/* ============================================================================
   Stock Dashboard (Fundamentals + Research combined)
   ============================================================================ */

.me-stock-dashboard {
  margin: 2.5rem 0;
}

/* ── Hero / KPI ── */
.me-dash-hero {
  margin-bottom: 1.5rem;
}

.me-dash-hero-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.me-dash-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.me-dash-hero-text {
  flex: 1;
  min-width: 0;
}

.me-dash-company-name {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 2rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 0.25rem;
}

.me-dash-sub {
  color: #64748b;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.me-dash-sub span {
  color: #8b5cf6;
  font-weight: 600;
}

.me-dash-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.me-dash-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid;
}
.me-dash-badge.green {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.2);
  color: #34d399;
}
.me-dash-badge.orange {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
}
.me-dash-badge.neutral {
  background: rgba(148, 163, 184, 0.06);
  border-color: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

/* KPI Grid */
.me-dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.me-dash-kpi {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 14px;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition:
    transform 0.15s,
    background 0.2s;
}
.me-dash-kpi:hover {
  background: rgba(30, 41, 59, 0.85);
  transform: translateY(-2px);
}

.me-dash-kpi-label {
  color: #64748b;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}

.me-dash-kpi-value {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
}

.me-dash-kpi-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}
.me-dash-kpi-sub.up {
  color: #34d399;
}
.me-dash-kpi-sub.down {
  color: #8b5cf6;
}

/* ── Sections ── */
.me-dash-section {
  margin: 2.5rem 0;
}

.me-dash-section-title {
  font-family: "Playfair Display", "Georgia", serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #8b5cf6;
  display: inline-block;
}

.me-dash-section-desc {
  color: #64748b;
  font-size: 0.88rem;
  font-style: italic;
  margin-bottom: 1.25rem;
}

/* ── Placeholder (loading/empty state) ── */
.me-dash-placeholder {
  color: #64748b;
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
  padding: 1.5rem 1rem;
  opacity: 0.7;
}

/* ── Text Cards ── */
.me-dash-text-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.me-dash-text-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 0.85rem;
  letter-spacing: 0.01em;
}

.me-dash-text-card p {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 0 0 0.6rem;
}

.me-dash-text-card p:last-child {
  margin-bottom: 0;
}

.me-dash-text-card strong {
  color: #f1f5f9;
  font-weight: 600;
}

.me-dash-milestones {
  list-style: none;
  padding: 0;
  margin: 0;
}

.me-dash-milestones li {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.8;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(139, 92, 246, 0.3);
  margin-bottom: 0.25rem;
}

.me-dash-milestones li strong {
  color: #e2e8f0;
}

/* ── Earnings Box ── */
.me-dash-earnings-box {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.me-dash-earnings-tag {
  color: #8b5cf6;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.me-dash-earnings-date {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.me-dash-earnings-detail {
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ── Events Grid ── */
.me-dash-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.me-dash-event-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.me-dash-event-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
}
.me-dash-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.me-dash-event-date {
  color: #c4b5fd;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.me-dash-event-date i {
  margin-right: 0.35em;
  opacity: 0.85;
}
.me-dash-event-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}
.me-dash-event-badge.confirmed {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.me-dash-event-badge.expected {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.me-dash-event-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}
.me-dash-event-details {
  color: #94a3b8;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ── Chart Grid ── */
.me-dash-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Wide screens: keep 2-col but more space */
@media (min-width: 1200px) {
  .me-dash-chart-grid {
    gap: 1.5rem;
  }
}

.me-dash-chart-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  padding: 1.25rem;
}

.me-dash-chart-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.75rem;
}
.me-dash-chart-card h4 i,
.me-dash-section h3 i,
.me-dash-earnings-tag i {
  margin-right: 0.4em;
  opacity: 0.85;
}

.me-dash-chart-card canvas {
  max-height: 280px;
}

/* ── Analyst Section ── */
.me-dash-consensus-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.me-dash-consensus-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
}

.me-dash-consensus-bar {
  display: flex;
  height: 22px;
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.cb-buy {
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
}
.cb-hold {
  background: #3b82f6;
}
.cb-sell {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.me-dash-consensus-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.cl-buy {
  color: #06b6d4;
}
.cl-hold {
  color: #3b82f6;
}
.cl-sell {
  color: #8b5cf6;
}

.me-dash-targets-row {
  display: flex;
  gap: 1rem;
}

.me-dash-target-box {
  flex: 1;
  text-align: center;
}

.me-dash-target-box .tl {
  display: block;
  color: #64748b;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.me-dash-target-box .tv {
  display: block;
  color: #f1f5f9;
  font-size: 1.15rem;
  font-weight: 700;
}

.me-dash-target-box .tv.red {
  color: #8b5cf6;
}
.me-dash-target-box .tv.green {
  color: #06b6d4;
}

/* Individual analyst cards */
.me-dash-analyst-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.me-dash-analyst-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 14px;
  padding: 1.15rem;
  transition:
    transform 0.15s,
    border-color 0.2s;
}

.me-dash-analyst-card:hover {
  border-color: rgba(139, 92, 246, 0.25);
  transform: translateY(-2px);
}

.me-dash-analyst-firm {
  color: #8b5cf6;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.me-dash-analyst-target {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.me-dash-analyst-rating {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.me-dash-analyst-rating.buy {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
}
.me-dash-analyst-rating.hold {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}
.me-dash-analyst-rating.sell {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.me-dash-analyst-summary {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0;
}

/* ── News Grid ── */
.me-dash-news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.me-dash-news-item {
  display: block;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 10px;
  padding: 0.75rem;
  text-decoration: none;
  transition:
    border-color 0.2s,
    transform 0.15s;
}

.me-dash-news-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

.me-dash-news-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.me-dash-news-source {
  color: #8b5cf6;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.me-dash-news-date {
  color: #475569;
  font-size: 0.68rem;
}

.me-dash-news-title {
  color: #f1f5f9;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Research Grid (News + Sector) ── */
.me-dash-research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.me-dash-research-body {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.75;
}

.me-dash-research-body p {
  margin: 0 0 0.5rem;
}
.me-dash-research-body p:last-child {
  margin-bottom: 0;
}
.me-dash-research-body strong {
  color: #f1f5f9;
}
.me-dash-research-body ul,
.me-dash-research-body ol {
  padding-left: 1.2rem;
  margin: 0.4rem 0;
}
.me-dash-research-body li {
  margin-bottom: 0.3rem;
}

/* ── Research Sections (News / Competition split cards) ── */
.me-dash-research-section {
  margin-bottom: 1.5rem;
}

.me-dash-research-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.me-dash-research-heading i {
  color: #8b5cf6;
  font-size: 0.95rem;
}

.me-dash-research-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.me-dash-research-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  transition:
    transform 0.2s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.me-dash-research-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.me-dash-rc-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #06b6d4;
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.me-dash-rc-body {
  color: #cbd5e1;
  font-size: 0.84rem;
  line-height: 1.7;
}

.me-dash-rc-body strong {
  color: #f1f5f9;
}

.me-dash-rc-body ul {
  padding-left: 1rem;
  margin: 0.3rem 0;
}

.me-dash-rc-body li {
  margin-bottom: 0.2rem;
}

.me-dash-rc-body br + br {
  display: none;
}

/* ── Strengths & Risks ── */
.me-dash-sr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

.me-dash-sr-card ul {
  padding-left: 1.2rem;
  margin: 0;
}

.me-dash-sr-card li {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.me-dash-sr-card.strengths {
  border-left: 3px solid #34d399;
}

.me-dash-sr-card.risks {
  border-left: 3px solid #8b5cf6;
}

/* ── Signal Dots (replace emojis) ── */
.me-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}
.me-dot.green {
  background: #06b6d4;
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.4);
}
.me-dot.red {
  background: #8b5cf6;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.4);
}
.me-dot.yellow {
  background: #818cf8;
  box-shadow: 0 0 6px rgba(129, 140, 248, 0.4);
}
.me-dot.neutral {
  background: #64748b;
}

/* ── Timeline Visual (Milestones) ── */
.me-timeline {
  position: relative;
  padding-left: 2rem;
}
.me-timeline::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(
    180deg,
    #8b5cf6 0%,
    rgba(139, 92, 246, 0.15) 100%
  );
}
.me-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  position: relative;
}
.me-timeline-year {
  flex-shrink: 0;
  width: 3rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #c4b5fd;
  letter-spacing: 0.03em;
  padding-top: 0.1rem;
  text-align: right;
  margin-left: -2rem;
}
.me-timeline-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8b5cf6;
  border: 2px solid #1e293b;
  margin-top: 0.35rem;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.35);
}
.me-timeline-text {
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ── Citation Links ── */
.me-citation-link {
  color: #8b5cf6;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: super;
  transition: color 0.15s;
}
.me-citation-link:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

/* ── Bigger Table Variant ── */
.me-dash-table-lg th {
  font-size: 0.82rem;
  padding: 0.75rem 1rem;
  letter-spacing: 0.05em;
}
.me-dash-table-lg td {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}
.me-dash-table-year {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  text-transform: none !important;
}

/* ── Compact Card (News / Sector) ── */
.me-dash-compact-card .me-dash-research-body {
  font-size: 0.92rem;
  line-height: 1.7;
}
.me-dash-compact-card .me-dash-research-body p {
  margin: 0 0 0.6rem;
}
.me-dash-keypoints strong {
  color: #e2e8f0;
  font-size: 0.95rem;
}
.me-dash-keypoints ul {
  padding-left: 1rem;
}
.me-dash-keypoints li {
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 0.4rem;
  color: #cbd5e1;
}

/* ── Sources ── */
.me-dash-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0;
}

.me-dash-sources-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.me-dash-sources-label i {
  margin-right: 0.25rem;
}

.me-dash-source-chip {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: #94a3b8;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-size: 0.68rem;
  text-decoration: none;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.me-dash-source-chip:hover {
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.25);
}

.me-dash-powered {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: auto;
}

/* ── Data Tables ── */
.me-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.me-dash-table th {
  text-align: left;
  padding: 0.6rem 0.85rem;
  background: rgba(139, 92, 246, 0.06);
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  white-space: nowrap;
}

.me-dash-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  color: #e2e8f0;
  white-space: nowrap;
}

.me-dash-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.me-dash-table-label {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.78rem;
}

.me-dash-table-highlight {
  color: #fff;
  font-weight: 700;
}

/* ── Scroll Reveal Animations ── */
.me-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.me-reveal.me-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside chart grids */
.me-dash-chart-grid .me-reveal {
  transition-delay: 0s;
}
.me-dash-chart-grid .me-reveal:nth-child(2) {
  transition-delay: 0.12s;
}
.me-dash-chart-grid .me-reveal:nth-child(3) {
  transition-delay: 0.24s;
}
.me-dash-chart-grid .me-reveal:nth-child(4) {
  transition-delay: 0.36s;
}

/* Stagger indicator cards (VIX, Credit Spread, etc.) */
.market-env-grid .indicator-card.me-reveal {
  transition-delay: 0s;
}
.market-env-grid .indicator-card.me-reveal:nth-child(2) {
  transition-delay: 0.07s;
}
.market-env-grid .indicator-card.me-reveal:nth-child(3) {
  transition-delay: 0.14s;
}
.market-env-grid .indicator-card.me-reveal:nth-child(4) {
  transition-delay: 0.21s;
}
.market-env-grid .indicator-card.me-reveal:nth-child(5) {
  transition-delay: 0.28s;
}
.market-env-grid .indicator-card.me-reveal:nth-child(6) {
  transition-delay: 0.35s;
}
.market-env-grid .indicator-card.me-reveal:nth-child(7) {
  transition-delay: 0.42s;
}

/* Stagger hero cards (Score · VIX · Backdrop) */
.me-ai-hero-row .me-ai-hero-card.me-reveal {
  transition-delay: 0s;
}
.me-ai-hero-row .me-ai-hero-card.me-reveal:nth-child(2) {
  transition-delay: 0.12s;
}
.me-ai-hero-row .me-ai-hero-card.me-reveal:nth-child(3) {
  transition-delay: 0.24s;
}

/* Hero card inner animations – start hidden, animate on parent visible */
.me-ai-hero-card .me-ai-ring-anim {
  stroke-dashoffset: 326.7 !important;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.me-ai-hero-card.me-visible .me-ai-ring-anim {
  stroke-dashoffset: var(--ring-target) !important;
}
.me-ai-hero-card .me-ai-vix-needle {
  left: 0% !important;
  transition: left 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.me-ai-hero-card.me-visible .me-ai-vix-needle {
  left: var(--needle-target) !important;
}
.me-ai-hero-card .me-ai-score-num {
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.6s ease 0.8s,
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s;
}
.me-ai-hero-card.me-visible .me-ai-score-num {
  opacity: 1;
  transform: scale(1);
}
.me-ai-hero-card .me-ai-vix-value {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.5s ease 0.2s,
    transform 0.5s ease 0.2s;
}
.me-ai-hero-card.me-visible .me-ai-vix-value {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger fund mini-cards */
.me-ai-fundamentals-grid .me-ai-fund-card.me-reveal {
  transition-delay: 0s;
}
.me-ai-fundamentals-grid .me-ai-fund-card.me-reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.me-ai-fundamentals-grid .me-ai-fund-card.me-reveal:nth-child(3) {
  transition-delay: 0.16s;
}
.me-ai-fundamentals-grid .me-ai-fund-card.me-reveal:nth-child(4) {
  transition-delay: 0.24s;
}
.me-ai-fundamentals-grid .me-ai-fund-card.me-reveal:nth-child(5) {
  transition-delay: 0.32s;
}

/* Fund bar fill – start at 0 width, animate on card visible */
.me-ai-fund-card .me-ai-fund-fill {
  width: 0 !important;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.25s;
}
.me-ai-fund-card.me-visible .me-ai-fund-fill {
  width: var(--bar-width) !important;
}

/* Fund margin stack bars – same treatment */
.me-ai-fund-card .me-ai-margin-row .me-ai-fund-fill {
  width: 0 !important;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.me-ai-fund-card.me-visible .me-ai-margin-row:nth-child(1) .me-ai-fund-fill {
  width: var(--bar-width) !important;
  transition-delay: 0.3s;
}
.me-ai-fund-card.me-visible .me-ai-margin-row:nth-child(2) .me-ai-fund-fill {
  width: var(--bar-width) !important;
  transition-delay: 0.45s;
}
.me-ai-fund-card.me-visible .me-ai-margin-row:nth-child(3) .me-ai-fund-fill {
  width: var(--bar-width) !important;
  transition-delay: 0.6s;
}

/* Table number fade-in */
.me-dash-table td {
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.me-reveal .me-dash-table td {
  opacity: 0;
  transform: translateY(10px);
}
.me-visible .me-dash-table td {
  opacity: 1;
  transform: translateY(0);
}
.me-visible .me-dash-table tbody tr:nth-child(1) td {
  transition-delay: 0.05s;
}
.me-visible .me-dash-table tbody tr:nth-child(2) td {
  transition-delay: 0.1s;
}
.me-visible .me-dash-table tbody tr:nth-child(3) td {
  transition-delay: 0.15s;
}
.me-visible .me-dash-table tbody tr:nth-child(4) td {
  transition-delay: 0.2s;
}
.me-visible .me-dash-table tbody tr:nth-child(5) td {
  transition-delay: 0.25s;
}
.me-visible .me-dash-table tbody tr:nth-child(6) td {
  transition-delay: 0.3s;
}
.me-visible .me-dash-table tbody tr:nth-child(7) td {
  transition-delay: 0.35s;
}
.me-visible .me-dash-table tbody tr:nth-child(8) td {
  transition-delay: 0.4s;
}
.me-visible .me-dash-table tbody tr:nth-child(9) td {
  transition-delay: 0.45s;
}
.me-visible .me-dash-table tbody tr:nth-child(10) td {
  transition-delay: 0.5s;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .me-dash-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .me-dash-chart-grid {
    grid-template-columns: 1fr;
  }
  .me-dash-analyst-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .me-dash-research-grid {
    grid-template-columns: 1fr;
  }
  .me-dash-research-cards {
    grid-template-columns: 1fr;
  }
  .me-dash-sr-grid {
    grid-template-columns: 1fr;
  }
  .me-dash-news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .me-dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .me-dash-company-name {
    font-size: 1.5rem;
  }
  .me-dash-section-title {
    font-size: 1.25rem;
  }
  .me-dash-analyst-grid {
    grid-template-columns: 1fr;
  }
  .me-dash-targets-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  .me-dash-earnings-date {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .me-dash-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .me-dash-kpi-value {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .market-env-grid {
    grid-template-columns: 1fr !important;
  }

  .market-env-grid .indicator-card {
    grid-column: span 1 !important;
  }

  .market-env-search {
    flex-direction: column;
    align-items: center;
  }

  .market-env-search input {
    width: 100%;
    max-width: 300px;
  }

  .me-autocomplete-dropdown {
    width: calc(100vw - 3rem);
    max-width: 320px;
  }

  .me-signal-stats {
    gap: 1rem;
  }

  .me-stat {
    padding: 0.5rem 1rem;
    min-width: 70px;
  }

  .me-hero-ticker {
    font-size: 2rem;
  }

  .me-ai-conclusion {
    padding: 1.25rem;
  }

  .me-ai-conclusion-body {
    font-size: 0.92rem;
  }

  .me-ai-section {
    padding: 1.25rem 1.15rem;
  }

  .me-ai-heading-row {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
  }

  .me-ai-heading-title {
    font-size: 1.25rem;
  }

  .me-ai-heading-icon {
    width: 42px;
    height: 42px;
    font-size: 1.15rem;
  }

  .me-ai-premium-badge {
    margin-left: 0;
  }

  .me-ai-hero-row {
    grid-template-columns: 1fr;
  }

  .me-ai-section-header h3 {
    font-size: 1.05rem;
  }

  .indicator-card {
    padding: 1.25rem;
  }
}
