/* ============================================
   VISUAL POLISH - Premium Design Effects
   ============================================ */

/* ============================================
   EMBOSSED TEXT EFFECTS
   ============================================ */

/* Embossed White Text (for gold cards) */
.text-embossed {
  text-shadow: 
    1px 1px 0 rgba(0, 0, 0, 0.4),
    -1px -1px 0 rgba(255, 255, 255, 0.7);
  color: rgba(255, 255, 255, 0.95);
}

.text-embossed-subtle {
  text-shadow: 
    0.5px 0.5px 0 rgba(0, 0, 0, 0.3),
    -0.5px -0.5px 0 rgba(255, 255, 255, 0.6);
  color: rgba(255, 255, 255, 0.95);
}

/* Embossed Dark Text (for light backgrounds) */
.text-embossed-dark {
  text-shadow: 
    1px 1px 0 rgba(255, 255, 255, 0.5),
    -1px -1px 0 rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.85);
}

/* ============================================
   MULTICOLORED GRADIENTS
   ============================================ */

/* 8-Color Gradient Border */
.border-multicolor {
  position: relative;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.border-multicolor::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: var(--gradient-multicolor-8);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Animated Rotating Gradient Border */
.border-multicolor-animated {
  position: relative;
}

.border-multicolor-animated::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--gradient-multicolor-rotating);
  animation: rotateGradient 3s linear infinite;
  pointer-events: none;
}

.border-multicolor-animated::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
  pointer-events: none;
}

@keyframes rotateGradient {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Gradient Text */
.text-gradient-multicolor {
  background: var(--gradient-multicolor-8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ============================================
   GOLD CARDS
   ============================================ */

/* Premium Gold Card Background */
.card-gold {
  background: var(--gradient-gold-premium);
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

/* Gold Card Shimmer Overlay */
.card-gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transform: translateX(-100%);
  animation: goldShimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes goldShimmer {
  0%, 100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

/* Gold Text */
.text-gold {
  color: #FFD700;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 0 8px rgba(255, 215, 0, 0.5);
}

/* ============================================
   HOLOGRAPHIC EFFECTS
   ============================================ */

/* Holographic Border */
.border-holographic {
  position: relative;
  border: 1px solid transparent;
}

.border-holographic::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-holographic);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.2;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.border-holographic:hover::before,
.border-holographic.active::before {
  opacity: 0.6;
}

/* Holographic Shimmer Effect */
.holographic-shimmer {
  position: relative;
  overflow: hidden;
}

.holographic-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-shimmer-sweep);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.holographic-shimmer:hover::after,
.holographic-shimmer.active::after {
  opacity: 1;
  animation: shimmerSweep 1.5s ease-in-out;
}

/* ============================================
   NEON EFFECTS
   ============================================ */

/* Neon Pink Glow */
.glow-neon {
  box-shadow: 
    0 0 10px var(--neon-pink-glow),
    0 0 20px rgba(255, 51, 204, 0.2);
}

.glow-neon-intense {
  box-shadow: 
    0 0 20px var(--neon-pink-glow),
    0 0 40px rgba(255, 51, 204, 0.3),
    0 0 60px rgba(255, 51, 204, 0.2);
}

/* Neon Text */
.text-neon {
  color: var(--neon-pink);
  text-shadow: 
    0 0 10px var(--neon-pink-glow),
    0 0 20px rgba(255, 51, 204, 0.3);
}

/* Pulsing Neon Glow */
.glow-neon-pulse {
  animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 
      0 0 10px var(--neon-pink-glow),
      0 0 20px rgba(255, 51, 204, 0.2);
  }
  50% {
    box-shadow: 
      0 0 20px var(--neon-pink-glow),
      0 0 40px rgba(255, 51, 204, 0.4),
      0 0 60px rgba(255, 51, 204, 0.3);
  }
}

/* ============================================
   PEARL & CHAMPAGNE EFFECTS
   ============================================ */

/* Pearl White Background */
.bg-pearl {
  background-color: var(--pearl-white);
}

.bg-champagne {
  background-color: var(--champagne);
}

.bg-champagne-light {
  background-color: var(--champagne-light);
}

/* Pearl Shimmer */
.pearl-shimmer {
  position: relative;
  background: linear-gradient(
    135deg,
    var(--pearl-white) 0%,
    var(--champagne-light) 50%,
    var(--pearl-white) 100%
  );
  background-size: 200% 200%;
  animation: pearlShimmer 4s ease-in-out infinite;
}

@keyframes pearlShimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ============================================
   GLASSMORPHISM
   ============================================ */

/* Glass Card Effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Frosted Glass */
.glass-frosted {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ============================================
   PREMIUM SHADOWS
   ============================================ */

/* Layered Shadows for Depth */
.shadow-layered {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.03);
}

.shadow-layered-intense {
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 16px 32px rgba(0, 0, 0, 0.04);
}

/* Colored Shadows */
.shadow-primary {
  box-shadow: 
    0 4px 12px rgba(87, 204, 234, 0.2),
    0 8px 24px rgba(87, 204, 234, 0.15);
}

.shadow-gold {
  box-shadow: var(--shadow-gold);
}

.shadow-neon {
  box-shadow: var(--shadow-neon);
}

/* ============================================
   SPARKLE EFFECTS
   ============================================ */

/* Sparkle Container */
.sparkles {
  position: relative;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--brokerly-text-primary);
  border-radius: 50%;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.sparkle:nth-child(1) { animation-delay: 0s; top: 20%; left: 20%; }
.sparkle:nth-child(2) { animation-delay: 0.3s; top: 40%; left: 80%; }
.sparkle:nth-child(3) { animation-delay: 0.6s; top: 70%; left: 40%; }
.sparkle:nth-child(4) { animation-delay: 0.9s; top: 80%; left: 70%; }

/* ============================================
   GRADIENT OVERLAYS
   ============================================ */

/* Gradient Overlay (for images/cards) */
.gradient-overlay {
  position: relative;
}

.gradient-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
  border-radius: inherit;
}

/* Radial Gradient Overlay */
.gradient-overlay-radial {
  position: relative;
}

.gradient-overlay-radial::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
  border-radius: inherit;
}

