* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --orange: #FF6B35; --yellow: #FFD166; --green: #06D6A0;
  --red: #EF476F; --bg: #FFF8ED; --card: #FFFFFF;
  --text: #2D2D2D; --muted: #888;
}
body { font-family: -apple-system, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* NAV */
.topbar { background: var(--orange); color: #fff; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { font-size: 1.3rem; }
.topbar .role-badge { font-size: .75rem; background: rgba(255,255,255,.25);
  padding: 3px 10px; border-radius: 20px; }

/* TABS */
.tabs { display: flex; background: #fff; border-bottom: 2px solid #eee; }
.tabs button { flex: 1; padding: 12px; border: none; background: none;
  font-size: .9rem; color: var(--muted); cursor: pointer; transition: all .2s; }
.tabs button.active { color: var(--orange); border-bottom: 3px solid var(--orange); font-weight: 700; }

/* PAGES */
.page { display: none; padding: 20px; max-width: 480px; margin: 0 auto; }
.page.active { display: block; }

/* BALANCE CARD */
.balance-card { background: linear-gradient(135deg, var(--orange), var(--yellow));
  border-radius: 20px; padding: 28px 24px; text-align: center; color: #fff;
  margin-bottom: 24px; box-shadow: 0 8px 24px rgba(255,107,53,.3); }
.balance-card .emoji { font-size: 2.8rem; margin-bottom: 6px; }
.balance-card .name { font-size: 1rem; opacity: .85; margin-bottom: 4px; }
.balance-card .amount { font-size: 3rem; font-weight: 800; letter-spacing: -1px; }
.balance-card .apr { font-size: .75rem; opacity: .8; margin-top: 4px; }

/* CARDS */
.card { background: var(--card); border-radius: 16px; padding: 18px;
  margin-bottom: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.card h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: 12px; }

/* TRANSACTION LIST */
.tx-list { list-style: none; }
.tx-item { display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.tx-item:last-child { border-bottom: none; }
.tx-icon { font-size: 1.5rem; width: 36px; text-align: center; }
.tx-info { flex: 1; }
.tx-info .tx-note { font-size: .95rem; font-weight: 600; }
.tx-info .tx-date { font-size: .75rem; color: var(--muted); }
.tx-amount { font-weight: 700; font-size: 1rem; }
.tx-amount.credit { color: var(--green); }
.tx-amount.debit { color: var(--red); }
.tx-amount.interest { color: #845EF7; }

/* FORMS */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600;
  margin-bottom: 5px; color: var(--muted); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid #E0E0E0;
  border-radius: 10px; font-size: 1rem; background: #fafafa; outline: none; }
.form-group input:focus, .form-group select:focus { border-color: var(--orange); background: #fff; }

/* BUTTONS */
.btn { display: inline-block; padding: 11px 22px; border: none;
  border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: opacity .2s; }
.btn:active { opacity: .75; }
.btn-primary { background: var(--orange); color: #fff; width: 100%; text-align: center; }
.btn-sm { font-size: .8rem; padding: 6px 12px; border-radius: 8px; }
.btn-ghost { background: #f0f0f0; color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }

/* CHILD PILLS */
.child-selector { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.child-pill { padding: 8px 16px; border-radius: 20px; border: 2px solid #eee;
  background: #fff; cursor: pointer; font-size: .9rem; transition: all .2s; }
.child-pill.active { border-color: var(--orange); background: var(--orange); color: #fff; }

/* SETTINGS ROW */
.settings-row { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.settings-row:last-child { border-bottom: none; }
.settings-row span { font-size: .95rem; }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 100; align-items: flex-end; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 24px 24px 0 0; padding: 24px 20px 36px;
  width: 100%; max-width: 480px; margin: 0 auto; }
.modal h2 { margin-bottom: 18px; font-size: 1.1rem; }

/* ROLE SWITCH */
.role-switch { display: flex; gap: 10px; justify-content: center; padding: 16px 20px 0; }
.role-btn { flex: 1; max-width: 160px; padding: 10px; border: 2px solid #eee;
  border-radius: 14px; background: #fff; cursor: pointer; text-align: center; font-size: .85rem; }
.role-btn.active { border-color: var(--orange); background: #FFF3EE; }
.role-btn .role-emoji { font-size: 1.8rem; display: block; margin-bottom: 4px; }

/* EMPTY STATE */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .empty-emoji { font-size: 3rem; margin-bottom: 10px; }

/* CHIP */
.chip { display: inline-block; font-size: .75rem; padding: 2px 8px;
  border-radius: 20px; font-weight: 600; }
.chip-interest { background: #EDE7FF; color: #845EF7; }
.chip-earn { background: #E0FAF4; color: #06D6A0; }
.chip-spend { background: #FFE8ED; color: var(--red); }
.chip-adjust { background: #FFF3CD; color: #997000; }
