* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  color: #24312b;
  background: #f4f6f4;
}
a { color: #1f7a5c; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 18px; background: #1f7a5c; color: #fff;
}
.brand { font-weight: 700; font-size: 16px; }
.brand .sub { font-weight: 400; font-size: 12px; margin-left: 8px; opacity: .85; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { color: #eaf5f0; padding: 5px 10px; border-radius: 4px; }
nav a:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.who { margin-left: auto; font-size: 12px; opacity: .95; }
.who a { color: #fff; text-decoration: underline; }

main { max-width: 1180px; margin: 0 auto; padding: 16px 18px 60px; }
h2 { font-size: 20px; margin: 6px 0 14px; }
h2 small { font-size: 13px; color: #7a8a82; font-weight: 400; margin-left: 6px; }
h3 { font-size: 15px; margin: 14px 0 8px; color: #1d3a2f; }
p, li { line-height: 1.7; }

.card {
  background: #fff; border: 1px solid #e2e8e4; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 14px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row label { flex: 1 1 180px; }
label { display: block; margin-bottom: 8px; font-size: 13px; color: #3b4a43; }
label input, label select, label textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  border: 1px solid #cfd8d3; border-radius: 6px; font-size: 14px; background: #fff;
}
label input:focus, label select:focus, label textarea:focus { outline: 2px solid #b8ddd0; border-color: #1f7a5c; }
textarea { resize: vertical; }
label.radio { display: flex; gap: 8px; align-items: center; }
label.radio input { width: auto; margin: 0; }

.btn {
  display: inline-block; padding: 7px 14px; border: 1px solid #cfd8d3; border-radius: 6px;
  background: #fff; color: #24312b; cursor: pointer; font-size: 14px;
}
.btn:hover { background: #f0f5f2; text-decoration: none; }
.btn.primary { background: #1f7a5c; border-color: #1f7a5c; color: #fff; }
.btn.primary:hover { background: #176247; }
.btn.danger { background: #fff5f5; border-color: #e3b6b6; color: #a53a3a; }
.btn.tiny { padding: 4px 9px; font-size: 12px; }
.btn.block { display: block; width: 100%; text-align: center; padding: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.searchbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.searchbar input[type=text], .searchbar input:not([type]) { flex: 1 1 280px; padding: 9px 12px; border: 1px solid #cfd8d3; border-radius: 6px; font-size: 14px; }
.searchbar input[type=date] { padding: 7px 10px; border: 1px solid #cfd8d3; border-radius: 6px; }

.flashes { margin-bottom: 10px; }
.flash { padding: 9px 12px; border-radius: 6px; margin-bottom: 6px; font-size: 13px; }
.flash.ok { background: #e8f5ef; border: 1px solid #b7e0cf; color: #14624a; }
.flash.err { background: #fdf0f0; border: 1px solid #ecc5c5; color: #9d2f2f; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid #e2e8e4; border-radius: 8px; padding: 12px 14px; }
.stat span { display: block; font-size: 12px; color: #7a8a82; }
.stat b { display: block; font-size: 22px; margin: 2px 0; color: #14352a; }
.stat b.sm { font-size: 15px; }
.stat i { display: block; font-size: 11px; color: #93a29a; font-style: normal; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.bar-item { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bar { width: 60%; background: #7cc3aa; border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-val { font-size: 11px; color: #6b7d74; margin-bottom: 2px; }
.bar-day { font-size: 11px; color: #93a29a; margin-top: 4px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e2e8e4; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #edf1ee; white-space: nowrap; }
th { background: #f2f5f3; font-weight: 600; color: #33443c; text-align: center; }
td.c { text-align: center; }
td.r { text-align: right; font-variant-numeric: tabular-nums; }
td.empty, .empty { text-align: center; color: #8a9992; padding: 18px; }
td.ops { display: flex; gap: 6px; align-items: center; }
td.ops form { display: flex; gap: 4px; margin: 0; }
form.inline { display: flex; gap: 4px; }
input.mini { width: 78px; padding: 4px 6px; font-size: 12px; border: 1px solid #cfd8d3; border-radius: 4px; }
table.items td { white-space: normal; }
table.items select, table.items input { min-width: 90px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tab { padding: 7px 14px; border: 1px solid #d6e0da; border-radius: 18px; background: #fff; font-size: 13px; }
.tab.on { background: #1f7a5c; border-color: #1f7a5c; color: #fff; }

.member-bar {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid #e2e8e4; border-radius: 8px; padding: 12px 16px; margin-bottom: 14px;
}
.balances b { color: #14624a; }
.muted { color: #7a8a82; font-size: 12px; }
.hint { color: #7a8a82; font-size: 12px; line-height: 1.6; }
.kv { line-height: 2; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.tag.ok { background: #e8f5ef; color: #14624a; }
.tag.off { background: #f2f2f2; color: #8a9992; }
.total { font-size: 15px; }
.total b { color: #b4552d; font-size: 20px; }
.actions { display: flex; gap: 10px; margin-top: 10px; }
.foot { text-align: center; color: #9aa8a1; font-size: 11px; padding: 10px 0 20px; }

.login-wrap { display: flex; justify-content: center; padding-top: 8vh; }
.login { width: 360px; max-width: 92vw; }
.login h1 { font-size: 22px; margin: 0 0 6px; color: #14352a; }
.login .btn { margin-top: 6px; }
