/* ============================================
   MDFX - styles.css (Optimizado & Modular)
   Consolidated variables, modular sections, no duplicates
   Generated: 2025-11-06
   ============================================ */

/* ------------------
   CSS VARIABLES
   ------------------ */
:root {
  /* Primary Colors */
  --primary: #ff9a3c;
  --primary-dark: #ff6b35;
  --primary-glow: rgba(255, 154, 60, 0.35);
  
  /* Backgrounds */
  --bg-0: #0a1628;
  --bg-1: #1a2942;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.03);
  
  /* Borders & Glass */
  --glass-border: rgba(255, 154, 60, 0.15);
  
  /* Status Colors */
  --positive: #4caf50;
  --negative: #f44336;
  --warning: #ffa726;
  --info: #3498db;
  --muted: #90a4ae;
  
  /* Text */
  --text: #e0e0e0;
  
  /* Spacing */
  --card-radius: 12px;
  --max-width: 1600px;
}

/* ------------------
   CUSTOM CONFIRM/PROMPT OVERLAY
   ------------------ */
#customPrompt {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1200;
  padding: 24px;
}

#customPrompt .custom-confirm-modal {
  background: linear-gradient(145deg, var(--bg-0), var(--bg-1));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  color: var(--text);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease;
}

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

#customPrompt .confirm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#customPrompt .confirm-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  background: linear-gradient(135deg, var(--primary), #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#customPrompt .confirm-message {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 24px;
  opacity: 0.9;
}

#customPrompt .confirm-input {
  margin-bottom: 24px;
}

#customPrompt .prompt-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 15px;
  transition: all 0.3s ease;
}

#customPrompt .prompt-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
  background: rgba(255, 255, 255, 0.06);
}

#customPrompt .prompt-input::placeholder {
  color: var(--muted);
}

#customPrompt .confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

#customPrompt .confirm-cancel,
#customPrompt .confirm-accept {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 120px;
  font-size: 14px;
}

#customPrompt .confirm-cancel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--muted);
}

#customPrompt .confirm-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  transform: translateY(-2px);
}

#customPrompt .confirm-accept {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  box-shadow: 0 8px 30px rgba(255, 154, 60, 0.18);
  position: relative;
  overflow: hidden;
}

#customPrompt .confirm-accept::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  transition: all 0.5s ease;
}

#customPrompt .confirm-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255, 154, 60, 0.3);
}

#customPrompt .confirm-accept:hover::before {
  left: 100%;
}

/* ------------------
   RESET & BASE
   ------------------ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-0) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 154, 60, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.04) 0%, transparent 40%);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 70px 18px 0 18px; /* top padding to offset fixed header */
}

a {
  color: inherit;
  text-decoration: none;
}

/* ------------------
   UTILITY CLASSES
   ------------------ */
.glass {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.glass-2 {
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.muted {
  color: var(--muted);
}

/* IMPORTANTE: Sin !important para permitir que JS controle display */
.hidden {
  display: none;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-10 {
  gap: 10px;
}

/* ------------------
   FUTURISTIC HEADER
   ------------------ */
.futuristic-header {
  /* Make header fixed to ensure it stays at the top and avoids layout shifts
     when the component is injected dynamically. */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  background: linear-gradient(135deg, 
    rgba(255, 154, 60, 0.08) 0%, 
    rgba(10, 22, 40, 0.96) 50%, 
    rgba(255, 154, 60, 0.06) 100%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 154, 60, 0.1);
  width: 100%;
  overflow: visible;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 16px;
  flex-wrap: nowrap;
  width: 100%;
  min-height: auto;
}

/* Logo Section */
.logo-section {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  order: unset;
  flex-shrink: 0;
}

.logo-icon {
  width: auto;
  height: 32px;
  object-fit: contain;
  filter: brightness(1.1) drop-shadow(0 0 15px rgba(255, 140, 66, 0.4));
  transform: scale(3);
  transform-origin: left center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.logo-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 200, 100, 0.6) 50%, transparent 100%);
  animation: shine 2.5s infinite;
}

.logo-icon:hover {
  filter: brightness(1.2) drop-shadow(0 0 25px rgba(255, 140, 66, 0.7));
  transform: scale(3.05);
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.logo-text {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  flex-wrap: nowrap;
  order: unset;
  flex: 1 1 auto;
  min-width: auto;
  overflow: visible;
}

.nav-tab {
  padding: 7px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: none;
  background: transparent;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(255, 154, 60, 0.16), 
    rgba(255, 154, 60, 0.06));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
}

.nav-tab:hover::before {
  opacity: 1;
}

.nav-tab:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-tab.active {
  background: linear-gradient(135deg, 
    rgba(255, 154, 60, 0.16), 
    rgba(255, 154, 60, 0.06));
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 154, 60, 0.3);
}

.nav-icon {
  font-size: 16px;
}

/* User Menu Container */
.user-menu-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* User Info Button */
.user-info-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  white-space: nowrap;
  order: unset;
  flex-shrink: 0;
}

.user-info-btn:hover {
  background: rgba(255, 154, 60, 0.15);
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.user-avatar-mini {
  font-size: 16px;
}

.user-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 8px var(--positive);
}

/* User Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: linear-gradient(145deg, var(--bg-0), var(--bg-1));
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  min-width: 200px;
  animation: dropdownSlideDown 0.2s ease;
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.dropdown-item svg {
  transition: all 0.2s ease;
  stroke: currentColor;
}

.dropdown-item:first-child {
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}

.dropdown-item:hover:not(.danger) {
  background: rgba(255, 154, 60, 0.1);
  color: var(--primary);
  padding-left: 20px;
}

.dropdown-item:hover:not(.danger) svg {
  stroke: var(--primary);
  filter: drop-shadow(0 0 4px rgba(255, 154, 60, 0.4));
}

.dropdown-item.danger {
  color: #f44336;
}

.dropdown-item.danger:hover {
  background: rgba(244, 67, 54, 0.1);
  padding-left: 20px;
}

.dropdown-item.danger svg {
  stroke: #f44336;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 154, 60, 0.1);
  margin: 4px 0;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 154, 60, 0.1);
  box-shadow: 0 0 20px var(--primary-glow);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Navigation */
.nav-mobile {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: calc(100vh - 72px);
  background: linear-gradient(135deg, 
    rgba(10, 22, 40, 0.98), 
    rgba(26, 41, 66, 0.98));
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--glass-border);
  z-index: 99;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.3s ease;
  overflow-y: auto;
}

.nav-mobile-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.nav-mobile.show {
  display: flex;
}

.nav-mobile .nav-tab {
  width: 100%;
  justify-content: center;
  padding: 15px;
  font-size: 16px;
}

/* ------------------
   CONTROLS BAR - DISEÑO TOTALMENTE NUEVO CON UX SUPERIOR
   ------------------ */
.controls-bar {
  margin: 24px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  position: relative;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Card flotante para selector de cuenta */
.account-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  padding: 14px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 157, 60, 0.12);
  position: relative;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: 100;
}

