/* Slide-up Sheets - Matching iOS presentationDetents */

.slide-up-sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sheet-content);
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}

.slide-up-sheet.active {
  display: block !important;
  pointer-events: auto;
  visibility: visible;
}

.sheet-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-sheet-backdrop);
  cursor: pointer;
  /* Indicate it's clickable */
}

.slide-up-sheet.active .sheet-backdrop {
  opacity: 1;
}

.sheet-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: calc(90vh - env(safe-area-inset-bottom, 0px));
  /* Account for iOS safe areas */
  background: var(--brokerly-secondary-background);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sheet-content);
  /* Above backdrop and navigation */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* iOS bottom safe area */
  pointer-events: auto;
  /* Ensure sheet captures touch events, not backdrop */
  touch-action: auto;
  /* Allow normal touch interactions within sheet */
}

/* Specific height for action card drawer to fit the card */
.action-card-drawer .sheet-content {
  max-height: 80vh;
}

/* Host where the focused card sits without resizing */
.action-card-drawer .drawer-card-host {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 20px 16px;
}

/* Ensure unified card design in drawer - no overrides */
.action-card-drawer .action-card {
  /* Force unified card styles from cards-unified.css */
  border: none !important;
  outline: none !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden !important;
  /* Remove white rim on gradients */
}

/* Remove any frames/borders/overlays on all card elements */
.action-card-drawer .action-card *,
.action-card-drawer .swipeable-card,
.action-card-drawer .card-inner {
  border: none !important;
  outline: none !important;
}

.action-card-drawer .action-card::before,
.action-card-drawer .action-card::after,
.action-card-drawer .swipeable-card::before,
.action-card-drawer .swipeable-card::after,
.action-card-drawer .card-inner::before,
.action-card-drawer .card-inner::after {
  display: none !important;
  content: none !important;
}

/* Ensure card maintains exact unified styling */
.action-card-drawer .action-card {
  container-type: size !important;
  /* Enable cqh units */
}

/* Prevent any drawer-specific style overrides */
.action-card-drawer .drawer-card-host .action-card {
  background: inherit !important;
  /* Use card's own gradient */
  padding: 0 !important;
  /* No padding on outer card */
  margin: 0 auto !important;
  /* Center in drawer */
  /* Make card larger and more prominent in drawer */
  width: min(320px, 90vw) !important;
  height: 456px !important;
  /* Pokémon card ratio: 320w × 456h ≈ 0.70 */
  min-height: 456px !important;
  max-height: 456px !important;
}

/* Card inner should maintain original padding and alignment */
.action-card-drawer .drawer-card-host .action-card .card-inner {
  padding: 24px !important;
  /* Original padding from unified CSS */
  height: 100%;
}

.action-card-drawer .drawer-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.action-card-drawer .drawer-actions {
  padding: 12px 20px 20px;
  gap: 12px;
  display: grid;
}

/* Dark mode support */
/* Dark mode handled by CSS variables */

.slide-up-sheet.active .sheet-content {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 5px;
  background: var(--brokerly-border);
  border-radius: 3px;
  margin: 12px auto 8px;
  flex-shrink: 0;
  cursor: grab;
  touch-action: none;
  /* Enable swipe to dismiss */
  /* Make it more prominent on mobile */
  position: relative;
}

/* Make handle more visible and touch-friendly on mobile */
@media (max-width: 768px) {
  .sheet-handle {
    width: 48px;
    height: 6px;
    background: var(--brokerly-text-quaternary);
    margin: 16px auto 12px;
  }

  /* Add larger touch area */
  .sheet-handle::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -24px;
    right: -24px;
    bottom: -12px;
  }
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--brokerly-border-light);
  flex-shrink: 0;
}

.sheet-title {
  font-size: 20px;
  /* iOS title2 */
  font-weight: 700;
  /* iOS bold */
  color: var(--brokerly-text-primary);
  margin: 0;
  flex: 1;
  text-align: center;
}

.sheet-close {
  width: 32px;
  height: 32px;
  min-width: 44px;
  /* iOS minimum touch target */
  min-height: 44px;
  border: none;
  background: var(--brokerly-background-tertiary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brokerly-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sheet-close:hover {
  background: var(--brokerly-border);
  color: var(--brokerly-text-primary);
}

.sheet-close:active {
  transform: scale(0.95);
}

/* Ensure close button is always accessible on mobile */
@media (max-width: 768px) {
  .sheet-close {
    width: 36px;
    height: 36px;
    min-width: 44px;
    min-height: 44px;
  }
}

/* iOS-style text buttons for headers */
.sheet-cancel,
.sheet-save {
  border: none;
  background: transparent;
  color: var(--brokerly-primary);
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
  min-width: 60px;
  transition: opacity 0.2s ease;
}

.sheet-cancel {
  text-align: left;
}

.sheet-save {
  text-align: right;
  font-weight: 600;
}

.sheet-cancel:hover,
.sheet-save:hover {
  opacity: 0.6;
}

.sheet-cancel:active,
.sheet-save:active {
  opacity: 0.3;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Demo Limitation Sheet Specific Styles */

.demo-limitation-icon {
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

.demo-limitation-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-limitation-content h3 {
  font-size: 17px;
  /* iOS headline */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
  margin: 0;
}

.demo-limitation-content p {
  font-size: 17px;
  /* iOS body */
  font-weight: 400;
  /* iOS regular */
  color: var(--brokerly-text-secondary);
  margin: 0;
  line-height: 1.5;
}

.demo-limitation-instructions {
  padding-top: 8px;
}

.demo-limitation-instructions h4 {
  font-size: 15px;
  /* iOS subheadline */
  font-weight: 600;
  /* iOS semibold */
  color: var(--brokerly-text-primary);
  margin: 0 0 8px 0;
}

.demo-limitation-instructions ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-limitation-instructions li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  /* iOS caption */
  font-weight: 500;
  /* iOS medium */
  color: var(--brokerly-text-secondary);
  line-height: 1.4;
}

.demo-limitation-instructions li::before {
  content: "•";
  flex-shrink: 0;
  margin-top: 2px;
}

.demo-limitation-button {
  width: 100%;
  padding: 16px;
  background: var(--brokerly-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  /* iOS headline */
  font-weight: 600;
  /* iOS semibold */
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.demo-limitation-button:hover {
  background: var(--brokerly-primary-dark);
  transform: scale(1.01);
}

.demo-limitation-button:active {
  transform: scale(0.99);
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .sheet-content {
    max-width: 700px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
  }

  .slide-up-sheet.active .sheet-content {
    transform: translateX(-50%) translateY(0);
  }
}

/* ===== PROFILE SHEET ===== */

/* Profile sheet specific overrides */
.profile-sheet {
  max-height: 85vh;
  /* Taller for profile content */
}

.profile-scroll-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 20px 20px;
  -webkit-overflow-scrolling: touch;
  /* Smooth scrolling on iOS */
}

.profile-header {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--brokerly-border-light);
  margin-bottom: 24px;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.profile-initial-large {
  font-size: 32px;
  font-weight: 600;
  color: var(--brokerly-primary);
}

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

.profile-email {
  font-size: 15px;
  font-weight: 400;
  color: var(--brokerly-text-secondary);
  margin: 0;
}

.profile-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* No padding or overflow here - handled by parent .profile-scroll-content */
}

.section-header {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brokerly-text-secondary);
  margin: 0 0 12px 0;
}

.bank-list,
.goals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bank-item,
.goal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
}

.bank-icon,
.goal-icon {
  font-size: 24px;
  flex-shrink: 0;
}

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

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

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

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

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
  overflow: hidden;
}

