﻿:root {
  color-scheme: light;
  --bg: #eef6ee;
  --surface: rgba(255, 255, 252, .78);
  --surface-strong: #fffdf5;
  --text: #10241b;
  --muted: #62766b;
  --line: rgba(18, 72, 47, .14);
  --gold: #bd8f45;
  --sage: #5caa7b;
  --emerald: #12482f;
  --mint: #d8f3dc;
  --pig: #f2b4bf;
  --pig-strong: #cf6f85;
  --ink: #0b1f17;
  --rose: #c9655b;
  --blue: #477f8f;
  --copper: #b86f3f;
  --cream: #fff7e8;
  --shadow: 0 28px 80px rgba(18, 72, 47, .18);
  --soft-shadow: 0 16px 44px rgba(18, 72, 47, .10);
  --radius: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

:root.dark,
body.dark {
  color-scheme: dark;
  --bg: #09120d;
  --surface: rgba(16, 32, 24, .78);
  --surface-strong: #132419;
  --text: #f5fbf3;
  --muted: #a9bcae;
  --line: rgba(223, 245, 229, .14);
  --gold: #d4a75b;
  --sage: #74c592;
  --emerald: #76d79a;
  --mint: #173823;
  --pig: #e39aaa;
  --pig-strong: #f2b4bf;
  --ink: #f5fbf3;
  --rose: #e4897d;
  --blue: #7fc0cd;
  --copper: #df935c;
  --cream: #17251a;
  --shadow: 0 26px 80px rgba(0, 0, 0, .39);
  --soft-shadow: 0 16px 44px rgba(0, 0, 0, .22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(216, 243, 220, .76), rgba(255, 247, 232, .64) 42%, rgba(232, 241, 235, .92)),
    linear-gradient(90deg, rgba(18, 72, 47, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 72, 47, .04) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 44px 44px, 44px 44px;
  color: var(--text);
  letter-spacing: 0;
}

:root.dark body,
body.dark {
  background:
    linear-gradient(135deg, rgba(8, 18, 13, .98), rgba(18, 38, 26, .94) 48%, rgba(11, 24, 19, .98)),
    linear-gradient(90deg, rgba(223, 245, 229, .04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(223, 245, 229, .035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 44px 44px, 44px 44px;
}

body.authenticated .auth-screen {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
}

body:not(.authenticated) .app-shell {
  filter: blur(14px);
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

body.onboarding-active .app-shell {
  filter: blur(10px);
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

body.onboarding-active .onboarding-screen {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.admin-only {
  display: none !important;
}

body.is-admin .nav-item.admin-only {
  display: flex !important;
}

body.is-admin section.admin-only.active {
  display: block !important;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 22px;
  padding: clamp(16px, 4vw, 48px);
  background:
    linear-gradient(125deg, rgba(18, 72, 47, .16), rgba(255, 247, 232, .82) 46%, rgba(216, 243, 220, .72)),
    rgba(238, 246, 238, .94);
  backdrop-filter: blur(24px);
  transition: opacity .34s var(--ease), transform .34s var(--ease);
}

.onboarding-screen {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(216, 243, 220, .72), rgba(255, 247, 232, .82)),
    rgba(238, 246, 238, .86);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  backdrop-filter: blur(20px);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}

body.dark .onboarding-screen {
  background:
    linear-gradient(135deg, rgba(16, 47, 28, .86), rgba(25, 36, 25, .9)),
    rgba(8, 19, 14, .88);
}

.onboarding-card {
  width: min(900px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 34px);
  backdrop-filter: blur(22px);
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.onboarding-steps span {
  height: 7px;
  border-radius: 999px;
  background: rgba(128, 128, 128, .16);
}

.onboarding-steps span.active {
  background: linear-gradient(90deg, var(--emerald), var(--pig-strong));
}

.onboarding-step {
  display: none;
  animation: rise .28s var(--ease);
}

.onboarding-step.active {
  display: block;
}

.onboarding-step h3 {
  margin: 0;
  font-size: clamp(25px, 4vw, 38px);
}

.onboarding-step p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.6;
}

.onboarding-step h4 {
  margin: 22px 0 10px;
}

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

.onboarding-choice-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.onboarding-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .38);
  padding: 14px;
}

body.dark .onboarding-choice {
  background: rgba(255, 255, 255, .04);
}

.onboarding-choice:has(input:checked) {
  border-color: rgba(18, 72, 47, .38);
  background: rgba(18, 72, 47, .10);
}

.onboarding-choice input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--emerald);
}

.onboarding-choice strong,
.onboarding-choice small,
.onboarding-summary strong,
.onboarding-summary span {
  display: block;
}

.onboarding-choice small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.onboarding-value-note,
.onboarding-summary {
  border: 1px solid rgba(18, 72, 47, .22);
  border-radius: var(--radius);
  background: rgba(18, 72, 47, .08);
  color: var(--muted);
  padding: 14px;
  line-height: 1.5;
}

.onboarding-summary {
  margin-top: 14px;
}

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

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

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

.onboarding-internet {
  margin-bottom: 12px;
}

.onboarding-subscription {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .38);
  padding: 13px;
}

body.dark .onboarding-subscription {
  background: rgba(255, 255, 255, .04);
}

.onboarding-subscription input {
  width: 21px;
  min-height: 21px;
  accent-color: var(--pig-strong);
}

.onboarding-subscription strong,
.onboarding-subscription small {
  display: block;
}

.onboarding-subscription small {
  margin-top: 3px;
  color: var(--muted);
}

.onboarding-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.onboarding-actions > div {
  display: flex;
  gap: 10px;
}

.onboarding-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
  box-shadow: none;
}

:root.dark .auth-screen,
body.dark .auth-screen {
  background:
    linear-gradient(125deg, rgba(11, 25, 17, .98), rgba(22, 49, 31, .92) 52%, rgba(13, 28, 22, .98)),
    rgba(8, 19, 14, .94);
}

.auth-visual,
.auth-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .50), rgba(255, 255, 255, .22)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.auth-visual {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: min(760px, calc(100vh - 96px));
  padding: clamp(24px, 4vw, 46px);
  overflow: hidden;
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: auto 34px 34px auto;
  width: 220px;
  height: 150px;
  border: 1px solid rgba(18, 72, 47, .18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(18, 72, 47, .10), rgba(184, 111, 63, .08)),
    linear-gradient(90deg, transparent 0 20%, rgba(18, 72, 47, .08) 20% 21%, transparent 21% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .50);
  transform: rotate(-3deg);
}

.auth-brand,
.auth-copy {
  position: relative;
  z-index: 1;
}

.auth-copy {
  max-width: 640px;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 74px);
  line-height: .97;
}

.auth-copy p:last-child {
  max-width: 540px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.auth-panel {
  align-self: center;
  justify-self: center;
  width: min(100%, 440px);
  padding: 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .38);
}

:root.dark .auth-tabs,
body.dark .auth-tabs {
  background: rgba(255, 255, 255, .06);
}

.auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-tabs button.active {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--soft-shadow);
}

.auth-form {
  display: grid;
  gap: 14px;
}

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

.auth-form input {
  width: 100%;
}

.register-only {
  display: none !important;
}

.auth-panel.registering .register-only {
  display: grid !important;
}

.auth-error {
  min-height: 20px;
  margin: 0;
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
}

.auth-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-screen {
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  gap: 0;
  background: #ffffff;
  padding: 0;
}

