/* =============================================================================
   PaisaSavy Mobile-App UI Design System (Bottom Sheets, Drawers, Toasts, Pills)
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Floating Toast Snackbars
   ----------------------------------------------------------------------------- */
.mobile-toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 90vw;
  width: 380px;
  pointer-events: none;
}

@media (max-width: 576px) {
  .mobile-toast-container {
    top: auto;
    bottom: calc(64px + 1rem); /* Clear bottom nav on mobile */
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

.mobile-toast {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: rgba(18, 22, 34, 0.96);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.865rem;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  transform: translateY(-12px) scale(0.96);
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-toast.hide {
  transform: translateY(10px) scale(0.92);
  opacity: 0;
}

.mobile-toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.mobile-toast.toast-success .mobile-toast-icon {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.mobile-toast.toast-error .mobile-toast-icon {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.mobile-toast.toast-warning .mobile-toast-icon {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.mobile-toast.toast-info .mobile-toast-icon {
  background: rgba(99, 102, 241, 0.16);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.mobile-toast-content {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.mobile-toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: color 0.15s ease;
}

.mobile-toast-close:hover {
  color: #ffffff;
}

/* Light mode toasts */
[data-bs-theme="light"] .mobile-toast {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
}

[data-bs-theme="light"] .mobile-toast-close {
  color: rgba(0, 0, 0, 0.4);
}

/* -----------------------------------------------------------------------------
   2. Mobile Bottom-Sheet & Action Drawer System
   ----------------------------------------------------------------------------- */
.sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  background: #0f131c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  z-index: 99995;
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.mobile-bottom-sheet.active {
  transform: translateY(0);
}

/* Desktop adaptive modal view */
@media (min-width: 768px) {
  .mobile-bottom-sheet.desktop-adaptive {
    top: 50%;
    bottom: auto;
    border-radius: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transform: translate(-50%, -46%) scale(0.96);
    opacity: 0;
    left: 50%;
    right: auto;
    max-height: 82vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  }

  .mobile-bottom-sheet.desktop-adaptive.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Sheet Top Handle */
.sheet-handle-bar {
  width: 100%;
  padding-top: 10px;
  padding-bottom: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

.sheet-handle {
  width: 44px;
  height: 4.5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
}

[data-bs-theme="light"] .sheet-handle {
  background: rgba(0, 0, 0, 0.2);
}

/* Sheet Header */
.sheet-header {
  padding: 0.75rem 1.25rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-header-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sheet-header-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

.sheet-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.sheet-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Sheet Scrollable Body */
.sheet-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

/* Sheet Footer */
.sheet-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 0.75rem;
}

/* Light mode bottom sheet */
[data-bs-theme="light"] .mobile-bottom-sheet {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-bs-theme="light"] .sheet-header {
  border-bottom-color: #e2e8f0;
}

[data-bs-theme="light"] .sheet-header-title {
  color: #0f172a;
}

[data-bs-theme="light"] .sheet-header-subtitle {
  color: #64748b;
}

[data-bs-theme="light"] .sheet-close-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

[data-bs-theme="light"] .sheet-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-bs-theme="light"] .sheet-footer {
  border-top-color: #e2e8f0;
  background: #f8fafc;
}

/* -----------------------------------------------------------------------------
   3. Rich Scenario Cards in Bottom Sheet
   ----------------------------------------------------------------------------- */
.scenario-card-item {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.scenario-card-item:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.scenario-card-item.selected {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35), 0 4px 14px rgba(99, 102, 241, 0.15);
}

.scenario-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.scenario-card-item.selected .scenario-card-icon {
  background: #6366f1;
  color: #ffffff;
  border-color: #818cf8;
}

.scenario-card-details {
  flex: 1;
  min-width: 0;
}

.scenario-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.scenario-condition-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  line-height: 1;
}

.scenario-badge-bull {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.scenario-badge-bear {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.scenario-badge-inflation {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.scenario-badge-growth {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.scenario-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.scenario-card-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.scenario-card-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.scenario-meta-chip {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scenario-radio-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.scenario-card-item.selected .scenario-radio-check {
  border-color: #6366f1;
  background: #6366f1;
  color: #ffffff;
}

.scenario-card-item.selected .scenario-radio-check::after {
  content: '✓';
  font-size: 0.7rem;
  font-weight: 900;
}

/* Light mode scenario cards */
[data-bs-theme="light"] .scenario-card-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-bs-theme="light"] .scenario-card-item:hover {
  background: #f8fafc;
  border-color: #a5b4fc;
}

[data-bs-theme="light"] .scenario-card-item.selected {
  background: #f0f4ff;
  border-color: #6366f1;
}

[data-bs-theme="light"] .scenario-card-title {
  color: #0f172a;
}

[data-bs-theme="light"] .scenario-card-desc {
  color: #64748b;
}

[data-bs-theme="light"] .scenario-meta-chip {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

/* -----------------------------------------------------------------------------
   4. Mobile Action Confirmation Sheet (Replacing confirm())
   ----------------------------------------------------------------------------- */
.confirm-sheet-content {
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.confirm-sheet-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.confirm-sheet-icon.danger {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.confirm-sheet-icon.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.confirm-sheet-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.confirm-sheet-message {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.btn-sheet-confirm {
  width: 100%;
  padding: 0.85rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-sheet-danger {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-sheet-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-sheet-primary {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-sheet-primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.btn-sheet-cancel {
  width: 100%;
  padding: 0.8rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sheet-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

[data-bs-theme="light"] .confirm-sheet-title {
  color: #0f172a;
}

[data-bs-theme="light"] .confirm-sheet-message {
  color: #64748b;
}

[data-bs-theme="light"] .btn-sheet-cancel {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

[data-bs-theme="light"] .btn-sheet-cancel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* -----------------------------------------------------------------------------
   5. Segmented Control Touch Pills (Replacing <select> in Profile)
   ----------------------------------------------------------------------------- */
.segmented-control {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.segmented-pill {
  flex: 1 1 0;
  min-width: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.35rem;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segmented-pill:hover {
  color: #f1f5f9;
}

.segmented-pill.active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

[data-bs-theme="light"] .segmented-control {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

[data-bs-theme="light"] .segmented-pill {
  color: #64748b;
}

[data-bs-theme="light"] .segmented-pill:hover {
  color: #0f172a;
}

[data-bs-theme="light"] .segmented-pill.active {
  background: #4f46e5;
  color: #ffffff;
}

@media (max-width: 440px) {
  .segmented-control {
    padding: 2.5px;
    gap: 2.5px;
  }
  .segmented-pill {
    font-size: 0.72rem;
    padding: 0.4rem 0.2rem;
    gap: 0.2rem;
  }
  .segmented-pill i {
    font-size: 0.75rem;
  }
}

@media (max-width: 360px) {
  .segmented-pill {
    font-size: 0.68rem;
    padding: 0.38rem 0.15rem;
    gap: 0.15rem;
  }
  .segmented-pill i {
    font-size: 0.7rem;
  }
}

/* -----------------------------------------------------------------------------
   6. Mobile Option Picker & Custom Trigger System
   ----------------------------------------------------------------------------- */
.mobile-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-picker-trigger:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 102, 241, 0.4);
}

.mobile-picker-trigger:active {
  transform: scale(0.99);
}

.picker-trigger-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

[data-bs-theme="light"] .mobile-picker-trigger {
  background: #ffffff;
  border-color: #cbd5e1;
}

[data-bs-theme="light"] .mobile-picker-trigger:hover {
  background: #f8fafc;
  border-color: #6366f1;
}

/* Mobile Options List in Bottom Sheet */
.mobile-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mobile-option-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-option-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.mobile-option-card:active {
  transform: scale(0.985);
}

.mobile-option-card.selected {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.14) 0%, rgba(16, 185, 129, 0.04) 100%);
  border-color: #10b981;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35), 0 4px 12px rgba(16, 185, 129, 0.15);
}

.mobile-option-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.mobile-option-info {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.mobile-option-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.3;
}

.mobile-option-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 2px;
}

.mobile-option-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  transition: all 0.15s ease;
}

.mobile-option-card.selected .mobile-option-radio {
  background: #10b981;
  border-color: #10b981;
}

/* Light Theme Option Card */
[data-bs-theme="light"] .mobile-option-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-bs-theme="light"] .mobile-option-card:hover {
  background: #f8fafc;
  border-color: #10b981;
}

[data-bs-theme="light"] .mobile-option-card.selected {
  background: #f0fdf4;
  border-color: #10b981;
}

[data-bs-theme="light"] .mobile-option-title {
  color: #0f172a;
}

[data-bs-theme="light"] .mobile-option-desc {
  color: #64748b;
}

[data-bs-theme="light"] .mobile-option-radio {
  border-color: #cbd5e1;
}

/* -----------------------------------------------------------------------------
   7. Mobile Date of Birth Picker (Wheels, Live Age Banner & Decade Jump)
   ----------------------------------------------------------------------------- */
.mobile-dob-preview-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 16px;
  padding: 0.85rem 1.1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.mobile-dob-selected-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.mobile-dob-selected-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

.mobile-dob-age-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 12px;
  padding: 0.35rem 0.75rem;
  min-width: 68px;
  transition: all 0.2s ease;
}

.mobile-dob-age-pill .age-num {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  color: #a5b4fc;
}

.mobile-dob-age-pill .age-lbl {
  font-size: 0.62rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #c7d2fe;
  margin-top: 2px;
}

.mobile-dob-age-pill.pill-adult {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.38);
}
.mobile-dob-age-pill.pill-adult .age-num {
  color: #818cf8;
}

.mobile-dob-age-pill.pill-senior {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.38);
}
.mobile-dob-age-pill.pill-senior .age-num {
  color: #34d399;
}
.mobile-dob-age-pill.pill-senior .age-lbl {
  color: #6ee7b7;
}

.mobile-dob-age-pill.pill-minor {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.38);
}
.mobile-dob-age-pill.pill-minor .age-num {
  color: #fbbf24;
}
.mobile-dob-age-pill.pill-minor .age-lbl {
  color: #fde68a;
}

/* Quick Decade Jump Chips */
.mobile-dob-quick-decades {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
  scrollbar-width: none;
}
.mobile-dob-quick-decades::-webkit-scrollbar {
  display: none;
}

.quick-chip-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  display: flex;
  align-items: center;
  margin-right: 2px;
}

.dob-decade-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 0.22rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.dob-decade-chip:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.dob-decade-chip:active {
  transform: scale(0.96);
}

/* 3-Column Picker Grid */
.mobile-date-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1.15fr;
  gap: 0.5rem;
}

.date-picker-col {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.date-picker-col-header {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-align: center;
  padding: 0.35rem 0.2rem;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.date-wheel-list {
  height: 185px;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 0.35rem 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  -webkit-overflow-scrolling: touch;
}

.date-wheel-list::-webkit-scrollbar {
  width: 4px;
}
.date-wheel-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.date-wheel-item {
  padding: 0.42rem 0.5rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.15s ease;
  user-select: none;
}

.date-wheel-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
}

.date-wheel-item.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.45);
}

/* Light Theme overrides for Date Picker */
[data-bs-theme="light"] .mobile-dob-preview-card {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border-color: #c7d2fe;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

[data-bs-theme="light"] .mobile-dob-selected-text {
  color: #0f172a;
}

[data-bs-theme="light"] .mobile-dob-selected-sub {
  color: #64748b;
}

[data-bs-theme="light"] .mobile-dob-age-pill {
  background: #e0e7ff;
  border-color: #c7d2fe;
}
[data-bs-theme="light"] .mobile-dob-age-pill .age-num {
  color: #4338ca;
}
[data-bs-theme="light"] .mobile-dob-age-pill .age-lbl {
  color: #4f46e5;
}

[data-bs-theme="light"] .quick-chip-label {
  color: #64748b;
}

[data-bs-theme="light"] .dob-decade-chip {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}
[data-bs-theme="light"] .dob-decade-chip:hover {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

[data-bs-theme="light"] .date-picker-col {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-bs-theme="light"] .date-picker-col-header {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

[data-bs-theme="light"] .date-wheel-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

[data-bs-theme="light"] .date-wheel-item {
  color: #475569;
}

[data-bs-theme="light"] .date-wheel-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-bs-theme="light"] .date-wheel-item.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
}

/* -----------------------------------------------------------------------------
   8. Modern Mobile Fintech Styling: Cashflow Summary & Secondary Inflows
   ----------------------------------------------------------------------------- */
/* Live Cashflow Balance Banner */
.cashflow-summary-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(99, 102, 241, 0.06));
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cashflow-pill-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.cashflow-sub-text {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.3;
}

.cashflow-total-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.cashflow-total-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Inflow Section Header & Button */
.inflow-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.btn-add-inflow-stream {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #10b981;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-add-inflow-stream:hover {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-add-inflow-stream:active {
  transform: scale(0.96);
}

/* Inflow Form Card (Fintech App Style) */
.income-stream-form-card {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: slideDownFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.income-form-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.btn-close-income-form {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-close-income-form:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Modern Input Wrapper */
.modern-input-wrapper {
  position: relative;
  width: 100%;
}

.modern-form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.84rem;
  color: #f8fafc;
  outline: none;
  transition: all 0.18s ease;
}

.modern-form-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.modern-form-input::placeholder {
  color: #64748b;
  font-size: 0.8rem;
}

/* Modern Category Trigger */
.modern-trigger {
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.modern-trigger:hover {
  border-color: #10b981;
  background: rgba(255, 255, 255, 0.06);
}

/* Hero Monthly Amount Input Card */
.hero-amount-input-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  padding: 0.55rem 1rem;
  transition: all 0.18s ease;
}

.hero-amount-input-card:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
  background: rgba(0, 0, 0, 0.45);
}

.hero-currency-symbol {
  font-size: 1.4rem;
  font-weight: 800;
  color: #10b981;
  line-height: 1;
}

.hero-amount-input {
  border: none;
  background: transparent;
  color: #10b981;
  font-size: 1.35rem;
  font-weight: 800;
  width: 100%;
  outline: none;
  font-family: inherit;
  letter-spacing: 0.5px;
}

.hero-amount-input::placeholder {
  color: rgba(16, 185, 129, 0.4);
}

/* Quick Amount Increment Chips */
.quick-amount-chips-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.quick-amount-chips-row::-webkit-scrollbar {
  display: none;
}

.quick-chip-hint {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  margin-right: 2px;
}

.amount-quick-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.22rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.amount-quick-chip:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.amount-quick-chip:active {
  transform: scale(0.95);
}

/* Modern Segmented Control */
.modern-segmented {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Income Form Action Buttons */
.btn-income-cancel {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.btn-income-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-income-save {
  padding: 0.65rem 1.2rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.18s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-income-save:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-income-save:active {
  transform: scale(0.98);
}

/* Passive Inflows Trigger Tile */
#btnToggleAddIncomeSource {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#btnToggleAddIncomeSource:hover {
  border-color: rgba(16, 185, 129, 0.4) !important;
  background: rgba(16, 185, 129, 0.04) !important;
}

#btnToggleAddIncomeSource:active {
  transform: scale(0.99);
}

/* Empty State Card (legacy fallback) */
.empty-inflow-card {
  border: 1.5px dashed rgba(16, 185, 129, 0.28);
  border-radius: 16px;
  padding: 1.4rem 1rem;
  text-align: center;
  background: rgba(16, 185, 129, 0.03);
  margin-top: 0.25rem;
}

.empty-inflow-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin: 0 auto 0.6rem;
}

.empty-inflow-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.25rem;
}

.empty-inflow-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  max-width: 320px;
  margin: 0 auto 0.9rem;
  line-height: 1.4;
}

.btn-empty-add-stream {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-empty-add-stream:hover {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

/* Saved Stream Cards */
.saved-stream-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.saved-stream-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.stream-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stream-card-name {
  font-weight: 600;
  font-size: 0.84rem;
  color: #f8fafc;
}

.stream-card-meta {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 1px;
}

.stream-stability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
}

.stream-stability-badge.badge-fixed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.stream-stability-badge.badge-variable {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.stream-card-amount {
  font-weight: 800;
  font-size: 0.92rem;
  color: #10b981;
  font-family: monospace, var(--bs-font-sans-serif);
  line-height: 1.2;
}

.stream-card-period {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn-delete-stream {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-delete-stream:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Light Theme Overrides */
[data-bs-theme="light"] .cashflow-summary-card {
  background: linear-gradient(135deg, #f0fdf4, #eef2ff);
  border-color: #bbf7d0;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.08);
}

[data-bs-theme="light"] .cashflow-sub-text {
  color: #64748b;
}

[data-bs-theme="light"] .cashflow-total-label {
  color: #64748b;
}

[data-bs-theme="light"] .cashflow-total-badge {
  background: #e0e7ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

[data-bs-theme="light"] .income-stream-form-card {
  background: linear-gradient(145deg, #f0fdf4, #ffffff);
  border-color: #86efac;
  box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.15);
}

[data-bs-theme="light"] .btn-close-income-form {
  background: #f1f5f9;
  color: #64748b;
}

[data-bs-theme="light"] .btn-close-income-form:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-bs-theme="light"] .modern-form-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-bs-theme="light"] .modern-form-input:focus {
  background: #ffffff;
  border-color: #10b981;
}

[data-bs-theme="light"] .modern-form-input::placeholder {
  color: #94a3b8;
}

[data-bs-theme="light"] .hero-amount-input-card {
  background: #ffffff;
  border-color: #86efac;
}

[data-bs-theme="light"] .hero-amount-input-card:focus-within {
  border-color: #10b981;
  background: #ffffff;
}

[data-bs-theme="light"] .amount-quick-chip {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

[data-bs-theme="light"] .amount-quick-chip:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #047857;
}

[data-bs-theme="light"] .modern-segmented {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

[data-bs-theme="light"] .btn-income-cancel {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

[data-bs-theme="light"] .btn-income-cancel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-bs-theme="light"] .empty-inflow-card {
  border-color: #86efac;
  background: #f0fdf4;
}

[data-bs-theme="light"] .empty-inflow-title {
  color: #0f172a;
}

[data-bs-theme="light"] .empty-inflow-desc {
  color: #64748b;
}

[data-bs-theme="light"] .saved-stream-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-bs-theme="light"] .saved-stream-card:hover {
  background: #f8fafc;
  border-color: #10b981;
}

[data-bs-theme="light"] .stream-card-name {
  color: #0f172a;
}

[data-bs-theme="light"] .stream-card-meta {
  color: #64748b;
}

[data-bs-theme="light"] .btn-delete-stream {
  color: #64748b;
}