.setting-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: none;
  border: none;
  color: var(--brokerly-text-primary);
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
  text-align: left;
}

.setting-item:hover {
  background: var(--brokerly-tertiary-background);
}

.setting-item:not(:last-child) {
  border-bottom: 0.5px solid var(--brokerly-border-light);
}

.setting-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.setting-label {
  flex: 1;
  font-size: 15px;
  font-weight: 400;
}

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

.sign-out-button {
  width: 100%;
  padding: 16px;
  background: var(--brokerly-danger);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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


/* ===== FINANCIAL DRAWER STYLES ===== */

.financial-drawer {
  max-height: 85vh;
}

/* Desktop: Make financial drawer taller (75% of viewport height) */
@media (min-width: 768px) {
  .financial-drawer {
    max-height: 75vh;
  }
}

.sheet-handle {
  width: 36px;
  height: 5px;
  background: var(--brokerly-border);
  border-radius: 3px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

/* Drawer Sections */
.drawer-section {
  padding: 0 0 24px 0;
  border-bottom: 1px solid var(--brokerly-border-light);
  margin-bottom: 24px;
}

.drawer-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brokerly-text-secondary);
  margin: 0 0 12px 0;
}

/* Metric Hero */
.metric-hero {
  text-align: center;
  padding: 24px 0;
}

.hero-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
}

.hero-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin-bottom: 8px;
}

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

/* AI Insight Card */
.ai-insight-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
  align-items: flex-start;
}

.ai-insight-card.compact {
  padding: 12px;
}

.ai-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-insight-text {
  flex: 1;
}

.ai-insight-text p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--brokerly-text-primary);
}

.ai-insight-text p:last-child {
  margin-bottom: 0;
}

.ai-insight-text strong {
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

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

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--brokerly-secondary-background);
  border-radius: 8px;
}

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

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

/* Recommendations */
.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommendation-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--brokerly-secondary-background);
  border-radius: 8px;
}

.rec-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.rec-text {
  flex: 1;
}

.rec-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin-bottom: 4px;
}

.rec-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--brokerly-text-secondary);
}

/* Category Breakdown */
.category-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-bar-container {
  width: 100%;
  height: 8px;
  background: var(--brokerly-border-light);
  border-radius: 4px;
  overflow: hidden;
}

.category-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

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

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

.category-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

/* Savings Opportunities */
.savings-opportunities {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opportunity-card {
  padding: 16px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
}

.opp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.opp-category {
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

.opp-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--brokerly-success);
}

.opp-bar {
  width: 100%;
  height: 6px;
  background: var(--brokerly-border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.opp-progress {
  height: 100%;
  background: var(--brokerly-success);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.opp-tip {
  margin: 0;
  font-size: 12px;
  color: var(--brokerly-text-secondary);
}

/* Account List */
.account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--brokerly-secondary-background);
  border-radius: 8px;
}

.account-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}

.account-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

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

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

/* Transaction Detail */
.transaction-detail-header {
  text-align: center;
  padding: 16px 0;
}

.transaction-vendor-large {
  font-size: 22px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin-bottom: 8px;
}

.transaction-amount-large {
  font-size: 32px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin-bottom: 8px;
}

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

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--brokerly-border-light);
  border-radius: 8px;
  overflow: hidden;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--brokerly-secondary-background);
}

.detail-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

/* Action Buttons */
.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

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

.action-button.secondary {
  background: var(--brokerly-secondary-background);
  color: var(--brokerly-primary);
}

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

.action-button.success {
  background: #50C878;
  color: white;
}

.action-button.success:hover {
  opacity: 0.9;
}

.action-button.danger-outline {
  background: transparent;
  border: 1.5px solid #FF6F61;
  color: #FF6F61;
}

.action-button.danger-outline:hover {
  background: #FF6F6110;
}

/* ============================================
   TRANSACTION DETAIL SHEET
   ============================================ */

.transaction-detail-sheet .sheet-content {
  max-height: 80vh;
}

.transaction-header {
  text-align: center;
  padding: 24px 20px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
}

.transaction-amount {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.transaction-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

.transaction-type-badge.income {
  background: #50C87820;
  color: #50C878;
}

.transaction-type-badge.expense {
  background: #FF6F6120;
  color: #FF6F61;
}

.transaction-details-card {
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.detail-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-row {
  display: grid;
  grid-template-columns: 24px 100px 1fr;
  gap: 12px;
  align-items: start;
  padding: 0;
  background: transparent;
}

.detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brokerly-text-secondary);
}

