*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden}
body{font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC","Noto Sans SC","Segoe UI",Arial,sans-serif;font-size:12px;color:#111827;background:#eff2f6;-webkit-font-smoothing:antialiased}
button{font-family:inherit;font-size:12px;cursor:pointer;color:inherit}
a{text-decoration:none}
#app{display:flex;flex-direction:column;height:100vh}

/* header */
.hd{height:32px;flex:none;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(90deg,#fcfcfd 0%,#f4f6f9 50%,#eff2f6 100%);border-bottom:1px solid #c5ced9;padding:0 9px 0 16px}
.hd-left{display:flex;align-items:center}
.logo{margin-right:16px;margin-top:-2px}
.hd-title{font-size:14px;font-weight:700;color:#111827;letter-spacing:0}
.badge-ver{margin-left:7px;height:16px;line-height:14px;padding:0 5px;font-size:11px;color:#1f5fbf;background:#e6effc;border:1px solid #b9d0f2;border-radius:3px}
.hd-right{display:flex;align-items:center;height:100%}
.hd-link{color:#0f6cbd;font-weight:700;font-size:12px;margin-right:20px}
.hd-link:hover{text-decoration:underline}
.exp{display:flex;align-items:center;margin-right:11px}
.exp-ic{width:15px;height:15px;background:#2563eb;color:#fff;font-style:normal;font-size:10px;font-weight:700;border-radius:3px;display:inline-flex;align-items:center;justify-content:center;margin-right:9px}
.exp-date{color:#dc2626;font-size:12px}
.btn-pay{height:22px;padding:0 7px;font-size:12px;border:0;border-radius:3px;background:#0f6cbd;color:#fff;font-weight:700;margin-right:9px}
.btn-pay:hover{background:#0b5aa0}
.user{position:relative;height:24px;display:flex;align-items:center;gap:5px;padding:0 8px 0 6px;font-size:12px;background:#fff;border:1px solid #e1e6ed;border-radius:4px;cursor:pointer;margin-right:12px;min-width:78px}
.avatar{width:17px;height:17px;border-radius:50%;background:#0f6cbd;color:#fff;font-size:9px;font-style:normal;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.caret{font-size:8px;color:#374151;margin-left:2px;font-weight:400}
.dd-menu{display:none;position:absolute;right:0;top:23px;background:#fff;border:1px solid #d6dde6;border-radius:4px;list-style:none;box-shadow:0 4px 12px rgba(0,0,0,.12);z-index:50;min-width:90px;padding:3px 0}
.dd-menu li{padding:5px 12px;white-space:nowrap}
.dd-menu li:hover{background:#eef4fb;color:#0f6cbd}
.user.open .dd-menu{display:block}
.fs-btn{border:0;background:transparent;width:20px;height:20px;display:flex;align-items:center;justify-content:center}

/* top tabs */
.top-tabs{height:25px;flex:none;background:#e4e9f0;border-bottom:1px solid #c5ced9;display:flex;align-items:flex-end;padding-left:4px;gap:4px}
.ttab{width:84px;height:21px;line-height:20px;text-align:center;font-size:12px;color:#9ca3af;background:#eef1f5;border-radius:3px 3px 0 0;cursor:pointer;margin-bottom:1px}
.ttab.active{background:#fff;color:#111827;font-weight:700;box-shadow:inset 0 -2px 0 #0f6cbd;margin-bottom:0;height:22px}

/* toolbar */
.toolbar{height:53px;flex:none;background:#f0f2f6;border-bottom:1px solid #c5ced9;display:flex;align-items:center;padding:0 6px 0 13px;gap:5px;position:relative}
.toolbar[hidden]{display:none}
.tbtn{height:28px;display:flex;align-items:center;gap:8px;padding:0 6px 0 9px;white-space:nowrap;background:#fff;border:1px solid #e7eaee;border-radius:4px;color:#111827;font-size:12px}
.tbtn:hover{border-color:#a8c3de;background:#f7fafd}
.tbtn.active{background:#d4dce6;border-color:#a8c3de}
.tbtn:nth-child(1){padding-right:9px}
.tbtn:nth-child(5){padding-right:18px}
.help-bar .tbtn{width:auto!important;padding:0 14px}
.ic{display:inline-flex;width:10px;height:12px;align-items:center;justify-content:center;color:#4b5563;font-size:11px;flex:none}
.ic-server{border:1.2px solid #5b6472;border-radius:1px;background:linear-gradient(#5b6472,#5b6472) 1px 3px/8px 1px no-repeat,linear-gradient(#5b6472,#5b6472) 1px 6px/8px 1px no-repeat;width:11px;height:11px}
.ic-circle{border:1.2px solid #5b6472;border-radius:50%;font-weight:700;line-height:1;width:11px;height:11px;font-size:10px}
.ic-list{width:11px;height:11px;background:
 linear-gradient(#5b6472,#5b6472) 0 1px/3px 1.2px no-repeat,linear-gradient(#5b6472,#5b6472) 5px 1px/6px 1.2px no-repeat,
 linear-gradient(#5b6472,#5b6472) 0 5px/3px 1.2px no-repeat,linear-gradient(#5b6472,#5b6472) 5px 5px/6px 1.2px no-repeat,
 linear-gradient(#5b6472,#5b6472) 0 9px/3px 1.2px no-repeat,linear-gradient(#5b6472,#5b6472) 5px 9px/6px 1.2px no-repeat}
.ic-d{border:1.2px solid #5b6472;border-radius:50%;font-size:7px;font-weight:700;width:11px;height:11px}
.ic-plus{font-size:14px;font-weight:300}
.grid-btn{position:absolute;right:6px;top:10px;width:32px;height:32px;background:#fff;border:1px solid #e1e6ed;border-radius:4px;display:flex;align-items:center;justify-content:center}
.grid-btn.on{background:#e6effc;border-color:#a8c3de}

/* main */
.main{flex:1;display:flex;min-height:0;padding:3px 4px 3px 4px;background:#eff2f6}
.side{width:217px;flex:none;background:#fff;border-radius:3px;overflow:auto}
.side-hd{height:24px;margin:5px 4px 0;border-top:3px solid #eceff4;display:flex;align-items:center;padding-left:4px}
.chk{display:flex;align-items:center;cursor:pointer;color:#111827;font-size:11px}
.chk input{display:none}
.chk .box{width:12px;height:12px;border:1px solid #d5dbe3;border-radius:2px;margin-right:6px;background:#fff;position:relative}
.chk input:checked+.box{background:#0f6cbd;border-color:#0f6cbd}
.chk input:checked+.box::after{content:"";position:absolute;left:3px;top:0;width:4px;height:7px;border:solid #fff;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.hint{color:#dc2626;font-size:11px;margin-left:8px}
.acc-list{list-style:none;padding:4px}
.acc{padding:6px 8px;border-radius:3px;cursor:pointer;border:1px solid transparent;margin-bottom:3px;display:flex;flex-direction:column;gap:2px}
.acc:hover{background:#f3f6fa}
.acc.sel{background:#e6effc;border-color:#b9d0f2}
.acc .r1{display:flex;justify-content:space-between;align-items:center}
.acc .no{font-weight:700}
.acc .tag{font-size:10px;padding:0 4px;border-radius:2px;color:#fff}
.tag.follow{background:#16a34a}.tag.signal{background:#ea580c}
.acc .r2{color:#6b7280;font-size:11px}
.acc .note{color:#9ca3af;font-size:11px;display:none}
.side.notes .acc .note{display:block}
.splitter{width:11px;flex:none;display:flex;align-items:center;justify-content:center;cursor:col-resize}
.grip{width:3px;height:80px;background:#b3bdca;border-radius:1px}
.content{flex:1;min-width:0;display:flex;flex-direction:column;background:#fff;border-radius:3px 3px 0 0}
.info{height:101px;flex:none;display:flex;justify-content:space-between;padding:0 16px 0 9px;border-bottom:1px solid #dfe5ec}
.info-grid{flex:1;display:grid;grid-template-columns:repeat(4,370px);grid-auto-rows:32px;padding-top:0}
.cell{display:flex;align-items:center;font-size:12px}
.cell label{width:80px;color:#4b5563}
.cell span{color:#111827}
.acts{display:grid;grid-template-columns:85px 85px;grid-auto-rows:24px;column-gap:8px;row-gap:7px;padding-top:6px}
.abtn{display:flex;align-items:center;gap:7px;padding:0 0 0 13px;background:#fff;border:1px solid #e2e7ee;border-radius:4px;font-size:12px;color:#111827;white-space:nowrap}
.abtn:hover{background:#f5f8fc;border-color:#a8c3de}
.ai{font-style:normal;display:inline-flex;align-items:center;justify-content:center;width:12px;height:12px;flex:none}
.ai-x{color:#dc2626;font-size:14px}
.ai-re{color:#16a34a;font-size:15px;font-weight:700}
.ai-up{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:10px solid #15803d}
.ai-dn{width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:10px solid #dc2626}
.ai-ban{border:1.3px solid #4b5563;border-radius:50%;position:relative;width:11px;height:11px}
.ai-ban::after{content:"";position:absolute;left:4px;top:-1px;width:1.3px;height:11px;background:#4b5563;transform:rotate(45deg)}
.ai-more{color:#4b5563;letter-spacing:0;font-size:12px;width:14px}

.sub-tabs{height:28px;flex:none;background:#e4e9f0;border-top:1px solid #dfe5ec;border-bottom:1px solid #c5ced9;display:flex;align-items:flex-end;padding-left:10px;gap:14px}
.stab{width:74px;height:20px;line-height:20px;text-align:center;color:#9ca3af;background:#eef1f5;border-radius:3px 3px 0 0;cursor:pointer;margin-bottom:2px}
.stab.active{background:#fff;color:#111827;font-weight:700;box-shadow:inset 0 -2px 0 #0f6cbd;height:23px;margin-bottom:0}

.tbl-wrap{flex:1;min-height:0;overflow:auto;position:relative;background:repeating-linear-gradient(#fff 0 23px,#f2f4f7 23px 24px,#f9fafb 24px 47px,#eff1f5 47px 48px);background-position:0 28px;background-attachment:local}
.tbl{width:100%;border-collapse:collapse;table-layout:fixed}
.tbl thead th{position:sticky;top:0;height:27px;background:linear-gradient(#fff,#e3e8ef);border-bottom:1px solid #e3e7ee;text-align:left;font-weight:700;color:#111827;padding:0 4px;white-space:nowrap;font-size:12px;z-index:1}
.tbl thead th+th{border-left:1px solid #d9dee6}
.tbl thead th:first-child{text-align:center;color:#6b7280;font-weight:400}
.tbl thead th.c,.tbl td.c{text-align:center}
.tbl tbody tr{height:24px}
.tbl tbody tr:nth-child(odd){background:#fff}
.tbl tbody tr:nth-child(even){background:#f9fafb}
.tbl tbody tr:hover{background:#eef4fb}
.tbl td{padding:0 4px;border-bottom:1px solid #f0f2f5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tbl td:first-child{text-align:center;color:#9ca3af}
.buy{color:#16a34a}.sell{color:#dc2626}
.pos{color:#16a34a}.neg{color:#dc2626}
.op{color:#0f6cbd;cursor:pointer}
.op:hover{text-decoration:underline}
.empty{position:absolute;left:0;right:0;top:50%;text-align:center;color:#9ca3af;font-size:11px;pointer-events:none}
.empty[hidden]{display:none}

/* status bar */
.status{height:35px;flex:none;background:linear-gradient(#51565c 0%,#3c4147 4%,#2f3438 60%,#262a2e 100%);border-top:2px solid #dee4ed;display:flex;align-items:center;justify-content:flex-end;padding:0 22px 0 0;gap:0;color:#e5e7eb;font-size:12px}
.status em{font-style:normal;color:#fbbf24}
.status b{font-weight:400;color:#e5e7eb}
.status span{margin-right:12px}
.status .disc{color:#fde047;text-decoration:underline;margin-right:9px}
.status .up{margin-right:26px}
.status .restart{color:#e5e7eb}
.status .restart:hover,.status .disc:hover{color:#fff}

/* modal */
.mask{position:fixed;inset:0;background:rgba(17,24,39,.35);display:flex;align-items:center;justify-content:center;z-index:100}
.mask[hidden]{display:none}
.modal{width:420px;background:#fff;border-radius:6px;box-shadow:0 10px 30px rgba(0,0,0,.25);overflow:hidden}
.m-hd{height:38px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;background:linear-gradient(#fafbfc,#eef1f5);border-bottom:1px solid #dfe5ec;font-weight:700;font-size:13px}
.m-x{border:0;background:transparent;font-size:18px;color:#6b7280}
.m-bd{padding:16px 20px;line-height:1.7}
.m-ft{display:flex;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid #eef1f5;background:#fafbfc}
.mbtn{height:28px;padding:0 16px;border:1px solid #d5dbe3;background:#fff;border-radius:4px}
.mbtn.primary{background:#0f6cbd;border-color:#0f6cbd;color:#fff}
.frow{display:flex;align-items:center;margin-bottom:10px}
.frow label{width:78px;color:#4b5563;text-align:right;padding-right:10px}
.frow input,.frow select{flex:1;height:28px;border:1px solid #d5dbe3;border-radius:4px;padding:0 8px;font-size:12px;font-family:inherit;outline:none}
.frow input:focus,.frow select:focus{border-color:#0f6cbd;box-shadow:0 0 0 2px rgba(15,108,189,.15)}
.frow .err{border-color:#dc2626}
.toast-wrap{position:fixed;top:70px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:6px;z-index:200;align-items:center}
.toast{padding:8px 16px;background:#fff;border:1px solid #d6dde6;border-radius:4px;box-shadow:0 4px 14px rgba(0,0,0,.12);font-size:12px;animation:tin .2s ease}
.toast.ok{border-color:#bbe5c8;background:#f0fbf3;color:#15803d}
.toast.warn{border-color:#f5c9c9;background:#fef3f2;color:#b91c1c}
@keyframes tin{from{opacity:0;transform:translateY(-6px)}to{opacity:1}}

/* ---------- prototype additions ---------- */
.side{display:flex;flex-direction:column}
.acc-list{flex:1;overflow:auto}
.side-ft{flex:none;height:28px;border-top:1px solid #eceff4;display:flex;align-items:center;justify-content:space-between;padding:0 8px;font-size:11px}
.ws-state{color:#9ca3af;font-size:11px}
.ws-state.on{color:#16a34a}
.acc{position:relative}
.acc.child{margin-left:12px;border-left:2px solid #dbe3ee;border-radius:0 3px 3px 0}
.acc .r1 .left{display:flex;align-items:center;gap:5px;min-width:0}
.dot{width:7px;height:7px;border-radius:50%;background:#9ca3af;flex:none}
.dot.connected{background:#16a34a}.dot.connecting,.dot.reconnecting{background:#f59e0b}.dot.error,.dot.disconnected{background:#dc2626}
.acc .r3{display:flex;justify-content:space-between;font-size:11px;color:#374151}
.acc .flags{font-size:10px;color:#6b7280}
.acc .flags b{font-weight:400;padding:0 3px;border-radius:2px;background:#eef1f5;margin-right:2px}
.acc .flags b.rev{background:#fee2e2;color:#b91c1c}
.acc .flags b.off{background:#e5e7eb;color:#6b7280}
.acc-empty{color:#9ca3af;font-size:11px;padding:16px 8px;line-height:1.8}
.tbl td .op+.op{margin-left:8px}
.lv-错误{color:#dc2626}.lv-警告{color:#d97706}
.frow input[type=checkbox]{flex:none;width:14px;height:14px}
.frow .inline{display:flex;align-items:center;gap:14px;flex:1}
.frow .inline label{width:auto;text-align:left;padding:0;display:flex;align-items:center;gap:4px;color:#111827}
.frow small{color:#9ca3af;margin-left:6px;white-space:nowrap}
.fsec{margin:6px 0 10px 78px;padding-top:8px;border-top:1px dashed #e5e7eb;color:#6b7280;font-size:11px}
.modal.wide{width:520px}
.qt{width:100%;border-collapse:collapse}
.qt th,.qt td{padding:4px 8px;text-align:right;border-bottom:1px solid #f0f2f5}
.qt th:first-child,.qt td:first-child{text-align:left}
.qt .up{color:#16a34a}.qt .down{color:#dc2626}
.kv{display:grid;grid-template-columns:110px 1fr;row-gap:4px}
.kv span:nth-child(odd){color:#6b7280}
.mlist{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mlist .mbtn{height:32px}
.mbtn.danger{color:#dc2626;border-color:#f5c9c9}
.diff-list{max-height:220px;overflow:auto;font-size:11px;background:#f9fafb;border:1px solid #eef1f5;border-radius:4px;padding:6px 8px;margin-top:6px}
.acc .flags{line-height:15px}

/* ================= 原版风格对话框 ================= */
.m-hd{height:35px;background:linear-gradient(90deg,#2a74b7 0%,#135894 35%,#0b4679 65%,#08375f 100%);color:#fff;border-bottom:0;font-size:13px;position:relative}
.m-x{width:26px;height:26px;border-radius:3px;background:rgba(255,255,255,.28);border:1px solid rgba(255,255,255,.3);color:#fff;font-size:15px;line-height:22px;display:flex;align-items:center;justify-content:center}
.m-x:hover,.dlg-x:hover{background:rgba(255,255,255,.42)}
.modal{border:1px solid #52708a;border-radius:6px}
.mbtn.primary{background:linear-gradient(#2a7dc6,#1a6fba);border-color:#155d9c;font-weight:700}

.dlg-mask{position:fixed;inset:0;background:rgba(71,85,105,.32);display:flex;align-items:center;justify-content:center;z-index:120}
.dlg{background:#fff;border:1px solid #52708a;border-radius:6px;box-shadow:0 8px 28px rgba(15,23,42,.28);display:flex;flex-direction:column;overflow:hidden;font-size:13px;color:#1f2937}
.dlg-hd{flex:none;height:35px;display:flex;align-items:center;padding-left:13px;color:#fff;font-weight:700;font-size:13px;position:relative;
  background:linear-gradient(90deg,#2a74b7 0%,#135894 35%,#0b4679 65%,#08375f 100%)}
.dlg-x{position:absolute;right:5px;top:4px;width:27px;height:26px;border-radius:3px;background:rgba(255,255,255,.28);border:1px solid rgba(255,255,255,.3);color:#fff;font-size:15px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.dlg-bd{flex:1;min-height:0;position:relative}
.btn-blue{height:28px;padding:0 22px;border-radius:6px;border:1px solid #155d9c;background:linear-gradient(#2a7dc6,#1a6fba);color:#fff;font-weight:700;font-size:13px;box-shadow:0 1px 2px rgba(15,60,110,.25)}
.btn-blue:hover{background:linear-gradient(#3489d3,#1f78c4)}
.btn-gray{height:30px;padding:0 20px;border-radius:6px;border:1px solid #cfd5de;background:#f4f6f9;color:#1f2937;font-size:13px}
.btn-gray:hover{background:#eaeef3}
.btn-blue:disabled,.btn-gray:disabled{opacity:.6;cursor:default}
.dlnk{color:#1a6fba;cursor:pointer;white-space:nowrap;font-size:12px;display:inline-flex;align-items:center;gap:2px}
.dlnk.red{color:#dc2626}
.dlnk:hover{text-decoration:underline}
.ok-ms{color:#16a34a}.bad-ms{color:#dc2626}

/* 平台服务器 */
.srv-top{padding:17px 18px 7px;display:flex;gap:8px}
.srv-top .btn-blue{width:100px;padding:0}
.srv-top .btn-gray{height:28px;padding:0 12px;font-size:12px}
.dtbl{width:calc(100% - 36px);margin:0 18px;border-collapse:collapse;table-layout:fixed;font-size:12px;border:1px solid #d5dce4}
.dtbl th{height:26px;background:#e8ecf2;border-bottom:1px solid #d5dce4;text-align:left;font-weight:400;padding:0 4px;color:#111827}
.dtbl td{height:25px;padding:0 4px;border-bottom:1px solid #e2e7ec;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#111827}
.dtbl td.hosts{white-space:normal;line-height:16px;padding:4px}
.dtbl .ops .dlnk{margin-right:9px}
.dtbl .muted{color:#9ca3af}
.dtbl .unv{color:#d97706;font-size:11px}

/* 在线添加 */
.onl-tabs{display:flex;gap:10px;padding:16px 18px 0}
.onl-tab{width:84px;height:29px;border-radius:6px;border:1px solid #cfd5de;background:#f4f6f9;color:#4b5563;font-size:13px}
.onl-tab.on{background:linear-gradient(#2a7dc6,#1a6fba);border-color:#155d9c;color:#fff;font-weight:700}
.onl-q{display:flex;align-items:center;padding:12px 18px 0 0;height:42px}
.onl-q label{width:124px;text-align:right;padding-right:14px;color:#374151}
.onl-q .din{width:368px}
.onl-q .btn-gray{width:88px;margin-left:8px;padding:0}
.onl-wrap{margin:12px 18px 0;height:244px;overflow:auto}
.ctbl{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:12px;border:1px solid #e2e7ec;border-radius:6px;overflow:hidden}
.ctbl th{height:27px;background:linear-gradient(#fdfdfe,#f5f7fa);text-align:left;font-weight:400;padding:0 4px;border-bottom:1px solid #e9edf2;position:sticky;top:0;z-index:1}
.ctbl td{height:26px;padding:0 4px;border-bottom:1px solid #f0f2f5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ctbl tr:last-child td{border-bottom:0}
.ctbl td.empty-row{height:42px;text-align:center;color:#9ca3af}
.ctbl input[type=checkbox]{width:13px;height:13px;margin:0 0 0 6px;vertical-align:middle;accent-color:#1a6fba}
.ctbl tr.added td{color:#9ca3af}
.onl-ft{text-align:center;padding-top:12px}
.onl-ft .btn-gray{width:132px;height:34px}

/* 账号表单 */
.dform{padding:24px 0 0}
.drow{display:flex;align-items:center;height:26px;margin-bottom:10px}
.drow>label{width:94px;flex:none;text-align:right;padding-right:16px;color:#374151;font-size:13px}
.din{height:26px;border:1px solid #d9dde4;border-radius:6px;padding:0 10px;font-size:12px;font-family:inherit;color:#111827;background:#fff;outline:none;box-shadow:inset 0 1px 1px rgba(15,23,42,.03)}
.din:focus{border-color:#1a6fba;box-shadow:0 0 0 2px rgba(26,111,186,.12)}
.din.err{border-color:#dc2626}
select.din{appearance:none;-webkit-appearance:none;padding-right:26px;cursor:pointer;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8'%3E%3Cpath d='M0 0h10L5 8z' fill='%23a1a7b0'/%3E%3C/svg%3E") no-repeat right 9px center}
.dform .w340{width:340px}
.dform .w298{width:298px}
.plus-btn{width:30px;height:26px;margin-left:10px;border-radius:6px;border:1px solid #cfd5de;background:#f4f6f9;color:#374151;font-size:14px;line-height:1;display:flex;align-items:center;justify-content:center}
.plus-btn:hover{background:#e9edf2}
.drow .dlnk{margin-left:7px}
.pwd-box{position:relative;width:340px}
.pwd-box .din{width:100%;padding-right:30px}
.eye{position:absolute;right:7px;top:6px;width:14px;height:14px;border:0;background:transparent;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}
.dform-ft{text-align:center;padding-top:9px}
.dform-ft .btn-blue{width:75px;height:31px;padding:0}
.dform .hint2{margin:-2px 0 0 110px;color:#9ca3af;font-size:11px}
.dlg-mask{background:rgba(31,41,55,.5)}
#aPwd::placeholder{letter-spacing:-2px;color:#9ca3af;font-size:11px}
.dlg-x{font-size:13px;width:25px;height:25px;top:5px}

/* 可输入的服务器下拉框 */
.cbox{position:relative;display:inline-block}
.cbox .din{width:100%;padding-right:26px}
.cb-arr{position:absolute;right:1px;top:1px;width:24px;height:24px;cursor:pointer;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8'%3E%3Cpath d='M0 0h10L5 8z' fill='%23a1a7b0'/%3E%3C/svg%3E") no-repeat center}
.cb-list{display:none;position:absolute;left:0;right:0;top:29px;max-height:180px;overflow:auto;background:#fff;border:1px solid #d9dde4;border-radius:6px;box-shadow:0 6px 18px rgba(15,23,42,.16);z-index:60;font-size:12px}
.cb-item{display:flex;justify-content:space-between;gap:8px;padding:5px 10px;cursor:pointer;white-space:nowrap}
.cb-item:hover{background:#eef4fb}
.cb-item .m{color:#9ca3af;font-size:11px}
.cb-empty{padding:8px 10px;color:#6b7280;line-height:1.5}
.muted{color:#9ca3af}

.dot.provisioning,.dot.deploying,.dot.synchronizing{background:#f59e0b}
.acc .r4{font-size:11px;margin-top:2px;color:#b45309;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acc .r4.st-error,.acc .r4.st-disconnected{color:#dc2626;white-space:normal}

/* =====================================================================
   UI v2 — 喊单 / 跟单分栏、卡片化、统一配色与间距（4/8px 网格）
   ===================================================================== */
:root{
  --pri:#1a6fd6;--pri-d:#155bb0;--pri-l:#e8f1fd;--pri-b:#bcd5f5;
  --ok:#16a34a;--ok-l:#e7f6ec;--warn:#d97706;--warn-l:#fdf3e2;--bad:#dc2626;--bad-l:#fdecec;--off:#6b7280;--off-l:#f0f2f5;
  --master:#ea6a0c;--master-l:#fff1e6;--follow:#0f9f6e;--follow-l:#e5f6ef;
  --tx:#1f2937;--tx2:#4b5563;--tx3:#8a94a3;--bd:#e3e8ef;--bd2:#edf0f4;--bg:#f2f4f8;--card:#fff;
  --r:8px;--r-s:6px;--sh:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);--sh-h:0 4px 12px rgba(16,24,40,.08);
  --mono:"SF Mono","JetBrains Mono","Roboto Mono",Menlo,Consolas,"DejaVu Sans Mono",monospace;
}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Hiragino Sans GB","Noto Sans CJK SC","Noto Sans SC","Segoe UI",Roboto,Arial,sans-serif;font-size:13px;color:var(--tx);background:var(--bg)}
button{font-size:13px}
.num,.n,.stat span,.acc .r3 .num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}
.pos{color:var(--ok)}.neg{color:var(--bad)}

/* header / tabs / toolbar */
.hd{height:44px;background:#fff;border-bottom:1px solid var(--bd);padding:0 16px}
.hd-title{font-size:15px}
.badge-ver{height:20px;line-height:18px;padding:0 8px;border-radius:10px;color:var(--pri);background:var(--pri-l);border-color:var(--pri-b)}
.btn-pay{height:28px;padding:0 12px;border-radius:var(--r-s);background:var(--pri)}
.btn-pay:hover{background:var(--pri-d)}
.user{height:28px;border-radius:var(--r-s);padding:0 8px}
.avatar{background:var(--pri)}
.hd-link{color:var(--pri)}
.top-tabs{height:32px;background:#fff;border-bottom:1px solid var(--bd);padding-left:16px;gap:4px;align-items:stretch}
.ttab{width:auto;height:auto;padding:0 16px;line-height:31px;margin:0;background:transparent;border-radius:0;color:var(--tx3)}
.ttab:hover{color:var(--tx)}
.ttab.active{height:auto;background:transparent;color:var(--pri);box-shadow:inset 0 -2px 0 var(--pri)}
.toolbar{height:48px;background:var(--bg);border-bottom:0;padding:0 16px;gap:8px}
.tbtn{height:32px;padding:0 12px!important;gap:8px;border:1px solid var(--bd);border-radius:var(--r-s);box-shadow:var(--sh);font-size:13px}
.tbtn:hover{border-color:var(--pri-b);background:#fff;color:var(--pri)}
.tbtn.active{background:#fff;border-color:var(--bd)}
.grid-btn{right:16px;top:8px;border-radius:var(--r-s);border-color:var(--bd)}

/* layout */
.main{padding:0 16px 16px;gap:0;background:var(--bg)}
.side{width:300px;background:var(--card);border:1px solid var(--bd);border-radius:var(--r);box-shadow:var(--sh);overflow:hidden}
.splitter{width:12px}
.grip{width:3px;height:40px;background:#cfd6e0;border-radius:2px}
.content{border:1px solid var(--bd);border-radius:var(--r);box-shadow:var(--sh);overflow:hidden}

/* sidebar tabs */
.side-tabs{flex:none;display:flex;padding:8px 8px 0;gap:4px;border-bottom:1px solid var(--bd)}
.side-tab{flex:1;height:40px;display:flex;align-items:center;justify-content:center;gap:8px;border:0;background:transparent;color:var(--tx3);font-weight:600;font-size:14px;border-radius:var(--r-s) var(--r-s) 0 0;position:relative}
.side-tab:hover{color:var(--tx);background:#f7f9fc}
.side-tab.active{color:var(--tx)}
.side-tab.active::after{content:"";position:absolute;left:12px;right:12px;bottom:-1px;height:2px;border-radius:2px;background:var(--pri)}
.side-tab[data-side=master].active::after{background:var(--master)}
.side-tab[data-side=follower].active::after{background:var(--follow)}
.st-dot{width:8px;height:8px;border-radius:50%;flex:none}
.st-dot.signal{background:var(--master)}.st-dot.follow{background:var(--follow)}
.side-tab .cnt{min-width:20px;height:20px;line-height:20px;padding:0 6px;border-radius:10px;background:var(--off-l);color:var(--tx2);font-size:12px;font-weight:600}
.side-tab.active[data-side=master] .cnt{background:var(--master-l);color:var(--master)}
.side-tab.active[data-side=follower] .cnt{background:var(--follow-l);color:var(--follow)}
.side-hd{height:auto;margin:0;border:0;padding:12px 12px 8px;gap:8px}
.search{flex:1;min-width:0;height:32px;display:flex;align-items:center;gap:8px;padding:0 8px;border:1px solid var(--bd);border-radius:var(--r-s);color:var(--tx3);background:#fafbfc}
.search:focus-within{border-color:var(--pri);background:#fff;box-shadow:0 0 0 3px rgba(26,111,214,.12)}
.search input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:12px;color:var(--tx)}
.side-add{flex:none;height:32px;padding:0 12px;border:0;border-radius:var(--r-s);background:var(--pri);color:#fff;font-weight:600;font-size:12px;box-shadow:0 1px 2px rgba(26,111,214,.3)}
.side-add:hover{background:var(--pri-d)}
.side-filter{flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 12px 8px}
.side-filter select{height:28px;border:1px solid var(--bd);border-radius:var(--r-s);padding:0 8px;font:inherit;font-size:12px;color:var(--tx2);background:#fff;outline:0;cursor:pointer}
.chk{font-size:12px;color:var(--tx2)}
.chk .box{width:14px;height:14px;border-radius:4px;margin-right:8px}
.chk input:checked+.box{background:var(--pri);border-color:var(--pri)}
.chk input:checked+.box::after{left:4px;top:1px}
.acc-list{padding:4px 12px 12px;display:flex;flex-direction:column;gap:8px}
.side-tip{list-style:none;font-size:12px;color:var(--pri);background:var(--pri-l);border-radius:var(--r-s);padding:8px}
.acc-empty{list-style:none;text-align:center;padding:32px 16px;color:var(--tx3);font-size:12px;line-height:1.8;border:1px dashed var(--bd);border-radius:var(--r)}

/* account cards */
.acc{margin:0;padding:12px;gap:4px;border:1px solid var(--bd);border-radius:var(--r);background:#fff;transition:border-color .15s,box-shadow .15s,background .15s}
.acc:hover{background:#fff;border-color:#cdd6e2;box-shadow:var(--sh-h)}
.acc.sel{background:#f6f9ff;border-color:var(--pri);box-shadow:0 0 0 3px rgba(26,111,214,.12)}
.acc.hl{border-color:var(--follow);background:#f4fbf8}
.acc.hl::before{content:"跟随当前喊单";position:absolute;right:12px;top:-8px;height:16px;line-height:16px;padding:0 8px;border-radius:8px;background:var(--follow);color:#fff;font-size:10px}
.acc.disabled{background:#fafbfc}
.acc.disabled .no,.acc.disabled .r3{opacity:.55}
.acc .r1{justify-content:flex-start;gap:8px}
.acc .r1 .sp{flex:1}
.acc .no{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:.2px}
.acc .r2{font-size:12px;color:var(--tx3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acc .r3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:4px;padding:8px;background:#f8fafc;border-radius:var(--r-s)}
.acc .r3 div{display:flex;flex-direction:column;gap:2px;min-width:0}
.acc .r3 label{font-size:11px;color:var(--tx3)}
.acc .r3 .num{font-size:13px;font-weight:600;color:var(--tx);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acc .r3 .num.pos{color:var(--ok)}.acc .r3 .num.neg{color:var(--bad)}
.acc .meta{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.chip{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:10px;background:var(--off-l);color:var(--tx2);font-size:11px;white-space:nowrap}
.chip.red{background:var(--bad-l);color:var(--bad)}
.chip.warn{background:var(--warn-l);color:var(--warn)}
.acc .r4{font-size:11px;margin-top:4px;padding:4px 8px;border-radius:4px;background:var(--warn-l)}
.acc .r4.st-error,.acc .r4.st-disconnected{background:var(--bad-l)}
.acc .note{font-size:11px;color:var(--tx3);margin-top:2px}
.acc .term,.acc .tl{font-size:11px}
.badge{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;border-radius:10px;font-size:11px;font-weight:600;white-space:nowrap;flex:none}
.badge i{width:6px;height:6px;border-radius:50%;background:currentColor}
.b-ok{background:var(--ok-l);color:var(--ok)}
.b-warn{background:var(--warn-l);color:var(--warn)}
.b-warn i{animation:pulse 1.2s ease-in-out infinite}
.b-bad{background:var(--bad-l);color:var(--bad)}
.b-off{background:var(--off-l);color:var(--off)}
@keyframes pulse{50%{opacity:.3}}
.ttag{display:inline-flex;align-items:center;height:18px;padding:0 6px;border-radius:4px;font-size:11px;border:1px solid var(--bd);color:var(--tx2);background:#fff;white-space:nowrap;flex:none}
.ttag.t-sim{color:#7c3aed;border-color:#ddd0fb;background:#f6f2ff}
.ttag.t-terminal{color:var(--pri);border-color:var(--pri-b);background:var(--pri-l)}
.ttag.t-ea{color:#0e7490;border-color:#b6e3ec;background:#ecf8fb}
.ttag.t-metaapi{color:#b45309;border-color:#f3d9b0;background:#fff7eb}
.fol-list{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px;padding-top:8px;border-top:1px dashed var(--bd)}
.fol{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:11px;border:1px solid #bfe6d6;background:var(--follow-l);color:var(--follow);font-size:11px;font-variant-numeric:tabular-nums;cursor:pointer}
.fol:hover{background:#d4f0e4}
.fol .dot{width:6px;height:6px}
/* toggle switch */
.sw{display:flex;align-items:center;gap:8px;margin-top:8px;cursor:pointer;user-select:none;width:max-content}
.sw input{display:none}
.sw-t{width:32px;height:18px;border-radius:9px;background:#cfd6e0;position:relative;transition:background .15s;flex:none}
.sw-t::after{content:"";position:absolute;left:2px;top:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s}
.sw input:checked+.sw-t{background:var(--follow)}
.sw input:checked+.sw-t::after{transform:translateX(14px)}
.sw-l{font-size:12px;color:var(--tx2)}
.sw input:checked~.sw-l{color:var(--follow);font-weight:600}
.side-ft{height:40px;padding:0 12px;border-top:1px solid var(--bd);background:#fafbfc}
.ws-state{font-size:12px}

/* account header + actions */
.acc-head{flex:none;display:grid;grid-template-columns:1fr auto;grid-template-areas:"main acts" "sub acts";column-gap:16px;row-gap:4px;padding:16px 16px 12px;border-bottom:1px solid var(--bd2)}
.ah-main{grid-area:main;display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.ah-login{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:.3px}
#ahTags{display:inline-flex;align-items:center;gap:8px}
.tag{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:4px;font-size:12px;font-weight:600;color:#fff}
.tag.follow{background:var(--follow)}.tag.signal{background:var(--master)}
.ah-sub{grid-area:sub;font-size:12px;color:var(--tx3);min-width:0}
.ah-sub b{color:var(--tx);font-weight:600}
.acc-head.none .ah-login{color:var(--tx3);font-size:16px}
.acc-head.none .acts{opacity:.5;pointer-events:none}
.acts{grid-area:acts;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:0;align-self:center}
.act-grp{display:flex;gap:4px;padding:4px;border-radius:var(--r);background:#f5f7fa}
.abtn{height:32px;padding:0 12px;gap:8px;border:1px solid var(--bd);border-radius:var(--r-s);background:#fff;font-size:13px;color:var(--tx);transition:all .12s}
.abtn:hover{border-color:var(--pri-b);color:var(--pri);background:#fff}
.abtn .ai{width:auto;height:auto;font-size:14px}
.abtn.primary{background:var(--pri);border-color:var(--pri);color:#fff;font-weight:600;box-shadow:0 1px 2px rgba(26,111,214,.3)}
.abtn.primary:hover{background:var(--pri-d);color:#fff}
.abtn.primary .ai{color:#fff;font-size:16px}
.abtn.danger{background:var(--bad);border-color:var(--bad);color:#fff;font-weight:600;box-shadow:0 1px 2px rgba(220,38,38,.3)}
.abtn.danger:hover{background:#b91c1c;border-color:#b91c1c;color:#fff}
.abtn.danger .ai{color:#fff;font-size:16px}
.abtn.danger-soft{color:#b91c1c;border-color:#f6cfcf;background:#fff}
.abtn.danger-soft:hover{background:var(--bad-l);border-color:#f0b4b4;color:#991b1b}
.danger-grp{background:#fdf5f5}
.abtn.ghost{border-color:transparent;background:transparent;color:var(--tx2)}
.abtn.ghost:hover{background:#f0f3f7;color:var(--tx)}
.ai-up{border-left-width:5px;border-right-width:5px;border-bottom-width:8px}
.ai-dn{border-left-width:5px;border-right-width:5px;border-top-width:8px}
.abtn .ai-up,.abtn .ai-dn{width:0;height:0}
.abtn .ai-ban{width:11px;height:11px}

/* stat cards */
.stats{flex:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px 16px 16px}
.stat{display:flex;flex-direction:column;gap:4px;padding:8px 12px;border:1px solid var(--bd2);border-radius:var(--r);background:#fafbfd;min-width:0}
.stat label{font-size:12px;color:var(--tx3)}
.stat span{font-size:14px;font-weight:600;color:var(--tx);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat span b{font-weight:600}
.stat.big{background:#fff;border-color:var(--bd);box-shadow:var(--sh);padding:12px 16px}
.stat.big span{font-size:22px;font-weight:700;letter-spacing:-.2px}
.stat.big:nth-child(1){border-top:3px solid var(--pri)}
.stat.big:nth-child(2){border-top:3px solid #6366f1}
.stat.big:nth-child(3){border-top:3px solid #94a3b8}
.stat span.pos{color:var(--ok)}.stat span.neg{color:var(--bad)}
.stats{grid-template-columns:repeat(12,minmax(0,1fr))}
.stats .stat.big{grid-column:span 4}
.stats .stat:not(.big){grid-column:span 2}
.stats .stat:nth-child(7),.stats .stat:nth-child(8){grid-column:span 3}

/* sub tabs */
.sub-tabs{height:40px;background:#fff;border-top:1px solid var(--bd2);border-bottom:1px solid var(--bd);padding:0 16px;gap:24px;align-items:stretch}
.stab{width:auto;height:auto!important;line-height:39px;margin:0!important;padding:0 2px;background:transparent;border-radius:0;color:var(--tx3);font-size:13px;display:flex;align-items:center;gap:8px}
.stab:hover{color:var(--tx)}
.stab.active{background:transparent;color:var(--pri);font-weight:600;box-shadow:inset 0 -2px 0 var(--pri)}
.stab .sc:not(:empty){min-width:18px;height:18px;line-height:18px;padding:0 6px;border-radius:9px;background:var(--pri-l);color:var(--pri);font-size:11px;font-weight:600;text-align:center}

/* table */
.tbl-wrap{background:#fff}
.tbl{min-width:1180px}
.tbl thead th{height:36px;background:#f7f9fb;border-bottom:1px solid var(--bd);color:var(--tx2);font-weight:600;font-size:12px;padding:0 8px;box-shadow:0 1px 0 var(--bd)}
.tbl thead th+th{border-left:0}
.tbl thead th:first-child{color:var(--tx3)}
.tbl thead th.r,.tbl td.r{text-align:right}
.tbl tbody tr{height:40px}
.tbl tbody tr:nth-child(odd),.tbl tbody tr:nth-child(even){background:#fff}
.tbl tbody tr:hover{background:#f3f7fd}
.tbl td{padding:0 8px;border-bottom:1px solid var(--bd2);font-size:13px}
.tbl td.n{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}
.tbl td.sym{font-weight:600}
.tbl td.cm{color:var(--tx3);font-size:12px}
.tbl td.pl{font-weight:700}
.side-tag{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:20px;padding:0 6px;border-radius:4px;font-size:11px;font-weight:700;letter-spacing:.4px}
.side-tag.buy{background:var(--ok-l);color:var(--ok)}
.side-tag.sell{background:var(--bad-l);color:var(--bad)}
.op{display:inline-flex;align-items:center;height:24px;padding:0 8px;border-radius:4px;color:var(--pri)}
.op:hover{background:var(--pri-l);text-decoration:none}
.op.red{color:var(--bad)}.op.red:hover{background:var(--bad-l)}
.tbl td .op+.op{margin-left:4px}
.lv{display:inline-block;padding:0 6px;border-radius:4px;background:var(--off-l);color:var(--tx2);font-size:11px;line-height:18px}
.lv.lv-错误{background:var(--bad-l);color:var(--bad)}.lv.lv-警告{background:var(--warn-l);color:var(--warn)}
.empty{top:96px;display:flex;flex-direction:column;align-items:center;gap:8px;padding:0 24px;color:var(--tx3);font-size:12px;line-height:1.7}
.empty[hidden]{display:none}
.empty b{font-size:14px;color:var(--tx2);font-weight:600}
.empty span{max-width:420px}
.em-ic{width:48px;height:48px;border-radius:12px;background:#f2f5f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%239aa6b5' stroke-width='1.6'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18M8 14h3'/%3E%3C/svg%3E") no-repeat center}

/* status bar */
.status{height:28px;background:#fff;border-top:1px solid var(--bd);color:var(--tx3);padding:0 16px}
.status em{color:var(--tx3)}
.status b{color:var(--tx2);font-variant-numeric:tabular-nums}
.status .disc{color:var(--warn)}
.status .restart{color:var(--pri)}
.status .restart:hover,.status .disc:hover{color:var(--pri-d)}

/* dialogs — 保留蓝色渐变标题栏，细节打磨 */
.m-hd,.dlg-hd{height:40px;padding-left:16px;font-size:14px;letter-spacing:.3px;
  background:linear-gradient(90deg,#2b7bd0 0%,#1863b0 40%,#0f4f91 75%,#0b3f75 100%);box-shadow:inset 0 -1px 0 rgba(255,255,255,.08)}
.m-x,.dlg-x{width:28px;height:28px;top:6px;right:8px;border-radius:6px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.22);transition:background .12s}
.m-x:hover,.dlg-x:hover{background:rgba(255,255,255,.32)}
.modal,.dlg{border:0;border-radius:12px;box-shadow:0 20px 48px rgba(15,23,42,.28),0 0 0 1px rgba(15,23,42,.06)}
.dlg-mask,.mask{background:rgba(15,23,42,.45);backdrop-filter:blur(2px)}
.m-ft{padding:12px 16px;background:#fafbfc}
.mbtn{height:32px;border-radius:var(--r-s)}
.mbtn.primary,.btn-blue,.onl-tab.on{background:var(--pri);border-color:var(--pri);box-shadow:0 1px 2px rgba(26,111,214,.3)}
.mbtn.primary:hover,.btn-blue:hover{background:var(--pri-d)}
.btn-blue,.btn-gray{border-radius:var(--r-s)}
.din{border-radius:var(--r-s);border-color:var(--bd)}
.din:focus,.frow input:focus,.frow select:focus{border-color:var(--pri);box-shadow:0 0 0 3px rgba(26,111,214,.12)}
.toast{border-radius:var(--r);padding:8px 16px;font-size:13px}
.mlist .mbtn{height:36px}

/* responsive */
@media (max-width:1360px){
  .stats{grid-template-columns:repeat(15,minmax(0,1fr))}
  .stats .stat.big{grid-column:span 5}
  .stats .stat:not(.big),.stats .stat:nth-child(7),.stats .stat:nth-child(8){grid-column:span 3}
  .stat{padding:8px}
  .acc-head{grid-template-columns:1fr;grid-template-areas:"main" "sub" "acts"}
  .acts{justify-content:flex-start;margin-top:8px}
}
@media (max-width:1100px){
  .side{width:260px}
  .main{padding:0 8px 8px}
  .toolbar{padding:0 8px}
  .splitter{width:8px}
  .stat.big span{font-size:18px}
  .abtn{padding:0 8px;font-size:12px}
  .tbl td{font-size:12px}
}
@media (max-width:860px){
  html,body{overflow:auto}
  #app{height:auto;min-height:100vh}
  .main{flex-direction:column}
  .side{width:auto!important;max-height:420px}
  .splitter{display:none}
  .content{margin-top:8px;min-height:520px}
  .stats .stat{grid-column:span 6!important}
  .tbtn{padding:0 8px!important}
  .hd-link,.exp{display:none}
}
.logo{margin:0 10px 0 0;display:block;flex:none}

/* =====================================================================
   延迟标签 + 手机版（≤760px）
   ===================================================================== */
.lat{display:inline-flex;align-items:center;height:18px;padding:0 6px;margin-left:6px;border-radius:9px;background:#eef6ff;color:var(--pri);font-size:11px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.m-only,.m-back,.mnav,.mcards{display:none}
.tbl td.r .lat{margin-left:0}

@media (max-width:760px){
  html{height:auto;overflow-y:auto;overflow-x:hidden}
  body{height:auto;overflow:visible}
  body{font-size:14px;background:var(--bg);padding-bottom:calc(60px + env(safe-area-inset-bottom));-webkit-tap-highlight-color:transparent}
  #app{display:block;height:auto;min-height:100vh}

  /* 顶栏 */
  .hd{position:sticky;top:0;z-index:40;height:52px;padding:0 12px;padding-top:env(safe-area-inset-top);box-sizing:content-box;
    background:linear-gradient(120deg,#3f93f5 0%,#1a6fd6 55%,#0f5bb5 100%);border:0;box-shadow:0 2px 10px rgba(16,60,130,.18)}
  .hd-title{color:#fff;font-size:17px;letter-spacing:.5px}
  .logo{width:30px;height:30px;border-radius:8px;box-shadow:0 0 0 1.5px rgba(255,255,255,.55);margin-right:10px}
  .badge-ver{display:none}
  .hd-link,.exp,.btn-pay,.fs-btn{display:none!important}
  .user{margin:0;height:32px;min-width:0;padding:0 8px;background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.28);color:#fff}
  .user #userName{max-width:84px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
  .user .caret{color:#fff}
  .avatar{background:#fff;color:var(--pri)}
  .dd-menu{top:36px;color:var(--tx)}
  .dd-menu li{padding:10px 16px;font-size:14px}
  .m-back{display:none;align-items:center;justify-content:center;width:34px;height:34px;margin:0 4px 0 -6px;border:0;border-radius:8px;background:transparent;color:#fff}
  .m-back:active{background:rgba(255,255,255,.18)}
  .mv-detail .m-back{display:flex}
  .mv-detail .hd .logo{display:none}

  /* 顶部标签 / 工具栏 → 横向滑动的快捷按钮 */
  .top-tabs{display:none}
  .toolbar{height:auto;padding:12px 12px 4px;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .toolbar::-webkit-scrollbar{display:none}
  .tbtn{flex:none;height:36px;padding:0 14px!important;border-radius:18px;font-size:13px}
  .tbtn.active{background:#fff}
  .grid-btn{position:static;flex:none;width:36px;height:36px;border-radius:18px}
  .mv-detail .toolbar{display:none}

  /* 两个视图：账户列表 / 账户详情 */
  .main{display:block;padding:8px 12px 12px}
  .splitter{display:none}
  .mv-list .content{display:none}
  .mv-detail .side{display:none}
  .side{width:auto!important;max-height:none;overflow:visible;border-radius:12px}
  .side-tabs{position:sticky;top:calc(52px + env(safe-area-inset-top));z-index:5;background:#fff;border-radius:12px 12px 0 0;padding:6px 6px 0}
  .side-tab{height:46px;font-size:15px}
  .side-hd{padding:12px 12px 8px}
  .search{height:40px}
  .search input{font-size:15px}
  .side-add{height:40px;padding:0 14px;font-size:14px}
  .side-filter select{height:34px;font-size:13px}
  .acc-list{overflow:visible;padding:4px 12px 12px;gap:10px}
  .acc{padding:14px;border-radius:12px}
  .acc:active{background:#f6f9ff}
  .acc .no{font-size:16px}
  .acc .r2{font-size:12px}
  .acc .r3 .num{font-size:14px}
  .sw{margin-top:10px}
  .sw-t{width:40px;height:22px;border-radius:11px}
  .sw-t::after{width:18px;height:18px}
  .sw input:checked+.sw-t::after{transform:translateX(18px)}
  .sw-l{font-size:13px}
  .fol{height:28px;padding:0 10px;font-size:12px}
  .side-ft{height:48px;border-radius:0 0 12px 12px}

  /* 详情：账户头 + 操作 */
  .content{border-radius:12px;overflow:visible;min-height:0;margin:0}
  .acc-head{display:block;padding:14px 14px 10px}
  .ah-login{font-size:22px}
  .ah-main{gap:6px}
  .ah-sub{margin-top:6px;line-height:1.6}
  .acts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:auto;gap:8px;margin-top:12px;justify-content:stretch}
  .act-grp{display:contents}
  .m-only{display:flex}
  .abtn,.abtn.ghost{height:60px;padding:4px 2px;flex-direction:column;justify-content:center;gap:4px;font-size:12px;border-radius:10px;border:1px solid var(--bd);background:#fff;color:var(--tx);white-space:nowrap}
  .abtn .ai{font-size:18px;height:20px}
  .abtn.primary .ai,.abtn.danger .ai{font-size:20px}
  .abtn .ai-up,.abtn .ai-dn{margin:5px 0}
  .abtn.danger-soft{background:#fff7f7}
  .abtn.ghost{background:#f5f7fa}
  .abtn:active{transform:scale(.97)}

  /* 统计 */
  .stats{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px;padding:4px 14px 14px}
  .stats .stat.big{grid-column:span 2!important;padding:10px 10px}
  .stats .stat:not(.big){grid-column:span 2!important;padding:8px 10px}
  .stats .stat:nth-child(7),.stats .stat:nth-child(8){grid-column:span 3!important}
  .stat.big span{font-size:16px}
  .stat span{font-size:13px}
  .stat label{font-size:11px}

  /* 子标签 */
  .sub-tabs{position:sticky;top:calc(52px + env(safe-area-inset-top));z-index:5;height:46px;padding:0 14px;gap:0}
  .stab{flex:1;justify-content:center;font-size:15px;line-height:45px}

  /* 列表：表格换成卡片 */
  .tbl-wrap{overflow:visible;background:var(--bg);min-height:220px;padding:10px 0 4px}
  .tbl{display:none}
  .mcards{display:flex;flex-direction:column;gap:10px;padding:0 10px}
  .mc{background:#fff;border:1px solid var(--bd);border-radius:12px;padding:12px;box-shadow:var(--sh)}
  .mc-r1{display:flex;align-items:center;gap:8px;min-width:0}
  .mc-r1 .sp,.mc-ft .sp{flex:1}
  .mc-sym{font-size:15px}
  .mc-lots{color:var(--tx2);font-size:13px}
  .mc-pl{font-size:17px}
  .mc-grid{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:6px;margin-top:10px;padding:8px 10px;background:#f8fafc;border-radius:8px}
  .mc-grid div{display:flex;flex-direction:column;gap:2px;min-width:0}
  .mc-grid label{font-size:11px;color:var(--tx3)}
  .mc-grid span{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mc-ft{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px;font-size:12px;color:var(--tx3)}
  .mc-cm{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 6px;border-radius:4px;background:var(--off-l);color:var(--tx2);line-height:18px}
  .mc-ft .lat{margin-left:0}
  .mc-ops{display:flex;gap:8px;margin-left:auto}
  .mc-btn{height:32px;min-width:56px;padding:0 12px;border-radius:8px;border:1px solid var(--pri-b);background:var(--pri-l);color:var(--pri);font-size:13px;font-weight:600}
  .mc-btn.red{border-color:#f6cfcf;background:var(--bad-l);color:var(--bad)}
  .mc-log{padding:10px 12px}
  .mc-log .mc-r1 b{font-size:13px}
  .mc-t{font-size:12px;color:var(--tx3)}
  .mc-msg{margin-top:6px;font-size:13px;line-height:1.6;color:var(--tx);word-break:break-all}
  .mc-acc{display:inline-block;margin-right:6px;padding:0 6px;border-radius:4px;background:var(--off-l);color:var(--tx2);font-size:12px;line-height:18px}
  .mc-msg .lat{margin-left:2px}
  .empty{position:static;padding:36px 24px}

  /* 底部状态栏 → 底部导航 */
  .status{display:none}
  .mnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;height:calc(58px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);
    background:rgba(255,255,255,.97);border-top:1px solid var(--bd);box-shadow:0 -2px 12px rgba(16,24,40,.06);backdrop-filter:blur(8px)}
  .mnav button{flex:1;border:0;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--tx3);font-size:11px}
  .mnav button.on{color:var(--pri);font-weight:600}
  .mnav button:active{background:#f3f6fa}

  /* 对话框：适配窄屏 */
  .mask,.dlg-mask{align-items:flex-end}
  .modal,.modal.wide{width:100%!important;max-height:88vh;display:flex;flex-direction:column;border-radius:16px 16px 0 0}
  .m-bd{overflow:auto;padding:16px;-webkit-overflow-scrolling:touch}
  .m-ft{padding:10px 16px calc(10px + env(safe-area-inset-bottom))}
  .m-ft .mbtn{flex:1;height:42px;font-size:15px}
  .dlg{width:100%!important;max-height:90vh;height:auto!important;border-radius:16px 16px 0 0}
  .dlg-bd{overflow:auto;padding-bottom:env(safe-area-inset-bottom)}
  .frow{flex-wrap:wrap}
  .frow label{width:76px;font-size:13px}
  .frow input,.frow select{height:40px;font-size:15px;min-width:0}
  .frow small{width:100%;margin:4px 0 0 76px;white-space:normal}
  .frow .inline{flex-wrap:wrap;gap:10px 16px}
  .fsec{margin-left:0}
  .mlist{grid-template-columns:1fr 1fr}
  .mlist .mbtn{height:46px;font-size:14px}
  .kv{grid-template-columns:96px 1fr;word-break:break-all}
  .dform{padding:16px 14px 0}
  .drow{height:auto;min-height:40px}
  .drow>label{width:64px;padding-right:10px;font-size:13px}
  .din,.dform .w340,.dform .w298,.pwd-box,.cbox{flex:1;width:auto;min-width:0;height:40px;font-size:15px}
  .cbox .din,.pwd-box .din{width:100%;height:40px}
  .cb-arr{height:38px}
  .cb-list{top:42px}
  .eye{top:13px}
  .plus-btn{width:38px;height:40px;margin-left:6px}
  .drow .dlnk{margin-left:6px}
  .dform .hint2{margin-left:74px}
  .dform-ft .btn-blue{width:100%;height:44px;font-size:15px}
  .dform-ft{padding:12px 0 16px}
  .srv-top{padding:14px}
  .dtbl{width:640px;margin:0 14px 14px}
  .dlg-bd:has(.dtbl),.dlg-bd:has(.ctbl){overflow:auto}
  .onl-tabs{padding:14px 14px 0}
  .onl-q{padding:12px 14px 0;height:auto}
  .onl-q label{display:none}
  .onl-q .din{flex:1;width:auto}
  .onl-wrap{margin:12px 14px 0;height:46vh}
  .ctbl{min-width:520px}
  .toast-wrap{top:calc(64px + env(safe-area-inset-top));width:calc(100% - 32px)}
  .toast{font-size:14px;text-align:center}
}

/* =====================================================================
   EA 托管（独立页面）
   ===================================================================== */
.hostv{flex:1;display:flex;flex-direction:column;min-height:0;padding:0 16px 16px;background:var(--bg)}
.hostv[hidden]{display:none}
.pv-host .main,.pv-host .toolbar{display:none!important}
.ttab-host{font-weight:600}
.hv-bar{flex:none;display:flex;align-items:center;gap:16px;padding:12px 0}
.hv-title{display:flex;align-items:center;gap:12px;min-width:0}
.hv-title b{display:block;font-size:16px}
.hv-title small{display:block;color:var(--tx3);font-size:12px;margin-top:2px}
.hv-ic{flex:none;width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,#3f93f5,#1a6fd6);color:#fff;font-weight:800;font-size:14px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(26,111,214,.3)}
.hv-cap{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto}
.hv-cap .chip{height:24px;padding:0 10px;font-size:12px;background:#fff;border:1px solid var(--bd)}
.hv-cap .chip.red{background:var(--bad-l);border-color:#f6cfcf}
.hv-cap .chip.warn{background:var(--warn-l);border-color:#f3dcb4}
.hv-add{height:34px;padding:0 16px;font-size:13px}
.hv-body{flex:1;display:flex;gap:12px;min-height:0}
.hv-list{flex:none;width:340px;list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;overflow:auto}
.hv-card{position:relative;padding:12px;border:1px solid var(--bd);border-radius:var(--r);background:#fff;box-shadow:var(--sh);cursor:pointer;display:flex;flex-direction:column;gap:6px;transition:border-color .15s,box-shadow .15s}
.hv-card:hover{border-color:#cdd6e2;box-shadow:var(--sh-h)}
.hv-card.sel{border-color:var(--pri);box-shadow:0 0 0 3px rgba(26,111,214,.12);background:#f9fbff}
.hc-r1{display:flex;align-items:center;gap:8px}
.hc-name{flex:1;min-width:0;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hc-r2{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--tx2);min-width:0}
.hc-r2>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hc-sym{font-weight:600;color:var(--tx);flex:none}
.hc-file{color:var(--tx3);font-family:var(--mono);font-size:11px}
.hc-r3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:8px;background:#f8fafc;border-radius:var(--r-s)}
.hc-r3 div{display:flex;flex-direction:column;gap:2px;min-width:0}
.hc-r3 label{font-size:11px;color:var(--tx3)}
.hc-r3 .num{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hc-err{font-size:11px;color:var(--bad);background:var(--bad-l);border-radius:4px;padding:4px 8px;line-height:1.5}
.hc-ops{display:flex;gap:6px;justify-content:flex-end}
.hb{height:26px;padding:0 12px;border:1px solid var(--bd);border-radius:var(--r-s);background:#fff;color:var(--tx2);font-size:12px;cursor:pointer}
.hb:hover{border-color:var(--pri-b);color:var(--pri)}
.hb.pri{background:var(--pri);border-color:var(--pri);color:#fff}
.hb.red{color:var(--bad);border-color:#f6cfcf;background:#fff7f7}
.hv-detail{flex:1;min-width:0;display:flex;flex-direction:column;background:#fff;border:1px solid var(--bd);border-radius:var(--r);box-shadow:var(--sh);overflow:hidden}
.hv-none{margin:auto;color:var(--tx3);padding:40px}
.hv-head{padding:14px 16px 10px;border-bottom:1px solid var(--bd2)}
.hv-h1{display:flex;align-items:center;gap:8px}
.hv-h1 b{font-size:18px}
.hv-h2{margin-top:6px;color:var(--tx2);font-size:12px;line-height:1.6}
.hv-acts{display:flex;gap:8px;margin-top:10px;justify-content:flex-start}
.hv-acts .abtn{height:32px;padding:0 12px}
.hv-alert{margin:10px 16px 0;padding:8px 12px;border-radius:var(--r-s);font-size:12px;line-height:1.6}
.hv-alert.bad{background:var(--bad-l);color:var(--bad)}
.hv-alert.warn{background:var(--warn-l);color:#9a5a05}
.hv-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px;padding:12px 16px}
.stats.hv-stats .stat:not(.big),.stats.hv-stats .stat:nth-child(n){grid-column:auto!important;padding:8px 10px;background:#f8fafc;border-radius:var(--r-s);border:1px solid var(--bd2)}
.hv-stats .stat label{display:block;font-size:11px;color:var(--tx3)}
.hv-stats .stat span{display:block;font-size:14px;font-weight:600;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.hv-tabs{flex:none}
.hv-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:auto}
.hv-log{flex:1;min-height:200px;overflow:auto;background:#0f1722;color:#d6dde8;font-family:var(--mono);font-size:12px;line-height:1.65;padding:10px 12px}
.ll{display:flex;gap:10px;white-space:pre-wrap;word-break:break-all}
.ll .lt{flex:none;color:#7f8ea3}
.ll .ls{flex:none;color:#7cb7ff;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ll.l1 .lm{color:#fbbf24}.ll.l2 .lm,.ll.l3 .lm{color:#f87171}
.hv-logft{flex:none;padding:6px 12px;font-size:11px;color:var(--tx3);border-top:1px solid var(--bd2);background:#fafbfc}
.hv-empty{padding:36px 20px;text-align:center;color:var(--tx3);line-height:1.8}
.hv-tbl{width:100%}
.hv-dlg .hv-sec{margin:14px 0 8px;padding-top:10px;border-top:1px dashed var(--bd);font-size:12px;font-weight:600;color:var(--tx2)}
.hv-file{flex:1;display:flex;align-items:center;gap:10px;min-width:0}
.hv-pick{width:auto!important;padding:0!important;text-align:left!important;flex:none}
.hv-pick input{display:none}
.hv-pick span{display:inline-flex;align-items:center;height:30px;padding:0 12px;border:1px solid var(--pri-b);border-radius:var(--r-s);background:var(--pri-l);color:var(--pri);font-size:12px;font-weight:600;cursor:pointer}
.hv-fst{flex:1;min-width:0;font-size:12px;color:var(--tx2);line-height:1.5}
.hv-fst em{font-style:normal;color:var(--tx3)}
.hv-fst i{font-style:normal;font-weight:700;margin-right:2px}.hv-fst i.ok{color:var(--ok)}.hv-fst i.bad{color:var(--bad)}
.hv-opts{flex-direction:column;align-items:flex-start!important;gap:6px!important}
.hv-note{margin-top:12px;padding:10px 12px;border-radius:var(--r-s);background:var(--pri-l);color:#1d4f91;font-size:12px;line-height:1.7}
.modal.wide:has(.hv-dlg){width:600px}
@media (max-width:1100px){.hv-list{width:290px}.hv-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (max-width:860px){.hv-body{flex-direction:column}.hv-list{width:auto}.hv-detail{min-height:560px}}
@media (max-width:760px){
  .mnav button span{font-size:10.5px}
  .hostv{display:block;padding:8px 12px 12px}
  .hostv[hidden]{display:none}
  .hv-bar{flex-wrap:wrap;gap:10px;padding:6px 0 10px}
  .hv-title small{font-size:11.5px;line-height:1.5}
  .hv-cap{margin-left:0;flex:1}
  .hv-add{height:38px;border-radius:19px;padding:0 16px;font-size:14px}
  .hv-body{display:block}
  .hv-list{width:auto;overflow:visible;gap:10px}
  .hv-card{padding:14px;border-radius:12px}
  .hc-name{font-size:16px}
  .hb{height:34px;padding:0 16px;font-size:13px;border-radius:8px}
  .hv-detail{display:none;border-radius:12px;overflow:visible}
  .hv-detail .hv-none{display:none}
  .hv-detail .hv-acts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
  .hv-detail .hv-acts .abtn{height:56px}
  .hv-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:10px 12px}
  .hv-tabs{position:sticky;top:calc(52px + env(safe-area-inset-top));background:#fff;z-index:5}
  .hv-tabs .stab{font-size:14px}
  .hv-log{min-height:46vh;max-height:60vh;font-size:11.5px;padding:8px 10px}
  .ll{flex-wrap:wrap;gap:0 8px}
  .ll .lm{flex-basis:100%}
  .hv-pane{overflow:auto}
  .hv-tbl{display:table!important;min-width:640px}
  .hv-detail .hv-alert{margin:10px 12px 0}
  body.hvd .hv-list,body.hvd .hv-bar{display:none}
  body.hvd .hv-detail{display:flex;flex-direction:column}
  .hv-detail .hv-head{padding:14px 14px 10px}
  .hv-detail .hv-logft{border-radius:0 0 12px 12px}
  body.hvd .m-back{display:flex}
  body.hvd .hd .logo{display:none}
  .hv-file{flex-wrap:wrap}
  .frow.hv-frow label{align-self:flex-start;margin-top:8px}
  .modal.wide:has(.hv-dlg){width:100%!important}
}

/* ---------- EA 托管：参数编辑器 ---------- */
.pe{display:flex;flex-direction:column;min-height:100%}
.pe-st{margin:12px 16px 0;padding:8px 12px;border-radius:var(--r-s);background:var(--off-l);color:var(--tx2);font-size:12px;line-height:1.6}
.pe-st.ok{background:var(--ok-l);color:#11713a}.pe-st.bad{background:var(--bad-l);color:var(--bad)}.pe-st.run{background:var(--pri-l);color:var(--pri)}
.pe-st .pe-tip{display:block;color:var(--tx3)}
.spin{display:inline-block;width:11px;height:11px;margin-right:6px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-1px;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.pe-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:10px 16px}
.pe-bar .hb,.pe-ft .hb,.pe-add .hb{display:inline-flex;align-items:center;height:30px;text-decoration:none}
.pe-bar .hb[disabled],.pe-ft .hb[disabled]{opacity:.5;cursor:default}
.pe-bar .sp,.pe-ft .sp{flex:1}
.pe-src{font-size:12px;color:var(--tx3)}
.pe-imp{cursor:pointer}
.pe-list{margin:0 16px;border:1px solid var(--bd);border-radius:var(--r-s);overflow:hidden}
.pe-hd,.pe-row{display:grid;grid-template-columns:minmax(150px,1.1fr) 92px minmax(200px,1.6fr) minmax(140px,1fr) 34px;gap:10px;align-items:center;padding:6px 12px}
.pe-hd{background:#f8fafc;font-size:11px;color:var(--tx3);font-weight:600;border-bottom:1px solid var(--bd)}
.pe-row{border-bottom:1px solid var(--bd2);min-height:44px}
.pe-row:last-child{border-bottom:0}
.pe-row.ch{background:#fffbeb}
.pe-row.err{background:#fff5f5}
.pe-grp{padding:6px 12px;background:#eef4fd;color:var(--pri);font-size:12px;font-weight:700;border-bottom:1px solid var(--bd2)}
.pe-name{display:flex;align-items:center;gap:6px;min-width:0}
.pe-name code{font-family:var(--mono);font-size:12.5px;color:var(--tx);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pe-dot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--warn)}
.pe-type select,.pe-in,.pe-add input,.pe-add select{height:30px;border:1px solid var(--bd);border-radius:var(--r-s);padding:0 8px;font:inherit;font-size:12.5px;background:#fff;color:var(--tx);outline:0;min-width:0}
.pe-type select{width:100%;padding:0 4px;color:var(--tx2)}
.pe-in:focus,.pe-add input:focus{border-color:var(--pri);box-shadow:0 0 0 3px rgba(26,111,214,.12)}
.pe-val{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.pe-val .pe-in{flex:1;min-width:120px;font-family:var(--mono)}
.pe-val select.pe-in{font-family:inherit}
.pe-row.err .pe-in{border-color:var(--bad)}
.pe-err{font-style:normal;font-size:11px;color:var(--bad)}
.pe-swl{margin:0}
.pe-swl .sw-l{font-family:var(--mono);font-size:12px;color:var(--tx2)}
.sw input:checked+.sw-t{background:var(--pri)}
.sw input:checked+.sw-t::after{transform:translateX(14px)}
.pe-clr{width:44px;height:30px;padding:2px;border:1px solid var(--bd);border-radius:var(--r-s);background:#fff}
.pe-hint{font-size:11px;color:var(--tx3);font-family:var(--mono)}
.pe-def{font-size:12px;color:var(--tx2);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono)}
.pe-dl{font-family:inherit;font-size:11px;color:var(--tx3)}
.pe-sw{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:-1px;border:1px solid rgba(0,0,0,.15)}
.pe-lnk{border:0;background:none;color:var(--pri);font-size:12px;cursor:pointer;padding:0 2px}
.pe-del{width:28px;height:28px;border:1px solid transparent;border-radius:6px;background:none;color:var(--tx3);font-size:18px;line-height:1;cursor:pointer}
.pe-del:hover{color:var(--bad);border-color:#f6cfcf;background:#fff7f7}
.pe-add{display:flex;gap:8px;align-items:center;padding:10px 16px}
.pe-add #peNewName{width:220px;font-family:var(--mono)}
.pe-add #peNewVal{width:160px}
.pe-ft{position:sticky;bottom:0;margin-top:auto;display:flex;align-items:center;gap:8px;padding:10px 16px;background:#fff;border-top:1px solid var(--bd);font-size:12px;color:var(--tx3);z-index:2}
.pe-dirty{color:var(--warn)}
.pe-help{font-size:12px;color:var(--tx2);line-height:1.7;margin:0 0 8px}
.pe-ta{width:100%;box-sizing:border-box;border:1px solid var(--bd);border-radius:var(--r-s);padding:8px;font-family:var(--mono);font-size:12.5px;outline:0}
@media (max-width:1100px){.pe-hd{display:none}.pe-row{grid-template-columns:1fr 92px;grid-template-areas:"n t" "v v" "d x"}.pe-name{grid-area:n}.pe-type{grid-area:t}.pe-val{grid-area:v}.pe-def{grid-area:d}.pe-x{grid-area:x;justify-self:end}}
@media (max-width:760px){
  .pe-st{margin:10px 12px 0;font-size:12.5px}
  .pe-bar{padding:10px 12px;gap:8px}
  .pe-bar .hb{height:36px;padding:0 12px;flex:1 1 calc(50% - 8px);justify-content:center}
  .pe-bar .sp{display:none}
  .pe-src{flex-basis:100%;font-size:12px}
  .pe-list{margin:0 10px;border:0;background:transparent;display:flex;flex-direction:column;gap:8px}
  .pe-row{border:1px solid var(--bd);border-radius:10px;background:#fff;padding:10px 12px;gap:8px}
  .pe-row:last-child{border-bottom:1px solid var(--bd)}
  .pe-grp{border:0;background:transparent;padding:8px 2px 0;font-size:13px}
  .pe-name code{font-size:14px}
  .pe-type select{height:32px;font-size:13px}
  .pe-in{height:40px!important;font-size:15px!important}
  .pe-val .pe-in{min-width:0;width:100%}
  .pe-def{font-size:12.5px;white-space:normal}
  .pe-add{flex-wrap:wrap;padding:12px}
  .pe-add #peNewName{width:auto;flex:1 1 100%;height:40px;font-size:15px}
  .pe-add select,.pe-add #peNewVal{flex:1;height:40px;font-size:15px;width:auto}
  .pe-add .hb{flex:1 1 100%;height:40px;justify-content:center;font-size:14px}
  .pe-ft{bottom:calc(58px + env(safe-area-inset-bottom));padding:10px 12px;flex-wrap:wrap;border-radius:0 0 12px 12px}
  .pe-ft>span:first-child{flex-basis:100%}
  .pe-ft .hb{flex:1;height:42px;justify-content:center;font-size:14px}
  .hv-pane:has(.pe){overflow:visible}
}
.pe-ft .hb{white-space:nowrap}
/* 参数页：整块详情区域滚动（顶部信息随之滚走，表格可用全部高度），保存栏吸附在可见区域底部 */
.hv-pane>.pe{flex:0 0 auto}
.pe>*{flex-shrink:0}
.hv-detail.pe-mode{overflow-y:auto;overflow-x:hidden}
.hv-detail.pe-mode>*{flex-shrink:0}
.hv-detail.pe-mode .hv-pane{flex:1 0 auto;overflow:visible;min-height:auto}
.hv-detail.pe-mode .pe{min-height:0;flex:1 0 auto}
.pe-name{flex-direction:column;align-items:flex-start;gap:1px}
.pe-nm{display:flex;align-items:center;gap:6px;max-width:100%;min-width:0}
.pe-lb{font-size:13.5px;font-weight:600;color:var(--tx);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pe-name code.pe-var{font-size:11px;color:var(--tx3);font-weight:400}
.pe-name code.pe-var.solo{font-size:12.5px;color:var(--tx)}
.pe-edl{flex:none;border:0;background:none;color:var(--tx3);font-size:12px;cursor:pointer;padding:0 2px;opacity:.55}
.pe-row:hover .pe-edl,.pe-edl:focus{opacity:1;color:var(--pri)}
.pe-part{font-size:11px;color:var(--tx3)}
@media (max-width:760px){
  .hv-detail.pe-mode{overflow:visible}
  .pe-lb{font-size:15px;white-space:normal}
  .pe-name code.pe-var{font-size:12px}
  .pe-edl{opacity:1;font-size:14px;padding:2px 4px}
}
