/* =============================================================
   民宿全景获客增益系统 —— 移动端（Vue3）样式
   北京心商科技有限责任公司
   ============================================================= */
:root {
  --ink: #12201E;
  --tea: #1F4E4A;
  --tea-2: #2E7D6B;
  --amber: #E8A33D;
  --clay: #C96F4A;
  --paper: #F6F4EF;
  --card: #FFFFFF;
  --line: #E7E3DA;
  --text: #232B2A;
  --text-2: #4A5654;
  --muted: #8A9490;
  --danger: #C0392B;
  --nav-h: 48px;
  --tab-h: 56px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --num: "DIN Alternate", "Bahnschrift", var(--font);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: var(--paper); -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
[v-cloak] { display: none; }

.app-shell { display: flex; flex-direction: column; height: 100vh; }

/* 顶部导航 */
.m-nav {
  height: calc(var(--nav-h) + var(--sat)); padding-top: var(--sat);
  background: linear-gradient(135deg, #12201E, #1F4E4A 60%, #2E7D6B);
  color: #fff; display: flex; align-items: center; gap: 10px; padding-left: 12px; padding-right: 12px;
  position: sticky; top: 0; z-index: 30; box-shadow: 0 6px 18px -12px rgba(18,32,30,.9);
}
.m-nav .nav-title { font-size: 16px; font-weight: 700; letter-spacing: .4px; flex: 1; }
.m-nav .nav-sub { font-size: 10.5px; opacity: .72; letter-spacing: 1.4px; }
.m-nav .nav-btn {
  width: 34px; height: 34px; border: none; border-radius: 10px; background: rgba(255,255,255,.14);
  color: #fff; font-size: 17px; display: inline-flex; align-items: center; justify-content: center;
}
.m-nav .nav-btn:active { background: rgba(255,255,255,.28); }

/* 内容区 */
.m-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px calc(16px + var(--sab)); }
.m-body.no-tab { padding-bottom: calc(16px + var(--sab)); }

/* 底部 Tab */
.m-tab {
  height: calc(var(--tab-h) + var(--sab)); padding-bottom: var(--sab);
  display: flex; background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 30;
}
.m-tab .t {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--muted); font-size: 10.5px; position: relative;
}
.m-tab .t i { font-size: 20px; }
.m-tab .t.on { color: var(--tea); font-weight: 600; }
.m-tab .t.on::before {
  content: ''; position: absolute; top: 0; width: 22px; height: 2.5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--tea-2), var(--amber));
}

