* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --bg:#0f1419; --panel:#1a212b; --panel2:#222c39; --line:#2c3848; --text:#e6edf3; --muted:#8b98a8; --primary:#2f81f7; --green:#2ea043; --red:#f85149; --warn:#e3a008; }
body { font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; background:var(--bg); color:var(--text); height:100vh; }
.hidden { display:none !important; }
.login-wrap { height:100vh; display:flex; align-items:center; justify-content:center; }
.login-card { background:var(--panel); padding:40px; border-radius:14px; width:340px; border:1px solid var(--line); display:flex; flex-direction:column; gap:14px; box-shadow:0 20px 60px rgba(0,0,0,.4); }
.login-card h1 { font-size:22px; text-align:center; }
.login-card .sub { text-align:center; color:var(--muted); font-size:13px; margin-top:-8px; }
.login-card input { background:var(--bg); border:1px solid var(--line); color:var(--text); padding:12px 14px; border-radius:8px; font-size:14px; }
.login-card input:focus { outline:none; border-color:var(--primary); }
.err { color:var(--red); font-size:13px; text-align:center; min-height:16px; }
.topbar { display:flex; align-items:center; gap:10px; padding:12px 20px; background:var(--panel); border-bottom:1px solid var(--line); }
.brand { font-size:17px; font-weight:600; } .grow { flex:1; }
.btn { border:1px solid var(--line); background:var(--panel2); color:var(--text); padding:8px 14px; border-radius:7px; font-size:13px; cursor:pointer; white-space:nowrap; }
.btn:hover { filter:brightness(1.15); }
.btn.primary { background:var(--primary); border-color:var(--primary); }
.btn.ghost { background:transparent; }
.btn.danger { color:var(--red); }
.btn.block { width:100%; padding:12px; font-size:15px; }
.btn.sm { padding:5px 10px; font-size:12px; }
main { padding:18px 20px; }
.grid { width:100%; border-collapse:collapse; }
.grid th,.grid td { text-align:left; padding:11px 12px; border-bottom:1px solid var(--line); font-size:13px; vertical-align:middle; }
.grid th { color:var(--muted); font-weight:500; font-size:12px; }
.grid tr:hover td { background:var(--panel); }
.ops-col { width:240px; }
.ops { display:flex; gap:6px; flex-wrap:wrap; }
.name-cell { font-weight:600; }
.note-cell { color:var(--muted); max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.empty { text-align:center; color:var(--muted); padding:60px; }
.tag { display:inline-block; padding:2px 8px; border-radius:20px; font-size:11px; border:1px solid var(--line); }
.tag.run { background:rgba(46,160,67,.15); color:#56d364; border-color:rgba(46,160,67,.4); }
.tag.idle { background:rgba(139,152,168,.12); color:var(--muted); }
.tag.os { background:var(--panel2); }
.tag.proxy { background:rgba(47,129,247,.12); color:#79c0ff; border-color:rgba(47,129,247,.3); }
.tag.noproxy { background:rgba(248,81,73,.12); color:#ff7b72; border-color:rgba(248,81,73,.3); }
.share-cell { max-width:280px; }
.share-link { font-size:12px; color:#79c0ff; word-break:break-all; }
.share-pw { font-size:12px; color:var(--muted); }
.copybtn { margin-top:4px; }
.modal-wrap { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; z-index:50; }
.modal { background:var(--panel); border:1px solid var(--line); border-radius:12px; width:540px; max-height:92vh; display:flex; flex-direction:column; }
.modal-head { display:flex; align-items:center; padding:16px 20px; border-bottom:1px solid var(--line); font-size:16px; font-weight:600; }
.modal-head .x { margin-left:auto; background:none; border:none; color:var(--muted); font-size:24px; cursor:pointer; line-height:1; }
.modal-body { padding:18px 20px; overflow-y:auto; }
.modal-body label { display:block; font-size:12px; color:var(--muted); margin:12px 0 5px; }
.modal-body input,.modal-body select,.modal-body textarea { width:100%; background:var(--bg); border:1px solid var(--line); color:var(--text); padding:9px 11px; border-radius:7px; font-size:13px; font-family:inherit; }
.modal-body input:focus,.modal-body select:focus,.modal-body textarea:focus { outline:none; border-color:var(--primary); }
.modal-body hr { border:none; border-top:1px solid var(--line); margin:16px 0 4px; }
.row2 { display:flex; gap:12px; } .row2 > div { flex:1; }
.proxy-test-row { display:flex; align-items:center; gap:12px; margin-top:12px; }
.proxy-result { font-size:12px; color:var(--muted); }
.proxy-result.ok { color:#56d364; } .proxy-result.bad { color:#ff7b72; }
.modal-foot { padding:14px 20px; border-top:1px solid var(--line); display:flex; gap:10px; justify-content:flex-end; }
.toast { position:fixed; bottom:28px; left:50%; transform:translateX(-50%); background:var(--panel2); border:1px solid var(--line); color:var(--text); padding:11px 18px; border-radius:8px; font-size:13px; z-index:100; box-shadow:0 8px 30px rgba(0,0,0,.5); }
.toast.ok { border-color:var(--green); } .toast.bad { border-color:var(--red); }
.statsbar { padding:9px 20px; font-size:13px; border-bottom:1px solid var(--line); }
.statsbar.ok { background:rgba(46,160,67,.10); color:#7ee2a8; }
.statsbar.warn { background:rgba(227,160,8,.14); color:#f0c674; }
.statsbar b { color:var(--text); }
