/* 融策智询 · C 端 MVP 移动端样式
   基准 390 宽；配色沿用 C 端原型 v2.8（主蓝 #1e4d8c / 背景 #eef1f5 / 卡片 #fff）。
   扁平化：无渐变、无阴影，仅用 1px 边框与留白分层。 */
:root{
  --bg:#eef1f5; --card:#fff; --primary:#1e4d8c; --primary-d:#163658;
  --gold:#c4a35a; --text:#1a202c; --text2:#475569; --text3:#8895a7;
  --border:#e2e8f0; --line:#eef1f5; --green:#059669; --amber:#b7791f;
  --amber-bg:#fffbeb; --grey:#f4f6f9; --danger:#c53030;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  background:var(--bg); color:var(--text); font-size:15px; line-height:1.62;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased; display:flex; justify-content:center;
}
#app{width:100%; max-width:420px; min-height:100vh; background:var(--bg); position:relative; display:flex; flex-direction:column}
.page{display:none; flex:1; flex-direction:column; min-height:100vh}
.page.on{display:flex}
.hide{display:none !important}

/* ---------- 通用 ---------- */
.card{background:var(--card); border:1px solid var(--border); border-radius:12px; padding:14px; margin:12px}
.t{font-size:15px; font-weight:600; color:var(--text)}
.s{font-size:12.5px; color:var(--text3); line-height:1.55}
.btn{border:1px solid var(--border); background:#fff; color:var(--text); border-radius:10px;
  padding:10px 14px; font-size:14.5px; font-weight:500; cursor:pointer}