.ai-analysis-card {
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

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

.ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--brokerly-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-info {
  flex: 1;
}

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

.ai-subtitle {
  font-size: 13px;
  color: var(--brokerly-text-secondary);
}

.ai-insights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insight-section {
  background: var(--brokerly-background);
  padding: 12px;
  border-radius: 8px;
}

.insight-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--brokerly-text-secondary);
  margin-bottom: 8px;
  display: block;
}

.insight-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--brokerly-text-primary);
}

.transaction-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* ============================================
   CATEGORY BUDGET SHEET
   ============================================ */

.budget-sheet .sheet-content {
  max-height: 70vh;
}

.budget-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
  margin-bottom: 20px;
}

.category-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 12px;
}

.category-info {
  flex: 1;
}

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

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

.budget-input-section {
  margin: 24px 0;
}

.budget-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  display: block;
  margin-bottom: 12px;
}

.budget-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brokerly-secondary-background);
  padding: 16px;
  border-radius: 12px;
}

.currency-symbol {
  font-size: 24px;
  font-weight: 700;
  color: var(--brokerly-text-secondary);
}

.budget-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 32px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  outline: none;
}

.budget-input::placeholder {
  color: var(--brokerly-text-tertiary);
}

.current-spending-card {
  background: var(--brokerly-secondary-background);
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
}

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

.spending-label {
  font-size: 13px;
  color: var(--brokerly-text-secondary);
}

.spending-amount {
  font-size: 15px;
  font-weight: 600;
}

.spending-progress {
  margin-top: 12px;
}

.progress-bar {
  height: 8px;
  background: var(--brokerly-background);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.progress-percentage {
  color: var(--brokerly-text-secondary);
}

.progress-remaining {
  font-weight: 600;
}

.budget-suggestions {
  background: #007AFF10;
  padding: 12px;
  border-radius: 8px;
  margin: 16px 0;
}

.suggestion-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #007AFF;
  margin-bottom: 8px;
}

.suggestion-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--brokerly-text-primary);
}

.budget-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* ============================================
   ACTION DETAIL SHEET
   ============================================ */

.action-detail-sheet .sheet-content {
  max-height: 85vh;
}

.action-card-preview {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

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

.action-priority {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.action-savings {
  font-size: 17px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
}

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

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

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

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

.next-steps-section {
  background: var(--brokerly-secondary-background);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
}

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

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

.step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step-number {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brokerly-primary);
  color: white;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

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

.step-description {
  font-size: 13px;
  color: var(--brokerly-text-secondary);
  line-height: 1.4;
}

.impact-analysis {
  background: var(--brokerly-secondary-background);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.impact-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.impact-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--brokerly-background);
  border-radius: 8px;
}

.metric-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 10px;
  flex-shrink: 0;
}

.metric-info {
  flex: 1;
}

.metric-label {
  font-size: 13px;
  color: var(--brokerly-text-secondary);
  margin-bottom: 2px;
}

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

.ai-insights-section {
  background: var(--brokerly-secondary-background);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.ai-insight-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--brokerly-text-primary);
}

.action-detail-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

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

.empty-state-subtitle {
  font-size: 15px;
  color: var(--brokerly-text-secondary);
  line-height: 1.5;
  margin: 0 0 20px 0;
  max-width: 320px;
}

.empty-state-action {
  padding: 12px 24px;
  background: var(--brokerly-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* ============================================
   DRAWER FILTER
   ============================================ */

.drawer-filter {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--brokerly-border-light);
  flex-shrink: 0;
}

.filter-pill {
  padding: 6px 16px;
  border: 1.5px solid var(--brokerly-border);
  background: transparent;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-pill:hover {
  border-color: var(--brokerly-primary);
  color: var(--brokerly-primary);
}

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

/* ============================================
   TREND CHARTS & VISUALIZATIONS
   ============================================ */

.hero-trend {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.hero-trend.up {
  color: #FF6F61;
}

.hero-trend.down {
  color: #50C878;
}

.trend-arrow {
  font-size: 14px;
  font-weight: 700;
}

.trend-value {
  font-weight: 600;
}

.trend-label {
  opacity: 0.7;
}

.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 120px;
  padding: 16px;
  background: var(--brokerly-secondary-background);
  border-radius: 8px;
}

.chart-bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
  min-height: 4px;
}

.chart-label {
  font-size: 11px;
  color: var(--brokerly-text-secondary);
  text-align: center;
}

.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.transaction-row:hover {
  background: var(--brokerly-secondary-background);
}

.transaction-info {
  flex: 1;
}

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

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

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

/* ============================================
   OVERVIEW ENHANCEMENTS
   ============================================ */

.priority-action-card {
  width: 100%;
  padding: 16px;
  background: var(--brokerly-secondary-background);
  border: none;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.empty-priority-action {
  text-align: center;
  padding: 32px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

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

.empty-subtitle {
  font-size: 13px;
  color: var(--brokerly-text-secondary);
}

.drill-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.quick-stat-card:hover .drill-indicator,
.priority-action-card:hover .drill-indicator {
  opacity: 1;
}

/* ============================================
   PROFILE SHEET ENHANCEMENTS
   ============================================ */

.bank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--brokerly-secondary-background);
  border-radius: 8px;
  margin-bottom: 8px;
}

.bank-icon {
  font-size: 24px;
}

.bank-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--brokerly-text-primary);
}

.bank-status {
  color: var(--brokerly-success);
  font-size: 18px;
}

.goal-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--brokerly-secondary-background);
  border-radius: 8px;
  margin-bottom: 12px;
}

.goal-icon {
  font-size: 28px;
  line-height: 1;
}

.goal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.goal-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.goal-progress-bar {
  height: 8px;
  background: var(--brokerly-border);
  border-radius: 4px;
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brokerly-primary), var(--brokerly-accent));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.goal-progress-text {
  font-size: 13px;
  color: var(--brokerly-text-secondary);
}

.budget-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--brokerly-secondary-background);
  border-radius: 8px;
  margin-bottom: 8px;
}

.budget-category {
  display: flex;
  align-items: center;
  gap: 10px;
}

.budget-icon {
  font-size: 20px;
}

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

.budget-amount {
  font-size: 15px;
  font-weight: 600;
  color: var(--brokerly-primary);
}

