:root {
  --brand: #8b5e3c;
  --brand-dark: #6d4529;
  --brand-soft: #f4ece4;
  --accent: #b8862f;
  --bg: #faf8f5;
  --card: #ffffff;
  --text: #2a2521;
  --muted: #837a70;
  --line: #ebe4db;
  --ok: #2f7a4f;
  --warn: #b8862f;
  --err: #b1412c;
  --radius: 12px;
  --shadow: 0 2px 14px rgba(80, 60, 40, 0.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, 92vw); margin: 0 auto; }

/* ---------- 顶部 ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 10px; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; letter-spacing: -1px;
}
.brand .t1 { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.brand .t2 { font-size: 12px; color: var(--muted); letter-spacing: 2px; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--brand); background: var(--brand-soft); }
.nav a.active { color: var(--brand); font-weight: 600; }
.top-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; cursor: pointer; background: var(--brand); color: #fff; transition: .18s;
  font-family: inherit;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.btn.gray { background: #f1ede8; color: #5d554c; }
.btn.gray:hover { background: #e7e1d9; }
.btn.danger { background: var(--err); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 首页头图 ---------- */
.hero {
  background: linear-gradient(120deg, #3c2a1e 0%, #6d4529 55%, #8b5e3c 100%);
  color: #fff; padding: 64px 0 56px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -40px; width: 420px; height: 420px;
  background: radial-gradient(circle at center, rgba(255,255,255,.13), transparent 62%);
}
.hero h1 { font-size: 34px; margin: 0 0 10px; letter-spacing: 1px; }
.hero p { max-width: 720px; color: rgba(255,255,255,.86); margin: 0 0 26px; }
.hero .meta { display: flex; gap: 28px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.22); }

/* ---------- 区块 ---------- */
.section { padding: 46px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.sec-head h2 { font-size: 22px; margin: 0; position: relative; padding-left: 14px; }
.sec-head h2::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--brand);
}
.sec-head .more { font-size: 14px; color: var(--muted); }

/* ---------- 卡片 ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* 业务说明卡（主页"资料维护"区） */
.card-link { display: block; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
            transition: transform .2s, box-shadow .2s, border-color .2s; color: inherit; text-decoration: none; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(40,30,12,.08); border-color: var(--brand-soft); }
.card-link .icon-tag { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px;
                       background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 10px; }
