:root { --bg:#0f1419; --panel:#1a2129; --line:#2b3542; --text:#d8dee6; --dim:#7a8794; --acc:#3b9eff; --ok:#2ecc71; --warn:#e6a23c; --err:#f56c6c; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.6 "Segoe UI","Microsoft YaHei",sans-serif; }
.hidden { display: none !important; }
header { display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 52px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.logo { font-weight: 700; color: var(--acc); }
nav { flex: 1; display: flex; gap: 4px; }
nav button { background: none; border: 0; color: var(--dim); padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; }
nav button.active, nav button:hover { color: var(--text); background: rgba(59,158,255,.12); }
main { max-width: 1100px; margin: 20px auto; padding: 0 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; }
.panel h3 { margin-bottom: 10px; font-size: 15px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
input[type=text], input[type=password], select, textarea { background: #10161d; border: 1px solid var(--line); color: var(--text); padding: 8px 10px; border-radius: 6px; font-size: 14px; }
input, select { height: 38px; }
textarea { width: 100%; font-family: Consolas, monospace; font-size: 13px; }
button { height: 38px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--line); background: #232c37; color: var(--text); cursor: pointer; font-size: 14px; }
button.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
button.warn { background: var(--warn); border-color: var(--warn); color: #1a1200; font-weight: 600; }
button.ghost { background: transparent; }
button.danger { color: var(--err); border-color: var(--err); }
button:hover { filter: brightness(1.12); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 500; font-size: 13px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; margin-right: 4px; background: #243244; color: #7db8ff; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.on { background: var(--ok); } .off { background: #555; }
.hint { color: var(--dim); font-size: 12.5px; }
.err { color: var(--err); min-height: 20px; font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.card .num { font-size: 30px; font-weight: 700; color: var(--acc); }
.card .lab { color: var(--dim); }
.login-wrap { display: flex; height: 100vh; align-items: center; justify-content: center; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 34px; width: 340px; display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { text-align: center; color: var(--acc); }
.key-result { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.cmdbox { position: relative; margin: 10px 0; }
.cmdbox pre { background: #10161d; border: 1px solid var(--line); border-left: 3px solid var(--acc); padding: 10px 90px 10px 12px; border-radius: 6px; white-space: pre-wrap; word-break: break-all; font-size: 13px; }
.cmdlabel { display: block; color: var(--dim); font-size: 12px; margin-bottom: 4px; }
.cmdbox button.copy { position: absolute; right: 8px; top: 24px; height: 28px; font-size: 12px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #232c37; border: 1px solid var(--line); padding: 10px 22px; border-radius: 8px; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 9; }
#toast.show { opacity: 1; }
.tagedit { display: flex; gap: 6px; align-items: center; }
.tagedit input { height: 30px; font-size: 12px; width: 110px; padding: 4px 6px; }
#policy-msg { margin-top: 10px; padding: 8px 12px; border-radius: 6px; white-space: pre-wrap; font-family: Consolas, monospace; font-size: 13px; }
#policy-msg.ok { background: rgba(46,204,113,.12); }
#policy-msg.bad { background: rgba(245,108,108,.12); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; width: 340px; display: flex; flex-direction: column; gap: 12px; }
.modal-card h3 { color: var(--acc); }
.tagchip { cursor: pointer; }
.tagchip:hover { filter: brightness(1.3); }