.auth-visual,
.auth-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-visual {
  min-height: 100vh;
  padding: clamp(28px, 5vw, 58px);
  background:
    radial-gradient(circle at 24% 78%, rgba(105, 248, 255, .22), transparent 0 82px, transparent 83px),
    radial-gradient(circle at 74% 28%, rgba(255, 214, 116, .18), transparent 0 110px, transparent 111px),
    linear-gradient(145deg, #263ee9 0%, #5c54ff 44%, #8458f7 100%);
  color: #fff;
}

.auth-visual::after {
  display: none;
}

.auth-brand {
  color: #fff;
}

.auth-brand .brand-mark {
  border-color: rgba(255, 255, 255, .30);
  background: rgba(255, 255, 255, .18);
  box-shadow: 0 18px 42px rgba(23, 31, 117, .24), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.auth-brand .brand-mark::after {
  background: #fff;
}

.auth-brand small {
  color: rgba(255, 255, 255, .72);
}

.auth-hero-scene {
  position: absolute;
  inset: 12% 7% 12% 7%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.auth-orbit {
  position: absolute;
  border-radius: 999px;
  filter: blur(.2px);
  opacity: .9;
}

.auth-orbit.one {
  left: 6%;
  bottom: 8%;
  width: 84px;
  height: 84px;
  background: linear-gradient(145deg, #7ff4ff, #4574ff);
  box-shadow: 0 22px 34px rgba(26, 43, 154, .25);
}

.auth-orbit.two {
  right: 12%;
  top: 15%;
  width: 34px;
  height: 34px;
  background: linear-gradient(145deg, #ffe077, #ff9a5f);
}

.finance-cube {
  position: relative;
  width: clamp(190px, 29vw, 315px);
  aspect-ratio: 1.04;
  border-radius: 34px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .42), transparent 0 14%, transparent 15%),
    linear-gradient(145deg, #775dff 0%, #4b63f7 46%, #2e52d8 100%);
  box-shadow:
    0 46px 70px rgba(18, 31, 146, .42),
    inset 18px 18px 30px rgba(255, 255, 255, .15),
    inset -18px -22px 38px rgba(21, 38, 138, .32);
  transform: rotate(-9deg);
}

.finance-cube::before {
  content: "";
  position: absolute;
  left: -12%;
  bottom: 12%;
  width: 36%;
  aspect-ratio: 1;
  border: 10px solid rgba(146, 165, 255, .72);
  border-radius: 50%;
  box-shadow: inset 0 10px 18px rgba(31, 46, 156, .28);
}

.cube-slot {
  position: absolute;
  left: 24%;
  top: 18%;
  width: 38%;
  height: 5px;
  border-radius: 999px;
  background: rgba(25, 34, 132, .78);
  transform: rotate(-25deg);
}

.cube-coin {
  position: absolute;
  right: 18%;
  top: 20%;
  width: 26%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffd85e, #ff9d40);
  box-shadow: 0 15px 26px rgba(24, 35, 145, .30), inset 0 3px 5px rgba(255, 255, 255, .35);
  transform: rotate(35deg);
}

.cube-button {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(145deg, #7df6ff, #43c9ec);
  box-shadow: inset 0 3px 4px rgba(255, 255, 255, .22);
}

.cube-button.main {
  left: 18%;
  bottom: 23%;
  width: 18%;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #aeb8ff, #747dff);
}

.cube-button.small {
  width: 8%;
  aspect-ratio: 1;
  bottom: 26%;
}

.cube-button.small.one { right: 33%; }
.cube-button.small.two { right: 18%; bottom: 34%; }

.auth-copy {
  position: relative;
  z-index: 1;
  align-self: end;
  max-width: 560px;
  margin-top: auto;
}

.auth-copy .eyebrow,
.auth-copy p:last-child {
  color: rgba(255, 255, 255, .76);
}

.auth-copy h1 {
  max-width: 620px;
  color: #fff;
  font-size: clamp(40px, 5.6vw, 76px);
}

.auth-panel {
  display: grid;
  align-content: center;
  justify-self: stretch;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  padding: clamp(34px, 7vw, 84px);
  background: #fff;
}

.auth-panel-brand {
  position: absolute;
  top: clamp(28px, 5vw, 54px);
  display: flex;
  align-items: center;
  gap: 9px;
  color: #2b2f3a;
  font-weight: 900;
  letter-spacing: .04em;
}

.auth-mini-mark {
  position: relative;
  width: 20px;
  height: 18px;
}

.auth-mini-mark::before,
.auth-mini-mark::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 7px;
  background: #625cff;
}

.auth-mini-mark::before {
  left: 0;
  top: 7px;
}

.auth-mini-mark::after {
  right: 0;
  top: 2px;
}

.auth-panel-copy {
  margin-bottom: 28px;
}

.auth-panel-copy h2 {
  margin: 0 0 14px;
  color: #0b0d12;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
}

.auth-panel-copy p {
  margin: 0;
  color: #8b94a7;
  line-height: 1.5;
}

.auth-tabs {
  width: 100%;
  margin-bottom: 24px;
  border-color: #e7e9f0;
  border-radius: 12px;
  background: #fff;
}

.auth-tabs button {
  color: #8a91a1;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}

.auth-tabs button.active {
  background: #625cff;
  color: #fff;
  box-shadow: 0 14px 26px rgba(98, 92, 255, .22);
}

.auth-form {
  gap: 16px;
}

.auth-form label {
  color: #2a2d35;
  font-size: 14px;
}

.auth-form input {
  min-height: 52px;
  border-color: #e5e8f0;
  border-radius: 7px;
  background: #fff;
  color: #151821;
  box-shadow: none;
}

.auth-form input:focus {
  border-color: #625cff;
  box-shadow: 0 0 0 3px rgba(98, 92, 255, .12), 0 12px 24px rgba(31, 37, 89, .08);
}

.auth-note {
  color: #8b94a7;
}

.auth-submit {
  min-height: 54px;
  border: 0;
  border-radius: 7px;
  background: #625cff;
  box-shadow: 0 16px 30px rgba(98, 92, 255, .24);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #8b94a7;
  font-size: 13px;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e8f0;
}

.google-auth-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #dfe4ee;
  border-radius: 7px;
  background: #fff;
  color: #151821;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.google-auth-button:hover {
  transform: translateY(-1px);
  border-color: rgba(98, 92, 255, .35);
  box-shadow: 0 14px 28px rgba(31, 37, 89, .10);
}

.google-auth-button span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from -45deg, #4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
  color: #fff;
  font-weight: 950;
}

.google-auth-button:disabled {
  cursor: wait;
  opacity: .7;
  transform: none;
}

@media (max-width: 900px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 420px;
  }

  .auth-hero-scene {
    inset: 18% 5% 8%;
    opacity: .86;
  }

  .auth-panel {
    max-width: none;
    min-height: auto;
    padding: 42px clamp(22px, 7vw, 54px) 56px;
  }

  .auth-panel-brand {
    position: static;
    margin-bottom: 34px;
  }
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 100vh;
  background: linear-gradient(120deg, rgba(225, 234, 250, .82), rgba(247, 250, 255, .78));
}

.sidebar {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  margin: 16px 0 16px 16px;
  padding: 22px 20px;
  overflow-y: auto;
  border: 1px solid rgba(205, 214, 230, .85);
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 70px rgba(63, 85, 122, .16);
  backdrop-filter: blur(22px);
}

:root.dark .sidebar,
body.dark .sidebar {
  border-color: rgba(255, 255, 255, .09);
  background: rgba(18, 24, 29, .92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.sidebar-chrome {
  display: flex;
  gap: 8px;
  margin: 1px 0 24px;
}

.chrome-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.chrome-dot.red { background: #ff625d; }
.chrome-dot.yellow { background: #ffc02e; }
.chrome-dot.green { background: #30c75a; }

.sidebar-search-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-left: auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #697386;
  font-size: 24px;
  line-height: 1;
}

.sidebar-segment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  border: 1px solid #e7ebf2;
  border-radius: 15px;
  background: #fbfcff;
}

.sidebar-segment button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #8b93a3;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.sidebar-segment button.active {
  background: #0555df;
  color: #fff;
  box-shadow: 0 9px 18px rgba(5, 85, 223, .28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 56px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(18, 72, 47, .18);
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(255, 253, 245, .76), rgba(216, 243, 220, .50)),
    var(--surface-strong);
  box-shadow: 0 16px 34px rgba(18, 72, 47, .18), inset 0 1px 0 rgba(255, 255, 255, .58);
  isolation: isolate;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 11px;
  width: 36px;
  height: 25px;
  border: 1px solid rgba(18, 72, 47, .20);
  border-radius: 18px 19px 13px 15px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .46), transparent 34%),
    linear-gradient(145deg, var(--pig), var(--pig-strong));
  box-shadow: inset 0 -5px 10px rgba(130, 44, 66, .10);
  z-index: 2;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 24px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #10241b;
  z-index: 4;
}

.logo-leaf,
.logo-coin,
.logo-slot,
.logo-snout,
.logo-leg {
  position: absolute;
  display: block;
}

.logo-leaf {
  left: 18px;
  top: 5px;
  width: 13px;
  height: 18px;
  border-radius: 12px 12px 2px 12px;
  background: linear-gradient(145deg, var(--sage), var(--emerald));
  transform: rotate(-28deg);
  box-shadow: 8px 3px 0 -4px var(--gold);
  z-index: 3;
}

.logo-coin {
  left: 31px;
  top: 7px;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(91, 63, 22, .18);
  border-radius: 50%;
  background:
    linear-gradient(145deg, #ffe4a3, var(--gold));
  box-shadow: 0 7px 12px rgba(189, 143, 69, .22);
  z-index: 1;
}

.logo-coin::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(91, 63, 22, .22);
}

.logo-slot {
  left: 22px;
  top: 20px;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: rgba(16, 36, 27, .38);
  z-index: 4;
}

.logo-snout {
  right: 4px;
  top: 25px;
  width: 15px;
  height: 12px;
  border: 1px solid rgba(18, 72, 47, .16);
  border-radius: 50%;
  background: #f8c4cf;
  z-index: 5;
}

.logo-snout::before,
.logo-snout::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(16, 36, 27, .42);
}

.logo-snout::before { left: 4px; }
.logo-snout::after { right: 4px; }

.logo-leg {
  bottom: 9px;
  width: 7px;
  height: 6px;
  border-radius: 0 0 4px 4px;
  background: var(--pig-strong);
  z-index: 1;
}

.logo-leg-left { left: 20px; }
.logo-leg-right { left: 37px; }

.sidebar .brand-mark {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  transform: none;
  overflow: hidden;
}

.sidebar .brand {
  gap: 11px;
}

.sidebar .brand small {
  font-size: 10px;
}

.sidebar .brand-mark::before,
.sidebar .brand-mark::after,
.sidebar .logo-leaf {
  content: "";
  position: absolute;
  left: 8px;
  width: 15px;
  height: 15px;
  border: 2px solid #1f2937;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  transform: rotate(45deg) skew(-10deg, -10deg);
}

.sidebar .brand-mark::before {
  top: 3px;
}

.sidebar .brand-mark::after {
  top: 9px;
}

.sidebar .logo-leaf {
  top: 15px;
}

.sidebar .logo-coin,
.sidebar .logo-slot,
.sidebar .logo-snout,
.sidebar .logo-leg {
  display: none;
}

.auth-brand .brand-mark {
  width: 64px;
  height: 58px;
  border-radius: 19px;
}

.auth-brand .brand-mark::before {
  left: 12px;
  bottom: 13px;
  width: 42px;
  height: 29px;
}

.auth-brand .logo-leaf {
  left: 21px;
  top: 6px;
}

.auth-brand .logo-coin {
  left: 36px;
  top: 8px;
}

.auth-brand .logo-slot {
  left: 26px;
  top: 24px;
}

.auth-brand .logo-snout {
  right: 5px;
  top: 30px;
}

.auth-brand .logo-leg {
  bottom: 10px;
}

.auth-brand .logo-leg-left { left: 23px; }
.auth-brand .logo-leg-right { left: 43px; }

body.dark .brand-mark {
  background:
    linear-gradient(145deg, rgba(25, 54, 34, .86), rgba(18, 32, 24, .82)),
    var(--surface-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .10);
}

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

.brand small,
.eyebrow,
.muted {
  color: var(--muted);
}

.brand small {
  margin-top: 2px;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}

.nav-section-label {
  margin: 11px 0 8px;
  color: #9aa3b5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.nav-section-label.account-label {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #edf0f5;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 39px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #697386;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
  transition: transform .24s var(--ease), background .24s var(--ease), color .24s var(--ease), border-color .24s var(--ease);
}

.nav-item:hover,
.nav-item.active {
  transform: none;
  background: transparent;
  border-color: transparent;
  color: #1f2937;
  box-shadow: none;
  font-weight: 900;
}

.icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #697386;
  font-size: 15px;
}

