/* ==========================================================================
   V6 Design System — MoneyCompass
   Complete component library for V6 web interface.
   References ONLY v6-theme-vars.css custom properties.
   NO imports from V4/V5 CSS.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. CONVENIENCE ALIASES
   Short names mapping to the generated v6-theme-vars.css long names.
   -------------------------------------------------------------------------- */
:root {
  --v6-base: var(--colors-surface-base);
  --v6-card: var(--colors-surface-card);
  --v6-sidebar: var(--colors-surface-sidebar);
  --v6-divider: var(--colors-surface-divider);
  --v6-elevated: var(--colors-surface-elevated);
  --v6-hover: var(--colors-surface-hover);
  --v6-pressed: var(--colors-surface-pressed);
  --v6-glass-bg: var(--effects-glass-bg);
  --v6-glass-border: var(--effects-glass-border);
  --v6-glass-blur: var(--effects-glass-blur);
  --v6-gold: var(--colors-brand-primary);
  --v6-gold-light: var(--colors-brand-primary-light);
  --v6-gold-dark: var(--colors-brand-primary-dark);
  --v6-teal: var(--colors-brand-accent);
  --v6-teal-light: var(--colors-brand-accent-light);
  --v6-secondary: var(--colors-brand-secondary);
  --v6-secondary-dark: var(--colors-brand-secondary-dark);
  --v6-secondary-light: var(--colors-brand-secondary-light);
  --v6-positive: var(--colors-semantic-success);
  --v6-negative: var(--colors-semantic-danger);
  --v6-caution: var(--colors-semantic-warning);
  --v6-text-primary: var(--colors-text-primary);
  --v6-text-secondary: var(--colors-text-secondary);
  --v6-text-muted: var(--colors-text-muted);
  --v6-text-on-primary: var(--colors-text-on-primary);
  /* Accent palette — chart / category / pill colors */
  --v6-accent-purple: #8B5CF6;
  --v6-accent-violet: #A78BFA;
  --v6-accent-indigo: #6366F1;
  --v6-accent-indigo-light: #818CF8;
  --v6-accent-blue: #3B82F6;
  --v6-accent-cyan: #06B6D4;
  --v6-accent-cyan-light: #22D3EE;
  --v6-accent-pink: #EC4899;
  --v6-accent-pink-light: #F472B6;
  --v6-positive-light: #34D399;
  --v6-caution-light: #FBBF24;
  --v6-gold-end: var(--colors-brand-primary-light);
  --v6-radius-sm: var(--shape-border-radius-sm);
  --v6-radius-md: var(--shape-border-radius-md);
  --v6-radius: var(--shape-border-radius-lg);
  --v6-radius-xl: var(--shape-border-radius-xl);
  --v6-radius-pill: var(--shape-border-radius-pill);
  --v6-shadow-sm: var(--effects-shadow-sm);
  --v6-shadow-md: var(--effects-shadow-md);
  --v6-shadow-lg: var(--effects-shadow-lg);
  --v6-shadow-xl: var(--effects-shadow-xl);
  --v6-transition-fast: var(--effects-transition-fast);
  --v6-transition-base: var(--effects-transition-base);
  --v6-transition-slow: var(--effects-transition-slow);
  --v6-font: var(--typography-font-family);
  --v6-font-mono: var(--typography-font-family-mono);
  --v6-gap: 16px;
  --v6-card-padding: 24px;
}


/* --------------------------------------------------------------------------
   1. BODY & LAYOUT
   -------------------------------------------------------------------------- */
.v6-body {
  font-family: var(--v6-font);
  background: linear-gradient(135deg, var(--v6-base), var(--v6-sidebar));
  color: var(--v6-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.v6-main-wrapper {
  margin-left: 240px;
  min-height: 100vh;
  padding: 0 32px 48px;
}

.v6-main-content {
  max-width: calc(1440px - 240px);
  padding: 0;
}

.v6-page {
  padding: 0 0 48px;
}

.v6-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--v6-gap);
}

.v6-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--v6-gap);
}

.v6-grid-2-1 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--v6-gap);
}

.v6-left-stack {
  display: flex;
  flex-direction: column;
  gap: var(--v6-gap);
}

.v6-right-stack {
  display: flex;
  flex-direction: column;
  gap: var(--v6-gap);
}

.v6-section-mb {
  margin-bottom: 24px;
}


/* --------------------------------------------------------------------------
   2. SIDEBAR (240px fixed left)
   -------------------------------------------------------------------------- */
.v6-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100%;
  background: var(--v6-sidebar);
  border-right: 1px solid var(--v6-glass-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.v6-sidebar-logo {
  padding: 24px 20px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--v6-glass-border);
}

.v6-sidebar-logo .v6-logo-icon {
  color: var(--v6-gold);
  font-size: 22px;
}

.v6-sidebar-logo .v6-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--v6-text-primary);
  letter-spacing: -0.02em;
}

.v6-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

/* ── Mode Toggle (icon button in footer) ───────────────── */
.v6-sidebar-mode-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--v6-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
}
.v6-sidebar-mode-btn:hover {
  color: var(--v6-gold);
  background: rgba(212,175,55,0.1);
}

/* ── Pinned (Dashboard) ────────────────────────────────── */
.v6-nav-pinned {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--v6-glass-border);
  margin-bottom: 4px;
}

/* ── Nav Groups — no horizontal borders ────────────────── */
.v6-nav-group {
  border-top: none;
  border-bottom: none;
}
.v6-nav-section-label,
.v6-nav-section-items,
.v6-section-icon,
.v6-section-title,
.v6-section-dot,
.v6-section-count,
.v6-section-chevron {
  border-top: none !important;
  border-bottom: none !important;
}

/* ── Section Label (shared base) ───────────────────────── */
.v6-nav-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--v6-text-muted);
  padding: 14px 20px 6px;
  transition: all 0.15s ease;
  border: none;
}

/* Elements hidden by default, shown per mode */
.v6-section-dot, .v6-section-chevron, .v6-section-count, .v6-section-icon { display: none; }
.v6-section-title { flex: 1; }

