:root {
  color-scheme: light;
  --bg: #f4fbff;
  --paper: #ffffff;
  --paper-soft: #eef8ff;
  --ink: #13223a;
  --muted: #6b7b91;
  --blue: #1f8fff;
  --blue-dark: #0d5dba;
  --sky: #cfefff;
  --mint: #55d6be;
  --yellow: #ffe67a;
  --red: #ff6b7a;
  --line: #18324f;
  --soft-line: #bdddf3;
  --radius: 8px;
  --shadow: 7px 7px 0 rgba(24, 50, 79, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle, rgba(31, 143, 255, 0.11) 1px, transparent 1.5px) 0 0 / 22px 22px,
    linear-gradient(180deg, #f7fdff 0%, #eaf7ff 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 2px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(31, 143, 255, 0.14);
}

input[type="file"] {
  display: none;
}

.is-hidden {
  display: none !important;
}

.public-shell {
  min-height: 100vh;
}

.public-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 16px 26px;
  border-bottom: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

.public-brand {
  margin: 0;
  color: inherit;
  text-decoration: none;
}

.public-brand .brand-lockup {
  width: clamp(240px, 22vw, 340px);
}

.public-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.public-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.public-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.public-nav a:hover {
  background: var(--paper-soft);
  color: var(--ink);
}

.public-main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  gap: 24px;
  align-items: center;
  min-height: calc(100vh - 112px);
  padding-bottom: 30px;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy p:not(.eyebrow),
.demo-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-wordmark {
  display: block;
  width: min(560px, 100%);
  height: auto;
  margin: 6px 0 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-actions a {
  text-decoration: none;
}

.hero-preview,
.demo-result {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 9px 9px 0 rgba(24, 50, 79, 0.14);
}

.hero-preview {
  padding: 18px;
  transform: rotate(1deg);
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--yellow);
}

.preview-top span,
.preview-funds span,
.demo-row span,
.public-card span,
.feature-list span {
  color: var(--muted);
  font-weight: 800;
}

.preview-top strong {
  font-size: 28px;
}

.preview-funds,
.feature-list {
  display: grid;
  gap: 10px;
}

.preview-funds div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-left: 8px solid var(--preview-color);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.demo-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 96px minmax(105px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-left: 8px solid var(--preview-color);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.public-section {
  padding: 26px 0;
}

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

.public-card {
  min-height: 190px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.public-card span {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--blue-dark);
}

.public-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.public-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.feature-band,
.demo-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 22px;
  align-items: start;
  padding: 28px;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: rgba(234, 248, 255, 0.72);
}

.feature-band h2,
.demo-copy h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.feature-list div {
  display: grid;
  gap: 4px;
  padding: 13px 0;
  border-bottom: 1px solid var(--soft-line);
}

.feature-list div:last-child {
  border-bottom: 0;
}

.feature-list strong {
  font-size: 18px;
}

.demo-section {
  margin-top: 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #effbf3 100%);
}

.demo-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.demo-result {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.demo-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}

.demo-total span,
.demo-total small {
  display: block;
}

.demo-total small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 900;
}

.demo-total small.is-warning {
  color: #9a6400;
}

.demo-total strong {
  font-size: 24px;
}

.demo-name-input,
.demo-percent-input input {
  min-height: 38px;
  border-width: 1px;
  background: #fff;
  font-weight: 900;
}

.demo-name-input {
  min-width: 0;
}

.demo-percent-input {
  position: relative;
  display: block;
}

.demo-percent-input input {
  padding-right: 28px;
  text-align: right;
}

.demo-percent-input span {
  position: absolute;
  top: 50%;
  right: 10px;
  color: var(--muted);
  font-weight: 900;
  transform: translateY(-50%);
  pointer-events: none;
}

.demo-row strong {
  justify-self: end;
  color: var(--ink);
  font-size: 18px;
  white-space: nowrap;
}

.demo-scale {
  display: grid;
  gap: 9px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

.demo-scale-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 900;
}

.demo-scale-head strong {
  color: var(--ink);
}

.demo-scale-track {
  position: relative;
  overflow: hidden;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #e8f5ff;
}

.demo-scale-track::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--scale-progress);
  max-width: 100%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.demo-scale-fill {
  display: flex;
  width: var(--scale-progress);
  max-width: 100%;
  height: 100%;
  transition: width 180ms ease;
}

.demo-scale-fill span {
  flex: 0 0 var(--segment-width);
  min-width: 2px;
  height: 100%;
  background: var(--segment-color);
}