.nav-item.active .icon {
  color: #1f2937;
}

.panel,
.hero-panel,
.dashboard-hero,
.safe-balance-card,
.net-worth-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .16)),
    var(--surface);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.main {
  min-width: 0;
  padding: 24px clamp(16px, 3vw, 42px) 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.topbar h1,
.hero-copy h2,
.page-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.03;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.topbar-actions,
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(410px, 36vw);
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .52), rgba(255, 255, 255, .18)),
    var(--surface);
  box-shadow: var(--soft-shadow);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.menu-toggle,
.ghost-button,
.primary-button,
.type-tabs button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease), border-color .22s var(--ease);
}

.menu-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: var(--surface);
}

.menu-toggle {
  display: none;
}

.ghost-button:hover,
.primary-button:hover,
.type-tabs button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.view {
  display: none;
  animation: rise .42s var(--ease);
}

.view.active {
  display: block;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.dashboard-studio-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.dashboard-studio-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.studio-actions,
.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.studio-kpi {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  padding: 16px;
}

.studio-kpi::after {
  content: "";
  position: absolute;
  inset: auto -18px -22px auto;
  width: 120px;
  height: 80px;
  border-radius: 999px 0 0 0;
  opacity: .22;
  background: currentColor;
  transform: rotate(-8deg);
}

.studio-kpi span,
.studio-kpi small {
  display: block;
  color: rgba(255, 255, 255, .82);
}

.studio-kpi span {
  font-size: 12px;
  font-weight: 900;
}

.studio-kpi strong {
  display: block;
  margin: 10px 0 2px;
  color: #fff;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1;
}

.studio-kpi small {
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.studio-kpi.available {
  color: #e7f8ee;
  background: linear-gradient(135deg, #12482f, #2f8f64);
}

.studio-kpi.income {
  color: #e8f7ff;
  background: linear-gradient(135deg, #2377bc, #39a1f2);
}

.studio-kpi.spend {
  color: #fff1e2;
  background: linear-gradient(135deg, #b86f3f, #f2a93b);
}

.studio-kpi.fixed {
  color: #fff0f0;
  background: linear-gradient(135deg, #b84b4b, #e46a6f);
}

.studio-kpi.saved {
  color: #efffec;
  background: linear-gradient(135deg, #247c52, #78bf6b);
}

.studio-kpi.net {
  color: #fff7df;
  background: linear-gradient(135deg, #7257c8, #8c72df);
}

.kpi-spark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 74px;
  height: 34px;
  opacity: .62;
}

.kpi-spark.bars {
  display: flex;
  align-items: end;
  gap: 5px;
}

.kpi-spark.bars i {
  display: block;
  width: 9px;
  border-radius: 999px 999px 0 0;
  background: rgba(255, 255, 255, .58);
}

.kpi-spark.bars i:nth-child(1) { height: 16px; }
.kpi-spark.bars i:nth-child(2) { height: 24px; }
.kpi-spark.bars i:nth-child(3) { height: 12px; }
.kpi-spark.bars i:nth-child(4) { height: 29px; }
.kpi-spark.bars i:nth-child(5) { height: 21px; }

.kpi-spark.line::before {
  content: "";
  position: absolute;
  inset: 7px 0 0;
  border-bottom: 3px solid rgba(255, 255, 255, .62);
  border-radius: 50%;
  transform: skewY(-12deg);
}

.dashboard-main-chart {
  margin-bottom: 16px;
}

.dashboard-main-chart canvas {
  min-height: 310px;
}

.safe-dashboard-summary {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) minmax(240px, .65fr);
  gap: 14px;
  margin-bottom: 16px;
}

.net-worth-card.compact {
  min-height: 0;
  align-content: center;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .72fr) minmax(210px, .52fr);
  gap: 16px;
  margin-bottom: 16px;
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(255, 253, 245, .94), rgba(216, 243, 220, .68) 58%, rgba(244, 220, 202, .36)),
    var(--surface);
  overflow: hidden;
}

body.dark .dashboard-hero {
  background:
    linear-gradient(135deg, rgba(18, 36, 25, .96), rgba(13, 29, 22, .86) 60%, rgba(42, 31, 24, .62)),
    var(--surface);
}

.dashboard-hero .hero-copy {
  align-self: center;
}

.dashboard-hero h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: .98;
}

.dashboard-hero .hero-copy p:last-of-type {
  max-width: 610px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.safe-balance-card,
.net-worth-card {
  min-width: 0;
  padding: 20px;
  background:
    linear-gradient(160deg, rgba(255, 255, 252, .74), rgba(216, 243, 220, .30)),
    rgba(255, 255, 255, .50);
}

body.dark .safe-balance-card,
body.dark .net-worth-card {
  background: rgba(255, 255, 255, .05);
}

.safe-balance-card {
  display: grid;
  align-content: center;
  gap: 10px;
  border-color: rgba(18, 72, 47, .24);
}

.status-pill {
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(18, 72, 47, .25);
  border-radius: 999px;
  background: rgba(18, 72, 47, .10);
  color: var(--emerald);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

.safe-balance-card small,
.safe-balance-card p,
.net-worth-card span,
.net-worth-card small,
.metric-card small,
.metric-card em,
.snapshot-grid span {
  color: var(--muted);
}

.safe-balance-card strong {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
}

.safe-balance-card p {
  margin: 0;
  line-height: 1.5;
}

.safe-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 67, 43, .10);
}

.safe-meter span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald), var(--sage), var(--copper), var(--gold));
}

