/* 沐发咨询 — 站内搜索 / 智能助手 / 顾问工作台 v1
   与 style.css 共用品牌变量：--ink #0A1420 / --blue #1E5EFF */

/* ================= 导航里的搜索入口 ================= */
.nav-search-btn {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px 0 11px; margin-left: 10px;
  border: 1px solid rgba(255,255,255,.20); border-radius: 18px;
  background: rgba(255,255,255,.05); color: rgba(255,255,255,.72);
  font-size: 12.5px; font-weight: 500; cursor: pointer; flex-shrink: 0;
  transition: border-color .2s, background .2s, color .2s;
}
.nav-search-btn:hover { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.11); color: #fff; }
.nav-search-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.nav-search-btn kbd {
  font: inherit; font-size: 10.5px; letter-spacing: .02em;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.62);
}
@media (max-width: 1180px) { .nav-search-btn kbd { display: none; } }
@media (max-width: 980px) { .nav-search-btn span { display: none; } .nav-search-btn { padding: 0; width: 34px; justify-content: center; } }
@media (max-width: 820px) { .nav-search-btn { display: none; } }

/* 移动端菜单内的搜索行 */
.m-nav-search {
  display: none; align-items: center; gap: 9px;
  margin: 4px 0 12px; padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 9px;
  background: rgba(255,255,255,.05); color: rgba(255,255,255,.65);
  font-size: 13.5px; cursor: pointer; font-family: inherit; text-align: left; width: 100%;
}
.m-nav-search:hover { background: rgba(255,255,255,.1); color: #fff; }
@media (max-width: 820px) { .m-nav-search { display: flex; } }

/* ================= 站内搜索面板 ================= */
.qs { position: fixed; inset: 0; z-index: 600; display: none; }
.qs.open { display: block; }
.qs-bd { position: absolute; inset: 0; background: rgba(6,13,22,.62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: qsFade .18s ease; }
.qs-panel {
  position: relative; width: min(760px, calc(100% - 28px));
  margin: 11vh auto 0; background: #fff; border-radius: 14px;
  box-shadow: 0 50px 120px -34px rgba(0,0,0,.7); overflow: hidden;
  display: flex; flex-direction: column; max-height: 74vh;
  animation: qsUp .24s var(--ease);
}
.qs-top { display: flex; align-items: center; gap: 13px; padding: 17px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.qs-top > svg { width: 17px; height: 17px; color: var(--text-3); flex-shrink: 0; }
.qs-input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16.5px; font-weight: 500; color: var(--ink); font-family: inherit; }
.qs-input::placeholder { color: var(--text-3); font-weight: 400; }
.qs-kbd { font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; flex-shrink: 0; }
.qs-chips { display: flex; gap: 7px; padding: 11px 18px; overflow-x: auto; border-bottom: 1px solid var(--line); background: #FAFBFD; flex-shrink: 0; scrollbar-width: none; }
.qs-chips::-webkit-scrollbar { display: none; }
.qs-chip {
  font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  border-radius: 14px; padding: 5px 12px; transition: all .16s;
}
.qs-chip:hover { border-color: rgba(30,94,255,.34); color: var(--blue); }
.qs-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.qs-res { overflow-y: auto; padding: 8px; flex: 1; }
.qs-item { display: block; padding: 12px 14px; border-radius: 9px; cursor: pointer; }
.qs-item:hover, .qs-item.on { background: #F2F6FF; }
.qs-g { font-size: 10px; font-weight: 700; letter-spacing: .11em; color: var(--blue); text-transform: uppercase; }
.qs-t { font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 3px 0 4px; line-height: 1.45; }
.qs-d { font-size: 12.5px; color: var(--text-2); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qs-t mark, .qs-d mark { background: rgba(30,94,255,.15); color: var(--blue-dk); border-radius: 2px; padding: 0 1px; font-weight: 700; }
.qs-hits { font-size: 11px; color: var(--text-3); padding: 10px 20px 6px; flex-shrink: 0; }
.qs-empty { padding: 42px 24px 36px; text-align: center; }
.qs-empty h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.qs-empty p { font-size: 12.5px; color: var(--text-2); margin-bottom: 18px; }
.qs-empty .btn { height: 40px; padding: 0 22px; font-size: 13px; }
.qs-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 18px; border-top: 1px solid var(--line); background: #FAFBFD;
  font-size: 11px; color: var(--text-3); flex-shrink: 0;
}
.qs-foot .keys { display: flex; gap: 12px; }
.qs-foot b { font-weight: 600; color: var(--text-2); }
@keyframes qsFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qsUp { from { opacity: 0; transform: translateY(-10px) scale(.99); } to { opacity: 1; transform: none; } }
@media (max-width: 820px) {
  .qs-panel { margin-top: 6vh; max-height: 82vh; }
  .qs-foot .keys { display: none; }
}

/* ================= 智能助手 ================= */
.bot-btn {
  position: fixed; right: 28px; bottom: 96px; z-index: 190;   /* 抬到 96px，给右下角 Knocket 气泡让位 */
  display: flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 20px 0 15px; border: 0; border-radius: 24px;
  background: var(--ink); color: #fff; font-family: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 16px 40px -14px rgba(10,20,32,.72);
  transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
.bot-btn:hover { background: var(--blue); transform: translateY(-2px); box-shadow: 0 20px 44px -14px rgba(30,94,255,.6); }
.bot-btn:active { transform: scale(.97); }
.bot-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.bot-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: #38E08A; box-shadow: 0 0 0 3px rgba(56,224,138,.22); }
.bot-btn.hide { opacity: 0; visibility: hidden; transform: translateY(8px); }

.bot-panel {
  position: fixed; right: 28px; bottom: 84px; z-index: 480;
  width: 388px; height: min(640px, calc(100vh - 132px));
  background: #fff; border-radius: 15px; overflow: hidden;
  box-shadow: 0 44px 100px -32px rgba(6,13,22,.6), 0 0 0 1px rgba(10,20,32,.06);
  display: none; flex-direction: column;
}
.bot-panel.open { display: flex; animation: qsUp .24s var(--ease); }
.bot-head {
  display: flex; align-items: center; gap: 11px; padding: 15px 16px;
  background: linear-gradient(135deg, #0A1420 0%, #12233A 62%, #17304F 100%);
  color: #fff; flex-shrink: 0;
}
.bot-ava {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), #4E86FF);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.bot-head .who { flex: 1; line-height: 1.35; }
.bot-head strong { font-size: 13.5px; font-weight: 600; display: block; }
.bot-head small { font-size: 10.5px; color: rgba(255,255,255,.52); display: flex; align-items: center; gap: 5px; }
.bot-head small i { width: 5px; height: 5px; border-radius: 50%; background: #38E08A; display: inline-block; }
.bot-x { background: none; border: 0; color: rgba(255,255,255,.6); font-size: 17px; cursor: pointer; padding: 4px 2px; line-height: 1; }
.bot-x:hover { color: #fff; }
.bot-body { flex: 1; overflow-y: auto; padding: 18px 16px 10px; background: #F6F8FC; display: flex; flex-direction: column; gap: 11px; scrollbar-width: thin; }
.msg { max-width: 88%; font-size: 13px; line-height: 1.72; border-radius: 13px; padding: 11px 14px; word-break: break-word; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--ink); }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.msg.me a { color: #fff; }
.msg b { font-weight: 700; }
.msg ul { margin: 7px 0 2px; padding-left: 15px; }
.msg li { margin: 3px 0; }
.msg .lnk {
  display: inline-flex; align-items: center; gap: 4px; margin: 7px 7px 0 0;
  font-size: 12px; font-weight: 600; color: var(--blue);
  border: 1px solid rgba(30,94,255,.3); background: #fff;
  border-radius: 13px; padding: 4px 11px; text-decoration: none;
}
.msg .lnk:hover { background: rgba(30,94,255,.06); }
.typing { display: flex; gap: 4px; align-items: center; height: 14px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: botBlink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .16s; }
.typing i:nth-child(3) { animation-delay: .32s; }
@keyframes botBlink { 0%, 60%, 100% { opacity: .28; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.bot-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 11px; background: #F6F8FC; flex-shrink: 0; }
.chip {
  font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
  border: 1px solid rgba(30,94,255,.3); background: #fff; color: var(--blue);
  border-radius: 14px; padding: 6px 12px; transition: background .16s, border-color .16s;
}
.chip:hover { background: rgba(30,94,255,.07); border-color: rgba(30,94,255,.55); }

.bot-input { display: flex; gap: 8px; padding: 11px 12px; border-top: 1px solid var(--line); background: #fff; flex-shrink: 0; }
.bot-input input {
  flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 20px;
  padding: 0 15px; font-size: 13px; font-family: inherit; color: var(--ink); outline: 0; background: #F8FAFD;
  transition: border-color .16s, background .16s;
}
.bot-input input:focus { border-color: rgba(30,94,255,.5); background: #fff; }
.bot-send {
  width: 40px; height: 40px; border-radius: 50%; border: 0; flex-shrink: 0;
  background: var(--blue); color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background .16s, transform .16s;
}
.bot-send:hover { background: var(--blue-dk); }
.bot-send:active { transform: scale(.94); }

/* 机器人内表单 */
.bform { align-self: stretch; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.bform label { font-size: 11px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; }
.bform input, .bform textarea, .bform select {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px;
  font-size: 12.5px; font-family: inherit; color: var(--ink); outline: 0; background: #FBFCFE;
}
.bform textarea { resize: vertical; min-height: 56px; }
.bform input:focus, .bform textarea:focus, .bform select:focus { border-color: rgba(30,94,255,.5); background: #fff; }
.bform .row { display: flex; gap: 9px; }
.bform .row > div { flex: 1; }
.bform button {
  height: 38px; border: 0; border-radius: 19px; background: var(--blue); color: #fff;
  font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; margin-top: 2px;
}
.bform button:hover { background: var(--blue-dk); }
.bform .note { font-size: 10.5px; color: var(--text-3); line-height: 1.6; }

@media (max-width: 820px) {
  .bot-btn { right: 16px; bottom: 86px; height: 44px; padding: 0 16px 0 13px; font-size: 12.5px; }
  .bot-panel { right: 10px; left: 10px; bottom: 76px; width: auto; height: min(600px, calc(100vh - 110px)); }
  .bot-btn.hide { opacity: 0; }
  .to-top { right: 16px; bottom: 22px; }
}

/* ================= 顾问工作台（advisor.html） ================= */
.adv-hero { background: radial-gradient(120% 140% at 12% 0%, #17304F 0%, #0A1420 52%, #060D16 100%); color: #fff; padding: 78px 0 54px; }
.adv-hero .kicker { font-size: 11px; font-weight: 700; letter-spacing: .22em; color: var(--blue-light); text-transform: uppercase; }
.adv-hero h1 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; line-height: 1.2; margin: 14px 0 16px; letter-spacing: -.01em; }
.adv-hero p { font-size: 14px; line-height: 1.8; color: var(--text-on-dark); max-width: 660px; }
.adv-hero .tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.adv-hero .tools button, .adv-hero .tools a {
  height: 38px; padding: 0 18px; border-radius: 19px; font-size: 12.5px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.05); color: #fff;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
}
.adv-hero .tools button:hover, .adv-hero .tools a:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.5); }
.adv-hero .tools .solid { background: var(--blue); border-color: var(--blue); }
.adv-hero .tools .solid:hover { background: var(--blue-dk); }
.adv-hero .note { margin-top: 18px; font-size: 11.5px; color: rgba(255,255,255,.44); line-height: 1.75; max-width: 620px; }
.adv-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; }
.adv-back:hover { color: var(--blue); }
.copy-box { position: relative; }
.copy-box button {
  position: absolute; top: 10px; right: 10px; height: 28px; padding: 0 12px;
  font-size: 11.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text-2);
}
.copy-box button:hover { border-color: rgba(30,94,255,.4); color: var(--blue); }

.adv-sec { padding: 46px 0; }
.adv-sec + .adv-sec { border-top: 1px solid var(--line); }
.adv-sec h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.adv-sec .sub { font-size: 12.5px; color: var(--text-3); margin-bottom: 22px; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (min-width: 1180px) { .kpi-row { grid-template-columns: repeat(5, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.kpi .n { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.kpi .n small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.kpi .l { font-size: 11.5px; color: var(--text-2); margin-top: 6px; }

.adv-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: start; }
.adv-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 22px 24px; }
.adv-card h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.adv-card .hint { font-size: 11.5px; color: var(--text-3); margin-bottom: 16px; }

.trail { list-style: none; }
.trail li { position: relative; padding: 0 0 17px 22px; border-left: 1px solid var(--line); }
.trail li:last-child { padding-bottom: 0; border-left-color: transparent; }
.trail li::before {
  content: ''; position: absolute; left: -4.5px; top: 5px;
  width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid var(--blue);
}
.trail .t { font-size: 13px; font-weight: 600; color: var(--ink); }
.trail .m { font-size: 11px; color: var(--text-3); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.trail .m span { display: inline-flex; align-items: center; gap: 4px; }
.trail .dw { font-size: 11px; color: var(--blue); font-weight: 600; }

.tagrow { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 12px; background: var(--bg-tint); color: var(--blue-dk); }
.tag.hot { background: var(--blue); color: #fff; }
.tag.ghost { background: #F2F4F8; color: var(--text-2); }

.lead { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; background: #FCFDFF; }
.lead .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lead .nm { font-size: 14px; font-weight: 700; }
.lead .co { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.lead .lv { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border-radius: 10px; background: rgba(30,94,255,.1); color: var(--blue); white-space: nowrap; }
.lead .lv.a { background: #E7F6EE; color: #12794C; }
.lead .need { font-size: 12.5px; color: var(--text-2); line-height: 1.7; margin-top: 10px; }
.lead .meta { font-size: 11px; color: var(--text-3); margin-top: 9px; display: flex; gap: 14px; flex-wrap: wrap; }

.script { background: #FAFBFD; border: 1px dashed rgba(30,94,255,.3); border-radius: 10px; padding: 16px 18px; font-size: 13px; line-height: 1.85; color: var(--ink-soft); }
.script .lb { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--blue); margin-bottom: 7px; }
.script p + p { margin-top: 9px; }

.empty-box { text-align: center; padding: 46px 20px; border: 1px dashed var(--line); border-radius: 11px; }
.empty-box strong { display: block; font-size: 14px; margin-bottom: 8px; }
.empty-box p { font-size: 12.5px; color: var(--text-2); line-height: 1.75; }

@media (max-width: 980px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .adv-grid { grid-template-columns: 1fr; }
}

/* 渠道归因 */
.src-line { font-size: 12.5px; color: var(--text-2); line-height: 1.9; }
.src-line b { color: var(--ink); font-weight: 700; }
.src-line .ch { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--blue-dk); }
.src-note { font-size: 11px; color: var(--text-3); line-height: 1.7; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.utm-builder { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px; align-items: end; }
.utm-builder label { display: block; font-size: 11px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.utm-builder input, .utm-builder select {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 7px;
  padding: 0 11px; font-size: 12.5px; font-family: inherit; color: var(--ink); background: #FBFCFE; outline: 0;
}
.utm-builder input:focus, .utm-builder select:focus { border-color: rgba(30,94,255,.5); background: #fff; }
.utm-out {
  margin-top: 14px; display: flex; gap: 10px; align-items: center;
  background: #F7F9FC; border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px;
}
.utm-out code { flex: 1; font-size: 12px; color: var(--ink-soft); word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; }
.utm-out button {
  flex-shrink: 0; height: 30px; padding: 0 14px; border-radius: 15px; border: 0;
  background: var(--blue); color: #fff; font-size: 11.5px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.utm-out button:hover { background: var(--blue-dk); }
.utm-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
@media (max-width: 980px) { .utm-builder { grid-template-columns: 1fr 1fr; } }

/* 页脚联系方式 */
.footer-contact { font-size: 12px; color: rgba(255,255,255,.62); line-height: 1.9; margin-top: 10px; }
.footer-contact a { color: rgba(255,255,255,.85); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); }
.footer-contact a:hover { color: #fff; border-color: rgba(255,255,255,.6); }
