:root {
  --bg: #f6f4ee;
  --card: #fffcf7;
  --ink: #2a261f;
  --muted: #6f675c;
  --line: #e4ddd0;
  --green: #0e6b4f;
  --green-ink: #f4fbf7;
  --amber: #fff6e8;
  --amber-ink: #7a4e00;
  --danger: #9a3412;
  --radius: 14px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(900px 240px at 0% -10%, #e5f3ec, transparent 60%), var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
.banner { background: var(--amber); color: var(--amber-ink); padding: 8px 14px; font-size: 13px; line-height: 1.5; border-bottom: 1px solid #f0ddb4; }
.layout { display: block; }
.side { display: none; }
.top, .app { padding: 16px; }
.top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.brand { font-weight: 700; }
.sub, .muted { color: var(--muted); font-size: 12px; line-height: 1.5; }
.nav, .tabbar { display: flex; }
.tabbar { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--card); border-top: 1px solid var(--line); }
.tabbar button, .nav button { border: 0; background: transparent; padding: 8px 4px; font-size: 12px; color: var(--muted); }
.tabbar button.on, .nav button.on { color: var(--green); font-weight: 700; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 16px; margin: 0 0 8px; }
.grid { display: grid; gap: 12px; }
.cards { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.card, .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.k { color: var(--muted); font-size: 12px; }
.v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.btn { border: 0; background: var(--green); color: var(--green-ink); border-radius: 10px; padding: 8px 12px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.warn { background: #f4e4d4; color: var(--danger); }
.btn:disabled { opacity: 0.45; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
label.field { display: grid; gap: 4px; font-size: 13px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; }
textarea { min-height: 64px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll { overflow-x: auto; max-width: 100%; }
.bar { height: 8px; background: #efeae1; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--green); }
.note { font-size: 13px; color: var(--muted); line-height: 1.6; }
.err { color: var(--danger); font-size: 13px; }
.tag { display: inline-block; border-radius: 99px; padding: 2px 8px; background: #e7f5ef; color: var(--green); font-size: 12px; }
@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 42px); }
  .side { display: block; padding: 18px 14px; border-right: 1px solid var(--line); background: rgba(255,252,247,.8); }
  .nav { display: grid; gap: 4px; margin-top: 16px; }
  .nav button { text-align: left; border-radius: 10px; padding: 8px 10px; }
  .nav button.on { background: var(--green); color: var(--green-ink); }
  .tabbar { display: none; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .form4 { grid-template-columns: repeat(4, 1fr); }
}
.form4, .form2 { display: grid; gap: 8px; }
@media (min-width: 700px) { .form2 { grid-template-columns: 1fr 1fr; } }