.account-selector::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, 
    rgba(255, 157, 60, 0.3) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255, 157, 60, 0.3) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.account-selector:hover::before {
  opacity: 1;
}

.account-selector:hover {
  background: rgba(17, 24, 39, 0.9);
  border-color: rgba(255, 157, 60, 0.25);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.16),
    0 16px 48px rgba(255, 157, 60, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Select Chevron Icon */
.select-chevron {
  color: #ff9a3c;
  margin-left: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  flex-shrink: 0;
}

.account-selector:hover .select-chevron {
  color: #ffa851;
  transform: translateY(2px);
}

/* 🆕 Performance Chart Bar */
.performance-chart-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 320px;
  max-width: none;
}

.perf-nav-btn {
  padding: 8px 8px;
  background: rgba(100, 100, 100, 0.25);
  border: 1.5px solid rgba(120, 120, 120, 0.5);
  color: #999;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.perf-nav-btn:hover {
  background: rgba(100, 100, 100, 0.35);
  border-color: rgba(120, 120, 120, 0.7);
  box-shadow: 0 0 10px rgba(100, 100, 100, 0.25);
  transform: scale(1.08);
  color: #aaa;
}

.perf-nav-btn:active {
  transform: scale(0.98);
}

.perf-months-container {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  padding: 2px;
  scroll-behavior: smooth;
  min-width: 0;
}

.perf-month-item {
  min-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 5px;
  background: rgba(80, 80, 80, 0.2);
  border: 1px solid rgba(100, 100, 100, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 10px;
  text-align: center;
  flex-shrink: 0;
}

.perf-month-item:hover {
  background: rgba(100, 100, 100, 0.3);
  border-color: rgba(120, 120, 120, 0.5);
  transform: translateY(-2px);
}

.perf-month-item.current {
  background: linear-gradient(135deg, rgba(255, 154, 60, 0.35), rgba(255, 154, 60, 0.18));
  border-color: rgba(255, 154, 60, 0.6);
  box-shadow: 0 0 10px rgba(255, 154, 60, 0.3), inset 0 0 8px rgba(255, 154, 60, 0.1);
  font-weight: 700;
}

.perf-month-name {
  font-weight: 600;
  color: #999;
  font-size: 9px;
  text-transform: uppercase;
  opacity: 0.95;
}

.perf-month-value {
  font-weight: 700;
  font-size: 13px;
  margin-top: 2px;
}

.perf-month-value.positive {
  color: #4caf50;
}

.perf-month-value.negative {
  color: #f44336;
}

.perf-month-value.neutral {
  color: #90a4ae;
}

.month-controls-bar {
  margin: 20px;
  padding: 18px;
  border-radius: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.control-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Account Selector - moved to line 674 */

.futuristic-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 154, 60, 0.2);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.futuristic-select:focus {
  outline: none;
  border-color: #ff9a3c;
  box-shadow: 0 0 0 3px rgba(255, 154, 60, 0.1);
}

/* Modern dropdown options styling - Clean design */
.futuristic-select option {
  background: linear-gradient(135deg, #1e293b 0%, #1a1f35 100%);
  color: #e2e8f0;
  padding: 16px 20px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.3px;
  border-radius: 8px;
  margin: 4px 0;
  transition: all 0.2s ease;
}

.futuristic-select option:hover {
  background: linear-gradient(135deg, #ff9a3c 0%, #ffa851 100%);
  color: #fff;
  font-weight: 600;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(255, 157, 60, 0.3);
}

.futuristic-select option:checked {
  background: linear-gradient(135deg, #ff9a3c 0%, #ffa851 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Custom Select Dropdown */
.custom-select-trigger {
  padding: 0;
  background: transparent;
  color: #ff9a3c;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  min-width: 200px;
  flex: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.custom-select-trigger:hover {
  color: #ffa851;
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 300px;
  max-width: 400px;
  background: rgba(30, 41, 59, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(255, 157, 60, 0.2);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(255, 157, 60, 0.15);
  backdrop-filter: blur(20px);
  max-height: 300px;
  overflow-y: auto;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-select-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-option {
  padding: 14px 20px;
  color: #e2e8f0;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-select-option:hover {
  background: linear-gradient(135deg, rgba(255, 157, 60, 0.15) 0%, rgba(255, 157, 60, 0.05) 100%);
  color: #ffa851;
  border-left-color: #ff9a3c;
  padding-left: 24px;
}

.custom-select-option.selected {
  background: linear-gradient(135deg, rgba(255, 157, 60, 0.2) 0%, rgba(255, 157, 60, 0.1) 100%);
  color: #ffa851;
  font-weight: 700;
  border-left-color: #ff9a3c;
  border-left-width: 4px;
}

.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 157, 60, 0.3);
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 157, 60, 0.5);
}

/* Icon Buttons - Diseño flotante y moderno */
.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 157, 60, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff9a3c;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.icon-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 157, 60, 0.2), transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-btn:hover::before {
  opacity: 1;
  transform: scale(1);
}

.icon-btn svg {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  stroke: currentColor;
  position: relative;
  z-index: 1;
}

.icon-btn:hover {
  background: rgba(17, 24, 39, 0.9);
  border-color: rgba(255, 157, 60, 0.4);
  color: #ffa851;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.16),
    0 16px 48px rgba(255, 157, 60, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.icon-btn:hover svg {
  transform: rotate(15deg) scale(1.1);
  filter: drop-shadow(0 0 8px rgba(255, 157, 60, 0.6));
}

.icon-btn:active {
  transform: translateY(-2px) scale(1.02);
  transition: all 0.1s ease;
}

/* Weekend Toggle Button */
.weekend-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(100, 100, 100, 0.15);
  border: 1.5px solid rgba(120, 120, 120, 0.4);
  color: #999;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.weekend-toggle-btn:hover {
  transform: translateY(-1px);
  background: rgba(100, 100, 100, 0.25);
  border-color: rgba(120, 120, 120, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.weekend-toggle-btn.active {
  background: linear-gradient(135deg, rgba(255, 154, 60, 0.25), rgba(255, 154, 60, 0.12));
  border-color: rgba(255, 154, 60, 0.5);
  color: var(--primary);
  box-shadow: 0 0 12px rgba(255, 154, 60, 0.25);
}

.toggle-icon {
  font-size: 16px;
}

.toggle-label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.3px;
}

/* Status Toggle - Unified */
.status-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
}

.status-toggle:not(.burned):not(.superado) {
  background: linear-gradient(135deg, 
    rgba(76, 175, 80, 0.18), 
    rgba(76, 175, 80, 0.1)) !important;
  color: var(--positive) !important;
  border-color: rgba(76, 175, 80, 0.35) !important;
}

.status-toggle:not(.burned):not(.superado):hover {
  background: linear-gradient(135deg, 
    rgba(76, 175, 80, 0.28), 
    rgba(76, 175, 80, 0.15)) !important;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3) !important;
  transform: translateY(-2px) !important;
}

.status-toggle.burned {
  background: linear-gradient(135deg, 
    rgba(244, 67, 54, 0.18), 
    rgba(244, 67, 54, 0.1)) !important;
  color: var(--negative) !important;
  border-color: rgba(244, 67, 54, 0.35) !important;
}

.status-toggle.burned:hover {
  background: linear-gradient(135deg, 
    rgba(244, 67, 54, 0.28), 
    rgba(244, 67, 54, 0.15)) !important;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3) !important;
  transform: translateY(-2px) !important;
}

.status-toggle.superado {
  background: linear-gradient(135deg, 
    rgba(255, 193, 7, 0.18), 
    rgba(255, 193, 7, 0.1)) !important;
  color: var(--warning) !important;
  border-color: rgba(255, 193, 7, 0.35) !important;
}

.status-toggle.superado:hover {
  background: linear-gradient(135deg, 
    rgba(255, 193, 7, 0.28), 
    rgba(255, 193, 7, 0.15)) !important;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3) !important;
  transform: translateY(-2px) !important;
}

/* Status Text - Only text display, no button styling */
.status-text {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--positive);
  white-space: nowrap;
}

/* Month Navigation */
.month-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
}