/* ── Classic Mode (Option B): Bold gold accent bar ─────── */
[data-sidebar-mode="classic"] .v6-nav-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--v6-text-primary);
}
/* Gold bar removed — section icons provide the visual anchor */
[data-sidebar-mode="classic"] .v6-section-icon {
  display: block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex-shrink: 0;
  opacity: 0.55;
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
}
/* Wallet — circle with horizontal line */
.v6-si-money  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239BA3AE' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.5' y='3.5' width='13' height='10' rx='2'/%3E%3Cpath d='M1.5 6.5h13'/%3E%3Ccircle cx='11.5' cy='9.5' r='1'/%3E%3C/svg%3E"); }
/* Crosshair target */
.v6-si-plan   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239BA3AE' stroke-width='1.4' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Ccircle cx='8' cy='8' r='2.5'/%3E%3Cpath d='M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2'/%3E%3C/svg%3E"); }
/* Trending up arrow */
.v6-si-progress { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2310B981' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12l4-4 2.5 2.5L14 5'/%3E%3Cpath d='M10 5h4v4'/%3E%3C/svg%3E"); }
/* Sparkle star */
.v6-si-intel  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23D4AF37' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 1.5l1.5 4.5L14 8l-4.5 1.5L8 14.5l-1.5-5L2 8l4.5-1.5z'/%3E%3C/svg%3E"); }
/* Wrench/tools */
.v6-si-manage { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239BA3AE' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 2.5a3.5 3.5 0 00-4.2 5.3L2.5 11.5l2 2 3.7-3.8a3.5 3.5 0 005.3-4.2L11 7.5 9 7l-.5-2z'/%3E%3C/svg%3E"); }
[data-sidebar-mode="classic"] .v6-nav-section-label {
  cursor: pointer;
  user-select: none;
}
[data-sidebar-mode="classic"] .v6-nav-section-label:hover {
  background: rgba(255,255,255,0.02);
}
[data-sidebar-mode="classic"] .v6-nav-section-label:hover .v6-section-icon {
  opacity: 0.85;
}
[data-sidebar-mode="classic"] .v6-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  margin-left: auto;
  font-size: 9px;
  color: var(--v6-text-muted);
  transition: transform 0.25s ease, color 0.15s ease;
}
[data-sidebar-mode="classic"] .v6-nav-section-label:hover .v6-section-count {
  color: var(--v6-text-secondary);
}
[data-sidebar-mode="classic"] .v6-nav-section-label.v6-section-collapsed .v6-section-count {
  transform: rotate(-90deg);
}

/* Classic mode collapse animation */
[data-sidebar-mode="classic"] .v6-nav-section-items {
  overflow: hidden;
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}
[data-sidebar-mode="classic"] .v6-nav-section-items.v6-collapsed {
  max-height: 0;
  opacity: 0;
}

/* ── Accordion Mode (Option A): Collapsible sections ───── */
[data-sidebar-mode="accordion"] .v6-nav-section-label {
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  margin: 0 8px;
  padding: 10px 12px 6px;
}
[data-sidebar-mode="accordion"] .v6-nav-section-label:hover {
  background: rgba(255,255,255,0.03);
}
[data-sidebar-mode="accordion"] .v6-section-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--v6-gold);
  flex-shrink: 0;
}
[data-sidebar-mode="accordion"] .v6-section-chevron {
  display: inline-block;
  font-size: 8px;
  color: var(--v6-text-muted);
  transition: transform 0.25s ease;
  margin-left: auto;
}
[data-sidebar-mode="accordion"] .v6-nav-section-label:not(.v6-section-collapsed) .v6-section-chevron {
  transform: rotate(0deg);
}
[data-sidebar-mode="accordion"] .v6-nav-section-label.v6-section-collapsed .v6-section-chevron {
  transform: rotate(-90deg);
}
[data-sidebar-mode="accordion"] .v6-nav-section-label:not(.v6-section-collapsed) .v6-section-title {
  color: var(--v6-gold);
}

/* Accordion collapse/expand animation */
[data-sidebar-mode="accordion"] .v6-nav-section-items {
  overflow: hidden;
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}
[data-sidebar-mode="accordion"] .v6-nav-section-items.v6-collapsed {
  max-height: 0;
  opacity: 0;
}

.v6-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--v6-text-secondary);
  cursor: pointer;
  transition: all var(--v6-transition-fast) ease;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.v6-sidebar-item .v6-nav-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
}

.v6-sidebar-item:hover {
  color: var(--v6-text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.v6-sidebar-item--active {
  border-left-color: var(--v6-gold);
  color: var(--v6-gold);
  background: var(--v6-glass-bg);
}

.v6-sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--v6-glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.v6-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v6-teal), #2A5D6E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--v6-text-primary);
  flex-shrink: 0;
}

.v6-sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.v6-sidebar-user-info .v6-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--v6-text-primary);
}

.v6-sidebar-user-info .v6-user-logout {
  font-size: 11px;
  color: var(--v6-text-muted);
  cursor: pointer;
  text-decoration: none;
}

.v6-sidebar-user-info .v6-user-logout:hover {
  color: var(--v6-text-secondary);
}


/* --------------------------------------------------------------------------
   3. TOPBAR (sticky)
   -------------------------------------------------------------------------- */
.v6-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--v6-glass-border);
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, rgba(26, 37, 47, 0.95), rgba(44, 62, 80, 0.95));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
  margin-left: -32px;
  margin-right: -32px;
}

.v6-topbar-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--v6-text-primary);
}

.v6-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.v6-toggle-pill {
  display: flex;
  align-items: center;
  background: var(--v6-glass-bg);
  border: 1px solid var(--v6-glass-border);
  border-radius: 20px;
  padding: 3px;
  font-size: 12px;
  font-weight: 600;
}

.v6-toggle-pill .opt {
  padding: 4px 12px;
  border-radius: 16px;
  color: var(--v6-text-muted);
  cursor: pointer;
  transition: all var(--v6-transition-fast) ease;
}

.v6-toggle-pill .opt.active {
  background: linear-gradient(135deg, var(--v6-gold), var(--v6-gold-light));
  color: #1A1A2E;
}

.v6-topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--v6-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--v6-glass-bg);
  border: 1px solid var(--v6-glass-border);
  color: var(--v6-text-secondary);
  font-size: 15px;
  cursor: pointer;
  position: relative;
  transition: background var(--v6-transition-fast) ease;
}

.v6-topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.v6-badge-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--v6-negative);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v6-ask-ai-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--v6-gold), var(--v6-gold-light));
  border: none;
  border-radius: var(--v6-radius-md);
  font-size: 13px;
  font-weight: 600;
  color: #1A1A2E;
  cursor: pointer;
  font-family: inherit;
  transition: filter var(--v6-transition-fast) ease;
}

.v6-ask-ai-btn:hover {
  filter: brightness(1.08);
}


/* --------------------------------------------------------------------------
   4. CARDS
   -------------------------------------------------------------------------- */
.v6-card {
  background: var(--v6-glass-bg);
  backdrop-filter: blur(var(--v6-glass-blur));
  -webkit-backdrop-filter: blur(var(--v6-glass-blur));
  border: 1px solid var(--v6-glass-border);
  border-radius: var(--v6-radius);
  padding: var(--v6-card-padding);
}

.v6-card-hero {
  background: linear-gradient(135deg, rgba(58, 122, 140, 0.08), rgba(212, 175, 55, 0.06));
  border: 1px solid rgba(212, 175, 55, 0.20);
  border-radius: var(--v6-radius-xl);
  padding: 28px;
  backdrop-filter: blur(var(--v6-glass-blur));
  -webkit-backdrop-filter: blur(var(--v6-glass-blur));
}

.v6-card-hero .v6-card-hero-greeting {
  font-size: 22px;
  font-weight: 700;
  color: var(--v6-text-primary);
  margin-bottom: 14px;
}

.v6-card-hero .v6-card-hero-narrative {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--v6-text-secondary);
  margin-bottom: 16px;
}

