/* ==============================================================================
   KIWIDO — Executive Dashboard Styles (Inspired by 04ee.jpg)
   Theme: Soft Lavender / Lilac Minimalist Executive Dashboard
   ============================================================================== */

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

:root {
  --dash-canvas-bg: linear-gradient(135deg, #EDE8FC 0%, #E2DCFC 50%, #EDE6FD 100%);
  --dash-card-bg: #FFFFFF;
  --dash-tile-bg: #FFFFFF;
  --dash-text-dark: #1E2330;
  --dash-text-muted: #788198;
  --dash-border: #E8EBF2;
  --dash-lilac-accent: #8B5CF6;
  --dash-lilac-light: #F3F0FF;
  --dash-progress-fill: linear-gradient(90deg, #A78BFA 0%, #C084FC 100%);
  --dash-font-main: 'Inter', sans-serif;
  --dash-font-display: 'Outfit', sans-serif;
  --dash-font-mono: 'JetBrains Mono', monospace;
}

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

body.dashboard-page {
  background: var(--dash-canvas-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  font-family: var(--dash-font-main);
  color: var(--dash-text-dark);
}

.dashboard-container {
  width: 100%;
  max-width: 1140px;
  background: var(--dash-card-bg);
  border-radius: 32px;
  box-shadow: 0 24px 70px rgba(139, 92, 246, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 36px 48px 48px 48px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Top Navigation Bar */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1E2330;
}

.dash-logo-icon-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.55)) drop-shadow(0 0 6px rgba(56, 189, 248, 0.45));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.dash-brand:hover .dash-logo-icon-img {
  transform: scale(1.08);
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.8)) drop-shadow(0 0 10px rgba(56, 189, 248, 0.65));
}

.dash-brand-wrap {
  display: flex;
  flex-direction: column;
}

.dash-brand-name {
  font-family: var(--dash-font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #1E2330;
  line-height: 1.1;
}

.dash-brand-sub {
  font-family: var(--dash-font-main);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #7C3AED;
}

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

.dash-nav-links a {
  text-decoration: none;
  color: var(--dash-text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.dash-nav-links a:hover,
.dash-nav-links a.active {
  color: #7C3AED;
  font-weight: 600;
}

.dash-user-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
}

.dash-icon-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #1E2330;
}

.dash-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  font-size: 13px;
  font-weight: 600;
  color: #1E2330;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dash-user-pill:hover {
  border-color: #CBD5E1;
}

.dash-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F43F5E, #FB7185);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
}

/* Greeting Section */
.greeting-section {
  text-align: center;
  margin: 10px 0;
}

.greeting-title {
  font-family: var(--dash-font-display);
  font-size: 40px;
  font-weight: 800;
  color: #1E2330;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.greeting-subtitle {
  font-size: 16px;
  color: #64748B;
  font-weight: 400;
}

/* 4-Mode AGI Smart Trading Presets (Image Buttons) */
.dash-presets-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
  align-items: center;
}

.dash-preset-img-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
  filter: drop-shadow(0 6px 14px rgba(124, 58, 237, 0.18));
  opacity: 0.88;
}

.dash-preset-img-btn:hover {
  transform: translateY(-4px) scale(1.03);
  filter: drop-shadow(0 12px 24px rgba(139, 92, 246, 0.45)) brightness(1.06);
  opacity: 1;
}

.dash-preset-img-btn:active {
  transform: translateY(0) scale(0.98);
}

.dash-preset-img-btn.active {
  opacity: 1;
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.65)) drop-shadow(0 8px 20px rgba(124, 58, 237, 0.35));
}

.dash-preset-img-btn.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 25%;
  right: 25%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #A855F7, #6366F1, #EC4899);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
}

.preset-btn-graphic {
  width: 100%;
  max-width: 240px;
  height: auto;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 980px) {
  .dash-presets-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 540px) {
  .dash-presets-section {
    grid-template-columns: 1fr;
  }
}

/* Grid Layout (from 04ee.jpg) */
.dash-modules-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 24px;
}

.dash-card {
  background: var(--dash-tile-bg);
  border: 1px solid var(--dash-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(32, 38, 58, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 180px;
}

.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
}

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
}

.dash-card-header-icon {
  font-size: 14px;
}

/* Card 1: Learning Hub */
.card-learning-title {
  font-family: var(--dash-font-display);
  font-size: 24px;
  font-weight: 800;
  color: #1E2330;
  line-height: 1.25;
}

.lessons-completed-text {
  font-size: 12px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #EDE8FC;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-fill-purple {
  height: 100%;
  border-radius: 4px;
  background: var(--dash-progress-fill);
}

