:root {
  --ink: #18222e;
  --muted: #5b6675;
  --brand: #0f5d63;
  --brand-600: #14706f;
  --brand-50: #eef5f4;
  --bg: #f6f7f6;
  --card: #ffffff;
  --line: #e4e8e7;
  --ok: #2e7d5b;
  --warn: #b06a2c;
  --danger: #b23b3b;
  --shadow: 0 1px 2px rgba(24,34,46,.04), 0 8px 24px rgba(24,34,46,.06);
  --radius: 14px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Hiragino Sans GB", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand .brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 8px; color: var(--muted);
  font-size: 14px; transition: background .15s, color .15s;
}
.nav a:hover, .nav a.active { background: var(--brand-50); color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-50); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: #fff; color: var(--danger); border-color: #e8c9c9; }
.btn-danger:hover { background: #fdf3f3; }
.btn-ok { background: #fff; color: var(--ok); border-color: #cfe6da; }
.btn-ok:hover { background: #f1faf6; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 36px; }
.hero h1 { font-size: 32px; line-height: 1.35; margin: 0 0 14px; letter-spacing: .5px; }
.hero p { font-size: 16px; color: var(--muted); max-width: 640px; margin: 0 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats .stat .num { font-size: 22px; font-weight: 700; color: var(--brand); }
.hero-stats .stat .label { font-size: 13px; color: var(--muted); }

/* ---------- Section ---------- */
.section { padding: 30px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { font-size: 22px; margin: 0; letter-spacing: .5px; }
.section-head .sub { color: var(--muted); font-size: 14px; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; align-items: center; gap: 14px; transition: all .15s;
}
.cat-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--brand-50);
  color: var(--brand); display: grid; place-items: center; flex: none;
}
.cat-icon svg { width: 24px; height: 24px; }
.cat-card .cat-name { font-weight: 600; font-size: 15px; }
.cat-card .cat-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Listing grid ---------- */
.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: all .15s; display: flex; flex-direction: column;
}
.card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-3px); }
.card-img { aspect-ratio: 16/9; background: var(--brand-50); position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img svg { width: 100%; height: 100%; }
.card-cat {
  position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92);
  color: var(--brand); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.5; margin: 0; }
.card-summary { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; font-size: 12.5px; color: var(--muted); }
.card-meta .loc { display: inline-flex; align-items: center; gap: 4px; }
.card-meta .loc svg { width: 14px; height: 14px; }
.card-publisher { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 13px; color: var(--muted); }
.card-publisher strong { color: var(--ink); font-weight: 600; margin-right: 4px; }
.card-publisher .ic-sm { display: inline-flex; align-items: center; }
.card-publisher .ic-sm svg { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; color: var(--ok); }
.card-publisher .login-link { color: var(--brand); font-weight: 600; font-size: 12.5px; }