.calendar-title {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.month-btn {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(100, 100, 100, 0.25);
  border: 1.5px solid rgba(120, 120, 120, 0.5);
  color: #999;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  line-height: 1;
}

.month-btn:hover {
  background: rgba(100, 100, 100, 0.35);
  border-color: rgba(120, 120, 120, 0.7);
  box-shadow: 0 0 12px rgba(100, 100, 100, 0.25);
  transform: translateY(-1px);
  color: #aaa;
}

.month-btn:active {
  transform: translateY(0);
  background: rgba(100, 100, 100, 0.2);
}

.month-display {
  font-weight: 700;
  color: #aaa;
  min-width: 140px;
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Primary button styles moved to css/components/buttons.css */

/* ------------------
   STATS CARDS
   ------------------ */
/* Moved to `css/stats-cards.css` to avoid duplication. Keep that file as authoritative
   for all .stats-grid / .stat-card / .stat-value styles. */

/* ------------------
   DASHBOARD LAYOUT
   ------------------ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  padding: 18px;
  grid-auto-flow: dense;
  transition: grid-template-columns 0.3s ease;
}

/* Ajustar grid cuando el sidebar está colapsado */
.dashboard-layout:has(.metrics-sidebar.collapsed) {
  grid-template-columns: 50px 1fr;
}

/* Metrics Sidebar */
.metrics-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: 280px;
  position: relative;
  transition: max-width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

/* Sidebar collapsed state */
.metrics-sidebar.collapsed {
  max-width: 50px;
  padding: 16px 8px;
}

.metrics-sidebar.collapsed .metrics-card {
  display: none;
}

/* Toggle button */
.sidebar-toggle-btn {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  margin: -8px 0 8px 0;
  border: none;
  background: rgba(255, 154, 60, 0.1);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff9a3c;
  transition: all 0.3s ease;
  z-index: 10;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 154, 60, 0.2);
  transform: scale(1.02);
}

.sidebar-toggle-btn svg {
  transition: transform 0.3s ease;
}

.metrics-sidebar.collapsed .sidebar-toggle-btn svg {
  transform: rotate(180deg);
}

@media (max-width: 1514px) {
  .metrics-sidebar {
    max-width: 100%;
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .sidebar-toggle-btn {
    display: none; /* Hide toggle on smaller screens where it's already horizontal */
  }
}

@media (max-width: 900px) {
  .metrics-sidebar {
    flex-direction: column;
    order: 2;
    margin-top: 20px;
  }
}

.metrics-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
}

.metrics-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-icon, .info-icon-small {
  cursor: help;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  font-size: 14px;
}

.info-icon:hover, .info-icon-small:hover {
  opacity: 1;
}

.info-icon-small {
  font-size: 11px;
  vertical-align: middle;
  margin-left: 4px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 6px;
  transition: all 0.3s ease;
}

.metric-row:hover {
  background: rgba(255, 154, 60, 0.1);
  transform: translateX(5px);
}

.metric-label {
  font-size: 13px;
  color: var(--muted);
}

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

.metric-info {
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  margin-top: 8px;
}

.metric-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
}

.metric-detail:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 6px;
}

.detail-label {
  color: var(--muted);
}

.detail-value {
  font-weight: 600;
  color: var(--text);
}

#revengeScore {
  font-size: 16px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

#revengeScore.good {
  background: rgba(76, 175, 80, 0.1);
  color: var(--positive);
}

#revengeScore.warning {
  background: rgba(255, 167, 38, 0.1);
  color: var(--warning);
}

#revengeScore.danger {
  background: rgba(244, 67, 54, 0.1);
  color: var(--negative);
}

.metric-value.positive {
  color: var(--positive);
}

.metric-value.negative {
  color: var(--negative);
}

.metric-value.neutral {
  color: var(--primary);
}

/* ------------------
   MONTHLY PERFORMANCE
   ------------------ */
.monthly-performance-container {
  border-radius: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  margin: 20px;
}

.monthly-header {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 165, 0, 0.15);
}

.monthly-header h3 {
  margin: 0;
  color: #ffa500;
  font-weight: 800;
  font-size: 12px;
}

.monthly-chart {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.month-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 165, 0, 0.1);
  border-radius: 6px;
  padding: 6px 4px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  min-width: 0;
}

.month-item:hover {
  background: rgba(255, 165, 0, 0.12);
  border-color: rgba(255, 165, 0, 0.3);
  transform: translateY(-1px);
}

