:root{
  --primary:#4f7cff; --primary-2:#7a5cff; --green:#28c76f; --orange:#ff8a3d;
  --red:#f5511e; --ink:#1c2333; --ink-2:#4b5568; --ink-3:#8b94a7;
  --line:#e9edf5; --bg:#f3f5fa; --card:#ffffff; --radius:16px;
  --shadow:0 6px 20px rgba(31,45,80,.06);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;padding:0;height:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  background:#e8ecf5;color:var(--ink);font-size:15px;line-height:1.5;
}
button{font-family:inherit;border:none;background:none;color:inherit;cursor:pointer;font-size:inherit}
input,select,textarea{font-family:inherit;font-size:15px;color:var(--ink)}
.stage{min-height:100%;display:flex;justify-content:center;align-items:stretch;background:
  radial-gradient(1200px 600px at 50% -10%,#dfe7ff 0%,#eef1f8 45%,#e8ecf5 100%);}
.phone{
  position:relative;width:100%;max-width:430px;min-height:100vh;height:100vh;background:var(--bg);
  display:flex;flex-direction:column;overflow:hidden;
}
@media (min-width:520px){
  .stage{padding:24px 0;align-items:center}
  .phone{min-height:min(900px,calc(100vh - 48px));height:min(900px,calc(100vh - 48px));border-radius:34px;box-shadow:0 30px 70px rgba(23,38,77,.22);}
}
/* ---------- status bar / nav ---------- */
.statusbar{
  height:34px;display:flex;align-items:center;justify-content:space-between;
  padding:0 20px;font-size:12px;font-weight:600;color:#1c2333;flex:0 0 auto;
  background:linear-gradient(180deg,#eaf0ff 0%,#f3f5fa 100%);
}
.sbi{display:flex;gap:5px;align-items:center}
.sbi i{display:block;background:#1c2333;border-radius:2px}
.sig{width:15px;height:10px;clip-path:polygon(0 100%,100% 0,100% 100%)}
.wifi{width:14px;height:10px;clip-path:polygon(50% 100%,0 32%,50% 0,100% 32%)}
.bat{width:20px;height:10px;border-radius:3px;position:relative;opacity:.9}
.bat:after{content:"";position:absolute;right:-3px;top:3px;width:2px;height:4px;background:#1c2333;border-radius:0 2px 2px 0}
.navbar{
  position:relative;flex:0 0 auto;height:46px;display:flex;align-items:center;justify-content:center;
  background:#f3f5fa;padding:0 74px;
}
.navbar h1{font-size:16px;font-weight:600;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:.3px}
.nav-back{position:absolute;left:10px;width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#1c2333}
.nav-back svg{width:22px;height:22px}
.capsule{
  position:absolute;right:10px;top:7px;height:32px;width:86px;border-radius:16px;
  border:.5px solid rgba(0,0,0,.08);background:rgba(255,255,255,.72);display:flex;align-items:center;
  justify-content:space-evenly;color:#2b3446;backdrop-filter:blur(6px);
}
.capsule .dots{font-size:14px;letter-spacing:1px;line-height:1}
.capsule .split{width:.5px;height:18px;background:rgba(0,0,0,.1)}
.capsule .circle{width:13px;height:13px;border:1.6px solid #2b3446;border-radius:50%;position:relative}
.capsule .circle:after{content:"";position:absolute;inset:2.5px;border:1.4px solid #2b3446;border-radius:50%}
.view{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 0 12px;scroll-behavior:smooth;-webkit-overflow-scrolling:touch}
.view::-webkit-scrollbar{width:0}
/* ---------- tabbar ---------- */
.tabbar{
  flex:0 0 auto;height:58px;display:flex;background:rgba(255,255,255,.94);
  border-top:.5px solid var(--line);backdrop-filter:blur(10px);padding-bottom:env(safe-area-inset-bottom);
}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#9aa3b5;font-size:10.5px;position:relative}
.tab svg{width:23px;height:23px;fill:currentColor}
.tab.active{color:var(--primary)}
.tab .badge{position:absolute;top:7px;right:calc(50% - 22px);background:var(--red);color:#fff;font-size:10px;min-width:16px;height:16px;border-radius:8px;display:flex;align-items:center;justify-content:center;padding:0 4px;font-style:normal}
/* ---------- common ---------- */
.hero{
  background:linear-gradient(135deg,#4f7cff 0%,#6a5cff 55%,#8f5bff 100%);
  padding:18px 18px 46px;color:#fff;position:relative;overflow:hidden;
}
.hero:before,.hero:after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.12)}
.hero:before{width:180px;height:180px;right:-60px;top:-80px}
.hero:after{width:120px;height:120px;right:40px;top:40px;background:rgba(255,255,255,.08)}
.hero-row{display:flex;align-items:center;gap:12px;position:relative;z-index:1}
.avatar{width:48px;height:48px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;color:#fff;flex:0 0 auto;box-shadow:0 6px 14px rgba(0,0,0,.12)}
.hero .hi{font-size:13px;opacity:.85}
.hero .who{font-size:19px;font-weight:700;letter-spacing:.4px}
.hero .role{display:inline-flex;align-items:center;gap:4px;font-size:11px;background:rgba(255,255,255,.2);padding:2px 8px;border-radius:20px;margin-top:4px}
.hero .brand{position:absolute;right:16px;bottom:14px;font-size:11px;opacity:.7;letter-spacing:2px}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);margin:0 14px 12px;padding:16px}
.card.tight{padding:12px 14px}
.card-title{display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:600;margin-bottom:12px}
.card-title small{font-weight:400;color:var(--ink-3);font-size:12px}
.pull-up{margin-top:-34px;position:relative;z-index:2}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;text-align:center}
.stat b{display:block;font-size:20px;font-weight:700;letter-spacing:.5px}
.stat span{font-size:11px;color:var(--ink-3)}
.stat.b1 b{color:var(--primary)}.stat.b2 b{color:var(--green)}.stat.b3 b{color:var(--orange)}.stat.b4 b{color:var(--red)}
.chips{display:flex;flex-wrap:wrap;gap:8px;padding:2px 0}
.chip{white-space:nowrap;font-size:12px;padding:6px 12px;border-radius:20px;background:#f1f4fb;color:var(--ink-2);border:1px solid transparent}
.chip.on{background:rgba(79,124,255,.1);color:var(--primary);border-color:rgba(79,124,255,.28);font-weight:600}
.row{display:flex;align-items:center;gap:10px}
.between{display:flex;align-items:center;justify-content:space-between;gap:10px}
.muted{color:var(--ink-3);font-size:12px}
.small{font-size:12px}
.strong{font-weight:600}
.tag{display:inline-flex;align-items:center;gap:3px;font-size:10.5px;padding:1.5px 7px;border-radius:6px;background:#f1f4fb;color:var(--ink-2);line-height:1.6}
.tag.lock{background:rgba(255,138,61,.12);color:#d96a12}
.tag.on{background:rgba(40,199,111,.12);color:#129a52}
.tag.off{background:rgba(79,124,255,.1);color:var(--primary)}
.tag.leader{background:rgba(122,92,255,.12);color:#6a4cf0}
.divider{height:.5px;background:var(--line);margin:10px 0}
.empty{text-align:center;color:var(--ink-3);font-size:13px;padding:34px 10px}
/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:44px;padding:0 18px;border-radius:12px;font-weight:600;font-size:14px;background:#f1f4fb;color:var(--ink-2)}
.btn.primary{background:linear-gradient(135deg,var(--primary),var(--primary-2));color:#fff;box-shadow:0 8px 18px rgba(79,124,255,.3)}
.btn.ghost{background:#fff;border:1px solid var(--line);color:var(--ink-2)}
.btn.danger{background:rgba(245,81,30,.1);color:var(--red)}
.btn.ok{background:rgba(40,199,111,.12);color:#129a52}
.btn.sm{height:32px;padding:0 12px;font-size:12.5px;border-radius:9px}
.btn.block{width:100%}
.btn:disabled{opacity:.45}
.btn:active{transform:scale(.985)}
.field{margin-bottom:14px}
.field label{display:block;font-size:12.5px;color:var(--ink-3);margin-bottom:6px}
.field input,.field select,.field textarea{
  width:100%;height:46px;border-radius:12px;border:1px solid var(--line);background:#f8fafd;padding:0 14px;outline:none;
}
.field textarea{height:auto;min-height:76px;padding:12px 14px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{border-color:rgba(79,124,255,.55);background:#fff;box-shadow:0 0 0 3px rgba(79,124,255,.1)}
.hint{font-size:11.5px;color:var(--ink-3);margin-top:6px}
/* ---------- login ---------- */
.login{min-height:100%;display:flex;flex-direction:column;padding:26px 22px 30px;background:
  radial-gradient(700px 380px at 80% -10%,#dfe8ff 0%,transparent 60%),
  radial-gradient(600px 380px at -10% 30%,#e9e2ff 0%,transparent 55%),#f3f5fa;}
.login .logo{width:64px;height:64px;border-radius:20px;background:linear-gradient(135deg,#4f7cff,#8f5bff);display:flex;align-items:center;justify-content:center;box-shadow:0 12px 26px rgba(79,124,255,.32);margin-bottom:18px}
.login .logo svg{width:36px;height:36px}
.login h2{font-size:24px;margin:0 0 6px;letter-spacing:.5px}
.login .sub{color:var(--ink-3);font-size:13px;margin-bottom:26px;line-height:1.7}
.login .panel{background:#fff;border-radius:22px;padding:20px 18px;box-shadow:0 16px 40px rgba(31,45,80,.08)}
.demo{display:flex;gap:8px;margin-top:12px}
.demo .btn{height:34px;font-size:12px;border-radius:10px;background:#f1f4fb;color:var(--ink-2);flex:1}
.login .foot{margin-top:auto;text-align:center;color:#a7b0c2;font-size:11px;padding-top:22px;line-height:1.8}
/* ---------- tree ---------- */
.tree{padding:4px 2px}
.tnode{position:relative;padding:8px 0 8px 0}
.tnode .tline{position:absolute;left:calc(var(--indent) * 1px - 9px);top:0;bottom:0;width:1px;background:var(--line)}
.trow{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;margin-left:calc(var(--indent) * 1px);background:#fff;border:1px solid var(--line)}
.trow.click:active{background:#f7f9ff}
.trow .nm{font-weight:600;font-size:14px}
.trow .up{font-size:11px;color:var(--ink-3)}
.trow .arrow{width:22px;height:22px;border-radius:50%;background:#f1f4fb;color:var(--ink-2);display:flex;align-items:center;justify-content:center;font-size:11px;flex:0 0 auto}
.trow .arrow.open{transform:rotate(90deg)}
.avatar.sm{width:34px;height:34px;border-radius:11px;font-size:13px}
.avatar.xs{width:26px;height:26px;border-radius:9px;font-size:11px}
/* member list */
.mlist .mitem{display:flex;align-items:center;gap:12px;padding:12px 2px;border-bottom:.5px solid var(--line)}
.mlist .mitem:last-child{border-bottom:none}
.mitem .info{flex:1;min-width:0}
.mitem .nm{font-weight:600;font-size:14.5px;display:flex;align-items:center;gap:6px}
.mitem .meta{font-size:11.5px;color:var(--ink-3);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mitem .ops{display:flex;gap:6px;flex:0 0 auto}
/* sheet */
.sheet-mask{position:absolute;inset:0;background:rgba(16,24,40,.42);z-index:60;display:flex;align-items:flex-end;animation:fade .18s ease}
.sheet{width:100%;background:#fff;border-radius:20px 20px 0 0;padding:6px 16px calc(18px + env(safe-area-inset-bottom));max-height:82%;overflow-y:auto;animation:up .24s cubic-bezier(.2,.8,.3,1)}
.sheet .handle{width:36px;height:4px;border-radius:3px;background:#e2e7f0;margin:8px auto 14px}
.sheet h3{margin:0 0 4px;font-size:16px}
.sheet .sub{font-size:12px;color:var(--ink-3);margin-bottom:14px}
.opt-list{max-height:44vh;overflow-y:auto;border:1px solid var(--line);border-radius:12px}
.opt{display:flex;align-items:center;gap:10px;padding:11px 12px;border-bottom:.5px solid var(--line)}
.opt:last-child{border-bottom:none}
.opt.on{background:rgba(79,124,255,.06)}
.opt .nm{flex:1;font-size:14px}
/* dialog */
.dialog-mask{position:absolute;inset:0;background:rgba(16,24,40,.42);z-index:80;display:flex;align-items:center;justify-content:center;padding:34px;animation:fade .16s}
.dialog{background:#fff;border-radius:16px;padding:22px 18px 14px;width:100%;max-width:320px;text-align:center;animation:up .2s ease}
.dialog h4{margin:0 0 8px;font-size:16px}
.dialog p{margin:0 0 18px;color:var(--ink-2);font-size:13px;line-height:1.7}
.dialog .acts{display:flex;gap:10px}
.dialog .acts .btn{flex:1;height:42px}
/* toast */
.toast{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%) scale(.96);background:rgba(20,26,40,.86);color:#fff;font-size:13px;padding:10px 16px;border-radius:10px;opacity:0;pointer-events:none;transition:.2s;z-index:99;max-width:78%;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,-50%) scale(1)}
@keyframes up{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
/* misc blocks */
.kv{display:flex;justify-content:space-between;padding:9px 0;font-size:13.5px;border-bottom:.5px solid var(--line)}
.kv:last-child{border-bottom:none}
.kv .k{color:var(--ink-3)}
.kv .v{font-weight:500;max-width:62%;text-align:right}
.chain{display:flex;flex-direction:column;gap:0}
.chain .cnode{display:flex;align-items:center;gap:10px;padding:7px 0}
.chain .cbar{width:2px;height:18px;background:var(--line);margin-left:15px}
.logitem{padding:10px 0;border-bottom:.5px solid var(--line)}
.logitem:last-child{border-bottom:none}
.logitem .lt{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:600}
.logitem .ld{font-size:11.5px;color:var(--ink-3);margin-top:3px;line-height:1.6}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quick{display:flex;align-items:center;gap:10px;padding:12px;border-radius:12px;background:#f8faff;border:1px solid var(--line)}
.quick .qi{width:36px;height:36px;border-radius:11px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:16px}
.quick b{display:block;font-size:13px}
.quick span{font-size:11px;color:var(--ink-3)}
.pf-item{display:flex;align-items:center;justify-content:space-between;padding:15px 2px;border-bottom:.5px solid var(--line);font-size:14px}
.pf-item:last-child{border-bottom:none}
.pf-item .r{color:var(--ink-3);font-size:13px;display:flex;align-items:center;gap:6px}
.seg{display:flex;background:#eef1f8;border-radius:10px;padding:3px;gap:2px}
.seg button{flex:1;height:30px;border-radius:8px;font-size:12.5px;color:var(--ink-2)}
.seg button.on{background:#fff;color:var(--primary);font-weight:600;box-shadow:0 2px 6px rgba(31,45,80,.08)}
.banner{display:flex;gap:8px;align-items:flex-start;background:rgba(255,138,61,.08);border:1px solid rgba(255,138,61,.2);color:#a55a14;font-size:12px;padding:10px 12px;border-radius:12px;line-height:1.6;margin-bottom:12px}
/* ---------- 扫码绑定 ---------- */
.bind-wrap{padding:12px 0 24px}
.bind-hero{text-align:center;padding:20px 24px 8px}
.bind-icon{width:64px;height:64px;border-radius:20px;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;font-size:30px;background:linear-gradient(135deg,#eaf0ff,#efe8ff);box-shadow:0 10px 24px rgba(79,124,255,.16)}
.bind-hero h2{margin:0 0 8px;font-size:19px;letter-spacing:.3px}
.bind-hero p{margin:0;font-size:12.5px;color:var(--ink-3);line-height:1.7}
.bind-target{display:flex;align-items:center;gap:12px;margin:16px 14px;padding:14px 16px;border-radius:16px;background:linear-gradient(135deg,rgba(79,124,255,.08),rgba(143,91,255,.08));border:1px solid rgba(79,124,255,.16)}
.qr-box{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;display:flex;justify-content:center}
.qr-box img{width:186px;height:186px;display:block}
.qr-link{font-size:11px;color:var(--ink-3);word-break:break-all;text-align:center;margin-top:10px;line-height:1.6}
.okmark{width:64px;height:64px;border-radius:50%;margin:24px auto 12px;display:flex;align-items:center;justify-content:center;font-size:32px;font-weight:700;color:#fff;background:linear-gradient(135deg,#28c76f,#5ad08f);box-shadow:0 10px 22px rgba(40,199,111,.28)}
.okmark.wait{background:linear-gradient(135deg,#ff8a3d,#ffb069);box-shadow:0 10px 22px rgba(255,138,61,.28)}
.qr-row{display:flex;align-items:center;gap:10px;padding:12px 2px;border-bottom:.5px solid var(--line);cursor:pointer}
.qr-row:last-child{border-bottom:none}
.qr-row:active{background:#f7f9ff}