/* ============================================
   METALLIC EFFECTS
   ============================================ */

/* Metallic Shine */
.metallic-shine {
  position: relative;
  overflow: hidden;
}

.metallic-shine::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  animation: metallicShine 3s ease-in-out infinite;
}

@keyframes metallicShine {
  0%, 100% {
    transform: translateX(-100%) rotate(45deg);
  }
  50% {
    transform: translateX(100%) rotate(45deg);
  }
}

/* ============================================
   PREMIUM UTILITY CLASSES
   ============================================ */

/* Modern Elevation System */
.elevation-0 { box-shadow: none; }
.elevation-1 { box-shadow: var(--shadow-card-subtle); }
.elevation-2 { box-shadow: var(--shadow-card-moderate); }
.elevation-3 { box-shadow: var(--shadow-card-intense); }

/* Smooth Transitions */
.smooth-all {
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.smooth-transform {
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.smooth-shadow {
  transition: box-shadow 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* GPU Acceleration Hints */
.gpu-boost {
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* ============================================
   ELEGANT UNIFIED FILTER DROPDOWN
   ============================================ */

/* Base container */
.elegant-filter-dropdown-container {
  position: relative;
  display: inline-block;
}

.elegant-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.elegant-filter-toggle .dropdown-chevron {
  transition: transform 0.2s ease;
  font-size: 10px;
  opacity: 0.7;
  margin-left: 4px;
  display: inline-block;
}

/* Light mode Toggle Button styles */
html:not([data-theme="dark"]) .elegant-filter-toggle {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #1c1c1e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
html:not([data-theme="dark"]) .elegant-filter-toggle:hover {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.2);
}

/* Dark mode Toggle Button styles */
html[data-theme="dark"] .elegant-filter-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
html[data-theme="dark"] .elegant-filter-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Panel transitions */
@keyframes slideDownFilter {
  from {
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.elegant-filter-dropdown {
  position: fixed;
  z-index: 10001;
  width: 280px;
  border-radius: 18px;
  padding: 16px;
  max-width: 90vw;
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform-origin: top center;
  animation: slideDownFilterFixed 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownFilterFixed {
  from { opacity: 0; transform: scale(0.95) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Scrollbar inside dropdown */
.elegant-filter-dropdown::-webkit-scrollbar {
  width: 5px;
}
.elegant-filter-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.elegant-filter-dropdown::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.3);
  border-radius: 3px;
}

/* Fullscreen backdrop — blocks page scroll/interaction behind the dropdown */
.filter-dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: transparent;
}

/* Light mode panel style */
html:not([data-theme="dark"]) .elegant-filter-dropdown {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Dark mode panel style */
html[data-theme="dark"] .elegant-filter-dropdown {
  background: rgba(30, 30, 40, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Grid & Section title layout */
.preset-filters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.filter-dropdown-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  text-align: left;
}

html:not([data-theme="dark"]) .filter-dropdown-section-title {
  color: #6e6e73;
}
html[data-theme="dark"] .filter-dropdown-section-title {
  color: rgba(255, 255, 255, 0.5);
}

/* Preset buttons style */
.preset-btn {
  padding: 10px;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme preset buttons */
html:not([data-theme="dark"]) .preset-btn {
  background: rgba(0, 0, 0, 0.05);
  color: #1c1c1e;
}
html:not([data-theme="dark"]) .preset-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}
html:not([data-theme="dark"]) .preset-btn.active {
  background: var(--brokerly-primary);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 122, 255, 0.2);
}

/* Dark theme preset buttons */
html[data-theme="dark"] .preset-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
html[data-theme="dark"] .preset-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
html[data-theme="dark"] .preset-btn.active {
  background: var(--brokerly-primary);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Divider inside panel */
.filter-dropdown-divider {
  height: 1px;
  margin: 12px 0;
}
html:not([data-theme="dark"]) .filter-dropdown-divider {
  background: rgba(0, 0, 0, 0.08);
}
html[data-theme="dark"] .filter-dropdown-divider {
  background: rgba(255, 255, 255, 0.1);
}

/* Labels for custom picker */
.custom-range-label {
  font-size: 13px;
  font-weight: 500;
}
html:not([data-theme="dark"]) .custom-range-label {
  color: #3a3a3c;
}
html[data-theme="dark"] .custom-range-label {
  color: rgba(255, 255, 255, 0.7);
}

/* Custom styles for date inputs inside glass dropdown panel */
.money-date-input {
  width: 190px;
  border-radius: 10px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

html:not([data-theme="dark"]) .money-date-input {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #1c1c1e;
}
html:not([data-theme="dark"]) .money-date-input:focus {
  border-color: var(--brokerly-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

html[data-theme="dark"] .money-date-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
html[data-theme="dark"] .money-date-input:focus {
  border-color: var(--brokerly-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
}

/* Apply Custom Range button style */
.apply-date-btn {
  width: 100%;
  margin-top: 6px;
  background: linear-gradient(135deg, #007AFF 0%, #00E5FF 100%);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

.apply-date-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.35);
}

.apply-date-btn:active {
  transform: translateY(0);
}


/* ─── Multi-select Filter Panel ─────────────────────────────────────── */

/* Make multi-select panels taller and non-scrolling at the panel level
   (the items list inside scrolls instead) */
.mf-multiselect-panel {
  padding: 0;
  overflow: visible; /* panel itself doesn't scroll */
  width: 300px;
}

/* Panel header: title + clear button */
.mf-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.mf-clear-btn {
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.01em;
}
html:not([data-theme="dark"]) .mf-clear-btn {
  color: var(--brokerly-primary, #007AFF);
}
html:not([data-theme="dark"]) .mf-clear-btn:hover {
  background: rgba(0, 122, 255, 0.08);
}
html[data-theme="dark"] .mf-clear-btn {
  color: var(--brokerly-primary, #3399FF);
}
html[data-theme="dark"] .mf-clear-btn:hover {
  background: rgba(51, 153, 255, 0.12);
}

/* Search input wrapper */
.mf-search-wrapper {
  position: relative;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.08);
}

.mf-search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  opacity: 0.4;
  pointer-events: none;
}

.mf-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px 8px 34px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  outline: none;
  transition: background 0.15s;
}
html:not([data-theme="dark"]) .mf-search-input {
  background: rgba(0, 0, 0, 0.05);
  color: #1c1c1e;
}
html:not([data-theme="dark"]) .mf-search-input::placeholder { color: rgba(0,0,0,0.35); }
html:not([data-theme="dark"]) .mf-search-input:focus { background: rgba(0, 0, 0, 0.08); }
html[data-theme="dark"] .mf-search-input {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
html[data-theme="dark"] .mf-search-input::placeholder { color: rgba(255,255,255,0.35); }
html[data-theme="dark"] .mf-search-input:focus { background: rgba(255, 255, 255, 0.12); }

/* Scrollable item list */
.mf-items-list {
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 8px;
}
.mf-items-list::-webkit-scrollbar { width: 4px; }
.mf-items-list::-webkit-scrollbar-track { background: transparent; }
.mf-items-list::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.25); border-radius: 3px; }

/* Each item row (acts like a checkbox) */
.mf-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
html:not([data-theme="dark"]) .mf-item { color: #1c1c1e; }
html:not([data-theme="dark"]) .mf-item:hover { background: rgba(0,0,0,0.04); }
html[data-theme="dark"] .mf-item { color: #fff; }
html[data-theme="dark"] .mf-item:hover { background: rgba(255,255,255,0.06); }

/* Custom checkbox */
.mf-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid rgba(128,128,128,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.mf-item.selected .mf-checkbox {
  background: var(--brokerly-primary, #007AFF);
  border-color: var(--brokerly-primary, #007AFF);
}
.mf-item.selected .mf-checkbox::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.mf-item-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty-state message when search finds nothing */
.mf-no-results {
  font-size: 13px;
  text-align: center;
  padding: 16px 0;
  opacity: 0.45;
}

/* ─── Active Filter Chips Row ────────────────────────────────────────── */

.mf-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
  animation: mfChipsIn 0.18s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes mfChipsIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Individual chip pill */
.mf-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  white-space: nowrap;
}
html:not([data-theme="dark"]) .mf-chip {
  background: rgba(0, 122, 255, 0.1);
  color: var(--brokerly-primary, #007AFF);
}
html:not([data-theme="dark"]) .mf-chip:hover { background: rgba(0,122,255,0.18); }
html[data-theme="dark"] .mf-chip {
  background: rgba(51,153,255,0.15);
  color: #5aadff;
}
html[data-theme="dark"] .mf-chip:hover { background: rgba(51,153,255,0.25); }
.mf-chip:active { transform: scale(0.95); }

/* The × remove icon in a chip */
.mf-chip-remove {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Exclude Outlier Spikes Toggle Styles */
#money-exclude-outliers-btn .switch-btn-inline,
#overview-exclude-outliers-btn .switch-btn-inline {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  transition: background-color 0.25s ease;
}

html:not([data-theme="dark"]) #money-exclude-outliers-btn .switch-btn-inline,
html:not([data-theme="dark"]) #overview-exclude-outliers-btn .switch-btn-inline {
  background-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] #money-exclude-outliers-btn .switch-btn-inline,
html[data-theme="dark"] #overview-exclude-outliers-btn .switch-btn-inline {
  background-color: rgba(255, 255, 255, 0.15);
}

#money-exclude-outliers-btn.active .switch-btn-inline,
#overview-exclude-outliers-btn.active .switch-btn-inline {
  background-color: #FF3B30 !important;
}

/* Ensure the button text color remains readable when active (no white-on-white) */
html:not([data-theme="dark"]) #money-exclude-outliers-btn.active,
html:not([data-theme="dark"]) #overview-exclude-outliers-btn.active {
  background: #ffffff !important;
  color: #1c1c1e !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}
html:not([data-theme="dark"]) #money-exclude-outliers-btn.active span,
html:not([data-theme="dark"]) #overview-exclude-outliers-btn.active span {
  color: #1c1c1e !important;
}
html:not([data-theme="dark"]) #money-exclude-outliers-btn.active i,
html:not([data-theme="dark"]) #money-exclude-outliers-btn.active svg,
html:not([data-theme="dark"]) #overview-exclude-outliers-btn.active i,
html:not([data-theme="dark"]) #overview-exclude-outliers-btn.active svg {
  color: #1c1c1e !important;
}
html:not([data-theme="dark"]) #money-exclude-outliers-btn.active:hover,
html:not([data-theme="dark"]) #overview-exclude-outliers-btn.active:hover {
  background: #f5f5f7 !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
}
html[data-theme="dark"] #money-exclude-outliers-btn.active,
html[data-theme="dark"] #overview-exclude-outliers-btn.active {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] #money-exclude-outliers-btn.active span,
html[data-theme="dark"] #overview-exclude-outliers-btn.active span {
  color: #ffffff !important;
}
html[data-theme="dark"] #money-exclude-outliers-btn.active i,
html[data-theme="dark"] #money-exclude-outliers-btn.active svg,
html[data-theme="dark"] #overview-exclude-outliers-btn.active i,
html[data-theme="dark"] #overview-exclude-outliers-btn.active svg {
  color: #ffffff !important;
}
html[data-theme="dark"] #money-exclude-outliers-btn.active:hover,
html[data-theme="dark"] #overview-exclude-outliers-btn.active:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

#money-exclude-outliers-btn .switch-thumb-inline,
#overview-exclude-outliers-btn .switch-thumb-inline {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  display: block;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateX(0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#money-exclude-outliers-btn.active .switch-thumb-inline,
#overview-exclude-outliers-btn.active .switch-thumb-inline {
  transform: translateX(14px);
}

/* Assistant Signature Banners */
.assistant-signature-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin: 10px 24px 20px 24px;
  transition: all 0.2s ease;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--brokerly-text-primary);
}

.assistant-signature-banner:hover {
  transform: translateY(-1px);
}

.assistant-signature-banner.clive-banner {
  background: var(--clive-light);
  border: 1.5px solid var(--clive-primary);
  box-shadow: 0 4px 12px rgba(var(--clive-primary-rgb), 0.05);
}

.assistant-signature-banner.clara-banner {
  background: var(--clara-light);
  border: 1.5px solid var(--clara-primary);
  box-shadow: 0 4px 12px rgba(var(--clara-primary-rgb), 0.05);
}

.banner-avatar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  object-fit: cover;
}

.clive-banner .banner-avatar {
  border: 1.5px solid var(--clive-primary);
}

.clara-banner .banner-avatar {
  border: 1.5px solid var(--clara-primary);
}

.avatar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.clive-dot {
  background-color: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  animation: pulse-clive-white 2.5s infinite;
}

.clara-dot {
  background-color: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  animation: pulse-clara-white 2.5s infinite;
}

.banner-text {
  line-height: 1.4;
  color: var(--brokerly-text-primary);
  opacity: 0.95;
}

.clive-banner .banner-text strong {
  font-weight: 700;
  color: var(--clive-primary);
}

.clara-banner .banner-text strong {
  font-weight: 700;
  color: var(--clara-secondary);
}

[data-theme="dark"] .clara-banner .banner-text strong,
.dark-mode .clara-banner .banner-text strong {
  color: var(--clara-primary);
}

@keyframes pulse-clive-white {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes pulse-clara-white {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* Adjust banner margins inside budgets and goals sheets */
#budgets-view-sheet .assistant-signature-banner,
#goals-view-sheet .assistant-signature-banner {
  margin: 10px 20px 15px 20px;
}

/* Premium fading border card style for consumer-friendly feel */
.spending-trend-card-fade {
  border-radius: 16px;
  padding: 14px 16px 10px;
  margin-top: 12px;
  margin-bottom: 20px;
  position: relative;
  border: 1px solid transparent;
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

/* Light mode styling */
html:not([data-theme="dark"]) .spending-trend-card-fade {
  background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
              linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%) border-box;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.02), 0 20px 40px -15px rgba(59, 130, 246, 0.05);
}

/* Dark mode styling */
html[data-theme="dark"] .spending-trend-card-fade {
  background: linear-gradient(#141419, #141419) padding-box,
              linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%) border-box;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.3), 0 20px 40px -15px rgba(59, 130, 246, 0.12);
}

/* --- Universal fading border and soft shadow overrides for widgets and charts --- */

/* 1. Priority Mini Cards (Overview Page) */
.priority-mini-card {
  border: 1px solid transparent !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html:not([data-theme="dark"]) .priority-mini-card {
  background: linear-gradient(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.65)) padding-box,
              linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.02), 0 20px 40px -15px rgba(59, 130, 246, 0.04) !important;
}

html[data-theme="dark"] .priority-mini-card {
  background: linear-gradient(rgba(20, 20, 25, 0.75), rgba(20, 20, 25, 0.75)) padding-box,
              linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.25), 0 20px 40px -15px rgba(59, 130, 246, 0.08) !important;
}

