/* Dashboard Specific Styles */

.container {
  padding-bottom: 80px;
}

/* Bottom Navigation — iOS Tab Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  display: flex;
  justify-content: space-around;
  padding: 6px 0 env(safe-area-inset-bottom, 8px);
  border-top: 0.5px solid var(--separator);
  z-index: 100;
}

body.dark-mode .bottom-nav {
  background: rgba(28, 28, 30, 0.92);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 0;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.01em;
}

.nav-item.active {
  color: var(--primary);
  background: transparent;
}

.nav-icon {
  font-size: 24px;
  margin-bottom: 2px;
}

.nav-svg {
  width: 24px;
  height: 24px;
  margin-bottom: 2px;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 0;
}

.greeting {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 2px;
}

.dashboard-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* NET BALANCE Hero Card */
.net-balance-card {
  border-radius: 16px;
  padding: 24px;
  color: white;
  margin-bottom: 12px;
  text-align: center;
}

.net-balance-card.positive {
  background: linear-gradient(145deg, #30d158 0%, #34c759 100%);
}

.net-balance-card.negative {
  background: linear-gradient(145deg, #ff453a 0%, #ff3b30 100%);
}

.net-balance-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.net-balance-amount {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}

/* Finance Row (Income + Expense cards) */
.finance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.finance-card {
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.finance-card.income-card {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.finance-card.expense-card {
  background: linear-gradient(135deg, #ff6a00 0%, #ff8c40 100%);
  box-shadow: 0 4px 16px rgba(255, 106, 0, 0.25);
}

.finance-card-icon { font-size: 28px; }
.finance-card-label { font-size: 12px; opacity: 0.9; }
.finance-card-amount { font-size: 20px; font-weight: 700; }

/* Budget Alerts */
.budget-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.dark-mode .alert-warning { background: #78350f20; color: #fbbf24; }
.dark-mode .alert-danger { background: #7f1d1d20; color: #f87171; }

.budget-alert-icon { font-size: 18px; flex-shrink: 0; }

.budget-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-warn { background: #fef3c7; color: #92400e; }
.badge-over { background: #fee2e2; color: #991b1b; }
.dark-mode .badge-warn { background: #78350f40; color: #fbbf24; }
.dark-mode .badge-over { background: #7f1d1d40; color: #f87171; }

/* Daily Spending Limit */
.daily-limit-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.daily-limit-icon { font-size: 28px; }
.daily-limit-info { flex: 1; }
.daily-limit-label { font-size: 12px; color: var(--text-secondary); }
.daily-limit-amount { font-size: 24px; font-weight: 700; }
.daily-limit-days { font-size: 12px; color: var(--text-secondary); text-align: right; }

/* Currency Rate Card */
.currency-rate-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.currency-rate-left { display: flex; align-items: center; gap: 10px; }
.currency-rate-icon { font-size: 24px; }
.currency-rate-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.currency-rate-value { font-size: 16px; font-weight: 600; color: var(--text); }
.currency-rate-updated { font-size: 11px; color: var(--text-secondary); background: var(--gray-100); padding: 4px 8px; border-radius: 6px; }

/* Old Balance Card (hidden) */
.balance-card {
  background: linear-gradient(135deg, #ff6a00 0%, #ffab40 100%);
  border-radius: 24px;
  padding: 28px;
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 10px 40px rgba(255, 106, 0, 0.3);
}

.balance-label { font-size: 14px; opacity: 0.9; margin-bottom: 8px; }
.balance-amount { font-size: 42px; font-weight: 700; margin-bottom: 16px; }
.balance-budget { display: flex; align-items: center; gap: 8px; font-size: 14px; opacity: 0.9; }
.budget-edit { background: rgba(255, 255, 255, 0.2); border: none; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.budget-progress-container { margin-top: 20px; }
.budget-progress-bar { height: 8px; background: rgba(255, 255, 255, 0.3); border-radius: 4px; overflow: hidden; }
.budget-progress-fill { height: 100%; background: white; border-radius: 4px; transition: width 0.5s ease; }
.budget-progress-fill.warning { background: #fbbf24; }
.budget-progress-fill.danger { background: #ef4444; }
.budget-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; opacity: 0.9; }

/* Quick Actions */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.action-btn { background: var(--card-bg); border-radius: 16px; padding: 16px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); transition: transform 0.2s, box-shadow 0.2s; }
.action-btn:active { transform: scale(0.98); }
.action-icon { font-size: 24px; }
.action-btn span:last-child { font-size: 14px; font-weight: 500; }

/* Savings Rate Card */
.savings-rate-card { padding: 20px !important; }
.savings-rate-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.savings-rate-value { font-size: 28px; font-weight: 700; }
.savings-rate-bar-container { height: 12px; background: var(--gray-200); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.savings-rate-bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease, background 0.5s ease; }
.savings-rate-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); }

/* Allocation Buckets (50/20/20/10) */
.allocation-item { padding: 12px 0; border-bottom: 1px solid var(--gray-200); }
.allocation-item:last-child { border-bottom: none; padding-bottom: 0; }
.allocation-item:first-child { padding-top: 0; }
.allocation-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.allocation-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.allocation-info { flex: 1; }
.allocation-name { font-weight: 600; font-size: 14px; color: var(--text); }
.allocation-percent { font-weight: 400; font-size: 12px; color: var(--text-secondary); }
.allocation-amounts { display: flex; gap: 6px; align-items: baseline; font-size: 14px; }
.allocation-amounts span:first-child { font-weight: 600; }
.allocation-of { font-size: 12px; color: var(--text-secondary) !important; font-weight: 400 !important; }
.allocation-bar { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.allocation-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* Monthly Trends Chart */
.monthly-trends-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding-top: 10px;
  flex-wrap: wrap;
}

.trend-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.trend-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 100px;
  width: 100%;
  justify-content: center;
}

.trend-bar {
  width: 14px;
  border-radius: 4px 4px 0 0;
  min-height: 3px;
  transition: height 0.5s ease;
}

.trend-bar.income-bar {
  background: linear-gradient(to top, #10b981, #34d399);
}

.trend-bar.expense-bar {
  background: linear-gradient(to top, #ff6a00, #ffab40);
}

.trend-bar.expense-bar.current {
  background: linear-gradient(to top, #ef4444, #f87171);
}

.trend-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.trend-legend {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.trend-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.trend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.trend-dot.income { background: #10b981; }
.trend-dot.expense { background: #ff6a00; }

/* Financial Goals */
.goal-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

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

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

.goal-name { font-weight: 600; font-size: 14px; }
.goal-pct { font-weight: 700; font-size: 16px; }

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

.goal-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

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

.goal-amounts {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Debt Tracker */
.debt-tracker-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.debt-tracker-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.debt-progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

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

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

.debt-paid-label {
  font-size: 11px;
  color: #10b981;
}

.debt-pay-btn {
  padding: 4px 12px;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.debt-pay-btn:hover { background: var(--primary-dark); }

/* Recurring Bills */
.recurring-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}

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

.recurring-due {
  background: #fee2e2;
  border-radius: 10px;
  padding: 10px 12px !important;
  margin: 4px -4px;
}

.dark-mode .recurring-due { background: #7f1d1d20; }

.recurring-soon { color: #f59e0b; }

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

.recurring-row-info { flex: 1; }
.recurring-row-name { font-weight: 600; font-size: 14px; }
.recurring-row-date { font-size: 12px; color: var(--text-secondary); }
.recurring-row-amount { font-weight: 700; color: var(--danger); font-size: 14px; }

/* Subscriptions */
.sub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}

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

.sub-upcoming {
  background: #fef3c7;
  border-radius: 10px;
  padding: 10px 12px !important;
  margin: 4px -4px;
}

.dark-mode .sub-upcoming { background: #78350f20; }

.sub-icon { font-size: 24px; flex-shrink: 0; }
.sub-info { flex: 1; }
.sub-name { font-weight: 600; font-size: 14px; }
.sub-freq { font-size: 12px; color: var(--text-secondary); }
.sub-amount { font-weight: 700; font-size: 14px; color: var(--text); }

.sub-delete {
  width: 24px;
  height: 24px;
  border: none;
  background: var(--gray-200);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sub-delete:hover { background: #fecaca; color: #ef4444; }

.subs-total {
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
  margin-top: 8px;
  font-size: 14px;
  text-align: right;
  color: var(--text-secondary);
}

/* Split Expenses */
.split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}

.split-row:last-child { border-bottom: none; }
.split-desc { font-weight: 600; font-size: 14px; }
.split-people { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.split-actions { display: flex; align-items: center; gap: 10px; }
.split-total { font-weight: 700; font-size: 14px; }

/* Photo Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-item:hover { transform: scale(1.05); }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-date {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 9px;
  padding: 3px 4px;
  text-align: center;
}

/* Photo Modal */
.photo-modal { position: fixed; inset: 0; z-index: 1000; }

.photo-modal-backdrop {
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-modal-content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 16px;
  max-width: 400px;
  width: 100%;
}

.photo-modal-content img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 12px;
}

.photo-modal-info p { margin-bottom: 4px; }

/* Export Section */
.export-section {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.export-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.export-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 106, 0, 0.3);
}

.export-btn.secondary {
  background: var(--gray-200);
  color: var(--text);
}

.export-btn.secondary:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Glass morphism for all cards */
.chart-card,
.section-card,
.stat-box,
.action-chooser,
.daily-limit-card,
.currency-rate-card,
.goal-stat-card,
.goal-lock-card,
.modal-card,
.photo-modal-content {
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* Chart Card */
.chart-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
}

.chart-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -0.2px;
}

/* Pie Chart */
.pie-container { position: relative; width: 200px; height: 200px; margin: 0 auto 24px; }
.pie-chart { width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(var(--gray-200) 0deg 360deg); position: relative; }
.pie-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 120px; height: 120px; background: var(--card-bg); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pie-total { font-size: 24px; font-weight: 700; color: var(--text); }
.pie-label { font-size: 12px; color: var(--text-secondary); }

/* Pie Legend */
.pie-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-color { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.legend-info { flex: 1; min-width: 0; }
.legend-name { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-value { font-size: 14px; font-weight: 600; color: var(--text); }

/* Stats Row */
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat-box { background: var(--card-bg); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 10px; }
.stat-icon { font-size: 28px; }
.stat-info { flex: 1; }
.stat-box .stat-value { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.stat-box .stat-label { font-size: 11px; color: var(--text-secondary); }

/* Section Card */
.section-card { background: var(--card-bg); border-radius: 14px; padding: 18px; margin-bottom: 12px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-card h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 14px; letter-spacing: -0.2px; }
.section-header h3 { margin-bottom: 0; }
.see-all { font-size: 13px; color: var(--primary); text-decoration: none; background: none; border: none; cursor: pointer; font-weight: 500; }

/* Top Categories */
.category-row { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--gray-200); }
.category-row:last-child { border-bottom: none; }
.category-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 12px; }
.category-info { flex: 1; }
.category-name { font-weight: 500; color: var(--text); margin-bottom: 2px; }
.category-count { font-size: 12px; color: var(--text-secondary); }
.category-amount { font-weight: 600; color: var(--text); }
.category-bar { width: 100%; height: 4px; background: var(--gray-200); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.category-bar-fill { height: 100%; border-radius: 2px; }

/* Recent Transactions */
.transaction-row { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--gray-200); }
.transaction-row:last-child { border-bottom: none; }
.transaction-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 12px; }
.transaction-info { flex: 1; min-width: 0; }
.transaction-name { font-weight: 500; color: var(--text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transaction-category { font-size: 12px; color: var(--text-secondary); }
.transaction-amount { font-weight: 600; color: var(--danger); }
.transaction-amount.income { color: #10b981; }
.transaction-amount.debt { color: #f59e0b; }
.transaction-date { font-size: 12px; color: var(--text-secondary); text-align: right; margin-left: 8px; }

/* Bar Chart (Weekly) */
.bar-chart { display: flex; align-items: flex-end; justify-content: space-between; height: 120px; padding-top: 20px; }
.bar-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bar-wrapper { width: 100%; height: 80px; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 24px; background: linear-gradient(to top, #ff6a00, #ffab40); border-radius: 6px 6px 0 0; min-height: 4px; transition: height 0.5s ease; }
.bar.today { background: linear-gradient(to top, #10b981, #34d399); }
.bar-label { font-size: 12px; color: var(--text-secondary); }
.bar-value { font-size: 10px; color: var(--text-secondary); position: absolute; top: -18px; }

/* Empty State */
.empty-dashboard { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 80px; margin-bottom: 20px; }
.empty-dashboard h2 { font-size: 24px; margin-bottom: 8px; color: var(--text); }
.empty-dashboard p { color: var(--text-secondary); margin-bottom: 24px; }

/* Category Icons & Colors */
.cat-Food { background: #fef3c7; }
.cat-Rent { background: #fed7aa; }
.cat-Utilities { background: #cffafe; }
.cat-Transport { background: #dbeafe; }
.cat-Health { background: #d1fae5; }
.cat-Personal { background: #fce7f3; }
.cat-Travel { background: #ede9fe; }
.cat-Charity { background: #fecaca; }
.cat-Work { background: #e0e7ff; }
.cat-Income { background: #d1fae5; }

/* Financial Snapshot */
.snapshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.snapshot-item { display: flex; align-items: center; gap: 6px; padding: 10px 8px; border-radius: 12px; background: var(--gray-50); position: relative; overflow: hidden; min-width: 0; }
.dark-mode .snapshot-item { background: var(--gray-800); }
.snapshot-tap { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.snapshot-tap:active { transform: scale(0.96); }
.snapshot-tap:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.snapshot-tap-hint { position: absolute; bottom: 4px; right: 8px; font-size: 9px; color: var(--text-secondary); opacity: 0.5; }
.debt-actions { display: flex; align-items: center; gap: 4px; }
.debt-icon-btn { background: none; border: none; cursor: pointer; font-size: 14px; padding: 2px 4px; border-radius: 4px; opacity: 0.5; transition: opacity 0.2s; }
.debt-icon-btn:hover { opacity: 1; }
.snapshot-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.snapshot-label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.snapshot-value { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snapshot-debts { border-top: 1px solid var(--gray-200); padding-top: 10px; margin-bottom: 10px; }
.dark-mode .snapshot-debts { border-color: var(--gray-700); }
.snapshot-debt-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.snapshot-debt-name { color: var(--text-secondary); }
.snapshot-debt-amount { color: #ef4444; font-weight: 600; }
.snapshot-net { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--gray-50); font-size: 15px; color: var(--text-secondary); }
.dark-mode .snapshot-net { background: var(--gray-800); }

/* Custom Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal-card { background: var(--card-bg, #fff); border-radius: 20px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: modalIn 0.25s ease; overflow: hidden; }
.dark-mode .modal-card { background: #1e1e2e; border: 1px solid rgba(255,255,255,0.08); }
@keyframes modalIn { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 12px; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: none; font-size: 24px; color: var(--text-secondary); cursor: pointer; padding: 0 4px; line-height: 1; }
.modal-body { padding: 0 20px 16px; }
.modal-input-group { margin-bottom: 14px; }
.modal-input-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.modal-input { width: 100%; padding: 12px 14px; border: 2px solid var(--gray-200); border-radius: 12px; font-size: 16px; background: var(--gray-50); color: var(--text-primary); outline: none; transition: border-color 0.2s; }
.dark-mode .modal-input { background: #151520; border-color: rgba(255,255,255,0.1); }
.modal-input:focus { border-color: var(--primary); }
.modal-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-pill { padding: 8px 14px; border-radius: 20px; border: 2px solid var(--gray-200); background: none; color: var(--text-secondary); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.dark-mode .modal-pill { border-color: rgba(255,255,255,0.1); }
.modal-pill:hover { border-color: var(--primary); color: var(--primary); }
.modal-pill.selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.modal-footer { display: flex; gap: 10px; padding: 0 20px 20px; }
.modal-btn { flex: 1; padding: 12px; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform 0.1s, opacity 0.2s; }
.modal-btn:active { transform: scale(0.97); }
.modal-btn-cancel { background: var(--gray-100); color: var(--text-secondary); }
.dark-mode .modal-btn-cancel { background: rgba(255,255,255,0.08); }
.modal-btn-confirm { background: var(--primary); color: #fff; }
.modal-btn-confirm:hover { opacity: 0.9; }
.modal-btn-confirm.red { background: #ef4444; }
.modal-btn-confirm.blue { background: #3b82f6; }
.modal-btn-confirm.green { background: #10b981; }

/* Savings Lock Button */
.lock-btn {
  background: none;
  border: 2px solid var(--gray-200);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.lock-btn:hover { border-color: #10b981; transform: scale(1.1); }
.lock-btn.locked { background: #10b98120; border-color: #10b981; }
.dark-mode .lock-btn { border-color: rgba(255,255,255,0.1); }
.dark-mode .lock-btn.locked { background: #10b98130; border-color: #10b981; }

/* ====== Goal Page ====== */

/* Lock Toggle Card */
.goal-lock-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 2px solid var(--gray-200);
  transition: all 0.3s ease;
}
.goal-lock-card.locked {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16,185,129,0.05) 0%, rgba(16,185,129,0.02) 100%);
}
.dark-mode .goal-lock-card { border-color: rgba(255,255,255,0.08); }
.dark-mode .goal-lock-card.locked { border-color: #10b981; background: rgba(16,185,129,0.1); }
.goal-lock-left { display: flex; align-items: center; gap: 12px; }
.goal-lock-icon { font-size: 28px; }
.goal-lock-title { font-weight: 700; font-size: 15px; color: var(--text); }
.goal-lock-desc { font-size: 12px; color: var(--text-secondary); }
.goal-lock-toggle {
  padding: 8px 20px;
  border: 2px solid #10b981;
  border-radius: 12px;
  background: none;
  color: #10b981;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.goal-lock-toggle:hover { background: #10b981; color: white; }
.goal-lock-card.locked .goal-lock-toggle { background: #10b981; color: white; }

/* Goal Hero */
.goal-hero { text-align: center; padding: 16px; }
.goal-target-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.goal-target-amount { font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.goal-ring-container { position: relative; width: 200px; height: 200px; margin: 0 auto 8px; }
.goal-ring { width: 100%; height: 100%; }
.goal-ring-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.goal-percent { font-size: 36px; font-weight: 800; color: var(--text); }
.goal-saved-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

/* Stats Grid */
.goal-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.goal-stat-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 4px solid transparent;
}
.goal-stat-card.green { border-left-color: #10b981; }
.goal-stat-card.red { border-left-color: #ef4444; }
.goal-stat-card.blue { border-left-color: #3b82f6; }
.goal-stat-card.orange { border-left-color: #f59e0b; }
.goal-stat-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.goal-stat-value { font-size: 18px; font-weight: 700; color: var(--text); }
.goal-stat-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Progress Bar */
.goal-progress-bar-container { height: 12px; background: var(--gray-200); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.goal-progress-bar-fill { height: 100%; border-radius: 6px; transition: width 0.8s ease, background 0.5s ease; }
.goal-progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; }

/* Milestones */
.goal-milestones { display: flex; flex-direction: column; gap: 8px; }
.goal-milestone { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); padding: 6px 0; }
.goal-milestone.reached { color: #10b981; font-weight: 600; }
.goal-milestone-check { font-size: 16px; }
.goal-milestone-label { font-size: 13px; }

/* Actions */
.goal-actions { display: flex; gap: 12px; padding: 0 4px; margin-top: 16px; }
.goal-actions .btn { flex: 1; }
.goal-add-btn { font-size: 16px; font-weight: 700; }

/* Deposit History */
.goal-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}
.goal-history-row:last-child { border-bottom: none; }
.goal-history-left { display: flex; align-items: center; gap: 8px; }
.goal-history-date { font-size: 13px; color: var(--text-secondary); }
.goal-history-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #d1fae5;
  color: #065f46;
  text-transform: uppercase;
}
.dark-mode .goal-history-badge { background: #065f4640; color: #34d399; }
.goal-history-badge.manual { background: #dbeafe; color: #1e40af; }
.dark-mode .goal-history-badge.manual { background: #1e40af40; color: #60a5fa; }
.goal-history-right { text-align: right; }
.goal-history-som { font-size: 14px; font-weight: 600; color: #10b981; display: block; }
.goal-history-usd { font-size: 11px; color: var(--text-secondary); }

/* Responsive */
@media (max-width: 380px) {
  .net-balance-amount { font-size: 36px; }
  .finance-card-amount { font-size: 16px; }
  .pie-container { width: 160px; height: 160px; }
  .pie-center { width: 100px; height: 100px; }
  .pie-total { font-size: 20px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .trend-bar { width: 10px; }
  .export-section { flex-direction: column; }
}
