* { box-sizing: border-box; margin: 0; }
:root { --accent: #1d4ed8; --border: #e4e4e7; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #111; background: #fff; padding: 24px; font-size: 14px;
  max-width: 720px; margin: 0 auto;
}
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
h1 { font-size: 20px; }
.nav { display: flex; align-items: center; gap: 8px; }
#monthLabel { font-weight: 600; min-width: 130px; text-align: center; }
.btn { border: 1px solid var(--border); background: #fff; color: #111; border-radius: 10px; padding: 7px 14px; cursor: pointer; font: inherit; }
.btn:hover { border-color: #999; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.icon-btn { border: 1px solid var(--border); background: #fff; border-radius: 10px; width: 30px; height: 30px; cursor: pointer; font-size: 16px; line-height: 1; color: #111; }
input, select { border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; font: inherit; background: #fff; color: #111; }
#addForm { display: flex; gap: 8px; margin-bottom: 24px; }
#amount { width: 100px; }
#note { flex: 1; }
#summary { margin-bottom: 24px; }
#total { font-size: 30px; font-weight: 700; margin-bottom: 14px; }
#bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 84px 1fr 64px; align-items: center; gap: 10px; }
.bar-label { color: #666; }
.bar-track { height: 12px; border-radius: 6px; background: #f4f4f5; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; }
.bar-amount { text-align: right; color: #666; font-size: 13px; }
#list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#list li { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.date { color: #666; font-size: 13px; width: 76px; }
.chip { font-size: 12px; border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; background: #f8f8fa; white-space: nowrap; }
.exp-note { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amount { font-weight: 600; }
.del { border: none; background: none; color: #999; cursor: pointer; font-size: 15px; padding: 0 2px; }
.del:hover { color: #dc2626; }
.empty { color: #999; }
