/* Component Styles - Matching iOS Broc Design System */

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brokerly-elevated);
  border: 1px solid var(--brokerly-border);
  box-shadow: var(--shadow-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-premium);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle svg {
  position: absolute;
  color: var(--brokerly-text-primary);
  transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.8);
}

[data-theme="light"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.8);
}

[data-theme="light"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ===== BASE COMPONENTS ===== */

.app-container {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: var(--brokerly-background);
  color: var(--brokerly-text-primary);
  position: relative;
}

/* ===== FADE IN TRANSITION ===== */

/* Fade in effect when loading sandbox from landing page */
body.sandbox-fade-in {
  animation: sandboxFadeIn 0.6s ease-out;
}

@keyframes sandboxFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ===== SCREEN MANAGEMENT ===== */

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  transform: translateY(20px);
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== LOADING SCREEN ===== */

.loading-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
}

.app-logo {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--brokerly-primary);
  margin: 0;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(194, 196, 181, 0.2);
  border-top: 3px solid #ff6f61;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.loading-text {
  font-size: var(--font-size-base);
  color: var(--brokerly-text-secondary);
  margin-top: var(--spacing-md);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ===== ONBOARDING BACKGROUND ===== */

.onboarding-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      var(--brokerly-background) 0%,
      rgba(26, 127, 230, 0.02) 50%,
      var(--brokerly-secondary-background) 100%);
  overflow: hidden;
}

.background-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float 6s ease-in-out infinite;
}

.shape-coral {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #FF6F61 0%, #E6574D 70%);
  top: 30%;
  left: -50px;
  animation: floatCoral 6s ease-in-out infinite;
  animation-delay: 0s;
}

.shape-gold {
  width: 150px;
  height: 120px;
  background: linear-gradient(135deg, #FFD700 0%, #E6C200 100%);
  border-radius: 40px;
  top: -40px;
  right: 25%;
  animation: floatGold 6s ease-in-out infinite;
  animation-delay: 1s;
}

.shape-emerald {
  width: 180px;
  height: 100px;
  background: linear-gradient(135deg, #50C878 0%, #47B36B 100%);
  border-radius: 50%;
  top: 60%;
  right: -40px;
  animation: floatEmerald 6s ease-in-out infinite;
  animation-delay: 2s;
}

.shape-blue {
  width: 130px;
  height: 160px;
  background: radial-gradient(circle, #009ED9 0%, #008BC2 60%);
  border-radius: 30px;
  bottom: -50px;
  left: 40%;
  animation: floatBlue 6s ease-in-out infinite;
  animation-delay: 3s;
}

.shape-accent {
  width: 80px;
  height: 80px;
  background: #FF6F61;
  top: 50%;
  left: 50%;
  animation: float 6s ease-in-out infinite;
  animation-delay: 4s;
}

.shape-clive {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  top: 15%;
  right: 10%;
  animation: floatClive 6s ease-in-out infinite;
  animation-delay: 2.5s;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.shape-clara {
  width: 95px;
  height: 75px;
  background: linear-gradient(135deg, #66C9BA 0%, #4FAFA6 100%);
  border-radius: 45%;
  bottom: 20%;
  left: 15%;
  animation: floatClara 6s ease-in-out infinite;
  animation-delay: 1.5s;
  box-shadow: 0 4px 20px rgba(102, 201, 186, 0.3);
}

/* Base float animation (for accent shape) */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }

  50% {
    transform: translateY(-20px) rotate(5deg) scale(1.5);
  }
}

/* Individual shape animations with preserved rotations */
@keyframes floatCoral {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }

  50% {
    transform: translateY(-20px) rotate(5deg) scale(1.5);
  }
}

@keyframes floatGold {

  0%,
  100% {
    transform: translateY(0px) rotate(15deg) scale(1);
  }

  50% {
    transform: translateY(-20px) rotate(20deg) scale(1.5);
  }
}

@keyframes floatEmerald {

  0%,
  100% {
    transform: translateY(0px) rotate(-20deg) scale(1);
  }

  50% {
    transform: translateY(-20px) rotate(-15deg) scale(1.5);
  }
}

@keyframes floatBlue {

  0%,
  100% {
    transform: translateY(0px) rotate(45deg) scale(1);
  }

  50% {
    transform: translateY(-20px) rotate(50deg) scale(1.5);
  }
}

@keyframes floatClive {

  0%,
  100% {
    transform: translateY(0px) rotate(25deg) scale(1);
  }

  50% {
    transform: translateY(-20px) rotate(30deg) scale(1.5);
  }
}

@keyframes floatClara {

  0%,
  100% {
    transform: translateY(0px) rotate(-15deg) scale(1);
  }

  50% {
    transform: translateY(-20px) rotate(-10deg) scale(1.5);
  }
}

/* ===== ONBOARDING COMPONENTS ===== */

.onboarding-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  z-index: 10;
}

.onboarding-step {
  display: none;
  width: 100%;
  max-width: 400px;
  animation: slideIn 0.5s ease-out;
}

.onboarding-step.active {
  display: block;
}

.onboarding-content {
  background: var(--modern-card-background);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-high);
  backdrop-filter: blur(20px);
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  border: 1px solid var(--brokerly-border-light);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Welcome Section */
.welcome-section {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.welcome-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-md);
}

.welcome-subtitle {
  font-size: var(--font-size-base);
  color: var(--brokerly-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* Auth Buttons */
.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--button-height-lg);
  padding: 0 var(--button-padding-x);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  outline: none;
}

.auth-button-primary {
  background: var(--gradient-primary);
  color: white;
}

.auth-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-premium);
}

.auth-button-secondary {
  background: var(--brokerly-secondary-background);
  color: var(--brokerly-primary);
  border: 2px solid var(--brokerly-primary);
}

.auth-button-secondary:hover {
  background: var(--brokerly-primary-light);
}

.auth-button-tertiary {
  background: transparent;
  color: var(--brokerly-text-secondary);
  border: 1px solid var(--brokerly-border);
}

.auth-button-tertiary:hover {
  background: var(--brokerly-tertiary-background);
}

/* SSO Buttons */
.auth-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.auth-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-sm);
}

.auth-subtitle {
  font-size: var(--font-size-base);
  color: var(--brokerly-text-secondary);
  line-height: var(--line-height-relaxed);
}

.sso-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.sso-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  height: var(--button-height-lg);
  padding: 0 var(--button-padding-x);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid var(--brokerly-border);
}

.sso-google {
  background: var(--modern-card-background);
  color: var(--brokerly-text-primary);
  border-color: var(--brokerly-border-medium);
}

.sso-google:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sso-apple {
  background: #000;
  color: white;
  border-color: #000;
}

.sso-apple:hover {
  background: #333;
}

.sso-email {
  background: var(--brokerly-primary);
  color: white;
  border-color: var(--brokerly-primary);
}

.sso-email:hover {
  background: var(--brokerly-primary-dark);
}

.sso-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

/* Form Components */
.step-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.step-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-sm);
}

.step-subtitle {
  font-size: var(--font-size-base);
  color: var(--brokerly-text-secondary);
  line-height: var(--line-height-normal);
}

.personal-details-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Form Components - Matching iOS OnboardingTextField exactly */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* iOS spacing between label and input */
  margin-bottom: 20px;
  /* iOS VStack spacing */
}

.form-group label {
  font-size: 15px;
  /* iOS subheadline */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
  line-height: 1.2;
}

.form-group input {
  padding: 14px 16px;
  /* iOS exact padding */
  border: 0.5px solid var(--brokerly-border);
  /* iOS modernBorder width */
  border-radius: 12px;
  /* iOS cornerRadius */
  background: var(--brokerly-tertiary-background);
  color: var(--brokerly-text-primary);
  font-size: 17px;
  /* iOS body font */
  font-weight: 400;
  /* iOS regular */
  line-height: 1.4;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus {
  outline: none;
  border-color: var(--brokerly-primary);
  box-shadow: 0 0 0 2px var(--brokerly-primary-light);
}

.form-group input::placeholder {
  color: var(--brokerly-text-tertiary);
  font-weight: 400;
}

/* Security Badges - Matching iOS */
.security-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--brokerly-primary-light);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-primary);
}

.security-badge svg {
  flex-shrink: 0;
}

/* Bank List - Vertical list matching iOS ConsolidatedBankConnectionView */
.bank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
}

.bank-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--brokerly-surface);
  border: 1px solid var(--brokerly-border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bank-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bank-row.connected {
  background: rgba(80, 200, 120, 0.06);
  border-color: rgba(80, 200, 120, 0.3);
}

.bank-row-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--modern-card-background);
  padding: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.bank-row.connected .bank-row-logo {
  box-shadow: 0 4px 8px rgba(80, 200, 120, 0.15), 0 8px 16px rgba(0, 0, 0, 0.04);
}

.bank-row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bank-row-name {
  font-size: 17px;
  /* iOS body */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
}

.bank-row-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  /* iOS caption */
  font-weight: 500;
  /* iOS medium */
}

