.monthly-planning-section {
  margin-top: 20px;
  padding: 20px;
  overflow-x: clip;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 14% 0%, rgba(76, 217, 100, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.monthly-planning-header {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.monthly-planning-header .label {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(247, 247, 251, 0.72);
  font-size: 0.66rem;
  font-weight: 800;
}

.monthly-planning-header h2 {
  margin: 0;
  max-width: 32rem;
  font-size: clamp(1.55rem, 6.5vw, 2.5rem);
  line-height: 1.03;
  letter-spacing: -0.052em;
}

.monthly-planning-header p {
  margin: 0;
  max-width: 34rem;
  color: rgba(169, 169, 181, 0.92);
  font-size: 0.92rem;
  line-height: 1.43;
}

.monthly-planning-card {
  --monthly-flow-day-width: clamp(74px, 22vw, 88px);
  min-height: 96px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.month-selector-row {
  display: grid;
  align-items: center;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 10px;
  margin-bottom: 14px;
}

.month-selector-row button {
  min-width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(247, 247, 251, 0.86);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
}

.month-selector-row .current-month-shortcut {
  grid-column: 1 / -1;
  justify-self: center;
  width: auto;
  height: auto;
  min-height: 32px;
  padding: 7px 14px;
  color: rgba(247, 247, 251, 0.9);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.month-selector-row .current-month-shortcut[hidden] {
  display: none;
}

.month-selector-row .current-month-shortcut.is-muted {
  opacity: 0.45;
}

.month-selector-row strong {
  justify-self: center;
  color: rgba(247, 247, 251, 0.94);
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.planning-horizon-selector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: -4px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.planning-horizon-selector span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 6px;
  color: rgba(169, 169, 181, 0.86);
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.planning-horizon-selector span[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

.planning-horizon-selector .is-selected {
  background: rgba(247, 247, 251, 0.12);
  color: rgba(247, 247, 251, 0.96);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.weekly-timeline {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 0 0 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 2px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.weekly-timeline::-webkit-scrollbar {
  display: none;
}

.weekly-timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  left: 12px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.05));
  transform: translateY(-50%);
}

.weekly-timeline span {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 58px;
  min-height: 32px;
  max-width: 118px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 7px 9px;
  background: rgba(14, 14, 18, 0.92);
  color: rgba(169, 169, 181, 0.84);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-timeline .weekly-marker-today {
  gap: 5px;
  border-color: rgba(76, 217, 100, 0.28);
  background: rgba(76, 217, 100, 0.1);
  color: rgba(247, 247, 251, 0.92);
}

.weekly-timeline .is-selected {
  border-color: rgba(247, 247, 251, 0.2);
  background: rgba(247, 247, 251, 0.12);
  color: rgba(247, 247, 251, 0.96);
}

.weekly-marker-today i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(76, 217, 100, 0.95);
  box-shadow: 0 0 0 3px rgba(76, 217, 100, 0.12);
}

.weekly-marker-today em {
  color: rgba(76, 217, 100, 0.95);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.daily-date-strip {
  display: grid;
  grid-auto-columns: var(--monthly-flow-day-width);
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
  margin: -2px -10px 14px;
  padding: 4px 10px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.daily-date-strip span {
  display: grid;
  place-items: center;
  align-content: start;
  gap: 5px;
  box-sizing: border-box;
  min-width: var(--monthly-flow-day-width);
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  min-height: 84px;
  padding: 9px 7px;
  background: rgba(255, 255, 255, 0.04);
}

.daily-date-strip small {
  color: rgba(169, 169, 181, 0.82);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.daily-date-strip strong {
  color: rgba(247, 247, 251, 0.9);
  font-size: 0.98rem;
  line-height: 1;
}

.daily-date-strip .daily-date-today {
  border-color: rgba(76, 217, 100, 0.32);
  background: linear-gradient(145deg, rgba(76, 217, 100, 0.16), rgba(255, 255, 255, 0.045));
  box-shadow: 0 12px 24px rgba(76, 217, 100, 0.08);
}

.daily-date-strip .daily-date-today small,
.daily-date-strip .daily-date-today strong {
  color: rgba(247, 247, 251, 0.96);
}

.daily-date-strip .day-events {
  display: grid;
  place-items: center;
  gap: 4px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.bill-event-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  padding: 3px 6px;
  color: rgba(247, 247, 251, 0.88);
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.bill-event-marker::before {
  content: '';
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
}

.bill-event-rent {
  background: rgba(100, 210, 255, 0.12);
  color: rgba(100, 210, 255, 0.95);
}

.bill-event-electric {
  background: rgba(255, 204, 0, 0.12);
  color: rgba(255, 214, 10, 0.95);
}

.bill-event-phone {
  background: rgba(191, 90, 242, 0.13);
  color: rgba(218, 143, 255, 0.95);
}

.income-event-marker {
  background: rgba(76, 217, 100, 0.13);
  color: rgba(76, 217, 100, 0.96);
}

.income-event-side {
  background: rgba(48, 209, 88, 0.1);
  color: rgba(93, 230, 124, 0.95);
}

.running-balance-row {
  display: grid;
  grid-auto-columns: var(--monthly-flow-day-width);
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
  margin: -6px -10px 16px;
  padding: 0 10px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.running-balance-row span {
  box-sizing: border-box;
  min-width: var(--monthly-flow-day-width);
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid rgba(76, 217, 100, 0.16);
  border-radius: 999px;
  padding: 6px 7px;
  background: rgba(76, 217, 100, 0.07);
  color: var(--money-positive);
  font-size: 0.66rem;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-calendar-strip {
  display: grid;
  gap: 14px;
}

.bill-calendar-strip-copy {
  display: grid;
  gap: 5px;
}

.bill-calendar-strip-label {
  color: rgba(247, 247, 251, 0.86);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bill-calendar-strip-copy p {
  margin: 0;
  color: rgba(169, 169, 181, 0.82);
  font-size: 0.8rem;
  line-height: 1.34;
}

.bill-date-chip-list {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  margin: 0 -10px;
  padding: 8px 10px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.bill-date-chip-list::-webkit-scrollbar {
  display: none;
}

.bill-date-chip-list::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 4px;
  left: 4px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  transform: translateY(-50%);
}

.bill-date-chip {
  position: relative;
  z-index: 1;
  flex: 0 0 clamp(88px, 27vw, 104px);
  display: grid;
  place-items: center;
  gap: 6px;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  box-sizing: border-box;
  min-width: 0;
  padding: 12px 10px;
  background: rgba(14, 14, 18, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.bill-date-chip:first-child {
  border-color: rgba(76, 217, 100, 0.32);
  background: linear-gradient(145deg, rgba(76, 217, 100, 0.16), rgba(255, 255, 255, 0.05));
  box-shadow: 0 12px 30px rgba(76, 217, 100, 0.1), 0 12px 26px rgba(0, 0, 0, 0.2);
}

.bill-date-chip strong {
  color: rgba(247, 247, 251, 0.9);
  font-size: 1.08rem;
  line-height: 1;
}

.bill-date-chip span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(169, 169, 181, 0.82);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1;
}

.bill-date-chip:first-child strong,
.bill-date-chip:first-child span {
  color: rgba(247, 247, 251, 0.96);
}

.monthly-flow-summary-panel {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  padding-top: 12px;
}

.monthly-flow-cash-status-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(76, 217, 100, 0.2);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(76, 217, 100, 0.12), rgba(255, 255, 255, 0.045));
  box-shadow: 0 14px 32px rgba(76, 217, 100, 0.08);
}

.monthly-flow-cash-status-card span,
.monthly-flow-summary-card span,
.monthly-flow-bills-summary span,
.monthly-flow-next-bill strong {
  color: rgba(169, 169, 181, 0.84);
  font-size: 0.74rem;
  line-height: 1.34;
}

.monthly-flow-cash-status-card span,
.monthly-flow-summary-card span {
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.monthly-flow-cash-status-card strong.monthly-flow-cash-status {
  justify-self: start;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.88rem;
  font-weight: 900;
}

.monthly-flow-cash-status-card strong.monthly-flow-cash-status-safe {
  background: rgba(54, 211, 153, 0.15);
  color: var(--money-positive);
}

.monthly-flow-cash-status-card strong.monthly-flow-cash-status-negative {
  background: rgba(255, 107, 107, 0.14);
  color: var(--money-debt);
}

.monthly-flow-cash-snapshot,
.monthly-flow-secondary-summary {
  display: grid;
  gap: 8px;
}

.monthly-flow-summary-card,
.monthly-flow-bills-summary,
.monthly-flow-next-bill {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.045);
}

.monthly-flow-summary-card-primary {
  border-color: rgba(76, 217, 100, 0.18);
  background: rgba(76, 217, 100, 0.065);
}

.monthly-flow-summary-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--money-positive);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.monthly-flow-summary-card-primary strong {
  font-size: 1.08rem;
}

.monthly-flow-summary-card strong.monthly-flow-cash-negative {
  color: var(--money-debt);
}

.monthly-flow-lowest-point-detail {
  color: rgba(247, 247, 251, 0.68);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.3;
}

.monthly-flow-bills-summary strong,
.monthly-flow-next-bill span {
  color: rgba(247, 247, 251, 0.9);
  font-size: 0.82rem;
  font-weight: 850;
}

@media (min-width: 680px) {
  .monthly-flow-summary-panel {
    grid-template-columns: minmax(180px, 0.8fr) minmax(0, 2fr);
    align-items: stretch;
  }

  .monthly-flow-cash-status-card {
    align-content: center;
    grid-row: span 2;
  }

  .monthly-flow-cash-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monthly-flow-secondary-summary {
    grid-column: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .monthly-flow-summary-card,
  .monthly-flow-bills-summary,
  .monthly-flow-next-bill,
  .monthly-flow-cash-status-card {
    padding: 10px;
  }

  .monthly-flow-summary-card strong {
    font-size: 0.94rem;
  }
}

.monthly-flow-bills-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.monthly-flow-timeline-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.monthly-flow-timeline-section h3 {
  margin: 0;
  color: rgba(247, 247, 251, 0.9);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.monthly-flow-timeline-list {
  display: grid;
  gap: 8px;
}

.monthly-flow-timeline-starting-row,
.monthly-flow-timeline-row,
.monthly-flow-timeline-empty {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.045);
}

.monthly-flow-timeline-starting-row,
.monthly-flow-timeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.monthly-flow-timeline-row-income {
  border-color: rgba(76, 217, 100, 0.14);
  background: rgba(76, 217, 100, 0.055);
}

.monthly-flow-timeline-row-lowest {
  border-color: rgba(255, 214, 10, 0.34);
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.14), rgba(255, 255, 255, 0.055));
  box-shadow: 0 12px 28px rgba(255, 214, 10, 0.08);
}

.monthly-flow-timeline-details,
.monthly-flow-timeline-starting-row span,
.monthly-flow-timeline-empty {
  color: rgba(169, 169, 181, 0.82);
  font-size: 0.74rem;
  line-height: 1.34;
}

.monthly-flow-timeline-details {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.monthly-flow-timeline-event-line,
.monthly-flow-timeline-balance-line {
  display: block;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.monthly-flow-timeline-balance-line {
  color: inherit;
  font-weight: 820;
}

.monthly-flow-timeline-lowest-label {
  justify-self: start;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(255, 214, 10, 0.16);
  color: rgba(255, 238, 153, 0.96);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.monthly-flow-timeline-details.money-positive {
  color: rgba(169, 169, 181, 0.82);
}

.monthly-flow-timeline-details.monthly-flow-cash-negative {
  color: var(--money-debt);
}

.monthly-flow-timeline-starting-row strong,
.monthly-flow-timeline-amount {
  flex: 0 0 auto;
  max-width: 42%;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 850;
}

.monthly-flow-timeline-starting-row strong,
.monthly-flow-timeline-amount-income {
  color: var(--money-positive);
}

.monthly-flow-timeline-amount-bill {
  color: var(--money-caution);
}

.monthly-flow-timeline-empty {
  margin: 0;
}

.monthly-flow-bill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.045);
}

.monthly-flow-bill-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.monthly-flow-bill-copy strong {
  overflow: hidden;
  color: rgba(247, 247, 251, 0.9);
  font-size: 0.8rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-flow-bill-copy span,
.monthly-flow-bills-empty {
  color: rgba(169, 169, 181, 0.82);
  font-size: 0.74rem;
  line-height: 1.34;
}

.monthly-flow-bill-copy .monthly-flow-bill-projected {
  color: var(--money-positive);
  font-size: 0.72rem;
  font-weight: 800;
}

.monthly-flow-bill-copy .monthly-flow-bill-projected.monthly-flow-cash-negative {
  color: var(--money-debt);
}

.monthly-flow-bill-amount {
  flex: 0 0 auto;
  max-width: 38%;
  overflow-wrap: anywhere;
  text-align: right;
  color: var(--money-caution);
  font-size: 0.82rem;
  font-weight: 850;
}

.monthly-flow-bills-empty {
  margin: 0;
}

.monthly-flow-income-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.monthly-flow-income-section h3 {
  margin: 0;
  color: rgba(247, 247, 251, 0.9);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.monthly-flow-income-list {
  display: grid;
  gap: 8px;
}

.monthly-flow-income-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(76, 217, 100, 0.14);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(76, 217, 100, 0.055);
}

.monthly-flow-income-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.monthly-flow-income-copy strong {
  overflow: hidden;
  color: rgba(247, 247, 251, 0.9);
  font-size: 0.8rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-flow-income-copy span,
.monthly-flow-income-empty {
  color: rgba(169, 169, 181, 0.82);
  font-size: 0.74rem;
  line-height: 1.34;
}

.monthly-flow-intelligence-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.monthly-flow-intelligence-section h3 {
  margin: 0;
  color: rgba(247, 247, 251, 0.9);
  font-size: 0.84rem;
  font-weight: 900;
}

.monthly-flow-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.monthly-flow-intelligence-grid > div {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.045);
}

.monthly-flow-intelligence-grid span,
.monthly-flow-intelligence-warnings p {
  color: rgba(169, 169, 181, 0.84);
  font-size: 0.72rem;
  line-height: 1.35;
}

.monthly-flow-intelligence-grid strong {
  color: rgba(247, 247, 251, 0.92);
  font-size: 0.88rem;
}

.monthly-flow-intelligence-warnings {
  display: grid;
  gap: 4px;
}

.monthly-flow-intelligence-warnings p {
  margin: 0;
  border-left: 2px solid rgba(255, 214, 10, 0.65);
  padding-left: 9px;
}

.monthly-flow-income-copy .monthly-flow-income-projected {
  color: var(--money-positive);
  font-size: 0.72rem;
  font-weight: 800;
}

.monthly-flow-income-copy .monthly-flow-income-projected.monthly-flow-cash-negative {
  color: var(--money-debt);
}

.monthly-flow-income-amount {
  flex: 0 0 auto;
  max-width: 38%;
  overflow-wrap: anywhere;
  text-align: right;
  color: var(--money-positive);
  font-size: 0.82rem;
  font-weight: 850;
}

.monthly-flow-income-empty {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.045);
}

.monthly-summary-bar {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.monthly-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.04);
}

.monthly-summary-item span {
  color: rgba(169, 169, 181, 0.84);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.monthly-summary-item strong {
  color: rgba(247, 247, 251, 0.92);
  font-size: 0.92rem;
  white-space: nowrap;
}

.monthly-summary-item:last-child {
  border-color: rgba(76, 217, 100, 0.2);
  background: rgba(76, 217, 100, 0.075);
}

.monthly-summary-item:last-child strong {
  color: var(--money-positive);
}

.cash-timing-card {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.cash-timing-copy {
  display: grid;
  gap: 5px;
}

.cash-timing-label {
  color: rgba(247, 247, 251, 0.86);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cash-timing-copy p {
  margin: 0;
  color: rgba(169, 169, 181, 0.82);
  font-size: 0.8rem;
  line-height: 1.34;
}

.cash-timing-placeholder {
  min-height: 72px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.035));
}

.monthly-next-step {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.monthly-next-step span {
  color: rgba(247, 247, 251, 0.86);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.monthly-next-step p {
  margin: 0;
  color: rgba(169, 169, 181, 0.82);
  font-size: 0.78rem;
  line-height: 1.36;
}

.monthly-planning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(247, 247, 251, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
}

.legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(247, 247, 251, 0.5);
}

.legend-income i {
  background: rgba(76, 217, 100, 0.95);
}

.legend-bills i {
  background: rgba(255, 204, 0, 0.95);
}

.legend-remaining i {
  background: rgba(100, 210, 255, 0.95);
}

.daily-date-strip::-webkit-scrollbar,
.running-balance-row::-webkit-scrollbar {
  display: none;
}

@media (max-width: 520px) {
  .monthly-planning-section {
    padding: 16px;
  }

  .monthly-planning-card {
    padding: 12px;
  }

  .month-selector-row,
  .planning-horizon-selector,
  .weekly-timeline,
  .daily-date-strip,
  .running-balance-row {
    margin-bottom: 14px;
  }

  .weekly-timeline {
    margin-right: 0;
    margin-left: 0;
    padding-right: 10px;
    padding-left: 10px;
    scroll-padding-inline: 10px;
    scroll-snap-type: x proximity;
  }

  .weekly-timeline span {
    scroll-snap-align: start;
  }

  .monthly-flow-timeline-starting-row,
  .monthly-flow-timeline-row,
  .monthly-flow-bill-row,
  .monthly-flow-income-row {
    gap: 10px;
    padding: 10px;
  }

  .monthly-flow-timeline-details,
  .monthly-flow-bill-copy,
  .monthly-flow-income-copy {
    flex: 1 1 auto;
  }

  .monthly-flow-timeline-details,
  .monthly-flow-timeline-event-line,
  .monthly-flow-timeline-balance-line {
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.38;
  }

  .monthly-flow-timeline-lowest-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .monthly-flow-bill-copy span,
  .monthly-flow-income-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .monthly-flow-timeline-amount,
  .monthly-flow-bill-amount,
  .monthly-flow-income-amount {
    font-size: 0.78rem;
    line-height: 1.18;
  }
}

@media (min-width: 760px) {
  .monthly-planning-section {
    margin-top: 24px;
    padding: 28px;
  }

  .monthly-planning-header {
    margin-bottom: 18px;
  }

  .monthly-planning-header h2 {
    font-size: clamp(1.65rem, 4vw, 2.5rem);
  }

  .monthly-planning-header p {
    font-size: 0.98rem;
  }

  .monthly-planning-card {
    min-height: 112px;
    padding: 18px;
  }

  .month-selector-row {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    margin-bottom: 18px;
  }

  .month-selector-row button {
    width: 42px;
    height: 42px;
  }

  .month-selector-row strong {
    font-size: 1.08rem;
  }

  .planning-horizon-selector {
    margin-bottom: 18px;
  }

  .planning-horizon-selector span {
    font-size: 0.72rem;
  }

  .weekly-timeline {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 18px;
    overflow-x: visible;
  }

  .weekly-timeline span {
    min-width: 0;
    max-width: none;
  }

  .weekly-timeline span {
    font-size: 0.72rem;
  }

  .weekly-marker-today em {
    font-size: 0.64rem;
  }

  .daily-date-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-flow: initial;
    margin-bottom: 18px;
    overflow-x: visible;
  }

  .daily-date-strip span {
    min-width: 0;
  }

  .running-balance-row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-flow: initial;
    margin-bottom: 18px;
    overflow-x: visible;
  }

  .running-balance-row span {
    min-width: 0;
  }

  .bill-calendar-strip {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(340px, auto);
  }

  .bill-date-chip-list {
    justify-content: flex-end;
    margin: 0;
    padding-inline: 0;
  }

  .bill-date-chip-list::before {
    right: 0;
    left: 0;
  }

  .monthly-summary-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .monthly-summary-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .cash-timing-card {
    grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
    align-items: center;
  }

  .cash-timing-placeholder {
    min-height: 88px;
  }
}

.monthly-flow-timeline-balance-line .monthly-flow-timeline-amount {
  display: inline;
  max-width: none;
  overflow: visible;
  white-space: normal;
}