.v6-card-hero .v6-card-hero-narrative strong {
  color: var(--v6-text-primary);
  font-weight: 600;
}

/* Insight cards — card with left accent border */
.v6-insight-card {
  background: var(--v6-glass-bg);
  backdrop-filter: blur(var(--v6-glass-blur));
  -webkit-backdrop-filter: blur(var(--v6-glass-blur));
  border: 1px solid var(--v6-glass-border);
  border-radius: var(--v6-radius);
  padding: 18px 20px;
  border-left: 3px solid var(--v6-gold);
}

.v6-insight-card--gold  { border-left-color: var(--v6-gold); }
.v6-insight-card--teal  { border-left-color: var(--v6-teal); }
.v6-insight-card--amber { border-left-color: var(--v6-caution); }
.v6-insight-card--emerald { border-left-color: var(--v6-positive); }

.v6-insight-card .v6-insight-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--v6-text-primary);
  margin-bottom: 6px;
}

.v6-insight-card .v6-insight-body {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--v6-text-secondary);
}

/* Metric cards — compact KPI tiles */
.v6-metric-card {
  background: var(--v6-glass-bg);
  backdrop-filter: blur(var(--v6-glass-blur));
  -webkit-backdrop-filter: blur(var(--v6-glass-blur));
  border: 1px solid var(--v6-glass-border);
  border-radius: var(--v6-radius);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.v6-metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--v6-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.v6-metric-icon.teal-bg  { background: rgba(58, 122, 140, 0.20); color: var(--v6-teal); }
.v6-metric-icon.green-bg { background: rgba(16, 185, 129, 0.18); color: var(--v6-positive); }
.v6-metric-icon.gold-bg  { background: rgba(212, 175, 55, 0.18); color: var(--v6-gold); }
.v6-metric-icon.amber-bg { background: rgba(245, 158, 11, 0.18); color: var(--v6-caution); }

.v6-metric-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--v6-text-muted);
  margin-bottom: 2px;
}

.v6-metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--v6-text-primary);
}

/* Metrics 2x2 grid */
.v6-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}


/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.v6-btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--v6-gold), var(--v6-gold-light));
  border: none;
  border-radius: var(--v6-radius-md);
  font-size: 13px;
  font-weight: 600;
  color: #1A1A2E;
  cursor: pointer;
  font-family: inherit;
  transition: filter var(--v6-transition-fast) ease;
}

.v6-btn-gold:hover {
  filter: brightness(1.08);
}

.v6-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--v6-gold);
  border-radius: var(--v6-radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--v6-gold);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--v6-transition-fast) ease;
}

.v6-btn-outline:hover {
  background: rgba(212, 175, 55, 0.10);
}

.v6-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--v6-radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--v6-teal);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--v6-transition-fast) ease;
}

.v6-btn-ghost:hover {
  background: rgba(58, 122, 140, 0.10);
}


/* --------------------------------------------------------------------------
   6. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.v6-display {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--v6-text-primary);
}

.v6-h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--v6-text-primary);
}

.v6-h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--v6-text-primary);
}

.v6-h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--v6-text-primary);
}

.v6-body-text {
  font-size: 15px;
  color: var(--v6-text-primary);
}

.v6-body-sm {
  font-size: 13px;
  color: var(--v6-text-secondary);
}

.v6-caption {
  font-size: 12px;
  font-weight: 500;
  color: var(--v6-text-muted);
}

.v6-overline {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--v6-text-muted);
  margin-bottom: 14px;
}

.v6-teal-link {
  color: var(--v6-teal);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.v6-teal-link:hover {
  text-decoration: underline;
}


/* --------------------------------------------------------------------------
   7. JOURNEY BADGE
   -------------------------------------------------------------------------- */
.v6-journey-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(212, 175, 55, 0.10);
  border: 1px solid rgba(212, 175, 55, 0.20);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--v6-gold);
  margin-bottom: 24px;
}

.v6-journey-dots {
  display: flex;
  gap: 4px;
}

.v6-journey-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--v6-gold);
}

.v6-journey-dot--empty {
  background: transparent;
  border: 1px solid var(--v6-gold);
  opacity: 0.5;
}


/* --------------------------------------------------------------------------
   8. ACTION ITEMS
   -------------------------------------------------------------------------- */
.v6-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 13.5px;
  color: var(--v6-text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.v6-action-item:last-of-type {
  border-bottom: none;
}

.v6-action-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--v6-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  color: transparent;
}

.v6-action-checkbox.done {
  background: var(--v6-positive);
  border-color: var(--v6-positive);
  color: #fff;
}

.v6-action-item--done .v6-action-text {
  text-decoration: line-through;
  color: var(--v6-text-muted);
}

.v6-actions-caption {
  font-size: 12px;
  color: var(--v6-text-muted);
  margin-top: 8px;
  margin-bottom: 6px;
}


/* --------------------------------------------------------------------------
   9. ADVISOR PANEL (right slide-over)
   -------------------------------------------------------------------------- */
.v6-advisor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--v6-transition-base) ease, visibility var(--v6-transition-base) ease;
}

.v6-advisor-overlay.v6-panel-open {
  opacity: 1;
  visibility: visible;
}

.v6-advisor-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background: var(--v6-glass-bg);
  backdrop-filter: blur(var(--v6-glass-blur));
  -webkit-backdrop-filter: blur(var(--v6-glass-blur));
  border-left: 1px solid var(--v6-glass-border);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--v6-transition-slow) cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--v6-shadow-xl);
}

.v6-advisor-panel.v6-panel-open {
  transform: translateX(0);
}

.v6-advisor-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--v6-glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v6-advisor-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.v6-advisor-panel-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--v6-glass-border);
}

.v6-chat-bubble {
  padding: 12px 16px;
  border-radius: var(--v6-radius);
  margin-bottom: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 85%;
}

.v6-chat-bubble--user {
  background: var(--v6-card);
  border: 1px solid var(--v6-glass-border);
  margin-left: auto;
  color: var(--v6-text-primary);
}

.v6-chat-bubble--advisor {
  background: rgba(58, 122, 140, 0.12);
  border: 1px solid rgba(58, 122, 140, 0.20);
  margin-right: auto;
  color: var(--v6-text-primary);
}


/* --------------------------------------------------------------------------
   10. TABLES
   -------------------------------------------------------------------------- */
.v6-table {
  width: 100%;
  border-collapse: collapse;
}

.v6-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--v6-text-muted);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--v6-divider);
}

.v6-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13.5px;
  color: var(--v6-text-secondary);
}

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

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


/* --------------------------------------------------------------------------
   11. EMPTY & LOADING STATES
   -------------------------------------------------------------------------- */
.v6-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.v6-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.v6-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--v6-text-primary);
  margin-bottom: 8px;
}

.v6-empty-text {
  font-size: 13px;
  color: var(--v6-text-muted);
  max-width: 280px;
}

/* Skeleton loading animation */
@keyframes v6-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.v6-loading {
  position: relative;
  overflow: hidden;
}

.v6-skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: v6-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--v6-radius-sm);
}

.v6-skeleton--text {
  height: 14px;
  margin-bottom: 8px;
}

