:root {
  --bg: #f7f4ec;
  --surface: #fffdf8;
  --ink: #181713;
  --muted: #6e675b;
  --line: #ded6c8;
  --gold: #b78a3a;
  --gold-2: #d7b96a;
  --charcoal: #25231f;
  --green: #516b63;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
a { color: inherit; }
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--charcoal); color: #fffdf8; padding: 28px 20px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(215,185,106,.4); border-radius: 10px; color: var(--gold-2); font-family: Georgia, serif; font-weight: 700; }
.brand strong { display: block; font-size: 18px; }
.brand small { color: var(--gold-2); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.nav { display: grid; gap: 8px; }
.nav a { display: block; border-radius: 8px; padding: 12px 14px; color: rgba(255,253,248,.72); text-decoration: none; font-size: 14px; font-weight: 700; }
.nav a.active, .nav a:hover { background: rgba(255,253,248,.1); color: #fffdf8; }
.main { padding: 30px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.topbar h1 { margin: 0; font-size: 30px; line-height: 1.2; }
.topbar p { margin: 8px 0 0; color: var(--muted); }
.eyebrow { color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 0; border-radius: 999px; background: var(--gold); color: #fff; padding: 0 18px; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.button.secondary { background: var(--charcoal); }
.grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(4, 1fr); margin-bottom: 20px; }
.metric, .card, .panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 14px 30px rgba(31,29,24,.06); }
.metric { padding: 20px; }
.metric strong { display: block; font-family: Georgia, serif; font-size: 32px; line-height: 1; }
.metric span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.panel { padding: 22px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 10px; font-size: 20px; }
.panel-desc { margin: 0 0 16px; color: var(--muted); line-height: 1.7; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid #e8e0d2; text-align: left; font-size: 14px; vertical-align: top; }
th { color: #8a6a30; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; border-radius: 999px; padding: 4px 9px; background: rgba(81,107,99,.12); color: var(--green); font-size: 12px; font-weight: 700; }
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-height: 40px; padding: 9px 11px; font: inherit; }
textarea { min-height: 92px; resize: vertical; }
.full { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.alert { border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.success { background: rgba(81,107,99,.12); color: var(--green); }
.error { background: rgba(160,40,40,.12); color: #a02828; }
.empty { color: var(--muted); padding: 18px 0; }
.install-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.install-card { width: min(620px, 100%); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 34px; box-shadow: 0 20px 44px rgba(31,29,24,.12); }
.install-card.wide { width: min(760px, 100%); }
.install-card h1 { margin: 0; }
.install-card p { color: var(--muted); line-height: 1.8; }
.install-list { display: grid; gap: 10px; margin: 18px 0; }
.install-row { display: flex; justify-content: space-between; gap: 16px; border: 1px solid #e8e0d2; border-radius: 8px; padding: 12px; background: #fffaf0; }
.install-row span { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .metrics, .form { grid-template-columns: 1fr; }
  .main { padding: 20px; }
  .topbar { display: block; }
}