/* Card 2: Portfolio Value */
.portfolio-value-metric {
  font-family: var(--dash-font-mono);
  font-size: 32px;
  font-weight: 800;
  color: #1E2330;
  letter-spacing: -0.5px;
}

.sparkline-canvas-wrap {
  width: 100%;
  height: 80px;
  position: relative;
}

#dashSparklineCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sparkline-dates-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #94A3B8;
  font-family: var(--dash-font-mono);
  margin-top: 4px;
}

/* Card 3: Trending Now */
.trending-headline {
  font-family: var(--dash-font-display);
  font-size: 20px;
  font-weight: 700;
  color: #1E2330;
  line-height: 1.35;
}

.trending-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trending-timestamp {
  font-size: 12px;
  color: #94A3B8;
}

.circle-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1E2330;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.circle-arrow-btn:hover {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #FFFFFF;
}

/* Card 4: AI Portfolio Assistant (Donut Chart) */
.donut-stats-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.donut-ring-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

#donutCanvas {
  width: 100%;
  height: 100%;
}

.donut-legend-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #64748B;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.btc { background: #F59E0B; }
.legend-dot.eth { background: #6366F1; }
.legend-dot.others { background: #CBD5E1; }

/* Card 5 / Center: Floating Glowing Control Orb */
.center-orb-card {
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.dash-floating-orb {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DDD6FE 0%, #C4B5FD 50%, #A78BFA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.dash-floating-orb:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 40px rgba(167, 139, 250, 0.7);
}

.orb-equalizer-bars {
  display: flex;
  gap: 6px;
  align-items: center;
}

.orb-bar {
  width: 4px;
  height: 20px;
  background: #FFFFFF;
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* Card 6: Wealth Goals Tracker */
.goal-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.goal-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1E2330;
}

.goal-red-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.goal-pct-text {
  font-size: 12px;
  color: #64748B;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 980px) {
  .dash-modules-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-container {
    padding: 24px;
  }
  .greeting-title {
    font-size: 32px;
  }
}

/* ==============================================================================
   INTERACTIVE CARDS, TAGS & LIVE HUD STATUS
   ============================================================================== */
.interactive-card {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.interactive-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(139, 92, 246, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: rgba(139, 92, 246, 0.4);
}

.interactive-tag {
  font-size: 11px;
  font-weight: 600;
  color: #7C3AED;
  background: #F5F3FF;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-left: auto;
  transition: all 0.2s ease;
}

.interactive-card:hover .interactive-tag {
  background: #7C3AED;
  color: #FFFFFF;
}

.live-tag {
  color: #10B981;
  background: #ECFDF5;
  border-color: rgba(16, 185, 129, 0.2);
}

.engine-status-hud {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hud-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: pulseGreen 2s infinite ease-in-out;
}

.hud-pulse-dot.standby {
  background: #A855F7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.8);
  animation: none;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Floating Orb Active vs Standby */
.dash-floating-orb.orb-active {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 10px 32px rgba(16, 185, 129, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  border-color: #A7F3D0;
}

.dash-floating-orb.orb-active .orb-bar {
  animation: equalizeBars 1.2s infinite ease-in-out alternate;
}

.dash-floating-orb.orb-active .orb-bar:nth-child(2) {
  animation-delay: 0.3s;
}

@keyframes equalizeBars {
  0% { height: 12px; }
  100% { height: 26px; }
}

.dash-floating-orb.orb-standby {
  background: linear-gradient(135deg, #94A3B8 0%, #64748B 100%);
  box-shadow: 0 8px 24px rgba(100, 116, 139, 0.3);
  border-color: #E2E8F0;
}

.orb-caption {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748B;
  margin-top: 10px;
  text-align: center;
}

/* ==============================================================================
   MODAL BACKDROP & DIALOGS
   ============================================================================== */
.dash-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 35, 48, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.dash-modal-backdrop.open {
  display: flex;
}

.dash-modal-container {
  background: #FFFFFF;
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2), 0 4px 20px rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.8);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.academy-modal-box {
  max-width: 960px;
  height: 680px;
}

.rebalance-modal-box {
  max-width: 860px;
}

.dash-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 18px 32px;
  border-bottom: 1px solid #EDF2F7;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-badge-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #F3E8FF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-modal-title {
  font-family: var(--dash-font-display);
  font-size: 20px;
  font-weight: 800;
  color: #1E2330;
}

.dash-modal-subtitle {
  font-size: 13px;
  color: #64748B;
  margin-top: 2px;
}

.btn-close-modal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  font-size: 22px;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #EF4444;
}

/* Academy Ribbon */
.academy-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #F8FAFC;
  padding: 12px 24px;
  border-bottom: 1px solid #EDF2F7;
}

.ribbon-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ribbon-val {
  font-size: 15px;
  font-weight: 800;
  color: #7C3AED;
}

.ribbon-lbl {
  font-size: 11px;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Academy Body Split */
.academy-split-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  flex: 1;
  overflow: hidden;
}

.academy-sidebar {
  border-right: 1px solid #EDF2F7;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FCFCFE;
}

.academy-mod-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mod-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
}

.lesson-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}

.lesson-nav-item:hover {
  background: #F3F4F6;
}

.lesson-nav-item.active {
  background: #F5F3FF;
  border-color: rgba(139, 92, 246, 0.3);
  color: #7C3AED;
  font-weight: 600;
}

.lesson-status-icon {
  font-size: 14px;
}

.academy-main-reader {
  padding: 24px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reader-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reader-mod-tag {
  background: #F5F3FF;
  color: #7C3AED;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
}

.reader-dur-tag {
  color: #64748B;
  font-size: 12px;
}

.reader-lesson-title {
  font-family: var(--dash-font-display);
  font-size: 22px;
  font-weight: 800;
  color: #1E293B;
}

.reader-body-content {
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
}

.reader-body-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
  margin: 18px 0 8px 0;
}

.reader-actions-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #EDF2F7;
}

