.nodes-overview-page { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; }
.nodes-filter-bar { grid-template-columns:minmax(240px,440px) minmax(260px,1fr); }
.nodes-config-grid,.nodes-config-grid .mvc-grid { min-height:0; }
.nodes-config-grid .mvc-grid-table { flex:1 1 auto; min-height:0; overflow:auto; }
.nodes-config-grid .mvc-grid-table > table { min-width:1080px; width:100%; table-layout:fixed; }
.nodes-config-grid .mvc-grid-table > table > thead > tr > th,
.nodes-config-grid .mvc-grid-table > table > tbody > tr > td { text-align:left; }
.nodes-config-grid .mvc-grid-table > table > :is(thead,tbody) > tr > :is(th,td):nth-child(1) { width:14%; }
.nodes-config-grid .mvc-grid-table > table > :is(thead,tbody) > tr > :is(th,td):nth-child(2) { width:27%; }
.nodes-config-grid .mvc-grid-table > table > :is(thead,tbody) > tr > :is(th,td):nth-child(3) { width:10%; }
.nodes-config-grid .mvc-grid-table > table > :is(thead,tbody) > tr > :is(th,td):nth-child(4) { width:8%; }
.nodes-config-grid .mvc-grid-table > table > :is(thead,tbody) > tr > :is(th,td):nth-child(5) { width:19%; }
.nodes-config-grid .mvc-grid-table > table > :is(thead,tbody) > tr > :is(th,td):nth-child(6) { width:12%; }
.nodes-config-grid .mvc-grid-table > table > :is(thead,tbody) > tr > :is(th,td):nth-child(7) { width:76px; text-align:center; }
.nodes-config-grid .mvc-grid-table > table > tbody > tr > td:last-child { text-align:center; }
.nodes-config-grid .mvc-grid-table > table > tbody > tr > td { height:42px; }
.nodes-config-grid [data-node-row][hidden] { display:none!important; }
.nodes-status { display:inline-flex; align-items:center; gap:6px; color:#bfc2c4; }
.nodes-status-dot { width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:#73787b; }
.nodes-status.is-online { color:#58d879; }
.nodes-status.is-online .nodes-status-dot { background:#29c853; box-shadow:0 0 7px rgba(41,200,83,.35); }
.nodes-status.is-offline { color:#a9adaf; }
.node-row-actions { width:34px; margin:0 auto; }
.node-row-actions .config-action { border-radius:4px; }
.nodes-config-grid .config-action > i { font-size:12px; }
.nodes-empty { min-height:150px; display:grid; place-content:center; justify-items:center; gap:8px; color:#92979a; font-size:11px; }
.nodes-empty[hidden] { display:none!important; }
.nodes-empty > i { color:#55d8ed; font-size:19px; }

.nodes-editor-page { position:relative; width:100%; margin-left:0; }
.nodes-editor-body { min-height:0; overflow:auto; padding-bottom:46px; }
.nodes-editor-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:10px; padding:10px 12px; }
.nodes-editor-form > .nodes-editor-section { margin:0; padding:10px 12px; }
.nodes-editor-form > .text-danger:empty { display:none; }
.nodes-editor-form > .text-danger { grid-column:1 / -1; }
.nodes-editor-form .config-edit-section-title { margin-bottom:7px; }
.nodes-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 10px; }
.nodes-endpoint-grid { align-items:start; }
.nodes-endpoint-grid > .nodes-toggle-list { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.nodes-field { min-width:0; }
.nodes-field > label { display:block; margin-bottom:4px; color:#f5f6f7; font-size:11px; }
.nodes-field > small { display:block; margin-top:4px; color:#929799; font-size:9px; }
.nodes-field > :is(input,select),.nodes-field .form-control { box-sizing:border-box; width:100%; height:32px; min-height:32px; padding:5px 9px; background:#1d1f20; border:1px solid #54585b; border-radius:5px; color:#e9ebec; font-size:11px; }
.nodes-field > :is(input,select):focus,.nodes-field .form-control:focus { border-color:#00b9db; box-shadow:0 0 0 1px rgba(0,194,230,.18); outline:0; }
.nodes-protocol-selector { width:fit-content; display:flex; gap:0; overflow:hidden; border:1px solid #45484a; border-radius:6px; background:#202223; }
.nodes-protocol-option { position:relative; min-width:112px; height:38px; padding:0 12px; display:flex; align-items:center; gap:8px; cursor:pointer; color:#aeb2b4; }
.nodes-protocol-option + .nodes-protocol-option { border-left:1px solid #45484a; }
.nodes-protocol-option > input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.nodes-protocol-option > i { width:18px; color:#858b8e; font-size:16px; text-align:center; }
.nodes-protocol-option > span { display:flex; flex-direction:column; line-height:1.05; }
.nodes-protocol-option strong { color:#c9ccce; font-size:11px; font-weight:600; }
.nodes-protocol-option small { margin-top:3px; color:#7f8588; font-size:9px; }
.nodes-protocol-option:hover { background:rgba(255,255,255,.035); }
/* A segmented control has no box of its own, so it keeps the selected underline
   and drops the gradient wash behind it. */
.nodes-protocol-option:has(input:checked) { box-shadow:inset 0 -2px 0 #00c7ee; }
.nodes-protocol-option:has(input:checked) > i { color:#4bd9f1; }
.nodes-protocol-option:has(input:checked) strong { color:#d9f8fc; }
.nodes-protocol-option:has(input:checked) small { color:#8bdbe8; }
.nodes-toggle-list { display:flex; flex-direction:column; gap:5px; }
.nodes-toggle-row { min-height:38px; margin:0; padding:4px 8px; display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid #45484a; border-radius:5px; background:#242627; cursor:pointer; }
.nodes-toggle-row > span { min-width:0; }
.nodes-toggle-row strong { display:block; color:#d9dcde; font-size:11px; font-weight:500; }
.nodes-toggle-row small { display:block; margin-top:2px; color:#8f9497; font-size:10px; font-weight:400; }
.nodes-toggle-row > input { width:16px; height:16px; margin:0; accent-color:#00b9db; }
.nodes-legacy-section { grid-column:1 / -1; }
.nodes-legacy-section[hidden] { display:none!important; }
.nodes-check-connection { height:34px; margin-top:10px; }
.nodes-api-section { grid-column:1 / -1; display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,520px); align-items:end; gap:7px 12px; }
.nodes-api-section > .config-edit-section-title { grid-column:1 / -1; }
.nodes-api-key-row { display:grid; grid-template-columns:minmax(0,1fr) max-content; align-items:end; gap:10px; }
.nodes-api-key-row .usersubmit-secondary { height:34px; white-space:nowrap; }
.nodes-toggle-row-compact { width:100%; max-width:520px; margin-top:0; }
.nodes-editor-form > .config-edit-save-row { position:sticky; right:auto; bottom:0; left:auto; z-index:4; grid-column:1 / -1; min-height:44px; margin:0; padding:5px 10px; display:flex; align-items:center; justify-content:flex-end; border:1px solid #46494b; border-radius:7px; background:#202223; }

@media (max-width:767px) {
  .nodes-filter-bar { grid-template-columns:1fr; gap:8px; }
  .nodes-config-grid .mvc-grid-table > table { min-width:0; }
  .nodes-config-grid .mvc-grid-table tbody { padding:10px; display:grid; gap:8px; }
  .nodes-config-grid .mvc-grid-table tbody tr { position:relative; padding:11px 58px 11px 12px; display:grid; grid-template-columns:minmax(0,1fr) 104px; align-items:center; gap:7px 12px; border:1px solid #474a4c; border-radius:7px; background:#2b2d2e; }
  .nodes-config-grid .mvc-grid-table tbody td { display:block; width:auto!important; max-width:none; height:auto!important; }
  .nodes-config-grid .mvc-grid-table tbody td::before { margin-right:4px; color:#858a8d; font-size:8px; font-weight:500; letter-spacing:.05em; text-transform:uppercase; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(1) { grid-column:1; grid-row:1; min-width:0; overflow:hidden; color:#e8eaec; font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(3) { grid-column:2; grid-row:1; justify-self:start; white-space:nowrap; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(7) { position:absolute; top:10px; right:10px; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(2) { grid-column:1 / -1; grid-row:2; min-width:0; overflow:hidden; color:#a9adb0; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(4),.nodes-config-grid .mvc-grid-table tbody td:nth-child(5),.nodes-config-grid .mvc-grid-table tbody td:nth-child(6) { display:flex; align-items:center; gap:5px; min-width:0; color:#b9bcbf; font-size:10px; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(4) { grid-column:1; grid-row:3; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(6) { grid-column:2; grid-row:3; width:100%!important; justify-content:space-between; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(5) { grid-column:1 / -1; grid-row:4; white-space:nowrap; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(4)::before { content:"User"; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(5)::before { content:"Updated"; }
  .nodes-config-grid .mvc-grid-table tbody td:nth-child(6)::before { content:"CPU %"; }
  .nodes-config-grid .mvc-grid-pager { display:none; }
  .nodes-editor-form { grid-template-columns:1fr; padding:10px; }
  .nodes-editor-form > .text-danger,.nodes-legacy-section,.nodes-api-section { grid-column:1; }
  .nodes-field-grid { grid-template-columns:1fr; }
  .nodes-endpoint-grid > .nodes-toggle-list { grid-column:1; grid-template-columns:1fr; }
  .nodes-protocol-selector { width:100%; }
  .nodes-protocol-option { flex:1 1 50%; min-width:0; }
  .nodes-api-section { display:block; }
  .nodes-api-key-row { grid-template-columns:1fr; }
  .nodes-api-key-row .usersubmit-secondary { width:100%; }
  .nodes-toggle-row-compact { margin-top:7px; }
}
