:root{
  --bg:#0b0f16;
  --panel:#0f1723;
  --card:#121a26;
  --graph-bg:#08101c;
  --surface-soft:#08101c;
  --surface-strong:#0b1726;
  --surface-elevated:#0d1420;
  --muted:#9fb0c3;
  --text:#e7eef7;
  --line:#223044;
  --accent:#6ee7ff;
  --accent2:#9b7bff;
  --focus-ring:rgba(110,231,255,.18);
  --stack-gap:20px;
  --danger:#ff8f8f;
}

*{ box-sizing:border-box; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; }

body,
#sidebar,
#view,
.list,
.out,
#debug-drawer,
.eventList,
textarea{
  scrollbar-width:thin;
  scrollbar-color:rgba(159,176,195,.22) transparent;
}

body::-webkit-scrollbar,
#sidebar::-webkit-scrollbar,
#view::-webkit-scrollbar,
.list::-webkit-scrollbar,
.out::-webkit-scrollbar,
#debug-drawer::-webkit-scrollbar,
.eventList::-webkit-scrollbar,
textarea::-webkit-scrollbar{
  width:8px;
  height:8px;
}

body::-webkit-scrollbar-track,
#sidebar::-webkit-scrollbar-track,
#view::-webkit-scrollbar-track,
.list::-webkit-scrollbar-track,
.out::-webkit-scrollbar-track,
#debug-drawer::-webkit-scrollbar-track,
.eventList::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track{
  background:transparent;
}

body::-webkit-scrollbar-thumb,
#sidebar::-webkit-scrollbar-thumb,
#view::-webkit-scrollbar-thumb,
.list::-webkit-scrollbar-thumb,
.out::-webkit-scrollbar-thumb,
#debug-drawer::-webkit-scrollbar-thumb,
.eventList::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb{
  background:rgba(159,176,195,.18);
  border:2px solid transparent;
  border-radius:999px;
  background-clip:padding-box;
}

body::-webkit-scrollbar-thumb:hover,
#sidebar::-webkit-scrollbar-thumb:hover,
#view::-webkit-scrollbar-thumb:hover,
.list::-webkit-scrollbar-thumb:hover,
.out::-webkit-scrollbar-thumb:hover,
#debug-drawer::-webkit-scrollbar-thumb:hover,
.eventList::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover{
  background:rgba(159,176,195,.28);
  background-clip:padding-box;
}

body{ margin:0;
      background: radial-gradient(1200px 600px at 80% 100%, rgba(120,160,255,0.16), transparent 60%),
                  radial-gradient(900px 500px at 20% 50%, rgba(120,255,190,0.10), transparent 60%),
                  var(--bg);
      color:var(--text); }

.nx-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:1200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(7, 11, 18, .68);
  backdrop-filter:blur(8px);
}

.nx-modal{
  width:min(100%, 460px);
  max-height:calc(100vh - 48px);
  overflow:auto;
  padding:18px;
  border-radius:20px;
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(18,26,38,.98), rgba(12,18,28,.98)),
    linear-gradient(135deg, rgba(110,231,255,.05), rgba(155,123,255,.04));
  box-shadow:0 26px 80px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.03);
}

.nx-modal-wide{
  width:min(100%, 980px);
}

.nx-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}

.nx-modal-head h3{
  margin:0;
}

.nx-modal-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  border-radius:12px;
  padding:0;
  font-size:22px;
  line-height:0;
}

.nx-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
}

.nx-modal-error{
  color:var(--danger);
  min-height:18px;
  margin-top:10px;
}

.nx-document-preview .nx-markdown-code-block,
.nx-markdown-preview .nx-markdown-code-block{
  position:relative;
  margin:16px 0;
  overflow:hidden;
  border:1px solid #263244;
  border-radius:10px;
  background:#0b1220;
  color:#e5edf7;
  box-shadow:0 8px 24px rgba(15,23,42,.12);
}