/* Maintain thick left accent color but fade top/right/bottom */
.priority-mini-card.urgent,
.priority-mini-card.high {
  border-left: 4px solid var(--theme-urgent-text, #E66152) !important;
}
.priority-mini-card.medium {
  border-left: 4px solid var(--theme-medium-text, #3DB063) !important;
}
.priority-mini-card.low {
  border-left: 4px solid var(--theme-low-text, #0099D8) !important;
}

/* Hover overrides for priorities */
html:not([data-theme="dark"]) .priority-mini-card:hover {
  transform: translateY(-3px) scale(1.01) !important;
  background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)) padding-box,
              linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 15px 35px -8px rgba(0, 0, 0, 0.04), 0 20px 40px -10px rgba(59, 130, 246, 0.1) !important;
}

html[data-theme="dark"] .priority-mini-card:hover {
  transform: translateY(-3px) scale(1.01) !important;
  background: linear-gradient(rgba(28, 28, 35, 0.85), rgba(28, 28, 35, 0.85)) padding-box,
              linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 18px 40px -5px rgba(0, 0, 0, 0.35), 0 20px 40px -10px rgba(59, 130, 246, 0.15) !important;
}


/* 2. Budget List Items (Overview Page) */
.budget-list-item {
  border: 1px solid transparent !important;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html:not([data-theme="dark"]) .budget-list-item {
  background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
              linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01), 0 10px 20px -10px rgba(59, 130, 246, 0.02) !important;
}

html[data-theme="dark"] .budget-list-item {
  background: linear-gradient(#141419, #141419) padding-box,
              linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
}

/* Category-colored glowing hover effects */
html:not([data-theme="dark"]) .budget-list-item:hover {
  transform: translateY(-2px) scale(1.01) !important;
  background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
              linear-gradient(135deg, var(--row-accent-color, rgba(59, 130, 246, 0.25)) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.03), 0 8px 20px var(--row-accent-color-glow, rgba(59, 130, 246, 0.06)) !important;
}

html[data-theme="dark"] .budget-list-item:hover {
  transform: translateY(-2px) scale(1.01) !important;
  background: linear-gradient(#1c1c24, #1c1c24) padding-box,
              linear-gradient(135deg, var(--row-accent-color, rgba(255, 255, 255, 0.15)) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35), 0 8px 25px var(--row-accent-color-glow, rgba(59, 130, 246, 0.12)) !important;
}


/* 3. Dashboard Goal Cards (Overview Page) */
.dashboard-goal-card {
  border: 1px solid transparent !important;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html:not([data-theme="dark"]) .dashboard-goal-card {
  background: linear-gradient(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.65)) padding-box,
              linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01), 0 10px 20px -10px rgba(59, 130, 246, 0.02) !important;
}

html[data-theme="dark"] .dashboard-goal-card {
  background: linear-gradient(rgba(20, 20, 25, 0.75), rgba(20, 20, 25, 0.75)) padding-box,
              linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
}

/* Category-colored glowing hover effects for goals */
html:not([data-theme="dark"]) .dashboard-goal-card:hover {
  transform: translateY(-2px) scale(1.01) !important;
  background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)) padding-box,
              linear-gradient(135deg, var(--row-accent-color, rgba(139, 92, 246, 0.25)) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.03), 0 8px 20px var(--row-accent-color-glow, rgba(139, 92, 246, 0.06)) !important;
}