.net-worth-card {
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 190px;
  border-color: rgba(184, 111, 63, .24);
  background:
    linear-gradient(150deg, rgba(184, 111, 63, .16), rgba(255, 255, 255, .62)),
    var(--surface);
}

body.dark .net-worth-card {
  background:
    linear-gradient(150deg, rgba(120, 191, 198, .14), rgba(255, 255, 255, .04)),
    var(--surface);
}

.net-worth-card strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.decision-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(18, 72, 47, .24);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(18, 72, 47, .10), rgba(255, 247, 232, .48));
  padding: 14px 16px;
}

.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 7px rgba(18, 72, 47, .11);
}

.decision-strip strong,
.decision-strip small {
  display: block;
}

.decision-strip small {
  margin-top: 3px;
  color: var(--muted);
}

.guided-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(150px, .75fr));
  gap: 12px;
  margin-bottom: 16px;
}

.guided-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 252, .58), rgba(255, 255, 255, .18)),
    rgba(255, 255, 255, .42);
  color: var(--text);
  box-shadow: var(--soft-shadow);
  padding: 16px;
  text-align: left;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}

body.dark .guided-card {
  background: rgba(255, 255, 255, .045);
}

.guided-card:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 72, 47, .35);
  box-shadow: var(--shadow);
}

.guided-card.primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(18, 72, 47, .16), rgba(207, 111, 133, .13), rgba(255, 247, 232, .42)),
    var(--surface);
}

.guided-card.primary span,
.guided-card.primary small {
  grid-column: 1;
}

.guided-card.primary button {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.guided-card span,
.guided-card small {
  display: block;
  color: var(--muted);
}

.guided-card > span {
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guided-card.action > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(18, 72, 47, .12);
  color: var(--emerald);
  letter-spacing: 0;
}

.guided-card strong {
  display: block;
  font-size: 17px;
}

.guided-card small {
  margin-top: 5px;
  line-height: 1.45;
}

.weekly-action-row {
  margin-bottom: 16px;
}

.weekly-check-list,
.smart-alert-list,
.recommendation-list,
.anomaly-list,
.suggestion-list,
.debt-plan-grid,
.household-grid {
  display: grid;
  gap: 10px;
}

.weekly-check-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .38);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

body.dark .weekly-check-item {
  background: rgba(255, 255, 255, .04);
}

.weekly-check-item > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(18, 72, 47, .26);
  border-radius: 50%;
  color: var(--emerald);
  font-weight: 900;
}

.weekly-check-item.done {
  border-color: rgba(18, 72, 47, .32);
  background: rgba(18, 72, 47, .08);
}

.weekly-check-item strong,
.weekly-check-item small,
.smart-alert strong,
.smart-alert small {
  display: block;
}

.weekly-check-item small,
.smart-alert small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.smart-alert,
.recommendation-card,
.anomaly-card,
.suggestion-card,
.debt-card,
.household-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 14px;
}

body.dark .smart-alert,
body.dark .recommendation-card,
body.dark .anomaly-card,
body.dark .suggestion-card,
body.dark .debt-card,
body.dark .household-card {
  background: rgba(255, 255, 255, .04);
}

.smart-alert.positive { border-left: 4px solid var(--emerald); }
.smart-alert.notice { border-left: 4px solid var(--blue); }
.smart-alert.warning { border-left: 4px solid var(--rose); }

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 280px;
  gap: 24px;
  min-height: 250px;
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(251, 255, 248, .9), rgba(218, 243, 226, .46)),
    var(--surface);
}

.piggy-hero {
  display: grid;
  place-items: center;
}

.piggy-bank {
  position: relative;
  width: 160px;
  height: 112px;
  border-radius: 58% 48% 46% 52%;
  background:
    radial-gradient(circle at 28% 30%, rgba(255, 255, 255, .62), transparent 20%),
    linear-gradient(145deg, var(--pig), var(--pig-strong));
  box-shadow: 0 22px 45px rgba(216, 115, 140, .24);
}

.piggy-bank::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 42px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pig-strong);
}

.piggy-bank::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50px;
  width: 24px;
  height: 14px;
  border: 4px solid var(--pig-strong);
  border-left: 0;
  border-radius: 999px;
}

.piggy-slot,
.piggy-ear,
.piggy-eye,
.piggy-snout,
.piggy-leg {
  position: absolute;
  display: block;
}

.piggy-slot {
  top: 20px;
  left: 55px;
  width: 48px;
  height: 7px;
  border-radius: 999px;
  background: rgba(16, 32, 24, .28);
}

.piggy-ear {
  top: -17px;
  left: 37px;
  width: 36px;
  height: 36px;
  border-radius: 8px 28px 8px 26px;
  background: var(--pig);
  transform: rotate(-14deg);
}

.piggy-eye {
  top: 37px;
  right: 42px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #102018;
}

.piggy-snout {
  right: -9px;
  top: 47px;
  width: 32px;
  height: 25px;
  border: 1px solid rgba(216, 115, 140, .34);
  border-radius: 45%;
  background: #f8c4cf;
}

.piggy-leg {
  bottom: -9px;
  width: 22px;
  height: 19px;
  border-radius: 0 0 8px 8px;
  background: var(--pig-strong);
}

.piggy-leg.one { left: 42px; }
.piggy-leg.two { right: 42px; }

body.dark .hero-panel {
  background:
    linear-gradient(135deg, rgba(28, 31, 27, .92), rgba(28, 31, 27, .55)),
    var(--surface);
}

.hero-copy p:last-child {
  max-width: 610px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.balance-orb {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 200px;
  border: 1px solid rgba(18, 72, 47, .28);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 253, 245, .66), rgba(92, 170, 123, .24), rgba(184, 111, 63, .10));
  text-align: center;
}

.balance-orb strong {
  margin: 8px 0;
  font-size: 32px;
}

.balance-orb span,
.balance-orb small,
.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

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

.metric-card {
  display: grid;
  min-height: 152px;
  align-content: start;
  gap: 8px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin: 2px 0;
  font-size: clamp(24px, 3vw, 34px);
}

.metric-card em {
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.metric-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: rgba(18, 72, 47, .10);
  color: var(--emerald);
  font-size: 11px;
  font-weight: 900;
}

