:root {
  --green: #0b5d3b;
  --green-dark: #08482e;
  --green-light: #e6f4ec;
  --ink: #1a1a1a;
  --muted: #666;
  --border: #ddd;
  --bg: #f6f6f4;
  --card: #fff;
  --red: #b3261e;
  --red-bg: #fdecea;
  --ok: #0b5d3b;
  --ok-bg: #e6f4ec;
  --amber: #8a6d00;
  --amber-bg: #fff4cc;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
#app { max-width: 480px; margin: 0 auto; padding: 0 14px 96px; }
/* Fixed bottom navigation, matching the Muse wallet app: HOME / ACTIVITY / PEOPLE */
.bottomnav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 480px;
  display: flex; background: #fff; border-top: 1px solid var(--border);
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); z-index: 10;
}
.nav-btn {
  flex: 1; padding: 10px 4px; border: none; background: transparent;
  font-size: 0.95rem; font-weight: 700; cursor: pointer; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.nav-btn.active { color: var(--green); }
.nav-panel h2 { margin-top: 18px; }
h1 { font-size: 1.4rem; margin: 18px 0 4px; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 8px;
}
.brand { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--green); color: #fff; font-weight: 800;
}
.test-banner {
  background: #fff4cc; color: #5c4700; border: 1px solid #e8d27a;
  border-radius: 8px; padding: 8px 10px; font-size: 0.85rem; font-weight: 600;
  text-align: center; margin: 4px 0 12px;
}
.view.hidden, .hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error {
  background: var(--red-bg); color: var(--red);
  border-radius: 8px; padding: 9px 10px; font-size: 0.9rem; margin: 10px 0;
}
.ok {
  background: var(--ok-bg); color: var(--ok);
  border-radius: 8px; padding: 9px 10px; font-size: 0.9rem; margin: 10px 0;
}

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin: 12px 0;
}
label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; }
input, select {
  display: block; width: 100%; margin-top: 4px; padding: 11px 10px;
  font-size: 1rem; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--green); outline-offset: 1px; }

.btn {
  display: inline-block; padding: 12px 18px; border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 700; cursor: pointer; background: var(--green); color: #fff;
}
.btn:active { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green); padding: 8px 10px; }
.btn-small { padding: 7px 12px; font-size: 0.85rem; }
.btn-secondary { background: #eee; color: var(--ink); }
form .btn-primary { width: 100%; margin-top: 4px; }

.tabs { display: flex; gap: 6px; margin: 14px 0 4px; }
.tab {
  flex: 1; padding: 10px 6px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; font-size: 0.95rem; font-weight: 600; cursor: pointer; color: var(--ink);
}
.tab.active { background: var(--green); color: #fff; border-color: var(--green); }
.badge {
  display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 0.75rem; text-align: center;
}

.balance-card { text-align: center; }
.balance-label { color: var(--muted); font-size: 0.9rem; }
.balance-amount { font-size: 2.2rem; font-weight: 800; margin: 4px 0 10px; }
.currency-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cur-btn {
  padding: 8px 22px; border: none; background: #fff; font-weight: 700; cursor: pointer; font-size: 0.95rem;
}
.cur-btn.active { background: var(--green); color: #fff; }

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 4px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; font-size: 0.9rem; font-weight: 700; cursor: pointer; color: var(--green);
}
.action-icon { display: flex; color: var(--ink); }
.action-icon svg { width: 24px; height: 24px; }
.action-btn:active { background: var(--green-light); }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; margin-bottom: 8px;
}
.list .row-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.list .row-sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.pill {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.75rem; font-weight: 700;
  background: var(--green-light); color: var(--green);
}
.pill.pending { background: var(--amber-bg); color: var(--amber); }
.pill.declined, .pill.failed { background: var(--red-bg); color: var(--red); }
.amount-neg { color: var(--red); }
.amount-pos { color: var(--green); }
.contact-actions { margin-top: 8px; display: flex; gap: 8px; }
.footer { text-align: center; margin-top: 24px; }
@media (min-width: 520px) {
  #app { padding-top: 10px; }
}
