:root {
  --bg: #f4f2ec;
  --side: #2f3a32;
  --side-hover: #3d4b41;
  --side-active: #65846a;
  --text: #363530;
  --muted: #898882;
  --line: #e7e4db;
  --card: #fffffd;
  --danger: #b54a3a;
  --ok: #65846a;
  --warn: #ad8953;
  --fs: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: var(--fs); background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: #65846a; text-decoration: none; }
.layout { display: flex; min-height: 100vh; }
.side { width: 232px; background: var(--side); color: #d7ddd8; flex-shrink: 0; }
.side .brand { padding: 22px 20px; font-size: 18px; font-weight: 700; color: #fff; border-bottom: 1px solid #3d4b41; }
.side .group { padding: 12px 20px 4px; font-size: 12px; color: #9aa89c; }
.side a { display: block; padding: 11px 20px; color: #d7ddd8; }
.side a:hover { background: var(--side-hover); color: #fff; }
.side a.active { background: var(--side-active); color: #fff; }
.main { flex: 1; min-width: 0; }
.top { height: 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; font-size: 18px; font-weight: 600; }
.top .who { color: var(--muted); font-size: 14px; font-weight: 400; }
.wrap { padding: 22px 24px 40px; }
.page-title { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.card .label { color: var(--muted); font-size: 14px; }
.card .num { font-size: 28px; font-weight: 700; margin-top: 8px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  height: 40px; border: 1px solid #d8d4c8; border-radius: 6px; padding: 0 12px; font-size: 15px; background: #fff;
}
textarea { height: auto; padding: 10px 12px; width: 100%; min-height: 96px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; font-size: 15px; background: #65846a; color: #fff; }
.btn-plain { background: #fff; color: var(--text); border-color: #d8d4c8; }
.btn-danger { background: var(--danger); }
.btn-ok { background: var(--ok); }
.btn-warn { background: var(--warn); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: #f7f5ef; color: var(--muted); font-weight: 600; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 13px; }
.tag-0 { background: #fff7e8; color: #ad8953; }
.tag-1 { background: #e8efe7; color: #4d6a52; }
.tag-2 { background: #eef3f8; color: #4a5d6e; }
.tag-3 { background: #f2f3f5; color: #646a73; }
.tag-4 { background: #f6ece9; color: #b54a3a; }
.pager { margin-top: 14px; display: flex; gap: 6px; }
.pager a, .pager span { padding: 7px 12px; background: #fff; border: 1px solid var(--line); border-radius: 4px; color: var(--text); }
.pager .on { background: #65846a; color: #fff; border-color: #65846a; }
.form { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; max-width: 960px; }
.row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: start; margin-bottom: 16px; }
.row label { padding-top: 10px; color: var(--muted); }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #ece8de; }
.login-box { width: 400px; background: #fff; border-radius: 10px; padding: 36px; box-shadow: 0 8px 24px rgba(60,55,45,.06); }
.login-box h1 { margin: 0 0 8px; font-size: 22px; }
.login-box p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.login-box .field { margin-bottom: 12px; }
.login-box input { width: 100%; height: 44px; }
.login-box .btn { width: 100%; height: 44px; margin-top: 8px; }
.error { color: var(--danger); font-size: 14px; margin-bottom: 8px; }
.thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 4px; background: #eee; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chat { max-width: 720px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.bubble { margin: 8px 0; padding: 10px 12px; border-radius: 8px; max-width: 80%; }
.bubble.user { background: #e8efe7; }
.bubble.staff { background: #f4f1ea; margin-left: auto; }