/* 通用 */
.card { background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(18,32,30,.05); overflow: hidden; }
.card + .card { margin-top: 12px; }
.card-hd { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.card-hd h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.card-hd h3 i { color: var(--tea-2); }
.card-bd { padding: 12px 14px; }

.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-1 { flex: 1; min-width: 0; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.t-muted { color: var(--muted); }
.t-sm { font-size: 12.5px; }
.t-xs { font-size: 11px; }
.t-right { text-align: right; }
.t-center { text-align: center; }
.t-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ell-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.strong { font-weight: 600; }
.numb { font-family: var(--num); letter-spacing: .3px; }
.wrap { flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; background: #E6F0EC; color: var(--tea); }
.badge.ok { background: #E5F4F0; color: #1F8A70; }
.badge.warn { background: #FDF3E2; color: #9A6A12; }
.badge.danger { background: #FBEAE8; color: var(--danger); }
.badge.info { background: #E8F0F6; color: #2B5B84; }
.badge.muted { background: #F0F1EF; color: var(--muted); }
.chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; background: var(--paper); color: var(--text-2); border: 1px solid var(--line); }
.chip.on { background: var(--tea); border-color: var(--tea); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 38px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 13.5px; font-family: inherit;
}
.btn:active { opacity: .82; }
.btn-primary { background: linear-gradient(135deg, var(--tea-2), var(--tea)); border-color: transparent; color: #fff; font-weight: 600; }
.btn-amber { background: linear-gradient(135deg, #F3C070, var(--amber)); border-color: transparent; color: #4A3208; font-weight: 600; }
.btn-block { width: 100%; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 9px; }
.btn-danger { color: var(--danger); border-color: #F0D3CF; }

.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; font-size: 14px; font-family: inherit; color: var(--text); outline: none;
}
.textarea { height: auto; min-height: 84px; padding: 10px 13px; line-height: 1.65; resize: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--tea-2); box-shadow: 0 0 0 3px rgba(46,125,107,.12); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238A9490'%3E%3Cpath d='M12 14.6l-5-5 1.1-1.1L12 12.4l3.9-3.9L17 9.6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 17px; }
.form-item { margin-bottom: 12px; }
.form-label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.form-label .req { color: var(--clay); }

/* 统计 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.stat {
  background: #fff; border-radius: 14px; padding: 12px; position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(18,32,30,.05);
}
.stat::after { content: ''; position: absolute; right: -18px; top: -18px; width: 56px; height: 56px; border-radius: 50%; background: var(--tea); opacity: .07; }
.stat .k { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.stat .v { font-size: 20px; font-weight: 700; font-family: var(--num); margin-top: 4px; }
.stat .v small { font-size: 11px; color: var(--muted); font-weight: 400; }

/* 列表项 */
.li {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.li:last-child { border-bottom: none; }
.li:active { background: #FAFBF9; }
.li .ic {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
  background: #E6F0EC; color: var(--tea);
}
.li .main { flex: 1; min-width: 0; }
.li .main .t { font-size: 14px; font-weight: 600; }
.li .main .d { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.li .val { font-size: 13px; font-family: var(--num); font-weight: 600; color: var(--tea); }
.li .arrow { color: #C8CFCB; font-size: 16px; }

/* 宫格入口 */
.grid-entry { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grid-entry .ge {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 2px; border-radius: 12px;
}
.grid-entry .ge:active { background: var(--paper); }
.grid-entry .ge .ico {
  width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 21px; color: #fff;
}
.grid-entry .ge .nm { font-size: 11px; color: var(--text-2); }

/* 列表行 */
.m-list { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(18,32,30,.05); }
.m-list .it { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.m-list .it:last-child { border-bottom: none; }
.m-list .it:active { background: #FAFBF9; }
.m-list .it .l1 { display: flex; align-items: center; gap: 8px; }
.m-list .it .l1 .nm { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-list .it .l2 { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.m-list .it .l3 { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.m-list .it .l3 .pri { font-size: 15px; font-weight: 700; color: var(--clay); font-family: var(--num); }

/* 筛选 chips */
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 8px; }
.chips::-webkit-scrollbar { display: none; }
.chips .c { flex-shrink: 0; }

/* 面板（底部弹出） */
.sheet-mask { position: fixed; inset: 0; background: rgba(14,24,22,.45); z-index: 90; display: flex; align-items: flex-end; }
.sheet {
  width: 100%; background: #fff; border-radius: 20px 20px 0 0; max-height: 86vh; overflow-y: auto;
  padding: 16px 16px calc(18px + var(--sab)); animation: up .26s cubic-bezier(.22,.8,.3,1) both;
}
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet .sh-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet .sh-hd .tt { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.sheet .sh-hd .tt i { color: var(--tea-2); }
.sheet .sh-hd .x { width: 30px; height: 30px; border-radius: 9px; border: none; background: var(--paper); color: var(--muted); font-size: 17px; }

/* 轻提示 */
.m-toast {
  position: fixed; left: 50%; top: 22%; transform: translateX(-50%); z-index: 120;
  background: rgba(18,32,30,.92); color: #fff; padding: 10px 16px; border-radius: 11px;
  font-size: 13px; max-width: 78vw; text-align: center; animation: pop .2s both;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 骨架 */
.sk { background: linear-gradient(90deg,#EEF1EE 25%,#F7F8F6 37%,#EEF1EE 63%); background-size: 400px 100%; animation: sh 1.2s linear infinite; border-radius: 6px; height: 14px; }
@keyframes sh { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.sk-card { background: #fff; border-radius: 14px; padding: 14px; display: grid; gap: 10px; }

/* 登录 */
.login-wrap {
  min-height: 100vh; background: linear-gradient(165deg, #0E1B19, #1B403A 55%, #2E7D6B);
  display: flex; flex-direction: column; padding: 0 22px calc(22px + var(--sab));
}
.login-brand { padding-top: calc(58px + var(--sat)); text-align: center; color: #fff; }
.login-brand .lg { width: 62px; height: 62px; margin-bottom: 10px; }
.login-brand .n { font-size: 20px; font-weight: 700; letter-spacing: .6px; }
.login-brand .s { font-size: 10.5px; letter-spacing: 2px; opacity: .6; margin-top: 4px; }
.login-card { background: #fff; border-radius: 20px; padding: 20px 18px; margin-top: 26px; box-shadow: 0 22px 44px -22px rgba(0,0,0,.5); }
.login-tip { margin-top: 14px; background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 13px; color: rgba(255,255,255,.85); font-size: 11.5px; line-height: 1.8; }
.login-foot { margin-top: auto; text-align: center; color: rgba(255,255,255,.42); font-size: 11px; padding-top: 20px; }

/* 会话 */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - var(--nav-h) - var(--sat) - var(--tab-h) - var(--sab)); }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 11px; background: #F2F0EA; }
.msg { display: flex; gap: 8px; max-width: 82%; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.msg .bub { padding: 9px 12px; border-radius: 13px; font-size: 13.5px; line-height: 1.65; background: #fff; box-shadow: 0 1px 2px rgba(18,32,30,.06); word-break: break-word; }
.msg.me .bub { background: linear-gradient(135deg, var(--tea-2), var(--tea)); color: #fff; }
.msg.agent .bub { background: #FDF3E2; }
.msg.sys { max-width: 100%; margin: 0 auto; }
.msg.sys .bub { background: rgba(0,0,0,.05); color: var(--muted); font-size: 11.5px; }
.chat-input { border-top: 1px solid var(--line); background: #fff; padding: 9px 12px calc(9px + var(--sab)); }
.chat-input .tools { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; }
.chat-input .tools::-webkit-scrollbar { display: none; }
.chat-input .tools .q { flex-shrink: 0; padding: 5px 10px; border-radius: 20px; background: var(--paper); font-size: 11.5px; color: var(--text-2); border: 1px solid var(--line); }

/* 时间轴 */
.tl { padding-left: 18px; position: relative; }
.tl::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, var(--tea-2), var(--line)); border-radius: 2px; }
.tl .ti { position: relative; padding-bottom: 14px; }
.tl .ti::before { content: ''; position: absolute; left: -17px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2.5px solid var(--tea-2); }
.tl .ti .tm { font-size: 11px; color: var(--muted); font-family: var(--num); }
.tl .ti .tt { font-size: 13.5px; font-weight: 600; margin: 2px 0 3px; }
.tl .ti .dd { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }

/* 空态 */
.empty { padding: 42px 16px; text-align: center; color: var(--muted); }
.empty i { font-size: 40px; color: #D6DCD8; display: block; margin-bottom: 8px; }

/* 网格卡片 */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.pcard { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(18,32,30,.05); }
.pcard .cover { height: 96px; overflow: hidden; background: var(--paper); }
.pcard .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .bd { padding: 10px 11px 12px; }
.pcard .bd .t { font-size: 13.5px; font-weight: 600; }
.pcard .bd .d { font-size: 11px; color: var(--muted); margin-top: 4px; }
.pcard .bd .p { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; }
.pcard .bd .p .price { font-size: 16px; font-weight: 700; color: var(--clay); font-family: var(--num); }

/* 进度条 */
.bar { height: 6px; border-radius: 6px; background: #EEF1EF; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--tea-2), var(--amber)); }

/* 下拉刷新提示 */
.pull-tip { text-align: center; font-size: 11.5px; color: var(--muted); padding: 8px 0; }