.demo-scale-fill span + span {
  border-left: 2px solid rgba(255, 255, 255, 0.68);
}

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-modal {
  width: min(560px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.auth-modal::backdrop {
  background: rgba(19, 34, 58, 0.28);
  backdrop-filter: blur(6px);
}

.auth-card {
  position: relative;
  width: min(520px, 100%);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 10px 10px 0 rgba(24, 50, 79, 0.14);
  padding: 28px;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.auth-brand {
  margin-bottom: 18px;
  padding-right: 46px;
}

.auth-brand-logo {
  display: block;
  width: min(360px, 100%);
  height: auto;
}

.auth-card h1 {
  margin-bottom: 14px;
}

.auth-copy {
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: #9a6400;
  font-weight: 800;
}

.app-shell {
  min-height: 100vh;
}

.app-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
}

.app-loading .brand {
  justify-content: center;
}

.app-loading p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

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

.brand-lockup {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--sky);
  color: var(--ink);
  font-weight: 900;
  font-size: 23px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 4px 4px 0 var(--sky);
  object-fit: cover;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.eyebrow,
.section-heading span,
.fund-meta,
.history-meta,
.donut-center span,
.legend span {
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 8px;
}

.nav-btn,
.ghost-btn,
.primary-btn,
.icon-btn {
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, opacity 150ms ease;
}

.nav-btn {
  min-height: 42px;
  padding: 0 12px;
  text-align: center;
  color: var(--ink);
  background: transparent;
}

.nav-btn:hover,
.nav-btn.is-active {
  border-color: var(--line);
  background: var(--paper-soft);
  box-shadow: 4px 4px 0 var(--sky);
}

.income-panel,
.fund-card,
.analytics-panel,
.month-card,
.history-item,
.modal-card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.main {
  min-width: 0;
  padding: 26px;
}

.topbar,
.section-heading,
.modal-head,
.modal-actions,
.section-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-actions {
  position: relative;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.confirm-wrap {
  position: relative;
}

.inline-confirm {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: min(310px, calc(100vw - 36px));
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  animation: pop 160ms ease both;
}

.reset-menu {
  position: absolute;
  z-index: 19;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 190px;
  padding: 6px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  animation: pop 160ms ease both;
}

.reset-menu button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.reset-menu button:hover {
  background: var(--paper-soft);
}

.reset-menu button:last-child {
  color: #a62235;
}

.inline-confirm::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 28px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--line);
  border-left: 2px solid var(--line);
  background: #fff;
  transform: rotate(45deg);
}

.inline-confirm strong,
.inline-confirm span {
  display: block;
}

.inline-confirm strong {
  margin-bottom: 4px;
  font-size: 16px;
}

.inline-confirm span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.inline-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.user-panel span {
  max-width: 280px;
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.account-card span,
.account-card p,
.account-form label {
  color: var(--muted);
  font-weight: 800;
}

.account-card strong {
  color: var(--blue-dark);
  font-size: 24px;
  overflow-wrap: anywhere;
}

.account-card p {
  margin: 0;
  line-height: 1.45;
}

.account-form label {
  display: grid;
  gap: 7px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto auto;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid rgba(189, 221, 243, 0.72);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.topbar-brand .brand {
  flex: 0 0 auto;
}

.top-nav {
  align-self: center;
  padding: 4px;
  border: 2px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.ghost-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  white-space: nowrap;
  font-weight: 800;
}

.ghost-btn {
  border-color: var(--soft-line);
  background: var(--paper);
  color: var(--ink);
}

.primary-btn {
  border-color: var(--line);
  background: var(--blue);
  color: #fff;
  box-shadow: 4px 4px 0 var(--sky);
}

.compact {
  min-height: 38px;
  padding-inline: 13px;
}

.primary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.danger {
  color: #a62235;
  border-color: #ffc3cc;
}

.danger-fill {
  background: var(--red);
  color: #fff;
}

.screen {
  display: none;
  animation: rise 220ms ease both;
}

.screen.is-visible {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.income-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(320px, 1.5fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #eaf8ff 100%);
}

.profile-setup-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #fff8d6 100%);
  box-shadow: var(--shadow);
}

.profile-setup-panel span,
.profile-setup-panel p {
  color: var(--muted);
  font-weight: 800;
}

.profile-setup-panel strong {
  display: block;
  margin: 3px 0;
  font-size: 20px;
}

.profile-setup-panel p {
  margin: 0;
  line-height: 1.35;
}

.dashboard-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 12px;
}

.month-summary-card,
.finance-card,
.required-income-panel,
.overflow-panel {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.finance-alerts-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.finance-card {
  min-width: 0;
  min-height: 62px;
  padding: 8px 10px;
  overflow: hidden;
}

.finance-mode-panel.mode-crisis {
  background: #fff8f8;
}

.finance-mode-panel.mode-stable {
  background: #fffbea;
}

.finance-mode-panel.mode-growth {
  background: #f3fbf6;
}

.month-brief-preview div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.finance-card-head span,
.finance-card p,
.finance-card small,
.finance-card-toggle span,
.finance-card-toggle small,
.finance-warnings-panel li,
.month-brief-preview span,
.debt-fields-head small {
  color: var(--muted);
  font-weight: 800;
}

.finance-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
  font-size: 12px;
}

.finance-card-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.finance-card-main strong,
.finance-card-toggle strong,
.month-brief-preview strong {
  color: var(--blue-dark);
  font-size: 20px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.finance-card-main b {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-card p,
.finance-card small {
  display: block;
  margin: 4px 0 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-icon {
  width: 24px;
  height: 24px;
  min-height: 24px;
  border-width: 1px;
  box-shadow: none;
}

.free-balance-panel.is-negative {
  border-color: #d94040;
  background: #fff0f0;
}

.free-balance-panel.is-negative strong {
  color: #b42323;
}

.free-balance-panel.is-positive {
  border-color: #2f8f5b;
  background: #effbf3;
}

.free-balance-panel.is-positive strong {
  color: #167044;
}

.finance-warnings-panel {
  background: #fff8d6;
}

.finance-warnings-panel ul {
  display: grid;
  gap: 3px;
  margin: 4px 0 0;
  padding-left: 16px;
}

.finance-warnings-panel li {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-card.is-collapsed {
  padding: 0;
  background: #fff;
}

.finance-card-toggle {
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.finance-card-toggle strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-card-toggle small {
  justify-self: end;
  font-size: 12px;
}

.month-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.month-summary-card div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.month-summary-card span,
.required-income-head span,
.required-income-grid span,
.overflow-panel span,
.overflow-panel p {
  color: var(--muted);
  font-weight: 800;
}

.month-summary-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.month-summary-card strong {
  display: block;
  color: var(--blue-dark);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.overflow-panel p {
  margin: 0;
  line-height: 1.45;
}

.required-income-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #effbf3 100%);
}

.required-income-head,
.required-income-grid {
  display: grid;
  gap: 10px;
}

.required-income-head {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
}

.required-income-head span,
.required-income-head strong {
  display: block;
}

.required-income-head strong {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.15;
}

.required-income-compare {
  display: grid;
  gap: 5px;
  min-width: 240px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
}

.required-income-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.required-income-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.required-income-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.required-income-grid .is-total {
  border-color: var(--line);
  background: var(--yellow);
}

.overflow-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-color: #2f8f5b;
  background: #effbf3;
}

.overflow-panel strong {
  display: block;
  margin: 4px 0;
  color: #167044;
  font-size: 24px;
}

.income-panel::after {
  content: "";
  position: absolute;
  left: 38px;
  bottom: -14px;
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: #f4fbff;
  transform: rotate(45deg);
}

.income-copy span,
.income-copy strong {
  display: block;
}

.income-copy span {
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 700;
}

.income-copy strong {
  font-size: 24px;
  line-height: 1.1;
}

.income-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.warning {
  grid-column: 1 / -1;
  min-height: 20px;
  color: #9a6400;
  font-weight: 700;
}

.briefing-modal {
  width: min(1120px, calc(100% - 28px));
}

.briefing-card {
  overflow: hidden;
  padding: 0;
  background: #fff;
}

.briefing-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  min-height: min(760px, calc(100vh - 44px));
}

.briefing-visual {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 24px;
  border-right: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(239, 251, 243, 0.94) 0%, rgba(232, 246, 255, 0.94) 100%);
}

.briefing-visual img {
  width: 100%;
  max-height: 310px;
  object-fit: contain;
}

.briefing-visual-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 0.98;
}

.briefing-visual-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.briefing-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.briefing-benefits span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
}

.briefing-content {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 14px;
  min-width: 0;
  padding: 22px;
}

.briefing-head {
  margin: 0;
}

.briefing-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.briefing-close {
  width: 42px;
  height: 42px;
  border-color: var(--sky);
  font-size: 22px;
}

.briefing-progress {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.briefing-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.briefing-progress span,
.briefing-progress strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.briefing-step {
  display: none;
  gap: 14px;
}

.briefing-step.is-active {
  display: grid;
}

.briefing-step-card {
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 5px 5px 0 rgba(24, 50, 79, 0.1);
}

.briefing-step-card > label,
.briefing-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.briefing-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.briefing-step-intro {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.briefing-step-intro > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--blue-dark);
  box-shadow: 4px 4px 0 var(--sky);
  font-weight: 900;
}

.briefing-step-intro h3 {
  margin-bottom: 5px;
  font-size: 22px;
}

.briefing-step-intro p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

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

.briefing-items {
  display: grid;
  gap: 9px;
  max-height: 250px;
  overflow: auto;
  padding-right: 2px;
}

.briefing-item {
  display: grid;
  grid-template-columns: minmax(130px, 1.3fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr) minmax(130px, 1fr) minmax(130px, 1fr) 34px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
}

.compact-briefing-item {
  grid-template-columns: minmax(150px, 1fr) minmax(100px, 0.8fr) minmax(150px, 1fr) 34px;
}

.briefing-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-top: 2px solid var(--line);
  background: var(--paper-soft);
  border-radius: var(--radius);
}

.briefing-preview div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
}

.briefing-preview span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.briefing-preview strong {
  display: block;
  color: var(--blue-dark);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.briefing-actions {
  margin: 0;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.section-heading {
  margin: 8px 0 14px;
}

.section-heading.wide {
  margin-bottom: 18px;
}

.fund-grid,
.fund-group-body {
  display: grid;
  gap: 14px;
}

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

.fund-group {
  display: grid;
  gap: 12px;
}

.fund-group-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(24, 50, 79, 0.1);
  text-align: left;
}

.fund-group-head::before {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 14px;
  font-weight: 900;
  transform: translateY(-50%);
}

.fund-group.is-collapsed .fund-group-head::before {
  content: "▸";
}

.fund-group-head > div:first-child {
  display: grid;
  gap: 3px;
}

.fund-group-head span,
.fund-group-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.fund-group-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-right: 26px;
}