html[data-theme="dark"] .dashboard-goal-card:hover {
  transform: translateY(-2px) scale(1.01) !important;
  background: linear-gradient(rgba(28, 28, 36, 0.85), rgba(28, 28, 36, 0.85)) padding-box,
              linear-gradient(135deg, var(--row-accent-color, rgba(255, 255, 255, 0.15)) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35), 0 8px 25px var(--row-accent-color-glow, rgba(139, 92, 246, 0.12)) !important;
}


/* 4. Spending Pulse and Cash Flow Cards (Money Page) */
.spend-pulse-card,
.cash-flow-card {
  border: none !important;
  transition: all 0.25s ease !important;
}

html:not([data-theme="dark"]) .spend-pulse-card,
html:not([data-theme="dark"]) .cash-flow-card {
  background: #FFFFFF !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.02), 0 20px 40px -15px rgba(59, 130, 246, 0.04) !important;
}

html[data-theme="dark"] .spend-pulse-card,
html[data-theme="dark"] .cash-flow-card {
  background: #141419 !important;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.3), 0 20px 40px -15px rgba(59, 130, 246, 0.1) !important;
}

/* 4b. AI Chart Containers (Deep Dive Drawer / Chat) */
.ai-chart-container {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

/* Hover effects for charts */
html:not([data-theme="dark"]) .spend-pulse-card:hover,
html:not([data-theme="dark"]) .cash-flow-card:hover {
  box-shadow: 0 15px 35px -8px rgba(0, 0, 0, 0.04), 0 20px 40px -10px rgba(59, 130, 246, 0.08) !important;
}

html[data-theme="dark"] .spend-pulse-card:hover,
html[data-theme="dark"] .cash-flow-card:hover {
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.35), 0 20px 40px -10px rgba(59, 130, 246, 0.15) !important;
}