.btn-academy-action {
  padding: 10px 20px;
  background: linear-gradient(135deg, #7C3AED, #A855F7);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
  transition: transform 0.2s ease;
}

.btn-academy-action:hover {
  transform: translateY(-2px);
}

.btn-academy-secondary {
  padding: 10px 18px;
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-academy-secondary:hover {
  background: #F1F5F9;
}

/* Quiz Styles */
.quiz-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.btn-text-back {
  background: none;
  border: none;
  color: #7C3AED;
  font-weight: 600;
  cursor: pointer;
}

.quiz-q-card {
  background: #F8FAFC;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
  border: 1px solid #E2E8F0;
}

.quiz-q-text {
  font-size: 14px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 12px;
}

.quiz-option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 13px;
  color: #334155;
}

.quiz-option-label:hover {
  background: #EDE9FE;
}

.quiz-result-alert {
  padding: 16px;
  border-radius: 12px;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 600;
}

.quiz-result-alert.pass {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.quiz-result-alert.fail {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* ==============================================================================
   REBALANCING MODAL STYLES
   ============================================================================== */
.model-select-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: #F8FAFC;
  border-bottom: 1px solid #EDF2F7;
}

.model-pill {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.model-pill.model-img-pill {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.82;
  filter: drop-shadow(0 4px 10px rgba(124, 58, 237, 0.15));
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease, opacity 0.22s ease;
}

.model-pill.model-img-pill:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1.03);
  filter: drop-shadow(0 8px 18px rgba(139, 92, 246, 0.4));
}

.model-pill.model-img-pill.active {
  background: transparent;
  border: none;
  opacity: 1;
  transform: translateY(-2px) scale(1.04);
  box-shadow: none;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.7)) drop-shadow(0 6px 14px rgba(124, 58, 237, 0.35));
}

.model-pill:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.model-pill.active {
  background: #7C3AED;
  color: #FFFFFF;
  border-color: #7C3AED;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.rebalance-table-wrap {
  padding: 24px 32px;
  overflow-y: auto;
  max-height: 380px;
}

.rebalance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rebalance-table th {
  text-align: left;
  padding: 10px 14px;
  color: #64748B;
  font-weight: 600;
  border-bottom: 2px solid #EDF2F7;
}

.rebalance-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  color: #1E293B;
  font-weight: 500;
}

.reb-action-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.reb-action-pill.buy {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.reb-action-pill.sell {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.reb-action-pill.hold {
  background: #F1F5F9;
  color: #64748B;
}

.rebalance-footer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: #F8FAFC;
  border-top: 1px solid #EDF2F7;
  flex-wrap: wrap;
  gap: 16px;
}

.rebalance-stat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.chip-label {
  color: #64748B;
}

.chip-val {
  font-weight: 700;
  color: #1E293B;
}

.chip-val.green {
  color: #059669;
}

.btn-execute-rebalance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  transition: transform 0.2s ease;
}

.btn-execute-rebalance:hover {
  transform: translateY(-2px);
}

.rebalance-feedback-alert {
  margin: 16px 32px 24px 32px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.rebalance-feedback-alert.success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

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

.hud-toast {
  background: #1E293B;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-left: 4px solid #7C3AED;
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideToast {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