.v6-skeleton--heading {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.v6-skeleton--circle {
  border-radius: 50%;
}

.v6-skeleton--card {
  height: 120px;
  border-radius: var(--v6-radius);
}


/* --------------------------------------------------------------------------
   12. CHART HELPERS
   -------------------------------------------------------------------------- */
.v6-chart-area {
  position: relative;
  height: 200px;
  margin-top: 12px;
}

.v6-sparkline-container {
  margin-top: 14px;
  height: 48px;
}

.v6-sparkline-container svg {
  width: 100%;
  height: 48px;
}

.v6-donut-container {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 12px;
}

.v6-donut-svg {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.v6-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v6-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--v6-text-secondary);
}

.v6-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.v6-legend-item .v6-legend-pct {
  font-weight: 600;
  color: var(--v6-text-primary);
  margin-left: auto;
  padding-left: 12px;
}


/* --------------------------------------------------------------------------
   12b. GRADE PILLS (Financial Plan component grades)
   -------------------------------------------------------------------------- */
.v6-grade-pill--teal {
  padding: 4px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(58, 122, 140, 0.18);
  color: var(--v6-teal);
}

.v6-grade-pill--amber {
  padding: 4px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.18);
  color: var(--v6-caution);
}

.v6-grade-pill--gold {
  padding: 4px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.18);
  color: var(--v6-gold);
}

.v6-grade-pill--negative {
  padding: 4px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.18);
  color: var(--v6-negative);
}


/* --------------------------------------------------------------------------
   13. COLOR UTILITIES
   -------------------------------------------------------------------------- */
.v6-text-gold      { color: var(--v6-gold); }
.v6-text-teal      { color: var(--v6-teal); }
.v6-text-positive  { color: var(--v6-positive); }
.v6-text-negative  { color: var(--v6-negative); }
.v6-text-caution   { color: var(--v6-caution); }
.v6-text-primary   { color: var(--v6-text-primary); }
.v6-text-secondary { color: var(--v6-text-secondary); }
.v6-text-muted     { color: var(--v6-text-muted); }


/* --------------------------------------------------------------------------
   14. DISPLAY UTILITY
   -------------------------------------------------------------------------- */
.v6-hidden { display: none; }


/* --------------------------------------------------------------------------
   15. SPACING UTILITIES
   -------------------------------------------------------------------------- */
/* Margin top */
.v6-mt-0  { margin-top: 0; }
.v6-mt-1  { margin-top: 4px; }
.v6-mt-2  { margin-top: 8px; }
.v6-mt-3  { margin-top: 12px; }
.v6-mt-4  { margin-top: 16px; }
.v6-mt-5  { margin-top: 20px; }
.v6-mt-6  { margin-top: 24px; }
.v6-mt-8  { margin-top: 32px; }
.v6-mt-10 { margin-top: 40px; }
.v6-mt-12 { margin-top: 48px; }

/* Margin bottom */
.v6-mb-0  { margin-bottom: 0; }
.v6-mb-1  { margin-bottom: 4px; }
.v6-mb-2  { margin-bottom: 8px; }
.v6-mb-3  { margin-bottom: 12px; }
.v6-mb-4  { margin-bottom: 16px; }
.v6-mb-5  { margin-bottom: 20px; }
.v6-mb-6  { margin-bottom: 24px; }
.v6-mb-8  { margin-bottom: 32px; }
.v6-mb-10 { margin-bottom: 40px; }
.v6-mb-12 { margin-bottom: 48px; }

/* Gap utilities */
.v6-gap-0  { gap: 0; }
.v6-gap-1  { gap: 4px; }
.v6-gap-2  { gap: 8px; }
.v6-gap-3  { gap: 12px; }
.v6-gap-4  { gap: 16px; }
.v6-gap-6  { gap: 24px; }

/* Flex utilities */
.v6-flex       { display: flex; }
.v6-flex-col   { display: flex; flex-direction: column; }
.v6-flex-center { display: flex; align-items: center; justify-content: center; }
.v6-flex-between { display: flex; align-items: center; justify-content: space-between; }
.v6-flex-1     { flex: 1; }
.v6-flex-shrink-0 { flex-shrink: 0; }


/* ==========================================================================
   16. LIGHT MODE OVERRIDES
   When data-theme="light", glass morphism becomes opaque white cards,
   sidebar uses light surface, topbar uses frosted white.
   ========================================================================== */

/* --- Body & layout --- */
[data-theme="light"] .v6-body {
  background: #F0F2F5;
}

/* --- Sidebar: dark navy for contrast (matches landing page) --- */
[data-theme="light"] .v6-sidebar {
  background: #1E293B;
  border-right: none;
}

[data-theme="light"] .v6-sidebar-logo {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .v6-sidebar-logo .v6-logo-text {
  color: #F8FAFC;
}

[data-theme="light"] .v6-sidebar-item {
  color: #94A3B8;
}

[data-theme="light"] .v6-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
}

[data-theme="light"] .v6-sidebar-item--active {
  background: rgba(212, 175, 55, 0.12);
  color: #D4AF37;
  font-weight: 600;
}

