/* ─── TODAY HIGHLIGHT ────────────────────────────────────── */
.blue .date { color: var(--today-accent); }
.blue .weekday { color: #A5B4FC; }
.blue .divider { background: var(--today-accent); }

/* ─── THIS WEEK COLUMN — frosted glass card ─────────────── */
.this-week-day {
  padding-left: 24px;
}

.this-week-day .day-header {
  margin-bottom: 14px;
}

.this-week-title {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-size: 19px !important;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.this-week-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.week-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: rgba(248,248,246,0.85);
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13.5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), var(--shadow-xs);
  transition: background 0.2s ease;
}
.week-stat:hover { background: rgba(243,243,240,0.9); cursor: pointer; } 

.week-stat.net-stat {
  background: rgba(238,233,255,0.7);
  border: 1px solid rgba(107,86,232,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), var(--shadow-xs);
}

.week-stat-label { color: var(--text-muted); font-size: 12px; font-weight: 400; letter-spacing: 0.2px; }
.week-stat-val { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }
.week-stat-val.income { color: var(--income-amount); }
.week-stat-val.expense { color: var(--expense-amount); }
.week-stat-val.net.positive { color: var(--today-accent); }
.week-stat-val.net.negative { color: var(--error); } 

.week-divider { height: 1px; background: var(--divider); margin: 2px 0; }

.week-quote {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
  padding: 10px 14px;
  background: rgba(248,248,246,0.7);
  border-radius: var(--r-md);
  border-left: 2.5px solid var(--accent-mid);
  border-top: 1px solid rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  box-shadow: var(--shadow-xs);
}
.week-quote-author {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ── Monthly View ─────────────────────────────────────── */
.monthly-view {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 32px;
}

/* Hero dashboard row */
.m-hero {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 28px 24px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--divider);
}
.m-hero-safe {
  flex: 1.6;
  padding-right: 28px;
  border-right: 1px solid var(--divider);
}
.m-hero-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.m-hero-amount {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 52px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--text-primary);
}
.m-hero-amount.positive { color: var(--text-primary); }
.m-hero-amount.negative { color: var(--error); }
.m-hero-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 400;
}
.m-hero-secondaries {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 28px;
}
.m-secondary-stat { display: flex; flex-direction: column; gap: 2px; }
.m-sec-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.m-sec-val {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

/* Analytics section below calendar */
.m-analytics {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Shared section label */
.m-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Category breakdown */
.m-breakdown {
  padding: 22px 24px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--divider);
}
.monthly-breakdown {
  padding: 22px 24px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--divider);
}
.monthly-breakdown h4 {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.category-bars { display: flex; flex-direction: column; gap: 10px; }
.cat-bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 70px;
  align-items: center;
  gap: 14px;
}
.cat-bar-label { font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.cat-bar-track { height: 4px; background: var(--divider); border-radius: 10px; overflow: hidden; max-width: 100%; position: relative; }
.cat-bar-fill { height: 100%; background: var(--text-muted); border-radius: 10px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); max-width: 100%; }
.cat-bar-fill--income { background: var(--text-secondary); }
.cat-bar-amt { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-align: right; font-variant-numeric: tabular-nums; }
.cat-budget-marker {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  border-radius: 2px; pointer-events: auto; cursor: help; z-index: 2;
  transition: transform 0.15s ease;
}
.cat-budget-marker:hover { transform: scaleX(1.8); }
.cat-bar-section-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted); padding: 4px 0 6px;
}
.no-data { font-size: 13px; color: var(--text-muted); font-style: italic; font-weight: 300; padding: 8px 0; }

/* Insights card */
.monthly-insights-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
  padding: 20px 24px;
}
.monthly-insights-card h4 {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px;
}
.insight-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--divider);
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}
.insight-item:last-child { border-bottom: none; padding-bottom: 0; }
.insight-item-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; opacity: 0.7; }

/* Back button */
.back-to-week-btn {
  background: none;
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  padding: 13px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.back-to-week-btn:hover { border-color: var(--divider-strong); color: var(--text-secondary); }

/* Calendar — Apple-style flat grid */
.month-calendar-section {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--divider);
  padding: 20px 16px;
  overflow: hidden;
}
.month-calendar-section h4 { display: none; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--divider);
  border-radius: 6px;
  overflow: hidden;
}
.cal-header-cell {
  background: var(--surface);
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 8px 0;
}
.cal-cell {
  background: var(--surface);
  min-height: 58px;
  padding: 7px 6px 5px;
  cursor: pointer;
  transition: background 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-cell:hover { background: var(--bg); }
.cal-cell.empty { background: var(--bg); cursor: default; }
.cal-cell.empty:hover { background: var(--bg); }
.cal-cell.today { background: var(--surface); }
.cal-cell.today .cal-date-num {
  width: 22px; height: 22px; line-height: 22px; text-align: center;
  background: var(--accent); color: #fff;
  border-radius: 50%; font-weight: 600; font-size: 12px;
  display: inline-block;
}
.cal-date-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1;
}
.cal-cell-income {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--income-amount);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-cell-expense {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-cell-nospend { font-size: 9px; opacity: 0.5; }
.cal-cell.no-spend { background: var(--surface); }

/* ── Yearly View ───────────────────────────────────────── */
.yearly-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 32px;
}