.bank-row-status.connected {
  color: #50C878;
  /* Emerald green */
}

.bank-row-status.select {
  color: var(--brokerly-text-secondary);
}

.bank-row-status svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Bank Grid - Matching iOS BankSelectionCard layout */
.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  /* iOS spacing */
  margin-bottom: var(--spacing-lg);
  padding: 0 16px;
}

.bank-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  /* iOS card padding */
  min-height: 120px;
  /* iOS minHeight */
  background: var(--brokerly-surface);
  border: 1px solid var(--brokerly-border-light);
  border-radius: 12px;
  /* iOS cornerRadius */
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 12px;
  /* iOS VStack spacing */
}

.bank-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bank-card.connected {
  border-color: var(--brokerly-primary) !important;
  background: var(--brokerly-primary-light) !important;
  transform: scale(1.02);
  box-shadow: 0 0 0 2px var(--brokerly-primary-light);
}

.bank-card.connected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: var(--brokerly-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.bank-logo {
  width: 64px;
  /* iOS 80% of card height */
  height: 64px;
  border-radius: 8px;
  /* iOS logo corner radius */
  object-fit: contain;
  background: var(--modern-card-background);
  padding: 8px;
  flex-shrink: 0;
}

.bank-logo-fallback {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  flex-shrink: 0;
}

.bank-name {
  font-size: 15px;
  /* iOS subheadline */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
  text-align: center;
  line-height: 1.2;
  word-wrap: break-word;
}

/* AI Assistant Cards - Matching iOS BrokerAvatarView */
/* AI Avatar Selection - Matching iOS AIBrokerIntroView */
.ai-avatar-selection {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  /* iOS spacing between avatars */
  margin: 32px 0;
}

.ai-avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.ai-avatar-card:hover {
  transform: scale(1.02);
}

.ai-avatar-card.selected .ai-avatar-border {
  background: linear-gradient(135deg,
      #FF6F61,
      /* Coral */
      #FFD700,
      /* Gold */
      #50C878,
      /* Emerald */
      #007AA5,
      /* Cerulean */
      #007AFF,
      /* Primary */
      #FF6F61,
      /* Coral repeat */
      #FFD700,
      /* Gold repeat */
      #50C878
      /* Emerald repeat */
    );
  background-size: 200% 200%;
  animation: rotateGradient 3s linear infinite;
}

@keyframes rotateGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.ai-avatar-border {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: rgba(0, 122, 255, 0.1);
  /* Default subtle border */
  transition: all 0.3s ease;
}

.ai-avatar-card.selected .ai-avatar-border {
  transform: scale(1.05);
}

.ai-avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--modern-card-background);
}

.ai-avatar-name {
  font-size: 15px;
  /* iOS subheadline */
  font-weight: 500;
  /* iOS medium */
  color: var(--brokerly-text-secondary);
  transition: all 0.2s ease;
}

.ai-avatar-card.selected .ai-avatar-name {
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-primary);
}

/* AI Introduction Message */
.ai-intro-message {
  background: var(--brokerly-surface);
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
  color: white;
  font-size: 15px;
  line-height: 1.5;
}

/* Clive's purple gradient */
.ai-intro-message.clive {
  background: var(--clive-gradient);
  box-shadow: 0 4px 12px var(--clive-glow);
}

/* Clara's teal gradient */
.ai-intro-message.clara {
  background: var(--clara-gradient);
  box-shadow: 0 4px 12px var(--clara-glow);
}

/* ========================================
   PROFILE SHEET - SANDBOX NOTICES
   ======================================== */

.sandbox-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 1px solid #F59E0B;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 16px;
}

.sandbox-notice-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.sandbox-notice-text {
  font-size: 14px;
  font-weight: 500;
  color: #92400E;
  flex: 1;
}

/* Settings items - disabled state */
.setting-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.setting-item.disabled .setting-status {
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  background: #F3F4F6;
  padding: 4px 8px;
  border-radius: 4px;
}

/* ========================================
   PROFILE SHEET - VERTICAL AI SELECTOR
   ======================================== */

.ai-assistant-selector-vertical {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

.ai-assistant-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--modern-card-background);
  border: 2px solid var(--brokerly-border-medium);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.ai-assistant-card:hover {
  border-color: #007AFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 122, 255, 0.15);
}

.ai-assistant-card.selected {
  border-color: #007AFF;
  background: linear-gradient(135deg, #EBF5FF 0%, #F0F9FF 100%);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.ai-assistant-avatar {
  flex-shrink: 0;
}

.ai-assistant-avatar .ai-avatar-border {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 2px;
  background: rgba(0, 122, 255, 0.1);
  transition: all 0.3s ease;
}

.ai-assistant-card.selected .ai-assistant-avatar .ai-avatar-border {
  background: linear-gradient(135deg,
      #FF6F61,
      /* Coral */
      #FFD700,
      /* Gold */
      #50C878,
      /* Emerald */
      #007AA5,
      /* Cerulean */
      #007AFF,
      /* Primary */
      #FF6F61,
      /* Coral repeat */
      #FFD700,
      /* Gold repeat */
      #50C878
      /* Emerald repeat */
    );
  background-size: 300% 300%;
  animation: gradientShift 3s ease infinite;
  transform: scale(1.05);
}

.ai-assistant-avatar .ai-avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--modern-card-background);
}

.ai-assistant-avatar .ai-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
}

.ai-assistant-info {
  flex: 1;
  min-width: 0;
}

.ai-assistant-name {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 4px;
}

.ai-assistant-description {
  font-size: 13px;
  line-height: 1.4;
  color: #6B7280;
  margin: 0;
}

.ai-assistant-selector {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-selector-ring {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--brokerly-border-medium);
  background: var(--modern-card-background);
  transition: all 0.3s ease;
  position: absolute;
}

.ai-assistant-card:hover .ai-selector-ring {
  border-color: #007AFF;
  transform: scale(1.1);
}

.ai-selector-ring.selected {
  border-color: #007AFF;
  background: #007AFF;
  transform: scale(1.1);
}

.ai-checkmark {
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  z-index: 2;
  color: white;
}

.ai-checkmark.visible {
  opacity: 1;
  transform: scale(1);
}

/* Gradient animation for selected AI assistant */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .ai-assistant-card {
    padding: 12px;
    gap: 12px;
  }

  .ai-assistant-avatar .ai-avatar-border {
    width: 50px;
    height: 50px;
  }

  .ai-assistant-avatar .ai-avatar-fallback {
    font-size: 20px;
  }

  .ai-assistant-name {
    font-size: 15px;
  }

  .ai-assistant-description {
    font-size: 12px;
  }
}

.ai-intro-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-intro-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--modern-card-background);
  border: 2px solid var(--brokerly-border);
}

.ai-intro-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

.ai-intro-message.clive .ai-intro-name,
.ai-intro-message.clara .ai-intro-name {
  color: white;
}

.ai-intro-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--brokerly-text-secondary);
  margin: 0;
}

.ai-intro-message.clive .ai-intro-text,
.ai-intro-message.clara .ai-intro-text {
  color: white;
  opacity: 0.95;
}

/* Headlines/Swipeable Cards - Matching iOS HeadlinesView */
.onboarding-content-swipe {
  max-height: calc(100vh - 150px);
  overflow: visible;
  /* Allow cards to move outside container */
}

.headlines-header {
  margin-bottom: 24px;
}

.ai-speech-bubble {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
}

/* Card-style speech bubble with avatar inside */
.ai-speech-bubble-card {
  width: 100%;
  max-width: 100%;
}

.ai-bubble-content-card {
  width: 100%;
  background: var(--brokerly-surface);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--brokerly-border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-bubble-header-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-bubble-avatar-small {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #FF6F61, #FFD700, #50C878, #007AA5, #007AFF);
  padding: 2px;
}

.ai-bubble-avatar-small img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--modern-card-background);
}

.headlines-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 0;
  flex: 1;
}

.headlines-subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--brokerly-text-secondary);
  margin: 0;
}

.ai-bubble-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #FF6F61, #FFD700, #50C878, #007AA5, #007AFF);
  padding: 3px;
}

.ai-bubble-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--modern-card-background);
}

.ai-bubble-content {
  flex: 1;
  background: var(--brokerly-surface);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--brokerly-border-light);
  position: relative;
  max-width: 90%;
}

.ai-bubble-content::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 20px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--brokerly-surface);
}

.headlines-title {
  font-size: 20px;
  /* iOS title2 */
  font-weight: 700;
  /* iOS bold */
  color: var(--brokerly-text-primary);
  margin: 0 0 8px 0;
}

