:root {
  --ink:#142e32;
  --muted:#516865;
  --paper:#f5f5f1;
  --line:#d7e0d5;
  --deep:#173f44;
  --mint:#c4d5bb;
  --sea:#087269;
  --red:#9b403b;
  font-family:"DM Sans",Inter,system-ui,sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-size:16px;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,input,select,textarea {
  font:inherit;
}
button {
  cursor:pointer;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #3289b2;
  outline-offset:3px;
}
button {
  color:inherit;
}
h1,h2,h3,p {
  margin:0;
}
h1,h2,h3 {
  line-height:1.12;
  letter-spacing:-.045em;
}
h1 {
  font-size:clamp(2rem,4.5vw,3.65rem);
  font-weight:600;
}
h2 {
  font-size:1.42rem;
}
p,.sub {
  line-height:1.55;
}
.sub,small {
  color:var(--muted);
}
small {
  font-size:.83rem;
}
.brand {
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:740;
  font-size:1.8rem;
  letter-spacing:-.075em;
}
.brand img {
  width:40px;
  height:40px;
}
.shell {
  display:grid;
  grid-template-columns:234px minmax(0,1fr);
  min-height:100svh;
}
.side {
  background:var(--deep);
  color:#f3f9ec;
  padding:34px 19px;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100svh;
}
.side .brand {
  padding:0 10px 40px;
}
.side nav {
  display:grid;
  gap:4px;
}
.nav,.exit {
  display:flex;
  align-items:center;
  gap:13px;
  background:none;
  border:0;
  text-align:left;
  font-size:.94rem;
  padding:12px 14px;
  border-radius:9px;
  color:#d4e4dc;
}
.nav svg,.exit svg,.ico svg {
  width:20px;
  height:20px;
  flex-shrink:0;
}
.nav.active {
  background:#cee0cd;
  color:#173d34;
  font-weight:650;
}
.nav:hover:not(.active),.exit:hover {
  background:#164c49;
}
.exit {
  margin-top:auto;
}
.content {
  width:100%;
  max-width:1500px;
  padding:32px clamp(18px,4vw,62px) 60px;
  margin:auto;
  align-self:start;
}
.top,.head,.row,.tools,.section-head,.kicker,.card-head {
  display:flex;
  align-items:center;
  gap:12px;
}
.top,.head,.section-head,.card-head {
  justify-content:space-between;
}
.top {
  border-bottom:1px solid var(--line);
  padding-bottom:20px;
  color:var(--muted);
  font-size:.9rem;
}
.avatar {
  display:grid;
  place-items:center;
  width:33px;
  height:33px;
  border-radius:50%;
  background:#dce7d7;
  color:var(--deep);
  font-weight:700;
}
.head {
  margin:30px 0 22px;
  flex-wrap:wrap;
}
.head .sub {
  margin-top:8px;
}
.btn,.iconbtn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:white;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 15px;
  font-weight:600;
  font-size:.91rem;
}
.btn.primary {
  background:var(--deep);
  color:white;
  border-color:var(--deep);
}
.btn.accent {
  background:var(--mint);
  border-color:var(--mint);
  color:var(--deep);
}
button:disabled {
  opacity:.6;
  cursor:wait;
}
.btn:hover {
  filter:brightness(.96);
}
.iconbtn {
  padding:7px 10px;
}
.grid {
  display:grid;
  gap:16px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.stats {
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr;
  gap:14px;
  margin-bottom:16px;
}
.panel,.stat,.list {
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  padding:23px;
  min-width:0;
}
.stat {
  display:grid;
  gap:13px;
  align-content:space-between;
}
.stat strong {
  font-size:clamp(1.5rem,2.55vw,2.65rem);
  letter-spacing:-.065em;
}
.stat.hero,.ocean {
  position:relative;
  overflow:hidden;
  background:var(--deep);
  color:white;
}
.stat.hero small,.ocean .sub {
  color:#c5d9ce;
}
.stat.hero:after,.poster:after {
  content:"";
  position:absolute;
  width:85%;
  height:190%;
  right:-48%;
  top:-25%;
  border-radius:50%;
  background:repeating-radial-gradient(ellipse at 65% 48%,transparent 0 9px,#91d7a244 10px 11px,transparent 12px 17px);
  transform:rotate(-25deg);
  pointer-events:none;
}
.stat>* {
  position:relative;
  z-index:1;
}
.metric-label {
  font-size:.92rem;
  font-weight:600;
}
.pill {
  display:inline-flex;
  align-items:center;
  border:1px solid var(--line);
  border-radius:20px;
  padding:4px 9px;
  font-size:.8rem;
  font-weight:650;
  white-space:nowrap;
  background:#eef4e9;
}
.empty {
  padding:20px 0 4px;
}
.empty p {
  margin-bottom:14px;
}
.kicker {
  font-size:.8rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  font-weight:700;
  color:var(--sea);
}
.section-head {
  margin:0 0 16px;
}
.section-head small {
  text-align:right;
}
.chart {
  width:100%;
  height:142px;
  display:block;
  margin:14px 0 6px;
}
.axis {
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:.8rem;
}
.tools {
  flex-wrap:wrap;
}
.panel+.list,.grid+.list,.grid+.panel,.stats+.list {
  margin-top:16px;
}
.entries {
  display:grid;
  gap:0;
}
.entry {
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 0;
  border-bottom:1px solid var(--line);
}
.entry:last-child {
  border:0;
}
.entry .main {
  flex:1;
  min-width:0;
}
.entry .main strong,.entry .main small {
  display:block;
  overflow-wrap:anywhere;
}
.entry .main small {
  margin-top:3px;
}
.entry .value {
  font-variant-numeric:tabular-nums;
  font-weight:650;
  white-space:nowrap;
}
.pos {
  color:#176653;
}
.neg {
  color:var(--red);
}
.ico {
  width:37px;
  height:37px;
  display:grid;
  place-items:center;
  background:#e8efe4;
  border-radius:12px;
  flex-shrink:0;
}
.panel strong.big {
  font-size:1.7rem;
  letter-spacing:-.05em;
}
.meter {
  height:7px;
  border-radius:10px;
  background:#e6ebe2;
  overflow:hidden;
  margin:12px 0;
}
.meter progress,progress {
  width:100%;
  height:8px;
  accent-color:#26877a;
}
.labels {
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.list-item {
  margin-top:15px;
}
.list-item progress {
  margin:6px 0;
}
.hint {
  background:#e8f0df;
  border-radius:10px;
  padding:11px 14px;
  color:#334c3b;
  font-size:.91rem;
  line-height:1.5;
}
.login {
  min-height:100svh;
  display:grid;
  grid-template-columns:1.12fr 1fr;
  background:#fbfcf7;
}
.poster {
  padding:clamp(28px,5.6vw,90px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:510px;
  background:#173f44;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  color:white;
}
.poster:after {
  width:125%;
  height:125%;
  right:-53%;
  top:28%;
  z-index:-1;
  background:repeating-radial-gradient(ellipse at center,transparent 0 13px,#b5e7a145 14px 15px,transparent 16px 24px);
}
.poster h1 {
  max-width:11ch;
  font-size:clamp(3.1rem,6.6vw,7rem);
  letter-spacing:-.075em;
  line-height:.98;
}
.poster h1 em {
  font-family:Georgia,serif;
  color:var(--mint);
  font-weight:400;
}
.poster p {
  margin-top:22px;
  max-width:35ch;
  color:#d1e4d9;
}
.loginbox {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:35px;
}
.loginbox>div {
  width:100%;
  max-width:370px;
}
.loginbox h2 {
  font-size:2.5rem;
  margin:16px 0 8px;
}
.loginbox form {
  margin-top:30px;
}
.loginbox button {
  width:100%;
}
label {
  display:grid;
  gap:7px;
  font-size:.92rem;
  font-weight:600;
}
input,select,textarea {
  background:white;
  color:var(--ink);
  border:1px solid #b8c9bd;
  padding:10px 12px;
  min-width:0;
  max-width:100%;
  border-radius:8px;
}
textarea {
  min-height:90px;
  resize:vertical;
}
input[type=checkbox] {
  width:18px;
  height:18px;
  accent-color:var(--sea);
}
dialog {
  border:0;
  border-radius:18px;
  color:var(--ink);
  padding:24px;
  width:min(620px,95vw);
  max-height:90svh;
  box-shadow:0 25px 75px #102a2933;
}
dialog.wide {
  width:min(1100px,96vw);
}
dialog::backdrop {
  background:#122e308f;
}
.form {
  display:grid;
  gap:16px;
}
.two {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.form .tools {
  justify-content:flex-end;
}
.error {
  color:var(--red);
  line-height:1.4;
}
.error:empty {
  display:none;
}
#notice {
  position:fixed;
  bottom:15px;
  left:50%;
  transform:translateX(-50%);
  background:var(--deep);
  color:white;
  border-radius:12px;
  padding:12px 20px;
  z-index:5;
  max-width:94vw;
}
#notice:empty {
  display:none;
}
.table-scroll {
  overflow:auto;
  max-height:48vh;
}
table {
  border-collapse:collapse;
  width:100%;
  font-size:.9rem;
}
td,th {
  text-align:left;
  padding:7px;
  border-bottom:1px solid var(--line);
}
td input,td select {
  min-width:105px;
  width:100%;
}
td input[type=checkbox] {
  min-width:18px;
}
.safe {
  font-size:.85rem;
  color:var(--muted);
}
.thread {
  display:grid;
  gap:12px;
  margin:15px 0;
}
.bubble {
  padding:15px;
  background:#edf3e7;
  border-radius:12px;
  white-space:pre-line;
}
.bubble.me {
  background:#e3efed;
  margin-left:18%;
}
.bubble small {
  display:block;
  margin-bottom:4px;
}
.coach {
  display:grid;
  gap:10px;
}
.page {
  animation:appear .22s ease-out;
}
@keyframes appear {
  from {
    opacity:.3;
    transform:translateY(4px);
  }
  to {
    opacity:1;
    transform:none;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    animation:none!important;
    scroll-behavior:auto!important;
  }
}
@media(max-width:1000px) {
  .shell {
    grid-template-columns:185px minmax(0,1fr);
  }
  .side {
    padding:24px 10px;
  }
  .grid {
    grid-template-columns:1fr;
  }
  .stats {
    gap:8px;
  }
  .stat {
    padding:15px;
  }
}
@media(max-width:730px) {
  .shell {
    display:block;
  }
  .side {
    height:auto;
    position:static;
    padding:12px 15px;
    display:grid;
    grid-template-columns:1fr auto;
  }
  .side .brand {
    padding:0;
    font-size:1.6rem;
  }
  .brand img {
    width:33px;
    height:33px;
  }
  .side nav {
    grid-column:1/-1;
    display:flex;
    overflow:auto;
    grid-row:2;
    margin-top:8px;
  }
  .nav {
    white-space:nowrap;
    padding:8px 10px;
    font-size:.85rem;
  }
  .nav svg {
    display:none;
  }
  .exit {
    grid-column:2;
    grid-row:1;
    margin:0;
    padding:8px;
  }
  .content {
    padding:18px 14px 40px;
  }
  .top {
    padding-bottom:10px;
  }
  .head {
    margin:18px 0;
  }
  .stats {
    grid-template-columns:1fr 1fr;
  }
  .stat.hero {
    grid-column:1/-1;
  }
  .panel,.list {
    padding:16px;
  }
  .login {
    grid-template-columns:1fr;
  }
  .poster {
    min-height:280px;
    gap:25px;
    padding:24px;
  }
  .poster h1 {
    max-width:15ch;
    font-size:3.15rem;
  }
  .poster p {
    margin-top:10px;
  }
  .loginbox {
    padding:28px 22px 48px;
  }
  .two {
    grid-template-columns:1fr;
  }
  .entry {
    flex-wrap:wrap;
  }
  .entry .main {
    min-width:90px;
  }
  .tools {
    gap:6px;
  }
  .section-head {
    flex-wrap:wrap;
  }
}
.coach-settings { margin-top: 18px; padding: 12px 15px; background: var(--paper); border-radius: 10px; }
.coach-settings summary { cursor: pointer; font-weight: 600; }
.coach-settings form { margin-top: 14px; }

.brand img { background:#f4f4ec; border-radius:10px; padding:4px; }
.stat:nth-child(3) { background:#f4eef2; border-color:#dfd2dc; }
.stat:nth-child(3) .metric-label { color:#6c4e62; }
.coach-settings { border:1px solid #d9ced8; background:#f6f1f5; }
.section-head .btn { flex-shrink:0; }
.demo-summary { gap:16px; margin-bottom:18px; }
.goal-title { display:flex; gap:.75rem; align-items:center; justify-content:space-between; }
@media (max-width:730px) {
  .demo-summary { align-items:flex-start; }
  .side nav { scrollbar-width:thin; scrollbar-color:#96ada8 transparent; }
  .nav,.btn,.exit { min-height:44px; }
  .head .tools { width:100%; }
  .head .tools label { flex:1; }
  .head .tools input { width:100%; }
}

/* Les longues listes restent lisibles même sur un écran de faible hauteur. */
.side { overflow-y:auto; }
.content { margin:0 auto; }
.nav,.exit,.btn { min-height:44px; }
.brand img { width:46px; height:46px; padding:2px; }
.loginbox #forgot { margin-top:10px; background:transparent; color:var(--sea); }
.stat strong,.value,.list-summary { font-variant-numeric:tabular-nums; }
.list-summary { margin:14px 0; padding:10px 14px; border-left:3px solid var(--sea); background:#eff4ee; }
.list+.list,.list+.panel,.demo-summary,.prompts { margin-top:18px; }
.goal-percent { display:block; margin-top:6px; }
.prompts { margin-bottom:16px; }
.panel,.hint,.bubble,.stat,.list,.demo-summary { overflow-wrap:anywhere; }
dialog { max-height:calc(100dvh - 24px); overflow:auto; }
@media(max-width:730px) {
  .side { grid-template-columns:minmax(0,1fr) auto; }
  .side nav { min-width:0; max-width:100%; }
  .content,.entry .main,.tools>* { min-width:0; }
  .poster { min-height:0; gap:20px; }
  .poster h1 { font-size:clamp(2rem,9vw,3rem); }
  .head .tools { display:flex; flex-wrap:wrap; }
  .head .tools label { flex:1 1 9rem; }
  .demo-summary .btn { flex-shrink:1; }
  .entry { display:grid; grid-template-columns:2rem minmax(0,1fr) auto; gap:6px 9px; }
  .entry .ico { width:2rem; height:2rem; }
  .entry .btn { grid-column:2/-1; justify-self:end; }
  .entry .main { min-width:0; }
  .entry .value { white-space:normal; text-align:end; }
  #filter label { flex:1 1 9rem; }
  .two>* { min-width:0; }
}
.budget-check { display:flex; align-items:center; }
#confirm th:last-child { min-width:10rem; }
#confirm [name=treatment] { min-width:10rem; }

/* Espacement commun à tous les écrans du budget. */
:root {
  --section-gap: clamp(18px, 2.8vw, 34px);
  --card-gap: clamp(14px, 2vw, 24px);
  --surface: #fffefa;
  --motion-curve: cubic-bezier(.2,.72,.25,1);
}
.content { padding-block:clamp(22px, 4vw, 60px) 64px; }
.page { display:grid; gap:var(--section-gap); min-width:0; animation:none; }
.page > :is(.head,.stats,.grid,.panel,.list) { margin:0; min-width:0; }
.page .head {
  padding-block:8px 22px;
  border-bottom:1px solid var(--line);
  gap:20px;
  align-items:end;
}
.page h1 { font-size:clamp(2.25rem, 4.4vw, 4.25rem); line-height:1.04; }
.page h1:focus { outline:none; }
.head .page-actions { gap:10px; }
.page .stats,.page > .grid { gap:var(--card-gap); }
.page .grid > .panel { margin:0; }
.panel,.list,.stat { padding:clamp(16px, 2.4vw, 28px); background:var(--surface); }
.panel > h2 + .sub,.list > h2 + .sub { margin-top:9px; }
.panel > .sub + .btn { margin-top:16px; }
.stat { border-radius:14px; }
.stat.hero { min-height:164px; background:#173f44; }
.stat:not(.hero) .metric-label { color:#49625e; }
.stat:nth-child(3) .metric-label { color:#6c4e62; }
.demo-summary { background:#edf2ea; border-style:dashed; }
.entry:last-child { padding-bottom:6px; }
.btn,.nav,.exit { transition: background-color .18s var(--motion-curve), color .18s var(--motion-curve), border-color .18s var(--motion-curve); }
.btn:active { filter:brightness(.92); }
dialog[open] { animation: dialog-in .23s var(--motion-curve) both; }
dialog[open]::backdrop { animation: backdrop-in .2s ease-out both; }
@keyframes dialog-in {
  from { opacity:.55; transform:translateY(8px) scale(.99); }
  to { opacity:1; transform:none; }
}
@keyframes backdrop-in { from { opacity:0; } to { opacity:1; } }
@media (prefers-reduced-motion:no-preference) {
  .page .head { animation: page-in .24s var(--motion-curve) both; }
  @keyframes page-in { from { opacity:.65; translate:0 6px; } to { opacity:1; translate:none; } }
  @supports (animation-timeline:view()) {
    .page > .grid,.page > .list,.page > .panel {
      animation: section-in linear both;
      animation-timeline:view();
      animation-range:entry 0% entry 38%;
    }
    @keyframes section-in {
      from { opacity:.75; translate:0 10px; }
      to { opacity:1; translate:none; }
    }
  }
}
@media (prefers-reduced-motion:reduce) {
  .btn,.nav,.exit { transition:none; }
  dialog[open]::backdrop { animation:none; }
}
.import-field-label { display:none; }
@media (max-width:730px) {
  .side { position:sticky; z-index:3; top:0; overflow:visible; border-bottom:1px solid #285554; }
  .side nav { padding-bottom:4px; overscroll-behavior-inline:contain; }
  .nav { flex-shrink:0; }
  .content { padding-inline:clamp(14px, 4vw, 24px); }
  .page .head { align-items:start; }
  .head .page-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-actions label { grid-column:1/-1; }
  .page-actions .btn:only-child { grid-column:1/-1; }
  .stat.hero { min-height:130px; }
  #confirm .table-scroll { overflow:visible; max-height:none; }
  .import-table,.import-table tbody { display:block; min-width:0; }
  .import-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .import-table tr {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px 12px;
    margin-bottom:14px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:var(--surface);
  }
  .import-table td { display:block; border:0; padding:0; min-width:0; }
  #confirm .import-table :is(input:not([type=checkbox]), select) { width:100%; min-width:0; }
  .import-table :is(.import-selection,.import-description,.import-category,.import-review,.import-treatment) { grid-column:1/-1; }
  .import-table .import-selection { display:flex; justify-content:space-between; align-items:center; }
  .import-selection input { width:24px; height:24px; }
  .import-field-label { display:block; margin-bottom:5px; color:var(--muted); font-size:.82rem; font-weight:650; }
  .import-review { color:var(--muted); }
}

.financial-facts { display:grid; gap:9px; margin:16px 0 18px; }
.financial-facts > div {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  padding:8px 0;
  border-bottom:1px solid var(--line);
}
.financial-facts dt { color:var(--muted); }
.financial-facts dd { margin:0; text-align:right; font-weight:650; font-variant-numeric:tabular-nums; }
.account-card .card-head { align-items:flex-start; margin-bottom:13px; }
.account-card .card-head h2 { padding-block:3px; }
.account-card > small { display:block; margin-top:5px; }
.account-card > .btn { margin:4px 6px 4px 0; }
.account-alert { margin:8px 0; padding:9px 12px; background:#f8eae7; color:#852e2e; border-radius:8px; }
.account-overview { display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.account-overview > div { flex:1 1 16rem; }
.account-overview h2 + .sub { margin-top:6px; }
#dialog-title:focus { outline:none; }
.nav.active { box-shadow:inset 3px 0 0 #38745d; }
@media (max-width:730px) {
  html { scroll-padding-top:130px; }
  .nav.active { box-shadow:inset 0 -3px 0 #38745d; }
  .nav:focus-visible { outline-offset:-3px; }
  .form :is(input,select,textarea) { font-size:16px; }
  .page-actions :is(button,input) { min-height:44px; }
}

.import-file-info { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; }
.import-file-info p,.import-results li { overflow-wrap:anywhere; }
.import-results { margin:0 0 18px; padding:0; list-style:none; }
.import-results li { display:grid; gap:4px; padding:12px 0; border-bottom:1px solid var(--line); }
.import-results span { color:var(--muted); }
#import-status:empty { display:none; }

#confirm tr[hidden], #confirm [hidden] { display:none; }
.import-overview { display:grid; gap:10px; }
.import-overview p, .removal-list-head p { margin:0; }
.import-overview details { color:var(--muted); font-size:.88rem; }
.import-overview details p { margin-top:8px; }
.check-inline {
  display:flex;
  align-items:center;
  gap:9px;
  min-height:36px;
}
.import-footer {
  position:sticky;
  bottom:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px 16px;
  padding:12px 0 4px;
  border-top:1px solid var(--line);
  background:white;
}
.import-footer output { color:var(--muted); font-size:.88rem; }
.import-footer .error { flex-basis:100%; margin:0; }
.removal-list-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:8px;
}
.removal-list { margin:0; padding:0; list-style:none; }
.removal-list li { border-top:1px solid var(--line); }
.removal-list label {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:12px 0;
  cursor:pointer;
}
.removal-list strong, .removal-list small { display:block; overflow-wrap:anywhere; }
.removal-list small { margin-top:4px; color:var(--muted); }
@media (max-width:540px) {
  .import-footer .primary { width:100%; }
  .import-filters { grid-template-columns:minmax(0,1fr); }
  .removal-list .amount { grid-column:2; }
}

/* Financial overview and banking controls */
:root {
  --ink:#222b31;
  --muted:#525c63;
  --paper:#f1ece4;
  --line:#dfd6ca;
  --deep:#202a32;
  --sea:#275c4e;
  --red:#963d2b;
}
.side { color:#f8f1e8; }
.nav.active { color:#fff6e9; background:#34444e; box-shadow:inset 3px 0 0 #d9aa76; }
.nav:hover:not(.active),.exit:hover { background:#2d3b44; color:#fff6e9; }
.side .brand { letter-spacing:-.045em; }
.page h1 { font:500 clamp(2.1rem,4.5vw,3.7rem)/1.04 Georgia,serif; letter-spacing:-.045em; }
.page h2 { letter-spacing:-.035em; }
.panel,.list { background:#fffdf9; border-color:var(--line); }
.btn.primary { color:#fffdf9; background:#243d38; border-color:#243d38; }
.btn.primary:hover { background:#32584e; border-color:#32584e; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline-color:#8a542c;
}
.side button:focus-visible { outline-color:#ffd494; }
.poster { color:#fff6e9; background:#202a32; }
.poster em { color:#f2bc89; }
.dash-metrics { display:grid; grid-template-columns:1.36fr repeat(3,minmax(0,1fr)); gap:12px; }
.dash-metric {
  display:grid; align-content:start; gap:10px; padding:20px;
  border:1px solid var(--line); border-radius:12px; background:#fffdf9;
  min-width:0; overflow-wrap:anywhere;
}
.dash-metric > span { font-weight:670; font-size:.92rem; }
.dash-metric > strong {
  font:500 clamp(1.42rem,2.65vw,2.65rem)/1.05 Georgia,serif;
  letter-spacing:-.047em; font-variant-numeric:tabular-nums;
}
.dash-total { background:#26353d; color:#fff7ed; border-color:#26353d; }
.dash-total small { color:#e4d9c7; }
.dash-chip {
  display:inline-block; font-size:.76rem; font-weight:670; line-height:1.35;
  padding:4px 8px; border-radius:5px; color:#664529; background:#f8ebda;
}
.dash-split { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(0,1fr); gap:16px; }
.dash-account-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%, 230px),1fr)); gap:12px; }
.dash-account {
  display:grid; align-content:start; gap:10px; min-width:0; padding:14px 15px;
  border:1px solid var(--line); border-radius:10px; background:#fbf7f0;
}
.dash-account-head { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.dash-account-head h3 { flex:1 1 110px; min-width:0; overflow-wrap:anywhere; font-size:1.02rem; }
.dash-account-head .ico { color:#275c4e; background:#e8eee4; }
.dash-account .account-amount { font:500 1.84rem/1.1 Georgia,serif; overflow-wrap:anywhere; }
.dash-account p,.bank-balance { display:flex; flex-wrap:wrap; gap:5px 10px; justify-content:space-between; font-size:.84rem; }
.dash-account p span,.bank-balance span { color:var(--muted); }
.bank-balance { padding:.5em 0; border-block:1px solid var(--line); }
.bank-balance strong { white-space:nowrap; }
.dash-forecast .section-head,.dash-spending .section-head { align-items:flex-start; }
.forecast-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.forecast-facts div { display:grid; gap:4px; }
.forecast-facts strong { font-size:clamp(1rem,2.1vw,1.55rem); overflow-wrap:anywhere; }
.forecast-facts span { color:var(--muted); font-size:.78rem; }
.forecast-plot { display:block; width:100%; height:168px; margin-top:5px; }
.chart-grid { fill:none; stroke:#ddd4c9; }
.chart-fill { fill:#e5eee6; }
.chart-zero { stroke:#80796e; stroke-dasharray:4 5; }
.chart-curve { fill:none; stroke:#285d4f; stroke-width:2.5; }
.chart-low { fill:#ae522f; stroke:#fff; stroke-width:2; }
.dash-spending progress,.dash-goals progress { background:#e9e0d4; border-radius:2px; height:7px; }
.dash-spending progress::-webkit-progress-bar,.dash-goals progress::-webkit-progress-bar { background:#e9e0d4; }
.dash-spending progress::-webkit-progress-value { background:#a55536; }
.dash-spending progress::-moz-progress-bar { background:#a55536; }
.dash-goals progress::-webkit-progress-value { background:#386858; }
.dash-goals progress::-moz-progress-bar { background:#386858; }
.dash-spending .list-item,.dash-goals .list-item { margin-top:12px; }
.dash-goals .labels { gap:12px; }
.dash-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:0 0 16px; }
.dash-facts dt { color:var(--muted); font-size:.85rem; }
.dash-facts dd { margin:5px 0 0; font-size:1.05rem; font-weight:700; }
.dash-upcoming { margin:0; padding:0; list-style:none; }
.dash-upcoming li { display:grid; align-items:start; grid-template-columns:4.3rem minmax(0,1fr) auto; gap:8px; border-top:1px solid var(--line); padding:9px 0; font-size:.86rem; }
.dash-upcoming time { color:var(--muted); }
.dash-upcoming span { overflow-wrap:anywhere; }
.bank-intro { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.bank-intro .sub { margin-top:5px; }
#bank-accounts { display:grid; gap:16px; }
#bank-accounts > .empty { border:1px dashed var(--line); border-radius:10px; }
.bank-group .dash-account .tools { margin:0; }

@media(max-width:1100px) {
  .dash-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:960px) {
  .dash-split { grid-template-columns:1fr; }
}
@media(max-width:720px) {
  .nav.active { box-shadow:inset 0 -3px 0 #d9aa76; }
}
@media(max-width:480px) {
  .dash-metrics { gap:8px; }
  .dash-metric { padding:12px; gap:7px; }
  .dash-metric > span { font-size:.79rem; }
  .dash-metric > strong { font-size:1.27rem; }
  .dash-account-grid { grid-template-columns:1fr; }
  .dash-upcoming li { grid-template-columns:3.5rem minmax(0,1fr) auto; }
}

.bank-notice { display:grid; gap:20px; max-width:780px; margin:auto; padding:30px 18px 60px; }
.bank-notice .brand { color:var(--ink); text-decoration:none; justify-self:start; }
.bank-notice h1 { font:500 clamp(2rem,5vw,3.2rem)/1.1 Georgia,serif; }
.bank-notice .panel { display:grid; gap:12px; }
.bank-notice .panel p { max-width:68ch; }