/* Year hero — same asymmetric layout as month */
.y-hero {
  display: flex;
  align-items: center;
  padding: 28px 24px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--divider);
}
.y-hero-primary {
  flex: 1.6;
  padding-right: 28px;
  border-right: 1px solid var(--divider);
}
.y-hero-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 6px;
}
.y-hero-amount {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 52px; font-weight: 400; line-height: 1;
  letter-spacing: -1.5px; color: var(--text-primary);
}
.y-hero-amount.positive { color: var(--text-primary); }
.y-hero-amount.negative { color: var(--error); }
.y-hero-sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.y-hero-secondaries {
  flex: 1; display: flex; flex-direction: column;
  gap: 14px; padding-left: 28px;
}
.y-secondary-stat { display: flex; flex-direction: column; gap: 2px; }
.y-sec-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted);
}
.y-sec-val {
  font-size: 16px; font-weight: 600; color: var(--text-secondary);
  font-variant-numeric: tabular-nums; letter-spacing: -0.3px;
}

/* Year bar chart */
.y-chart {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--divider);
  padding: 22px 20px 18px;
}
.year-bar-chart {
  display: flex; align-items: flex-end;
  gap: 4px; height: 88px; margin-bottom: 8px;
}
.year-bar-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px; cursor: pointer;
  padding: 4px 2px; border-radius: 4px;
  transition: background 0.15s ease;
}
.year-bar-col:hover { background: var(--bg); }
.year-bar-pair { display: flex; align-items: flex-end; gap: 2px; height: 72px; }
.year-bar {
  width: 7px; border-radius: 3px 3px 0 0;
  min-height: 2px; transition: height 0.5s cubic-bezier(0.4,0,0.2,1);
}
.income-bar { background: var(--text-secondary); opacity: 0.5; }
.expense-bar { background: var(--text-secondary); opacity: 0.85; }
.year-bar-label { font-size: 9px; color: var(--text-muted); font-weight: 500; }
.year-bar-net { font-size: 8px; font-weight: 700; }
.year-bar-net.pos { color: var(--income-amount); }
.year-bar-net.neg { color: var(--error); }
.year-chart-legend {
  display: flex; gap: 16px; justify-content: flex-end;
  font-size: 11px; color: var(--text-muted); margin-top: 10px;
}
.legend-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 4px; vertical-align: middle;
}
.income-dot { background: var(--text-secondary); opacity: 0.5; }
.expense-dot { background: var(--text-secondary); opacity: 0.85; }

/* Highlights */
.y-highlights {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.y-highlight {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--r-lg); padding: 18px 20px;
}
.y-hl-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 4px;
}
.y-hl-month { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.y-hl-val { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.y-hl-val.positive { color: var(--text-primary); }
.y-hl-val.negative { color: var(--error); }

/* Top categories */
.y-cats {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--r-lg); padding: 22px 24px;
}
.y-cats .m-section-label { margin-bottom: 16px; }
.year-cat-row {
  display: grid; grid-template-columns: 20px 1fr auto 64px;
  align-items: center; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--divider);
}
.year-cat-row:last-child { border-bottom: none; }
.year-cat-rank { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.year-cat-name { font-size: 13px; color: var(--text-secondary); font-weight: 400; }
.year-cat-bar-track { height: 3px; background: var(--divider); border-radius: 4px; overflow: hidden; }
.year-cat-bar-fill { height: 100%; background: var(--text-muted); border-radius: 4px; transition: width 0.5s ease; }
.year-cat-amt { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: right; font-variant-numeric: tabular-nums; }
.y-empty { text-align: center; padding: 40px; color: var(--text-muted); font-size: 14px; }

.wrapped-launch-btn {
  background: linear-gradient(135deg, var(--accent), #F472B6); 
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  letter-spacing: 0.2px;
  transition: opacity 0.2s;
}
.wrapped-launch-btn:hover { opacity: 0.9; }

