* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 15px; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f6f3f0; color: #3a3235; padding-bottom: 64px;
}
a { color: #b45d7c; text-decoration: none; }
.topbar {
  background: linear-gradient(135deg, #c96a89, #a14b68); color: #fff;
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 10;
}
.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-user { font-size: 12px; opacity: .9; }
.page { max-width: 640px; margin: 0 auto; padding: 12px; }
.card {
  background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.sec-title { font-size: 16px; margin: 6px 0 10px; color: #7c4a5c; }
.row { padding: 6px 0; line-height: 1.5; }
.label { font-size: 13px; color: #8a7f83; margin: 10px 0 4px; display: block; }
input[type=text], input[type=password], input[type=number], input[type=tel],
input[type=month], input[type=date], select, textarea {
  width: 100%; border: 1px solid #e5dcdf; border-radius: 8px;
  padding: 10px 12px; font-size: 15px; background: #fdfbfb; color: #3a3235;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #c96a89; }
.btn {
  display: block; width: 100%; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #c96a89, #a14b68); color: #fff;
  font-size: 16px; padding: 12px; text-align: center; margin-top: 14px; cursor: pointer;
}
.btn:active { opacity: .85; }
.btn-ghost {
  display: inline-block; width: auto; background: #fff; color: #a14b68;
  border: 1px solid #d9a9b8; padding: 6px 14px; font-size: 14px; border-radius: 8px; margin-top: 0;
}
.btn-sm { padding: 7px 12px; font-size: 13px; width: auto; display: inline-block; margin-top: 0; }
.btn-danger { background: #fff; color: #c0392b; border: 1px solid #e6b0aa; }
.flash {
  background: #fdf0e6; color: #a05a2c; border: 1px solid #f2d5b8;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px;
}
.muted { color: #a89da1; font-size: 12px; }
.list-item {
  background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05); display: block; color: #3a3235;
}
.list-item .li-main { font-size: 15px; font-weight: 600; }
.list-item .li-sub { font-size: 12px; color: #a89da1; margin-top: 4px; }
.li-amount { float: right; font-size: 16px; font-weight: 600; color: #b45d7c; }
.li-amount.minus { color: #4b8e6e; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card {
  background: #fff; border-radius: 12px; padding: 14px; text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.stat-num { font-size: 20px; font-weight: 700; color: #a14b68; margin-top: 4px; word-break: break-all; }
.stat-label { font-size: 12px; color: #a89da1; }
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 56px; background: #fff;
  border-top: 1px solid #eee2e6; display: flex; z-index: 20;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: #a89da1; gap: 2px;
}
.tab.on { color: #a14b68; font-weight: 600; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 6px; border-bottom: 1px solid #f2e8eb; text-align: left; }
.table th { color: #8a7f83; font-weight: 500; background: #faf5f6; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input[type=text], .inline-form input[type=number] { flex: 1; min-width: 80px; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #f3e3e9; color: #a14b68; }
.badge.off { background: #eee; color: #999; }
.balance-box {
  background: linear-gradient(135deg, #c96a89, #8f3f5b); color: #fff;
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.balance-total { font-size: 26px; font-weight: 700; }
.balance-detail { font-size: 12px; opacity: .9; margin-top: 6px; }
.login-wrap { max-width: 360px; margin: 8vh auto; padding: 0 16px; }
.login-logo { text-align: center; font-size: 22px; font-weight: 700; color: #a14b68; margin: 24px 0 8px; }
.login-sub { text-align: center; color: #a89da1; font-size: 13px; margin-bottom: 20px; }
.check-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #f0e4e8; }
.check-item input[type=checkbox] { width: 18px; height: 18px; accent-color: #c96a89; }