/* 5. Money Section Containers (Money Page Tables and Breakdown Lists) */
.money-section {
  border: 1px solid transparent !important;
  transition: all 0.25s ease !important;
}

html:not([data-theme="dark"]) .money-section {
  background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
              linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.02), 0 20px 40px -15px rgba(59, 130, 246, 0.04) !important;
}

html[data-theme="dark"] .money-section {
  background: linear-gradient(#141419, #141419) padding-box,
              linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.3), 0 20px 40px -15px rgba(59, 130, 246, 0.1) !important;
}

/* 6. Overrides for Premium Table (Vendor detail view) to make it consumer friendly */
/* 6. Overrides for Premium Table (Vendor detail view) to make it consumer friendly */
.premium-table-container {
  border: 1px solid transparent !important;
  border-radius: 16px !important;
  transition: all 0.25s ease !important;
  overflow: hidden !important;
}

html:not([data-theme="dark"]) .premium-table-container {
  background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
              linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.015), 0 20px 40px -15px rgba(59, 130, 246, 0.03) !important;
}

html[data-theme="dark"] .premium-table-container {
  background: linear-gradient(#141419, #141419) padding-box,
              linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.25), 0 20px 40px -15px rgba(59, 130, 246, 0.08) !important;
}

.premium-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