[data-theme="light"] .v6-sidebar-user {
  border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .v6-sidebar-user .v6-user-name {
  color: #F8FAFC;
}

[data-theme="light"] .v6-sidebar-user .v6-user-logout {
  color: #94A3B8;
}

[data-theme="light"] .v6-avatar-circle {
  color: #FFFFFF;
  background: linear-gradient(135deg, #D4AF37, #B8942E);
}

[data-theme="light"] .v6-nav-section-label {
  color: #94A3B8;
}

[data-theme="light"] .v6-section-title-text,
[data-theme="light"] .v6-section-title {
  color: #CBD5E1;
}

[data-theme="light"] .v6-nav-section-items {
  border-left-color: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .v6-sidebar-mode-btn {
  color: #64748B;
}

[data-theme="light"] .v6-sidebar-mode-btn:hover {
  color: #D4AF37;
  background: rgba(212, 175, 55, 0.1);
}

[data-theme="light"] .v6-nav-pinned {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* --- Topbar: white with shadow --- */
[data-theme="light"] .v6-topbar {
  background: #FFFFFF;
  border-bottom: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .v6-toggle-pill {
  background: #F1F5F9;
  border-color: #E2E8F0;
}

[data-theme="light"] .v6-topbar-icon-btn {
  background: #F1F5F9;
  border-color: #E2E8F0;
}

[data-theme="light"] .v6-topbar-icon-btn:hover {
  background: #E2E8F0;
}

[data-theme="light"] .v6-ask-ai-btn {
  box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

/* --- Cards: white with subtle shadow + left accent --- */
[data-theme="light"] .v6-card {
  background: #FFFFFF;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid #E8ECF0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .v6-card-hero {
  background: linear-gradient(135deg, #FFFFFF, rgba(58, 122, 140, 0.06), rgba(212, 175, 55, 0.04));
  border: 1px solid #E8ECF0;
  border-left: 3px solid #D4AF37;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .v6-insight-card {
  background: #FFFFFF;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid #E8ECF0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .v6-metric-card {
  background: #FFFFFF;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid #E8ECF0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Light mode: richer metric icon backgrounds */
[data-theme="light"] .v6-metric-icon.teal-bg  { background: rgba(58, 122, 140, 0.15); }
[data-theme="light"] .v6-metric-icon.green-bg { background: rgba(16, 185, 129, 0.15); }
[data-theme="light"] .v6-metric-icon.gold-bg  { background: rgba(212, 175, 55, 0.15); }
[data-theme="light"] .v6-metric-icon.amber-bg { background: rgba(245, 158, 11, 0.15); }

/* --- Journey badge: richer tint --- */
[data-theme="light"] .v6-journey-badge {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.25);
}

/* --- Action items --- */
[data-theme="light"] .v6-action-item {
  border-bottom-color: #F1F5F9;
}

[data-theme="light"] .v6-action-checkbox {
  border-color: #CBD5E1;
}

/* --- Overline labels: teal accent in light mode --- */
[data-theme="light"] .v6-overline {
  color: #3A7A8C;
}

/* --- Tables --- */
[data-theme="light"] .v6-table td {
  border-bottom-color: #F1F5F9;
}

[data-theme="light"] .v6-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

/* --- Advisor panel --- */
[data-theme="light"] .v6-advisor-panel {
  background: #FFFFFF;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-left: 1px solid #E8ECF0;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .v6-advisor-panel-header {
  border-bottom-color: #E8ECF0;
}

[data-theme="light"] .v6-advisor-panel-footer {
  border-top-color: #E8ECF0;
}

[data-theme="light"] .v6-chat-bubble--user {
  background: #F1F5F9;
  border-color: #E2E8F0;
}

[data-theme="light"] .v6-chat-bubble--advisor {
  background: rgba(58, 122, 140, 0.06);
  border-color: rgba(58, 122, 140, 0.15);
  border-left: 3px solid #3A7A8C;
}

/* --- Skeleton loading for light mode --- */
[data-theme="light"] .v6-skeleton {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.04) 25%,
    rgba(0, 0, 0, 0.08) 50%,
    rgba(0, 0, 0, 0.04) 75%
  );
  background-size: 200% 100%;
}

/* --- Table styles --- */
.v6-th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--v6-text-muted);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--v6-glass-border);
}

.v6-td {
  font-size: 13px;
  color: var(--v6-text-secondary);
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

/* --- Filter tabs --- */
.v6-filter-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--v6-text-muted);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.v6-filter-tab:hover {
  color: var(--v6-text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.v6-filter-tab.active {
  color: var(--v6-gold);
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.2);
}

.v6-filter-count {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

.v6-filter-tab.active .v6-filter-count {
  background: rgba(212, 175, 55, 0.15);
  color: var(--v6-gold);
}

/* --- Search input --- */
.v6-search-input {
  padding: 8px 14px 8px 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--v6-glass-border);
  border-radius: 10px;
  color: var(--v6-text-primary);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  max-width: 320px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}

.v6-search-input::placeholder { color: var(--v6-text-muted); }
.v6-search-input:focus { border-color: var(--v6-teal); background-color: rgba(255, 255, 255, 0.06); }

/* --- Light mode table/filter overrides --- */
[data-theme="light"] .v6-th {
  color: var(--v6-text-muted);
  border-bottom-color: var(--v6-glass-border);
}

[data-theme="light"] .v6-td {
  color: var(--v6-text-secondary);
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] tr:hover .v6-td {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .v6-search-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--v6-glass-border);
  color: var(--v6-text-primary);
}

[data-theme="light"] .v6-filter-tab:hover {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .v6-filter-count {
  background: rgba(0, 0, 0, 0.06);
}

/* --- Health Score Components --- */
.v6-component-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.v6-component-item:last-child { border-bottom: none; }
.v6-comp-label {
  width: 140px;
  font-size: 13px;
  color: var(--v6-text-secondary);
  flex-shrink: 0;
}
.v6-comp-bar-bg {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.v6-comp-bar-fill {
  height: 100%;
  border-radius: 5px;
}
.v6-comp-green { background: var(--v6-positive); }
.v6-comp-teal { background: var(--v6-teal); }
.v6-comp-amber { background: var(--v6-caution); }
.v6-comp-score {
  width: 32px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--v6-text-primary);
}

/* --- Insight Bar --- */
.v6-insight-bar {
  background: var(--v6-glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--v6-glass-border);
  border-radius: var(--v6-radius, 14px);
  padding: 18px 22px;
  border-left: 3px solid var(--v6-gold);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--v6-text-secondary);
}
.v6-insight-bar strong {
  color: var(--v6-text-primary);
  font-weight: 600;
}

/* --- Engine Alerts --- */
.v6-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
}
/* .v6-filter-tab.active already defined above */
.v6-tab-count {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px;
}
.v6-filter-tab.active .v6-tab-count {
  background: rgba(212, 175, 55, 0.15);
  color: var(--v6-gold);
}

.v6-alert-card {
  background: var(--v6-glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--v6-glass-border);
  border-radius: var(--v6-radius, 14px);
  padding: 20px 24px 20px 28px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.v6-alert-border {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
.v6-alert-border-amber { background: var(--v6-caution); }
.v6-alert-border-red { background: var(--v6-negative); }
.v6-alert-border-teal { background: var(--v6-teal); }

.v6-alert-body { flex: 1; }
.v6-alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.v6-alert-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--v6-text-primary);
}
.v6-priority-pill {
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.v6-pill-high { background: rgba(239, 68, 68, 0.12); color: var(--v6-negative); }
.v6-pill-medium { background: rgba(245, 158, 11, 0.12); color: var(--v6-caution); }
.v6-pill-low { background: rgba(58, 122, 140, 0.12); color: var(--v6-teal); }

.v6-alert-desc {
  font-size: 13px;
  color: var(--v6-text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}
.v6-alert-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}
.v6-ack-btn {
  padding: 6px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--v6-glass-border);
  font-size: 12px;
  font-weight: 500;
  color: var(--v6-text-secondary);
  cursor: pointer;
  font-family: inherit;
}
.v6-ack-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--v6-text-muted);
}
.v6-alert-time {
  font-size: 11px;
  color: var(--v6-text-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* Acknowledged table */
.v6-ack-table {
  width: 100%;
  border-collapse: collapse;
}
.v6-ack-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--v6-text-muted);
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--v6-glass-border);
}
.v6-ack-table td {
  font-size: 13px;
  color: var(--v6-text-secondary);
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.v6-ack-table tr:last-child td { border-bottom: none; }
.v6-ack-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--v6-positive);
  font-size: 11px;
}
.v6-ack-name {
  font-weight: 500;
  color: var(--v6-text-primary);
}

/* --- Market Coaching --- */
.v6-context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.v6-context-row + .v6-context-row {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.v6-context-label {
  font-size: 13px;
  color: var(--v6-text-secondary);
}
.v6-context-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--v6-text-primary);
}
.v6-text-negative { color: var(--v6-negative); }