.fund-group-stats span {
  padding: 6px 8px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: var(--paper-soft);
}

.fund-group-body {
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
}

.fund-group.is-collapsed .fund-group-body {
  display: none;
}

.fund-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.fund-card-debt {
  border-color: #b9c4d3;
  background: linear-gradient(135deg, #ffffff 0%, #f5f8fc 100%);
}

.fund-card-debt::before {
  background: #334155;
}

.fund-card-spending::before,
.fund-card-required::before {
  background: linear-gradient(90deg, #1f8fff, #14b8a6);
}

.fund-card.is-high-rate {
  border-color: #ff9aaa;
}

.fund-card:hover,
.fund-card:focus-visible,
.history-item:hover {
  transform: translateY(-2px);
  box-shadow: 9px 9px 0 rgba(24, 50, 79, 0.14);
}

.fund-card.is-frozen {
  opacity: 0.72;
}

.fund-card.is-system-paused {
  border-color: #d28b00;
}

.fund-card.is-complete {
  border-color: #167044;
  background: linear-gradient(135deg, #ffffff 0%, #effbf3 100%);
}

.fund-card.is-complete::before {
  background: #22c55e;
}

.complete-check {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #167044;
  border-radius: var(--radius);
  background: #22c55e;
  color: #fff;
  font-weight: 900;
}

.fund-card:focus-visible {
  outline: 3px solid var(--sky);
}

.fund-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--fund-color);
}

.fund-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.fund-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--fund-color) 22%, white);
  font-size: 19px;
}

.fund-title {
  min-width: 0;
  flex: 1;
}

.fund-title h3 {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.fund-meta {
  font-size: 13px;
}

.fund-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fund-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.priority-badge {
  color: var(--blue-dark);
  background: #eef8ff;
}

.pause-badge {
  border-color: #f1c46a;
  color: #9a6400;
  background: #fff8d6;
}

.fund-actions {
  display: flex;
  gap: 6px;
}

.fund-money {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 12px;
}

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

.fund-last-topup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 12px;
  padding: 9px 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
}

.fund-pause-note {
  display: grid;
  gap: 4px;
  margin: 12px 0 -2px;
  padding: 9px 10px;
  border: 1px solid #f1c46a;
  border-radius: var(--radius);
  background: #fff8d6;
}

.fund-pause-note strong {
  color: #9a6400;
  font-size: 13px;
}

.fund-pause-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.fund-last-topup span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fund-last-topup strong {
  font-size: 15px;
}

.fund-last-topup .is-positive {
  color: #167044;
}

.fund-money div {
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.fund-money span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fund-money strong {
  display: block;
  color: var(--blue-dark);
  font-size: 21px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.fund-card-debt .fund-money strong {
  color: #172033;
}

.fund-money .is-danger {
  color: #c92d42;
}

.limit-warning {
  margin: -2px 0 12px;
  padding: 9px 10px;
  border: 1px solid #ffb4c0;
  border-radius: var(--radius);
  background: #fff1f3;
  color: #a62235;
  font-size: 13px;
  font-weight: 900;
}

.progress-track,
.meter {
  overflow: hidden;
  height: 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #e8f5ff;
}

.progress-fill,
.meter span {
  display: block;
  width: var(--progress);
  max-width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--fund-color), var(--blue));
  transition: width 240ms ease;
}

.fund-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.strong-footer {
  color: var(--ink);
  font-weight: 900;
}