.month-name {
  font-size: 10px;
  color: #999;
  font-weight: 600;
  margin-bottom: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.month-result {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
  min-height: 16px;
  line-height: 1;
}

.month-result.positive {
  color: #66bb6a;
}

.month-result.negative {
  color: #ef5350;
}

.month-result.neutral {
  color: #90a4ae;
}

.month-usd {
  font-size: 9px;
  color: #888;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.month-usd.positive {
  color: #81c784;
}

.month-usd.negative {
  color: #e57373;
}


/* ------------------
   CALENDAR
   ------------------ */
.calendar-container {
  border-radius: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  overflow-x: auto;
  min-width: 0;
}

/* 🆕 Calendar Header with Controls */
/* ==================== CALENDAR HEADER - NEW DESIGN ==================== */

.calendar-header-new {
  margin-bottom: 24px;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(26, 31, 46, 0.8) 0%, rgba(21, 25, 32, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
  justify-content: space-between;
}

@media (max-width: 1514px) {
  .header-top {
    padding: 16px;
    gap: 16px;
  }
}

@media (max-width: 1200px) {
  .header-top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

/* --------- Performance Strip (sin flechas) --------- */
.performance-strip {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.1);
}

.perf-pill-item {
  min-width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  background: rgba(50, 50, 50, 0.4);
  border: 1.5px solid rgba(100, 100, 100, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
  text-align: center;
  flex-shrink: 0;
}

.perf-pill-item:hover {
  background: rgba(80, 80, 80, 0.3);
  border-color: rgba(120, 120, 120, 0.5);
  transform: translateY(-2px);
}

.perf-pill-item.current {
  background: linear-gradient(135deg, rgba(255, 154, 60, 0.4), rgba(255, 154, 60, 0.2));
  border-color: rgba(255, 154, 60, 0.8);
  box-shadow: 0 6px 16px rgba(255, 154, 60, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.perf-pill-item.positive {
  border-color: rgba(76, 175, 80, 0.6);
  background: rgba(76, 175, 80, 0.12);
}

.perf-pill-item.negative {
  border-color: rgba(244, 67, 54, 0.6);
  background: rgba(244, 67, 54, 0.12);
}

.perf-pill-month {
  font-weight: 700;
  color: #fff;
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.9;
}

.perf-pill-value {
  font-weight: 700;
  font-size: 12px;
  margin-top: 3px;
}

.perf-pill-item.current .perf-pill-value {
  color: var(--primary);
}

.perf-pill-item.positive .perf-pill-value {
  color: #4caf50;
}

.perf-pill-item.negative .perf-pill-value {
  color: #f44336;
}

.perf-pill-item:not(.current):not(.positive):not(.negative) .perf-pill-value {
  color: #aaa;
}

/* --------- Month Navigator Section --------- */
.month-navigator {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: rgba(100, 100, 100, 0.15);
  border: 1px solid rgba(120, 120, 120, 0.3);
  border-radius: 12px;
  flex-shrink: 0;
}

.nav-arrow {
  padding: 6px 8px;
  background: rgba(100, 100, 100, 0.2);
  border: 1px solid rgba(120, 120, 120, 0.4);
  color: #999;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.nav-arrow:hover {
  background: rgba(100, 100, 100, 0.3);
  border-color: rgba(120, 120, 120, 0.6);
  transform: scale(1.05);
}

.nav-arrow:active {
  transform: scale(0.95);
}

.month-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  min-width: 140px;
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --------- Weekend Toggle Section --------- */
.weekend-toggle-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* --------- Weekend Toggle --------- */
.weekend-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.weekend-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.weekend-toggle.active .toggle-switch {
  background: linear-gradient(135deg, #ff9a3c 0%, #ff7a1c 100%);
}

.weekend-toggle.active .toggle-switch::after {
  left: 23px;
}

.toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}

.weekend-toggle.active .toggle-label {
  color: #ff9a3c;
}

.toggle-text {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

#showWeekendToggle:checked + .toggle-label {
  border-color: rgba(255, 154, 60, 0.5);
  color: var(--primary);
}

#showWeekendToggle:checked + .toggle-label .toggle-text {
  color: var(--primary);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
  .header-top {
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
  }

  .performance-strip {
    flex: 1 1 100%;
    order: 1;
  }

  .month-navigator {
    flex: 0 1 auto;
    order: 2;
  }

  .weekend-toggle-section {
    flex: 0 1 auto;
    order: 3;
  }
}

@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .performance-strip,
  .month-navigator,
  .weekend-toggle-section {
    width: 100%;
    flex: 1 1 100%;
  }

  .performance-strip {
    justify-content: center;
  }

  .perf-pill-item {
    min-width: 56px;
    padding: 8px 4px;
    font-size: 10px;
  }

  .toggle-label {
    width: 100%;
    justify-content: center;
  }
}

.calendar-header {
  display: none;
}

.calendar-title {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: grid-template-columns 0.3s ease;
  min-width: fit-content;
}

/* 🆕 Grid dinámico cuando fin de semana está OFF (6 cols para días) */
.calendar-grid.weekend-off {
  grid-template-columns: repeat(6, 1fr);
}

/* 🆕 Grid dinámico cuando fin de semana está ON (7 cols para días) */
.calendar-grid.weekend-on {
  grid-template-columns: repeat(7, 1fr);
}

.day-header,
.weekend-header {
  padding: 12px 6px;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 13px;
  text-transform: uppercase;
}

.weekend-header {
  color: #757575;
  font-size: 11px;
}

.weekly-header {
  padding: 12px 6px;
  text-align: center;
  font-weight: 700;
  color: #ffa500;
  font-size: 11px;
  text-transform: uppercase;
}

.day-cell,
.weekend-cell {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  min-height: 120px;
  padding: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.day-cell {
  cursor: pointer;
}

/* 🆕 Estilos para celdas de fin de semana */
.day-cell.weekend-day {
  background: rgba(117, 117, 117, 0.08);
  color: #757575;
}

.day-cell.weekend-day:hover {
  background: rgba(117, 117, 117, 0.15);
  color: #757575;
}

.day-cell:hover {
  background: rgba(255, 154, 60, 0.08);
  transform: translateY(-2px);
  border: 1px solid var(--primary);
}

.day-cell.other-month {
  opacity: 0.35;
}

.day-cell.today {
  border: 1px solid var(--primary);
  box-shadow: 0 6px 20px rgba(255, 154, 60, 0.15);
}

.weekend-cell {
  background: rgba(117, 117, 117, 0.08);
  cursor: not-allowed;
  color: #757575;
  justify-content: center;
  align-items: center;
}

.day-number {
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  font-size: 16px;
}

.day-content {
  overflow-y: auto;
  max-height: 100px;
  padding-right: 6px;
}

.day-content::-webkit-scrollbar {
  width: 6px;
}

.day-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.day-content::-webkit-scrollbar-thumb {
  background: rgba(255, 154, 60, 0.4);
  border-radius: 3px;
}

.day-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 154, 60, 0.6);
}

.trade-item {
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid transparent;
  flex-shrink: 0;
}

.trade-item.win {
  border-left-color: var(--positive);
}

.trade-item.loss {
  border-left-color: var(--negative);
}

.trade-item.breakeven {
  border-left-color: var(--warning);
}

.trade-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
}

.pair-direction {
  font-weight: 600;
  color: var(--primary);
}

.result {
  font-weight: 600;
}

.result.positive {
  color: var(--positive);
}

.result.negative {
  color: var(--negative);
}

.result.neutral {
  color: var(--warning);
}

.day-top-info {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.day-result-circle {
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 700;
  color: #fff;
  font-size: 12px;
}

.day-result-circle.positive {
  background: #1e5631;
}

.day-result-circle.breakeven {
  background: #92400e;
}

.day-result-circle.negative {
  background: #8b0000;
}

.day-result-circle.neutral {
  background: #666;
}

.trades-count {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.week-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.week-result {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.week-trades {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}

.week-winrate {
  font-size: 10px;
  color: var(--muted);
}

/* Modal styles moved to css/components/modals.css */

/* Form styles moved to css/components/forms.css */

/* ------------------
   TRADES LIST
   ------------------ */
.trades-section {
  margin-bottom: 30px;
}

.trades-list {
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
}

.trade-card {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 4px solid transparent;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.trade-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
}

.trade-card.win {
  border-left-color: var(--positive);
}

.trade-card.loss {
  border-left-color: var(--negative);
}

.trade-card.breakeven {
  border-left-color: var(--warning);
}

.trade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.trade-pair {
  font-weight: 800;
  color: var(--primary);
  font-size: 16px;
}

.trade-direction {
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 12px;
}

.trade-direction.long {
  background: rgba(76, 175, 80, 0.12);
  color: var(--positive);
}

.trade-direction.short {
  background: rgba(244, 67, 54, 0.12);
  color: var(--negative);
}

.delete-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--negative);
  background: rgba(244, 67, 54, 0.08);
  color: var(--negative);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.delete-btn:hover {
  background: rgba(244, 67, 54, 0.2);
  transform: scale(1.05);
}

.trade-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.trade-detail {
  font-size: 13px;
}

.trade-detail-label {
  color: var(--muted);
  margin-bottom: 3px;
  font-size: 11px;
}

.trade-detail-value {
  font-weight: 700;
  color: var(--primary);
}

.trade-comment {
  font-size: 13px;
  color: #b0bec5;
  font-style: italic;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
}

.trade-url {
  margin-top: 10px;
}

.trade-url a {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s ease;
}

.trade-url a:hover {
  color: #ffd700;
  text-decoration: underline;
}

.no-trades {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 30px;
}

.weekend-notice {
  background: rgba(117, 117, 117, 0.1);
  border: 1px solid rgba(117, 117, 117, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.weekend-notice-title {
  font-weight: 700;
  color: #757575;
  margin-bottom: 8px;
  font-size: 16px;
}

.weekend-notice-text {
  font-size: 14px;
  color: #9e9e9e;
}

/* Import Preview */
.import-info {
  background: rgba(255, 154, 60, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
}

.import-preview {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

/* ------------------
   USER MODALS
   ------------------ */
.user-profile-section {
  text-align: center;
  padding: 20px;
}

.user-avatar {
  font-size: 64px;
  margin-bottom: 15px;
}

.user-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--negative), #c62828);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(244, 67, 54, 0.32);
}

.logout-icon {
  font-size: 14px;
}

/* --------- Floating user panel (futuristic) --------- */
.modal.user-panel {
  background: transparent; /* no dark overlay */
  pointer-events: none; /* allow clicks only on panel */
}
.modal.user-panel .modal-content {
  margin: 0;
  position: fixed;
  top: 68px;
  right: 18px;
  width: 320px;
  max-width: calc(100% - 36px);
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(10,20,34,0.95), rgba(12,18,30,0.88));
  border: 1px solid rgba(255,154,60,0.12);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 30px rgba(255,154,60,0.06) inset;
  backdrop-filter: blur(12px) saturate(140%);
  z-index: 1200;
  pointer-events: auto;
  animation: slideDownFuturistic 220ms cubic-bezier(.2,.9,.2,1);
}

.modal.user-panel .modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal.user-panel .close {
  font-size: 20px;
  color: rgba(255,255,255,0.6);
}

.user-panel-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(255,154,60,0.12), rgba(255,154,60,0.04));
  border: 1px solid rgba(255,154,60,0.08);
  box-shadow: 0 6px 20px rgba(255,154,60,0.04);
}

.user-panel .user-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
}

.user-panel .user-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

/* Compact futuristic logout (icon-only with glow) */
.user-panel .logout-btn {
  padding: 8px 10px;
  gap: 6px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255,75,75,0.12), rgba(255,75,75,0.06));
  border: 1px solid rgba(255,75,75,0.12);
  box-shadow: 0 8px 30px rgba(255, 90, 90, 0.08);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-panel .logout-btn .logout-icon {
  font-size: 16px;
}

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

