:root {
  --ink: #2b2620;
  --muted: #7a7066;
  --faint: #a89e92;
  --line: #e8e1d6;
  --line-soft: #f1ece3;
  --paper: #fbf8f3;
  --card: #ffffff;
  --brand: #9c4a2f;
  --brand-2: #b9633f;
  --brand-soft: #f6e9e1;
  --ok: #4c7a4a;
  --warn: #b07a1e;
  --bad: #a23b2e;
  --shadow: 0 1px 2px rgba(43,38,32,.05), 0 8px 24px rgba(43,38,32,.06);
  --radius: 14px;
  --maxw: 1140px;
  --serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.35; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
.ic { width: 20px; height: 20px; vertical-align: -4px; flex: none; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.center { text-align: center; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.serif { font-family: var(--serif); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,248,243,.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: .3px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  overflow: hidden; display: grid; place-items: center;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.brand .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand .logo .ic { width: 19px; height: 19px; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .5px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; flex: 1; }
.nav a {
  padding: 8px 13px; border-radius: 9px; color: var(--muted); font-size: 14.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: .15s;
}
.nav a:hover { color: var(--ink); background: var(--line-soft); }
.nav a.active { color: var(--brand); background: var(--brand-soft); }
.topbar .act { display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.bad:hover { filter: brightness(1.05); }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  background: var(--line-soft); color: var(--muted); font-size: 12.5px; font-weight: 500;
}
.tag-pill.brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- 区块 ---------- */
.section { padding: 54px 0; }
.section.tight { padding: 34px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: 24px; }
.section-head .sub { color: var(--muted); margin: 0; }

/* ---------- 首页 Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(156,74,47,.10), transparent 60%),
    linear-gradient(180deg, #fff, var(--paper));
  border-bottom: 1px solid var(--line);
  padding: 64px 0 56px;
}
.hero h1 { font-size: 40px; line-height: 1.2; letter-spacing: .5px; }
.hero h1 .em { color: var(--brand); }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 620px; }
.searchbar {
  margin-top: 26px; display: flex; gap: 10px; max-width: 620px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 7px; box-shadow: var(--shadow);
}
.searchbar input { flex: 1; border: 0; outline: none; padding: 10px 14px; font-size: 15px; background: transparent; }
.searchbar .btn { border-radius: 10px; }
.hero-points { margin-top: 22px; display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.hero-points span { display: inline-flex; align-items: center; gap: 7px; }
.hero-points .ic { color: var(--brand); }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 18px; }
.grid.cats { grid-template-columns: repeat(4, 1fr); }
.grid.cards { grid-template-columns: repeat(3, 1fr); }
.cat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  transition: .18s; display: block;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-soft); }
.cat-card .ci {
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 13px;
}
.cat-card .ci .ic { width: 24px; height: 24px; }
.cat-card h3 { font-size: 16.5px; margin: 0 0 4px; }
.cat-card .brief { color: var(--muted); font-size: 13.5px; margin: 0; }
.cat-card .cnt { margin-top: 10px; font-size: 12.5px; color: var(--faint); }

.info-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: .18s; display: flex; flex-direction: column;
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-soft); }
.info-card .thumb { aspect-ratio: 3/2; overflow: hidden; background: var(--line-soft); }
.info-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.info-card:hover .thumb img { transform: scale(1.04); }
.info-card .body { padding: 16px 17px 18px; display: flex; flex-direction: column; flex: 1; }
.info-card .cat-label { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-size: 12.5px; font-weight: 600; }
.info-card .cat-label .ic { width: 15px; height: 15px; }
.info-card h3 { font-size: 16px; margin: 8px 0 8px; line-height: 1.45; }
.info-card .sum { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; flex: 1; }
.info-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 11px; }
.info-card .meta .price { color: var(--brand); font-weight: 700; }
.info-card .meta .views { display: inline-flex; align-items: center; gap: 5px; }
.info-card .pub { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); }

/* ---------- 步骤 / 业务介绍 ---------- */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .n { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 16px; }

/* ---------- 资质条 ---------- */
.qualbar { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.qual { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.qual .ic { width: 26px; height: 26px; color: var(--brand); }
.qual .t { font-size: 13px; color: var(--muted); }
.qual .v { font-weight: 600; }
.icp-link { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; display: inline-block; margin-bottom: 0; }
.icp-link:hover { border-bottom-color: currentColor; }
.icp-wrap { display: inline-flex; align-items: center; white-space: nowrap; }

/* ---------- 详情页 ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
.gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 22px; }
.gallery .g-main { grid-column: 1 / -1; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--line-soft); }
.gallery .g-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g-sub { aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--line-soft); }
.gallery .g-sub img { width: 100%; height: 100%; object-fit: cover; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel h2 { font-size: 19px; }
.detail-block { margin-bottom: 22px; }
.detail-block h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.detail-block h3 .ic { color: var(--brand); width: 18px; height: 18px; }
.detail-block ul { margin: 0; padding-left: 0; list-style: none; }
.detail-block ul li { position: relative; padding-left: 22px; margin-bottom: 8px; color: #443e36; }
.detail-block ul li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 7px; height: 7px; border-radius: 2px; background: var(--brand-soft); border: 2px solid var(--brand); }
.ol-steps { counter-reset: st; margin: 0; padding: 0; list-style: none; }
.ol-steps li { position: relative; padding-left: 38px; margin-bottom: 12px; counter-increment: st; }
.ol-steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; display: grid; place-items: center;
}
.aside-card { position: sticky; top: 84px; }
.aside-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.aside-row:last-child { border-bottom: 0; }
.aside-row .ic { color: var(--brand); width: 18px; height: 18px; }
.aside-row .k { color: var(--muted); font-size: 13px; }
.aside-row .vv { font-weight: 600; }
.phone-reveal { background: var(--brand-soft); border: 1px dashed var(--brand); border-radius: 10px; padding: 14px; text-align: center; }
.phone-reveal .num { font-size: 19px; font-weight: 700; color: var(--brand); letter-spacing: 1px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--brand); }

/* ---------- 表单 ---------- */
.form { max-width: 720px; }
.form .field { margin-bottom: 18px; }
.form label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 14px; }
.form label .req { color: var(--brand); }
.form input[type=text], .form input[type=password], .form input[type=tel], .form select, .form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px;
  font-family: inherit; background: #fff; color: var(--ink); outline: none; transition: .15s;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form textarea { resize: vertical; min-height: 96px; }
.form .hint { color: var(--faint); font-size: 12.5px; margin-top: 5px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 10px; font-size: 13.5px; color: var(--muted); }
.check input { margin-top: 4px; }
.check a { color: var(--brand); font-weight: 600; }
.alert { background: var(--brand-soft); border: 1px solid #e7c9bb; color: #7d3320; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.note-box { background: var(--line-soft); border-radius: 10px; padding: 14px 16px; color: var(--muted); font-size: 13.5px; }

/* ---------- 协议文档 ---------- */
.doc { max-width: 840px; margin: 0 auto; }
.doc h2 { font-size: 20px; margin-top: 30px; }
.doc .chap { font-size: 16.5px; font-weight: 700; margin: 24px 0 10px; color: var(--brand); }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--line-soft); }

/* ---------- 公司页 ---------- */
.company-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; }
.company-hero .logo-big { display:inline-block; margin-bottom: 18px; }
.company-hero .logo-big img { width: auto; height: auto; max-width: 150px; max-height: 170px; border-radius: 22px; display: block; box-shadow: var(--shadow); }
.company-hero .logo-big .ic { width: 42px; height: 42px; }
.scope-list { columns: 2; column-gap: 28px; }
.scope-list li { break-inside: avoid; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }

/* ---------- 页脚 ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 42px 0 26px; margin-top: 30px; }
.footer .cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.footer .cols > div:last-child { text-align: right; }
.footer h4 { font-size: 14px; margin-bottom: 14px; }
.footer a { color: var(--muted); display: block; font-size: 13.5px; margin-bottom: 9px; }
.footer a:hover { color: var(--brand); }
.footer .cpy { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 6px 18px; }
.footer .cpy > span { white-space: nowrap; flex-shrink: 0; }

/* ---------- 后台 ---------- */
.admin-body { background: #f4f1ec; }
.admin-shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.admin-side { background: #2b2620; color: #cfc6ba; padding: 20px 14px; }
.admin-side .a-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; color: #fff; font-weight: 700; }
.admin-side .a-brand .logo { width: 30px; height: 30px; border-radius: 8px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.admin-side .a-brand .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; color: #cfc6ba; font-size: 14px; margin-bottom: 3px; }
.admin-side a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-side a.active { background: var(--brand); color: #fff; }
.admin-side a .ic { width: 18px; height: 18px; }
.admin-side .a-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-main { padding: 26px 30px 50px; }
.admin-main .a-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.admin-main .a-top h1 { font-size: 22px; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 26px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat .v { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.brand .v { color: var(--brand); }
.stat.ok .v { color: var(--ok); }
.stat.warn .v { color: var(--warn); }
.stat.bad .v { color: var(--bad); }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; vertical-align: middle; }
.table th { background: var(--line-soft); font-weight: 600; color: var(--muted); font-size: 12.5px; }
.table tr:last-child td { border-bottom: 0; }
.v-row { cursor: pointer; transition: background .12s; }
.v-row:hover { background: var(--line-soft); }
.id-thumb { width: 48px; height: 34px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); display: inline-block; }
.id-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.pending { background: #fdf2dc; color: var(--warn); }
.badge.approved { background: #e6f1e4; color: var(--ok); }
.badge.rejected { background: #f8e4e0; color: var(--bad); }
.badge.active { background: #e6f1e4; color: var(--ok); }
.badge.blocked { background: #efe7dd; color: var(--muted); }
.badge.unpaid { background: #fdf2dc; color: var(--warn); }
.badge.paid { background: #e6f1e4; color: var(--ok); }
.badge.done { background: #e9e2f6; color: #5b4b9c; }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tiny-form { display: inline; }

/* 登录页（前后台共用风格） */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: linear-gradient(160deg,#fff,var(--paper)); }
.auth-card { width: 400px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 34px; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; margin-bottom: 6px; }
.auth-card h1 { text-align: center; font-size: 21px; margin: 10px 0 4px; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: 13.5px; }

/* 支付卡 */
.pay-card { max-width: 560px; margin: 0 auto; }
.pay-line { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.pay-line .amt { font-size: 22px; font-weight: 700; color: var(--brand); }
.switch { display: inline-flex; align-items: center; gap: 8px; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; color: var(--faint); margin-bottom: 12px; }

.pagination-note { color: var(--faint); font-size: 13px; margin-top: 14px; }

/* 响应式 */
@media (max-width: 980px) {
  .grid.cats { grid-template-columns: repeat(2,1fr); }
  .grid.cards { grid-template-columns: repeat(2,1fr); }
  .qualbar { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .aside-card { position: static; }
  .company-hero { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-side .a-brand, .admin-side .a-foot { width: 100%; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .footer .cols > div:last-child { text-align: left; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .grid.cats, .grid.cards, .qualbar, .stat-grid { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr; }
  .footer .cols > div:last-child { text-align: left; }
  .footer .cpy { justify-content: center; }
  .nav { display: none; }
  .form .row2 { grid-template-columns: 1fr; }
}