.nx-document-preview .nx-markdown-code-language,
.nx-markdown-preview .nx-markdown-code-language{
  padding:5px 12px;
  border-bottom:1px solid #263244;
  background:#111c2e;
  color:#9fb3ca;
  font:600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.nx-document-preview .nx-markdown-code-block pre,
.nx-markdown-preview .nx-markdown-code-block pre{
  margin:0;
  padding:14px 16px;
  overflow:auto;
  background:transparent;
  color:inherit;
  tab-size:2;
}

.nx-document-preview .nx-markdown-code-block code,
.nx-markdown-preview .nx-markdown-code-block code,
.nx-document-preview p code,
.nx-markdown-preview p code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.nx-document-preview p code,
.nx-markdown-preview p code{
  padding:2px 5px;
  border-radius:5px;
  background:#e8edf5;
  color:#162033;
}

.nx-markdown-task-list{
  padding-left:0;
  list-style:none;
}

.nx-markdown-task-item{
  display:flex;
  gap:8px;
  align-items:flex-start;
  margin:5px 0;
}

.nx-markdown-task-item input{
  width:16px;
  height:16px;
  margin:3px 0 0;
  padding:0;
  opacity:1;
}

.nx-markdown-task-item.is-checked span{
  color:#6b7280;
  text-decoration:line-through;
}

.nx-checklist-editor{
  display:grid;
  gap:5px;
}

.nx-checklist-editor-row{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  gap:5px;
  align-items:center;
}

.nx-checklist-editor-row input[type="text"]{
  min-width:0;
  min-height:28px;
  padding:4px 7px;
}

.nx-checklist-editor-label{
  min-width:0;
  min-height:20px;
  padding:0 3px;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.nx-checklist-editor-label:hover,
.nx-checklist-editor-label:focus-visible{
  background:var(--focus-ring);
}

.nx-checklist-editor-row input[type="checkbox"]{
  width:16px;
  height:16px;
  padding:0;
}

.nx-checklist-editor-actions{
  display:flex;
  gap:2px;
}

.nx-checklist-editor-actions button{
  width:24px;
  min-width:24px;
  min-height:24px;
  padding:0;
}

.nx-checklist-drag-handle{
  cursor:grab;
  touch-action:none;
}

[data-checklist-editor-rows]{
  position:relative;
}

.nx-checklist-editor.is-reordering .nx-checklist-editor-row:not(.is-dragging){
  pointer-events:none;
}

.nx-checklist-drop-indicator{
  position:absolute;
  z-index:7;
  left:22px;
  right:4px;
  height:2px;
  border-radius:999px;
  background:var(--accent);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 0 8px color-mix(in srgb, var(--accent) 55%, transparent);
  opacity:0;
  pointer-events:none;
  transform:translateY(-1px) scaleX(.65);
  transform-origin:center;
  transition:top 70ms ease, opacity 90ms ease, transform 120ms ease;
}

.nx-checklist-drop-indicator.is-visible{
  opacity:1;
  transform:translateY(-1px) scaleX(1);
}

.nx-checklist-drop-indicator.is-snapping{
  opacity:0;
  transform:translateY(-1px) scaleX(.15);
}

.nx-checklist-editor-row.is-dragging{
  position:relative;
  z-index:5;
  opacity:.82;
}

.nx-checklist-editor-row.is-dragging .nx-checklist-drag-handle{
  cursor:grabbing;
}

.nx-checklist-editor-row.is-drop-snapping{
  animation:nx-checklist-drop-snap 180ms ease-out;
}

@keyframes nx-checklist-drop-snap{
  0%{transform:scale(.985); background:color-mix(in srgb, var(--accent) 18%, transparent);}
  100%{transform:scale(1); background:transparent;}
}

.nx-checklist-progress{
  display:flex;
  gap:8px;
  align-items:center;
  min-width:max-content;
}

.nx-checklist-trigger{
  display:inline-grid;
  place-items:center;
  width:28px;
  height:28px;
  min-height:28px;
  padding:1px;
  border-color:transparent;
  border-radius:999px;
  background:transparent;
}

.nx-checklist-trigger:hover,
.nx-checklist-trigger[aria-expanded="true"]{
  border-color:var(--accent);
  background:var(--focus-ring);
}

.nx-kanban-checklist-slot{
  width:28px;
  height:28px;
  flex:0 0 28px;
  margin-top:-3px;
}

.nx-checklist-progress-pie{
  width:22px;
  height:22px;
  flex:0 0 22px;
  border:1px solid var(--line);
  border-radius:50%;
  background:conic-gradient(var(--accent) calc(var(--checklist-progress, 0) * 1%), rgba(159,176,195,.18) 0);
  box-shadow:inset 0 0 0 4px var(--surface);
  transition:background .35s ease;
}

.nx-checklist-panel{
  max-height:0;
  margin-top:0;
  padding:0 9px;
  overflow:hidden;
  border:1px solid transparent;
  border-radius:10px;
  background:var(--surface-elevated);
  opacity:0;
  pointer-events:none;
  transform:translateY(-4px);
  transition:max-height .35s ease, margin-top .3s ease, padding .3s ease, border-color .3s ease, opacity .25s ease, transform .3s ease;
}

.nx-checklist-panel.is-open{
  max-height:520px;
  margin-top:7px;
  padding:9px;
  overflow:auto;
  border-color:var(--line);
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

.nx-checklist-items{
  display:grid;
  gap:4px;
  margin-top:7px;
}

.nx-checklist-item{
  display:flex;
  gap:7px;
  align-items:flex-start;
  max-width:320px;
  color:var(--text);
  transition:color .3s ease, opacity .3s ease, transform .3s ease;
}

.nx-checklist-item input{
  width:15px;
  height:15px;
  margin:2px 0 0;
  padding:0;
  flex:0 0 auto;
}

.nx-checklist-item span{
  overflow-wrap:anywhere;
}

.nx-checklist-item.is-done{
  color:var(--muted);
  opacity:.72;
  transform:translateX(2px);
}

.nx-checklist-item.is-done span{
  text-decoration-line:line-through;
  text-decoration-thickness:1px;
  text-decoration-skip-ink:none;
}

.brand{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:12px;
  align-items:center;
  min-height:44px;
}

.brand-copy{
  min-width:0;
  overflow:hidden;
  max-width:220px;
  opacity:1;
  transform:translateX(0);
  transition:opacity .5s ease, transform .5s ease, max-width .5s ease;
}

#app-shell[data-sidebar-collapsed="true"] .brand{
  grid-template-columns:44px 0fr;
  gap:0;
}

#app-shell[data-sidebar-collapsed="true"] .brand-copy{
  opacity:0;
  transform:translateX(-6px);
  max-width:0;
  pointer-events:none;
}
/*
.logo{
  width:44px;
  height:44px;
  border-radius:12px;
  flex:0 0 44px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:radial-gradient(circle at 30% 30%, var(--accent), transparent 55%),
             radial-gradient(circle at 70% 70%, var(--accent2), transparent 55%),
             #182235;
  border:1px solid #2b3a56;
  font-weight:800;
}
  */

.logo-wrap {
  width: 40x;
  height: 48px;
  flex: 0 0 36px;
  padding: 1px;

  clip-path: polygon(
    50% 0%,
    100% 25%,
    100% 75%,
    50% 100%,
    0% 75%,
    0% 25%
  );

  background: #d8d4e9;
   perspective: 600px;
}

.logo {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 800;
  font-size: 15px;
  letter-spacing: -1px;
  color: #183155;

  background:
    radial-gradient(circle at 30% 30%, rgba(36,107,255,.42), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(255,139,61,.30), transparent 55%),
    #fff6eb;

  clip-path: inherit;

      transition:
    transform .35s cubic-bezier(.2,.8,.2,1),
    box-shadow .35s ease;

      transform-style: preserve-3d;
  will-change: transform;
}

.logo:hover{
    transform:
    perspective(300px)
    rotateX(8deg)
    rotateY(8deg)
    translateY(-2px);
 box-shadow:
    0 16px 34px rgba(22,32,51,.16),
    0 0 22px rgba(36,107,255,.12);

  filter: saturate(1.12);
 
}

.title{ font-size:16px; font-weight:800; letter-spacing:.06em; }
.subtitle{ font-size:11px; line-height:1.2; color:var(--muted); white-space:nowrap; }

#app-shell{ display:flex; height:100vh; min-width:0; }

#sidebar{
  width:260px;
  min-width:0;
  flex:0 0 260px;
  padding:14px;
  background:var(--panel);
  border-right:1px solid var(--line);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:14px;
  transition:width .58s cubic-bezier(.22,.8,.2,1), flex-basis .58s cubic-bezier(.22,.8,.2,1), padding .58s cubic-bezier(.22,.8,.2,1), border-color .58s ease, transform .58s ease, opacity .58s ease;
}