.premium-table th {
  background: rgba(128, 128, 128, 0.01) !important;
  border-bottom: 1px solid rgba(128, 128, 128, 0.04) !important;
  color: var(--brokerly-text-secondary) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 14px 18px !important;
}

.premium-table td {
  border-bottom: 1px solid rgba(128, 128, 128, 0.03) !important;
  color: var(--brokerly-text-primary) !important;
  padding: 14px 18px !important;
  font-size: 13.5px !important;
  transition: all 0.2s ease !important;
}

.premium-table tr:last-child td {
  border-bottom: none !important;
}

.premium-table tr {
  transition: all 0.2s ease !important;
}

html:not([data-theme="dark"]) .premium-table tr:hover td {
  background: rgba(128, 128, 128, 0.02) !important;
}

html[data-theme="dark"] .premium-table tr:hover td {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* 7. Glassmorphic Floating Cards for Expense & Transaction Rows (Money Details) */
.table-rows-container {
  overflow-x: hidden;
}

.spend-analysis-wrapper-card .expense-row,
.spend-analysis-wrapper-card .transaction-row {
  border: 1px solid transparent !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
}

html:not([data-theme="dark"]) .spend-analysis-wrapper-card .expense-row,
html:not([data-theme="dark"]) .spend-analysis-wrapper-card .transaction-row {
  background: linear-gradient(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.65)) padding-box,
              linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01), 0 2px 4px rgba(0, 0, 0, 0.005) !important;
}