.v6-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}
.v6-check-item + .v6-check-item {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.v6-check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--v6-positive);
  font-size: 12px;
}
.v6-check-text {
  font-size: 13.5px;
  color: var(--v6-text-secondary);
  line-height: 1.5;
}

/* --- Light mode overrides for new components --- */
[data-theme="light"] .v6-component-item {
  border-bottom-color: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .v6-comp-bar-bg {
  background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .v6-alert-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--v6-glass-border);
}
[data-theme="light"] .v6-ack-table td {
  border-bottom-color: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .v6-context-row + .v6-context-row {
  border-top-color: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .v6-check-item + .v6-check-item {
  border-top-color: rgba(0, 0, 0, 0.04);
}

/* ── Batch 8: Profile, AI Memory, Risk, Documents, Notifications, Onboarding ── */

/* Profile fields */
.v6-profile-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--v6-text-primary); margin-bottom: 16px;
}
.v6-profile-icon {
  width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.v6-profile-icon--teal { background: rgba(58,122,140,0.20); color: var(--v6-teal); }
.v6-profile-icon--gold { background: rgba(212,175,55,0.18); color: var(--v6-gold); }
.v6-profile-icon--green { background: rgba(16,185,129,0.18); color: var(--v6-positive); }
.v6-profile-icon--purple { background: rgba(139,92,246,0.18); color: #8B5CF6; }

.v6-profile-field {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.v6-profile-field:last-child { border-bottom: none; }
.v6-field-label { font-size: 12.5px; color: var(--v6-text-muted); }
.v6-field-value { font-size: 13px; font-weight: 600; color: var(--v6-text-primary); text-align: right; }
.v6-field-value--empty { color: var(--v6-text-muted); font-weight: 400; font-style: italic; }

/* Missing fields card */
.v6-missing-card {
  background: rgba(245,158,11,0.05); border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--v6-radius, 14px); padding: 24px;
}
.v6-missing-list { list-style: none; padding: 0; margin: 0; }
.v6-missing-list li {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid rgba(245,158,11,0.08); font-size: 13px; color: var(--v6-text-secondary);
}
.v6-missing-list li:last-child { border-bottom: none; }
.v6-missing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--v6-caution); flex-shrink: 0; }

.v6-cta-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px;
  background: linear-gradient(135deg, var(--v6-gold), var(--v6-gold-light, #E5C76B));
  border: none; border-radius: 10px; font-size: 13px; font-weight: 600; color: #1A1A2E;
  cursor: pointer; font-family: inherit; margin-top: 16px; text-decoration: none;
}
.v6-cta-btn:hover { filter: brightness(1.08); }

/* Destructive button */
.v6-destructive-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.25); border-radius: 10px;
  font-size: 12px; font-weight: 600; color: var(--v6-negative); cursor: pointer; font-family: inherit;
}
.v6-destructive-btn:hover { background: rgba(239,68,68,0.20); }

/* Memory categories */
.v6-memory-cat-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.v6-memory-cat-label {
  font-size: 13px; font-weight: 700; color: var(--v6-text-primary);
  display: flex; align-items: center; gap: 8px;
}
.v6-memory-cat-count {
  font-size: 11px; font-weight: 600; color: var(--v6-text-muted);
  background: rgba(255,255,255,0.06); padding: 2px 8px; border-radius: 8px;
}
.v6-memory-cat-icon {
  width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.v6-memory-cat-icon--teal { background: rgba(58,122,140,0.20); color: var(--v6-teal); }
.v6-memory-cat-icon--gold { background: rgba(212,175,55,0.18); color: var(--v6-gold); }
.v6-memory-cat-icon--green { background: rgba(16,185,129,0.18); color: var(--v6-positive); }

.v6-memory-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.v6-memory-item:last-child { border-bottom: none; }
.v6-memory-text { font-size: 12.5px; color: var(--v6-text-secondary); line-height: 1.5; flex: 1; }
.v6-memory-delete {
  width: 20px; height: 20px; border-radius: 4px; border: none;
  background: rgba(255,255,255,0.04); color: var(--v6-text-muted);
  font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s ease;
}
.v6-memory-delete:hover { background: rgba(239,68,68,0.15); color: var(--v6-negative); }

/* Risk profile component bars */
.v6-comp-bar-group { margin-bottom: 16px; }
.v6-comp-bar-group:last-child { margin-bottom: 0; }
.v6-comp-bar-row { display: flex; align-items: center; gap: 12px; }
.v6-comp-bar-name { font-size: 13px; color: var(--v6-text-secondary); width: 110px; flex-shrink: 0; }
.v6-comp-bar-track { flex: 1; height: 10px; background: rgba(255,255,255,0.06); border-radius: 5px; overflow: hidden; }
.v6-comp-bar-fill { height: 100%; border-radius: 5px; transition: width 0.3s ease; }
.v6-comp-bar-val { font-size: 13px; font-weight: 700; color: var(--v6-text-primary); width: 36px; text-align: right; flex-shrink: 0; }

/* Allocation table */
.v6-alloc-table { width: 100%; border-collapse: collapse; }
.v6-alloc-table th {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--v6-text-muted); padding: 12px 14px; text-align: center;
  border-bottom: 1px solid var(--v6-glass-border);
}
.v6-alloc-table th:first-child { text-align: left; }
.v6-alloc-table td {
  font-size: 13px; color: var(--v6-text-secondary); padding: 12px 14px;
  text-align: center; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.v6-alloc-table td:first-child { text-align: left; font-weight: 500; }
.v6-alloc-table tr:last-child td { border-bottom: none; }
.v6-alloc-highlighted { background: rgba(212,175,55,0.06); }
.v6-alloc-highlighted td { color: var(--v6-text-primary); font-weight: 600; }
.v6-highlight-label {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: rgba(212,175,55,0.15); color: var(--v6-gold);
  font-size: 10px; font-weight: 700; margin-left: 6px;
}

.v6-btn-gold-outline {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px;
  background: transparent; border: 1px solid var(--v6-gold); border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--v6-gold); cursor: pointer;
  font-family: inherit; text-decoration: none;
}
.v6-btn-gold-outline:hover { background: rgba(212,175,55,0.08); }

/* Documents */
.v6-drop-zone {
  width: 100%; padding: 24px; border: 2px dashed rgba(176,190,197,0.2); border-radius: 12px;
  background: rgba(255,255,255,0.02); margin-bottom: 24px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  cursor: pointer; transition: border-color 0.2s;
}
.v6-drop-zone:hover { border-color: var(--v6-teal); }

.v6-doc-group { margin-bottom: 20px; }
.v6-doc-group:last-child { margin-bottom: 0; }
.v6-doc-group-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.v6-doc-group-icon { font-size: 16px; }
.v6-doc-group-title { font-size: 13px; font-weight: 600; color: var(--v6-text-primary); }
.v6-doc-group-count {
  font-size: 11px; color: var(--v6-text-muted); background: rgba(255,255,255,0.06);
  padding: 2px 8px; border-radius: 6px; font-weight: 600;
}