#app-shell[data-sidebar-collapsed="true"] #sidebar{
  width:72px;
  flex-basis:72px;
  padding:14px;
}

.sidebar-nav-shell{
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  min-height:0;
  flex:1;
}

.sidebar-nav{
  min-height:0;
  overflow:auto;
  padding-bottom:6px;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.sidebar-nav::-webkit-scrollbar{ display:none; }

.sidebar-scroll-indicator{
  display:flex;
  align-items:center;
  justify-content:center;
  height:28px;
  width:100%;
  padding:0;
  border:none;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(15,23,35,.92), rgba(15,23,35,.15));
  color:var(--muted);
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .2s ease, color .2s ease;
}

.sidebar-scroll-indicator[data-visible="true"]{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.sidebar-scroll-indicator svg{
  width:16px;
  height:16px;
}

.sidebar-scroll-up{ margin-bottom:6px; }

.sidebar-scroll-down{
  margin-top:6px;
  background:linear-gradient(0deg, rgba(15,23,35,.92), rgba(15,23,35,.15));
}

.sidebar-scroll-indicator:hover{ color:var(--text); }

#sidebar h4{ margin:14px 0 8px; font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
#app-shell[data-sidebar-collapsed="true"] #sidebar h4{
  opacity:0;
  visibility:hidden;
}

#sidebar a{ display:flex; align-items:center; gap:12px; padding:10px 10px; border-radius:10px; border:1px solid transparent; color:var(--text); text-decoration:none; white-space:nowrap; overflow:hidden;}
#sidebar a:hover{ background:#132033; }
#sidebar a.is-active{
  background:linear-gradient(90deg, rgba(110,231,255,.14), rgba(155,123,255,.10));
  border-color:rgba(110,231,255,.18);
  font-weight:700;
}

.sidebar-link-icon{
  width:20px;
  height:20px;
  flex:0 0 20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
}

.sidebar-link-icon svg{
  width:20px;
  height:20px;
  display:block;
}

.sidebar-link-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  transition:opacity .22s ease, transform .22s ease, max-width .22s ease;
}

#sidebar a.is-active .sidebar-link-icon,
#sidebar a:hover .sidebar-link-icon{
  color:var(--text);
}

#app-shell[data-sidebar-collapsed="true"] #sidebar a{
  justify-content:flex-start;
  padding:10px 8px;
  gap:0;
}

#app-shell[data-sidebar-collapsed="true"] .sidebar-link-label{
  opacity:0;
  max-width:0;
  transform:translateX(-6px);
  pointer-events:none;
}

#main{ flex:1; min-width:0; display:flex; flex-direction:column; }

#topbar{
  height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(10,14,22,.65);
  backdrop-filter:blur(10px);
  position:sticky;
  top:0;
  z-index:10;
}

.topbar-left,
.topbar-right{
  display:flex;
  gap:12px;
  align-items:center;
}

.icon-button{
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border-radius:12px;
}

.icon-button svg{
  width:20px;
  height:20px;
  display:block;
}

button svg,
.btn svg{
  width:17px;
  height:17px;
  display:inline-block;
  vertical-align:-3px;
}

.topbar-icon-button{
  background:linear-gradient(180deg,#162235,#0e1726);
  border:1px solid #2a3a55;
  color:var(--text);
  text-decoration:none;
}

.sidebar-toggle-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  padding:0;
  border:none;
  background:transparent;
  color:var(--text);
  cursor:pointer;
}

.sidebar-toggle-button svg{
  width:20px;
  height:20px;
  display:block;
}

#view{
  flex:1;
  min-height:calc(100vh - 56px);
  padding:18px;
  overflow:auto;
  min-width:0;
}
#view > *{ max-width:100%; }
#graphPageBlocks{ margin-top:var(--stack-gap); display:grid; }
.small{ color:var(--muted); font-size:12px; }

.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:24px;
  padding:3px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--text);
  background:rgba(255,255,255,.04);
  text-decoration:none;
  font-size:12px;
  line-height:1.2;
}

.chip.warning{
  border-color:rgba(245, 158, 11, .55);
  color:#fbbf24;
  background:rgba(245, 158, 11, .10);
}

.table tr[data-action="detail"]{
  cursor:pointer;
}

.kpiGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(160px, 1fr));
  gap:12px;
}

.nx-kpi{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:rgba(255,255,255,.035);
  min-width:0;
}