.card-link h3 { margin: 4px 0 6px; font-size: 17px; color: #2b2218; }
.card-link p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
/* 富文本正文样式（统一前台显示） */
.rich-content { line-height: 1.7; }
.rich-content h1, .rich-content h2, .rich-content h3, .rich-content h4 { color: #2b2218; margin: 14px 0 6px; }
.rich-content h3 { font-size: 17px; }
.rich-content p { margin: 6px 0; }
.rich-content ul, .rich-content ol { padding-left: 22px; margin: 6px 0; }
.rich-content blockquote { border-left: 3px solid var(--brand-soft); padding-left: 12px; color: var(--muted); margin: 8px 0; }
.rich-content a { color: var(--brand-dark); }

.grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.news-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; transition: .2s; }
.news-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-item .tag { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: .5px; }
.news-item h3 { font-size: 17px; margin: 6px 0 8px; line-height: 1.5; }
.news-item p { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.news-item .date { font-size: 13px; color: #a79e94; }

.doc-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.doc-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .ico { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 15px; flex: 0 0 auto; }
.doc-row .t { flex: 1; min-width: 0; }
.doc-row .t b { font-weight: 600; display: block; }
.doc-row .t .doc-title { cursor: pointer; color: var(--brand-dark); }
.doc-row .t .doc-title:hover { text-decoration: underline; }
.doc-row .t span { font-size: 13px; color: var(--muted); }
.doc-row .d { font-size: 13px; color: #a79e94; white-space: nowrap; }

/* ---------- 会员卡 ---------- */
.member-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-align: center; transition: .2s;
}
.member-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
/* 会员照片：2:3 竖版圆角长方形 */
.avatar {
  width: 120px; aspect-ratio: 2 / 3; border-radius: 10px; margin: 0 auto 12px; overflow: hidden;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center;
  font-size: 32px; font-weight: 600; border: 1px solid var(--line);
  box-shadow: 0 1px 6px rgba(80, 60, 40, .08);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 44px; border-radius: 6px; font-size: 16px; margin: 0; }
.member-card h3 { margin: 0 0 4px; font-size: 17px; }
.member-card .pos { color: var(--brand); font-size: 14px; margin-bottom: 8px; }
.badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); }
.badge.gold { background: #fbf1de; color: var(--accent); }
.badge.green { background: #e8f4ec; color: var(--ok); }
.badge.red { background: #fbeae6; color: var(--err); }
.badge.gray { background: #f1ede8; color: #6d655c; }
/* 会员性质：三类使用明显不同的色系 */
.badge.type-student { background: #e4eefb; color: #1c5aa8; }
.badge.type-regular { background: #e6f4ea; color: #2a7a46; }
.badge.type-pro { background: #f7ead2; color: #96621a; }
.badge.expired { background: #f6e0da; color: #a5381f; font-weight: 600; }
.member-card .valid { font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }

/* ---------- 表单 ---------- */
.form-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; }
.form-note { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 14px 18px; border-radius: 6px; font-size: 14px; margin-bottom: 26px; color: #5b4b3c; }
.q { padding: 20px 0; border-bottom: 1px dashed var(--line); }
.q:last-of-type { border-bottom: 0; }
/* 条件展开的联动条目 */
.q.sub {
  margin: 12px 0 0; padding: 16px 18px; background: #fdfbf8;
  border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 8px;
}
.q.sub .q-title { font-size: 15px; }
.q.sub .q-title .no { color: var(--accent); }
.q.sub + .q.sub { margin-top: 10px; }
.q-title { font-weight: 600; margin-bottom: 4px; font-size: 16px; }
.q-title .no { color: var(--brand); margin-right: 6px; }
.q-title .req { color: var(--err); margin-left: 3px; }
.q-desc { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.q-body { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 10px; }
.opt { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 15px; padding: 4px 0; }
.opt input { accent-color: var(--brand); width: 16px; height: 16px; }
input[type=text], input[type=tel], input[type=date], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--text); outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(139,94,60,.1); }
textarea { min-height: 90px; resize: vertical; }
.inline { display: flex; gap: 12px; flex-wrap: wrap; }
.inline > * { flex: 1; min-width: 160px; }
.field-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }

.uploader { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.up-box {
  width: 120px; aspect-ratio: 2 / 3; border: 1px dashed #cfc4b6; border-radius: 10px; background: #fdfcfa;
  display: grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 13px; text-align: center; overflow: hidden; position: relative;
}
.up-box.sig { height: 92px; width: 220px; }
.up-box img { width: 100%; height: 100%; object-fit: cover; }
.up-box:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 富文本编辑器 ---------- */
.rt-toolbar {
  display: flex; gap: 4px; flex-wrap: wrap; padding: 6px;
  background: #faf7f3; border: 1px solid var(--line); border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.rt-btn {
  min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid var(--line);
  background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; color: #5d554c;
  font-family: inherit; line-height: 1;
}
.rt-btn:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.rt-body {
  min-height: 140px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 0 0 8px 8px; background: #fff; outline: none; font-size: 15px; line-height: 1.8;
  max-height: 420px; overflow: auto;
}
.rt-body:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(139,94,60,.1); }
.rt-body:empty::before { content: attr(data-ph); color: #b3aaa1; }
.rt-body img { max-width: 100%; border-radius: 6px; }
/* 富文本内容展示 */
.rich-content { line-height: 1.85; word-break: break-word; }
.rich-content p { margin: 0 0 10px; }
.rich-content h1, .rich-content h2, .rich-content h3, .rich-content h4 { margin: 14px 0 8px; font-size: 17px; }
.rich-content ul, .rich-content ol { margin: 0 0 10px; padding-left: 22px; }
.rich-content li { margin: 3px 0; }
.rich-content blockquote {
  margin: 10px 0; padding: 8px 14px; background: var(--brand-soft);
  border-left: 3px solid var(--brand); border-radius: 4px; color: #5b4b3c;
}
.rich-content a { color: var(--brand); text-decoration: underline; }
.rich-content img { max-width: 100%; border-radius: 6px; }
.rich-content table { border-collapse: collapse; margin: 10px 0; }
.rich-content td, .rich-content th { border: 1px solid var(--line); padding: 6px 10px; }

/* ---------- 页脚 ---------- */
.footer { background: #33261d; color: rgba(255,255,255,.7); padding: 36px 0; margin-top: 30px; font-size: 14px; }
.footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer b { color: #fff; }

/* ---------- 其它 ---------- */
.page-title { padding: 34px 0 8px; }
.page-title h1 { font-size: 26px; margin: 0 0 6px; }
.page-title p { color: var(--muted); margin: 0; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: #fff; border: 1px solid var(--line); padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; }
.filters input, .filters select { width: auto; min-width: 140px; flex: 1; }
.toast {
  position: fixed; left: 50%; top: 28px; transform: translateX(-50%) translateY(-20px);
  background: #33261d; color: #fff; padding: 11px 22px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: .25s; z-index: 999; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--err); }

.modal-mask { position: fixed; inset: 0; background: rgba(35,25,18,.5); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 14px; width: min(760px, 94vw); max-height: 88vh; overflow: auto; padding: 26px 28px; }
.modal h3 { margin: 0 0 16px; font-size: 19px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; margin-bottom: 18px; }
.detail-grid .k { font-size: 12px; color: var(--muted); }
.detail-grid .v { font-weight: 500; }

@media (max-width: 720px) {
  .nav a { padding: 6px 10px; font-size: 14px; }
  .hero h1 { font-size: 26px; }
  .form-wrap { padding: 20px; }
}