.btn.primary{background:var(--primary); border-color:var(--primary); color:#fff}
.btn.block{display:block; width:100%}
.btn:disabled{opacity:.5; cursor:not-allowed}
.tag{display:inline-block; font-size:11px; padding:1px 7px; border-radius:999px;
  border:1px solid var(--border); color:var(--text3); background:var(--grey)}
.tag.ai{border-color:#d9e2ee; color:var(--primary); background:#f2f6fb}
.tag.warn{border-color:#f0dfb5; color:var(--amber); background:var(--amber-bg)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px}

/* ---------- 顶栏 ---------- */
.hd{position:sticky; top:0; z-index:20; background:var(--card); border-bottom:1px solid var(--border);
  padding:12px 14px; display:flex; align-items:center; gap:10px; min-height:52px}
.hd .logo{width:28px; height:28px; border-radius:8px; background:var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; letter-spacing:.5px}
.hd .nm{font-size:15.5px; font-weight:600; flex:1; min-width:0}
.hd .nm small{display:block; font-size:11px; color:var(--text3); font-weight:400; line-height:1.3}
.hd .act{font-size:13px; color:var(--primary); padding:4px 2px; cursor:pointer}

/* ---------- 首屏告知（T53 不可关闭） ---------- */
#notice{position:fixed; inset:0; z-index:60; background:rgba(16,24,40,.45); display:flex; align-items:flex-end; justify-content:center}
#notice .box{background:#fff; width:100%; max-width:420px; border-radius:16px 16px 0 0; padding:20px 18px 16px}
#notice h3{font-size:17px; margin-bottom:10px}
#notice ol{margin:0 0 14px 18px; font-size:13.5px; color:var(--text2); line-height:1.7}
#notice ol li{margin-bottom:7px}
#notice .ver{font-size:11px; color:var(--text3); margin-bottom:12px}

/* ---------- 登录 ---------- */
.login{padding:56px 22px 24px; flex:1}
.login .brand{display:flex; flex-direction:column; align-items:center; gap:10px; margin-bottom:34px}
.login .brand .mk{width:56px; height:56px; border-radius:16px; background:var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:700}
.login .brand h1{font-size:20px; letter-spacing:.5px}
.login .brand p{font-size:12.5px; color:var(--text3)}
.field{margin-bottom:14px}
.field label{display:block; font-size:12.5px; color:var(--text2); margin-bottom:6px}
.field .row{display:flex; gap:8px}
.field input{flex:1; width:100%; border:1px solid var(--border); border-radius:10px; padding:12px 13px;
  font-size:15.5px; background:#fff; color:var(--text); outline:none}
.field input:focus{border-color:var(--primary)}
.field .code-btn{white-space:nowrap; min-width:104px}
.login .tip{font-size:11.5px; color:var(--text3); margin-top:14px; line-height:1.6}
/* 联调测试模式提示：仅在 SMS_MODE=mock 时由前端显示，短信接入后自动消失 */
.login .test-note{display:flex; flex-direction:column; gap:3px; margin-bottom:20px; padding:9px 11px;
  background:var(--amber-bg); border:1px solid #f0dfb5; border-radius:10px}
.login .test-note b{font-size:12px; color:var(--amber); font-weight:700; letter-spacing:.3px}
.login .test-note span{font-size:11.5px; color:#7a5a12; line-height:1.5}
.err{color:var(--danger); font-size:12.5px; margin-top:8px; min-height:18px}

/* ---------- 对话 ---------- */
.bar-notice{background:var(--amber-bg); border-bottom:1px solid #f0dfb5; color:#7a5a12;
  font-size:11.5px; padding:6px 14px; line-height:1.5; display:flex; gap:6px; align-items:flex-start}
.msgs{flex:1; overflow-y:auto; padding:12px 12px 8px; display:flex; flex-direction:column; gap:12px}
.m{max-width:100%; display:flex; flex-direction:column}
.m.u{align-items:flex-end}
.m.u .bub{background:var(--primary); color:#fff; border-radius:12px 12px 2px 12px; padding:10px 13px;
  font-size:14.5px; max-width:82%; word-break:break-word}
.m.a .bub{background:var(--card); border:1px solid var(--border); border-radius:12px 12px 12px 2px;
  padding:12px 13px; font-size:14.5px; width:100%}
.m.a .bub .who{display:flex; align-items:center; gap:6px; margin-bottom:8px}
.m.a .bub .who b{font-size:12.5px; color:var(--text2); font-weight:600}
.sec{margin-bottom:10px}
.sec .lb{font-size:11.5px; font-weight:700; color:var(--primary); letter-spacing:.6px; margin-bottom:4px}
.sec .tx{font-size:14.5px; color:var(--text); word-break:break-word}
.sec ol{margin:0 0 0 16px; font-size:13.5px; color:var(--text2); line-height:1.7}
.sec ol li{margin-bottom:3px}
.src{display:flex; flex-wrap:wrap; gap:6px; margin-top:2px}
.src .it{font-size:11.5px; color:var(--text2); background:var(--grey); border:1px solid var(--border);
  border-radius:8px; padding:3px 8px; cursor:pointer}
.mark{font-size:11px; color:var(--text3); line-height:1.55; border-top:1px dashed var(--border);
  margin-top:10px; padding-top:8px}
.act-card{background:#f2f6fb; border:1px solid #d9e2ee; border-radius:10px; padding:10px 12px; margin-top:8px}
.act-card .btn{margin-top:8px; width:100%; background:var(--primary); border-color:var(--primary); color:#fff}
.typing{display:inline-block; color:var(--text3); font-size:13px}
.dots i{display:inline-block; width:4px; height:4px; border-radius:50%; background:var(--text3); margin:0 1.5px;
  animation:bl 1s infinite}
.dots i:nth-child(2){animation-delay:.2s} .dots i:nth-child(3){animation-delay:.4s}
@keyframes bl{0%,60%,100%{opacity:.25}30%{opacity:1}}
.empty-guide{padding:26px 6px; text-align:center}
.empty-guide .h{font-size:15px; font-weight:600; margin-bottom:4px}
.empty-guide .p{font-size:12.5px; color:var(--text3); margin-bottom:16px}
.qs{display:flex; flex-direction:column; gap:8px}
.qs .q{background:var(--card); border:1px solid var(--border); border-radius:10px; padding:11px 12px;
  font-size:13.5px; color:var(--text2); text-align:left; cursor:pointer}
.composer{border-top:1px solid var(--border); background:var(--card); padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
.composer .box{display:flex; gap:8px; align-items:flex-end}
.composer textarea{flex:1; border:1px solid var(--border); border-radius:10px; padding:10px 12px; font-size:15px;
  resize:none; height:44px; max-height:110px; line-height:1.45; font-family:inherit; outline:none; background:#fff}
.composer textarea:focus{border-color:var(--primary)}
.composer .send{width:60px; height:44px; border-radius:10px; background:var(--primary); color:#fff;
  border:none; font-size:14.5px; font-weight:500; cursor:pointer}
.composer .send:disabled{opacity:.45}

/* ---------- 我的 ---------- */
.me-head{display:flex; align-items:center; gap:12px; padding:18px 16px 14px}
.me-head .av{width:46px; height:46px; border-radius:50%; background:var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:17px; font-weight:600}
.me-head .info{flex:1; min-width:0}
.me-head .info .n{font-size:16px; font-weight:600}
.row-item{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 0;
  border-bottom:1px solid var(--line)}
.row-item:last-child{border-bottom:none}
.row-item .l{font-size:14px; color:var(--text)}
.row-item .r{font-size:13px; color:var(--text3); text-align:right}
.kv{display:flex; gap:10px; margin-top:10px}
.kv .k{flex:1; background:var(--grey); border-radius:10px; padding:10px 12px; text-align:center}
.kv .k b{display:block; font-size:19px; color:var(--primary); font-weight:600; line-height:1.3}
.kv .k span{font-size:11.5px; color:var(--text3)}
.self .it{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 0; border-bottom:1px solid var(--line)}
.self .it:last-child{border-bottom:none}
.self .it .l b{font-size:14px; font-weight:600; display:block}
.self .it .l span{font-size:11.5px; color:var(--text3)}
.self .it .go{font-size:12.5px; color:var(--primary); border:1px solid #d9e2ee; background:#f2f6fb;
  border-radius:8px; padding:5px 10px; cursor:pointer}
.flow{font-size:12px; color:var(--text2); display:flex; justify-content:space-between; padding:7px 0; border-bottom:1px solid var(--line)}
.flow:last-child{border-bottom:none}
.hl{color:var(--primary)}
.footer-note{text-align:center; font-size:11px; color:var(--text3); padding:8px 16px 22px; line-height:1.6}
.toast{position:fixed; left:50%; bottom:88px; transform:translateX(-50%); background:rgba(26,32,44,.92);
  color:#fff; font-size:13px; padding:9px 15px; border-radius:10px; z-index:80; max-width:84%; text-align:center}