.nx-kpi strong{
  display:block;
  margin-top:6px;
  font-size:22px;
}

.card{
  background:linear-gradient(180deg, rgba(18,26,38,.9), rgba(12,18,28,.9));
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  min-width:0;
  box-shadow:0 8px 30px rgba(0,0,0,.25);
}

.card + .card{ margin-top:var(--stack-gap); }
.card h2{ margin:0 0 10px; font-size:14px; letter-spacing:.03em; }
.card h3{ margin:10px 0 8px; font-size:13px; color:var(--muted); font-weight:700; }

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(8,16,28,.9), rgba(10,16,24,.95));
}

.table th,
.table td{
  padding:12px 14px;
  text-align:left;
  vertical-align:top;
  border-bottom:1px solid rgba(34,48,68,.8);
  font-size:12px;
  color:var(--text);
}

.table th:last-child,
.table td:last-child,
.nx-table th:last-child,
.nx-table td:last-child{
  text-align:right !important;
}

.table td:last-child > div,
.nx-table td:last-child > div{
  justify-content:flex-end !important;
}

.table thead th{
  color:var(--muted);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  background:rgba(255,255,255,.02);
}

.table tbody tr:hover{
  background:rgba(110,231,255,.04);
}

.table tbody tr:last-child td{
  border-bottom:none;
}

.mm-bundle-report{
  max-height:220px;
}

.mm-kind-filters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.mm-kind-filter-btn{
  display:inline-flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
}

.mm-kind-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  font-size:11px;
  font-weight:700;
}

.mm-kind-filter-btn.is-active{
  box-shadow:0 0 0 3px rgba(255,255,255,.06);
}

.mm-kind-all{
  border-color:#36506c;
  background:linear-gradient(180deg,#162235,#0e1726);
}

.out.mm-def-card{
  border:2px solid #39506f;
  background:linear-gradient(180deg, rgba(12,18,28,.92), rgba(12,18,28,.92));
  max-height:none;
  overflow:visible;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
  transition:border-color .18s ease, transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.out.mm-def-card:hover{
  transform:translateY(-1px);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05), 0 10px 24px rgba(0,0,0,.18), 0 0 0 1px rgba(255,255,255,.04);
}

.out.mm-def-card.is-selected{
  background:linear-gradient(180deg, rgba(17,24,36,.98), rgba(14,20,31,.98));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.out.mm-def-card.is-active{
  background:linear-gradient(180deg, rgba(20,29,42,.98), rgba(15,22,34,.98));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}

.out.mm-def-card.mm-kind-entity_def{
  border-color:rgba(78,205,196,.92);
}

.mm-kind-filter-btn.mm-kind-entity_def{
  border-color:rgba(78,205,196,.45);
  background:linear-gradient(180deg, rgba(16,66,68,.92), rgba(10,30,36,.98));
}

.out.mm-def-card.mm-kind-relation_def{
  border-color:rgba(246,189,96,.92);
}

.mm-kind-filter-btn.mm-kind-relation_def{
  border-color:rgba(246,189,96,.45);
  background:linear-gradient(180deg, rgba(88,63,16,.92), rgba(39,28,10,.98));
}

.out.mm-def-card.mm-kind-process_def{
  border-color:rgba(124,181,255,.94);
}

.mm-kind-filter-btn.mm-kind-process_def{
  border-color:rgba(124,181,255,.45);
  background:linear-gradient(180deg, rgba(24,58,104,.92), rgba(12,28,51,.98));
}

.out.mm-def-card.mm-kind-action_def{
  border-color:rgba(255,123,172,.96);
}

.mm-kind-filter-btn.mm-kind-action_def{
  border-color:rgba(255,123,172,.45);
  background:linear-gradient(180deg, rgba(98,26,64,.92), rgba(40,14,29,.98));
}

.out.mm-def-card.mm-kind-gui_template{
  border-color:rgba(170,139,255,.94);
}

.mm-kind-filter-btn.mm-kind-gui_template{
  border-color:rgba(170,139,255,.45);
  background:linear-gradient(180deg, rgba(63,40,110,.92), rgba(28,17,50,.98));
}

.out.mm-def-card.mm-kind-presentation_def{
  border-color:rgba(170,139,255,.94);
}

.mm-kind-filter-btn.mm-kind-presentation_def{
  border-color:rgba(170,139,255,.45);
  background:linear-gradient(180deg, rgba(63,40,110,.92), rgba(28,17,50,.98));
}

.out.mm-def-card.mm-kind-capability_def{
  border-color:rgba(194,165,114,.94);
}

.mm-kind-filter-btn.mm-kind-capability_def{
  border-color:rgba(194,165,114,.45);
  background:linear-gradient(180deg, rgba(90,70,35,.92), rgba(43,33,18,.98));
}

.mm-editor-modal{
  width:min(100%, 1100px);
  max-height:calc(100vh - 40px);
}

.mm-instance-modal{
  width:min(100%, 760px);
  max-height:calc(100vh - 40px);
}

.mm-edit-def-btn{
  min-width:38px;
  width:38px;
  height:38px;
  padding:0;
  border-radius:12px;
  font-size:16px;
  line-height:1;
}

.mm-instance-def-btn{
  min-width:38px;
  width:38px;
  height:38px;
  padding:0;
  border-radius:12px;
  font-size:18px;
  line-height:1;
}

.mm-clone-def-btn{
  min-width:38px;
  width:38px;
  height:38px;
  padding:0;
  border-radius:12px;
  font-size:15px;
  line-height:1;
}

.mm-delete-def-btn{
  min-width:38px;
  width:38px;
  height:38px;
  padding:0;
  border-radius:12px;
  font-size:15px;
  line-height:1;
}

.mm-toolbar-icon-btn{
  min-width:38px;
  width:38px;
  height:38px;
  padding:0;
  border-radius:12px;
  font-size:18px;
  line-height:1;
  margin-left:auto;
}

.mm-list-actions{
  min-width:0;
}

.mm-graph-stage{
  position:relative;
}

.mm-graph-panel{
  position:absolute;
  top:12px;
  right:12px;
  width:min(340px, calc(100% - 24px));
  max-height:calc(100% - 24px);
  overflow:auto;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(8,16,28,.96);
  box-shadow:0 18px 40px rgba(0,0,0,.35);
  z-index:3;
}

.mm-graph-panel.is-hidden{
  display:none;
}

.is-hidden{
  display:none !important;
}

.nx-busy-overlay,
.qx-busy-overlay{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  background:rgba(8,16,28,.68);
  backdrop-filter:blur(8px);
}

.nx-busy-overlay.is-hidden,
.qx-busy-overlay.is-hidden{
  display:none;
}

.nx-busy-panel,
.qx-busy-panel{
  min-width:220px;
  display:grid;
  justify-items:center;
  gap:12px;
  padding:22px 26px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface-elevated);
  box-shadow:0 18px 50px rgba(0,0,0,.32);
  color:var(--text);
  font-weight:600;
}

.nx-spinner,
.qx-spinner{
  width:34px;
  height:34px;
  border:3px solid var(--line);
  border-top-color:var(--accent);
  border-radius:50%;
  animation:nx-spin .8s linear infinite;
}

@keyframes nx-spin{
  to{ transform:rotate(360deg); }
}

.mm-graph-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.mm-rel-graph-wrap,
.mm-selected-graph-wrap{
  min-height:360px;
}

.row{ display:grid; grid-template-columns:110px 1fr; gap:10px; align-items:center; margin:8px 0; }
.row label{ color:var(--muted); font-size:12px; }

input, textarea, select{
  width:100%;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--surface-elevated);
  color:var(--text);
}