/* Make sure modal overlay doesn't block other interactions when using floating panel */
.modal.user-panel { pointer-events: none; }
.modal.user-panel .modal-content { pointer-events: auto; }

/* Confirm Modal */
.confirm-modal .modal-content {
  max-width: 500px;
}

.confirm-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 15px;
}

.confirm-text {
  text-align: center;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel {
  flex: 1;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, var(--negative), #c0392b);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

/* ------------------
   ACCOUNTS PAGE
   ------------------ */
.accounts-control {
  margin: 20px;
  padding: 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
}

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.filter-tab {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-tab:hover {
  color: var(--primary);
  background: rgba(255, 154, 60, 0.1);
}

.filter-tab.active {
  background: linear-gradient(135deg, 
    rgba(255, 154, 60, 0.2),
    rgba(255, 154, 60, 0.1));
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 154, 60, 0.2);
}

.add-account-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-account-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 20px;
}

.account-card {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.03));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
}

.account-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transition: all 0.3s ease;
}

.account-card.funded::before {
  background: var(--positive);
}

.account-card.challenge::before {
  background: var(--info);
}

/* Burned / Quemadas styling - more futuristic and distinct */
.account-card.status-burned {
  background: linear-gradient(135deg, rgba(40,12,12,0.3), rgba(30,8,8,0.35));
  border-color: rgba(255,59,48,0.35);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.account-card.status-burned::before {
  background: linear-gradient(180deg, rgba(255,59,48,1), rgba(255,120,100,0.8));
}
.account-card.status-burned .account-name {
  color: #ff5252;
}
.account-card.status-burned .account-type-badge {
  border: 1px solid rgba(255,59,48,0.35);
}

/* Activa (Active) - Green styling */
.account-card.status-active {
  background: linear-gradient(135deg, rgba(12,40,20,0.3), rgba(8,30,15,0.35));
  border-color: rgba(76,175,80,0.35);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.account-card.status-active::before {
  background: linear-gradient(180deg, rgba(76,175,80,1), rgba(165,214,167,0.8));
}
.account-card.status-active .account-name {
  color: #66ff66;
}
.account-card.status-active .account-type-badge {
  border: 1px solid rgba(76,175,80,0.35);
}

/* Superado (Challenge completed) - Golden yellow styling */
.account-card.status-superado {
  background: linear-gradient(135deg, rgba(60,50,10,0.3), rgba(45,38,8,0.35));
  border-color: rgba(255,215,0,0.35);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.account-card.status-superado::before {
  background: linear-gradient(180deg, rgba(255,215,0,1), rgba(255,245,0,0.8));
}
.account-card.status-superado .account-name {
  color: #ffff00;
}
.account-card.status-superado .account-type-badge {
  border: 1px solid rgba(255,215,0,0.35);
}

/* Futuristic filter tabs look */
.filter-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  background: linear-gradient(90deg, rgba(10,12,20,0.6), rgba(18,28,44,0.6));
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 6px 30px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,154,60,0.02);
}
.filter-tab {
  padding: 10px 16px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.28s ease;
  border: 1px solid transparent;
}
.filter-tab:hover {
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255,154,60,0.06);
}
.filter-tab.active {
  background: linear-gradient(135deg, rgba(255,154,60,0.14), rgba(255,107,53,0.08));
  color: var(--primary);
  box-shadow: 0 8px 30px rgba(255,154,60,0.12);
  transform: translateY(-2px);
  border: 1px solid rgba(255,154,60,0.12);
}