.manage-budgets-button,
.connect-bank-button,
.add-goal-button {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: var(--brokerly-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.manage-budgets-button:hover,
.connect-bank-button:hover,
.add-goal-button:hover {
  background: var(--brokerly-primary-dark);
  transform: translateY(-1px);
}

.budget-empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--brokerly-text-secondary);
}

.budget-empty-state p {
  margin: 0;
  font-size: 15px;
}

.budget-empty-state .budget-empty-hint {
  font-size: 13px;
  margin-top: 4px;
  opacity: 0.7;
}

.empty-list {
  text-align: center;
  padding: 24px;
}

.empty-list p {
  color: var(--brokerly-text-secondary);
  margin-bottom: 16px;
}

/* ============================================
   AI THINKING STEPS
   ============================================ */

.ai-thinking-steps {
  margin: 16px 0;
}

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

.thinking-header:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

.thinking-icon-complete {
  width: 14px;
  height: 14px;
}

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

.thinking-chevron {
  width: 10px;
  height: 10px;
  color: var(--brokerly-text-secondary);
  transition: transform 0.3s ease;
}

.thinking-chevron.expanded {
  transform: rotate(180deg);
}

.thinking-progress {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.thinking-progress-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  padding: 2px 6px;
  background: var(--brokerly-secondary-background);
  border-radius: 4px;
}

.thinking-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thinking-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: transparent;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.thinking-step.active {
  background: rgba(255, 255, 255, 0.05);
}

.step-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.step-icon {
  font-size: 12px;
  transition: all 0.3s ease;
}

.step-icon.rotating {
  animation: rotate 2s linear infinite;
}

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

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

.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

.thinking-step:not(.active):not(.past) .step-title {
  color: var(--brokerly-text-secondary);
  opacity: 0.7;
}

.step-description {
  font-size: 11px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  line-height: 1.4;
}

.thinking-step:not(.active):not(.past) .step-description {
  opacity: 0.5;
}

.step-duration {
  font-size: 10px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  opacity: 0.8;
}

.thinking-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.thinking-result.success {
  background: rgba(255, 255, 255, 0.15);
}

.thinking-result.error {
  background: rgba(239, 68, 68, 0.1);
}

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

.result-icon-error {
  width: 14px;
  height: 14px;
  color: #ef4444;
}

.result-title {
  font-size: 14px;
  font-weight: 600;
  color: #ef4444;
}

.result-message {
  font-size: 12px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  line-height: 1.5;
}

.result-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--brokerly-text-primary);
}

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

@media (min-width: 768px) {
  .sheet-content {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
  }

  .slide-up-sheet.active .sheet-content {
    transform: translateX(-50%) translateY(0);
  }

  .transaction-detail-sheet .sheet-content,
  .budget-sheet .sheet-content,
  .action-detail-sheet .sheet-content {
    max-height: 90vh;
  }
}

/* ============================================
   AI AGENT BUTTON
   ============================================ */

.ai-agent-button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg,
      var(--brokerly-primary) 0%,
      rgba(87, 204, 234, 0.8) 50%,
      rgba(87, 204, 234, 0.9) 100%);
  color: white;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(87, 204, 234, 0.3);
}

.ai-agent-button:hover:not(.loading) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(87, 204, 234, 0.4);
}

.ai-agent-button.pressed {
  transform: scale(0.98) translateY(0);
}

.ai-agent-button.loading {
  cursor: wait;
  opacity: 0.8;
}

.ai-agent-button.complete {
  background: linear-gradient(135deg, #50C878, #45B56A);
}

.agent-btn-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-avatar {
  flex-shrink: 0;
}

.agent-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.agent-text {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  text-align: left;
}

.agent-status {
  flex-shrink: 0;
}

.agent-spinner svg {
  animation: spin 1s linear infinite;
}

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

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

/* Flippable Card */
.flippable-card-container {
  perspective: 1000px;
  width: 100%;
}

.flippable-card {
  position: relative;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  transform-style: preserve-3d;
}

.flippable-card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-face-back {
  transform: rotateY(180deg);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

/* ============================================
   PROPOSED ACTIONS DRAWER
   ============================================ */

.proposed-actions-sheet {
  max-height: 90vh;
}

/* Card stacking for proposed actions - Pokémon card aspect ratio with visible stacking */
.proposed-actions-sheet .swipe-cards-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 520px;
  /* Taller to accommodate Pokémon card ratio + stacking */
  margin: 20px auto;
  perspective: 1000px;
}

/* Override swipeable-card to use absolute positioning for stacking */
.proposed-actions-sheet .swipeable-card {
  position: absolute !important;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  /* Fixed width for Pokémon card */
  height: 370px;
  /* Pokémon card aspect ratio (roughly 2.6:3.7 or 0.7:1) */
  max-width: none;
  aspect-ratio: unset;
  /* Override default aspect ratio */
}

/* Visible stacking - cards offset down and slightly scaled */
.proposed-actions-sheet .swipeable-card.top {
  z-index: 3;
  transform: translateX(-50%) scale(1) translateY(0);
  pointer-events: auto;
}

.proposed-actions-sheet .swipeable-card.second {
  z-index: 2;
  transform: translateX(-50%) scale(0.97) translateY(12px);
  opacity: 0.85;
  filter: brightness(0.95);
  pointer-events: none;
}

.proposed-actions-sheet .swipeable-card.third {
  z-index: 1;
  transform: translateX(-50%) scale(0.94) translateY(24px);
  opacity: 0.7;
  filter: brightness(0.90);
  pointer-events: none;
}

/* Ensure card inner content fits properly */
.proposed-actions-sheet .card-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  overflow: hidden;
}

/* Text formatting for card content */
.proposed-actions-sheet .card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 12px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.proposed-actions-sheet .card-description {
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: 12px;
}

.proposed-actions-sheet .savings-display {
  margin: 12px 0;
}

.proposed-actions-sheet .savings-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.proposed-actions-sheet .savings-amount {
  font-size: 32px;
  font-weight: 800;
}

.proposed-actions-sheet .time-to-complete {
  margin-top: 8px;
}

.proposed-actions-sheet .time-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.proposed-actions-sheet .time-value {
  font-size: 13px;
  font-weight: 600;
}