input::placeholder,
textarea::placeholder{
  color:color-mix(in srgb, var(--muted) 88%, transparent);
}

input:focus,
textarea:focus,
select:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--focus-ring);
}

textarea{ resize:vertical; }

select{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  padding-right:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%239fb0c3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position:calc(100% - 14px) 50%;
  background-size:18px 18px;
  background-repeat:no-repeat;
  cursor:pointer;
}

select::-ms-expand{ display:none; }
select::-webkit-list-button{ display:none; }
select option{ background:#0d1420; color:var(--text); }

.gui-multi-select{
  position:relative;
  width:100%;
  overflow:visible;
  font-size:13.3333px;
}

.gui-multi-select > summary::-webkit-details-marker{
  display:none;
}

.gui-multi-select-summary{
  list-style:none;
  cursor:pointer;
  width:100%;
  max-width:100%;
  padding:8px 40px 8px 10px;
  text-align:left;
  user-select:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  position:relative;
  min-height:35.2px;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--surface-elevated);
  color:var(--text);
  overflow:hidden;
}

.gui-multi-select[open] > .gui-multi-select-summary{
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--focus-ring);
}

.gui-multi-select-summary-text{
  min-width:0;
  flex:1 1 auto;
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:left;
}

.gui-multi-select-caret{
  position:absolute;
  top:50%;
  right:14px;
  width:18px;
  height:18px;
  transform:translateY(-50%);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%239fb0c3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position:center;
  background-size:18px 18px;
  background-repeat:no-repeat;
  pointer-events:none;
}

.gui-multi-select[open] .gui-multi-select-caret{
  transform:translateY(-50%) rotate(180deg);
}

.gui-multi-select-options{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  z-index:30;
  padding:10px;
  text-align:left;
  max-height:220px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface-elevated);
  box-shadow:0 12px 28px rgba(0,0,0,.14);
}

.gui-multi-select-option{
  display:grid;
  grid-template-columns:16px minmax(0, 1fr);
  width:100%;
  align-items:center;
  justify-items:start;
  column-gap:8px;
  text-align:left;
}

.gui-multi-select-option span{
  text-align:left;
  justify-self:start;
}