/* ---------- 后台：信息发布人 ---------- */
.merchant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.merchant-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 16px; }
.merchant-card .m-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.merchant-card .m-head strong { font-size: 16px; }
.merchant-card .m-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.merchant-card .m-img { margin: 0; }
.merchant-card .m-img figcaption { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.merchant-card .m-img img { width: 100%; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; background: #f3f5f7; }
.merchant-card .m-note { margin-top: 12px; font-size: 12px; color: var(--warn); background: #fdf6ee; border: 1px solid #f3e2cf; border-radius: 8px; padding: 8px 10px; }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.chip {
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.search-box { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-box input {
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
  width: 240px; font-family: inherit; outline: none;
}
.search-box input:focus { border-color: var(--brand); }

/* ---------- Forms ---------- */
.auth-wrap, .form-wrap { max-width: 460px; margin: 40px auto; }
.form-wrap-wide { max-width: 720px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
}
.panel h1 { font-size: 22px; margin: 0 0 6px; }
.panel .panel-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; outline: none; background: #fff; color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin: 6px 0 18px; }
.check-row input { margin-top: 4px; width: 16px; height: 16px; flex: none; accent-color: var(--brand); }
.check-row a { color: var(--brand); text-decoration: underline; }
.form-msg { font-size: 13.5px; margin: 4px 0 14px; padding: 10px 12px; border-radius: 10px; }
.form-msg.err { background: #fdf3f3; color: var(--danger); border: 1px solid #f0d4d4; }
.form-msg.ok { background: #f1faf6; color: var(--ok); border: 1px solid #cfe6da; }

/* ---------- Detail ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.detail-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-card-head { display: flex; align-items: center; gap: 12px; }
.side-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 700; flex: none; }
.side-card-title { min-width: 0; }
.side-name { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.side-role { font-size: 13px; color: var(--muted); margin-top: 4px; }
.side-divider { height: 1px; background: var(--line); margin: 16px 0; }
.side-phone { display: flex; flex-direction: column; }
.side-tel { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--brand-50); border: 1px solid #cfe3e1; border-radius: 10px; color: var(--ink); }
.side-tel .ic { background: #fff; }
.side-tel .num { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; color: var(--brand); }
.side-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); }
.side-locked { display: flex; flex-direction: column; }
.side-locked-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 14px; }
.side-tip { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.6; }
@media (max-width: 960px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}
.detail-hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.detail-hero .detail-img { aspect-ratio: 21/9; background: var(--brand-50); }
.detail-hero .detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-body { padding: 26px; }
.detail-title { font-size: 26px; margin: 0 0 10px; line-height: 1.4; }
.detail-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.tag { background: var(--brand-50); color: var(--brand); font-size: 13px; padding: 5px 12px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; }
.tag svg { width: 15px; height: 15px; }
.detail-content { font-size: 15.5px; line-height: 1.9; white-space: pre-wrap; color: #28323d; }
.detail-content p { margin: 0 0 14px; }
.contact-box {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-top: 22px;
}
.contact-box h3 { margin: 0 0 14px; font-size: 16px; }
.contact-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.contact-row:last-child { border-bottom: none; }
.contact-row .ic { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.contact-row .ic svg { width: 17px; height: 17px; }
.contact-row .val { font-weight: 600; }
.phone-locked { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px dashed var(--brand); border-radius: 10px; padding: 12px 14px; }
.phone-locked .lock-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.phone-locked .lock-ic svg { width: 17px; height: 17px; }

/* ---------- Generic content pages ---------- */
.content-page { max-width: 820px; margin: 40px auto; }
.content-page .panel { padding: 38px; }
.content-page h1 { font-size: 28px; margin: 0 0 8px; }
.content-page h2 { font-size: 19px; margin: 28px 0 10px; }
.content-page p, .content-page li { color: #2b3540; font-size: 15px; line-height: 1.9; }
.content-page ul { padding-left: 20px; }
.biz-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 12px 0; }
.biz-list .item { display: flex; align-items: center; gap: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: 14.5px; color: #2b3540; }

/* 服务流程（about 页） */
.flow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 12px 0 18px; }
.flow .step { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 16px; position: relative; }
.flow .step .no { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; display: inline-grid; place-items: center; margin-bottom: 10px; }
.flow .step h3 { font-size: 16px; margin: 0 0 6px; color: #1c2530; }
.flow .step p { margin: 0; color: #4a5562; font-size: 14px; line-height: 1.7; }
@media (min-width: 720px) {
  .flow { grid-template-columns: repeat(4, 1fr); }
}

/* 通用 icon 容器（任何页面共用，避免 SVG 被父容器撑开成巨幅） */
.ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--brand-50); color: var(--brand); vertical-align: middle; flex: none; }
.ic svg { width: 15px; height: 15px; display: block; }
/* 业务方向卡片里的图标：克制小尺寸 + 淡灰底，避免抢戏 */
.biz-list .item .ic { width: 28px; height: 28px; border-radius: 7px; background: #eef1f4; color: #4b5664; }
.biz-list .item .ic svg { width: 14px; height: 14px; }
/* 暗色 footer 里的 icon */
.site-footer .ic { background: rgba(255,255,255,0.10); color: #ffffff; margin-right: 6px; }
.footer-col p.ic-row { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; }

/* ---------- Disclaimer ---------- */
.notice {
  background: var(--brand-50); border: 1px solid #cfe3e1; border-radius: 12px;
  padding: 14px 18px; font-size: 13.5px; color: #255a59; display: flex; gap: 10px; align-items: flex-start;
}
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* ---------- Admin ---------- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; margin: 30px 0; }
.admin-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; height: fit-content; }
.admin-side a { display: block; padding: 10px 14px; border-radius: 9px; color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.admin-side a:hover, .admin-side a.active { background: var(--brand-50); color: var(--brand); }
.admin-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 22px; }
.admin-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.admin-stat .n { font-size: 26px; font-weight: 700; color: var(--brand); }
.admin-stat .l { color: var(--muted); font-size: 13.5px; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 13px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.table th { background: #fafbfb; color: var(--muted); font-weight: 600; font-size: 13px; }
.table tr:last-child td { border-bottom: none; }
.table .actions { display: flex; gap: 8px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-pending { background: #fdf3e7; color: var(--warn); }
.badge-approved { background: #eefaf3; color: var(--ok); }
.badge-rejected { background: #fdf0f0; color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------- Footer ---------- */
.site-footer { background: #14202b; color: #c7d0d8; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 44px 0 30px; max-width: 760px; margin: 0 auto; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-brand .sub { font-size: 13px; color: #9fb0bd; font-weight: 400; }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.footer-col a, .footer-col p { display: block; color: #c7d0d8; font-size: 13.5px; margin: 0 0 9px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #25333f; padding: 18px 0; font-size: 13px; color: #93a3b0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom a { color: #c7d0d8; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin: 28px 0; }
.pager button { padding: 8px 14px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; font-family: inherit; font-size: 14px; color: var(--muted); }
.pager button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Modal ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(20,32,43,.5); display: none; place-items: center; z-index: 100; padding: 20px; }
.modal-mask.show { display: grid; }
.modal { background: #fff; border-radius: var(--radius); padding: 26px; width: 100%; max-width: 420px; }
.modal h3 { margin: 0 0 14px; font-size: 18px; }
.modal textarea { width: 100%; min-height: 90px; border: 1px solid var(--line); border-radius: 10px; padding: 11px; font-family: inherit; font-size: 14px; resize: vertical; outline: none; }
.modal textarea:focus { border-color: var(--brand); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .biz-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cat-grid, .listing-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .nav a { padding: 8px 9px; font-size: 13px; }
  .search-box { width: 100%; }
  .search-box input { width: 100%; }
  .field-row { flex-direction: column; gap: 0; }
}
