/* Final layout pass: keep financial blocks on a deliberate 24px rhythm. */
.metric.mint b { color: #258369; }

/* The 24-hour movement sits beside profit as a compact market ticker. */
.profit-card { position: relative; }
.profit-delta { position: absolute; top: 25px; right: 27px; display: grid; grid-template-columns: 22px auto auto; align-items: center; justify-content: start; gap: 7px; color: #c9f45c; text-align: right; }
.profit-delta i { display: grid; place-items: center; width: 20px; height: 20px; color: #c9f45c; font: 700 21px Georgia, serif; }
.profit-delta span { font: 700 9px Manrope, sans-serif; text-transform: uppercase; letter-spacing: .08em; opacity: .82; }
.profit-delta b { font: 700 14px 'DM Mono', monospace; }
.profit-delta small { grid-column: 2 / -1; font: 700 8px Manrope, sans-serif; opacity: .68; }
.profit-delta.down { color: #f3b2a1; }
.profit-delta.down i { color: #f3b2a1; }

/* Reports are a sequence of cards, not one long uninterrupted document. */
.report {
  max-width: 820px;
  margin: 0;
  padding: 30px 34px;
}
.api-month {
  margin-top: 24px;
}
.expense-list {
  max-width: 820px;
  margin-top: 28px;
  padding: 27px 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.expense-list + .expense-list { margin-top: 20px; }
.expense-list .section-title { margin-bottom: 5px; }
.expense-list .section-title h2 { font: 700 27px 'Playfair Display'; }
.expense-list > .subhead { margin: 8px 0 0; }

/* Wallet actions are intentional controls, never browser-default buttons. */
.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}
.secondary,
.wallet-action {
  appearance: none;
  border: 1px solid #cad1c8;
  border-radius: 8px;
  background: #fbfaf6;
  color: #28352e;
  min-height: 38px;
  padding: 0 14px;
  font: 700 11px Manrope, sans-serif;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.secondary:hover,
.wallet-action:hover {
  background: #e7f1e9;
  border-color: #6fa88d;
  transform: translateY(-1px);
}
.wallet-action {
  min-height: 26px;
  padding: 0 8px;
  border-color: #ffffff58;
  background: #ffffff12;
  color: #fff;
  font-size: 9px;
}
.wallet-action:hover { background: #ffffff25; border-color: #fff; }

/* The two settlement directions are equally visible and never collide. */
.table-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.settle {
  appearance: none;
  min-height: 32px;
  border: 1px solid #dfc78d;
  border-radius: 7px;
  background: #fffdf8;
  color: #8b631b;
  padding: 0 10px;
  font: 700 10px Manrope, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.settle:hover { background: #fff3d7; border-color: #c99837; }
.settle.complete { border-color: #9dceae; background: #eef8f0; color: #286b4c; }
.settle.delete { border-color: #e2b6ad; color: #a34e42; }
.settle.delete:hover { background: #fff0ed; border-color: #ce7565; }

.api-stats { margin-bottom: 24px; }

/* One clear, reversible-looking callout for moving legacy browser data into the ledger. */
.migration-note {
  max-width: 980px;
  margin: 0 0 22px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #d8c27d;
  border-radius: 12px;
  background: #fff9e6;
}
.migration-note > div { display: grid; gap: 3px; }
.migration-note .eyebrow { color: #876b27; margin: 0; }
.migration-note b { font-size: 13px; }
.migration-note span { color: var(--muted); font-size: 10px; }
.wallet-history { max-width: 980px; margin-top: 28px; padding: 27px 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.wallet-history .section-title { margin-bottom: 12px; }
.wallet-history .section-title h2 { margin: 0; font: 700 27px 'Playfair Display'; }
.wallet-history-row { display: flex; align-items: center; gap: 12px; min-height: 58px; border-top: 1px solid var(--line); }
.wallet-history-row > div { display: grid; gap: 3px; flex: 1; }
.wallet-history-row b { font-size: 12px; }
.wallet-history-row small { max-width: 650px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.wallet-history-row > strong { font: 500 13px 'DM Mono'; }
.wallet-history-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 800; }
.wallet-history-mark.in { background: #e5f3e9; color: #2d7758; }
.wallet-history-mark.out { background: #fff0d7; color: #9e6a18; }
@media (max-width: 600px) { .migration-note { align-items: stretch; flex-direction: column; } }

@media (max-width: 950px) {
  .report, .expense-list { max-width: none; }
  .table-row > div:last-child { grid-column: 1 / -1; padding-top: 4px; }
}
@media (max-width: 600px) {
  .report { padding: 24px 20px; }
  .expense-list { padding: 23px 20px; margin-top: 22px; }
  .wallet-actions { display: grid; grid-template-columns: 1fr; }
  .secondary { width: 100%; justify-content: center; }
  .settle { flex: 1 1 auto; }
  .profit-delta { position: static; margin: 10px 0 12px; justify-content: start; text-align: left; }
}

.journal-toolbar {
  max-width: 980px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 18px;
}
.journal-toolbar h2 { margin: 0; font: 700 29px 'Playfair Display'; }
.journal-list {
  max-width: 980px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.journal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}
.journal-row:last-child { border-bottom: 0; }
.journal-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #e5f3e9; color: #2d7758; font-size: 16px; }
.journal-mark.out { background: #fff0d7; color: #9e6a18; }
.journal-copy { display: grid; gap: 4px; flex: 1; }
.journal-copy b { font-size: 12px; }
.journal-copy span { color: var(--muted); font-size: 10px; }
.journal-amount { text-align: right; font: 500 14px 'DM Mono'; }
.journal-amount small { display: block; margin-top: 3px; color: var(--muted); font: 9px Manrope; }
.journal-empty { display: grid; gap: 5px; min-height: 170px; place-content: center; text-align: center; color: var(--muted); font-size: 11px; }
.journal-empty b { color: var(--ink); font-size: 13px; }
.modal.compact { width: min(560px, 100%); }
.report-period { max-width: 820px; display: flex; gap: 10px; align-items: center; margin: 0 0 12px; }
.report-period span { color: var(--muted); font: 10px 'DM Mono'; letter-spacing: 1px; }
.report-period select { appearance: none; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); padding: 8px 29px 8px 11px; color: var(--ink); font: 700 11px Manrope; }
@media (max-width: 600px) { .journal-toolbar { align-items: start; gap: 14px; flex-direction: column; } .journal-row { padding: 14px; } }
.portfolio-return{position:fixed;right:20px;bottom:20px;z-index:99;border:1px solid #203b4a;border-radius:999px;background:#17394e;color:#fff;padding:11px 15px;font:700 10px 'DM Mono',monospace;letter-spacing:.04em;text-decoration:none;box-shadow:0 10px 28px rgba(13,35,48,.22)}.portfolio-return:hover{background:#2b607a;transform:translateY(-2px)}