input[type="file"]{ padding:6px; }

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button{
  margin-right:12px;
  padding:9px 12px;
  border-radius:10px;
  border:1px solid #2a3a55;
  background:linear-gradient(180deg,#162235,#0e1726);
  color:var(--text);
  cursor:pointer;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover{
  border-color:#3a557a;
}

button{
  padding:9px 12px;
  border-radius:12px;
  border:1px solid #2a3a55;
  background:linear-gradient(180deg,#162235,#0e1726);
  color:var(--text);
  cursor:pointer;
}

button:hover{ border-color:#3a557a; }

button.secondary{
  background:transparent;
  color:var(--muted);
}

.pill{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid #2b3a56;
  border-radius:999px;
  background:#0b1726;
  cursor:pointer;
  user-select:none;
}

.pill:hover{ border-color:#3a557a; }
.pill input{ width:auto; }
.pill .t{ font-size:12px; color:#cfe3ff; }
.pill .n{ font-size:11px; color:var(--muted); }

button:focus-visible,
.user-menu-link:focus-visible,
.debugLink:focus-visible,
#sidebar a:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px var(--focus-ring);
}

.out{
  margin:10px 0 0;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--surface-soft);
  color:#cfe3ff;
  overflow:auto;
  max-height:260px;
  font-size:12px;
  line-height:1.35;
}

.out.big{ max-height:520px; }

.toolbar{ display:flex; gap:8px; margin:8px 0; }
.split{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }

.list{
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-soft);
  padding:8px;
  max-height:420px;
  overflow:auto;
}

.item{
  padding:8px;
  border-radius:10px;
  border:1px solid color-mix(in srgb, var(--line) 78%, transparent);
  margin:6px 0;
  cursor:pointer;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  background:linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 94%, white 6%), color-mix(in srgb, var(--surface-strong) 92%, white 8%));
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset;
}

.item:hover{ border-color:color-mix(in srgb, var(--accent) 28%, var(--line) 72%); background:linear-gradient(180deg, color-mix(in srgb, var(--surface-elevated) 86%, var(--accent) 14%), color-mix(in srgb, var(--surface-strong) 90%, var(--accent) 10%)); }
.item .id{ font-size:12px; font-weight:700; }
.item .meta{ font-size:11px; color:var(--muted); margin-top:2px; }

.node-appearance-row-main{
  min-width:0;
  flex:1;
}

.node-appearance-active{
  box-shadow:inset 3px 0 0 var(--node-appearance-color), 0 1px 0 rgba(255,255,255,.04) inset;
}

.node-appearance-trigger{
  min-width:34px;
  width:34px;
  height:34px;
  padding:0;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 34px;
}

.node-appearance-trigger svg{
  width:16px;
  height:16px;
}

.kanban-card-action-button{
  min-width:32px;
  width:32px;
  height:32px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  font-size:15px;
  flex:0 0 32px;
}

.node-appearance-modal{
  width:min(100%, 520px);
}

.node-appearance-picker-row{
  align-items:start;
}

.node-appearance-picker-group{
  display:flex;
  gap:10px;
  align-items:center;
}

.node-appearance-picker-group input[type="color"]{
  width:56px;
  min-width:56px;
  height:42px;
  padding:4px;
}

.node-appearance-check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:12px;
  color:var(--text);
  font-size:13px;
}

.node-appearance-check input{
  width:auto;
  margin-top:2px;
}

#debug-drawer{
  position:fixed;
  top:0;
  right:0;
  width:420px;
  height:100vh;
  padding:14px;
  background:#0e1522;
  border-left:1px solid var(--line);
  overflow:auto;
  z-index:50;
}

.debugDrawerHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.debugDrawerHead h3{ margin:0; }
.debugDrawerClose{ min-width:72px; }

.eventsToolbar{
  position:sticky;
  top:54px;
  z-index:6;
  background:rgba(10,14,22,.65);
  backdrop-filter:blur(10px);
}

.spacer{ flex:1; }

.debugQuick{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:8px;
}

.debugQuick input{ width:100%; }

.debugActions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.debugLink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid #2a3a55;
  background:linear-gradient(180deg,#162235,#0e1726);
  color:var(--text);
  text-decoration:none;
}

.debugLink:hover{ border-color:#3a557a; }

.debugCheck{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:10px;
  font-size:12px;
}

.debugCheck input{ width:auto; }

.kv{
  display:grid;
  grid-template-columns:88px 1fr;
  gap:8px;
  margin:6px 0;
  font-size:12px;
}

.kv span:first-child{ color:var(--muted); }

.user-menu-wrap{ position:relative; }

.user-menu-trigger{
  width:38px;
  height:38px;
  padding:0;
  border-radius:999px;
  font-weight:700;
}

.user-menu{
  position:absolute;
  top:46px;
  right:0;
  min-width:220px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(18,26,38,.98), rgba(12,18,28,.98));
  box-shadow:0 8px 30px rgba(0,0,0,.35);
}

.user-menu-info{
  padding:6px 4px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  margin-bottom:4px;
}

.user-menu-link{
  display:block;
  width:100%;
  margin-top:8px;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid #2a3a55;
  background:linear-gradient(180deg,#162235,#0e1726);
  color:var(--text);
  text-decoration:none;
  text-align:left;
}

.user-menu-action{ cursor:pointer; }

.nx-nav-link,
.nx-nav-link:visited {
  color:inherit;
  text-decoration:none;
}

.nx-nav-link:hover {
  text-decoration:underline;
  cursor:pointer;
}

.badge {
  display:inline-block;
  padding:2px 10px;
  border-radius:999px;
  font-size:12px;
  line-height:18px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.06);
  color:inherit;
  white-space:nowrap;
}

.badge-online {
  background:rgba(0, 200, 120, 0.14);
  border-color:rgba(0, 200, 120, 0.25);
}

.badge-degraded {
  background:rgba(255, 165, 0, 0.14);
  border-color:rgba(255, 165, 0, 0.25);
}

.badge-offline {
  background:rgba(255, 80, 80, 0.14);
  border-color:rgba(255, 80, 80, 0.25);
}

.badge-unknown { opacity:0.85; }

.mm-template-actions{
  display:flex;
  gap:6px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
}

.mm-template-actions button,
.mm-toolbar-icon-btn,
.mm-list-actions button{
  display:inline-flex;
  width:32px;
  height:32px;
  align-items:center;
  justify-content:center;
  padding:0;
}

.mm-template-actions svg,
.mm-list-actions svg{
  width:18px;
  height:18px;
}

.mm-version-cell{
  display:inline-flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}

.mm-dependency-note{
  position:relative;
  display:inline-flex;
  width:22px;
  height:22px;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  cursor:help;
}

.mm-dependency-note svg{
  width:16px;
  height:16px;
}

.mm-dependency-bubble{
  position:absolute;
  right:0;
  bottom:calc(100% + 8px);
  z-index:60;
  display:none;
  min-width:190px;
  max-width:280px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface-elevated);
  box-shadow:0 14px 32px rgba(0,0,0,.24);
  color:var(--text);
}

.mm-dependency-note:hover .mm-dependency-bubble,
.mm-dependency-note:focus .mm-dependency-bubble{
  display:grid;
  gap:6px;
}

.mm-dependency-bubble span{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  font-size:11px;
}

