:root {
  --bg: #0f141b; --card: #1a2230; --card2: #232e40; --line: #2c3a50;
  --text: #eef2f7; --muted: #9aa7ba; --accent: #4da3ff; --good: #38c172;
  --warn: #f0a02e; --bad: #ef5753; --chip: #2a3850;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.app { max-width: 560px; margin: 0 auto; padding: 14px 14px 90px; min-height: 100vh; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #141b26;
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.nav-btn { flex: 1; background: none; border: 0; color: var(--muted); padding: 12px 4px;
  font-size: 13px; position: relative; }
.nav-btn.active { color: var(--accent); font-weight: 600; }
.badge { position: absolute; top: 4px; right: 18%; background: var(--bad); color: #fff;
  border-radius: 9px; font-size: 11px; padding: 1px 6px; }
h1 { font-size: 20px; margin: 6px 0 12px; }
h2 { font-size: 16px; margin: 18px 0 8px; color: var(--muted); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 12px; }
textarea, input[type=text], input[type=number], input[type=date], input[type=time], input[type=month], select, input[type=password] {
  width: 100%; background: var(--card2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; font-size: 16px; margin: 4px 0 10px; }
textarea { min-height: 96px; resize: vertical; }
label { font-size: 13px; color: var(--muted); display: block; margin-top: 6px; }
button.primary { background: var(--accent); color: #06121f; border: 0; border-radius: 10px;
  padding: 12px 16px; font-size: 16px; font-weight: 700; width: 100%; margin-top: 6px; }
button.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 4px 4px 0 0; }
button.danger { background: none; color: var(--bad); border: 1px solid var(--bad);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.txn { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.txn:last-child { border-bottom: 0; }
.txn .who { flex: 1; min-width: 0; }
.txn .m { font-weight: 600; }
.txn .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.txn .amt { font-weight: 700; white-space: nowrap; }
.amt-small { font-size: 12px; color: var(--muted); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { background: var(--chip); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.chip.sel { background: var(--accent); color: #06121f; border-color: var(--accent); font-weight: 600; }
.chip.flag { border-color: var(--warn); color: var(--warn); }
.chip.dup { border-color: var(--bad); color: var(--bad); }
.tag { font-size: 11px; color: var(--warn); }
.muted { color: var(--muted); font-size: 13px; }
.big { font-size: 30px; font-weight: 800; }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.bar-row .lbl { width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.bar-row .bar { flex: 1; height: 8px; background: var(--card2); border-radius: 4px; overflow: hidden; }
.bar-row .bar > div { height: 100%; background: var(--accent); }
.bar-row .val { width: 90px; text-align: right; }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--line); padding: 10px 16px;
  border-radius: 10px; font-size: 14px; z-index: 50; max-width: 90%; }
.section-head { display: flex; justify-content: space-between; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.filters select { width: auto; flex: 1 1 30%; margin: 0; padding: 8px; font-size: 13px; }
.lock-wrap { max-width: 320px; margin: 20vh auto 0; text-align: center; }
.date-group { font-size: 12px; color: var(--muted); margin: 14px 0 2px; text-transform: uppercase; letter-spacing: .04em; }
.seq { color: var(--muted); font-size: 12px; margin-right: 6px; }
.link { color: var(--accent); background: none; border: 0; padding: 0; font-size: 13px; text-decoration: underline; }
.right { text-align: right; }