.fund-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.fund-quick-actions button {
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.fund-quick-actions button:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.analytics-panel {
  position: sticky;
  top: 26px;
  padding: 16px;
}

.distribution-toggle {
  width: 100%;
  margin-bottom: 10px;
}

.distribution-compact {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.distribution-compact > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.distribution-compact span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.distribution-compact strong {
  color: var(--blue-dark);
  font-size: 24px;
}

.top-distribution {
  display: grid;
  gap: 6px;
}

.top-distribution b {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 7px;
  align-items: center;
  font-size: 13px;
}

.donut-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: 10px auto 14px;
}

.donut {
  width: 100%;
  height: 100%;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0 100%);
  mask: radial-gradient(circle, transparent 0 57%, #000 58%);
  -webkit-mask: radial-gradient(circle, transparent 0 57%, #000 58%);
}

.donut-center {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
}

.donut-center strong {
  font-size: 30px;
}

.legend,
.month-list,
.history-list {
  display: grid;
  gap: 9px;
}

.month-list {
  margin-bottom: 20px;
}

.month-card {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) repeat(3, minmax(90px, 1fr));
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.month-card.is-current {
  background: linear-gradient(135deg, #ffffff 0%, #eef8ff 100%);
}

.month-card span,
.month-card strong {
  display: block;
}

.month-card span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.month-card strong {
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--dot);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-color: var(--soft-line);
  background: #fff;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.history-item {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.history-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--sky);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.history-amount {
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 20px;
}

.fund-modal {
  width: min(720px, calc(100% - 28px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.fund-modal::backdrop {
  background: rgba(15, 40, 70, 0.3);
  backdrop-filter: blur(6px);
}

.modal-card {
  padding: 20px;
}

.fund-detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.debt-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-warning {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #f1c46a;
  border-radius: var(--radius);
  background: #fff8d6;
}

.detail-warning span {
  color: var(--muted);
  font-weight: 800;
}

.compact-detail-grid {
  margin-top: 14px;
}

.detail-box {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.detail-box span,
.detail-row span,
.detail-description {
  color: var(--muted);
}

.detail-box span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
}

.detail-box strong {
  display: block;
  color: var(--blue-dark);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.detail-progress {
  display: grid;
  gap: 8px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

.detail-description {
  margin: 16px 0 12px;
  line-height: 1.5;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.debt-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.debt-fields-head {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
}

.debt-fields-head span {
  color: var(--blue-dark);
  font-weight: 900;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  font-weight: 900;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
}

.month-brief-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.month-report-card {
  display: grid;
  gap: 14px;
}

.month-report-hero {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #eef8ff 100%);
}

.month-report-hero strong {
  color: var(--blue-dark);
  font-size: 22px;
  line-height: 1.18;
}

.month-report-hero span {
  color: var(--muted);
  font-weight: 800;
}

.month-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.month-report-grid div,
.month-report-lists div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.month-report-grid span,
.month-report-lists span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.month-report-grid strong,
.month-report-lists strong {
  color: var(--blue-dark);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.month-report-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.span-2 {
  grid-column: span 2;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  padding: 26px;
  border: 2px dashed var(--soft-line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

/* Dashboard polish */
.income-panel,
.fund-card,
.analytics-panel,
.month-card,
.history-item,
.account-card,
.month-summary-card,
.finance-card,
.required-income-panel,
.overflow-panel {
  border: 1px solid rgba(151, 190, 218, 0.78);
  box-shadow: 0 12px 28px rgba(39, 87, 124, 0.09);
}

.income-panel {
  grid-template-columns: minmax(180px, 0.62fr) minmax(360px, 1.38fr);
  padding: 16px;
  margin-bottom: 18px;
  border: 2px solid rgba(31, 143, 255, 0.5);
  background: linear-gradient(135deg, #ffffff 0%, #eef9ff 100%);
}

.income-panel::after {
  display: none;
}

.income-copy strong {
  font-size: 22px;
}

.income-form .primary-btn {
  min-height: 44px;
  padding-inline: 18px;
}

.dashboard-summary-row,
.finance-alerts-row {
  gap: 12px;
}

.dashboard-summary-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.month-summary-card {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.month-summary-card,
.finance-card {
  min-height: 94px;
}

.month-summary-card div {
  display: grid;
  align-content: center;
  min-height: 68px;
  border-color: rgba(189, 221, 243, 0.86);
  background: #f7fcff;
}

.month-summary-card strong,
.finance-card-main strong,
.finance-card-toggle strong {
  font-size: 24px;
}

.finance-alerts-row {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  margin-bottom: 14px;
}

.finance-card {
  padding: 12px;
}

.finance-mode-panel.mode-crisis {
  border-color: #ff9aaa;
  background: #fff3f5;
}

.free-balance-panel.is-negative {
  border-color: #e66a78;
  background: linear-gradient(135deg, #fff6f7 0%, #ffe9ec 100%);
}

.free-balance-panel.is-negative .finance-card-main strong {
  color: #b42335;
  font-size: 28px;
}

.finance-warnings-panel {
  border-color: #f0c56d;
  background: #fff9e4;
}

.finance-warning-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.finance-warning-list li {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #f2d28c;
  border-radius: var(--radius);
  background: #fffdf4;
  color: #7a5200;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.finance-warning-list li.is-critical {
  border-color: #ffb4c0;
  background: #fff1f3;
  color: #a62235;
}

.warning-toggle {
  margin-top: 8px;
  min-height: 32px;
  padding-inline: 10px;
}

.dashboard-layout {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
}

.fund-group {
  gap: 10px;
}

.fund-group-head {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, auto);
  padding: 12px 42px 12px 14px;
  border: 1px solid rgba(151, 190, 218, 0.78);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.fund-group-head strong {
  font-size: 18px;
}

.fund-group-stats {
  padding-right: 0;
}

.fund-group-stats span {
  background: #f7fcff;
}

.fund-group-body {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.fund-card {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.96);
}

.fund-card:hover,
.fund-card:focus-visible,
.history-item:hover {
  box-shadow: 0 16px 34px rgba(39, 87, 124, 0.13);
}

.fund-card::before {
  height: 4px;
}

.fund-card-debt {
  background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 100%);
}

.fund-card.is-high-rate {
  border-color: #e45567;
  box-shadow: 0 14px 30px rgba(180, 35, 53, 0.13);
}

.fund-card.is-high-rate::before {
  height: 6px;
  background: #d12f45;
}

.fund-card.is-system-paused {
  border-color: #e3b13f;
  background: #fffaf0;
}

.fund-card.is-frozen {
  opacity: 0.78;
}

.fund-icon {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border: 1px solid color-mix(in srgb, var(--fund-color) 45%, white);
  box-shadow: none;
}

.fund-title h3 {
  font-size: 20px;
  line-height: 1.16;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.fund-badge {
  min-height: 20px;
  padding: 2px 7px;
  border-color: transparent;
}

.priority-5 {
  background: #ffecef;
  color: #a62235;
}

.priority-4 {
  background: #eaf4ff;
  color: #0d5dba;
}

.priority-3 {
  background: #e9fbf7;
  color: #117765;
}

.priority-2 {
  background: #f1f5f9;
  color: #526173;
}

.priority-1 {
  background: #fff4d3;
  color: #9a6400;
}

.high-rate-badge {
  background: #d12f45;
  color: #fff;
}

.fund-actions .icon-btn {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.fund-main-metric {
  display: grid;
  gap: 4px;
  margin: 14px 0 10px;
  padding: 12px;
  border: 1px solid rgba(189, 221, 243, 0.88);
  border-radius: var(--radius);
  background: #f7fcff;
}

.fund-main-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fund-main-metric strong {
  color: var(--blue-dark);
  font-size: 28px;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.fund-card-debt .fund-main-metric strong {
  color: #172033;
  font-size: 30px;
}

.fund-main-metric.is-ok strong {
  color: #167044;
}

.fund-main-metric.is-danger {
  border-color: #ffb4c0;
  background: #fff1f3;
}

.fund-main-metric.is-danger strong {
  color: #b42335;
}

.fund-month-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin: 14px 0 12px;
  padding: 12px;
  border: 1px solid rgba(189, 221, 243, 0.88);
  border-radius: var(--radius);
  background: #f7fcff;
}

.fund-month-metric span,
.fund-month-progress-head span,
.fund-month-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fund-month-metric strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-dark);
  font-size: 28px;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.fund-card-debt .fund-month-metric strong {
  color: #172033;
}

.fund-month-metric b {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: #eef4f9;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.fund-month-metric b.is-positive {
  background: #e9fbef;
  color: #167044;
}

.fund-month-progress {
  display: grid;
  gap: 7px;
}

.fund-month-progress-head,
.fund-month-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fund-month-progress-head strong,
.fund-month-footer strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.fund-month-footer {
  margin-top: 10px;
}

.fund-month-footer div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.fund-money {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 10px;
}

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

.fund-money div {
  padding: 9px;
  background: #ffffff;
}

.fund-money span {
  margin-bottom: 4px;
}

.fund-money strong {
  font-size: 17px;
}

.metric-emphasis strong {
  color: var(--ink);
}

.limit-warning {
  margin: 8px 0 10px;
  border-color: #f2d28c;
  background: #fff9e4;
  color: #8a5b00;
  line-height: 1.35;
}

.limit-warning.is-critical {
  border-color: #ffb4c0;
  background: #fff1f3;
  color: #a62235;
}

.progress-track,
.meter {
  height: 8px;
  border: 1px solid rgba(189, 221, 243, 0.95);
}

.fund-quick-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.fund-quick-actions button,
.fund-more-actions summary {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.fund-quick-actions .primary-action {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.fund-more-actions {
  position: relative;
}

.fund-more-actions summary {
  display: grid;
  place-items: center;
  list-style: none;
  cursor: pointer;
}

.fund-more-actions summary::-webkit-details-marker {
  display: none;
}

.fund-more-actions[open] > div {
  position: absolute;
  z-index: 12;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 5px;
  min-width: 132px;
  padding: 6px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(39, 87, 124, 0.14);
}

.analytics-panel {
  padding: 14px;
}

.donut-wrap {
  width: min(170px, 100%);
}

.legend-dot {
  border: 1px solid rgba(19, 34, 58, 0.32);
}

/* Reference-inspired dashboard */
body {
  background:
    linear-gradient(180deg, rgba(249, 252, 255, 0.96) 0%, rgba(244, 249, 255, 0.98) 100%);
}

.main {
  padding: 22px;
}

.topbar {
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 0;
}

.topbar .eyebrow {
  display: none;
}

.dashboard-brand-logo {
  width: clamp(220px, 20vw, 320px);
}

.topbar h1 {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.top-nav {
  border: 1px solid rgba(219, 231, 245, 0.95);
  box-shadow: 0 8px 24px rgba(39, 87, 124, 0.06);
}

.nav-btn.is-active {
  border-color: transparent;
  box-shadow: none;
  background: #edf5ff;
  color: var(--blue-dark);
}

.income-panel {
  grid-template-columns: minmax(180px, 0.48fr) minmax(360px, 1.52fr);
  border: 1px solid #dbe9fb;
  box-shadow: 0 14px 40px rgba(42, 88, 128, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.income-copy span {
  font-size: 12px;
  font-weight: 800;
}

.income-copy strong {
  font-size: 20px;
}

.income-form {
  grid-template-columns: minmax(150px, 0.85fr) minmax(180px, 1fr) auto;
}

.income-form input {
  border-width: 1px;
  background: #f8fbff;
}

.income-form .primary-btn {
  border-color: #2f7de1;
  background: linear-gradient(180deg, #3f8ff4 0%, #2873d6 100%);
  box-shadow: 0 10px 24px rgba(47, 125, 225, 0.2);
}

.finance-alerts-row {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.finance-mode-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(210px, 260px) auto;
  gap: 24px;
  align-items: center;
  min-height: 176px;
  padding: 24px;
  border-color: #d8e8fb;
  background:
    radial-gradient(circle at 72% 36%, rgba(31, 143, 255, 0.08), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f6fbff 100%);
}

.finance-mode-panel.mode-crisis {
  border-color: #d8e8fb;
  background:
    radial-gradient(circle at 72% 36%, rgba(255, 107, 122, 0.1), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.mode-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.mode-copy > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.mode-copy > strong {
  justify-self: start;
  padding: 8px 14px;
  border: 1px solid #ffc7cf;
  border-radius: 999px;
  background: #fff4f6;
  color: #d12f45;
  font-size: 18px;
  line-height: 1;
}

.mode-stable .mode-copy > strong {
  border-color: #f2d28c;
  background: #fff9e4;
  color: #9a6400;
}

.mode-growth .mode-copy > strong {
  border-color: #b9efd9;
  background: #effbf3;
  color: #167044;
}

.mode-copy p,
.mode-copy small {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.mode-copy b {
  color: var(--ink);
}

.mode-gauge {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 132px;
  isolation: isolate;
}

.mode-gauge-arc {
  position: absolute;
  width: 174px;
  height: 88px;
  border-radius: 174px 174px 0 0;
  background: conic-gradient(from 270deg at 50% 100%, #f04455 0 var(--gauge-angle), #edf1f7 0 180deg, transparent 0);
  transform: translateY(-6px);
}

.mode-gauge-arc::after {
  content: "";
  position: absolute;
  inset: 12px 12px 0;
  border-radius: inherit;
  background: #fbfdff;
}

.mode-gauge strong {
  z-index: 1;
  margin-top: 28px;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.mode-gauge span {
  z-index: 1;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mode-action {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.mode-action .compact-icon {
  opacity: 0.55;
}

.mode-action .ghost-btn {
  border-color: #d8e8fb;
  color: #2f70cc;
  box-shadow: none;
}

.finance-alerts-row .free-balance-panel {
  display: none;
}

.month-summary-card {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.month-summary-card div.kpi-card {
  position: relative;
  min-height: 140px;
  padding: 22px 20px;
  border: 1px solid #dde8f6;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(42, 88, 128, 0.08);
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #2f70cc;
  background: #eaf4ff;
  font-size: 18px;
  font-weight: 900;
}

.kpi-income::after {
  content: "□";
}

.kpi-required::after {
  content: "▤";
  color: #e24758;
  background: #fff0f2;
}

.kpi-life::after {
  content: "◒";
  color: #d88a00;
  background: #fff4d8;
}

.kpi-positive::after,
.kpi-progress::after {
  content: "↗";
  color: #1b955f;
  background: #e9fbf2;
}

.kpi-negative::after {
  content: "!";
  color: #d12f45;
  background: #fff0f2;
}

.month-summary-card span {
  color: #7c8aa0;
  font-size: 13px;
}

.month-summary-card strong {
  margin-top: 14px;
  color: var(--ink);
  font-size: 28px;
}

.month-summary-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.kpi-negative strong {
  color: #e24758;
}

.finance-warnings-panel {
  padding: 20px 22px;
  border-color: #dde8f6;
  background: rgba(255, 255, 255, 0.94);
}

.finance-warnings-panel .finance-card-head span {
  color: var(--ink);
  font-size: 18px;
}

.finance-warning-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.finance-warning-list li {
  position: relative;
  padding: 4px 4px 4px 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.finance-warning-list li::before {
  content: "!";
  position: absolute;
  top: 3px;
  left: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: #fff4d8;
  color: #d88a00;
  font-size: 12px;
  font-weight: 900;
}

.finance-warning-list li.is-critical::before {
  background: #fff0f2;
  color: #e24758;
}

.funds-section > .section-heading {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5edf7;
}

.fund-group-head {
  min-height: 82px;
  border-color: #dde8f6;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(42, 88, 128, 0.06);
}

.fund-group-head > div:first-child {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
}

.fund-group-head > div:first-child::before {
  content: "▣";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #d9cfff;
  border-radius: 10px;
  background: #f4efff;
  color: #7456d8;
}

.fund-group:nth-child(2n) .fund-group-head > div:first-child::before {
  border-color: #bfecf8;
  background: #eefbff;
  color: #1e9fbd;
}

.fund-group:nth-child(3n) .fund-group-head > div:first-child::before {
  border-color: #ffe0a3;
  background: #fff8e8;
  color: #d88a00;
}

.fund-group-head strong {
  align-self: end;
}

.fund-group-head > div:first-child span {
  grid-column: 2;
}

.fund-group-stats span {
  border: 0;
  background: transparent;
  color: #617089;
}

.fund-card {
  border-color: #dde8f6;
  box-shadow: 0 12px 28px rgba(42, 88, 128, 0.07);
}

.fund-card::before {
  inset: 0 0 auto auto;
  width: 4px;
  height: 70px;
  border-radius: 0 8px 0 8px;
}

.fund-main-metric,
.fund-money div {
  border-color: #edf2f8;
  background: #fbfdff;
}

.analytics-panel {
  border-color: #dde8f6;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(42, 88, 128, 0.08);
}

.analytics-panel .section-heading {
  margin-top: 0;
}

.donut-wrap {
  width: min(210px, 100%);
}

.donut {
  border: 0;
  filter: drop-shadow(0 10px 18px rgba(20, 139, 150, 0.16));
}

.legend-row {
  min-height: 28px;
}

/* Compact dashboard information row */
.dashboard-summary-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-bottom: 14px;
}

.dashboard-summary-row .month-summary-card {
  display: contents;
}

.dashboard-summary-row .finance-card,
.dashboard-summary-row .finance-mode-panel,
.dashboard-summary-row .finance-warnings-panel,
.month-summary-card div.kpi-card {
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid #dbe9fb;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(42, 88, 128, 0.07);
}

.month-summary-card div.kpi-card {
  align-content: center;
}

.month-summary-card strong {
  margin-top: 6px;
  font-size: 22px;
}

.month-summary-card small {
  margin-top: 5px;
}

.kpi-card::after {
  right: 12px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.dashboard-summary-row .finance-mode-panel.is-collapsed {
  display: block;
  min-height: 76px;
  padding: 0;
  background: #fff;
}

.dashboard-summary-row .finance-card-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 74px;
  padding: 12px 14px;
}

.dashboard-summary-row .finance-card-toggle span {
  grid-column: 1 / -1;
  font-size: 12px;
}

.dashboard-summary-row .finance-card-toggle strong {
  font-size: 20px;
}

.dashboard-summary-row .finance-card-toggle small {
  align-self: end;
  font-size: 12px;
}

.dashboard-summary-row .finance-mode-panel:not(.is-collapsed) {
  grid-column: span 2;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 76px;
  padding: 12px 14px;
}

.dashboard-summary-row .finance-mode-panel:not(.is-collapsed) .mode-copy {
  gap: 4px;
}

.dashboard-summary-row .finance-mode-panel:not(.is-collapsed) .mode-copy > span,
.dashboard-summary-row .finance-mode-panel:not(.is-collapsed) .mode-copy p:nth-of-type(2),
.dashboard-summary-row .finance-mode-panel:not(.is-collapsed) .mode-copy small,
.dashboard-summary-row .finance-mode-panel:not(.is-collapsed) .mode-gauge,
.dashboard-summary-row .finance-mode-panel:not(.is-collapsed) .mode-action .ghost-btn {
  display: none;
}

.dashboard-summary-row .finance-mode-panel:not(.is-collapsed) .mode-copy > strong {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font-size: 20px;
}

.dashboard-summary-row .finance-mode-panel:not(.is-collapsed) .mode-copy p {
  font-size: 12px;
  white-space: normal;
}

.dashboard-summary-row .finance-warnings-panel {
  display: grid;
  align-content: center;
  padding: 0;
  border-color: #f0c56d;
  background: #fff9e4;
}

.dashboard-summary-row .finance-warnings-panel.is-hidden {
  display: none;
}

.dashboard-summary-row .finance-warnings-panel.is-compact .finance-warning-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 74px;
  padding: 12px 14px;
}

.dashboard-summary-row .finance-warnings-panel.is-compact .finance-warning-summary p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-summary-row .finance-warnings-panel.is-compact .warning-toggle {
  min-height: 28px;
  margin: 0;
  padding: 6px 9px;
}

.dashboard-summary-row .finance-warnings-panel.is-expanded {
  grid-column: span 2;
  padding: 12px 14px;
}

.dashboard-summary-row .finance-warnings-panel.is-expanded .finance-warning-list {
  grid-template-columns: 1fr;
}

.distribution-compact {
  gap: 0;
}

.distribution-compact > .distribution-mini-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.distribution-mini-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: baseline;
}

.distribution-mini-head span,
.distribution-mini-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.distribution-mini-head strong {
  color: var(--blue-dark);
  font-size: 28px;
  line-height: 1;
}

.distribution-mini-head small {
  grid-column: 1 / -1;
}

.top-distribution {
  gap: 5px;
}

.top-distribution span {
  margin-bottom: 0;
}

.top-distribution b {
  font-size: 12px;
  line-height: 1.25;
}

.analytics-panel {
  padding: 12px;
}

.analytics-panel .section-heading h2 {
  font-size: 22px;
}

.distribution-toggle {
  min-height: 36px;
  margin-bottom: 8px;
  padding: 7px 10px;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .analytics-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .public-header,
  .public-hero,
  .step-grid,
  .feature-band,
  .demo-section {
    grid-template-columns: 1fr;
  }

  .public-header {
    position: static;
  }

  .public-nav {
    justify-content: flex-start;
  }

  .public-hero {
    min-height: 0;
    padding-top: 14px;
  }

  .hero-preview {
    transform: none;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav-btn {
    text-align: center;
    padding: 0 8px;
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .topbar-brand,
  .user-panel,
  .account-layout,
  .income-panel,
  .income-form,
  .profile-setup-panel,
  .dashboard-summary-row,
  .month-summary-card,
  .finance-alerts-row,
  .month-brief-preview,
  .required-income-head,
  .required-income-grid,
  .fund-group-head,
  .briefing-layout,
  .briefing-grid,
  .briefing-item,
  .compact-briefing-item,
  .briefing-preview,
  .month-card,
  .history-item {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .briefing-layout {
    min-height: auto;
  }

  .briefing-visual {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .briefing-visual img {
    max-height: 220px;
  }

  .fund-money,
  .fund-group-body,
  .form-grid,
  .debt-fields,
  .detail-grid,
  .month-report-grid,
  .month-report-lists {
    grid-template-columns: 1fr;
  }

  .fund-quick-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 540px) {
  .public-header {
    padding: 14px 18px;
  }

  .public-main {
    width: min(100% - 28px, 1180px);
    padding-top: 22px;
  }

  .hero-actions,
  .demo-form {
    grid-template-columns: 1fr;
    display: grid;
  }

  .demo-row {
    grid-template-columns: 1fr;
  }

  .demo-row strong {
    justify-self: start;
  }

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

  .section-heading,
  .section-heading.wide,
  .section-actions,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reset-menu,
  .inline-confirm {
    left: 0;
    right: auto;
    width: min(260px, 100%);
  }
}

@media (max-width: 980px) {
  .finance-mode-panel {
    grid-template-columns: 1fr;
  }

  .mode-action {
    justify-items: stretch;
  }

  .finance-warning-list {
    grid-template-columns: 1fr;
  }
}

/* Compact warnings and even fund grids */
.finance-warnings-panel {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.finance-warning-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 0 14px;
}

.finance-warning-summary > div {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 182px;
}

.finance-warning-summary span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.finance-warning-summary strong {
  color: var(--blue-dark);
  font-size: 24px;
  line-height: 1;
}

.finance-warning-summary p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-warning-summary .warning-toggle {
  margin: 0;
  min-height: 34px;
  border-color: transparent;
  color: #5f6f86;
  background: transparent;
  box-shadow: none;
}

.finance-warnings-panel.is-expanded {
  padding-bottom: 14px;
}

.finance-warnings-panel.is-expanded .finance-warning-summary {
  border-bottom: 1px solid #edf2f8;
}

.finance-warnings-panel.is-expanded .finance-warning-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px;
}

.fund-group-body {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 1fr;
  gap: 14px;
  align-items: stretch;
}

.fund-card {
  height: 100%;
}

.fund-card-debt {
  grid-template-rows: auto auto auto 1fr auto;
}

.fund-card-debt .fund-main-metric {
  margin-top: 12px;
}

.fund-card-debt .limit-warning {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 6px 0 0;
  padding: 8px 10px;
  font-size: 12px;
}

.fund-card-debt .fund-footer {
  align-self: end;
}

@media (max-width: 980px) {
  .finance-warning-summary {
    grid-template-columns: 1fr auto;
    padding: 10px 14px;
  }

  .finance-warning-summary p {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .finance-warnings-panel.is-expanded .finance-warning-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .fund-group-body {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
}

/* Product density pass */
.dashboard-layout {
  grid-template-columns: 1fr;
}

.dashboard-summary-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.dashboard-summary-row .month-summary-card {
  display: contents;
}

.dashboard-summary-row .kpi-card,
.dashboard-summary-row .finance-mode-panel,
.dashboard-summary-row .finance-warnings-panel,
.distribution-status-card,
#showRequiredIncomeBtn {
  flex: 1 1 0;
  min-width: 165px;
  min-height: 78px;
}

#showRequiredIncomeBtn {
  display: grid;
  place-items: center;
  align-self: stretch;
  padding: 10px 12px;
  white-space: normal;
}

.distribution-status-card {
  border: 1px solid #f0c56d;
  border-radius: var(--radius);
  background: #fff9e4;
  box-shadow: 0 10px 24px rgba(42, 88, 128, 0.07);
}

.distribution-status-card button {
  display: grid;
  gap: 4px;
  width: 100%;
  height: 100%;
  min-height: 76px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.distribution-status-card span,
.distribution-status-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.distribution-status-card strong {
  color: #a06500;
  font-size: 22px;
  line-height: 1;
}

.funds-section {
  min-width: 0;
}

.fund-group {
  gap: 0;
  padding: 12px;
  border: 1px solid #dbe9fb;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f5faff 0%, #eef6ff 100%);
  box-shadow: 0 14px 34px rgba(42, 88, 128, 0.07);
}

.fund-group + .fund-group {
  margin-top: 16px;
}

.fund-group-head {
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  box-shadow: none;
}

.fund-group-body {
  padding: 10px;
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.62);
}

.fund-group.is-collapsed .fund-group-body {
  display: none;
}

.fund-transfer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  margin: 12px 0 10px;
  padding: 10px 12px;
  border: 1px solid #b9dcfa;
  border-radius: var(--radius);
  background: #eef8ff;
}

.fund-transfer span,
.fund-transfer small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.fund-transfer strong {
  color: var(--blue-dark);
  font-size: 22px;
  line-height: 1;
}

.fund-transfer small {
  grid-column: 1 / -1;
}

.fund-quick-actions {
  grid-template-columns: minmax(0, 1fr) minmax(88px, auto);
}

.fund-quick-actions > button:not(.primary-action) {
  background: #f8fbff;
}

.modal-card .form-grid {
  gap: 12px;
}

.modal-card .debt-fields {
  border-style: dashed;
}

.fund-detail .detail-grid {
  margin-top: 14px;
}

.analytics-panel.is-hidden {
  display: none;
}

@media (max-width: 820px) {
  .dashboard-summary-row,
  .month-summary-card {
    display: flex;
    grid-template-columns: none;
    align-items: stretch;
  }

  .dashboard-summary-row .kpi-card,
  .dashboard-summary-row .finance-mode-panel,
  .dashboard-summary-row .finance-warnings-panel,
  .distribution-status-card,
  #showRequiredIncomeBtn {
    min-width: 150px;
  }

  .fund-group {
    padding: 10px;
  }
}

/* Hero flip slider */
.dashboard-hero-slider {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(260px, auto) auto;
  gap: 12px;
  align-items: center;
  margin: 8px 0 18px;
  perspective: 1600px;
}

.hero-slider-track {
  position: relative;
  min-height: 260px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px) scale(0.985);
  transition: opacity 260ms ease, transform 260ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.hero-card-inner {
  position: relative;
  min-height: 260px;
  transform-style: preserve-3d;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-slide.is-flipped .hero-card-inner {
  transform: rotateY(180deg);
}

.hero-card-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
  gap: 18px;
  align-items: center;
  min-height: 260px;
  padding: 24px;
  border: 1px solid #cfe2f6;
  border-radius: 18px;
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow: 0 18px 44px rgba(39, 87, 124, 0.12);
}

.hero-card-front {
  background:
    radial-gradient(circle at 76% 34%, rgba(255, 255, 255, 0.82), transparent 29%),
    linear-gradient(135deg, #f4fbff 0%, #ffffff 54%, #eef7ff 100%);
}

.hero-card-back {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  background: #ffffff;
  transform: rotateY(180deg);
}

.hero-slide.tone-red .hero-card-front {
  background:
    radial-gradient(circle at 76% 34%, rgba(255, 236, 240, 0.9), transparent 30%),
    linear-gradient(135deg, #fff8fb 0%, #ffffff 54%, #fff0f3 100%);
}

.hero-slide.tone-green .hero-card-front {
  background:
    radial-gradient(circle at 76% 34%, rgba(225, 251, 239, 0.92), transparent 30%),
    linear-gradient(135deg, #f4fff9 0%, #ffffff 54%, #ecfbf4 100%);
}

.hero-slide.tone-amber .hero-card-front {
  background:
    radial-gradient(circle at 76% 34%, rgba(255, 244, 213, 0.95), transparent 30%),
    linear-gradient(135deg, #fffdf4 0%, #ffffff 54%, #fff7df 100%);
}

.hero-slide.tone-violet .hero-card-front {
  background:
    radial-gradient(circle at 76% 34%, rgba(237, 231, 255, 0.95), transparent 30%),
    linear-gradient(135deg, #fbf8ff 0%, #ffffff 54%, #f1edff 100%);
}

.hero-slide-copy {
  display: grid;
  gap: 10px;
  align-content: center;
  min-width: 0;
}

.hero-slide-copy span,
.hero-back-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-slide-copy strong {
  color: var(--ink);
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.95;
}

.hero-slide-copy p {
  max-width: 680px;
  margin: 0;
  color: #526173;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.hero-slide-copy small {
  color: #7c8aa0;
  font-size: 12px;
  font-weight: 800;
}

.hero-illustration-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 206px;
  border: 1px dashed rgba(47, 125, 225, 0.38);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(63, 143, 244, 0.16), rgba(20, 184, 166, 0.16)),
    rgba(255, 255, 255, 0.56);
}

.hero-illustration-placeholder::before {
  content: attr(data-illustration);
  position: absolute;
  left: 14px;
  top: 12px;
  color: #617089;
  font-size: 11px;
  font-weight: 900;
}

.hero-illustration-placeholder i {
  width: 118px;
  height: 118px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 34% 30%, #ffffff 0 18%, transparent 19%),
    linear-gradient(135deg, #3f8ff4, #14b8a6);
  box-shadow: 0 18px 34px rgba(47, 125, 225, 0.22);
  transform: rotate(-8deg);
}

.hero-flip-btn {
  position: absolute;
  left: 24px;
  bottom: 22px;
}

.hero-back-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.hero-back-copy strong {
  color: var(--blue-dark);
  font-size: 34px;
  line-height: 1;
}

.hero-back-copy ul {
  display: grid;
  gap: 10px;
  max-height: 176px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto;
}

.hero-back-copy li {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2edf8;
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.hero-back-actions {
  display: grid;
  gap: 10px;
  align-content: end;
  justify-items: stretch;
  min-width: 180px;
}

.hero-card-back .hero-flip-btn {
  position: static;
}

.hero-slider-arrow {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #c6def4;
  border-radius: 50%;
  background: #fff;
  color: var(--blue-dark);
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(39, 87, 124, 0.1);
}

.hero-slider-dots {
  grid-column: 2;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.hero-slider-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c8d9eb;
  cursor: pointer;
}

.hero-slider-dots button.is-active {
  width: 28px;
  background: var(--blue);
}

/* Group header cleanup */
.fund-group-head > div:first-child {
  display: block;
}

.fund-group-head > div:first-child::before,
.fund-group:nth-child(2n) .fund-group-head > div:first-child::before,
.fund-group:nth-child(3n) .fund-group-head > div:first-child::before {
  content: none;
  display: none;
}

.fund-group-head strong {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.fund-group-stats {
  align-items: center;
}

/* Expanded warnings must wrap inside their card */
.finance-warnings-panel.is-expanded {
  overflow: visible;
}

.finance-warnings-panel.is-expanded .finance-warning-summary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.finance-warnings-panel.is-expanded .finance-warning-summary p {
  grid-column: 1 / -1;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}

.finance-warnings-panel.is-expanded .finance-warning-list {
  grid-template-columns: 1fr;
}

.finance-warnings-panel.is-expanded .finance-warning-list li {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 820px) {
  .dashboard-hero-slider {
    grid-template-columns: 1fr;
  }

  .hero-slider-arrow {
    position: absolute;
    top: calc(50% - 34px);
  }

  .hero-slider-arrow[data-hero-slide-prev] {
    left: 10px;
  }

  .hero-slider-arrow[data-hero-slide-next] {
    right: 10px;
  }

  .hero-slider-track,
  .hero-card-inner,
  .hero-card-face {
    min-height: 360px;
  }

  .hero-card-face {
    grid-template-columns: 1fr;
    padding: 20px 18px 64px;
  }

  .hero-illustration-placeholder {
    min-height: 150px;
  }

  .hero-back-actions {
    min-width: 0;
  }

  .hero-slider-dots {
    grid-column: 1;
  }
}

/* Full-bleed slider imagery */
.hero-card-face {
  grid-template-columns: 1fr;
  align-items: stretch;
  padding: 24px;
  background-image:
    linear-gradient(90deg, rgba(8, 22, 43, 0.72) 0%, rgba(8, 22, 43, 0.48) 34%, rgba(8, 22, 43, 0.12) 62%, rgba(8, 22, 43, 0.02) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-card-front,
.hero-card-back,
.hero-slide.tone-red .hero-card-front,
.hero-slide.tone-green .hero-card-front,
.hero-slide.tone-amber .hero-card-front,
.hero-slide.tone-violet .hero-card-front {
  background-image:
    linear-gradient(90deg, rgba(8, 22, 43, 0.72) 0%, rgba(8, 22, 43, 0.48) 34%, rgba(8, 22, 43, 0.12) 62%, rgba(8, 22, 43, 0.02) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-card-back {
  background: #f8fbff;
}

.hero-card-back::before {
  content: "";
  position: absolute;
  inset: -24px;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.08);
  opacity: 0.34;
  transform: scale(1.04);
}

.hero-card-back::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.82) 48%, rgba(244, 250, 255, 0.72) 100%);
}

.hero-slide-copy,
.hero-back-copy {
  align-self: stretch;
  width: min(560px, 58%);
  padding: 20px 22px 72px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(9, 24, 46, 0.58);
  color: #fff;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(7, 20, 38, 0.18);
}

.hero-slide-copy span,
.hero-back-copy span,
.hero-slide-copy small {
  color: rgba(255, 255, 255, 0.72);
}

.hero-slide-copy strong,
.hero-back-copy strong {
  color: #fff;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
}

.hero-slide-copy p {
  color: rgba(255, 255, 255, 0.9);
}

.hero-back-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.hero-card-back .hero-back-copy {
  position: relative;
  z-index: 1;
  border-color: rgba(172, 203, 229, 0.7);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

.hero-card-back .hero-back-copy span {
  color: var(--muted);
}

.hero-card-back .hero-back-copy strong {
  color: var(--blue-dark);
  text-shadow: none;
}

.hero-back-copy ul {
  max-height: 122px;
  padding-right: 4px;
}

.hero-back-copy li {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hero-card-back .hero-back-copy li {
  border-color: #dbe9fb;
  background: rgba(248, 251, 255, 0.86);
  color: var(--ink);
}

.hero-back-actions,
.hero-flip-btn {
  position: absolute;
  left: 46px;
  bottom: 32px;
  z-index: 2;
}

.hero-back-actions {
  display: flex;
  gap: 10px;
  min-width: 0;
  z-index: 2;
}

.hero-card-back .hero-flip-btn {
  position: static;
}

.hero-illustration-placeholder {
  display: none;
}

@media (max-width: 820px) {
  .hero-slide-copy,
  .hero-back-copy {
    width: 100%;
    padding: 18px 18px 76px;
  }

  .hero-back-copy ul {
    max-height: 170px;
  }

  .hero-back-actions,
  .hero-flip-btn {
    left: 36px;
    right: 36px;
    bottom: 26px;
  }

  .hero-back-actions {
    flex-wrap: wrap;
  }
}

/* Slider interaction refinement */
.hero-card-face {
  min-height: 300px;
}

.hero-slide-copy {
  width: min(920px, 74%);
  min-width: min(620px, 74%);
  padding: 22px 24px;
  padding-bottom: 22px;
}

.hero-slide-copy strong {
  max-width: 100%;
  font-size: clamp(42px, 4.4vw, 74px);
  line-height: 0.98;
  overflow-wrap: anywhere;
  word-break: normal;
}

.hero-slide-copy p,
.hero-slide-copy small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hero-slide-copy p {
  margin-bottom: 0;
}

.hero-card-front .hero-flip-btn {
  left: auto;
  right: 48px;
  bottom: 34px;
  min-height: 46px;
  padding: 0 20px;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(9, 24, 46, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hero-card-front .hero-flip-btn::after {
  content: "→";
  margin-left: 10px;
}

.hero-card-front .hero-flip-btn:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(9, 24, 46, 0.28);
}

.hero-card-back {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  padding: 24px;
}

.hero-card-back::before {
  inset: -12px;
  filter: blur(12px) saturate(1.05);
  opacity: 0.46;
  transform: scale(1.02);
}

.hero-card-back::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.68) 48%, rgba(239, 247, 255, 0.58) 100%);
}

.hero-card-back .hero-back-copy {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  padding: 20px 22px 78px;
  grid-column: 1 / -1;
  align-self: stretch;
}

.hero-card-back .hero-back-copy > span,
.hero-card-back .hero-back-copy > strong {
  grid-column: 1;
}

.hero-card-back .hero-back-copy ul {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  max-height: 166px;
  overflow: auto;
}

.hero-card-back .hero-back-copy li {
  min-height: 58px;
}

.hero-card-back .hero-back-actions {
  left: auto;
  right: 48px;
  bottom: 34px;
}

.hero-card-back .hero-flip-btn {
  min-height: 42px;
}

@media (max-width: 980px) {
  .hero-slide-copy {
    width: min(760px, 78%);
    min-width: min(520px, 78%);
  }

  .hero-card-back .hero-back-copy {
    grid-template-columns: 1fr;
  }

  .hero-card-back .hero-back-copy ul {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: 1fr;
    max-height: 150px;
  }
}

@media (max-width: 820px) {
  .hero-slide-copy {
    width: 100%;
    min-width: 0;
    padding: 18px 18px 76px;
  }

  .hero-card-front .hero-flip-btn,
  .hero-card-back .hero-back-actions {
    left: 36px;
    right: 36px;
    bottom: 26px;
  }

  .hero-card-back .hero-back-copy {
    padding: 18px 18px 82px;
  }
}
/* Встроенная форма быстрого действия */
.fund-inline-action {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #b9dcfa;
  border-radius: var(--radius);
  background: #eef8ff;
  animation: rise 160ms ease both;
}

.fund-inline-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.fund-inline-action label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fund-inline-action input {
  min-height: 42px;
  border: 1px solid #b9dcfa;
  background: #fff;
}

.fund-inline-action input:focus {
  border-color: var(--blue);
}

.fund-inline-action .confirm-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #2f7de1;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.fund-inline-action .cancel-btn {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.fund-inline-action .confirm-btn:hover {
  background: var(--blue-dark);
}

.fund-inline-action .cancel-btn:hover {
  border-color: var(--blue);
  color: var(--ink);
}
/* Быстрый старт */
.quick-start-card {
  max-width: 520px;
}

.quick-start-title {
  margin: 8px 0 20px;
  font-size: 22px;
  line-height: 1.2;
}

.quick-start-steps {
  position: relative;
  min-height: 110px;
}

.quick-start-step {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.quick-start-step.is-active {
  display: flex;
}

.quick-start-hint {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.qs-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qs-choice-btn {
  min-height: 52px;
  border: 2px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.qs-choice-btn:hover {
  border-color: var(--blue);
  background: #eef8ff;
}

.qs-choice-btn.is-selected {
  border-color: var(--blue);
  background: #eef8ff;
  color: var(--blue-dark);
}

.quick-start-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.qs-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}

.qs-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #c8d9eb;
}

.qs-dots span.is-active {
  width: 28px;
  background: var(--blue);
}

.qs-result {
  display: grid;
  gap: 10px;
}

.qs-result-mode {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #eef8ff 100%);
}

.qs-result-mode span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.qs-result-mode strong {
  font-size: 28px;
  color: var(--blue-dark);
}

.qs-result-mode.is-crisis strong {
  color: #d12f45;
}

.qs-result-mode.is-stable strong {
  color: #9a6400;
}

.qs-result-mode.is-growth strong {
  color: #167044;
}

.qs-result-mode p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}

.qs-result-tip {
  padding: 12px 14px;
  border: 1px solid #f0c56d;
  border-radius: var(--radius);
  background: #fff9e4;
  color: #7a5200;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}
