:root{color-scheme:dark;--bg:#10191d;--panel:#19262b;--line:#314149;--text:#edf5f5;--muted:#abbfc5;--accent:#5ee3c1}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 system-ui,sans-serif}header,main{max-width:1120px;margin:auto;padding:24px}header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}h1{font-size:28px;margin:2px 0}h2{font-size:22px;margin:0 0 12px}.eyebrow{font-size:11px;letter-spacing:2px;color:var(--accent)}section{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:24px;margin:24px 0}.intro{max-width:700px}#login{max-width:460px;margin:8vh auto}label{display:block;margin:16px 0}input,select,textarea{display:block;width:100%;font:inherit;color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:12px;margin-top:6px}input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid var(--accent)}button{font:inherit;color:var(--text);background:transparent;border:1px solid var(--line);border-radius:8px;padding:9px 14px;cursor:pointer}button:hover{border-color:var(--accent)}button:disabled{opacity:.4;cursor:default}.primary{background:var(--accent);color:#08271f;border-color:var(--accent);font-weight:600}.section-title,.actions{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap}.cards{display:grid;gap:12px}.card{padding:18px;background:var(--bg);border:1px solid var(--line);border-radius:12px}.card h3{margin:0 0 4px}.card .actions{justify-content:flex-start;margin-top:14px}.card select{width:auto;max-width:100%;margin:0}.muted,dt{color:var(--muted);font-size:14px}dd{margin:4px 0 18px;overflow-wrap:anywhere}dialog{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:16px;padding:24px;width:min(600px,95vw);max-height:90vh}dialog::backdrop{background:#000a}.error{border-color:#f59090!important;color:#ffd2d2}#message{border:1px solid var(--accent);border-radius:8px;padding:14px;white-space:pre-line}#credential-password{font-family:monospace;user-select:all}[hidden]{display:none!important}@media(max-width:600px){header,main{padding:16px}section{padding:16px}.section-title{align-items:flex-start}button{padding:8px 10px}}
nav{max-width:1120px;margin:auto;display:flex;gap:8px;padding:16px 24px 0}nav a{color:var(--muted);text-decoration:none;border-radius:8px;padding:8px 14px}nav a.active{color:var(--accent);background:var(--panel)}a{color:var(--accent)}.card-notes{white-space:pre-wrap;font-size:14px;color:var(--muted)}.danger{color:#ffb7b7;border-color:#764c55}.graph-mode header,.graph-mode nav,.graph-mode main{max-width:none}.graph-mode main{padding:12px 24px 24px}#graph-view{padding:20px;margin:8px 0}.graph-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.graph-toolbar h2{margin:0}.graph-toolbar p{margin:4px 0 12px}.graph-controls{display:flex;gap:8px;align-items:center;margin:10px 0 16px}.graph-controls input{margin:0;max-width:400px}.graph-controls button{white-space:nowrap}.graph-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px}#graph-viewport{height:max(560px,calc(100vh - 360px));position:relative;overflow:hidden;border:1px solid var(--line);border-radius:12px;background-color:#10161e;background-image:radial-gradient(#293442 1px,transparent 1px);background-size:22px 22px;touch-action:none;user-select:none;cursor:grab}#graph-viewport:active{cursor:grabbing}#graph-world{position:absolute;left:0;top:0;width:1px;height:1px;transform-origin:0 0}#graph-edges{position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible}#graph-blocks{position:absolute;left:0;top:0}.graph-card{position:absolute;width:230px;height:132px;border-radius:12px;border:1px solid #445362;border-left:4px solid var(--accent);background:#1b2531;box-shadow:0 8px 24px #0005;display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;padding:14px;cursor:grab;overflow:hidden}.graph-card strong{font-size:16px;font-weight:600;white-space:nowrap;text-overflow:ellipsis;max-width:100%;overflow:hidden}.graph-type{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--muted)}.graph-subtitle{color:#b5c6d5;font-size:12px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.graph-preview{font-size:12px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap}.graph-card.selected{border-color:var(--accent);box-shadow:0 0 0 2px #5ee3c133,0 10px 28px #0007}.role-exit{border-left-color:#bc9dff}.role-relay{border-left-color:#7ca9ff}.role-service{border-left-color:#79c9ec}.role-device{border-left-color:#8294aa;background:#202a39}.role-note{border-left-color:#e4bf70;background:#302d26}.graph-line{fill:none;stroke:#9a83cc;stroke-width:2;pointer-events:none}.assignment .graph-line{stroke:#51b7a0;stroke-width:1.5;opacity:.7}.graph-line-hit{fill:none;stroke:transparent;stroke-width:18;cursor:pointer;pointer-events:stroke}.graph-edge-label{fill:#aebcd0;font-size:12px;paint-order:stroke;stroke:#10161e;stroke-width:5px;stroke-linejoin:round;cursor:pointer}.graph-edge.selected .graph-line,.graph-edge:hover .graph-line{stroke-width:3;stroke:#d0b5ff}.graph-edge.selected .graph-edge-label{fill:#ecdfff}#graph-arrow path{fill:#9a83cc}#assignment-arrow path{fill:#51b7a0}.search-dim{opacity:.15}#graph-empty{position:absolute;top:40%;width:100%;text-align:center;color:var(--muted);padding:24px}.graph-zoom{position:absolute;bottom:14px;left:14px;display:flex;align-items:center;gap:10px;background:#18232de8;border:1px solid var(--line);border-radius:10px;padding:4px}.graph-zoom button{border:0;font-size:20px;line-height:1}.graph-zoom span{min-width:42px;text-align:center;font-size:12px}#graph-inspector{background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:18px;overflow:auto;max-height:max(560px,calc(100vh - 360px))}#graph-inspector h3{margin:8px 0;overflow-wrap:anywhere}#graph-inspector>button,#graph-inspector>a{display:block;width:100%;margin:10px 0;text-align:center;font-size:14px}#graph-inspector>p{overflow-wrap:anywhere}#graph-inspector label{font-size:14px}.inspector-comment{white-space:pre-wrap}.graph-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--muted);padding:14px 0 0}.legend{display:inline-block;width:18px;height:2px;vertical-align:middle;margin:0 6px 0 10px}.legend.assignment{background:#51b7a0}.legend.topology{background:#9a83cc}.graph-help{margin:12px 0 0}@media(max-width:900px){.graph-layout{grid-template-columns:1fr}#graph-inspector{max-height:none}#graph-viewport{height:64vh;min-height:420px}.graph-controls{flex-wrap:wrap}.graph-controls input{max-width:none;flex-basis:100%}.graph-mode main{padding:10px}#graph-view{padding:12px}.graph-toolbar .actions{gap:6px}.graph-toolbar button{font-size:14px}.graph-help{font-size:12px}nav{padding:12px 16px 0}}

.activity-row{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.presence-mark,.access-mark{display:inline-flex;align-items:center;gap:6px;font-size:12px;border-radius:12px;padding:4px 8px;background:#18252e;line-height:1.3}.presence-mark::before{content:"";width:9px;height:9px;flex-shrink:0;border-radius:50%;background:var(--presence-color)}.presence-green{--presence-color:#50db9c}.presence-yellow{--presence-color:#e6cb59}.presence-orange{--presence-color:#ee9950}.presence-red{--presence-color:#ef6973}.presence-grey{--presence-color:#8c98a8}.access-suspended{color:#e7b4fa;border:1px dashed #b784d8}.access-pending{color:#e6cb59}.access-error{color:#ef6973}.device-info{display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,2fr);gap:7px 14px}.device-info dd{margin:0;overflow-wrap:anywhere}.device-info dt{color:#9facbb}.message-item{border-top:1px solid #33414c;padding:10px 0}.message-item p{white-space:pre-wrap;overflow-wrap:anywhere}.agent-health{margin:8px 0}.graph-card .presence-mark{position:absolute;top:12px;right:12px;padding:0;font-size:0;background:none}.graph-card .access-mark{position:absolute;bottom:6px;right:8px;font-size:9px;max-width:210px;padding:2px 5px}.graph-card .access-active{display:none}#message-history{max-height:320px;overflow:auto}

.agent-health.problem{color:#ef6973}#activity-legend{max-width:1400px;margin:8px auto;padding:0 24px}

.wide-dialog{width:min(1100px,94vw);max-width:1100px;max-height:92vh;overflow:auto}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.settings-grid details,.settings-grid .actions{grid-column:1/-1}.field-help{display:block;font-weight:400;line-height:1.4;margin:5px 0 8px}.lifecycle-mark{display:inline-block;font-size:11px;border:1px solid #45556c;border-radius:5px;padding:3px 6px;margin:5px 0}.lifecycle-plan{border-style:dashed;color:#aab8c9}.lifecycle-ready{color:#9dbeed}.lifecycle-live{color:#70d8b0}.graph-card{height:156px}.graph-card .lifecycle-mark{position:absolute;bottom:7px;left:8px;font-size:9px;max-width:145px;padding:2px 4px}.graph-card .access-mark:not(.access-active){bottom:30px}.operation-warning{padding:14px;border:1px solid #daaa5f;border-radius:8px;color:#f0cc91}.config-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto}.service-card{margin:12px 0}.service-running{color:#70d8b0}#plan-acknowledgement{display:flex;align-items:flex-start;gap:10px}#plan-acknowledgement input{width:auto;margin-top:4px}#protocol-fields input[type=checkbox]{width:auto}#infrastructure-status{white-space:pre-wrap}@media(max-width:700px){.settings-grid{grid-template-columns:1fr}.wide-dialog{width:95vw;padding:14px}.device-info{grid-template-columns:1fr}.device-info dd{margin-bottom:8px}}

.graph-protocols{position:absolute;bottom:29px;left:10px;right:10px;font-size:10px;color:#a6bbc9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.graph-card .access-mark:not(.access-active)~.graph-protocols{bottom:49px}

button.is-loading{display:inline-flex;align-items:center;gap:9px}button.is-loading:disabled{opacity:.85}button.is-loading::after{content:"";width:16px;height:16px;flex-shrink:0;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:hub-spin .8s linear infinite}@keyframes hub-spin{to{transform:rotate(360deg)}}.job-record{border-top:1px solid var(--line);padding:12px 0}.job-record p{margin:4px 0}