.metric-card.spend { border-top: 3px solid var(--rose); }
.metric-card.income { border-top: 3px solid var(--sage); }
.metric-card.saved { border-top: 3px solid var(--emerald); }
.metric-card.mood { border-top: 3px solid var(--blue); }
.metric-card.debt { border-top: 3px solid var(--copper); }
.metric-card.fixed { border-top: 3px solid var(--blue); }
.metric-card.available { border-top: 3px solid var(--emerald); }

.dashboard-grid.focus {
  grid-template-columns: 1fr;
  align-items: stretch;
  margin-bottom: 16px;
}

.money-snapshot {
  display: grid;
  align-content: start;
}

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

.snapshot-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 13px;
}

body.dark .snapshot-grid article {
  background: rgba(255, 255, 255, .04);
}

.snapshot-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 170px);
  align-items: center;
  gap: 12px;
}

.account-row .amount-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .48);
  color: var(--text);
  padding: 10px 11px;
  text-align: right;
  font: inherit;
  font-weight: 800;
  outline: 0;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

body.dark .account-row .amount-input {
  background: rgba(255, 255, 255, .05);
}

.account-row .amount-input:focus {
  border-color: rgba(18, 72, 47, .5);
  box-shadow: 0 0 0 4px rgba(18, 72, 47, .10);
}

.monthly-plan-card {
  display: grid;
  align-content: start;
}

.spending-bars {
  display: grid;
  gap: 16px;
}

.spending-bars > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 12px;
}

.spending-bars span,
.spending-bars strong,
.monthly-plan-card p {
  color: var(--muted);
}

.spending-bars strong {
  font-size: 13px;
}

.spending-bars .progress {
  grid-column: 1 / -1;
}

.spending-bars > div:nth-child(1) .progress span {
  background: linear-gradient(90deg, var(--blue), var(--sage));
}

.spending-bars > div:nth-child(2) .progress span {
  background: linear-gradient(90deg, var(--rose), var(--gold));
}

.spending-bars > div:nth-child(3) .progress span {
  background: linear-gradient(90deg, var(--emerald), var(--sage));
}

.monthly-plan-card p {
  margin: 16px 0 0;
  line-height: 1.55;
}

.goals-balance-row {
  margin-bottom: 16px;
}

.active-goal-list {
  display: grid;
  gap: 10px;
}

.active-goal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 14px;
}

body.dark .active-goal-card {
  background: rgba(255, 255, 255, .04);
}

.budget-suggestions-panel,
.debt-plan-panel {
  margin-bottom: 16px;
}

.suggestion-card,
.recommendation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.suggestion-card strong,
.suggestion-card small,
.recommendation-card strong,
.recommendation-card small,
.anomaly-card strong,
.anomaly-card small,
.anomaly-card span,
.debt-card strong,
.debt-card small,
.household-card strong,
.household-card small,
.household-card span,
.household-card em {
  display: block;
}

.suggestion-card small,
.recommendation-card small,
.anomaly-card small,
.anomaly-card span,
.debt-card small,
.debt-card p,
.household-card small,
.household-card span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.suggestion-card > span,
.recommendation-card > span,
.household-card em {
  color: var(--emerald);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

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

.debt-card > span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.debt-card p {
  margin-bottom: 0;
}

.report-grid.lower {
  margin-top: 16px;
}

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

.report-summary-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 14px;
}

body.dark .report-summary-grid article {
  background: rgba(255, 255, 255, .04);
}

.report-summary-grid span,
.report-summary-grid strong {
  display: block;
}

.report-summary-grid span {
  color: var(--muted);
}

.report-summary-grid strong {
  margin-top: 6px;
  font-size: 22px;
}

.household-panel {
  grid-column: 1 / -1;
}

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

.ai-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(18, 72, 47, .12), rgba(61, 127, 134, .10)),
    var(--surface);
}

.ai-hero-panel h3 {
  font-size: clamp(27px, 4vw, 42px);
}

.ai-hero-panel p,
.ai-safety-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.ai-confidence {
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(18, 72, 47, .24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .38);
  padding: 18px;
  text-align: center;
}

body.dark .ai-confidence {
  background: rgba(255, 255, 255, .04);
}

.ai-confidence strong {
  margin: 8px 0;
  color: var(--emerald);
  font-size: 54px;
  line-height: 1;
}

.ai-confidence span,
.ai-confidence small {
  color: var(--muted);
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.ai-list,
.ai-budget-list {
  display: grid;
  gap: 10px;
}

.ai-card,
.ai-budget-row,
.ai-answer,
.ai-sim-result article,
.ai-report-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 14px;
}

body.dark .ai-card,
body.dark .ai-budget-row,
body.dark .ai-answer,
body.dark .ai-sim-result article,
body.dark .ai-report-card {
  background: rgba(255, 255, 255, .04);
}

.ai-card,
.ai-budget-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.ai-budget-row {
  grid-template-columns: minmax(0, 1fr) minmax(90px, auto) minmax(90px, auto);
}

.ai-card.warning {
  border-left: 4px solid var(--rose);
}

.ai-card strong,
.ai-card small,
.ai-card span,
.ai-budget-row strong,
.ai-budget-row small,
.ai-answer strong,
.ai-answer small,
.ai-sim-result span,
.ai-sim-result strong,
.ai-report-card strong {
  display: block;
}

.ai-card small,
.ai-budget-row small,
.ai-answer p,
.ai-answer small,
.ai-report-card p {
  color: var(--muted);
  line-height: 1.5;
}

.ai-card > span,
.ai-budget-row b,
.ai-sim-result strong {
  color: var(--emerald);
  font-weight: 900;
  white-space: nowrap;
}

.ai-budget-row > span {
  color: var(--muted);
  font-weight: 800;
}

.ai-question-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-question-row .active {
  border-color: rgba(18, 72, 47, .32);
  background: rgba(18, 72, 47, .10);
}

.ai-sim-controls {
  display: grid;
  gap: 14px;
}

.ai-sim-controls label {
  display: grid;
  grid-template-columns: minmax(110px, .75fr) minmax(120px, 1fr) minmax(80px, auto);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ai-sim-controls input[type="range"] {
  width: 100%;
  min-height: auto;
  padding: 0;
  accent-color: var(--emerald);
}

.ai-sim-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.ai-sim-result span {
  color: var(--muted);
}

.ai-sim-result strong {
  margin-top: 5px;
  font-size: 24px;
}

.ai-safety-points {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.ai-safety-points span {
  border: 1px solid rgba(18, 72, 47, .18);
  border-radius: var(--radius);
  background: rgba(18, 72, 47, .07);
  padding: 10px;
  color: var(--muted);
  font-weight: 800;
}

.ai-report-panel {
  margin-bottom: 16px;
}

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

.ai-report-card p {
  margin-bottom: 0;
}

.forecast-panel {
  margin-bottom: 16px;
}

.dashboard-forecast {
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(18, 72, 47, .12), rgba(255, 255, 255, .58)),
    var(--surface);
}

body.dark .dashboard-forecast {
  background:
    linear-gradient(135deg, rgba(42, 166, 111, .16), rgba(255, 255, 255, .04)),
    var(--surface);
}

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

.future-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 16px;
}

body.dark .future-grid article {
  background: rgba(255, 255, 255, .04);
}

.future-grid span,
.future-copy {
  color: var(--muted);
}

.future-grid strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 32px);
}

.future-grid .future-net {
  border-color: rgba(18, 72, 47, .34);
  background: linear-gradient(145deg, rgba(92, 170, 123, .22), rgba(255, 255, 255, .35));
}

body.dark .future-grid .future-net {
  background: linear-gradient(145deg, rgba(42, 166, 111, .20), rgba(255, 255, 255, .04));
}

.future-copy {
  margin: 14px 0 0;
  line-height: 1.6;
}

.projection-panel {
  margin-bottom: 16px;
}