.v6-doc-table { width: 100%; border-collapse: collapse; }
.v6-doc-table td {
  font-size: 13px; color: var(--v6-text-secondary); padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.v6-doc-table tr:last-child td { border-bottom: none; }
.v6-doc-name { display: flex; align-items: center; gap: 10px; }
.v6-file-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.v6-file-icon--pdf { background: rgba(239,68,68,0.12); color: var(--v6-negative); }
.v6-file-icon--img { background: rgba(59,130,246,0.12); color: #3B82F6; }
.v6-file-icon--xls { background: rgba(16,185,129,0.12); color: var(--v6-positive); }
.v6-doc-file-name { font-weight: 500; color: var(--v6-text-primary); }
.v6-doc-size { color: var(--v6-text-muted); font-size: 12px; }
.v6-doc-date { color: var(--v6-text-muted); font-size: 12px; }
.v6-doc-actions { display: flex; gap: 6px; justify-content: flex-end; }
.v6-doc-action-btn {
  width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  color: var(--v6-text-muted); font-size: 12px; cursor: pointer; text-decoration: none;
}
.v6-doc-action-btn:hover { background: rgba(255,255,255,0.08); color: var(--v6-text-secondary); }
.v6-doc-action-btn--danger:hover { background: rgba(239,68,68,0.12); color: var(--v6-negative); }

/* Notifications */
.v6-notif-group-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--v6-text-muted); padding: 12px 0 8px;
}
.v6-notif-row {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03); cursor: pointer; transition: background 0.1s;
}
.v6-notif-row:last-child { border-bottom: none; }
.v6-notif-row--unread {
  background: rgba(58,122,140,0.04); margin: 0 -12px; padding: 14px 12px; border-radius: 8px;
}
.v6-notif-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.v6-notif-dot--green { background: var(--v6-positive); }
.v6-notif-dot--amber { background: var(--v6-caution); }
.v6-notif-dot--blue { background: #3B82F6; }
.v6-notif-dot--gold { background: var(--v6-gold); }
.v6-notif-dot--red { background: var(--v6-negative); }
.v6-notif-content { flex: 1; min-width: 0; }
.v6-notif-title { font-size: 13.5px; font-weight: 600; color: var(--v6-text-primary); margin-bottom: 3px; }
.v6-notif-desc { font-size: 12.5px; color: var(--v6-text-secondary); line-height: 1.5; }
.v6-notif-time { font-size: 11px; color: var(--v6-text-muted); flex-shrink: 0; white-space: nowrap; margin-top: 2px; }
.v6-notif-action-btn {
  padding: 4px 12px; border-radius: 6px; font-size: 11px; font-weight: 600;
  cursor: pointer; border: none; font-family: inherit; flex-shrink: 0; margin-top: 2px;
  background: rgba(58,122,140,0.15); color: var(--v6-teal);
}
.v6-notif-action-btn:hover { background: rgba(58,122,140,0.25); }
.v6-notif-link {
  font-size: 12px; font-weight: 600; color: var(--v6-teal); cursor: pointer; text-decoration: none;
}
.v6-notif-link:hover { text-decoration: underline; }

/* Onboarding */
.v6-onboarding-container {
  display: flex; align-items: stretch; gap: 0; width: 100%; min-height: 500px;
  background: var(--v6-glass-bg); backdrop-filter: blur(24px);
  border: 1px solid var(--v6-glass-border); border-radius: 24px; overflow: hidden;
}
.v6-ob-sidebar {
  width: 260px; background: rgba(0,0,0,0.15);
  border-right: 1px solid var(--v6-glass-border); padding: 40px 28px;
  display: flex; flex-direction: column;
}
.v6-ob-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 48px; }
.v6-ob-steps { display: flex; flex-direction: column; gap: 0; flex: 1; }
.v6-ob-step { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; }
.v6-ob-indicator { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.v6-ob-circle {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; border: 2px solid var(--v6-text-muted);
  color: var(--v6-text-muted); background: transparent;
}
.v6-ob-circle--done { background: var(--v6-positive); border-color: var(--v6-positive); color: #fff; }
.v6-ob-circle--active {
  background: linear-gradient(135deg, var(--v6-gold), var(--v6-gold-light, #E5C76B));
  border-color: var(--v6-gold); color: #1A1A2E;
}
.v6-ob-line { width: 2px; height: 32px; background: rgba(255,255,255,0.08); margin-top: 4px; }
.v6-ob-line--done { background: var(--v6-positive); }
.v6-ob-line--active { background: linear-gradient(to bottom, var(--v6-gold), rgba(255,255,255,0.08)); }
.v6-ob-step-content { padding-top: 3px; }
.v6-ob-step-title { font-size: 13px; font-weight: 600; color: var(--v6-text-muted); margin-bottom: 2px; }
.v6-ob-step-title--done { color: var(--v6-text-secondary); }
.v6-ob-step-title--active { color: var(--v6-gold); }
.v6-ob-step-desc { font-size: 11px; color: var(--v6-text-muted); line-height: 1.4; }

.v6-ob-main { flex: 1; padding: 48px 40px; display: flex; flex-direction: column; }
.v6-ob-dots { display: flex; align-items: center; gap: 6px; margin-bottom: 32px; }
.v6-ob-pdot { width: 10px; height: 10px; border-radius: 50%; }
.v6-ob-pdot--filled { background: var(--v6-gold); }
.v6-ob-pdot--empty { background: rgba(255,255,255,0.12); }
.v6-ob-progress-text { font-size: 12px; color: var(--v6-text-muted); margin-left: 8px; font-weight: 500; }

.v6-ob-checklist { display: flex; flex-direction: column; gap: 10px; }
.v6-ob-checklist-item { font-size: 14px; color: var(--v6-text-primary); display: flex; align-items: center; gap: 8px; }
.v6-ob-checklist-item--done { color: var(--v6-text-muted); }

.v6-ob-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.v6-ob-skip { font-size: 13px; color: var(--v6-text-muted); cursor: pointer; text-decoration: none; font-weight: 500; }
.v6-ob-skip:hover { color: var(--v6-text-secondary); }

/* Light mode overrides for Batch 8 */
[data-theme="light"] .v6-profile-field { border-bottom-color: rgba(0,0,0,0.04); }
[data-theme="light"] .v6-missing-card { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.15); }
[data-theme="light"] .v6-memory-item { border-bottom-color: rgba(0,0,0,0.04); }
[data-theme="light"] .v6-notif-row { border-bottom-color: rgba(0,0,0,0.04); }
[data-theme="light"] .v6-notif-row--unread { background: rgba(58,122,140,0.06); }
[data-theme="light"] .v6-doc-table td { border-bottom-color: rgba(0,0,0,0.04); }
[data-theme="light"] .v6-ob-sidebar { background: rgba(0,0,0,0.03); }
[data-theme="light"] .v6-drop-zone { border-color: rgba(0,0,0,0.12); background: rgba(0,0,0,0.01); }
[data-theme="light"] .v6-drop-zone:hover { border-color: var(--v6-teal); }

/* --------------------------------------------------------------------------
   CONTEXTUAL AI — Card Sparkle + Page Insight Popup
   -------------------------------------------------------------------------- */

/* Card Sparkle — button in top-right corner, panel expands BELOW the card */
.v6-sparkle-container { position: absolute; top: 8px; right: 8px; z-index: 2; }
/* Twin What-If Sparkle — teal wand button, offset left of regular sparkle */
.v6-twin-sparkle-container { position: absolute; top: 8px; right: 48px; z-index: 2; }
.v6-sparkle-btn {
  width: 32px; height: 32px; border: none;
  background: rgba(212,175,55,0.08);
  cursor: pointer; font-size: 14px; border-radius: 8px;
  opacity: 0.8; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  border: 1px solid rgba(212,175,55,0.2);
}
.v6-sparkle-btn:hover, .v6-sparkle-btn.active {
  opacity: 1; background: rgba(212,175,55,0.18);
  border-color: rgba(212,175,55,0.4);
}
/* Panel renders BELOW the card, not inside it */
.v6-sparkle-panel {
  margin-top: 8px; padding: 16px;
  background: var(--v6-glass-bg, rgba(42,60,78,0.95));
  border: 1px solid rgba(212,175,55,0.2);
  border-left: 3px solid var(--v6-gold);
  border-radius: var(--v6-radius, 12px);
  font-size: 13px;
  color: var(--v6-text-secondary); line-height: 1.6;
  text-align: left;
  backdrop-filter: blur(12px);
}
.v6-sparkle-panel ul { margin: 8px 0; padding-left: 16px; }
.v6-sparkle-panel li { margin-bottom: 4px; font-size: 12px; }
.v6-sparkle-panel .v6-sparkle-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.v6-sparkle-panel .v6-sparkle-actions button {
  font-size: 12px; font-weight: 600; color: var(--v6-gold);
  background: none; border: none; cursor: pointer; padding: 0;
}
.v6-sparkle-panel .v6-sparkle-actions button:hover { text-decoration: underline; }
.v6-sparkle-error {
  color: var(--v6-caution); font-size: 12px; cursor: pointer;
}
.v6-sparkle-error:hover { text-decoration: underline; }
.v6-sparkle-loading { display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.v6-spinner-small {
  width: 18px; height: 18px;
  border: 2px solid rgba(212,175,55,0.2);
  border-top-color: var(--v6-gold);
  border-radius: 50%;
  animation: v6-spin-small 0.6s linear infinite;
}
@keyframes v6-spin-small { to { transform: rotate(360deg); } }

/* Page Insight Popup */
.v6-page-insight-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  animation: v6-fade-in 0.15s ease-out;
}
@keyframes v6-fade-in { from { opacity: 0; } to { opacity: 1; } }

.v6-page-insight-popup {
  background: var(--v6-surface-base, #1A252F);
  border-radius: 20px; width: 90%; max-width: 600px; max-height: 75vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: v6-popup-in 0.2s ease-out;
}
@keyframes v6-popup-in { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.v6-page-insight-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--v6-glass-border);
  font-size: 17px; font-weight: 700;
  color: var(--v6-text-primary);
}
.v6-page-insight-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--v6-glass-bg); border: none;
  color: var(--v6-text-secondary); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.v6-page-insight-close:hover { background: var(--v6-hover); }

.v6-page-insight-body {
  flex: 1; overflow-y: auto; padding: 20px;
  font-size: 14px; color: var(--v6-text-secondary); line-height: 1.6;
}
.v6-page-insight-body h4 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--v6-text-muted); letter-spacing: 1px; margin: 16px 0 8px;
}
.v6-page-insight-body h4:first-child { margin-top: 0; }
.v6-page-insight-body ul { padding-left: 16px; margin: 0; }
.v6-page-insight-body li { margin-bottom: 6px; }
.v6-page-insight-body p { margin: 0 0 12px; }