/* Hide empty/undefined cards */
.proposed-actions-sheet .swipeable-card:not([data-action-id]) {
  display: none;
}

.proposed-actions-sheet .sheet-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 16px;
}

.header-info {
  flex: 1;
}

.header-counter {
  flex-shrink: 0;
}

.counter-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--brokerly-text-secondary);
  padding: 6px 12px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
}

.progress-bar-container {
  padding: 0 20px 16px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--brokerly-secondary-background);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brokerly-primary);
  transition: width 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 2px;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.loading-state .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-state p {
  font-size: 16px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 20px;
  text-align: center;
}

.empty-icon {
  font-size: 60px;
}

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

.empty-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  max-width: 400px;
  line-height: 1.5;
  margin: 0;
}

.action-summary {
  display: flex;
  gap: 20px;
  padding: 16px 24px;
  background: var(--brokerly-secondary-background);
  border-radius: 12px;
}

.summary-item {
  display: flex;
  gap: 8px;
  align-items: center;
}

.summary-label {
  font-size: 14px;
  font-weight: 600;
}

.summary-count {
  font-size: 18px;
  font-weight: 700;
}

.summary-item.rejected .summary-label,
.summary-item.rejected .summary-count {
  color: #FF6F61;
}

.summary-item.accepted .summary-label,
.summary-item.accepted .summary-count {
  color: #50C878;
}

.btn-primary {
  padding: 16px 32px;
  background: var(--brokerly-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(87, 204, 234, 0.3);
}

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

/* ============================================
   AI ASSISTANT DRAWER
   ============================================ */

.ai-assistant-drawer .sheet-content {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

/* Drag Handle */
.drag-handle {
  width: 36px;
  height: 5px;
  background: var(--brokerly-text-quaternary);
  border-radius: 3px;
  margin: 8px auto 16px;
}

/* Assistant Header */
.assistant-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--brokerly-border-light);
}

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

.assistant-avatar .avatar-circle {
  width: 48px;
  height: 48px;
  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: 20px;
  font-weight: 700;
  position: relative;
}

.assistant-avatar .multicolor-border {
  border: 2px solid transparent;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-image:
    linear-gradient(white, white),
    var(--gradient-multicolor-8);
}

.assistant-info {
  flex: 1;
}

.assistant-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 0 0 4px 0;
}

.assistant-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #50C878;
  box-shadow: 0 0 4px rgba(80, 200, 120, 0.5);
}

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

/* Assistant Content */
.assistant-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* AI Response Bubble */
.ai-response-bubble {
  position: relative;
  background: var(--brokerly-primary-light);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
}

.bubble-pointer {
  position: absolute;
  top: -8px;
  left: 24px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--brokerly-primary-light);
}

.response-message {
  font-size: 16px;
  line-height: 1.6;
  color: var(--brokerly-text-primary);
  margin: 0;
}

/* Action Plan */
.action-plan {
  margin-bottom: 24px;
}

.plan-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 0 0 16px 0;
}

.plan-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan-step {
  display: flex;
  gap: 12px;
}

.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brokerly-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.step-content {
  flex: 1;
}

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

.step-description {
  font-size: 14px;
  color: var(--brokerly-text-secondary);
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.step-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.step-action-btn {
  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;
}

.step-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(87, 204, 234, 0.3);
}

/* Quick Actions */
.assistant-quick-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--brokerly-border-light);
}

.quick-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--brokerly-secondary-background);
  border: 1px solid var(--brokerly-border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  background: var(--brokerly-tertiary-background);
  transform: translateY(-1px);
}

.quick-action-btn svg {
  color: var(--brokerly-primary);
}

/* Loading State */
.assistant-content .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.assistant-content .loading-state .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;
}

.assistant-content .loading-state p {
  font-size: 16px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  text-align: center;
}

/* ============================================
   PROFILE SHEET - Collapsible Sections
   ============================================ */

.section-header-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.section-header-button:hover {
  opacity: 0.7;
}

.section-icon-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

.section-icon-title svg {
  color: var(--brokerly-primary);
}

.chevron-icon {
  color: var(--brokerly-text-secondary);
  transition: transform 0.3s ease;
}

.section-header-button.expanded .chevron-icon {
  transform: rotate(180deg);
}

.section-content {
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  padding-top: 8px;
}

/* Bank Toggle Rows */
.bank-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(142, 142, 147, 0.06);
  border-radius: 12px;
  transition: all 0.2s;
}

.bank-toggle-row:hover {
  background: rgba(142, 142, 147, 0.1);
}

.bank-toggle-row .bank-icon {
  font-size: 24px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bank-toggle-row .bank-info {
  flex: 1;
}

.bank-toggle-row .bank-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin: 0 0 2px 0;
}

.bank-toggle-row .bank-status {
  font-size: 13px;
  color: var(--brokerly-text-secondary);
  margin: 0;
}

/* Goals Chip Grid */
.goals-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  padding: 8px 0;
}

.goal-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(142, 142, 147, 0.06);
  border: 1.5px solid transparent;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brokerly-text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.goal-chip:hover {
  background: rgba(142, 142, 147, 0.1);
  transform: scale(1.02);
}

.goal-chip.selected {
  background: rgba(52, 199, 89, 0.1);
  border-color: var(--brokerly-primary);
  color: var(--brokerly-primary);
}

.goal-chip.selected svg {
  color: var(--brokerly-primary);
  flex-shrink: 0;
}

.goal-chip span {
  flex: 1;
  line-height: 1.3;
}

@media (max-width: 480px) {
  .goals-chip-grid {
    grid-template-columns: 1fr;
  }
}

/* Removed duplicate - scrolling now handled by .profile-scroll-content */