.model-pill {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(18, 72, 47, .24);
  border-radius: 999px;
  background: rgba(18, 72, 47, .10);
  color: var(--sage);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.projection-list {
  display: grid;
  gap: 10px;
}

.projection-row {
  display: grid;
  grid-template-columns: minmax(145px, 1.1fr) repeat(3, minmax(110px, .75fr)) minmax(160px, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 14px;
}

body.dark .projection-row {
  background: rgba(255, 255, 255, .04);
}

.projection-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.projection-row strong {
  display: block;
  margin-top: 4px;
}

.projection-month strong {
  text-transform: capitalize;
}

.projection-net .progress {
  margin-top: 8px;
}

.subscription-total {
  min-width: 190px;
  border: 1px solid rgba(216, 115, 140, .26);
  border-radius: var(--radius);
  background: rgba(240, 174, 190, .14);
  padding: 12px 14px;
}

.subscription-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subscription-total strong {
  display: block;
  margin-top: 4px;
  font-size: 25px;
}

.subscription-panel {
  background:
    linear-gradient(135deg, rgba(240, 174, 190, .13), rgba(255, 255, 255, .56)),
    var(--surface);
}

body.dark .subscription-panel {
  background:
    linear-gradient(135deg, rgba(216, 138, 160, .14), rgba(255, 255, 255, .04)),
    var(--surface);
}

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

.subscription-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .34);
  padding: 16px;
}

body.dark .subscription-box {
  background: rgba(255, 255, 255, .04);
}

.subscription-box-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
}

.subscription-box.open .subscription-box-head {
  margin-bottom: 12px;
}

.subscription-box-head h3,
.subscription-box-head p {
  margin: 0;
}

.subscription-box-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.subscription-box-head > span {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.subscription-box-head strong {
  color: var(--pig-strong);
  white-space: nowrap;
}

.subscription-box-head i {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.subscription-box:hover {
  border-color: rgba(216, 115, 140, .30);
  box-shadow: var(--soft-shadow);
}

.subscription-options {
  display: none;
  gap: 10px;
  animation: rise .24s var(--ease);
}

.subscription-options.is-open {
  display: grid;
}

.provider-picker {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(220px, 1.25fr) minmax(120px, 170px);
  gap: 10px;
  border: 1px solid rgba(216, 115, 140, .20);
  border-radius: var(--radius);
  background: rgba(240, 174, 190, .10);
  padding: 12px;
}

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

.provider-picker p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.provider-picker select,
.provider-picker input {
  width: 100%;
}

.subscription-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(96px, 120px);
  align-items: center;
  gap: 12px;
  min-height: 76px;
  border: 1px solid rgba(16, 67, 43, .10);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .40);
  padding: 14px;
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}

body.dark .subscription-item {
  background: rgba(255, 255, 255, .04);
}

.subscription-item:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 115, 140, .34);
  box-shadow: var(--soft-shadow);
}

.subscription-item input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--pig-strong);
}

.subscription-item strong,
.subscription-item small {
  display: block;
}

.subscription-item small {
  margin-top: 4px;
  color: var(--muted);
}

.subscription-price {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subscription-price input {
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
}

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

.forecast-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 16px;
}

body.dark .forecast-card {
  background: rgba(255, 255, 255, .04);
}

.forecast-card span,
.forecast-result span,
.recurring-item small {
  color: var(--muted);
}

.forecast-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 31px);
}

.forecast-card.highlight {
  border-color: rgba(18, 72, 47, .32);
  background: linear-gradient(145deg, rgba(92, 170, 123, .22), rgba(255, 255, 255, .36));
}

body.dark .forecast-card.highlight {
  background: linear-gradient(145deg, rgba(42, 166, 111, .20), rgba(255, 255, 255, .04));
}

.forecast-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  border: 1px solid rgba(18, 72, 47, .24);
  border-radius: var(--radius);
  background: rgba(18, 72, 47, .08);
  padding: 18px;
}

.forecast-result strong {
  display: block;
  margin-top: 5px;
  font-size: 30px;
}

.forecast-result p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.compact-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.recurring-layout {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.recurring-list {
  display: grid;
  gap: 10px;
}

.recurring-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 14px;
}

body.dark .recurring-item {
  background: rgba(255, 255, 255, .04);
}

.recurring-item strong,
.recurring-item small,
.recurring-item label {
  display: block;
}

.recurring-item small {
  margin-top: 4px;
}

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

.recurring-item input {
  width: 100%;
}

.dashboard-grid,
.report-grid,
.settings-grid,
.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, .85fr);
  gap: 16px;
}

.dashboard-grid.lower {
  margin-top: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.admin-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.admin-choice-list {
  display: grid;
  gap: 10px;
}

.admin-choice-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(120px, 1.4fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .34);
}

body.dark .admin-choice-row {
  background: rgba(255, 255, 255, .04);
}

.admin-choice-row strong,
.admin-choice-row small {
  display: block;
}

.admin-choice-row small {
  color: var(--muted);
  margin-top: 3px;
}

.admin-choice-bar {
  height: 9px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--line);
}

.admin-choice-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
}

.admin-choice-row b {
  text-align: right;
}

.admin-table {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(130px, auto));
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 14px;
}

body.dark .admin-row {
  background: rgba(255, 255, 255, .04);
}

.admin-row strong,
.admin-row small {
  display: block;
}

.admin-row small {
  margin-top: 4px;
  color: var(--muted);
}

.admin-row span {
  font-weight: 800;
  text-align: right;
}

.panel {
  padding: 22px;
}

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

.section-head h3,
.section-head h2,
.panel h3 {
  margin: 0;
}

select,
input,
textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .26)),
    var(--surface-strong);
  color: var(--text);
  padding: 0 12px;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .40);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}

select:focus,
input:focus,
textarea:focus {
  border-color: rgba(18, 72, 47, .42);
  box-shadow: 0 0 0 4px rgba(18, 72, 47, .10), inset 0 1px 0 rgba(255, 255, 255, .45);
}

textarea {
  min-height: 116px;
  padding-top: 12px;
  resize: vertical;
}

canvas {
  width: 100%;
  max-width: 100%;
}

.account-list,
.entry-list,
.timeline,
.budget-grid,
.goal-grid {
  display: grid;
  gap: 12px;
}

.account-row,
.entry-row,
.budget-card,
.goal-card,
.timeline-day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 252, .50), rgba(255, 255, 255, .15)),
    rgba(255, 255, 255, .34);
}

body.dark .account-row,
body.dark .entry-row,
body.dark .budget-card,
body.dark .goal-card,
body.dark .timeline-day {
  background: rgba(255, 255, 255, .04);
}

.entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.account-row {
  padding: 14px;
}

.entry-main {
  min-width: 0;
}

.entry-main strong,
.entry-main small {
  display: block;
}

.entry-main small {
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amount {
  font-weight: 800;
  white-space: nowrap;
}

.amount.expense { color: var(--rose); }
.amount.income { color: var(--sage); }
.amount.saving { color: var(--gold); }

.ghost-button {
  min-height: 38px;
  padding: 0 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 252, .42), rgba(255, 255, 255, .14)),
    transparent;
  font-weight: 800;
}

.primary-button {
  min-height: 44px;
  padding: 0 16px;
  border-color: transparent;
  background: linear-gradient(135deg, var(--emerald), var(--sage) 62%, var(--copper));
  color: #fffaf0;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(18, 72, 47, .22);
}

body.dark .primary-button {
  background: linear-gradient(135deg, var(--sage), var(--gold));
  color: #09120d;
}

.insight-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.page-head {
  align-items: end;
}

.timeline-day {
  padding: 18px;
}

.timeline-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.timeline-date h3 {
  margin: 0;
}

.entry-layout {
  align-items: start;
}

.entry-form {
  display: grid;
  gap: 14px;
}

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

.check-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .28);
  padding: 0 12px;
}

.check-row input {
  width: 20px !important;
  min-height: 20px;
  accent-color: var(--sage);
}

.entry-badge {
  display: inline-grid;
  place-items: center;
  min-height: 20px;
  margin-left: 6px;
  border: 1px solid rgba(18, 72, 47, .24);
  border-radius: 999px;
  background: rgba(18, 72, 47, .10);
  color: var(--sage);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.entry-form input,
.entry-form select,
.entry-form textarea {
  width: 100%;
}

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

.quick-amounts button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  color: var(--text);
  font-weight: 800;
  transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}

