/* ==========================================================================
   base.css — 重置、变量、布局骨架、按钮、表单、页头页脚
   ========================================================================== */

:root {
  --primary: #f26a21;
  --primary-dark: #d8560f;
  --primary-soft: #fff3eb;
  --primary-line: #ffd9bf;
  --text: #1f2329;
  --text-2: #5a6270;
  --text-3: #8a94a6;
  --border: #e8eaef;
  --bg: #f5f7fa;
  --white: #ffffff;
  --ok: #0f9d58;
  --warn: #e8a33d;
  --danger: #e05252;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 2px 10px rgba(31, 35, 41, .06);
  --shadow-lg: 0 8px 28px rgba(31, 35, 41, .1);
  --container: 1200px;
}

* { box-sizing: border-box; }

html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, figure, form { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { border: 0; max-width: 100%; vertical-align: middle; }
a { color: inherit; text-decoration: none; transition: color .18s; }
a:hover { color: var(--primary); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }
button { cursor: pointer; border: 0; background: none; }
table { border-collapse: collapse; width: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 30px; line-height: 1.35; font-weight: 600; }
h2 { font-size: 24px; line-height: 1.4; font-weight: 600; }
h3 { font-size: 18px; line-height: 1.5; font-weight: 600; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; border: 1px solid transparent;
  transition: all .18s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn-outline:hover { background: var(--primary-soft); }
.btn-ghost { border-color: var(--border); color: var(--text-2); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { height: 48px; padding: 0 34px; font-size: 16px; border-radius: 10px; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.field .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff; transition: border-color .18s, box-shadow .18s;
}
.textarea { height: auto; min-height: 100px; padding: 10px 14px; line-height: 1.7; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(242, 106, 33, .12);
}
.input::placeholder, .textarea::placeholder { color: #b6bcc7; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%238a94a6' stroke-width='1.6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.form-tip { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ---------- 顶部通栏 ---------- */
.topbar { background: #2a2f38; color: rgba(255, 255, 255, .72); font-size: 13px; height: 36px; line-height: 36px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a:hover { color: #fff; }
.topbar .tb-right { display: flex; align-items: center; gap: 18px; }
.topbar .tb-tel b { color: #ffb27a; font-weight: 600; letter-spacing: .3px; }

/* ---------- 页头 ---------- */
.header { background: #fff; border-bottom: 1px solid var(--border); }
.header .container { display: flex; align-items: center; height: 76px; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.logo-text { line-height: 1.15; }
.logo-text b { display: block; font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.logo-text span { font-size: 11px; color: var(--text-3); letter-spacing: 1.4px; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 0; margin-left: auto; flex-wrap: nowrap; }
.nav > li > a {
  display: block; padding: 0 12px; height: 44px; line-height: 44px; white-space: nowrap;
  font-size: 15px; color: var(--text); border-radius: var(--radius); position: relative;
}
.nav > li > a:hover { color: var(--primary); background: var(--primary-soft); }
.nav > li.active > a { color: var(--primary); font-weight: 600; }
.nav > li.active > a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--primary); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-search { position: relative; }
.header-search .input { width: 168px; height: 38px; padding-left: 36px; border-radius: 19px; background: var(--bg); border-color: transparent; }
.header-search .input:focus { background: #fff; border-color: var(--primary); }
.header-search .hs-icon { position: absolute; left: 13px; top: 11px; pointer-events: none; }

.user-chip {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px;
  border-radius: 19px; background: var(--primary-soft); color: var(--primary-dark); font-size: 13px;
}
.user-chip .av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}

/* ---------- 面包屑 ---------- */
.crumb { background: var(--bg); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-3); }
.crumb .container { padding-top: 12px; padding-bottom: 12px; }
.crumb a:hover { color: var(--primary); }
.crumb .sep { margin: 0 7px; color: #c6ccd6; }

/* ---------- 区块标题 ---------- */
.sec-head { text-align: center; margin-bottom: 34px; }
.sec-head h2 { font-size: 28px; font-weight: 600; }
.sec-head p { color: var(--text-3); margin-top: 8px; font-size: 14px; }
.sec-head.left { text-align: left; }
.sec-head.left .sec-more { float: right; margin-top: 6px; font-size: 13px; color: var(--text-3); }

/* ---------- 页脚 ---------- */
.footer { background: #23272e; color: rgba(255, 255, 255, .62); padding: 46px 0 0; margin-top: 60px; font-size: 13px; }
.footer .ft-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 34px; padding-bottom: 34px; }
.footer h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.footer li { margin-bottom: 9px; }
.footer a:hover { color: var(--primary); }
.footer .ft-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer .ft-logo b { color: #fff; font-size: 18px; }
.footer .ft-tel { color: #ffb27a; font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.footer .ft-note { font-size: 12px; color: rgba(255, 255, 255, .4); margin-top: 4px; }
.footer .ft-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 0; font-size: 12px; color: rgba(255, 255, 255, .42); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- 通用小件 ---------- */
.tag { display: inline-block; padding: 2px 9px; border-radius: 4px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; line-height: 18px; }
.tag-gray { background: var(--bg); color: var(--text-2); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; line-height: 20px; }
.badge.ok { background: #e8f6ee; color: var(--ok); }
.badge.warn { background: #fdf3e3; color: var(--warn); }
.badge.info { background: #e9f1fd; color: #2f6fd0; }
.badge.muted { background: var(--bg); color: var(--text-3); }

.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); transition: box-shadow .2s, transform .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-line); transform: translateY(-2px); }

.empty { text-align: center; padding: 70px 20px; color: var(--text-3); }
.empty b { display: block; font-size: 16px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 34px; }
.pager a, .pager span { min-width: 34px; height: 34px; line-height: 32px; text-align: center; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: var(--text-2); background: #fff; }
.pager .on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager a:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 悬浮咨询条 ---------- */
.side-float { position: fixed; right: 18px; bottom: 90px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.side-float a, .side-float button {
  width: 52px; height: 52px; border-radius: 12px; background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; font-size: 11px; color: var(--text-2);
}
.side-float .sf-main { background: var(--primary); border-color: var(--primary); color: #fff; }
.side-float a:hover, .side-float button:hover { border-color: var(--primary); color: var(--primary); }
.side-float .sf-main:hover { background: var(--primary-dark); color: #fff; }
.side-float .wechat-pop {
  display: none; position: absolute; right: 62px; bottom: 0; width: 224px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.14);
  padding: 14px; text-align: center;
}
.side-float .wechat-pop.show { display: block; }
.wechat-pop img { width: 192px; height: 192px; display: block; margin: 0 auto; border-radius: 6px; }
.wechat-pop p { margin: 10px 0 2px; font-size: 14px; color: var(--text, #333); }
.wechat-pop em { font-style: normal; font-size: 12px; color: #8a94a0; }

/* ---------- FAQ 折叠 ---------- */
.faq-list li { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: #fff; overflow: hidden; }
.faq-list .faq-q { padding: 14px 16px; cursor: pointer; font-size: 14px; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.faq-list .faq-q .q-mark { color: var(--primary); font-weight: 700; flex-shrink: 0; }
.faq-list .faq-a { display: none; padding: 0 16px 15px 32px; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.faq-list li.on .faq-a { display: block; }
.faq-list .faq-q .arrow { margin-left: auto; color: var(--text-3); transition: transform .2s; flex-shrink: 0; }
.faq-list li.on .faq-q .arrow { transform: rotate(180deg); }

/* ---------- 师傅头像 ---------- */
.person-av {
  width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary-dark); display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; flex-shrink: 0;
}

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; top: 88px; transform: translateX(-50%) translateY(-14px);
  background: #23272e; color: #fff; padding: 11px 22px; border-radius: 8px; font-size: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: all .24s; z-index: 999;
}
.toast.on { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b93b3b; }

@media (max-width: 960px) {
  .nav, .header-search, .topbar .tb-right li:not(:last-child) { display: none; }
  .footer .ft-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 24px; }
}
