/* Dashboard Specific Styles */

.container {
  padding-bottom: 80px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 8px 20px;
  border-radius: 12px;
  transition: all 0.2s;
}

.nav-item.active {
  color: var(--primary);
  background: rgba(102, 126, 234, 0.1);
}

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

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

.greeting {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 4px;
}

.dashboard-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

/* Balance Card */
.balance-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 24px;
  padding: 28px;
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 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;
}

/* Chart Card */
.chart-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.chart-card h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text);
}

/* 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);
  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: 12px;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-icon {
  font-size: 32px;
}

.stat-info {
  flex: 1;
}

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

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

/* Section Card */
.section-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

.section-card h3 {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 16px;
}

.section-header h3 {
  margin-bottom: 0;
}

.see-all {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
}

/* 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-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, var(--primary), #764ba2);
  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-Transportation { background: #dbeafe; }
.cat-Personal { background: #fce7f3; }
.cat-Health-medical { background: #d1fae5; }
.cat-Travel { background: #ede9fe; }
.cat-Home-Rent { background: #fed7aa; }
.cat-Utilities { background: #cffafe; }
.cat-Gifts { background: #fecaca; }
.cat-Pets { background: #d9f99d; }
.cat-Productivity { background: #e0e7ff; }
.cat-Other { background: var(--gray-200); }

/* Responsive */
@media (max-width: 380px) {
  .balance-amount {
    font-size: 36px;
  }

  .pie-container {
    width: 160px;
    height: 160px;
  }

  .pie-center {
    width: 100px;
    height: 100px;
  }

  .pie-total {
    font-size: 20px;
  }
}