body.dark .quick-amounts button {
  background: rgba(255, 255, 255, .045);
}

.quick-amounts button:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 72, 47, .38);
  background: rgba(18, 72, 47, .10);
}

.type-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
}

.type-tabs button {
  min-height: 38px;
  background: transparent;
}

.type-tabs button.active {
  background: var(--surface-strong);
  box-shadow: var(--soft-shadow);
}

.receipt {
  position: sticky;
  top: 24px;
}

.receipt-line,
.receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.receipt-total {
  border-bottom: 0;
}

.receipt-total strong {
  font-size: 30px;
}

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

.budget-card,
.goal-card {
  padding: 18px;
}

.budget-top,
.goal-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(128, 128, 128, .16);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald), var(--sage), var(--gold));
}

.budget-meta,
.goal-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.notes-panel li {
  margin: 13px 0;
  color: var(--muted);
  line-height: 1.55;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}

.toggle-row input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--sage);
}

.account-editor-panel {
  grid-column: 1 / -1;
}

.editable-account-list {
  display: grid;
  gap: 10px;
}

.editable-account {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 14px;
}

body.dark .editable-account {
  background: rgba(255, 255, 255, .04);
}

.editable-account strong,
.editable-account small,
.editable-account label {
  display: block;
}

.editable-account small {
  margin-top: 4px;
  color: var(--muted);
}

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

.editable-account input,
.inline-form input,
.inline-form select {
  width: 100%;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .8fr) minmax(150px, .8fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.property-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.property-studio-head {
  margin-bottom: 16px;
}

.property-chart-panel,
.property-overview-panel {
  margin-bottom: 16px;
}

.property-portfolio-chart {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 14px;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .52), rgba(255, 255, 255, .16)),
    rgba(255, 255, 255, .24);
  padding: 18px;
}

.property-chart-column {
  display: grid;
  grid-template-rows: minmax(150px, 1fr) auto auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.property-chart-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
  height: 100%;
  min-height: 160px;
  border-bottom: 1px solid var(--line);
}

.property-chart-bars span {
  width: 16px;
  min-height: 8px;
  border-radius: 999px 999px 0 0;
  transition: height .28s var(--ease);
}

.property-chart-bars .balance { background: linear-gradient(180deg, var(--sage), var(--emerald)); }
.property-chart-bars .payments { background: linear-gradient(180deg, #39a1f2, #2377bc); }
.property-chart-bars .costs { background: linear-gradient(180deg, #f2a93b, var(--copper)); }

.property-chart-column strong,
.property-chart-column small {
  display: block;
  text-align: center;
}

.property-chart-column small,
.property-chart-legend,
.property-chart-empty {
  color: var(--muted);
}

.property-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
}

.property-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.property-chart-legend i {
  width: 22px;
  height: 4px;
  border-radius: 999px;
}

.property-chart-legend .green { background: var(--sage); }
.property-chart-legend .blue { background: #39a1f2; }
.property-chart-legend .warm { background: var(--copper); }

.property-chart-empty {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: 200px;
  font-weight: 800;
}

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

.property-form-panel {
  display: none;
}

.property-form-panel.is-open {
  display: block;
}

.property-form .wide-field,
.property-form button {
  grid-column: 1 / -1;
}

.property-list,
.property-mini-list,
.settlement-list {
  display: grid;
  gap: 10px;
}

.property-list {
  grid-template-columns: repeat(auto-fit, minmax(360px, 520px));
  align-items: stretch;
}

.property-card,
.property-empty,
.property-mini-list article,
.property-summary-line,
.property-paid-by span,
.property-forecast-row article,
.property-metrics article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .36);
  padding: 14px;
}

body.dark .property-card,
body.dark .property-empty,
body.dark .property-mini-list article,
body.dark .property-summary-line,
body.dark .property-paid-by span,
body.dark .property-forecast-row article,
body.dark .property-metrics article {
  background: rgba(255, 255, 255, .04);
}

.property-card {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  min-height: 300px;
  align-content: end;
  overflow: hidden;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 253, 245, .72), rgba(216, 243, 220, .46)),
    rgba(255, 255, 255, .36);
  background-position: center;
  background-size: cover;
  box-shadow: var(--soft-shadow);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}

.property-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -36px;
  width: 130px;
  height: 90px;
  border-radius: 999px 0 0 0;
  background: rgba(18, 72, 47, .08);
  transform: rotate(-8deg);
  pointer-events: none;
}

.property-card.has-image {
  color: #fff;
}

.property-card.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 18, 13, 0) 0%, rgba(9, 18, 13, .10) 42%, rgba(9, 18, 13, .50) 100%),
    radial-gradient(circle at 88% 92%, rgba(255, 255, 255, .18), transparent 30%);
  z-index: 0;
  pointer-events: none;
}

.property-card.has-image::after {
  background: rgba(255, 255, 255, .16);
}

.property-card:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 72, 47, .32);
  box-shadow: var(--shadow);
}

.property-card.active {
  border-color: rgba(18, 72, 47, .42);
}

.property-card > * {
  position: relative;
  z-index: 1;
}

.property-card strong {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .36);
}

.property-type-badge {
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(18, 72, 47, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .46);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.property-card.has-image .property-type-badge,
.property-card.has-image .property-card-metrics em,
.property-card.has-image b {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(8, 21, 15, .26);
  color: #fff;
  backdrop-filter: blur(8px);
}

.property-card.has-image small,
.property-card.has-image span,
.property-card.has-image em {
  color: rgba(255, 255, 255, .84);
}

.property-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.property-card-metrics em {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .28);
  padding: 10px;
  font-size: 14px;
  line-height: 1.25;
}

.property-card-metrics em span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.property-card b {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(18, 72, 47, .12);
  color: var(--emerald);
  padding: 7px 11px;
  font-size: 12px;
}

.property-card span,
.property-card small,
.property-card em,
.property-mini-list small,
.property-detail-head small,
.property-metrics span,
.property-forecast-row span,
.property-summary-line span {
  color: var(--muted);
}

.property-card em {
  font-style: normal;
  font-weight: 800;
}

.property-invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.property-invite-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .48);
  color: var(--text);
  padding: 10px 12px;
  font-size: 12px;
}

.property-invite-row a {
  text-decoration: none;
  display: inline-grid;
  min-height: 38px;
  place-items: center;
  padding: 0 12px;
}

.property-invite-prompt {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(10, 24, 18, .34);
  padding: 22px;
  backdrop-filter: blur(12px);
}

.property-invite-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(145deg, rgba(255, 253, 245, .88), rgba(216, 243, 220, .72)),
    var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 24px;
}

body.dark .property-invite-card {
  background:
    linear-gradient(145deg, rgba(18, 72, 47, .84), rgba(15, 23, 42, .92)),
    var(--surface-strong);
}

.property-invite-card h2 {
  margin: 4px 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.property-invite-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.property-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.property-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

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

.property-photo-editor {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .48), rgba(255, 255, 255, .14)),
    rgba(255, 255, 255, .30);
  padding: 14px;
}

.property-photo-preview {
  display: grid;
  min-height: 190px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 253, 245, .72), rgba(216, 243, 220, .46));
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.property-photo-preview span {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 18px;
  background: rgba(18, 72, 47, .12);
  color: var(--emerald);
  font-size: 34px;
}

.property-photo-preview.has-image span {
  display: none;
}

.property-photo-editor h4,
.property-photo-editor p {
  margin: 0 0 8px;
}

.property-photo-editor p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.property-upload-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.property-upload-submit {
  min-height: 44px;
  padding: 0 16px;
}

.property-upload-submit:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
  box-shadow: none;
}

.property-image-input {
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  padding: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .44);
}

.property-image-input::file-selector-button {
  min-height: 30px;
  margin-right: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--sage) 62%, var(--copper));
  color: #fffaf0;
  padding: 0 13px;
  font-weight: 900;
  cursor: pointer;
}

