:root{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif;background:#f4f6f8;color:#17212b;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:#f4f6f8}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.6}code{font-family:SFMono-Regular,Consolas,Liberation Mono,monospace}.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:#edf1f5}.login-panel{width:min(420px,100%);display:grid;gap:18px;padding:28px;background:#fff;border:1px solid #dce3ea;border-radius:8px;box-shadow:0 18px 45px #1a27341f}.brand-line,.title-block,.panel-title,.relay-name,.top-actions,.panel-actions,.row-actions,.metric,.copy-line,.subscription-band{display:flex;align-items:center}.brand-line{gap:12px}.brand-line svg,.mark{color:#0f766e}h1,h2,h3,p{margin:0}.brand-line h1,.topbar h1{font-size:22px;line-height:1.2;letter-spacing:0}.brand-line p,.topbar p,.relay-name p{color:#627181;font-size:13px}.relay-name p{overflow-wrap:anywhere}label{display:grid;gap:7px;color:#465668;font-size:13px;font-weight:650}input{width:100%;min-height:40px;padding:9px 11px;color:#17212b;background:#fff;border:1px solid #ccd6df;border-radius:7px;outline:none}input[type=checkbox]{width:18px;min-height:18px;padding:0;accent-color:#0f766e}input:focus{border-color:#0f766e;box-shadow:0 0 0 3px #0f766e24}.checkbox-label{display:flex;min-height:40px;flex-direction:row;gap:9px;align-items:center;color:#263442}.app-shell{width:min(1440px,100%);margin:0 auto;padding:22px}.topbar{display:flex;justify-content:space-between;gap:16px;padding:16px 0 20px}.title-block{gap:12px}.mark{width:42px;height:42px;display:grid;place-items:center;background:#dff5f1;border:1px solid #b9e7df;border-radius:8px}.top-actions,.panel-actions,.row-actions{gap:8px;flex-wrap:wrap}.icon-button,.action-button,.text-button{border:0;border-radius:7px;min-height:38px;transition:transform .12s ease,background .12s ease,border-color .12s ease}.icon-button{width:38px;display:grid;place-items:center;color:#2c3e50;background:#fff;border:1px solid #d6dee6}.action-button,.text-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 13px;font-weight:750;white-space:nowrap}.primary{color:#fff;background:#0f766e}.secondary,.text-button{color:#263442;background:#fff;border:1px solid #d4dde6}.danger{color:#9f1239;background:#fff1f2;border:1px solid #fecdd3}.icon-button:hover,.action-button:hover,.text-button:hover{transform:translateY(-1px)}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.metric{min-height:86px;gap:10px;padding:16px;background:#fff;border:1px solid #dce3ea;border-radius:8px}.metric svg{color:#2563eb}.metric span{color:#637386;font-size:13px}.metric strong{margin-left:auto;font-size:24px;letter-spacing:0}.workspace-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(360px,.8fr);gap:16px;align-items:start}.tool-panel,.subscription-band,.system-section,.relay-section,.event-section{background:#fff;border:1px solid #dce3ea;border-radius:8px}.tool-panel{display:grid;gap:16px;padding:18px}.panel-title{gap:9px;color:#233142}.panel-title h2{font-size:16px;line-height:1.2;letter-spacing:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-grid.two{grid-template-columns:repeat(3,minmax(0,1fr))}.wide{grid-column:1 / -1}.alert{margin-bottom:14px;padding:12px 14px;border-radius:7px;font-weight:700}.warning{color:#8a4b0f;background:#fff7ed;border:1px solid #fed7aa}.error,.inline-error{color:#991b1b;background:#fef2f2;border:1px solid #fecaca}.inline-error{padding:9px 10px;border-radius:7px;font-size:13px}.toast{position:fixed;right:22px;bottom:22px;z-index:10;padding:10px 14px;color:#064e3b;background:#d1fae5;border:1px solid #a7f3d0;border-radius:7px;box-shadow:0 12px 30px #0f172a24}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:grid;place-items:center;padding:18px;background:#0f172a6b}.qr-modal{width:min(420px,100%);display:grid;gap:14px;padding:18px;background:#fff;border:1px solid #dce3ea;border-radius:8px;box-shadow:0 20px 70px #0f172a47}.qr-modal-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.qr-modal img{width:min(300px,100%);height:auto;margin:0 auto;border:1px solid #e1e7ee;border-radius:8px}.qr-modal code{overflow:auto;max-height:110px;padding:10px;color:#203040;background:#f7f9fb;border:1px solid #e1e7ee;border-radius:7px;white-space:pre-wrap;word-break:break-all}.system-section{display:grid;gap:14px;margin-bottom:16px;padding:18px}.system-header{display:flex;justify-content:space-between;gap:12px;align-items:center}.system-meta{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.system-meta span{padding:5px 8px;color:#526173;background:#f7f9fb;border:1px solid #e1e7ee;border-radius:999px;font-size:12px;font-weight:750}.system-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.system-card{display:grid;gap:8px;min-height:122px;padding:12px;background:#fbfcfd;border:1px solid #e1e7ee;border-radius:8px}.system-card-top{display:flex;gap:7px;align-items:center;color:#526173;font-size:12px;font-weight:850}.system-card-top svg{color:#0f766e}.system-card strong{color:#17212b;font-size:20px;line-height:1.15;letter-spacing:0}.system-card p{min-height:30px;color:#637386;font-size:12px;line-height:1.35}.usage-bar{overflow:hidden;height:7px;background:#e8eef4;border-radius:999px}.usage-bar span{display:block;height:100%;background:#0f766e;border-radius:inherit}.interface-table{display:grid;gap:7px}.interface-head,.interface-row{display:grid;grid-template-columns:1.2fr repeat(4,minmax(0,1fr));gap:8px;align-items:center}.interface-head{color:#637386;font-size:12px;font-weight:850}.interface-row,.interface-empty{min-height:36px;padding:8px 10px;background:#f7f9fb;border:1px solid #e1e7ee;border-radius:7px;color:#526173;font-size:12px}.interface-row strong{color:#17212b}.subscription-band{justify-content:space-between;gap:16px;margin:16px 0;padding:18px}.subscription-band>div{min-width:0;flex:1}.sub-list{display:grid;gap:8px;margin-top:12px}.copy-line{gap:10px;min-height:42px;padding:7px;background:#f7f9fb;border:1px solid #e1e7ee;border-radius:7px}.copy-line span{width:92px;color:#526173;font-size:12px;font-weight:800}.copy-line code{min-width:0;flex:1;overflow:hidden;color:#203040;text-overflow:ellipsis;white-space:nowrap}.relay-section,.event-section{padding:18px}.relay-list,.event-list{display:grid;gap:12px;margin-top:14px}.relay-row{display:grid;gap:12px;padding:14px;background:#fbfcfd;border:1px solid #e1e7ee;border-radius:8px}.relay-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.relay-name{min-width:0;gap:10px}.relay-name h3{overflow:hidden;font-size:16px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.ok{color:#059669}.bad{color:#e11d48}.muted{color:#64748b}.status-chip{min-width:72px;padding:6px 9px;color:#334155;background:#e5e7eb;border-radius:999px;font-size:12px;font-weight:850;text-align:center}.status-chip[data-status=listening]{color:#065f46;background:#d1fae5}.status-chip[data-status=error]{color:#9f1239;background:#ffe4e6}.status-chip[data-status=starting]{color:#1d4ed8;background:#dbeafe}.relay-meta,.secret-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}.relay-meta span,.secret-grid div{min-height:34px;padding:8px 9px;color:#526173;background:#fff;border:1px solid #e5ebf1;border-radius:7px;font-size:12px}.secret-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.secret-grid div{display:grid;gap:4px}.secret-grid code{overflow:hidden;color:#182635;text-overflow:ellipsis;white-space:nowrap}.event-row{display:grid;grid-template-columns:170px 110px minmax(0,1fr);gap:10px;align-items:center;min-height:38px;padding:8px 10px;background:#fbfcfd;border:1px solid #e1e7ee;border-radius:7px;font-size:13px}.event-row span{color:#637386}.event-row strong{color:#0f766e}.event-row p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-state{display:grid;place-items:center;min-height:92px;color:#738194;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px;font-weight:700}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:1120px){.metric-grid,.system-grid,.workspace-grid,.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.relay-meta,.secret-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.app-shell{padding:12px}.topbar,.system-header,.subscription-band,.relay-main{align-items:stretch;flex-direction:column}.topbar{gap:12px;padding:10px 0 14px}.title-block{align-items:flex-start}.mark{width:38px;height:38px}.topbar h1{font-size:19px}.top-actions{display:grid;grid-template-columns:44px 44px minmax(0,1fr);width:100%}.top-actions .icon-button,.top-actions .text-button{width:100%}.workspace-grid,.form-grid,.form-grid.two,.interface-head,.interface-row,.event-row{grid-template-columns:1fr}.metric-grid,.system-grid,.relay-meta,.secret-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{min-height:74px;padding:12px}.metric strong{font-size:20px}.tool-panel,.subscription-band,.system-section,.relay-section,.event-section{padding:14px}.system-card{min-height:108px;padding:10px}.system-card strong{font-size:18px}.interface-head{display:none}.interface-row{gap:4px}.copy-line{display:grid;grid-template-columns:minmax(0,1fr) 38px 38px;align-items:center;gap:7px;padding:8px}.copy-line span{grid-column:1 / -1;width:auto}.copy-line code{min-height:30px;display:flex;align-items:center}.copy-line .icon-button{width:38px;min-height:34px}.row-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.row-actions .action-button{min-height:40px;padding:0 8px;gap:5px;font-size:12px}.panel-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.panel-actions .action-button{width:100%}.subscription-band>.action-button,.text-button{width:100%}}@media(max-width:430px){.metric-grid,.system-grid,.relay-meta,.secret-grid,.row-actions,.panel-actions{grid-template-columns:1fr}.metric{min-height:64px}.relay-row{padding:12px}.relay-name h3{white-space:normal}.qr-modal{padding:14px}}
