:root{--bg:var(--control-bg,#0b1015);--panel:var(--control-panel,#111820);--inner:var(--control-inner,#0e151d);--line:var(--control-line,#2c3a49);--text:var(--control-text,#e6edf5);--muted:var(--control-muted,#93a3b7);--blue:var(--control-accent,#2864be);--good:var(--control-good,#75dfad);--warn:var(--control-warn,#f3c66f);--bad:var(--control-bad,#ff9da4)}
*{box-sizing:border-box}
.subscription-analytics>.admin-metrics{margin:0;border-width:0 0 1px;border-radius:0}
.analytics-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:24px}
.analytics-tabs{display:flex;gap:4px;flex-wrap:wrap}.analytics-tabs .button{border-color:transparent}
.analytics-tabs [aria-pressed=true]{background:var(--inner);border-color:var(--line);color:var(--text)}
.analytics-chart-head{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;margin-bottom:12px}
.analytics-chart{overflow:auto;max-height:660px;min-width:0;overscroll-behavior:contain}.analytics-chart svg{display:block;width:100%;font:12px system-ui,sans-serif}
.chart-grid{stroke:var(--line);stroke-opacity:.6;stroke-dasharray:3 5}.chart-tick{fill:var(--muted);font-size:11px}
.chart-label,.chart-value{fill:var(--text);font-variant-numeric:tabular-nums}.chart-bar{fill:var(--good);fill-opacity:.65}
.chart-item:hover .chart-bar,.chart-item:focus .chart-bar{fill-opacity:1}.chart-item:focus{outline:none}.chart-item:focus .chart-bar{stroke:var(--text);stroke-width:2}
.analytics-coverage{margin:8px 0;font-size:12px}.rank-empty{font-size:13px;margin:24px 0}
#analytics-period{display:block;font-size:12px;margin-top:4px}.analytics-range select{max-width:140px}
body{margin:0;background:var(--bg);color:var(--text)}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{outline-offset:4px}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.5}
a{color:#a9cdff}
h1,h2,h3,p{margin:0}
h2{font-size:18px}
h3{font-size:15px}
small,.muted{color:var(--muted)}
small{font-size:12px}
fieldset{min-width:0;margin:0;padding:0;border:0}
legend{padding:0}
button,input,select{min-height:40px}
input,select,textarea{width:100%;min-width:0;border:1px solid #354354;border-radius:7px;background:var(--inner);color:var(--text);padding:10px 11px}
input:disabled,select:disabled{opacity:.55}
input[type=checkbox]{width:17px;height:17px;min-height:0;accent-color:#76e0ad;margin:0}
label{display:block;color:#bdc8d5;font-size:12px}
label>span{display:block;margin-bottom:7px}
input:focus,select:focus,textarea:focus{border-color:#75a9f2}
button:focus-visible,a:focus-visible{outline:2px solid #75a9f2}
button.button{border:1px solid #354354;border-radius:7px;padding:9px 14px;background:#1a2632;color:var(--text);white-space:nowrap;transition:background-color .16s,border-color .16s}
.button:not(:disabled):hover,.admin-link:hover{border-color:#6595d8;background:#223346}
.button.primary:not(:disabled):hover{background:#3076d9}
.button.danger:not(:disabled):hover{background:#3b242e;border-color:#aa5965}
.button.primary{background:var(--blue);border-color:#3e78c8}
.button.danger{color:#ffb1b7;background:#281b24;border-color:#684049}
.button.quiet{background:transparent}
.shell{width:min(1480px,100%);margin:auto;padding:28px 24px 42px}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-bottom:24px;margin-bottom:24px;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:14px;min-width:0}
.brand-icon{width:44px;height:44px;padding:9px;flex:none;background:#111d2b;border:1px solid #3565a3;border-radius:10px;color:#a5c9ff}
.brand h1{margin-bottom:5px}
.page-subtitle{font-size:12px;color:var(--muted)}
.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);border-radius:9px;overflow:hidden;margin-bottom:22px;background:var(--panel)}
.metric{min-width:0;padding:18px 20px;border-right:1px solid var(--line)}
.metric:last-child{border:0}
.metric span{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}
.metric strong{font-size:23px;font-weight:650;letter-spacing:-.02em}
.metric small{display:block;margin-top:5px}
.section{margin:0 0 22px;border:1px solid var(--line);border-radius:9px;background:var(--panel);overflow:hidden}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-bottom:1px solid var(--line)}
.section-head p{margin-top:5px;font-size:12px;color:var(--muted)}
.section-body{padding:20px}
.node-grid,.grant-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.card{min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--inner);overflow:hidden}
.card-head{padding:15px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}
.card-title{min-width:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.card-title h3{overflow-wrap:anywhere}
.card-body{padding:15px}
.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.full{grid-column:1/-1}
.badge{font-size:11px;line-height:1.4;padding:3px 8px;border:1px solid #3b4858;border-radius:999px;color:var(--muted);white-space:nowrap}
.good{color:var(--good)}
.warn{color:var(--warn)}
.bad{color:var(--bad)}
.badge.good{background:#102b23;border-color:#285b46}
.badge.warn{background:#2b2417;border-color:#685733}
.badge.bad{background:#2c1d26;border-color:#69373d}
.home-access-badge{color:#ffb7b7!important;background:#4b1d27!important;border-color:#c95366!important;font-weight:700}
#network-lines[data-view="lines"] [aria-labelledby="home-heading"],
#network-lines[data-view="home"] #topology-section,
#network-lines[data-view="home"] [aria-labelledby="node-heading"],
#network-lines[data-view="home"] #archives{display:none}
.host{font:12px ui-monospace,Consolas,monospace;color:var(--muted);overflow-wrap:anywhere}
.endpoint{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:12px 0 16px;font-size:11px;color:var(--muted)}
.endpoint code{border:1px solid var(--line);border-radius:4px;padding:2px 6px;color:#c5d3e5}
.usage{margin-top:16px;border-top:1px solid var(--line);padding-top:14px}
.usage-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:12px}
.usage-head strong{font-size:13px;font-weight:600;text-align:right}
.user-card>.card-head{flex-wrap:wrap}
.user-summary-usage{display:flex;align-items:baseline;gap:8px;margin-left:auto;font-size:12px}
.user-summary-usage strong{font-size:13px;white-space:nowrap}
.compact-card>.card-head{flex-wrap:wrap}
.bar{height:6px;background:#202b38;border-radius:20px;overflow:hidden;margin:9px 0}
.bar>span{display:block;height:100%;width:0;background:#4b92d6;border-radius:20px}
.bar>span.exhausted{background:#c8717a}
.health{color:var(--muted);font-size:11px;line-height:1.7;overflow-wrap:anywhere}
.notice{font-size:12px;line-height:1.7;padding:12px 14px;background:#101d2b;border-left:3px solid #4b82d0;color:#b4c8e3;margin-bottom:18px}
.user-card+.user-card{margin-top:16px}
.grant{border:1px solid var(--line);background:#121b25;border-radius:7px;padding:14px;min-width:0}
.grant-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px}
.grant-title{min-width:0;overflow-wrap:anywhere;font-size:13px;font-weight:600}
.grant .fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.exit-options{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-top:13px}
.check{display:flex;gap:7px;align-items:center;min-height:28px;color:#c7d3e3;cursor:pointer}
.export-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.export-row label{display:flex;align-items:center;gap:8px}
.export-row select{width:auto;max-width:230px;min-width:140px}
.export-row small{flex:1}
.empty{text-align:center;padding:32px 12px;color:var(--muted)}
.empty strong{display:block;color:var(--text);margin-bottom:6px}
.footer{position:sticky;bottom:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 18px;border:1px solid var(--line);border-radius:8px;background:#111820f5;box-shadow:0 -10px 24px #0002;backdrop-filter:blur(10px)}
.footer-message{font-size:12px;line-height:1.7}
.alert{margin-bottom:18px;padding:12px 14px;border:1px solid #694450;border-radius:7px;color:var(--bad);background:#261b23}
.alert:empty{display:none}
.loading{padding:40px;text-align:center;color:var(--muted)}
dialog{width:min(560px,calc(100% - 32px));border:1px solid #3b4d63;border-radius:10px;padding:24px;background:var(--panel);color:var(--text);box-shadow:0 20px 70px #0008}
dialog::backdrop{background:#0009}
dialog h2{margin-bottom:12px}
dialog p{white-space:pre-line;line-height:1.8;color:#b7c5d6;font-size:13px}
dialog .actions{justify-content:flex-end;margin-top:22px}
dialog textarea{resize:vertical;min-height:200px;margin-top:16px;font:12px ui-monospace,Consolas,monospace;line-height:1.6!important}
dialog small{display:block;margin-top:10px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[hidden]{display:none!important}
@media(max-width:1000px){.node-grid,.grant-grid{grid-template-columns:1fr}.metric{padding:15px}.metric strong{font-size:20px}}
@media(max-width:600px){.shell{padding:20px 14px 28px}.page-head{align-items:flex-start;flex-direction:column}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric:nth-child(2){border-right:0}.metric:nth-child(-n+2){border-bottom:1px solid var(--line)}.section-head,.card-head{align-items:flex-start;flex-wrap:wrap}.section-body,.section-head{padding:15px}.grant .fields{grid-template-columns:1fr}.grant-head{align-items:flex-start;flex-wrap:wrap}.export-row{align-items:stretch;flex-direction:column}.export-row label{justify-content:space-between}.export-row select{flex:1;max-width:none}.footer{align-items:stretch;flex-direction:column;gap:10px}.footer .actions{justify-content:flex-end}.fields{gap:12px}.usage-head{align-items:flex-start;flex-direction:column}.usage-head strong{text-align:left}}
.node-grid{grid-template-columns:1fr}
.node-grid .fields{grid-template-columns:repeat(3,minmax(0,1fr))}
.node-ports{margin:0;font-size:12px}
.node-ports>span{white-space:nowrap}
.grant .fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.user-subscription-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;min-width:0;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.user-subscription-actions>.button{flex:none;min-width:0;white-space:nowrap;font-size:13px;padding-inline:8px}
.subscription-link{display:grid;grid-template-columns:92px minmax(0,1fr) auto;align-items:center;gap:10px;margin-top:12px}
.subscription-link label{color:var(--text)}
.subscription-link input{font:12px ui-monospace,Consolas,monospace}
@media(max-width:1000px){.node-grid .fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
.subscription-link{grid-template-columns:170px minmax(0,1fr) auto}
.subscription-link label small{display:block;margin-top:4px;font-size:11px;line-height:1.5;color:var(--muted);font-weight:normal}
@media(max-width:600px){.node-grid .fields,.grant .fields{grid-template-columns:1fr}.subscription-link{grid-template-columns:minmax(0,1fr) auto}.subscription-link label{grid-column:1/-1}}
.admin-link{display:inline-flex;align-items:center;text-decoration:none;padding:9px 14px;border:1px solid #354354;border-radius:7px;background:#1a2632;color:var(--text)}
.login-panel{max-width:480px;margin:32px auto}
.login-panel label,.password-dialog label,#password-dialog label{margin-bottom:16px}
.login-panel .login-actions{justify-content:space-between;align-items:center;gap:12px}
.login-panel .login-remember{margin:0;min-height:28px;display:flex;align-items:center;color:var(--muted);font-size:13px}
.admin-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.wide-dialog{width:min(760px,calc(100% - 32px))}
#bulk-grants-dialog{padding:0;max-height:90vh;max-height:90dvh;overflow:hidden}
#bulk-grants-dialog[open]{display:flex;flex-direction:column}
.bulk-heading{padding:22px 24px 18px;border-bottom:1px solid var(--line);flex-shrink:0}
.bulk-heading h2{margin-bottom:4px}
.bulk-heading p{font-size:12px;color:var(--muted)}
#bulk-grants-form{display:flex;flex-direction:column;min-height:0}
.bulk-body{min-height:0;padding:20px 24px;overflow-y:auto;scrollbar-width:thin}
.bulk-mode{display:inline-grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:var(--inner);border:1px solid var(--line);border-radius:8px}
.bulk-mode label{position:relative;cursor:pointer}
.bulk-mode input{position:absolute;inset:0;opacity:0;min-height:0;margin:0;cursor:pointer}
.bulk-mode span{margin:0;padding:7px 18px;border:1px solid transparent;border-radius:5px;font-size:13px;text-align:center}
.bulk-mode input:checked+span{background:#1c304a;border-color:#3e6294;color:#d7e7ff}
.bulk-mode input[value=remove]:checked+span{background:#32202a;border-color:#73404c;color:#ffb1b7}
.bulk-mode input:focus-visible+span{outline:2px solid #75a9f2;outline-offset:2px}
.bulk-section{margin-top:22px}
.bulk-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
.bulk-section-head h3{font-size:13px;font-weight:600}
.bulk-section-head>.muted{font-size:12px}
.bulk-groups{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.bulk-group{display:flex;align-items:center;max-width:100%;min-width:0;border:1px solid var(--line);border-radius:6px;background:var(--inner)}
.bulk-group-select{display:flex;align-items:center;justify-content:center;min-width:38px;min-height:40px;cursor:pointer}
.bulk-group input{width:15px;height:15px;accent-color:#76aaff}
.bulk-group button{display:flex;align-items:center;gap:6px;min-width:0;min-height:40px;padding:8px 10px 8px 0;border:0;border-radius:0 5px 5px 0;background:transparent;color:var(--muted);font-size:12px}
.bulk-group button>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bulk-group:has([aria-pressed=true]){background:#172a40;border-color:#426a9c}
.bulk-group button[aria-pressed=true]{color:#dceaff}
.bulk-group:hover{border-color:#6583a7}
.bulk-groups small{margin:0;font-size:11px;color:inherit;opacity:.75}
.bulk-users{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;max-height:224px;overflow-y:auto;scrollbar-width:thin}
.bulk-choice{display:flex;align-items:center;gap:8px;min-height:40px;min-width:0;padding:8px 10px;border:1px solid var(--line);border-radius:6px;background:var(--inner);color:var(--muted);cursor:pointer}
.bulk-choice>span{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bulk-choice>input{flex-shrink:0;width:15px;height:15px;accent-color:#76aaff}
.bulk-choice:has(:checked){background:#172a40;border-color:#426a9c;color:#dceaff}
.bulk-choice:hover{border-color:#6583a7}
.bulk-routes{border:1px solid var(--line);border-radius:8px;overflow:hidden}
.bulk-route{display:grid;grid-template-columns:minmax(90px,.65fr) minmax(0,2fr);align-items:center;gap:12px;padding:10px 12px}
.bulk-route+.bulk-route{border-top:1px solid var(--line)}
.bulk-route h4{margin:0;font-size:13px;font-weight:600;overflow-wrap:anywhere}
.bulk-exits{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.bulk-exits>.bulk-choice{padding:7px 9px;max-width:100%}
.bulk-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 24px;border-top:1px solid var(--line);background:var(--panel);flex-shrink:0}
.bulk-result{min-width:0;font-size:12px;color:var(--muted)}
.bulk-result .health:empty{display:none}
#bulk-grants-dialog .actions{margin:0;flex-shrink:0}
@media(max-width:600px){.bulk-heading{padding:18px 16px 14px}.bulk-body{padding:16px}.bulk-users{grid-template-columns:repeat(2,minmax(0,1fr))}.bulk-route{grid-template-columns:1fr;gap:8px;padding:12px}.bulk-footer{padding:14px 16px;align-items:stretch;flex-direction:column;gap:10px}.bulk-mode{width:100%}.bulk-exits{gap:6px}.bulk-exits>.bulk-choice{flex:1 1 auto;justify-content:center}}
.editor-subtitle{margin:20px 0 14px}
.user-grant-summary{margin-top:14px}
#feedback{margin-bottom:16px}
#password-form{margin-top:18px}
.page-head>.actions{justify-content:flex-end}
.page-head>.actions>.button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;line-height:normal}
@media(max-width:600px){.page-head>.actions{width:100%}}
@media(max-width:600px){.admin-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-metrics .metric{border-bottom:1px solid var(--line)}.admin-metrics .metric:nth-child(2){border-right:0}.admin-metrics .metric:last-child{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:4px 12px;border:0}.admin-metrics .metric:last-child>span{margin:0}.admin-metrics .metric:last-child>strong{font-size:16px}.admin-metrics .metric:last-child>small{grid-column:1/-1;margin:0}.admin-link{white-space:normal}}
.home-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.topology-section{margin-bottom:20px}
.topology-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11px;color:var(--muted)}
.topology-swipe-hint{display:none}
.topology-scroll{overflow-x:auto;padding:24px}
@media(max-width:700px){.topology-swipe-hint{display:block;margin:14px 16px 0;color:var(--muted);font-size:11px}.topology-scroll{padding:16px}}
.topology {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px,1fr) minmax(200px,1.2fr) minmax(160px,1fr);
  min-width: 760px;
  isolation: isolate;
  column-gap: clamp(76px,7vw,114px);
}
.topology-column{display:flex;flex-direction:column;justify-content:center;gap:16px;min-width:0}
.topology-column>h3{font-size:12px;color:var(--muted);margin-bottom:4px;letter-spacing:.02em}
.topology-node {
  position: relative;
  border: 1px solid var(--line);
  border-left: 3px solid #617087;
  border-radius: 10px;
  background: var(--inner);
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  min-width: 0;
  transition: box-shadow .2s,border-color .2s,opacity .2s;
  color: var(--text);
}
.topology-node strong{font-size:13px;overflow-wrap:anywhere;color:var(--text)}
.topology-node span {
  font-size: 11px;
}
.topology-node small {
  font-size: 11px;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.topology-node.good{border-left-color:var(--good)}
.topology-node.warn{border-left-color:var(--warn)}
.topology-node.bad{border-left-color:var(--bad)}
.topology-node.off{opacity:.7}
.topology-wires{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:-1;pointer-events:none}
.wire{stroke:#536078;fill:none}
.wire path{stroke-width:1.8;stroke-linecap:round;opacity:.52;pointer-events:stroke}
.wire.good{stroke:var(--good)}
.wire.warn{stroke:var(--warn)}
.wire.bad{stroke:var(--bad)}
.wire.off path{stroke-dasharray:4 5;opacity:.6}
.wire text {
  stroke: var(--panel);
  stroke-width: 4;
  paint-order: stroke;
  fill: var(--muted);
  font-size: 10px;
  opacity: 0;
  transition: opacity .18s;
}
.topology-footer{padding:0 22px 18px;color:var(--muted);font-size:11px;line-height:1.7}
@media(max-width:600px){.home-card .card-head{align-items:center}.home-node-status .badge{white-space:normal;overflow-wrap:anywhere}}
.topology-node[draggable=true]{cursor:grab}
.topology-node.dragging{opacity:.4}
.topology-sort {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  margin-top: 1px;
  touch-action: none;
}
.topology-sort span{margin-right:auto;font-size:10px}
@media(any-pointer:coarse){.topology-sort,.custom-order .user-card>.card-head,#editor:not(:disabled) .flat-card>.card-head,.user-group-tabs.can-sort [data-group-filter]:not([data-group-filter=""]){touch-action:auto!important;-webkit-touch-callout:none;user-select:none}}
.home-card .footer,form#settings>.footer{position:static;box-shadow:none;backdrop-filter:none}
.shell>nav[aria-label="管理功能"]{margin:-8px 0 22px;gap:10px}
.shell>nav[aria-label="管理功能"]>.button{white-space:nowrap}
.network-tabs{display:flex;gap:4px;padding:4px;border:1px solid var(--line);background:var(--inner);border-radius:10px;width:100%;margin:0 0 20px}
.network-tabs .button{flex:1}
.network-tabs .button{border-color:transparent;background:transparent;color:var(--muted)}
.network-tabs .button[aria-selected=true]{background:#1d3551;border-color:#3a5c83;color:var(--text)}
@media(max-width:520px){.network-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.network-tabs[hidden]{display:none}}
[role=tabpanel]{min-width:0}
.compact-card>.card-head{list-style:none;cursor:pointer;padding:14px 16px;min-height:64px}
.compact-card>.card-head::-webkit-details-marker{display:none}
.compact-card:not([open])>.card-head{border-bottom:0}
.compact-card>.card-head:hover{background:#141e29}
.compact-card>.card-head:focus-visible{outline:2px solid #75a9f2;outline-offset:-3px}
.fold-chevron{display:inline-block;font-size:22px;line-height:1;color:var(--muted);transition:transform .2s}
.compact-card[open]>.card-head .fold-chevron{transform:rotate(90deg)}
.compact-card>.card-body{padding:16px}
.compact-card .fields{gap:10px}
.compact-card .usage{margin-top:10px;padding-top:10px}
.compact-card input,.compact-card select{min-height:36px;padding:7px 10px}
.compact-card .button{min-height:40px;padding:8px 12px}
.custom-order .user-card>.card-head,#editor:not(:disabled) .flat-card>.card-head{cursor:grab;touch-action:pan-x}
.user-card.user-dragging,.flat-card.list-dragging{box-shadow:0 12px 36px #0008;outline:2px solid #75a9f2;cursor:grabbing;background:var(--inner)}
.user-drop-slot,.list-drop-slot{border:1px dashed #6b97c8;border-radius:8px;background:#18314a66}
.user-sorting,.list-sorting{user-select:none;cursor:grabbing}
.user-list-tools{display:flex;align-items:center;gap:16px;margin-bottom:18px;min-width:0}
.user-sort-control{flex:0 0 180px;margin:0}
.user-sort-control select{width:100%;min-height:40px}
.user-group-tabs{display:flex;flex:1;min-width:0;gap:8px;overflow-x:auto;padding:2px;scrollbar-width:thin}
.user-group-tabs .button{display:inline-flex;flex:0 0 auto;align-items:center;gap:8px;max-width:240px;min-height:40px;white-space:nowrap}
.user-group-tabs [data-group-filter=""]{position:sticky;left:0;z-index:1;background:var(--inner)}
.user-group-name{min-width:0;overflow:hidden;text-overflow:ellipsis}
.user-group-count{font-size:11px;font-variant-numeric:tabular-nums;opacity:.7}
.user-group-tabs.can-sort [data-group-filter]:not([data-group-filter=""]){cursor:grab;touch-action:pan-y}
.user-group-drop-slot{flex:0 0 auto;border:1px dashed var(--control-accent,#75a9f2);border-radius:8px;background:#18314a66}
.user-group-tabs .group-dragging{box-shadow:0 8px 24px #0008;outline:1px solid var(--control-accent,#75a9f2)}
.group-sorting{user-select:none;cursor:grabbing}
.user-group-tabs .button[aria-pressed=true]{border-color:var(--control-accent,#75a9f2);background:#20334b;color:var(--text)}
.user-group+.user-group{margin-top:24px}
.user-group-title{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:14px;color:var(--muted);overflow-wrap:anywhere}
@media(max-width:600px){
 .user-list-tools{flex-wrap:wrap;gap:10px}
 .user-group-tabs{flex-basis:100%}
 .user-sort-control{flex-basis:160px;margin-left:auto}
 .user-card.compact-card>.card-head,.flat-card>.card-head{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .user-card .user-summary-usage,.flat-card .user-summary-usage{margin-left:0;justify-content:space-between}
 .user-card.compact-card>.card-head>.actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}
 .user-card>.card-head>.actions>.control-runtime{grid-column:auto;justify-content:space-between}
 .user-card>.card-head [data-action=manage]{grid-column:auto}
}
.user-card[open]>.card-head{background:var(--panel)}
.user-card>.card-body{padding:20px}
.user-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.user-detail-grid>section{min-width:0}
.user-quota-value{display:block;margin-top:14px;font-size:22px;font-weight:650;line-height:1.4;font-variant-numeric:tabular-nums}
.user-quota-value>span{font-size:13px;font-weight:400;color:var(--muted)}
.user-quota .health{margin:10px 0 0;line-height:1.6}
.user-access{border-left:1px solid var(--line);padding-left:24px}
.user-access .user-grant-summary{margin-top:14px}
.user-node-usage{padding-top:18px}
.user-node-usage>.usage-head{flex-direction:row;align-items:baseline;flex-wrap:wrap}
.user-connection{padding:18px 0;border-bottom:1px solid var(--line)}
.user-connection>.usage-head{flex-direction:row;flex-wrap:wrap}
.connection-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:14px 0 0}
.connection-fields>div{min-width:0}.connection-fields dt{font-size:11px;color:var(--muted);margin-bottom:6px}
.connection-fields dd{margin:0;font-size:13px;line-height:1.6;overflow-wrap:anywhere}.connection-fields bdi{font-variant-numeric:tabular-nums}
.connection-empty{margin:12px 0 0;font-size:13px}.connection-marker{display:inline-block;color:var(--good);font-size:10px;margin-left:8px;white-space:nowrap}
.user-node-usage dl{margin:8px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}
.user-node-usage dl>div{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid var(--line)}
.user-node-usage dl>div:last-child,.user-node-usage dl>div:nth-last-child(2):nth-child(odd){border-bottom:0}
.user-node-usage [data-client-selected=true] dt{color:var(--text)}
.user-node-usage dt{min-width:0;overflow-wrap:anywhere;color:var(--muted);font-size:13px}
.user-node-usage dd{margin:0;text-align:right;flex:none;font-size:13px;font-variant-numeric:tabular-nums}
.usage-multiplier{display:inline-block;min-width:3.2em;margin-left:10px;color:var(--muted);font-size:12px}
.user-node-usage dd small{display:block;font-size:11px}
@media(max-width:800px){.user-detail-grid{grid-template-columns:1fr;gap:20px}.user-access{border-left:0;padding-left:0}.user-card>.card-body{padding:16px}.user-quota>.usage-head{flex-direction:row;align-items:baseline}}
@media(max-width:1000px){.connection-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.connection-fields{grid-template-columns:1fr;gap:12px}.connection-fields>div{display:grid;grid-template-columns:86px minmax(0,1fr);gap:10px;align-items:baseline}.connection-fields dt{margin:0}.user-node-usage dl{grid-template-columns:1fr}.user-node-usage dl>div{gap:10px}.user-node-usage dl>div:nth-last-child(2):nth-child(odd){border-bottom:1px solid var(--line)}}
.summary-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0;padding:10px 0}
.summary-facts>div{min-width:0}
.summary-facts dt{margin:0 0 4px;color:var(--muted);font-size:11px}
.summary-facts dd{margin:0;font-size:13px;overflow-wrap:anywhere}
@media(max-width:600px){.summary-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
#network-home-status{margin-bottom:16px;color:var(--muted);font-size:12px}
#network-home-parameters{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.parameter-card .card-head{padding:14px 16px}
.parameter-fields{margin:0;padding:0 16px}
.parameter-fields>div{display:grid;grid-template-columns:110px minmax(0,1fr);gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}
.parameter-fields>div:last-child{border-bottom:0}
.parameter-fields dt{margin:0;color:var(--muted);font-size:12px}
.parameter-fields dd{margin:0;min-width:0;overflow-wrap:anywhere;font:13px/1.5 ui-monospace,"SFMono-Regular",Consolas,monospace}
@media(max-width:800px){#network-home-parameters{grid-template-columns:1fr}}
.attribution{font-size:10px!important}
.topology-node:hover,.topology-node:focus-visible{box-shadow:0 0 0 1px #688bb9}
.topology-node.dragging{opacity:.35;box-shadow:0 0 0 2px #8ebaff}
.wire.good path{stroke-dasharray:none}
.wire .wire-alert circle{fill:var(--panel);stroke:var(--warn);stroke-width:1.5}
.wire.warn .wire-alert text{opacity:1;fill:var(--warn);font-size:13px;font-weight:700}
.wire.bad .wire-alert circle{stroke:var(--bad)}
.wire.bad .wire-alert text{opacity:1;fill:var(--bad);font-size:13px;font-weight:700}
.wire.warn path,.wire.bad path{stroke-dasharray:3 6}
.wire .flow-dot{pointer-events:none;opacity:0}
.wire .flow-dot path{fill:url(#topology-flow-tail);stroke:none;opacity:1;pointer-events:none}
.wire .flow-dot .flow-aura{opacity:.2}
.wire .flow-dot .flow-head{fill:#effffb;stroke:none}
.wire path{transition:stroke .2s,opacity .2s}
.wire.active path{stroke-width:3}
.wire.active text{fill:var(--text)}
@media(prefers-reduced-motion:reduce){.wire .flow-dot{display:none}.fold-chevron,.topology-node{transition:none}}
@media(max-width:600px){.compact-card>.card-head{gap:8px}.compact-card>.card-head>.actions{gap:5px}.compact-card .card-title{gap:6px}}
.archive-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.archive-row:last-child{border-bottom:0}
.archive-row>span{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){.archive-row{align-items:flex-start;flex-direction:column}.archive-row>.actions{width:100%;justify-content:flex-end;flex-wrap:wrap}}
.inventory-archive>summary{list-style:none;cursor:pointer}
.inventory-archive>summary::-webkit-details-marker{display:none}
.inventory-archive .section-body{padding:8px 14px}
.topology-sorting{cursor:grabbing;user-select:none}
.topology-node.sliding{opacity:1;box-shadow:0 12px 36px #0009,0 0 0 2px #8ebaff;transition:none;cursor:grabbing}
.topology-drop-slot{flex:none;border:1px dashed #6b97c8;border-radius:8px;background:#18314a66}
.topology .wire{transition:opacity .18s}
.topology.has-highlight .wire:not(.active){opacity:.16}
.wire.show-label text{opacity:1}
.wire .source-port:not(.source-port-visible){display:none}
.wire .target-port:not(.target-port-visible){display:none}
#deploy-feedback{white-space:pre-wrap;overflow-wrap:anywhere}
#deploy-progress{display:block;width:100%;height:7px;margin-top:18px;accent-color:var(--good)}
.topology-role{justify-self:start;font-size:10px!important;color:var(--muted);border:1px solid var(--line);border-radius:4px;padding:1px 5px;line-height:1.5}
.topology-role.good{color:var(--good)}
.topology-transport{color:var(--muted)}
.topology-metrics {
  display: grid;
  grid-template-columns: max-content minmax(0,1fr) max-content minmax(0,1fr);
  gap: 2px 8px;
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.45;
}
.topology-metrics dt{color:var(--muted)}
.topology-metrics dd{margin:0;text-align:right;overflow-wrap:anywhere;min-width:0}
.worker-checks {
  gap: 6px 8px;
  grid-template-columns: max-content minmax(0,1fr);
}
.worker-checks i{font-style:normal;font-size:8px}
.topology-metrics dd.good{color:var(--good)}
.topology-metrics dd.warn{color:var(--warn)}
.topology-metrics dd.bad{color:var(--bad)}
.topology-metrics dd.muted{color:var(--muted)}
.topology-card-head{display:flex;gap:6px;justify-content:space-between;align-items:flex-start;min-width:0}
.topology-card-head strong{min-width:0;flex:1}
.topology-compact{padding:8px 10px;gap:5px;isolation:isolate;overflow:hidden;--quota-color:var(--muted)}
.topology-compact.good{--quota-color:var(--good)}
.topology-compact.warn{--quota-color:var(--warn)}
.topology-compact.bad{--quota-color:var(--bad)}
.topology-compact::before{content:"";position:absolute;inset:0 auto 0 0;width:var(--quota-remaining,0%);background:var(--quota-color);opacity:.1;z-index:-1;pointer-events:none;transition:width .6s ease,background-color .2s}
#topology-nodes,#topology-sources{gap:9px}
.topology-compact .topology-card-head{align-items:center}
.topology-compact .topology-card-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topology-compact-summary{display:flex;align-items:center;gap:8px;min-width:0}
.topology-compact-summary .topology-role{flex:none;border:0;padding:0;font-size:10px!important}
.topology-compact-usage{margin-left:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px!important;font-variant-numeric:tabular-nums;color:var(--muted)}
.topology-control-warning{font-size:10px!important}
.wall-evidence{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
.wall-evidence>summary{cursor:pointer;color:var(--muted);font-size:12px}
.wall-evidence-body{display:grid;gap:8px;padding-top:10px;min-width:0}
.table-scroll{overflow-x:auto;max-width:100%}
.wall-evidence table{border-collapse:collapse;min-width:560px;width:100%;font-size:11px}
.wall-evidence th,.wall-evidence td{text-align:left;padding:8px;border-bottom:1px solid var(--line)}
.topology-health{flex:none;font-size:10px!important;line-height:1.4;border:1px solid currentColor;border-radius:4px;padding:1px 4px}
.metric-wide-label{grid-column:1}
.metric-wide-value{grid-column:2/-1}
@media(max-width:600px){.compact-card>.card-head>.actions{width:100%;justify-content:flex-end}.network-tabs{width:100%}.network-tabs .button{flex:1}.home-card .card-title,.user-card .card-title{flex:1;min-width:0}}
.user-grant-summary{display:grid!important;gap:10px}
.grant-summary-row{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;align-items:start}
.grant-summary-row>div{display:flex;flex-wrap:wrap;gap:6px}
.grant-summary-row>small{color:var(--muted);padding-top:3px}

.subscription-management{margin:16px 0 20px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.subscription-note-editor{display:grid;gap:6px;margin:12px 0 16px}
.subscription-note-editor textarea{min-height:68px;margin:0;font:inherit;line-height:1.45!important}
.subscription-note-editor small{color:var(--muted)}
#subscription-note-dialog .subscription-note-editor{margin:18px 0 8px}
#subscription-note-dialog textarea{min-height:80px;width:100%}
#subscription-note-dialog small:empty{display:none}
#subscription-more>summary{cursor:pointer;color:var(--muted);padding:10px 0;font-size:14px}
#subscription-filters{margin:8px 0 14px}

#homes,#nodes{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
#homes>.flat-card,#nodes>.flat-card{container:machine/inline-size;min-width:0;border:1px solid var(--line);border-radius:8px;padding:0 14px}
.flat-card{border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
.flat-card:last-child{border-bottom:0}
.flat-card>.card-head{padding:10px 0;min-height:60px}
.flat-card>.card-body{padding:4px 0 18px}
.flat-card .card-head>.actions{margin-left:0}
.flat-card>.card-head{display:grid;grid-template-columns:minmax(0,1fr) auto auto}
.flat-card .user-summary-usage{margin-left:0;justify-content:flex-end;text-align:right;font-variant-numeric:tabular-nums}
@media(max-width:600px){.flat-card>.card-head{grid-template-columns:minmax(0,1fr)}.flat-card>.card-head>.actions{width:auto;justify-self:end}.flat-card .user-summary-usage{justify-content:space-between;text-align:right}}
.machine-overview{display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,1fr);gap:28px;padding:12px 0 16px;margin-bottom:0;border-bottom:1px solid var(--line)}
.machine-overview>.usage{margin:0;padding:0;border:0;min-width:0}
.machine-overview .usage-head{display:none}
.node-meta .node-ports{display:none}
.machine-meta{display:grid;align-content:start;gap:8px;min-width:0}
.machine-meta .endpoint{margin:0}
.machine-meta>.health:empty{display:none}
.settings-section{display:grid;grid-template-columns:96px minmax(0,1fr);gap:8px 20px;padding:16px 0}
.settings-section+.settings-section{border-top:1px solid var(--line)}
.settings-section>h3{font-size:13px;line-height:1.5;padding-top:3px;color:var(--muted);font-weight:500}
.settings-section .fields{align-items:start;gap:12px 16px;margin:0}
.settings-section .identity-fields{grid-template-columns:minmax(180px,320px) minmax(160px,260px) 140px}
.settings-section .connection-fields{grid-template-columns:150px minmax(220px,320px) repeat(auto-fit,minmax(130px,160px))}
.settings-section .billing-fields,.settings-section .home-limit-fields{grid-template-columns:repeat(4,minmax(150px,230px))}
.settings-section .home-limit-fields{grid-template-columns:repeat(3,minmax(150px,230px))}
.settings-section .home-limit-fields:where(:has([data-home-setting="traffic_mode"])){grid-template-columns:repeat(4,minmax(150px,230px))}
.settings-section input:not([type=checkbox]),.settings-section select{min-height:38px;padding:8px 10px}
.settings-section .fields>label>span{font-size:12px;line-height:1.5}
.field-help{grid-column:2;max-width:720px;color:var(--muted);font-size:12px;line-height:1.6}
.field-help>summary{cursor:pointer;width:fit-content;padding:2px 0}
.field-help>p{margin:4px 0 0}
.settings-section .exit-options{margin:0;min-height:36px;gap:12px}
.settings-section .field-label{display:block;margin-bottom:7px;color:#bdc8d5;font-size:12px}
.machine-actions.footer{position:static;box-shadow:none;backdrop-filter:none;background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;margin:0;padding:16px 0 0}
.machine-actions>.health:empty{display:none}
.machine-actions>.actions{margin-left:auto;justify-content:flex-end}
@container machine (max-width:720px){
 .settings-section{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px 0}
 .settings-section>h3{padding:0}
 .settings-section .identity-fields{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
 .settings-section .connection-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .settings-section .subscription-address{grid-column:auto}
 .settings-section .billing-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .settings-section .home-limit-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
 .settings-section .home-limit-fields:where(:has([data-home-setting="traffic_mode"])){grid-template-columns:repeat(4,minmax(0,1fr))}
 .field-help{grid-column:1}
 .machine-overview{grid-template-columns:minmax(0,1fr);gap:12px}
 .machine-actions.footer{align-items:stretch;flex-direction:column;gap:12px}
 .machine-actions>.actions{width:100%;flex-wrap:wrap}
 .flat-card>.card-head{grid-template-columns:minmax(0,1fr) auto;gap:8px}
 .flat-card>.card-head>.actions{grid-column:2;grid-row:1}
 .flat-card>.card-head>.user-summary-usage{grid-column:1/-1;justify-content:flex-end;text-align:right}
}
@media(max-width:1200px){.settings-section .connection-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.settings-section .subscription-address{grid-column:span 2}}
@media(max-width:1000px){.settings-section .billing-fields,.settings-section .home-limit-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-section{grid-template-columns:88px minmax(0,1fr);gap:8px 16px}.settings-section .identity-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 120px}}
@media(max-width:600px){.machine-overview{grid-template-columns:minmax(0,1fr);gap:12px;padding:8px 0 12px}.settings-section{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px 0}.settings-section>h3{padding:0}.settings-section .identity-fields,.settings-section .connection-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-section .identity-fields>label:first-child,.settings-section .subscription-address{grid-column:1/-1}.settings-section .identity-fields>label:last-child{grid-column:auto}.field-help{grid-column:1}.machine-actions.footer{align-items:stretch;flex-direction:column;gap:12px}.machine-actions>.actions{width:100%}.machine-actions .button{flex:1 1 auto}}

