:root {
  --forest: #2D5C4F;
  --forest-mid: #4A7C6E;
  --sage: #7FA882;
  --sage-soft: #D8EAD9;
  --peach: #E8956B;
  --peach-soft: #F9E8DC;
  --heart: #D4845A;
  --teal: #3D7E73;
  --her: #4A7C6E;
  --her-soft: #D8EAD9;
  --him: #C07070;
  --him-soft: #F5E3E0;
  --shared: #C8A86A;
  --shared-soft: #F4E9D3;
  --cream: #F5F0E8;
  --cream-2: #EDE7DC;
  --cream-3: #E2DAD0;
  --surface: #FDFAF6;
  --ink: #1E2E2A;
  --ink-2: #4A5E58;
  --ink-3: #8A9E98;
  --border: rgba(30, 46, 42, 0.08);
  --border-mid: rgba(30, 46, 42, 0.14);
  --success: #3D7A5C;
  --success-bg: #E4F2EB;
  --danger: #B04040;
  --gold: #C8A86A;
  --shadow: 0 1px 12px rgba(30, 46, 42, 0.07);
  --shadow-lg: 0 6px 28px rgba(30, 46, 42, 0.11);
  --radius: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Nunito Sans", sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.header {
  background: rgba(253, 250, 246, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 0 36px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.logo-wordmark {
  font-family: "Nunito", sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.logo-nest {
  color: var(--forest);
}

.logo-fi {
  color: var(--sage);
}

.logo-heart {
  width: 8px;
  height: 8px;
  background: var(--peach);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg) translate(1px, -1px);
  margin-left: 1px;
  margin-bottom: -2px;
}

.header-mid {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  min-width: 0;
}

.period-label {
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.period-select {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  min-width: 138px;
  height: 34px;
  padding: 0 12px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A5E58' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  box-shadow: 0 1px 10px rgba(30, 46, 42, 0.05);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
}

.couple-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--cream-2);
  border: 1px solid var(--border-mid);
  border-radius: 32px;
  padding: 5px 12px;
  white-space: nowrap;
}

.couple-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
}

.couple-label .her-name {
  color: var(--her);
}

.couple-label .him-name {
  color: var(--him);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 36px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 66px);
}

.dashboard-loader {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 140;
  pointer-events: none;
  background: rgba(245, 240, 232, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.loader-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 24px;
  background: rgba(253, 250, 246, 0.94);
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(30, 46, 42, 0.14);
  min-width: 300px;
  max-width: min(92vw, 390px);
}

.loader-spin {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(74, 124, 110, 0.16);
  border-top-color: var(--her);
  animation: spin 0.9s linear infinite;
}

.loader-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.loader-title {
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.loader-sub {
  font-size: 12px;
  color: var(--ink-3);
}

.page-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 6px;
}

.bucket-block {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
}

.bucket-head {
  margin-bottom: 14px;
}

.bucket-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bucket {
  border-radius: var(--radius-sm);
  padding: 14px 14px 13px;
  border: 1px solid var(--border);
  background: var(--cream-2);
}

.bucket-owner {
  background: var(--her-soft);
}

.bucket-partner {
  background: var(--him-soft);
}

.bucket-shared {
  background: var(--shared-soft);
}

.bucket-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.bucket-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bucket-icon,
.cat-icon,
.seg svg,
.bucket-meta-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bucket-icon,
.cat-icon {
  width: 20px;
  height: 20px;
  color: var(--ink-2);
}

.bucket-icon svg,
.cat-icon svg,
.seg svg,
.bucket-meta-ico svg {
  width: 100%;
  height: 100%;
}

.bucket-icon-owner {
  color: var(--her);
}

.bucket-icon-partner {
  color: var(--him);
}

.bucket-icon-shared {
  color: var(--gold);
}

.bucket-pct {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(30, 46, 42, 0.06);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.bucket-amt {
  font-family: "Nunito", sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}

.bucket-amt span {
  font-family: "Nunito Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

.bucket-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--ink-3);
}

.bucket-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bucket-meta-ico {
  width: 13px;
  height: 13px;
  color: var(--ink-3);
}

.bucket-meta-text {
  min-width: 0;
}

.bucket-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(30, 46, 42, 0.08);
}

.bucket-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--forest);
}

.bucket-owner .bucket-fill {
  background: var(--her);
}

.bucket-partner .bucket-fill {
  background: var(--him);
}

.bucket-shared .bucket-fill {
  background: var(--gold);
}