.headlines-subtitle {
  font-size: 15px;
  /* iOS body */
  font-weight: 400;
  /* iOS regular */
  color: var(--brokerly-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Swipeable Cards Container */
.swipe-cards-container {
  position: relative;
  width: 100%;
  min-height: 450px;
  /* Accommodate standard card heights (336px base + stacking offset) */
  margin: 20px 0;
  perspective: 1000px;
}

/* Adjust height for larger cards on bigger screens */
@media (min-width: 1024px) {
  .swipe-cards-container {
    min-height: 500px;
    /* For 364px cards + stacking */
  }
}

@media (min-width: 1440px) {
  .swipe-cards-container {
    min-height: 550px;
    /* For 392px cards + stacking */
  }
}

@media (min-width: 1920px) {
  .swipe-cards-container {
    min-height: 580px;
    /* For 420px cards + stacking */
  }
}

.swipe-card {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  background: var(--modern-card-background);
  border-radius: 20px;
  padding: 28px;
  box-shadow:
    0 8px 15px rgba(0, 0, 0, 0.15),
    0 15px 30px rgba(0, 0, 0, 0.06);
  cursor: grab;
  user-select: none;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease, box-shadow 0.3s ease;
  border: 3px solid transparent;
}

.swipe-card:active {
  cursor: grabbing;
  box-shadow:
    0 15px 25px rgba(0, 0, 0, 0.25),
    0 25px 50px rgba(0, 0, 0, 0.12);
}

/* Priority-based card colors matching iOS - SOLID GRADIENTS */
.swipe-card.priority-urgent {
  background: linear-gradient(135deg, #E66152, #FF6F61, #F26859, #D9594A);
  border-color: rgba(255, 111, 97, 0.8);
  box-shadow:
    0 8px 15px rgba(255, 111, 97, 0.3),
    0 15px 30px rgba(0, 0, 0, 0.15);
}

.swipe-card.priority-high {
  background: linear-gradient(135deg, #E6C200, #FFD700, #F2CC0D, #CCAB00);
  border-color: rgba(255, 215, 0, 0.8);
  box-shadow:
    0 8px 15px rgba(255, 215, 0, 0.3),
    0 15px 30px rgba(0, 0, 0, 0.15);
}

.swipe-card.priority-medium {
  background: linear-gradient(135deg, #3DB063, #50C878, #47BD6E, #33A358);
  border-color: rgba(80, 200, 120, 0.8);
  box-shadow:
    0 8px 15px rgba(80, 200, 120, 0.3),
    0 15px 30px rgba(0, 0, 0, 0.15);
}

.swipe-card.priority-medium-low {
  background: linear-gradient(135deg, #006688, #007AA5, #00739B, #005E7A);
  border-color: rgba(0, 122, 165, 0.8);
  box-shadow:
    0 8px 15px rgba(0, 122, 165, 0.3),
    0 15px 30px rgba(0, 0, 0, 0.15);
}

.swipe-card.priority-low {
  background: linear-gradient(135deg, #F5F5F7, #FFFFFF, #FAFAFA, #F0F0F2);
  border-color: #E5E7EB;
  box-shadow:
    0 8px 15px rgba(0, 0, 0, 0.08),
    0 15px 30px rgba(0, 0, 0, 0.04);
}

/* White text on colored cards */
.swipe-card.priority-urgent,
.swipe-card.priority-high,
.swipe-card.priority-medium,
.swipe-card.priority-medium-low {
  color: white;
}

.swipe-card.priority-urgent .swipe-card-category,
.swipe-card.priority-high .swipe-card-category,
.swipe-card.priority-medium .swipe-card-category,
.swipe-card.priority-medium-low .swipe-card-category,
.swipe-card.priority-urgent .swipe-card-title,
.swipe-card.priority-high .swipe-card-title,
.swipe-card.priority-medium .swipe-card-title,
.swipe-card.priority-medium-low .swipe-card-title,
.swipe-card.priority-urgent .swipe-card-description,
.swipe-card.priority-high .swipe-card-description,
.swipe-card.priority-medium .swipe-card-description,
.swipe-card.priority-medium-low .swipe-card-description {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.swipe-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.swipe-card-category {
  font-size: 10px;
  font-weight: 900;
  /* iOS black weight */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  background: linear-gradient(135deg, #737376, #8C8C8E);
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(115, 115, 118, 0.3);
}

.swipe-card-savings {
  font-size: 24px;
  /* iOS large, bold */
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Override savings color for low priority (dark text) */
.swipe-card.priority-low .swipe-card-savings {
  color: #50C878;
  /* Emerald for low priority cards */
  text-shadow: none;
}

.swipe-card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 0 0 12px 0;
}

.swipe-card-description {
  font-size: 15px;
  font-weight: 400;
  color: var(--brokerly-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Stacking effect for multiple cards - Matching iOS deck */
.swipe-card.top {
  z-index: 3;
  pointer-events: auto;
}

.swipe-card.second {
  transform: translateX(calc(-50% + 10px)) scale(0.92) translateY(18px) rotate(4deg);
  opacity: 0.85;
  z-index: 2;
  filter: brightness(0.95);
  pointer-events: none;
  /* Can't interact with cards below */
}

.swipe-card.third {
  transform: translateX(calc(-50% + 20px)) scale(0.84) translateY(36px) rotate(-4deg);
  opacity: 0.65;
  z-index: 1;
  filter: brightness(0.9);
  pointer-events: none;
  /* Can't interact with cards below */
}

.swipe-card:nth-child(n+4) {
  display: none;
}

/* Swipe animations */
.swipe-card.swiping-left {
  transform: translateX(-200%) rotate(-20deg) !important;
  opacity: 0 !important;
  transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.4s ease !important;
  z-index: 10 !important;
  /* Keep above other cards during swipe */
}

.swipe-card.swiping-right {
  transform: translateX(100%) rotate(20deg) !important;
  opacity: 0 !important;
  transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.4s ease !important;
  z-index: 10 !important;
  /* Keep above other cards during swipe */
}

/* Completion */
.swipe-completion {
  text-align: center;
  padding: 40px 20px;
}

.completion-icon-circle {
  margin: 0 auto 20px;
}

.swipe-completion .completion-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 0 0 8px 0;
}

.swipe-completion .completion-subtitle {
  font-size: 17px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  margin: 0;
}

.ai-assistants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  padding: 0 16px;
  margin-bottom: var(--spacing-lg);
}

.ai-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: var(--brokerly-surface);
  border: 1px solid var(--brokerly-border-light);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 12px;
}

.ai-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ai-card.selected {
  border-color: var(--brokerly-primary);
  background: var(--brokerly-primary-light);
  transform: scale(1.02);
}

.ai-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ai-card.selected .ai-avatar::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
      #FF6F61,
      /* Coral */
      #FFD700,
      /* Gold */
      #50C878,
      /* Emerald */
      #007BA7,
      /* Cerulean */
      var(--brokerly-primary),
      #FF6F61
      /* Back to coral for smooth loop */
    );
  z-index: -1;
  animation: rotateBorder 3s linear infinite;
}

@keyframes rotateBorder {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.ai-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  background: var(--modern-card-background);
}

.ai-avatar .fallback-avatar {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--brokerly-primary) 0%, rgba(26, 127, 230, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 35px;
  font-weight: 500;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.ai-name {
  font-size: 17px;
  /* iOS headline */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
  text-align: center;
}

.ai-description {
  font-size: 13px;
  /* iOS caption1 */
  font-weight: 500;
  /* iOS medium */
  color: var(--brokerly-text-secondary);
  text-align: center;
  line-height: 1.3;
}

/* Broc Logo - Matching iOS design */
.brokerly-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  /* iOS spacing */
}

.logo-image {
  width: 150px;
  height: 150px;
  border-radius: 30px;
  /* iOS cornerRadius */
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(26, 127, 230, 0.3);
  /* iOS modernShadow medium */
  transition: transform 0.2s ease;
}

.logo-image:hover {
  transform: scale(1.02);
}

/* Fallback logo placeholder (if image doesn't load) */
.logo-placeholder {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, var(--brokerly-primary) 0%, var(--brokerly-primary-dark) 100%);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 60px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(26, 127, 230, 0.3);
  transition: transform 0.2s ease;
}

.logo-placeholder:hover {
  transform: scale(1.02);
}

.bank-description {
  font-size: var(--font-size-sm);
  color: var(--brokerly-text-secondary);
}

/* Success Content */
.success-content {
  text-align: center;
}

.success-icon {
  font-size: 64px;
  margin-bottom: var(--spacing-lg);
}

.success-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-sm);
}

.success-subtitle {
  font-size: var(--font-size-base);
  color: var(--brokerly-text-secondary);
  margin-bottom: var(--spacing-xl);
}

.connected-banks {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.connected-bank {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--brokerly-primary-light);
  border-radius: var(--radius-md);
}

/* AI Assistants */
.ai-assistants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.ai-assistant-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-xl);
  background: var(--modern-card-background);
  border: 2px solid var(--brokerly-border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.ai-assistant-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.ai-assistant-card.selected {
  border-color: var(--brokerly-primary);
  background: var(--brokerly-primary-light);
}

.ai-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  position: relative;
}

.ai-avatar::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brokerly-primary), var(--brokerly-neon-accent), var(--brokerly-gold), var(--brokerly-primary));
  z-index: -1;
  animation: rotate 3s linear infinite;
}

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

  to {
    transform: rotate(360deg);
  }
}

.avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.avatar-initial {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: white;
}

.ai-name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-xs);
}

.ai-description {
  font-size: var(--font-size-sm);
  color: var(--brokerly-text-secondary);
  line-height: var(--line-height-normal);
}

/* Goals Grid */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.goal-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--modern-card-background);
  border: 2px solid var(--brokerly-border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.goal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.goal-card.selected {
  border-color: var(--brokerly-primary);
  background: var(--brokerly-primary-light);
}

.goal-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--brokerly-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  flex-shrink: 0;
}

.goal-info {
  flex: 1;
}

.goal-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-xs);
}

.goal-description {
  font-size: var(--font-size-sm);
  color: var(--brokerly-text-secondary);
}

.custom-goal {
  margin-top: var(--spacing-md);
}

.custom-goal input {
  width: 100%;
  height: var(--input-height);
  padding: 0 var(--input-padding-x);
  border: 1px solid var(--brokerly-border);
  border-radius: var(--input-border-radius);
  background: var(--brokerly-tertiary-background);
  color: var(--brokerly-text-primary);
  font-size: var(--font-size-base);
}

/* Goal Setting Step - iOS Style */
.goal-setting-bubble {
  margin-bottom: 32px;
}

.goals-section {
  margin-bottom: 24px;
}

.goals-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin-bottom: 16px;
}

.goals-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.goal-selection-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--modern-card-background);
  border: 1px solid var(--brokerly-border-light);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.goal-selection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.goal-selection-card.selected {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-color: transparent;
}

.goal-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.6s ease;
}

.goal-icon-emoji {
  font-size: 24px;
}

.goal-card-content {
  flex: 1;
}

.goal-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin-bottom: 4px;
}

.goal-card-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--brokerly-text-secondary);
}

.goal-card-checkbox {
  flex-shrink: 0;
}

.checkbox-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--brokerly-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  opacity: 0.3;
}

.goal-selection-card.selected .checkbox-circle {
  opacity: 1;
}

.goal-selection-card.selected .checkbox-circle::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.custom-goal-section {
  margin-top: 24px;
}

.custom-goal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin-bottom: 16px;
}

.custom-goal-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-goal-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

.custom-goal-input {
  width: 100%;
  padding: 14px 16px;
  border: 0.5px solid var(--brokerly-border);
  border-radius: 12px;
  background: var(--brokerly-tertiary-background);
  color: var(--brokerly-text-primary);
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.custom-goal-input:focus {
  outline: none;
  border-color: var(--brokerly-primary);
  border-width: 1.5px;
}

/* Analysis Content */
.analysis-content {
  text-align: center;
}

.analysis-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--brokerly-text-primary);
  margin: var(--spacing-lg) 0;
}

.analysis-insights {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  text-align: left;
}

.insight-item {
  padding: var(--spacing-md);
  background: var(--brokerly-tertiary-background);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--brokerly-primary);
}

.insight-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-xs);
}

.insight-description {
  font-size: var(--font-size-sm);
  color: var(--brokerly-text-secondary);
  line-height: var(--line-height-normal);
}

/* Completion Content */
.completion-content {
  text-align: center;
}

.completion-icon {
  font-size: 64px;
  margin-bottom: var(--spacing-lg);
}

.completion-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-sm);
}

.completion-subtitle {
  font-size: var(--font-size-base);
  color: var(--brokerly-text-secondary);
  margin-bottom: var(--spacing-xl);
}

.completion-summary {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--brokerly-tertiary-background);
  border-radius: var(--radius-md);
}

.summary-label {
  font-size: var(--font-size-base);
  color: var(--brokerly-text-secondary);
}

.summary-value {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--brokerly-text-primary);
}

/* Onboarding Navigation */
.onboarding-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  background: var(--modern-card-background);
  border-top: 1px solid var(--brokerly-border-light);
  backdrop-filter: blur(20px);
  z-index: 100;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  outline: none;
}

.nav-back {
  background: transparent;
  color: var(--brokerly-text-secondary);
}

.nav-back:hover:not(:disabled) {
  background: var(--brokerly-tertiary-background);
  color: var(--brokerly-text-primary);
}

.nav-back:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-continue {
  background: var(--gradient-primary);
  color: white;
}

.nav-continue:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.progress-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.progress-bar {
  width: 120px;
  height: 4px;
  background: var(--brokerly-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
  width: 12.5%;
  /* 1/8 steps */
}

.progress-text {
  font-size: var(--font-size-xs);
  color: var(--brokerly-text-tertiary);
  font-weight: var(--font-weight-medium);
}

/* ===== TAB NAVIGATION ===== */

/* Tab Navigation - Matching iOS CustomTabBar */
.tab-navigation {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  height: calc(var(--tab-height) + env(safe-area-inset-bottom, 0px));
  min-height: calc(var(--tab-height) + env(safe-area-inset-bottom, 0px));
  max-height: none;
  /* Allow safe area expansion on mobile */
  padding: 8px 16px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--brokerly-background);
  border-top: 0.5px solid var(--brokerly-border-light);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1);
  z-index: var(--z-tab-navigation);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: visible;
  transform: translateZ(0);
  /* Force GPU acceleration to prevent scrolling */
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  /* iOS spacing between icon and label */
  padding: 8px 4px;
  border-radius: 0;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--brokerly-text-tertiary);
}

.tab-item.active {
  color: var(--brokerly-primary);
}

.tab-item:hover {
  background: none;
  opacity: 0.7;
}

.tab-item:active {
  transform: scale(0.95);
}

.tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  /* iOS tab bar icon size */
  height: 28px;
}

.tab-icon svg {
  width: 24px;
  height: 24px;
}

.tab-label {
  font-size: 10px;
  /* iOS caption2 */
  font-weight: 500;
  /* iOS medium */
  text-align: center;
  line-height: 1;
}

/* AI Tab Special Styling */
/* AI Tab Special Styling - Matching iOS CustomAITabItem */
.ai-tab {
  position: relative;
  flex: 0 0 56px;
  /* Larger tap target for AI tab */
}

.ai-avatar-tab {
  position: relative;
  width: 48px;
  /* iOS AI tab avatar size */
  height: 48px;
  margin: 0 auto;
}

.ai-avatar-tab .avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--modern-card-background);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(26, 127, 230, 0.3);
  overflow: hidden;
}

.ai-avatar-tab .avatar-initial {
  font-size: 20px;
  /* iOS title3 */
  font-weight: 600;
  /* iOS semibold */
  color: white;
}

.ai-tab-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.ai-border-gradient {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg,
      #FF6F61,
      /* Coral */
      #FFD700,
      /* Gold */
      #50C878,
      /* Emerald */
      #007AA5,
      /* Cerulean */
      #007AFF,
      /* Primary */
      #FF6F61
      /* Coral repeat */
    );
  background-size: 200% 200%;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.ai-tab.active .ai-border-gradient {
  opacity: 1;
  animation: rotateGradient 3s linear infinite;
}

.ai-tab:hover .ai-border-gradient {
  opacity: 0.6;
}

@keyframes rotateGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ===== MAIN CONTENT VIEWS ===== */

.content-container {
  height: 100vh;
  padding-bottom: var(--tab-height);
  overflow: hidden;
}

.view {
  display: none;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.view.active {
  display: block;
}

.view-content {
  padding: 0 20px 100px 20px;
  /* iOS padding: horizontal 20, bottom for tab bar */
  padding-top: env(safe-area-inset-top, 20px);
}

/* View Headers - Matching iOS */
.view-header {
  padding: 10px 0 20px 0;
  /* iOS header spacing */
  margin-bottom: 0;
}

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

.greeting {
  flex: 1;
}

.greeting-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-xs);
}

.greeting-subtitle {
  font-size: var(--font-size-base);
  color: var(--brokerly-text-secondary);
}

.view-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 34px;
  /* iOS largeTitle */
  font-weight: 700;
  /* iOS bold */
  color: var(--brokerly-text-primary);
  margin: 0;
  line-height: 1.2;
}

.view-title-icon {
  color: var(--brokerly-primary);
  flex-shrink: 0;
}

.profile-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.profile-button:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

.profile-button:hover {
  transform: scale(1.05);
}

.profile-button:active {
  transform: scale(0.95);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 122, 255, 0.15);
  /* iOS primary with opacity */
}

.profile-initial {
  font-size: 17px;
  /* iOS body */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-primary);
}

/* ===== DEMO INDICATOR ===== */

/* Demo Indicator - Fixed position in header center-top */
.demo-indicator {
  position: fixed;
  bottom: 100px;
  /* Below feedback button, above tab bar */
  right: 16px;
  z-index: 10001;
  /* Above sheets/drawers */
  pointer-events: none;
}

.demo-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  backdrop-filter: blur(10px);
  overflow: hidden;
  white-space: nowrap;
}