/* ============================================
   MOBILE-SPECIFIC IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {

  /* Prevent body scroll when sheet is open */
  body.sheet-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100vh;
    height: -webkit-fill-available;
  }

  /* Full height sheets on mobile with safe area consideration */
  .slide-up-sheet .sheet-content {
    max-height: calc(95vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  /* Ensure sheets don't interfere with tab navigation */
  .slide-up-sheet {
    bottom: 0;
  }

  /* Scrollable content areas should respect safe areas */
  .sheet-body,
  .profile-scroll-content {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    max-height: calc(85vh - env(safe-area-inset-top, 20px) - env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Prevent scroll chaining */
  }

  /* Profile sheet specific mobile adjustments */
  .profile-sheet {
    max-height: calc(90vh - env(safe-area-inset-bottom, 0px));
  }

  .profile-sheet .profile-scroll-content {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }

  /* Financial drawer mobile adjustments */
  .financial-drawer {
    max-height: calc(85vh - env(safe-area-inset-bottom, 0px));
  }

  /* Action card drawer mobile adjustments */
  .action-card-drawer .sheet-content {
    max-height: calc(85vh - env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================
   FINANCIAL DRAWER - iOS Matching Styles
   ============================================ */

/* AI Assistant Section */
.ai-assistant-section {
  background: var(--card-background);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
}

.ai-avatar-border {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg,
      #FF6F61,
      #FFD700,
      #50C878,
      #007AA5,
      #007AFF,
      #FF6F61);
  background-size: 200% 200%;
  animation: rotateGradient 3s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.ai-info {
  flex: 1;
}

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

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

.ai-commentary {
  padding: 8px 20px 20px;
  min-height: 120px;
  max-height: 30vh;
  overflow-y: auto;
  position: relative;
  background: var(--brokerly-secondary-background);
}

.commentary-section {
  margin-bottom: 12px;
}

.commentary-section:last-child {
  margin-bottom: 0;
}

.commentary-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-text-secondary);
  margin-bottom: 8px;
}

.commentary-text {
  font-size: 16px;
  font-weight: 400;
  color: var(--brokerly-text-primary);
  line-height: 1.5;
}

/* Analysis Section */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.analysis-card {
  background: var(--brokerly-secondary-background);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.analysis-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.analysis-header svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

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

.analysis-value {
  font-size: 20px;
  font-weight: 700;
  color: #007AFF;
}

/* Chart Section */
.chart-section {
  background: var(--brokerly-secondary-background);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.chart-header {
  margin-bottom: 20px;
}

.chart-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  margin-top: 4px;
}

.chart-container-enhanced {
  height: 260px;
  position: relative;
}

.chart-container-enhanced canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Drawer scrolling behavior */
.financial-drawer .sheet-body {
  overflow-y: auto;
  padding: 20px;
  max-height: calc(60vh - 120px);
}

/* Desktop: Increase scrollable area for taller drawer */
@media (min-width: 768px) {
  .financial-drawer .sheet-body {
    max-height: calc(75vh - 120px);
  }
}

.financial-drawer .sheet-body::-webkit-scrollbar {
  width: 4px;
}

.financial-drawer .sheet-body::-webkit-scrollbar-thumb {
  background: rgba(142, 142, 147, 0.3);
  border-radius: 4px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .chart-section {
    padding: 16px;
  }

  .chart-container-enhanced {
    height: 220px;
  }
}

/* Profile Sheet Collapsible Section Styles */
.profile-section.collapsible {
  border-bottom: 1px solid #e5e7eb;
}

.section-header-button {
  width: 100%;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.section-header-button:hover {
  background-color: #f9fafb;
}

.section-header-button.expanded {
  background-color: var(--brokerly-tertiary-background);
}

.section-icon-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--brokerly-text-primary);
}

.chevron-icon {
  transition: transform 0.3s ease;
}

.section-header-button.expanded .chevron-icon {
  transform: rotate(180deg);
}

/* Info Row Styles */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
}

.info-label {
  font-size: 14px;
  color: var(--brokerly-text-secondary);
}

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

/* Section Action Buttons */
.section-edit-button,
.section-view-button {
  width: calc(100% - 40px);
  margin: 12px 20px;
  padding: 10px;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  transition: background-color 0.2s;
}

.section-edit-button:hover,
.section-view-button:hover {
  background: #e5e7eb;
}

/* Assistant Chips (inline editing) */
.assistant-chips {
  display: flex;
  gap: 8px;
}

.assistant-chip {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--brokerly-border-medium);
  background: var(--modern-card-background);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.assistant-chip.selected {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.assistant-chip:hover:not(.selected) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* Bank Logo Animations */
.bank-logo-container {
  position: relative;
  width: 60px;
  height: 60px;
}

.bank-logo-background {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: var(--modern-card-background);
  position: relative;
  overflow: hidden;
  border: 3px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.bank-toggle-row.connected .bank-logo-background {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.liquid-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  transition: height 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  opacity: 0.15;
}

.bank-toggle-row.connected .liquid-fill {
  height: 100%;
}

.bank-logo {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 6px;
  transition: transform 0.3s ease;
}

.bank-toggle-row.connected .bank-logo {
  transform: scale(1.1);
}

/* Goal Card Animations */
.goal-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--modern-card-background);
  border-radius: 16px;
  border: 1px solid var(--brokerly-border-medium);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.goal-card.selected {
  border-color: var(--goal-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--goal-color);
  transform: scale(1.02);
}

.goal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--goal-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.goal-card.selected::before {
  opacity: 0.03;
}

.goal-icon-container {
  flex-shrink: 0;
}

.goal-icon-background {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--goal-color) 10%, white);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-liquid-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(180deg,
      color-mix(in srgb, var(--goal-color) 80%, white),
      var(--goal-color));
  transition: height 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.goal-card.selected .goal-liquid-fill {
  height: 100%;
}

.goal-icon {
  position: relative;
  z-index: 2;
  font-size: 24px;
  color: var(--goal-color);
  transition: all 0.3s ease;
}

.goal-card.selected .goal-icon {
  color: white;
  transform: scale(1.1);
}

.goal-content {
  flex: 1;
}

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

.goal-subtitle {
  font-size: 14px;
  color: var(--brokerly-text-secondary);
  margin: 0;
}

.goal-selector {
  flex-shrink: 0;
}

.goal-selector-ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.goal-card.selected .goal-selector-ring {
  background: var(--goal-color);
  border-color: var(--goal-color);
}

.goal-checkmark {
  font-size: 14px;
  color: white;
}

.goal-tap-feedback {
  transform: scale(0.98);
}

/* Budget Inline Editing */
.budget-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.budget-icon-container {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.budget-icon {
  font-size: 20px;
  color: #6b7280;
}

.budget-info {
  flex: 1;
}

.budget-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--brokerly-text-primary);
  display: block;
  margin-bottom: 4px;
}

.budget-input-inline {
  display: flex;
  align-items: center;
  gap: 4px;
}

.currency {
  font-size: 16px;
  font-weight: 600;
  color: #6b7280;
}

.budget-amount-input {
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  width: 80px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.budget-amount-input:focus {
  outline: none;
  background: var(--brokerly-input-background);
  box-shadow: 0 0 0 2px var(--brokerly-primary);
}

.budget-amount-input.saved {
  background: #dcfce7;
  color: #166534;
}

.budget-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.budget-remove-btn:hover {
  background: #fef2f2;
}

.budget-add-category-btn {
  width: 100%;
  padding: 16px;
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.budget-add-category-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #374151;
}


/* Goal List Styles */
.goals-list {
  padding: 0;
}

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

.goals-section:last-child {
  margin-bottom: 0;
}

.goals-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.goal-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--modern-card-background);
  border: 1px solid var(--brokerly-border-medium);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.goal-list-item:hover {
  border-color: var(--goal-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.goal-list-item.selected {
  border-color: var(--goal-color);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--goal-color);
  background: color-mix(in srgb, var(--goal-color) 2%, white);
}

.goal-list-icon {
  flex-shrink: 0;
}

.goal-list-icon .goal-icon-background {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--goal-color) 8%, white);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-list-icon .goal-liquid-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(180deg,
      color-mix(in srgb, var(--goal-color) 60%, white),
      var(--goal-color));
  transition: height 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.goal-list-item.selected .goal-list-icon .goal-liquid-fill {
  height: 100%;
}

.goal-list-icon .goal-icon {
  position: relative;
  z-index: 2;
  font-size: 20px;
  color: var(--goal-color);
  transition: all 0.2s ease;
}

.goal-list-item.selected .goal-list-icon .goal-icon {
  color: white;
  transform: scale(1.05);
}

.goal-list-content {
  flex: 1;
  min-width: 0;
}

.goal-list-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.goal-list-subtitle {
  font-size: 13px;
  color: var(--brokerly-text-secondary);
  margin: 0;
  line-height: 1.4;
}

.goal-list-checkbox {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-checkmark {
  font-size: 20px;
  color: var(--goal-color);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.goal-list-item.selected .goal-checkmark {
  opacity: 1;
  transform: scale(1);
}

.goal-checkbox-ring {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.goal-list-item:hover .goal-checkbox-ring {
  border-color: var(--goal-color);
}

.goal-tap-feedback {
  transform: scale(0.98);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-overlay.active {
  display: flex !important;
}

.modal-overlay.closing {
  animation: fadeOut 0.2s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.modal-content {
  background: var(--modern-card-background);
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.about-modal {
  text-align: center;
}

.about-modal h2 {
  margin: 0 0 16px 0;
  color: #111827;
}

.about-modal p {
  margin: 8px 0;
  color: #6b7280;
}

.modal-close-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 16px;
}

.category-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.category-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.category-option:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.category-option ion-icon {
  font-size: 24px;
  color: #6b7280;
}

.category-option span {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.modal-cancel-btn {
  background: #f3f4f6;
  color: #374151;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
}

/* ============================================
   Financial Drawer Enhancements
   ============================================ */

/* AI Insight Speech Bubble - Default to Clive's purple */
.ai-insight-bubble,
.ai-insight-bubble.clive {
  display: flex;
  gap: 12px;
  padding: 16px;
  margin: 16px 0;
  background: var(--clive-gradient);
  border-radius: 16px;
  box-shadow: 0 4px 12px var(--clive-glow);
}

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

.ai-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--modern-card-background);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insight-content {
  flex: 1;
  color: white;
  font-size: 14px;
  line-height: 1.6;
}

.insight-content p {
  margin: 0;
}

.insight-content strong {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.loading-insight {
  opacity: 0.8;
  font-style: italic;
}

/* Metric Summary Card */
.metric-summary-card {
  background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  margin: 16px 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.metric-label {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.current-value {
  font-size: 36px;
  font-weight: 700;
  color: #111827;
  margin: 8px 0;
  letter-spacing: -0.5px;
}

.trend-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}

.trend-indicator.up {
  color: #10b981;
}

.trend-indicator.down {
  color: #ef4444;
}

.trend-indicator.neutral {
  color: #6b7280;
}

.trend-indicator .arrow {
  font-size: 18px;
  line-height: 1;
}

/* Chart Section */
.drawer-chart-section {
  margin: 24px 0;
  padding: 20px;
  background: var(--modern-card-background);
  border-radius: 16px;
  border: 1px solid var(--brokerly-border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.drawer-chart-section .ai-chart-container {
  position: relative;
  width: 100%;
  min-height: 250px;
  max-height: 300px;
}

.drawer-chart-section .ai-chart {
  width: 100% !important;
  height: 250px !important;
}

/* Budget Button */
.set-budget-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  margin: 24px 0 16px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.set-budget-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.set-budget-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.set-budget-btn svg {
  flex-shrink: 0;
}

/* Budget Usage Bar (for categories) */
.budget-usage-bar {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.budget-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.budget-label-text {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.budget-percentage {
  font-size: 13px;
  font-weight: 600;
  color: #10b981;
}

.budget-percentage.over-budget {
  color: #ef4444;
}

.budget-progress-bar {
  height: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
}

.budget-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  transition: width 0.3s ease;
  border-radius: 4px;
}

.budget-progress-fill.over-budget {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

/* Vendor Stats */
.vendor-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.vendor-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vendor-stat-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.vendor-stat-value {
  font-size: 16px;
  color: #111827;
  font-weight: 600;
}

/* Transaction Summary Card */
.transaction-summary-card {
  background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  margin: 16px 0;
  text-align: center;
}

.transaction-vendor-name {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

.transaction-main-amount {
  font-size: 32px;
  font-weight: 700;
  color: #ef4444;
  margin: 8px 0;
}

.transaction-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.transaction-category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.transaction-date-text {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

/* Transaction Details Section */
.transaction-details-section .detail-list {
  background: var(--modern-card-background);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
}

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

.detail-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.detail-value {
  font-size: 14px;
  color: #111827;
  font-weight: 600;
  text-align: right;
}

.detail-value.status-completed {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #10b981;
}

.detail-value.status-completed svg {
  flex-shrink: 0;
}

.detail-value.transaction-id {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: #6b7280;
}

/* Transaction Section */
.transaction-section {
  margin: 16px 0;
}

.transaction-section .section-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 12px 0;
}

.transaction-list {
  background: var(--modern-card-background);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.transaction-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.2s;
}

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

.transaction-row:hover {
  background: #f9fafb;
}

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

.transaction-vendor {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.transaction-date {
  font-size: 12px;
  color: #6b7280;
}

.transaction-amount {
  font-size: 15px;
  font-weight: 600;
  color: #ef4444;
  white-space: nowrap;
  margin-left: 12px;
}

.no-data {
  padding: 24px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

/* Transaction Header Card (matching iOS) */
.transaction-header-card {
  background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px 24px;
  margin: 16px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.transaction-amount-large {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.transaction-amount-large.income {
  color: #10b981;
}

.transaction-amount-large.expense {
  color: #111827;
}

.transaction-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
}

.transaction-type-badge.income {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.transaction-type-badge.expense {
  background: rgba(251, 146, 60, 0.1);
  color: #f97316;
}

.transaction-type-badge svg {
  flex-shrink: 0;
}

/* Transaction Details Card (matching iOS with icons) */
.transaction-details-card {
  background: var(--modern-card-background);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.transaction-detail-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.transaction-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}

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

.detail-icon {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.detail-icon svg {
  width: 16px;
  height: 16px;
}

.transaction-detail-row .detail-label {
  flex-shrink: 0;
  width: 100px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.transaction-detail-row .detail-value {
  flex: 1;
  font-size: 15px;
  color: #111827;
  font-weight: 400;
  text-align: left;
}

/* AI Analysis Section (matching iOS) */
.ai-analysis-section {
  background: var(--modern-card-background);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.ai-analysis-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--modern-card-background);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-analysis-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-analysis-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.analysis-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.analysis-subtitle {
  font-size: 14px;
  color: #6b7280;
}

.ai-analysis-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analysis-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analysis-label {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.analysis-text {
  font-size: 15px;
  color: #111827;
  line-height: 1.6;
}

/* Transaction Action Buttons (matching iOS) */
.transaction-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.transaction-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transaction-action-btn.primary {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.transaction-action-btn.primary:hover {
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

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

.transaction-action-btn svg {
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ai-insight-bubble {
    padding: 14px;
    gap: 10px;
  }

  .ai-avatar {
    width: 40px;
    height: 40px;
  }

  .current-value {
    font-size: 32px;
  }

  .drawer-chart-section .ai-chart {
    height: 220px !important;
  }

  .transaction-main-amount {
    font-size: 28px;
  }

  .vendor-stats {
    gap: 8px;
  }

  .transaction-amount-large {
    font-size: 34px;
  }

  .transaction-header-card {
    padding: 24px 16px;
  }

  .transaction-detail-row .detail-label {
    width: 80px;
    font-size: 13px;
  }

  .transaction-detail-row .detail-value {
    font-size: 14px;
  }
}

/* Tender Detail Styles */
.tender-title-large {
  font-size: 24px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 12px 0;
  line-height: 1.3;
}

.status-budget-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.tender-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.metric-pill {
  background: var(--modern-card-background);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.metric-pill .metric-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Info Rows */
.info-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

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

.info-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--brokerly-text-secondary);
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--brokerly-text-primary);
}

/* Bid Cards */
.bids-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bid-card {
  background: var(--modern-card-background);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

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

.bid-card.bid-winning {
  border-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

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

.bid-vendor {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vendor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

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

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

.vendor-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.rating-text {
  color: var(--brokerly-text-secondary);
}

.bid-amount {
  font-size: 20px;
  font-weight: 700;
  color: #10b981;
}

.bid-proposal {
  margin: 12px 0;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--brokerly-text-secondary);
}

.bid-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--brokerly-text-secondary);
  margin-top: 12px;
}

.bid-time,
.bid-completion {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bid-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.bid-action-button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.bid-action-button.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

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

.bid-action-button.secondary {
  background: var(--modern-card-background);
  color: var(--brokerly-text-primary);
  border: 1px solid #e5e7eb;
}

.bid-action-button.secondary:hover {
  background: #f9fafb;
}

/* Responsive Adjustments for Tender Details */
@media (max-width: 480px) {
  .tender-title-large {
    font-size: 20px;
  }

  .tender-metrics-grid {
    gap: 8px;
  }

  .metric-pill {
    padding: 12px 8px;
  }

  .metric-pill .metric-value {
    font-size: 18px;
  }

  .metric-pill .metric-label {
    font-size: 11px;
  }

  .bid-amount {
    font-size: 18px;
  }

  .vendor-avatar {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

/* Dark Mode Overrides for Tender Details */
[data-theme="dark"] .metric-summary-card,
[data-theme="dark"] .metric-pill,
[data-theme="dark"] .bid-card,
[data-theme="dark"] .bid-action-button.secondary {
  background: var(--modern-card-background);
  border-color: var(--brokerly-border-medium);
}

[data-theme="dark"] .current-value {
  color: var(--brokerly-text-primary);
}

[data-theme="dark"] .metric-label,
[data-theme="dark"] .info-label,
[data-theme="dark"] .rating-text,
[data-theme="dark"] .bid-meta {
  color: var(--brokerly-text-secondary);
}

[data-theme="dark"] .info-row {
  border-bottom: 1px solid var(--brokerly-border-light);
}

[data-theme="dark"] .bid-card.bid-winning {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .bid-proposal {
  background: var(--brokerly-tertiary-background);
  color: var(--brokerly-text-secondary);
}

[data-theme="dark"] .bid-action-button.secondary:hover {
  background: var(--brokerly-tertiary-background);
}