/* Priority filter select and sort button visuals */
#priorityFilter {
  min-width: 160px;
}
#sortPriorityBtn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 25px var(--primary-glow);
}

/* Priority based coloring for account cards */
.account-card.priority-high::before {
  background: var(--negative);
}
.account-card.priority-medium::before {
  background: var(--warning);
}
.account-card.priority-low::before {
  background: var(--info);
}

/* Visible priority label under account type */
.account-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.priority-label {
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.priority-label.high {
  background: rgba(244, 67, 54, 0.14);
  color: var(--negative);
  border: 1px solid rgba(244, 67, 54, 0.28);
}
.priority-label.medium {
  background: rgba(255, 193, 7, 0.12);
  color: var(--warning);
  border: 1px solid rgba(255, 193, 7, 0.25);
}
.priority-label.low {
  background: rgba(52, 152, 219, 0.12);
  color: var(--info);
  border: 1px solid rgba(52, 152, 219, 0.2);
}

.account-payout {
  color: var(--muted);
  font-size: 13px;
}

.account-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

.account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 10px;
}

.account-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  flex: 1;
}

.account-type-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.account-type-badge.funded {
  background: rgba(76, 175, 80, 0.2);
  color: var(--positive);
}

.account-type-badge.challenge {
  background: rgba(52, 152, 219, 0.2);
  color: var(--info);
}

.account-balance {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--primary), #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.account-stat {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
}

.account-stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.account-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.account-stat-value.positive {
  color: var(--positive);
}

.account-stat-value.negative {
  color: var(--negative);
}

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

.btn-edit,
.btn-delete {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-edit {
  background: rgba(52, 152, 219, 0.2);
  border: 1px solid var(--info);
  color: var(--info);
}

.btn-edit:hover {
  background: rgba(52, 152, 219, 0.3);
  transform: scale(1.02);
}

.btn-delete {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid var(--negative);
  color: var(--negative);
}

.btn-delete:hover {
  background: rgba(244, 67, 54, 0.3);
  transform: scale(1.02);
}

/* Quick Stats for Accounts Page */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 20px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border-radius: 15px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  margin: 20px;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ------------------
   FOOTER
   ------------------ */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
  margin: 20px;
  border-top: 1px solid var(--glass-border);
  background: var(--surface);
  border-radius: 16px;
  backdrop-filter: blur(20px);
}

.footer-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--primary);
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: #ffd700;
}

/* ------------------
   RESPONSIVE - TABLET
   ------------------ */
@media (max-width: 1200px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .metrics-sidebar {
    order: 2;
  }

  .accounts-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 1024px) {
  .nav-tabs span:not(.nav-icon) {
    display: none;
  }

  .nav-tab {
    padding: 10px;
  }

  .user-info-btn span:not(.user-avatar-mini):not(.user-status-dot) {
    display: none;
  }

  .user-info-btn {
    padding: 10px;
  }
}

/* ------------------
   RESPONSIVE - MOBILE
   ------------------ */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .nav-tabs {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .header-container {
    padding: 12px 20px;
  }

  .logo-text {
    font-size: 20px;
  }

  .logo-icon {
    width: 38px;
    height: 38px;
  }

  .controls-bar {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 12px;
  }

  .control-group {
    width: 100%;
    justify-content: space-between;
  }

  .account-selector {
    flex: 1;
    min-width: 0;
  }

  .futuristic-select {
    width: 100%;
    min-width: 0;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .mission-control-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
  }

  .month-nav {
    width: 100%;
  }

  .month-display {
    min-width: auto;
  }

  .calendar-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .performance-chart-bar {
    width: 100%;
    min-width: auto;
  }

  .calendar-title {
    width: 100%;
  }

  #showWeekendToggle {
    width: 100%;
  }

  .calendar-container {
    padding: 12px;
  }

  .calendar-grid {
    gap: 4px;
    padding: 10px;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)) !important;
  }

  .day-cell,
  .weekend-cell {
    padding: 6px;
    min-height: 70px;
  }

  .day-number {
    font-size: 12px;
    font-weight: 700;
  }

  .trade-item {
    font-size: 8px;
  }

  .day-result-circle {
    width: 28px;
    height: 12px;
    font-size: 9px;
    line-height: 12px;
  }

  .day-result-circle.positive {
    background: #1e5631;
  }

  .day-result-circle.breakeven {
    background: #92400e;
  }

  .day-result-circle.negative {
    background: #8b0000;
  }

  .day-result-circle.neutral {
    background: #666;
  }

  .trades-count {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }
  
  .week-title {
    font-size: 10px;
  }
  
  .week-result {
    font-size: 13px;
  }
  
  .week-trades,
  .week-winrate {
    font-size: 9px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .trade-details {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 18px;
    margin: 5% auto;
    width: 96%;
  }

  .accounts-grid {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .control-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-tabs {
    width: 100%;
    justify-content: center;
  }

  .add-account-btn {
    width: 100%;
  }

  .account-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 18px;
  }


  .day-cell,
  .weekend-cell {
    min-height: 70px;
    padding: 4px;
  }

  .account-balance {
    font-size: 28px;
  }
  /* ------------------
   FIX: Status Toggle Active States
   ------------------ */
    .status-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    background: linear-gradient(135deg, 
        rgba(76, 175, 80, 0.18), 
        rgba(76, 175, 80, 0.1)) !important;
    color: var(--positive) !important;
    border-color: rgba(76, 175, 80, 0.35) !important;
    }

    .status-toggle:hover {
    background: linear-gradient(135deg, 
        rgba(76, 175, 80, 0.28), 
        rgba(76, 175, 80, 0.15)) !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3) !important;
    transform: translateY(-2px) !important;
    }

    .status-toggle.burned {
    background: linear-gradient(135deg, 
        rgba(244, 67, 54, 0.18), 
        rgba(244, 67, 54, 0.1)) !important;
    color: var(--negative) !important;
    border-color: rgba(244, 67, 54, 0.35) !important;
    }

    .status-toggle.burned:hover {
    background: linear-gradient(135deg, 
        rgba(244, 67, 54, 0.28), 
        rgba(244, 67, 54, 0.15)) !important;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3) !important;
    }

    .status-toggle.superado {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.18), 
        rgba(255, 193, 7, 0.1)) !important;
    color: var(--warning) !important;
    border-color: rgba(255, 193, 7, 0.35) !important;
    }

    .status-toggle.superado:hover {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.28), 
        rgba(255, 193, 7, 0.15)) !important;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3) !important;
    }

    #statusIcon {
    font-size: 16px;
    line-height: 1;
    }

    #statusText {
    font-weight: 700;
    letter-spacing: 0.5px;
    }

    /* ------------------
    Priority Badges for Account Cards
    ------------------ */
    .priority-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
    }

    .priority-badge.high {
    background: var(--negative);
    color: var(--negative);
    }

    .priority-badge.medium {
    background: var(--warning);
    color: var(--warning);
    }

    .priority-badge.low {
    background: var(--info);
    color: var(--info);
    }

    /* ------------------
    Account Card Status Indicator
    ------------------ */
    .account-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(76, 175, 80, 0.2);
    color: var(--positive);
    border: 1px solid rgba(76, 175, 80, 0.4);
    }

    .account-status.inactive {
    background: rgba(244, 67, 54, 0.2);
    color: var(--negative);
    border-color: rgba(244, 67, 54, 0.4);
    }

    /* ------------------
    Mobile Navigation Fix
    ------------------ */
    .nav-mobile {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    }

    .nav-mobile.show {
    max-height: 500px;
    display: flex;
    }
    /* ============================================
   ACCOUNTS PAGE - COMPLETE STYLES
   ============================================ */

