:root {
  --bg: #0b1020; --card: #141a2e; --card2: #1b2340; --line: #262f52;
  --text: #eef1ff; --muted: #8e98c0; --accent: #6366f1; --accent2: #22d3ee;
  --green: #34d399; --red: #fb7185;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  background: radial-gradient(900px 500px at 10% -10%, rgba(99,102,241,.25), transparent),
              radial-gradient(700px 400px at 100% 0%, rgba(34,211,238,.15), transparent), var(--bg);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
main { max-width: 560px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 28px; margin: 8px 0 4px; letter-spacing: -.02em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 0 10px; font-weight: 600; }
.muted { color: var(--muted); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin-bottom: 12px; }
.hero { background: linear-gradient(135deg, #4f46e5, #0891b2); border: 0; padding: 24px; }
.hero .label { opacity: .85; font-size: 14px; }
.hero .amount { font-size: 44px; font-weight: 700; letter-spacing: -.03em; margin: 4px 0 8px; }
.hero .amount.neg { color: #ffd1d8; }
.row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.list-item { cursor: pointer; transition: transform .1s, border-color .15s; }
.list-item:hover { border-color: var(--accent); }
.list-item:active { transform: scale(.985); }
.list-item .bal { font-weight: 650; font-size: 18px; }
input, select {
  width: 100%; background: var(--card2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 13px 14px; font: inherit; margin-bottom: 10px; outline: none;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
button {
  font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 13px 16px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #8b5cf6); color: #fff; width: 100%;
}
button:active { opacity: .85; }
button.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
button.danger { background: transparent; color: var(--red); border: 1px solid var(--line); }
button.small { width: auto; padding: 8px 12px; font-size: 14px; }
button.icon { width: auto; background: none; color: var(--muted); padding: 6px 10px; font-size: 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.seg button { background: var(--card2); border: 1px solid var(--line); color: var(--muted); }
.seg button.on.dep { background: rgba(52,211,153,.15); border-color: var(--green); color: var(--green); }
.seg button.on.wd { background: rgba(251,113,133,.15); border-color: var(--red); color: var(--red); }
.tx .amt { font-weight: 650; font-variant-numeric: tabular-nums; }
.tx .amt.dep { color: var(--green); } .tx .amt.wd { color: var(--red); }
.tx { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.code { font: 700 22px ui-monospace, Menlo, monospace; letter-spacing: .12em; text-align: center; padding: 12px; background: var(--card2); border-radius: 12px; margin: 10px 0; user-select: all; }
.back { background: none; color: var(--accent2); width: auto; padding: 4px 0; margin-bottom: 8px; }
.err { color: var(--red); font-size: 14px; min-height: 20px; margin: 4px 0; }
.link { background: none; color: var(--accent2); padding: 8px; }
.pill { display: inline-block; padding: 3px 10px; background: var(--card2); border-radius: 99px; font-size: 13px; margin: 0 6px 6px 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ts { min-height: 0; margin-bottom: 8px; }
[hidden] { display: none !important; }
div.gap { height: 10px; }
button.gap { margin-top: 8px; }
#toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: var(--card2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 99px; opacity: 0; transition: .25s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