.mm-dependency-bubble em{
  color:var(--muted);
  font-style:normal;
}

.capWorkbench{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 300px;
  gap:12px;
  align-items:stretch;
}

.capStage{
  position:relative;
  min-height:620px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:8px;
  background:#000000;
}

.capMesh{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:1;
}

.capMesh polygon{
  fill:none;
  stroke:rgba(220,226,236,.30);
  stroke-width:.6;
  vector-effect:non-scaling-stroke;
}

.capEdges{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:8;
}

.capLinkLine{
  stroke:rgba(110,231,255,.72);
  stroke-width:2.2;
  pointer-events:stroke;
  cursor:pointer;
  transition:x1 .18s ease, y1 .18s ease, x2 .18s ease, y2 .18s ease, stroke .16s ease, stroke-width .16s ease, filter .16s ease;
}

.capLinkLine:hover,
.capLinkLine.is-selected{
  stroke:#ffffff;
  stroke-width:3.2;
  filter:drop-shadow(0 0 8px rgba(110,231,255,.72));
}

.capProcessLine{
  stroke:rgba(255,122,182,.72);
  stroke-width:2;
  stroke-dasharray:8 7;
  pointer-events:stroke;
  cursor:pointer;
}

.capProcessLine:hover,
.capProcessLine.is-selected{
  stroke:#ffffff;
  stroke-width:3;
  filter:drop-shadow(0 0 8px rgba(255,122,182,.72));
}

.capReadonlyLine{
  stroke:rgba(174,231,143,.74);
  stroke-width:1.8;
  stroke-dasharray:2 7;
  pointer-events:stroke;
  cursor:pointer;
}

.capReadonlyLine.is-strong-contract{
  stroke:rgba(87,220,163,.82);
  stroke-width:2.2;
  stroke-dasharray:3 5;
}

.capReadonlyLine:hover,
.capReadonlyLine.is-selected{
  stroke:#ffffff;
  stroke-width:3;
  filter:drop-shadow(0 0 8px rgba(174,231,143,.72));
}

.capDraftLine{
  stroke:rgba(246,189,96,.80);
  stroke-width:1.4;
  stroke-dasharray:5 5;
  pointer-events:none;
}

.capDraftLine.is-snapped{
  stroke:#ffffff;
  stroke-width:2.2;
  filter:drop-shadow(0 0 7px rgba(110,231,255,.72));
}

.capNodes{
  position:absolute;
  inset:0;
  z-index:3;
}

.capCell{
  position:absolute;
  width:96px;
  height:110px;
  overflow:visible;
  z-index:4;
}

.capCell.is-empty{
  z-index:2;
}

.capCell.is-occupied{
  z-index:5;
}

.capCell:hover,
.capCell.is-selected{
  z-index:18;
}

.capCell.is-dragging{
  z-index:20;
  opacity:.38;
}

.capCell.is-drop-target{
  z-index:19;
}

.capHexButton{
  position:absolute;
  inset:0;
  z-index:16;
  display:flex;
  width:96px;
  height:110px;
  align-items:center;
  justify-content:center;
  padding:0 16px;
  border:0;
  background:transparent;
  color:#e7eef7;
  clip-path:polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  cursor:pointer;
  transition:filter .16s ease, transform .16s ease;
}

.capCell.is-occupied .capHexButton{
  cursor:grab;
}

.capCell.is-occupied:active .capHexButton{
  cursor:grabbing;
}

.capHexSvg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  background:#000000;
}

.capHexSvg polygon{
  fill:rgba(0,0,0,0);
  stroke:rgba(255,255,255,0);
  stroke-width:1.4;
  vector-effect:non-scaling-stroke;
  transition:fill .16s ease, stroke .16s ease, stroke-width .16s ease, filter .16s ease;
}

.capHexButton span{
  position:relative;
  z-index:7;
  display:flex;
  align-items:center;
  justify-content:center;
  max-width:68px;
  max-height:46px;
  text-align:center;
  font-size:9px;
  font-weight:800;
  line-height:1.05;
  overflow-wrap:anywhere;
  word-break:normal;
  color:#f8fbff;
  text-shadow:0 1px 2px #000, 0 0 8px rgba(110,231,255,.28);
  overflow:hidden;
}

.capCell.is-empty .capHexSvg polygon{
  fill:rgba(0,0,0,0);
  stroke:rgba(255,255,255,0);
}

.capCell.is-occupied .capHexSvg polygon{
  fill:rgba(7,14,24,.88);
  stroke:rgba(110,231,255,.74);
  stroke-width:2.2;
}

.capCell:hover .capHexSvg polygon,
.capCell.is-selected .capHexSvg polygon{
  fill:rgba(14,34,51,.92);
  stroke:#6ee7ff;
  filter:drop-shadow(0 8px 16px rgba(0,0,0,.24));
}

.capCell.is-drop-target .capHexSvg polygon{
  fill:rgba(78,205,196,.16);
  stroke:#ffffff;
  stroke-dasharray:3 3;
  stroke-width:2;
}

.capCell:hover .capHexButton,
.capCell.is-selected .capHexButton{
  transform:translateY(-1px);
}

.capConnectorLayer{
  position:absolute;
  inset:0;
  z-index:17;
  pointer-events:none;
}

.capConnectorHitArea{
  position:absolute;
  left:50%;
  top:50%;
  z-index:15;
  width:140px;
  height:140px;
  margin:-70px 0 0 -70px;
  border-radius:50%;
  background:transparent;
  pointer-events:none;
}

.capCell:hover .capConnectorHitArea,
.capCell.is-ring-active .capConnectorHitArea{
  pointer-events:auto;
}