.property-selected-file {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.property-upload-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.property-detail-panel {
  display: none;
  margin-bottom: 16px;
}

.property-detail-panel.is-open {
  display: block;
}

.property-detail-head h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.property-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.property-metrics article,
.property-forecast-row article {
  display: grid;
  gap: 6px;
}

.property-metrics strong {
  font-size: 22px;
}

.property-forecast-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

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

.property-sections h4 {
  margin: 0 0 10px;
}

.compact-property-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.compact-property-form button {
  grid-column: 1 / -1;
}

.property-member-checks {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.property-member-checks legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.property-member-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.property-member-checks input {
  width: auto;
  min-height: auto;
  accent-color: var(--pig-strong);
}

.property-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.property-democracy-hero,
.property-account-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(18, 71, 52, .14);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(214, 240, 224, .72), rgba(255, 255, 255, .86)),
    rgba(255, 255, 255, .72);
  box-shadow: 0 18px 46px rgba(25, 66, 49, .1);
}

.property-democracy-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.property-democracy-hero h4,
.property-democracy-hero p {
  margin: 4px 0;
}

.property-democracy-hero strong {
  flex: 0 0 auto;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--forest);
}

.property-account-panel .property-mini-list article,
.property-proposal {
  align-items: flex-start;
}

.property-account-panel input.amount-input {
  max-width: 160px;
  text-align: right;
}

.property-proposal {
  gap: 14px;
}

.property-proposal.executed {
  border-color: rgba(41, 136, 86, .24);
  background: rgba(227, 244, 234, .72);
}

.property-proposal.rejected {
  border-color: rgba(190, 77, 77, .24);
  background: rgba(255, 238, 238, .72);
}

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

.property-settlement {
  margin-top: 18px;
}

.settlement-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.property-paid-by {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ghost-button.danger {
  border-color: rgba(207, 111, 133, .35);
  color: var(--rose);
}

/* Minimal product pass */
#dashboard .dashboard-kpi-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#dashboard.active {
  display: flex;
  flex-direction: column;
}

#dashboard .dashboard-studio-head { order: 1; }
#dashboard .safe-dashboard-summary { order: 2; }
#dashboard .dashboard-kpi-strip { order: 3; }
#dashboard .decision-strip { order: 4; }
#dashboard .guided-panel { order: 5; }
#dashboard .dashboard-main-chart { order: 6; }

#dashboard .studio-kpi.income,
#dashboard .studio-kpi.spend,
#dashboard .studio-kpi.fixed {
  display: none;
}

#dashboard .weekly-action-row,
#dashboard .goals-balance-row,
#dashboard .dashboard-grid.lower {
  display: none;
}

#dashboard .dashboard-main-chart,
#dashboard .dashboard-forecast,
#dashboard .projection-panel,
#dashboard .safe-dashboard-summary,
#dashboard .guided-panel {
  margin-bottom: 14px;
}

#dashboard .guided-panel {
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(160px, .8fr));
}

.property-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  margin: 16px 0 18px;
  padding: 6px;
  border: 1px solid rgba(18, 71, 52, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .48);
  scrollbar-width: thin;
}

.property-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}

.property-tabs button.active {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 10px 22px rgba(18, 71, 52, .16);
}

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

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

.property-action-grid button {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .34)),
    color-mix(in srgb, var(--panel) 84%, transparent);
  color: var(--text);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.property-action-grid button:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 72, 47, .28);
  box-shadow: 0 16px 34px rgba(16, 35, 28, .08);
}

.property-action-grid span,
.property-section-title span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.property-action-grid strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1;
}

.property-action-grid small {
  color: var(--muted);
  line-height: 1.4;
}

.property-section-card,
.property-settlement {
  border: 1px solid rgba(18, 71, 52, .12);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .22)),
    color-mix(in srgb, var(--panel) 88%, transparent);
  padding: 16px;
}

.property-section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.property-section-title h4 {
  margin: 4px 0 0;
}

.property-section-title small {
  color: var(--muted);
  font-weight: 800;
}

body.dark .property-action-grid button,
body.dark .property-section-card,
body.dark .property-settlement {
  background: rgba(255, 255, 255, .045);
}

.property-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.property-summary-strip article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
  padding: 16px;
  box-shadow: 0 14px 34px rgba(16, 35, 28, .06);
}

body.dark .property-summary-strip article {
  background: rgba(255, 255, 255, .05);
}

.property-summary-strip span {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.property-summary-strip strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1;
}

.property-sections {
  grid-template-columns: 1fr;
}

.subscription-price {
  justify-items: end;
}

.subscription-price .compact-icon {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.subscription-price input {
  display: none;
}

.subscription-price.editing input {
  display: block;
  margin-top: 6px;
}

.subscription-price.editing .compact-icon {
  opacity: .62;
}

@media (max-width: 980px) {
  .property-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .property-layout,
  .property-sections,
  .property-metrics,
  .property-list,
  .property-photo-editor {
    grid-template-columns: 1fr;
  }

  .property-democracy-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .property-form,
  .compact-property-form,
  .property-forecast-row,
  .property-portfolio-chart {
    grid-template-columns: 1fr;
  }

  .settlement-list article {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .property-card {
    min-height: 260px;
  }
}

@media (max-width: 560px) {
  .property-summary-strip {
    grid-template-columns: 1fr;
  }

  .property-action-grid {
    grid-template-columns: 1fr;
  }
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  transform: translateY(22px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    top: 12px;
    height: calc(100vh - 24px);
    margin: 0 0 0 12px;
    transform: translateX(-104%);
    width: min(292px, calc(100vw - 24px));
    transition: transform .28s var(--ease);
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .menu-toggle {
    display: grid;
  }

  .search {
    width: min(370px, 48vw);
  }

  .metric-grid,
  .dashboard-hero,
  .guided-panel,
  .dashboard-kpi-strip,
  .safe-dashboard-summary,
  .metric-grid.monthly-summary,
  .admin-grid,
  .future-grid,
  .forecast-grid,
  .budget-grid,
  .goal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .report-grid,
  .ai-grid,
  .ai-hero-panel,
  .admin-insight-grid,
  .settings-grid,
  .entry-layout,
  .guided-card.primary,
  .dashboard-studio-head,
  .debt-plan-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-studio-head {
    display: grid;
    align-items: start;
  }

  .guided-card.primary button,
  .guided-card.primary span,
  .guided-card.primary small {
    grid-column: 1;
    grid-row: auto;
  }

  .editable-account,
  .recurring-item,
  .admin-choice-row,
  .admin-row,
  .projection-row,
  .inline-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auth-screen {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .auth-visual {
    min-height: 430px;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 16px 12px 34px;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-actions,
  .filter-row {
    width: 100%;
  }

  .search {
    width: 100%;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .dashboard-hero h2 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .hero-actions .primary-button,
  .hero-actions .ghost-button {
    flex: 1 1 150px;
    justify-content: center;
  }

  .piggy-hero {
    min-height: 130px;
  }

  .balance-orb {
    border-radius: var(--radius);
  }

  .metric-grid,
  .dashboard-kpi-strip,
  .safe-dashboard-summary,
  .snapshot-grid,
  .report-summary-grid,
  .quick-amounts,
  .household-grid,
  .ai-report-grid,
  .ai-sim-result,
  .future-grid,
  .forecast-grid,
  .budget-grid,
  .goal-grid {
    grid-template-columns: 1fr;
  }

  .forecast-result {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .provider-picker {
    grid-template-columns: 1fr;
  }

  .onboarding-fields,
  .onboarding-choice-grid,
  .onboarding-choice-grid.compact,
  .onboarding-subscriptions {
    grid-template-columns: 1fr;
  }

  .onboarding-actions,
  .onboarding-actions > div {
    flex-direction: column;
  }

  .section-head,
  .page-head,
  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .account-row,
  .entry-row {
    align-items: flex-start;
  }

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

  .ai-card,
  .ai-budget-row,
  .ai-sim-controls label {
    grid-template-columns: 1fr;
  }
}