.demo-label svg {
  min-width: 20px;
  width: 20px;
  height: 20px;
  margin: 0 12px;
  flex-shrink: 0;
}

.demo-label span {
  max-width: 0;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  padding-right: 0;
}

.demo-label:hover {
  background: rgba(0, 0, 0, 0.9);
  padding-right: 16px;
  width: auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.demo-label:hover span {
  max-width: 200px;
  opacity: 1;
  padding-right: 0;
}

.demo-label:active {
  transform: scale(0.95);
}

/* Demo bubble styles removed - now using modal */

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Demo bubble and related styles removed - now using modal */

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

.section-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--brokerly-text-primary);
  margin-bottom: var(--spacing-md);
}

.modern-card {
  background: var(--modern-card-background);
  border-radius: var(--card-border-radius);
  padding: var(--card-padding);
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--brokerly-border-light);
  transition: all var(--transition-fast);
}

.modern-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.premium-card {
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  padding: var(--card-padding);
  box-shadow: var(--shadow-premium);
  border: 1px solid var(--brokerly-primary-light);
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: var(--gradient-primary);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  opacity: 0.3;
}

/* Loading states */
.skeleton {
  background: linear-gradient(90deg, var(--brokerly-tertiary-background) 25%, var(--brokerly-border-light) 50%, var(--brokerly-tertiary-background) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.focus-ring:focus-visible {
  outline: 2px solid var(--brokerly-primary);
  outline-offset: 2px;
}

/* Smooth scrolling */
.smooth-scroll {
  scroll-behavior: smooth;
}

/* ===== OVERVIEW VIEW - MATCHING iOS ===== */

/* Quick Stats Section */
.quick-stats-section {
  padding: 20px;
  background: var(--brokerly-secondary-background);
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.quick-stats-section .section-title {
  font-size: 20px;
  /* iOS title3 */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
  margin: 0 0 16px 0;
}

.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 columns on mobile */
  gap: 16px;
}

/* 3 columns on larger screens to fit 6 metrics nicely */
@media (min-width: 768px) {
  .quick-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Back to 2 columns on very wide screens for better proportions */
@media (min-width: 1200px) {
  .quick-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.quick-stat-card {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
  width: 100%;
}

.quick-stat-card:hover {
  transform: translateY(-2px);
}

.quick-stat-card:active {
  transform: translateY(0);
}

.stat-content {
  padding: 18px;
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

/* Subtle gradient overlay for depth */
.stat-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(0, 0, 0, 0.02) 100%);
  pointer-events: none;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.stat-icon {
  font-size: 24px;
  font-weight: 600;
}

.drill-indicator {
  font-size: 20px;
  color: var(--brokerly-text-tertiary);
  font-weight: 300;
}

.stat-value {
  font-size: 30px;
  /* iOS title1 */
  font-weight: 700;
  /* iOS bold */
  color: var(--brokerly-text-primary);
  margin-bottom: 6px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 13px;
  /* iOS caption1 */
  font-weight: 500;
  /* iOS medium */
  color: var(--brokerly-text-secondary);
  position: relative;
  z-index: 1;
}

/* Top Priority Section */
.priority-actions {
  margin-bottom: 24px;
}

.priority-actions-section {
  display: flex;
  flex-direction: column;
}

.priority-actions-section .section-title {
  font-size: 20px;
  /* iOS title3 */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
  margin: 0 0 16px 0;
  display: block;
  text-align: left;
  visibility: visible;
  opacity: 1;
}

/* Section title inside cards */
.section-title-in-card {
  font-size: 20px;
  /* iOS title3 */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
  margin: 0 0 16px 0;
  text-align: left;
}

.priority-card {
  background: var(--modern-card-background);
  border-radius: 20px;
  /* iOS larger radius for priority cards */
  padding: 28px;
  box-shadow:
    0 8px 15px rgba(0, 0, 0, 0.08),
    0 4px 6px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--brokerly-border-light);
}

.priority-action .action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.action-priority {
  font-size: 10px;
  font-weight: 900;
  /* iOS black */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #737376, #8C8C8E);
  box-shadow: 0 1px 3px rgba(115, 115, 118, 0.3);
}

.action-priority.priority-urgent {
  background: linear-gradient(135deg, #E66152, #FF6F61);
}

.action-priority.priority-high {
  background: linear-gradient(135deg, #E6C200, #FFD700);
}

.action-priority.priority-medium {
  background: linear-gradient(135deg, #3DB063, #50C878);
}

.action-priority.priority-low {
  background: linear-gradient(135deg, #006688, #007AA5);
}

.action-savings {
  font-size: 24px;
  font-weight: 800;
  /* iOS heavy */
  color: var(--brokerly-text-primary);
}

.action-title {
  font-size: 24px;
  /* iOS title2 */
  font-weight: 700;
  /* iOS bold */
  color: var(--brokerly-text-primary);
  margin: 8px 0 12px 0;
  line-height: 1.2;
}

.action-description {
  font-size: 15px;
  /* iOS body */
  font-weight: 400;
  /* iOS regular */
  color: var(--brokerly-text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.action-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--brokerly-text-tertiary);
}

.action-timeframe,
.action-difficulty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-timeframe::before {
  content: '⏱️';
}

.action-difficulty::before {
  content: '📊';
}

/* ===== ACTIONS VIEW - MATCHING iOS ===== */

.actions-section {
  background: var(--brokerly-secondary-background);
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin: 0 20px;
}

.actions-header {
  padding: 16px;
}

.list-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-title h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin: 0;
}

.actions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 16px 16px 16px;
}

.action-card {
  padding: 20px;
  /* No default background - priority classes set this */
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.06);
}

.action-card.colored {
  color: white;
}

.action-card.urgent {
  background: linear-gradient(135deg, #E66152 0%, #FF6F61 25%, #F26859 50%, #D9594A 100%) !important;
  color: white !important;
}

.action-card.high {
  background: linear-gradient(135deg, #D9A621 0%, #FFD700 25%, #D9A621 50%, #B87A0A 100%) !important;
  color: white !important;
}

.action-card.medium {
  background: linear-gradient(135deg, #3DB063 0%, #50C878 25%, #47BD6E 50%, #33A358 100%) !important;
  color: white !important;
}

.action-card.mediumLow {
  background: linear-gradient(135deg, #0099D8 0%, #00B4D8 25%, #00A8CC 50%, #0088BB 100%) !important;
  color: white !important;
}

.action-card.low {
  background: linear-gradient(135deg, #F5F5F7 0%, #FFFFFF 25%, #FAFAFA 50%, #F0F0F2 100%) !important;
  color: #2C3E50 !important;
}

.action-card.completed {
  opacity: 0.7;
}

.card-content {
  position: relative;
  z-index: 1;
}

.card-header {
  margin-bottom: 16px;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.category-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
}

.impact-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
}

.savings-amount {
  margin-left: auto;
  font-size: 17px;
  font-weight: 700;
  color: white;
}

.action-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: inherit;
}

.action-description {
  font-size: 15px;
  font-weight: 400;
  margin: 0;
  color: inherit;
  opacity: 0.9;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.time-section {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: inherit;
  opacity: 0.9;
}

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

.time-separator {
  opacity: 0.5;
}

.do-with-ai-button {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.do-with-ai-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.do-with-ai-button:active {
  transform: translateY(0);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--brokerly-text-secondary);
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 15px;
  font-weight: 400;
  color: var(--brokerly-text-secondary);
  margin: 0 0 20px 0;
}

/* Discover Button - Matching iOS */
.discover-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 122, 255, 0.1);
  color: var(--brokerly-primary);
  border: none;
  border-radius: 24px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
}

.discover-button:hover {
  background: rgba(0, 122, 255, 0.15);
  transform: translateY(-1px);
}

.discover-button:active {
  transform: translateY(0);
}

.discover-button svg {
  width: 16px;
  height: 16px;
}

/* Filter Section - Matching iOS */
.filters-section {
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.time-filters {
  display: flex;
  gap: 12px;
  padding: 0;
}

.filter-button {
  flex-shrink: 0;
  padding: 12px 16px;
  background: var(--modern-card-background);
  color: var(--brokerly-text-primary);
  border: none;
  border-radius: 24px;
  font-size: 17px;
  /* iOS body */
  font-weight: 500;
  /* iOS medium */
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.filter-button:hover {
  background: var(--brokerly-primary-light);
  color: var(--brokerly-primary);
}

.filter-button.active {
  background: var(--brokerly-primary);
  color: white;
  box-shadow:
    0 4px 12px rgba(0, 122, 255, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Actions Container - Layout handled by actions-responsive.css */
/* .actions-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
} */

.actions-section {
  padding: 20px;
  background: var(--modern-card-background);
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
}

.actions-section-title {
  font-size: 20px;
  /* iOS title3 */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
  margin: 0 0 16px 0;
}

.actions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Action Card - EXACTLY Matching iOS StyledActionCard */
.action-card {
  border-radius: 20px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Priority-based gradient backgrounds - EXACTLY matching iOS */
.action-card.priority-urgent,
.action-card.priority-high,
.action-card.priority-medium {
  box-shadow:
    0 12px 25px rgba(0, 0, 0, 0.2),
    0 6px 12px rgba(0, 0, 0, 0.15);
  border: 3px solid transparent;
  color: white !important;
}

.action-card.priority-low {
  background: linear-gradient(135deg, #F5F5F7, #FFFFFF, #FAFAFA, #F0F0F2) !important;
  box-shadow:
    0 8px 15px rgba(0, 0, 0, 0.08),
    0 4px 6px rgba(0, 0, 0, 0.04);
  border: 1px solid #E5E7EB;
  color: #2C3E50 !important;
}

/* Urgent: Coral/Red gradient */
.action-card.priority-urgent {
  background: linear-gradient(135deg, #E66152 0%, #FF6F61 35%, #F26859 65%, #D9594A 100%) !important;
  border-color: rgba(255, 111, 97, 0.8);
}

/* High: Gold gradient */
.action-card.priority-high {
  background: linear-gradient(135deg, #E6C200 0%, #FFD700 35%, #F2CC0D 65%, #CCAB00 100%) !important;
  border-color: rgba(255, 215, 0, 0.8);
}

/* Medium: Emerald/Green gradient */
.action-card.priority-medium {
  background: linear-gradient(135deg, #3DB063 0%, #50C878 35%, #47BD6E 65%, #33A358 100%) !important;
  border-color: rgba(80, 200, 120, 0.8);
}

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

.action-card:active {
  transform: translateY(0);
}

.action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.action-card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Category Badge - iOS style */
.action-category-badge {
  font-size: 10px;
  font-weight: 900;
  /* iOS black */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  padding: 6px 12px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #737376, #8C8C8E);
  box-shadow: 0 1px 3px rgba(115, 115, 118, 0.3);
  white-space: nowrap;
}

/* Impact Badge (High Priority, Quick Win, etc.) */
.action-impact-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.95);
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

/* Savings Amount */
.action-card-savings {
  font-size: 28px;
  font-weight: 800;
  /* iOS heavy */
  text-align: right;
}

/* White text for colored cards */
.action-card.priority-urgent .action-card-savings,
.action-card.priority-high .action-card-savings,
.action-card.priority-medium .action-card-savings {
  color: white;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 -1px 1px rgba(255, 255, 255, 0.8);
}

.action-card.priority-low .action-card-savings {
  color: #50C878;
  /* Emerald for low priority */
}

/* Card Titles Section */
.action-card-titles {
  text-align: center;
  margin-bottom: 20px;
}

.action-card-title {
  font-size: 20px;
  font-weight: 700;
  /* iOS bold */
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.action-card-description {
  font-size: 15px;
  font-weight: 400;
  /* iOS regular */
  margin: 0;
  line-height: 1.5;
}

/* White text with shadow for colored cards */
.action-card.priority-urgent .action-card-title,
.action-card.priority-high .action-card-title,
.action-card.priority-medium .action-card-title,
.action-card.priority-urgent .action-card-description,
.action-card.priority-high .action-card-description,
.action-card.priority-medium .action-card-description {
  color: white;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 -1px 1px rgba(255, 255, 255, 0.8);
}

.action-card.priority-low .action-card-title {
  color: var(--brokerly-text-primary);
}

.action-card.priority-low .action-card-description {
  color: var(--brokerly-text-secondary);
}

/* Time Section */
.action-time-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.action-card.priority-low .action-time-section {
  border-top-color: var(--brokerly-border);
}

.action-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.action-card.priority-urgent .action-time-pill,
.action-card.priority-high .action-time-pill,
.action-card.priority-medium .action-time-pill {
  color: white;
}

.action-card.priority-low .action-time-pill {
  background: var(--brokerly-secondary-background);
  color: var(--brokerly-text-secondary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

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

/* Empty State Image Container */
.empty-state .empty-image {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.empty-state .empty-state-illustration {
  max-width: 200px;
  width: 100%;
  height: auto;
  opacity: 0.85;
  filter: grayscale(20%);
  transition: all 0.3s ease;
}

.empty-state:hover .empty-state-illustration {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.02);
}

/* Responsive sizing for empty state images */
@media (min-width: 768px) {
  .empty-state .empty-state-illustration {
    max-width: 240px;
  }
}

@media (min-width: 1024px) {
  .empty-state .empty-state-illustration {
    max-width: 280px;
  }
}

/* Empty State Text */
.empty-state h3,
.empty-state .empty-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 0 0 8px 0;
}

.empty-state p,
.empty-state .empty-message {
  font-size: 15px;
  color: var(--brokerly-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Empty Priority Action (Overview priority card) */
.empty-priority-action {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.empty-priority-action .empty-image {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.empty-priority-action .empty-state-illustration {
  max-width: 160px;
  width: 100%;
  height: auto;
  opacity: 0.85;
  filter: grayscale(20%);
  transition: all 0.3s ease;
}

.empty-priority-action:hover .empty-state-illustration {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.05);
}

.empty-priority-action .empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 0 0 6px 0;
}

.empty-priority-action .empty-subtitle {
  font-size: 14px;
  color: var(--brokerly-text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Collapsible Sections */
.collapsible-section {
  margin-top: 24px;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.collapsible-header:hover {
  background: var(--brokerly-tertiary-background);
}

.collapsible-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin: 0;
}

.collapsible-header .count-badge {
  background: var(--brokerly-primary);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.collapsible-content {
  margin-top: 16px;
  display: none;
}

.collapsible-content.expanded {
  display: block;
}

/* ===== MONEY VIEW - MATCHING iOS ===== */

/* Filter Row (contains time selector) */
.filter-row {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  padding: 0 24px 16px 24px;
}

/* Mobile responsive */
@media (max-width: 767px) {
  .filter-row {
    padding: 0 16px 12px 16px;
  }
}

/* Time Period Selector - Matching iOS */
.time-period-selector {
  display: flex;
  gap: 12px;
  padding: 0;
  width: fit-content;
  flex-wrap: wrap;
  justify-content: center;
}

/* Ensure time period selector scrolls on narrow screens */
@media (max-width: 479px) {
  .time-period-selector {
    gap: 8px;
  }
}

.period-button {
  flex-shrink: 0;
  padding: 10px 16px;
  min-height: 40px;
  background: var(--modern-card-background);
  color: var(--brokerly-text-primary);
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  line-height: 1.2;
}

.period-button.active {
  background: var(--brokerly-primary);
  color: white;
  box-shadow:
    0 2px 8px rgba(0, 122, 255, 0.25),
    0 1px 3px rgba(0, 0, 0, 0.08);
}

.period-button:hover {
  background: var(--brokerly-primary-light);
  color: var(--brokerly-primary);
  transform: translateY(-1px);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.08);
}

.period-button.active:hover {
  transform: translateY(-1px);
  box-shadow:
    0 3px 10px rgba(0, 122, 255, 0.3),
    0 1px 4px rgba(0, 0, 0, 0.1);
}

.period-button:active {
  transform: translateY(0);
}

/* Mobile responsive for period buttons */
@media (max-width: 767px) {
  .period-button {
    padding: 8px 12px;
    font-size: 14px;
    min-height: 36px;
  }
}

/* Touch device adjustments */
@media (hover: none) and (pointer: coarse) {
  .period-button {
    min-height: 44px;
    padding: 12px 16px;
  }

  .period-button:hover {
    transform: none;
  }
}

/* Money Section Container - Matching iOS */
.money-section {
  padding: 16px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
}

.section-header {
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.title-primary {
  color: var(--brokerly-text-primary);
}

.title-secondary {
  color: var(--brokerly-text-secondary);
  font-weight: 400;
}

/* Financial Summary Grid - EXACTLY matching iOS 2x2 grid */
.financial-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.financial-metric-card {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
  width: 100%;
}

.financial-metric-card:hover {
  transform: translateY(-2px);
}

.financial-metric-card:active {
  transform: translateY(0);
}

.metric-content {
  padding: 18px;
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

/* Subtle gradient overlay */
.metric-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(0, 0, 0, 0.02) 100%);
  pointer-events: none;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.metric-icon {
  font-size: 24px;
  font-weight: 600;
}

.metric-value {
  font-size: 28px;
  /* iOS title1 */
  font-weight: 700;
  /* iOS bold */
  color: var(--brokerly-text-primary);
  margin-bottom: 6px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.metric-label {
  font-size: 13px;
  /* iOS caption1 */
  font-weight: 500;
  /* iOS medium */
  color: var(--brokerly-text-secondary);
  position: relative;
  z-index: 1;
}

/* Accounts Section - Collapsible */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brokerly-text-primary);
  transition: opacity 0.2s ease;
}

.collapsible-header:hover {
  opacity: 0.7;
}

.collapsible-header h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.section-summary {
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  margin-left: 8px;
}

.chevron {
  font-size: 14px;
  color: var(--brokerly-text-secondary);
  transition: transform 0.3s ease;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(128, 128, 128, 0.05);
  border-radius: 12px;
  margin-top: 12px;
}

.account-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.bank-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block;
}

.bank-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  border-radius: 10px;
}

.account-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

.account-balance {
  font-size: 15px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

/* Collapsible Content */
.collapsible-content {
  margin-top: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header-row {
  margin-bottom: 16px;
}

/* Table Headers */
.table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brokerly-text-secondary);
  margin-bottom: 8px;
}

.table-header .col-category,
.table-header .col-vendor {
  flex: 1;
  text-align: left;
}

.table-header .col-spend {
  width: 80px;
  text-align: right;
}

.table-header .col-percent {
  width: 50px;
  text-align: right;
}

.table-header .col-savings {
  width: 100px;
  text-align: right;
}

.table-header .col-transactions {
  width: 100px;
  text-align: right;
}

.table-header .col-action {
  width: 30px;
}

/* Expense Rows */
.expense-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(128, 128, 128, 0.05);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expense-row:hover {
  background: rgba(128, 128, 128, 0.1);
  transform: translateX(2px);
}

.expense-row .col-category,
.expense-row .col-vendor {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--brokerly-text-primary);
  text-align: left;
}

.expense-row .col-vendor {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vendor-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

.vendor-category {
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

.expense-row .col-spend {
  width: 80px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  text-align: right;
}

.expense-row .col-percent {
  width: 50px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  text-align: right;
}

.expense-row .col-savings {
  width: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-success);
  text-align: right;
}

.expense-row .col-transactions {
  width: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  text-align: right;
}

.expense-row .col-action {
  width: 30px;
  font-size: 18px;
  color: var(--brokerly-text-tertiary);
  text-align: center;
}

/* Transaction Rows */
.sort-controls {
  padding: 8px 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: flex-end;
}

.sort-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--brokerly-secondary-background);
  border: none;
  border-radius: 8px;
  color: var(--brokerly-text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-button:hover {
  background: var(--brokerly-tertiary-background);
}

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

.sort-chevron {
  font-size: 10px;
  color: var(--brokerly-text-tertiary);
}

.transaction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(128, 128, 128, 0.05);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transaction-row:hover {
  background: rgba(128, 128, 128, 0.1);
  transform: translateX(2px);
}

.transaction-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.transaction-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.transaction-vendor {
  font-size: 15px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

.transaction-category {
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

.transaction-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
}

.transaction-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
}

.transaction-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

.transaction-drill {
  font-size: 18px;
  color: var(--brokerly-text-tertiary);
  margin-left: 12px;
}

/* ===== CHAT VIEW - MATCHING iOS ===== */

.chat-header {
  padding: 16px 20px;
  background: var(--brokerly-secondary-background);
  border-bottom: 0.5px solid var(--brokerly-border-light);
}

.ai-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-info .ai-avatar {
  width: 48px;
  height: 48px;
}

.ai-info .ai-avatar .avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg,
      var(--brokerly-primary) 0%,
      rgba(26, 127, 230, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(26, 127, 230, 0.3);
}

.ai-info .avatar-initial {
  font-size: 20px;
  font-weight: 600;
  color: white;
}

.ai-details {
  flex: 1;
}

.ai-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 0 0 4px 0;
}

.ai-status {
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  margin: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
}

.message.user {
  align-self: flex-end;
  background: var(--brokerly-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.ai {
  align-self: flex-start;
  background: var(--brokerly-secondary-background);
  color: var(--brokerly-text-primary);
  border-bottom-left-radius: 4px;
}

.chat-input-container {
  padding: 16px 20px;
  background: var(--brokerly-background);
  border-top: 0.5px solid var(--brokerly-border-light);
}

.chat-input {
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input input {
  flex: 1;
  padding: 12px 16px;
  background: var(--brokerly-secondary-background);
  border: 1px solid var(--brokerly-border-light);
  border-radius: 24px;
  font-size: 15px;
  color: var(--brokerly-text-primary);
}

.chat-input input:focus {
  outline: none;
  border-color: var(--brokerly-primary);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.send-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brokerly-primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.send-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.send-button:active {
  transform: scale(0.95);
}

/* ===== TENDERS VIEW - MATCHING iOS ===== */

.tenders-top-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 0 20px;
}

.messages-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(128, 128, 128, 0.15);
  color: var(--brokerly-text-secondary);
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: not-allowed;
  opacity: 0.8;
}

.create-tender-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--brokerly-primary);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow:
    0 4px 12px rgba(0, 122, 255, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.create-tender-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 16px rgba(0, 122, 255, 0.4),
    0 3px 8px rgba(0, 0, 0, 0.1);
}

.create-tender-button:active {
  transform: translateY(0);
}

.tenders-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-pill {
  flex: 1;
  padding: 12px 16px;
  background: var(--modern-card-background);
  border-radius: 12px;
  text-align: center;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
}

.stat-pill-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  display: block;
  margin-bottom: 4px;
}

.stat-pill-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

.tenders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tender-card {
  padding: 20px;
  background: var(--modern-card-background);
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tender-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.06);
}

.tender-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tender-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin: 0;
}

.tender-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--brokerly-primary);
  color: white;
}

.tender-status.status-active {
  background: #50C878;
}

.tender-status.status-completed {
  background: #737376;
}

.tender-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--brokerly-text-secondary);
}

.tender-budget,
.tender-bids,
.tender-deadline {
  font-weight: 500;
}

.tenders-controls {
  margin-bottom: 24px;
}

/* Tender List Section - Complete iOS Styling */
.tenders-list-section {
  background: var(--brokerly-secondary-background);
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin: 0 20px;
}

.tenders-list-header {
  padding: 16px;
}

.list-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-title h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin: 0;
}

.tender-filters {
  display: flex;
  gap: 12px;
  padding: 0 16px 16px 16px;
  overflow-x: auto;
}

.filter-pill {
  padding: 6px 12px;
  background: rgba(26, 127, 230, 0.1);
  color: var(--brokerly-primary);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  background: rgba(26, 127, 230, 0.15);
}

.filter-pill.active {
  background: var(--brokerly-primary);
  color: white;
}

.tender-row {
  padding: 16px;
  background: var(--brokerly-secondary-background);
  border-bottom: 1px solid var(--brokerly-border-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tender-row:last-child {
  border-bottom: none;
}

.tender-row:hover {
  background: var(--brokerly-tertiary-background);
}

.tender-row-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tender-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tender-category {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(26, 127, 230, 0.08);
  color: var(--brokerly-primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  align-self: flex-start;
}

.tender-right {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tender-drill {
  font-size: 20px;
  color: var(--brokerly-text-tertiary);
  padding: 0 8px;
}

.tender-status-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.tender-status.status-draft {
  background: #FFA726;
}

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

.tender-stats {
  display: flex;
  gap: 16px;
}

.tender-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

.tender-stat svg {
  opacity: 0.7;
}

.tender-view-button {
  padding: 4px 12px;
  background: rgba(26, 127, 230, 0.1);
  color: var(--brokerly-primary);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tender-view-button:hover {
  background: rgba(26, 127, 230, 0.15);
}

/* Desktop / Tablet Table Layout for Tenders */
@media (min-width: 768px) {
  .tender-row {
    display: grid;
    grid-template-columns: 3fr 1.5fr 1.5fr auto;
    align-items: center;
    gap: 24px;
    padding: 16px 24px;
  }

  .tender-row-header,
  .tender-row-footer {
    display: contents;
  }

  .tender-left {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .tender-category {
    align-self: center;
  }

  .tender-right {
    gap: 0;
  }

  .tender-drill {
    display: none;
  }

  .tender-status-container {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }

  .tender-view-button {
    padding: 8px 24px;
  }
}

.tender-table-header {
  display: none;
  /* hidden on mobile */
}

@media (min-width: 768px) {
  .tender-table-header {
    display: grid;
    grid-template-columns: 3fr 1.5fr 1.5fr auto;
    gap: 24px;
    padding: 0 24px 12px 24px;
    margin-top: 24px;
    border-bottom: 1px solid var(--brokerly-border-light);
    color: var(--brokerly-text-tertiary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
}

.empty-action-button {
  padding: 8px 16px;
  background: var(--brokerly-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
}

.empty-action-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.empty-action-button:active {
  transform: translateY(0);
}

/* ============================================
   AI INDICATORS
   ============================================ */

/* AI Drill Indicator */
.ai-drill-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.has-ai-drill:hover .ai-drill-indicator {
  opacity: 1;
}

.ai-drill-icon {
  color: var(--brokerly-primary);
}

.ai-drill-chevron {
  color: var(--brokerly-text-secondary);
  font-size: 18px;
  font-weight: 600;
}

/* AI Bubble Component */
.ai-bubble-component {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--brokerly-primary), var(--brokerly-accent));
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(87, 204, 234, 0.3);
  margin: 16px 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.ai-bubble-component.visible {
  opacity: 1;
  transform: translateY(0);
}

.ai-bubble-component.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.ai-bubble-icon {
  color: white;
  flex-shrink: 0;
}

.ai-bubble-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-bubble-message {
  color: white;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.ai-bubble-dismiss {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-bubble-dismiss:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ai-bubble-dismiss svg {
  color: white;
}

/* AI Pointing System */
.ai-pointer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  pointer-events: none;
}

.ai-pointer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: all;
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.ai-pointer-highlight {
  position: absolute;
  border: 3px solid var(--brokerly-primary);
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(87, 204, 234, 0.2),
    0 0 20px rgba(87, 204, 234, 0.4);
  pointer-events: none;
  z-index: 10001;
  animation: fadeIn 0.3s ease;
}

.ai-pointer-highlight.pulse {
  animation: aiPointerPulse 2s ease-in-out infinite;
}

@keyframes aiPointerPulse {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(87, 204, 234, 0.2),
      0 0 20px rgba(87, 204, 234, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(87, 204, 234, 0.3),
      0 0 30px rgba(87, 204, 234, 0.6);
  }
}

.ai-pointer-message {
  position: absolute;
  z-index: 10002;
  pointer-events: none;
  animation: slideUp 0.3s ease;
}

.ai-pointer-arrow {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid white;
  margin-left: 20px;
}

.ai-pointer-content {
  background: var(--modern-card-background);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
}

.ai-pointer-icon {
  flex-shrink: 0;
}

.ai-pointer-text {
  color: var(--brokerly-text-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* AI Thinking Indicator */
.ai-thinking-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(87, 204, 234, 0.1);
  border-radius: 8px;
  margin: 8px 0;
}

.ai-thinking-dots {
  display: flex;
  gap: 4px;
}

.ai-thinking-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brokerly-primary);
  animation: thinkingDot 1.4s ease-in-out infinite;
}

.ai-thinking-dots .dot:nth-child(1) {
  animation-delay: 0s;
}

.ai-thinking-dots .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-thinking-dots .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes thinkingDot {

  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  30% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.ai-thinking-text {
  color: var(--brokerly-primary);
  font-size: 14px;
  font-weight: 500;
}

/* AI Pulse Animation */
.ai-pulse {
  position: relative;
  animation: aiPulseEffect 2s ease-in-out infinite;
}

.ai-pulse-low {
  animation-duration: 3s;
}

.ai-pulse-medium {
  animation-duration: 2s;
}

.ai-pulse-high {
  animation-duration: 1s;
}

@keyframes aiPulseEffect {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(87, 204, 234, 0.4);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(87, 204, 234, 0);
  }
}

/* ============================================
   AI BUBBLE COMPONENT - Enhanced
   ============================================ */

/* Bubble Wrapper */
.ai-bubble-wrapper {
  position: relative;
  display: inline-block;
  z-index: 100;
}

/* Avatar Button */
.ai-bubble-avatar-btn {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-bubble-avatar-btn:hover {
  transform: scale(1.05);
}

.ai-bubble-avatar-btn:active {
  transform: scale(0.95);
}

/* Wiggle Animation */
@keyframes bubbleWiggle {

  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }

  25% {
    transform: rotate(5deg) scale(1.1);
  }

  75% {
    transform: rotate(-5deg) scale(1.1);
  }
}

.ai-bubble-avatar-btn.wiggle {
  animation: bubbleWiggle 0.15s ease-in-out 6;
}

/* Avatar Circle */
.ai-bubble-avatar-btn .avatar-circle {
  position: relative;
  width: 48px;
  height: 48px;
}

.ai-bubble-avatar-btn .avatar-border {
  position: absolute;
  top: 0;
  left: 0;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.ai-bubble-avatar-btn .avatar-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brokerly-primary), var(--brokerly-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 600;
}

/* Notification Dot */
.notification-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #FF0000;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(255, 0, 0, 0.3);
  animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Expanded Bubble */
.ai-bubble-expanded {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 300px;
  max-width: 320px;
  background: var(--modern-card-background);
  border-radius: 16px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 16px;
  opacity: 0;
  transform: scale(0.1);
  transform-origin: top left;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 101;
}

.ai-bubble-expanded.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

/* Bubble Header */
.bubble-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  margin-left: 48px;
  /* Account for avatar space */
}

.broker-info {
  flex: 1;
}

.broker-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin-bottom: 2px;
}

.broker-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

.bubble-close {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--brokerly-text-secondary);
  transition: color 0.2s ease;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.bubble-close:hover {
  color: var(--brokerly-text-primary);
}

/* Bubble Message */
.bubble-message {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--brokerly-text-primary);
  margin-bottom: 12px;
}

/* Bubble Actions */
.bubble-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.bubble-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bubble-action-btn.primary {
  background: var(--brokerly-primary);
  color: white;
}

.bubble-action-btn.primary:hover {
  background: var(--brokerly-primary-dark, #1565C0);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(87, 204, 234, 0.3);
}

.bubble-action-btn.primary:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .ai-bubble-expanded {
    min-width: 280px;
    max-width: 90vw;
  }
}

/* Header actions layout */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Discover Button */
.discover-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--brokerly-primary);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.discover-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(87, 204, 234, 0.3);
}

.discover-button:active {
  transform: translateY(0);
}

/* ============================================
   HIDE VALUES TOGGLE
   ============================================ */

/* Hide Values Toggle Button */
.hide-values-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--modern-card-background);
  border: 1px solid var(--brokerly-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 8px;
  color: var(--brokerly-text-secondary);
}

.hide-values-toggle:hover {
  background: var(--hover-background);
  transform: scale(1.05);
}

.hide-values-toggle.active {
  background: var(--brokerly-primary);
  color: white;
  border-color: var(--brokerly-primary);
}

.hide-values-toggle.active .eye-visible {
  display: none !important;
}

.hide-values-toggle.active .eye-hidden {
  display: block !important;
}

.hide-values-toggle .eye-hidden {
  display: none;
}

/* Blur effect for hidden values */
body.values-hidden [data-financial-value] {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
  transition: filter 0.2s ease;
}

/* ============================================
   PULL-TO-REFRESH
   ============================================ */

.pull-to-refresh-indicator {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.ptr-spinner {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ptr-icon {
  color: var(--brokerly-primary);
}

.ptr-arc {
  transform-origin: center;
  transition: transform 0.15s ease-out;
}

.pull-to-refresh-indicator.refreshing .ptr-icon {
  animation: ptr-spin 1s linear infinite;
}

@keyframes ptr-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.ptr-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--brokerly-text-secondary);
  white-space: nowrap;
}

/* View containers need relative positioning */
.view-content {
  position: relative;
}

/* Discover Button Header (iOS pill button style) */
.discover-button-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(52, 199, 89, 0.1);
  border: none;
  border-radius: 24px;
  color: var(--brokerly-primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 12px;
}

.discover-button-header:hover {
  background: rgba(52, 199, 89, 0.15);
  transform: scale(1.02);
}

.discover-button-header:active {
  transform: scale(0.98);
}

.discover-button-header svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.discover-button-header span {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ===== TOAST NOTIFICATIONS ===== */

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--modern-card-background, #ffffff);
  color: var(--brokerly-text-primary);
  padding: 14px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 15px;
  font-weight: 500;
  z-index: 100000;
  max-width: 90%;
  text-align: center;
  pointer-events: none;
  border: 1px solid var(--brokerly-border-light, rgba(0, 0, 0, 0.1));
}

.toast-success {
  background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
  color: white;
  border: none;
}

.toast-warning {
  background: linear-gradient(135deg, #FF9500 0%, #FFAA00 100%);
  color: white;
  border: none;
}

.toast-error {
  background: linear-gradient(135deg, #FF3B30 0%, #FF453A 100%);
  color: white;
  border: none;
}

.toast-info {
  background: linear-gradient(135deg, #007AFF 0%, #0A84FF 100%);
  color: white;
  border: none;
}

/* Platform API Error Toast Overrides */
.toast-notification.error {
  background: var(--brokerly-danger) !important;
  border-color: var(--brokerly-danger-dark, #dc2626) !important;
  color: white !important;
  font-weight: 500;
}

/* Global Toast Container and Base Animation */
#toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  gap: 12px;
}

.toast {
  padding: 14px 24px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
  text-align: center;
  line-height: 1.4;
  max-width: 90vw;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Values Hidden Indicator Styles */
.hide-values-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

body.values-hidden .hide-values-toggle {
  width: auto !important;
  padding: 0 16px !important;
  border-radius: 20px !important;
  background: rgba(239, 68, 68, 0.1) !important;
  color: var(--brokerly-danger) !important;
}

.values-hidden-text {
  display: none;
  font-size: 13px;
  font-weight: 600;
  margin-right: 6px;
}

body.values-hidden .values-hidden-text {
  display: inline-block;
}