/* ------------------
   Account Cards Grid
   ------------------ */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  padding: 20px;
  margin-bottom: 40px;
}

/* ------------------
   Account Card Base
   ------------------ */
.account-card {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.03));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.4s ease;
  overflow: hidden;
  min-height: 320px;
}

/* Borde lateral de color según tipo */
.account-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transition: all 0.3s ease;
}

.account-card.funded::before {
  background: linear-gradient(180deg, var(--positive), #81c784);
}

.account-card.challenge::before {
  background: linear-gradient(180deg, var(--info), #64b5f6);
}

.account-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--primary);
}

.account-card:hover::before {
  width: 6px;
}

/* ------------------
   Priority Badge
   ------------------ */
.priority-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
  z-index: 10;
}

.priority-badge.high {
  background: var(--negative);
  color: var(--negative);
  animation: pulse-red 2s infinite;
}

.priority-badge.medium {
  background: var(--warning);
  color: var(--warning);
}

.priority-badge.low {
  background: var(--info);
  color: var(--info);
}

@keyframes pulse-red {
  0%, 100% {
    box-shadow: 0 0 12px var(--negative);
  }
  50% {
    box-shadow: 0 0 20px var(--negative);
  }
}

/* ------------------
   Account Status Badge
   ------------------ */
.account-status {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, 
    rgba(76, 175, 80, 0.25), 
    rgba(76, 175, 80, 0.15));
  color: var(--positive);
  border: 1px solid rgba(76, 175, 80, 0.5);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
  z-index: 5;
}

.account-status.inactive {
  background: linear-gradient(135deg, 
    rgba(244, 67, 54, 0.25), 
    rgba(244, 67, 54, 0.15));
  color: var(--negative);
  border-color: rgba(244, 67, 54, 0.5);
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.2);
}

/* ------------------
   Account Header
   ------------------ */
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  margin-top: 40px;
  gap: 12px;
}

.account-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  flex: 1;
  line-height: 1.3;
  background: linear-gradient(135deg, var(--primary), #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.account-type-badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.account-type-badge.funded {
  background: linear-gradient(135deg, 
    rgba(76, 175, 80, 0.25), 
    rgba(76, 175, 80, 0.15));
  color: var(--positive);
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.account-type-badge.challenge {
  background: linear-gradient(135deg, 
    rgba(52, 152, 219, 0.25), 
    rgba(52, 152, 219, 0.15));
  color: var(--info);
  border: 1px solid rgba(52, 152, 219, 0.4);
}

/* ------------------
   Account Balance
   ------------------ */
.account-balance {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 20px;
  background: linear-gradient(135deg, 
    var(--primary), 
    #ffd700, 
    var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(255, 154, 60, 0.3);
  letter-spacing: -1px;
}

/* ------------------
   Account Stats Grid
   ------------------ */
.account-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.account-stat {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02));
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.account-stat:hover {
  background: linear-gradient(135deg, 
    rgba(255, 154, 60, 0.12),
    rgba(255, 154, 60, 0.05));
  border-color: var(--glass-border);
  transform: translateY(-2px);
}

.account-stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.account-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.account-stat-value.positive {
  color: var(--positive);
}

.account-stat-value.negative {
  color: var(--negative);
}

/* ------------------
   Account Actions
   ------------------ */
.account-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ------------------
   Selects and Priority Controls (Accounts)
   ------------------ */
.account-type-select,
.account-status-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  margin-bottom: 12px;
}