html[data-theme="dark"] .spend-analysis-wrapper-card .expense-row,
html[data-theme="dark"] .spend-analysis-wrapper-card .transaction-row {
  background: linear-gradient(rgba(20, 20, 25, 0.65), rgba(20, 20, 25, 0.65)) padding-box,
              linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15) !important;
}

/* Hover effects: interactive floating feedback */
html:not([data-theme="dark"]) .spend-analysis-wrapper-card .expense-row:hover,
html:not([data-theme="dark"]) .spend-analysis-wrapper-card .transaction-row:hover {
  transform: translateY(-2px) scale(1.008) !important;
  background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)) padding-box,
              linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03), 0 4px 10px rgba(59, 130, 246, 0.04) !important;
}

html[data-theme="dark"] .spend-analysis-wrapper-card .expense-row:hover,
html[data-theme="dark"] .spend-analysis-wrapper-card .transaction-row:hover {
  transform: translateY(-2px) scale(1.008) !important;
  background: linear-gradient(rgba(28, 28, 35, 0.85), rgba(28, 28, 35, 0.85)) padding-box,
              linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(59, 130, 246, 0.1) !important;
}

/* Ensure high contrast legibility for text inside money section breakdown lists in dark mode */
html[data-theme="dark"] .spend-analysis-wrapper-card .expense-row .vendor-name,
html[data-theme="dark"] .spend-analysis-wrapper-card .expense-row .col-category,
html[data-theme="dark"] .spend-analysis-wrapper-card .expense-row .col-spend,
html[data-theme="dark"] .spend-analysis-wrapper-card .transaction-row .transaction-vendor,
html[data-theme="dark"] .spend-analysis-wrapper-card .transaction-row .transaction-amount,
.dark-mode .spend-analysis-wrapper-card .expense-row .vendor-name,
.dark-mode .spend-analysis-wrapper-card .expense-row .col-category,
.dark-mode .spend-analysis-wrapper-card .expense-row .col-spend,
.dark-mode .spend-analysis-wrapper-card .transaction-row .transaction-vendor,
.dark-mode .spend-analysis-wrapper-card .transaction-row .transaction-amount {
  color: var(--brokerly-text-primary) !important;
}

html[data-theme="dark"] .spend-analysis-wrapper-card .expense-row .vendor-category,
html[data-theme="dark"] .spend-analysis-wrapper-card .expense-row .col-transactions,
html[data-theme="dark"] .spend-analysis-wrapper-card .expense-row .col-percent,
html[data-theme="dark"] .spend-analysis-wrapper-card .transaction-row .transaction-category,
html[data-theme="dark"] .spend-analysis-wrapper-card .transaction-row .transaction-date,
.dark-mode .spend-analysis-wrapper-card .expense-row .vendor-category,
.dark-mode .spend-analysis-wrapper-card .expense-row .col-transactions,
.dark-mode .spend-analysis-wrapper-card .expense-row .col-percent,
.dark-mode .spend-analysis-wrapper-card .transaction-row .transaction-category,
.dark-mode .spend-analysis-wrapper-card .transaction-row .transaction-date {
  color: var(--brokerly-text-secondary) !important;
}

/* 8. Premium Overrides for Connected Accounts list items (Money Page) */
.account-row.clickable-row {
  border: 1px solid transparent !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
}

html:not([data-theme="dark"]) .account-row.clickable-row {
  background: linear-gradient(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.65)) padding-box,
              linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01), 0 2px 4px rgba(0, 0, 0, 0.005) !important;
}

html[data-theme="dark"] .account-row.clickable-row {
  background: linear-gradient(rgba(20, 20, 25, 0.65), rgba(20, 20, 25, 0.65)) padding-box,
              linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15) !important;
}

/* Hover effects for connected accounts */
html:not([data-theme="dark"]) .account-row.clickable-row:hover {
  transform: translateY(-2px) scale(1.008) !important;
  background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)) padding-box,
              linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(0, 0, 0, 0) 100%) border-box !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03), 0 4px 10px rgba(59, 130, 246, 0.04) !important;
}

html[data-theme="dark"] .account-row.clickable-row:hover {
  transform: translateY(-2px) scale(1.008) !important;
  background: linear-gradient(rgba(28, 28, 35, 0.85), rgba(28, 28, 35, 0.85)) padding-box,
              linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(255, 255, 255, 0) 100%) border-box !important;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(59, 130, 246, 0.1) !important;
}

/* 9. Premium Overrides for Overview Section Containers (Budgets, Goals, Tenders) */
#budgets-container, 
#goals-container, 
#tenders-container {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  transition: all 0.25s ease !important;
}