.page-title {
  font-family: "Nunito", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
  line-height: 1.15;
}

.page-title .month {
  color: var(--forest);
}

.page-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 3px;
  font-weight: 400;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  background: var(--cream-2);
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  padding: 5px 12px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: blink 2.5s ease infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpi {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s;
  cursor: default;
  position: relative;
  overflow: hidden;
  animation: up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.kpi::before {
  content: "";
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  opacity: 0.07;
}

.kpi:nth-child(1)::before {
  background: var(--forest);
}

.kpi:nth-child(2)::before {
  background: var(--success);
}

.kpi:nth-child(3)::before {
  background: var(--her);
}

.kpi:nth-child(4)::before {
  background: var(--peach);
}

.kpi:nth-child(1) {
  animation-delay: 0.04s;
}

.kpi:nth-child(2) {
  animation-delay: 0.08s;
}

.kpi:nth-child(3) {
  animation-delay: 0.12s;
}

.kpi:nth-child(4) {
  animation-delay: 0.16s;
}

@keyframes up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-3);
  margin-bottom: 9px;
}

.kpi-val {
  font-family: "Nunito", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}

.kpi-cur {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-2);
  margin-right: 1px;
}

.kpi-delta {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pos {
  color: var(--success);
}

.neg {
  color: var(--danger);
}

.neu {
  color: var(--ink-3);
  font-weight: 400;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  animation: up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--ink-3);
  margin-bottom: 3px;
}

.card-title {
  font-family: "Nunito", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--cream-2);
  border: 1px solid var(--border-mid);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge-toggle {
  appearance: none;
  -webkit-appearance: none;
  font-family: "Nunito Sans", sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.badge-toggle:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-mid);
}

.badge-toggle:active {
  transform: translateY(1px);
}

.badge-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 124, 110, 0.16);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.row-6-4 {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 14px;
}

.legend {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.leg {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cat-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cat-name {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-amts {
  display: flex;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.owner-val,
.her-val {
  color: var(--her);
}

.partner-val,
.him-val {
  color: var(--him);
}

.shared-val {
  color: var(--gold);
}

.sep {
  color: var(--ink-3);
  font-weight: 300;
}

.cat-share {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--cream-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 7px;
  white-space: nowrap;
}

.cat-track {
  height: 12px;
  background: var(--cream-2);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  gap: 0;
  box-shadow: inset 0 0 0 1px rgba(30, 46, 42, 0.03);
}

.cat-her,
.cat-owner {
  background: var(--her);
  height: 100%;
  border-radius: 999px 0 0 999px;
}

.cat-him,
.cat-partner {
  background: var(--him);
  height: 100%;
}

.persons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.pc {
  border-radius: var(--radius-sm);
  padding: 15px 16px;
}

.pc-her {
  background: var(--her-soft);
  border: 1px solid rgba(74, 124, 110, 0.18);
}

.pc-him {
  background: var(--him-soft);
  border: 1px solid rgba(192, 112, 112, 0.18);
}

.pc-name {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.pc-name-her {
  color: var(--her);
}

.pc-name-him {
  color: var(--him);
}

.pc-total {
  font-family: "Nunito", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  line-height: 1;
}

.pc-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pc-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-2);
}

.pc-row-val {
  font-weight: 600;
  color: var(--ink);
}

.share-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.share-bar {
  display: flex;
  height: 8px;
  border-radius: 5px;
  overflow: hidden;
  gap: 2px;
  background: var(--cream-2);
}

.sh-her {
  background: var(--her);
  border-radius: 4px 0 0 4px;
}

.sh-him {
  background: var(--him);
  border-radius: 0 4px 4px 0;
}

.share-nums {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  gap: 12px;
}

.sn {
  font-size: 12px;
  font-weight: 700;
}

.seg-wrap {
  display: flex;
  gap: 4px;
  background: var(--cream-2);
  border-radius: 30px;
  padding: 3px;
  width: fit-content;
}

.person-tabs {
  margin-left: auto;
}

.seg {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Nunito Sans", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seg.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.09);
}

.seg svg {
  width: 14px;
  height: 14px;
}

.seg span {
  line-height: 1;
}

.heats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.h-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.h-lbl {
  width: 44px;
  font-size: 12px;
  color: var(--ink-2);
  text-align: right;
  flex-shrink: 0;
  font-weight: 500;
}

.h-track {
  flex: 1;
  height: 26px;
  background: var(--cream-2);
  border-radius: 8px;
  overflow: hidden;
}

.h-fill {
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  position: relative;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.h-fill.is-outlier {
  padding-right: 18px;
}

.h-text {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.h-break {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 100%;
  background: repeating-linear-gradient(
    135deg,
    rgba(245, 240, 232, 0) 0 4px,
    rgba(245, 240, 232, 0.98) 4px 8px
  );
  opacity: 0.98;
  pointer-events: none;
  z-index: 0;
}

.panel-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
}

.fc-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

#fcChart {
  width: 100%;
  height: 155px;
  display: block;
}

.chart-grid {
  stroke: #E2DAD0;
  stroke-width: 1;
}

.chart-axis,
.chart-label {
  font-family: "Nunito Sans", sans-serif;
  fill: #8A9E98;
}

.chart-axis--peak {
  fill: var(--heart);
  font-weight: 700;
}

.chart-axis {
  font-size: 9px;
}

.chart-label {
  font-size: 9px;
}

.chart-area {
  fill-opacity: 1;
}

.chart-line--actual {
  stroke: #C07070;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line--future {
  stroke: #4A7C6E;
  stroke-width: 1.5;
  stroke-dasharray: 5, 4;
  stroke-linecap: round;
}

.chart-today {
  stroke: #C8A87A;
  stroke-width: 1.2;
  stroke-dasharray: 2, 4;
  opacity: 0.8;
}

.chart-budget {
  stroke: #B04040;
  stroke-width: 1;
  stroke-dasharray: 3, 5;
  opacity: 0.55;
}

.chart-break-line {
  stroke: rgba(76, 102, 97, 0.22);
  stroke-width: 1;
  stroke-dasharray: 4, 5;
}

.chart-break-slash {
  stroke: var(--forest-mid);
  stroke-width: 1.3;
  fill: none;
  stroke-linecap: round;
}

.chart-annotation-line {
  stroke: var(--heart);
  stroke-width: 1.3;
  fill: none;
  stroke-linecap: round;
}

.chart-annotation {
  font-family: "Nunito Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  fill: var(--heart);
}

.fc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.fcs {
  background: var(--cream-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--border);
}

.fcs-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-3);
  margin-bottom: 5px;
}

.fcs-val {
  font-family: "Nunito", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1;
  margin-bottom: 3px;
}

.fcs-sub {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
}

.goals {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.goal-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 7px;
}

.goal-name {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}

.goal-pct {
  font-size: 12px;
  font-weight: 700;
}

.goal-track {
  height: 8px;
  background: var(--cream-2);
  border-radius: 5px;
  overflow: hidden;
}

.goal-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.goal-bot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-3);
}