.priority-options {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.priority-option {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.priority-option.active {
  transform: translateY(-2px);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(255,154,60,0.12);
}

.priority-option.high { color: var(--negative); }
.priority-option.medium { color: var(--warning); }
.priority-option.low { color: var(--info); }

.btn-edit,
.btn-delete {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-edit {
  background: linear-gradient(135deg, 
    rgba(52, 152, 219, 0.25),
    rgba(52, 152, 219, 0.15));
  border: 1px solid rgba(52, 152, 219, 0.5);
  color: var(--info);
}

.btn-edit:hover {
  background: linear-gradient(135deg, 
    rgba(52, 152, 219, 0.35),
    rgba(52, 152, 219, 0.20));
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
  transform: translateY(-2px);
}

.btn-delete {
  background: linear-gradient(135deg, 
    rgba(244, 67, 54, 0.25),
    rgba(244, 67, 54, 0.15));
  border: 1px solid rgba(244, 67, 54, 0.5);
  color: var(--negative);
}

.btn-delete:hover {
  background: linear-gradient(135deg, 
    rgba(244, 67, 54, 0.35),
    rgba(244, 67, 54, 0.20));
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.3);
  transform: translateY(-2px);
}

/* ============================================
   FIX DEFINITIVO: STATUS TOGGLE BUTTON
   ============================================ */

/* Resetear cualquier estilo previo */
button.status-toggle,
.status-toggle {
  all: unset;
  box-sizing: border-box;
}

/* Estilos base del botón */
button.status-toggle,
.status-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

/* Estado ACTIVA (por defecto - verde) */
button.status-toggle:not(.burned):not(.superado),
.status-toggle:not(.burned):not(.superado) {
  background: linear-gradient(135deg, 
    rgba(76, 175, 80, 0.25), 
    rgba(76, 175, 80, 0.15));
  color: var(--positive);
  border-color: rgba(76, 175, 80, 0.5);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

button.status-toggle:not(.burned):not(.superado):hover,
.status-toggle:not(.burned):not(.superado):hover {
  background: linear-gradient(135deg, 
    rgba(76, 175, 80, 0.35), 
    rgba(76, 175, 80, 0.20));
  border-color: var(--positive);
  box-shadow: 0 6px 25px rgba(76, 175, 80, 0.4);
  transform: translateY(-2px);
}

/* Estado BURNED (rojo) */
button.status-toggle.burned,
.status-toggle.burned {
  background: linear-gradient(135deg, 
    rgba(244, 67, 54, 0.25), 
    rgba(244, 67, 54, 0.15));
  color: var(--negative);
  border-color: rgba(244, 67, 54, 0.5);
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.2);
}

button.status-toggle.burned:hover,
.status-toggle.burned:hover {
  background: linear-gradient(135deg, 
    rgba(244, 67, 54, 0.35), 
    rgba(244, 67, 54, 0.20));
  border-color: var(--negative);
  box-shadow: 0 6px 25px rgba(244, 67, 54, 0.4);
  transform: translateY(-2px);
}

/* Estado SUPERADO (amarillo/naranja) */
button.status-toggle.superado,
.status-toggle.superado {
  background: linear-gradient(135deg, 
    rgba(255, 193, 7, 0.25), 
    rgba(255, 193, 7, 0.15));
  color: var(--warning);
  border-color: rgba(255, 193, 7, 0.5);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

button.status-toggle.superado:hover,
.status-toggle.superado:hover {
  background: linear-gradient(135deg, 
    rgba(255, 193, 7, 0.35), 
    rgba(255, 193, 7, 0.20));
  border-color: var(--warning);
  box-shadow: 0 6px 25px rgba(255, 193, 7, 0.4);
  transform: translateY(-2px);
}

/* Iconos dentro del botón */
#statusIcon {
  font-size: 18px;
  line-height: 1;
  display: inline-block;
}

#statusText {
  font-weight: 800;
  letter-spacing: 1px;
  display: inline-block;
}

/* Estado activo al hacer click */
button.status-toggle:active,
.status-toggle:active {
  transform: translateY(0) scale(0.98);
}

/* ============================================
   RESPONSIVE MOBILE - ACCOUNTS
   ============================================ */
@media (max-width: 768px) {
  .accounts-grid {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .account-card {
    padding: 20px;
  }

  .account-balance {
    font-size: 28px;
  }

  .account-stats {
    grid-template-columns: 1fr;
  }

  .account-actions {
    flex-direction: column;
  }

  .btn-edit,
  .btn-delete {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .account-balance {
    font-size: 24px;
  }

  .account-name {
    font-size: 16px;
  }
}
}

/* ============================================
   NOTAS CARD - VISUALIZACIÓN DESTACADA
   ============================================ */

/* Contenedor de nota guardada (card destacada) */
.notes-card-container {
  margin: 20px 0;
  padding: 0;
}

.notes-card-container:empty {
  display: none;
  margin: 0;
  padding: 0;
}

.notes-card {
  background: linear-gradient(135deg, rgba(255, 154, 60, 0.15), rgba(255, 154, 60, 0.08));
  border: 2px solid rgba(255, 154, 60, 0.4);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(255, 154, 60, 0.15);
  transition: all 0.3s ease;
}

.notes-card:hover {
  border-color: rgba(255, 154, 60, 0.6);
  box-shadow: 0 12px 48px rgba(255, 154, 60, 0.25);
  transform: translateY(-2px);
}

.notes-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 154, 60, 0.2);
}

.notes-card-date {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.notes-card-sentiment {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
}

.notes-card-outcome {
  display: inline-block;
  background: rgba(255, 154, 60, 0.2);
  color: #ffa500;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.notes-card-outcome.ganador {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.notes-card-outcome.perdedor {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.notes-card-outcome.break_even {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
}

.notes-card-outcome.neutral {
  background: rgba(155, 155, 155, 0.2);
  color: #9b9b9b;
}

.notes-card-text {
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  margin: 12px 0 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid #ffa500;
  border-radius: 4px;
}

.notes-card-empty {
  text-align: center;
  color: var(--muted);
  padding: 30px;
  font-style: italic;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px dashed rgba(255, 154, 60, 0.2);
}

/* End of styles.css */

/* Modal show helper: prefer adding/removing 'show' class instead of inline display styles
   This ensures the modal uses flex centering (vertical + horizontal) regardless of inline styles. */
.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.show .modal-content {
  margin: 0;
}

:root {
  --modal-max-h: 50vh;
}

body.modal-open {
  overflow: hidden !important;
}

#dayModal {
  overscroll-behavior: contain;
  touch-action: none;
}

#dayModal > div {
  overscroll-behavior: contain;
}

/* Global modal sizing + scroll lock behavior */
.modal,
[id$="Modal"] {
  overscroll-behavior: contain;
}

.modal-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}

@media (max-width: 640px) {
  .modal .modal-content,
  [id$="Modal"]:not(#planManagerModal) > div {
    height: var(--modal-max-h) !important;
    max-height: var(--modal-max-h) !important;
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  #currentBalance {
    font-size: clamp(1.1rem, 5.2vw, 1.4rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
  }

  #mainDashboardGrid {
    overflow: visible !important;
  }

  #shortsVsLongsSection,
  #emotionalControlSection {
    overflow: visible !important;
  }

  #shortsLongsContent,
  #shortsLongsContent .group {
    overflow: visible !important;
  }

  .info-tooltip > div {
    left: 0 !important;
    right: auto !important;
    max-width: calc(100vw - 32px);
  }

  #detailedStats {
    max-width: calc(100vw - 24px);
  }
}

@media (min-width: 1024px) {
  #mainDashboardGrid {
    overflow: visible !important;
  }
}

/* Estado bloqueado para botón de eventos (journal) */
#syncEventsBtn.is-disabled,
#syncEventsBtn:disabled{
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.2) saturate(0.7);
  transform: none !important;
  box-shadow: none !important;
}

/* Calendar shell: evitar sombras/artefactos en el borde derecho */
.calendar-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-clip: padding-box;
  box-shadow: none !important;
  filter: none !important;
}

.calendar-shell .weekly-summary,
.calendar-shell .days-grid,
.calendar-shell .day-cell,
.calendar-shell .weekend-cell {
  box-shadow: none !important;
  filter: none !important;
}

/* Evitar halo/blanco intermitente en cards específicas */
#profitFactorCard,
#rachaActualCard {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background-color: rgba(30, 41, 59, 0.6) !important;
  box-shadow: none !important;
  filter: none !important;
  background-clip: padding-box;
}

/* KPI cards: quitar blur/sombras para evitar halo intermitente */
#kpiCardsGrid > div {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  filter: none !important;
  background-color: rgba(30, 41, 59, 0.6) !important;
  background-clip: padding-box;
}

/* ============================================
   NOTIFICACIÓN FLOTANTE - SINCRONIZACIÓN
   ============================================ */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(2rem);
  }
}

@keyframes slideOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-2rem);
  }
}

.animate-slideInUp {
  animation: slideInUp 0.4s ease-out;
}

.animate-slideOutDown {
  animation: slideOutDown 0.3s ease-out;
}

.animate-slideOutUp {
  animation: slideOutUp 0.3s ease-out;
}