/* 10. Borderless & Low-Padding Chart Container Overrides (Money View & Detail Drawer) */
.cash-flow-chart-container,
.drawer-chart-section {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 12px 0 0 0 !important;
}
/* 11. Receipts-Style Key Metrics cards (Overview & Money pages) */
.quick-stats-pills-container {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  padding-bottom: 0 !important;
}

.quick-stat-pill {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  border-radius: 20px !important;
  border: 1px solid var(--brokerly-border-medium, rgba(0, 0, 0, 0.08)) !important;
  padding: 12px 14px !important;
  cursor: pointer !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (min-width: 768px) {
  .quick-stats-pills-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 16px !important;
  }
  .quick-stat-pill {
    gap: 16px !important;
    padding: 16px 20px !important;
  }
}

/* Light Theme Cards */
html:not([data-theme="dark"]) .quick-stat-pill {
  background: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01), 0 8px 24px -8px rgba(0, 0, 0, 0.02) !important;
}

/* Dark Theme Cards */
html[data-theme="dark"] .quick-stat-pill {
  background: #141419 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15) !important;
}

/* Interactive Hover States */
.quick-stat-pill:hover {
  transform: translateY(-3px) scale(1.008) !important;
  border-color: var(--pill-color, #3b82f6) !important;
}

html:not([data-theme="dark"]) .quick-stat-pill:hover {
  box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.02), 0 10px 20px -5px rgba(59, 130, 246, 0.06) !important;
}

html[data-theme="dark"] .quick-stat-pill:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(59, 130, 246, 0.12) !important;
}

.quick-stat-pill:active {
  transform: scale(0.985) !important;
}

/* Icon Container: Slightly rounded square (radius 14px) with accent bg and color */
.stat-pill-icon-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px !important;
  background: var(--pill-bg, rgba(59, 130, 246, 0.12)) !important;
  color: var(--pill-color, #3b82f6) !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
}

.stat-pill-icon-container .stat-icon {
  font-size: 20px !important;
  font-weight: bold !important;
  color: inherit !important;
}

/* Value & Label Styles */
.quick-stat-pill .stat-value {
  font-size: clamp(18px, 4vw, 21px) !important;
  font-weight: 800 !important;
  color: var(--brokerly-text-primary, #1f2937) !important;
  margin-bottom: 2px !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html[data-theme="dark"] .quick-stat-pill .stat-value {
  color: #f3f4f6 !important;
}

.quick-stat-pill .stat-label {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--brokerly-text-secondary, #6b7280) !important;
  opacity: 0.85 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html[data-theme="dark"] .quick-stat-pill .stat-label {
  color: #9ca3af !important;
}

/* 12. Receipts-Style Hero Metric Card inside Financial Drawer */
.metric-summary-card {
  border: 1px solid var(--brokerly-border-medium, rgba(0, 0, 0, 0.08)) !important;
  border-radius: 24px !important;
  padding: 20px 24px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 20px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin: 16px auto 20px !important;
  width: 95% !important;
  max-width: 440px !important;
  box-sizing: border-box !important;
}

/* Light Theme Cards */
html:not([data-theme="dark"]) .metric-summary-card {
  background: #FFFFFF !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.015), 0 10px 30px -10px rgba(59, 130, 246, 0.03) !important;
}

/* Dark Theme Cards */
html[data-theme="dark"] .metric-summary-card {
  background: #141419 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

/* Icon Container: Slightly rounded square (radius 14px) with accent bg and color */
.metric-summary-card .stat-pill-icon-container {
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
  background: var(--pill-bg, rgba(59, 130, 246, 0.12)) !important;
  color: var(--pill-color, #3b82f6) !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

@media (min-width: 768px) {
  .metric-summary-card .stat-pill-icon-container {
    width: 60px !important;
    height: 60px !important;
    border-radius: 16px !important;
  }
}

.metric-summary-card .stat-icon {
  font-size: 24px !important;
  font-weight: bold !important;
  color: inherit !important;
}

@media (min-width: 768px) {
  .metric-summary-card .stat-icon {
    font-size: 28px !important;
  }
}

/* Value & Label Styles */
.metric-summary-card .current-value {
  font-size: clamp(24px, 6vw, 30px) !important;
  font-weight: 800 !important;
  color: var(--brokerly-text-primary, #1f2937) !important;
  margin-bottom: 2px !important;
  letter-spacing: -0.02em !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html[data-theme="dark"] .metric-summary-card .current-value {
  color: #f3f4f6 !important;
}

.metric-summary-card .metric-label {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--brokerly-text-secondary, #6b7280) !important;
  opacity: 0.85 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html[data-theme="dark"] .metric-summary-card .metric-label {
  color: #9ca3af !important;
}

/* 13. Category Spend Redesign (Money Page) */
.category-spend-layout {
  width: 100%;
  display: block;
}

.category-spend-chart-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
}