.txns {
  display: flex;
  flex-direction: column;
}

.txn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-2);
}

.txn:last-child {
  border-bottom: none;
}

.txn-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.txn-name {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}

.txn-who {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 5px;
  vertical-align: middle;
}

.tw-her {
  background: var(--her-soft);
  color: var(--her);
}

.tw-him {
  background: var(--him-soft);
  color: var(--him);
}

.tw-shared {
  background: var(--shared-soft);
  color: var(--shared);
}

.txn-date {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}

.txn-amt {
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.out {
  color: var(--ink);
}

.in {
  color: var(--success);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
}

.divider span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-3);
  white-space: nowrap;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--cream-3);
}

.empty-state {
  border: 1px dashed rgba(30, 46, 42, 0.14);
  background: rgba(245, 240, 232, 0.45);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--ink-2);
}

.empty-state strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 12px;
  line-height: 1.45;
}

.is-loading .kpi,
.is-loading .card {
  opacity: 0.95;
}

body.is-loading .dashboard-loader {
  display: flex;
}

body.is-loading .page > :not(.dashboard-loader) {
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .row-6-4,
  .row-2 {
    grid-template-columns: 1fr;
  }

  .bucket-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .header {
    height: auto;
    padding: 14px 18px 16px;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .header-right {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
  }

  .header-mid {
    position: static;
    transform: none;
    width: 100%;
  }

  .page {
    padding: 22px 18px 48px;
  }

  .page-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .period-label {
    display: none;
  }

  .period-select {
    min-width: 0;
    width: 100%;
  }

  .couple-pill {
    justify-self: end;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .persons {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px 18px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .bucket-block {
    padding: 16px 16px 18px;
  }

  .bucket-grid {
    grid-template-columns: 1fr;
  }

  .seg-wrap {
    width: 100%;
  }

  .seg {
    flex: 1 1 auto;
  }
}

@media (max-width: 420px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