/* Follow-up chat messages within popup */
.v6-page-insight-msg { padding: 8px 12px; border-radius: 10px; margin-top: 12px; max-width: 85%; font-size: 13px; }
.v6-page-insight-msg--user {
  background: rgba(58,122,140,0.15); color: var(--v6-text-primary);
  margin-left: auto; text-align: right;
}
.v6-page-insight-msg--ai {
  background: rgba(212,175,55,0.06); color: var(--v6-text-secondary);
}

.v6-page-insight-footer {
  display: flex; gap: 10px; padding: 10px 16px;
  border-top: 1px solid var(--v6-glass-border);
}
.v6-page-insight-footer input {
  flex: 1; padding: 8px 12px; font-size: 14px;
  background: var(--v6-glass-bg); border: 1px solid var(--v6-glass-border);
  border-radius: 8px; color: var(--v6-text-primary);
  font-family: var(--v6-font); outline: none;
  transition: border-color 0.15s;
}
.v6-page-insight-footer input:focus { border-color: var(--v6-gold); }
.v6-page-insight-footer input::placeholder { color: var(--v6-text-muted); }
.v6-page-insight-footer button {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--v6-gold); color: var(--v6-text-on-primary, #1A252F);
  border: none; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.15s;
}
.v6-page-insight-footer button:hover { opacity: 0.85; }

/* Light mode overrides for Contextual AI */
[data-theme="light"] .v6-sparkle-panel { background: rgba(212,175,55,0.04); border-color: rgba(212,175,55,0.15); }
[data-theme="light"] .v6-page-insight-popup { background: var(--v6-card, #fff); }
[data-theme="light"] .v6-page-insight-msg--user { background: rgba(58,122,140,0.08); }

/* --------------------------------------------------------------------------
   Transaction Entry — form inputs, search dropdown, category grid
   -------------------------------------------------------------------------- */
.v6-entry-input {
  width: 100%; padding: 10px 14px; font-size: 14px;
  background: var(--v6-glass-bg); border: 1px solid var(--v6-glass-border);
  border-radius: var(--v6-radius-md); color: var(--v6-text-primary);
  outline: none; font-family: inherit;
  transition: border-color 0.2s; box-sizing: border-box;
}
.v6-entry-input:focus { border-color: var(--v6-gold); }
.v6-entry-input::placeholder { color: var(--v6-text-muted); }
select.v6-entry-input { appearance: auto; }

.v6-search-dropdown {
  position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 20;
  background: var(--v6-elevated, #1A252F); border: 1px solid var(--v6-glass-border);
  border-radius: var(--v6-radius-md); max-height: 250px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.v6-search-item {
  padding: 10px 14px; font-size: 13px; cursor: pointer;
  color: var(--v6-text-secondary); border-bottom: 1px solid var(--v6-glass-border);
}
.v6-search-item:hover { background: rgba(212,175,55,0.08); color: var(--v6-text-primary); }
.v6-search-item:last-child { border-bottom: none; }

.v6-grid-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--v6-gap);
}
@media (max-width: 900px) { .v6-grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .v6-grid-4 { grid-template-columns: repeat(2, 1fr); } }
[data-theme="light"] .v6-page-insight-msg--ai { background: rgba(212,175,55,0.04); }

/* Journey Bot typing animation */
@keyframes v6-pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