.capConnector{
  position:absolute;
  z-index:18;
  left:var(--cap-connector-left);
  top:var(--cap-connector-top);
  width:9px;
  height:9px;
  margin:-4.5px 0 0 -4.5px;
  padding:0;
  border:1px solid #0b1726;
  border-radius:50%;
  background:#9fb0c3;
  box-shadow:0 0 0 1px rgba(255,255,255,.18), 0 3px 7px rgba(0,0,0,.30);
  cursor:default;
  opacity:0;
  pointer-events:none;
  transform:scale(.25);
  transition:left .18s ease, top .18s ease, opacity .18s ease, transform .18s ease, box-shadow .16s ease, background .16s ease;
}

.capConnector-output{ background:#4ecdc4; }
.capConnector-input{ background:#f6bd60; }
.capConnector-bidirectional{ background:#aa8bff; }

.capCell:hover .capConnector,
.capCell.is-ring-active .capConnector,
.capConnector.is-selected{
  left:var(--cap-connector-expanded-left);
  top:var(--cap-connector-expanded-top);
  opacity:1;
  pointer-events:auto;
  transform:scale(1);
}

.capConnector.is-compatible{
  opacity:1;
  pointer-events:auto;
  transform:scale(1);
}

.capConnector.is-linked{
  opacity:1;
  pointer-events:auto;
  transform:scale(1);
}

.capConnector.is-expanded{
  left:var(--cap-connector-expanded-left);
  top:var(--cap-connector-expanded-top);
}

.capStage.is-connecting .capCell:hover .capConnector:not(.is-selected):not(.is-compatible):not(.is-linked),
.capStage.is-connecting .capCell.is-ring-active .capConnector:not(.is-selected):not(.is-compatible):not(.is-linked){
  opacity:.08;
  pointer-events:none;
  transform:scale(.25);
}

.capStage.is-connecting .capConnector.is-selected,
.capStage.is-connecting .capConnector.is-compatible{
  z-index:22;
}

.capConnector:hover{ transform:scale(1.55); }
.capStage.is-connecting .capConnector.is-compatible:hover{
  transform:scale(1.75);
}

.capStage.is-connecting .capCell.is-empty{
  pointer-events:none;
}
.capConnector.is-selected{
  background:#ffffff;
  box-shadow:0 0 0 5px rgba(110,231,255,.22), 0 0 0 1px #6ee7ff;
}
.capConnector.is-compatible{
  box-shadow:0 0 0 4px rgba(78,205,196,.22), 0 0 0 1px #4ecdc4;
}
.capConnector.is-linked{
  background:#ffffff;
  border-color:#6ee7ff;
  box-shadow:0 0 0 3px rgba(110,231,255,.26), 0 0 10px rgba(110,231,255,.38);
}
.capConnector.is-compatible:hover{
  box-shadow:0 0 0 7px rgba(78,205,196,.28), 0 0 0 2px #ffffff;
}
.capConnector.is-disabled{
  opacity:.08;
  pointer-events:none;
}

.capDetails{
  min-height:620px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#08101c;
  overflow:auto;
}

.capPanelTitle{
  color:#e7eef7;
  font-size:15px;
  font-weight:800;
  line-height:1.2;
}

.capPanelSub{
  margin-top:14px;
  color:#9fb0c3;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.capKV{
  display:grid;
  grid-template-columns:96px minmax(0, 1fr);
  gap:8px;
  margin-top:10px;
  font-size:12px;
}

.capKV span{
  color:#9fb0c3;
}

.capKV strong{
  min-width:0;
  color:#e7eef7;
  overflow-wrap:anywhere;
}

.capCompatList{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:8px;
}

.capProcessList{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:8px;
}

.capProcessList > div{
  padding:8px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  background:rgba(255,255,255,.04);
}

.capProcessList strong,
.capProcessList span{
  display:block;
}

.capProcessList span{
  margin-top:3px;
  color:#9fb0c3;
  font-size:12px;
}

.capInlineAction{
  margin-top:8px;
}

.capCompatList button{
  display:flex;
  min-height:44px;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:2px;
  text-align:left;
}

.capCompatList span{
  color:#9fb0c3;
  font-size:11px;
}

.capOptionList{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:12px;
}

.capOptionList button{
  display:flex;
  min-height:42px;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:2px;
  text-align:left;
}

.capOptionList span{
  color:#9fb0c3;
  font-size:11px;
}

.capTagList{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}

.capTagList span{
  padding:3px 7px;
  border:1px solid #2b3a56;
  border-radius:999px;
  color:#cfe3ff;
  font-size:10px;
}

.capPanelAction{
  width:100%;
  margin-top:14px;
}

.nx-tree-primary-col{
  min-width:180px;
}

.nx-tree-actions-col{
  min-width:84px;
  white-space:nowrap;
}

.nx-tree-actions-col .nx-row-actions{
  flex-wrap:nowrap;
}

.nx-tree-cell{
  align-items:center;
  display:flex;
  gap:6px;
  padding-left:calc(var(--nx-tree-depth, 0) * 18px);
}

.nx-tree-marker{
  color:var(--muted);
  display:inline-block;
  font-size:11px;
  line-height:1;
  text-align:center;
  width:12px;
}

.nx-tree-toggle{
  align-items:center;
  background:transparent;
  border:0;
  color:var(--muted);
  cursor:pointer;
  display:inline-flex;
  font-size:11px;
  height:20px;
  justify-content:center;
  line-height:1;
  min-height:20px;
  padding:0;
  width:12px;
}

.nx-tree-toggle:hover,
.nx-tree-toggle:focus{
  color:var(--text);
}

@media (max-width: 980px){
  .capWorkbench{
    grid-template-columns:1fr;
  }
  .capStage{
    min-height:600px;
    overflow:auto;
  }
  .capDetails{
    min-height:220px;
  }
}
