/* PNetLab UI Enhancements v2 */

body, * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif !important;
}

/* =============================================
   TOP NAVBAR / MODAL HEADER = #25332c
   ============================================= */

.navbar-static-top,
.main-header .navbar,
.dropdown-main {
  background-color: #25332c !important;
}

.modal-header {
  background-color: #25332c !important;
}

thead {
  background: #25332c !important;
}

/* Context menu title strip — #menu_title system (Angular/lab views) */
#menu_title,
#menu_title_left {
  background-color: #25332c !important;
  color: #ffffff !important;
  padding: 4px 14px !important;
  border-radius: 4px 4px 0 0;
}

#btnlogin:hover {
  background-color: #25332c !important;
}

/* =============================================
   SMOOTHNESS
   ============================================= */

.btn, button, [role="button"], .button {
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease,
              opacity 0.15s ease !important;
}

.btn:active, button:active, .button:active { opacity: 0.82; }

a { transition: color 0.12s ease, opacity 0.12s ease !important; }

input, select, textarea, .form-control {
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.btn:focus, .form-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 51, 44, 0.35) !important;
}

.dropdown-menu {
  border-radius: 6px !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.20) !important;
}

/* context-menu glass handled below in the unified block */

.modal.fade .modal-dialog {
  transition: transform 0.2s ease, opacity 0.2s ease !important;
  transform: translateY(-18px);
}
/* 'none' (not translateY(0)) — avoids creating a CSS stacking context
   that would isolate the compositing layer and block backdrop-filter on
   the child .modal-content from blurring through to the canvas behind. */
.modal.in .modal-dialog { transform: none; }

/* On the topology page the quickbar occupies the top ~64px.
   Push all modals below it. Scoped via :has(#pnetlab-quickbar) so
   this only fires on /legacy/topology, not on admin SPA pages. */
body:has(#pnetlab-quickbar) .modal-dialog {
  margin-top: 72px !important;
}

/* …except the Add Node modal, which EVE-NG centres vertically on screen.
   Override the quickbar top-pin: make its overlay a flex box and let the
   dialog auto-margin to dead-centre. `margin:auto` (not align-items:center)
   keeps the top reachable/scrollable if the modal ever exceeds the viewport.
   Higher specificity than the rule above (id-in-:has + extra classes), so it
   wins for this modal only.

   CRITICAL: gate on `.modal.in` (open state only). `.pnq-node-modal` is added
   on first render and never removed, so without the `.in` guard the
   `display:flex !important` would override Bootstrap's `display:none` on close,
   leaving an invisible full-screen overlay over the canvas that swallows
   right-clicks (browser menu appears instead of the PNetLab context menu). */
body:has(#pnetlab-quickbar) .modal.in:has(.pnq-node-modal) {
  display: flex !important;
}
body:has(#pnetlab-quickbar) .modal.in:has(.pnq-node-modal) .modal-dialog {
  margin: auto !important;
}

/* Add Network modal — centre vertically too (same pattern, same `.in` guard
   so a closed/hidden overlay can't swallow canvas right-clicks). */
body:has(#pnetlab-quickbar) .modal.in:has(#form-network-add) {
  display: flex !important;
}
body:has(#pnetlab-quickbar) .modal.in:has(#form-network-add) .modal-dialog {
  margin: auto !important;
}

/* Connect-two-nodes link modal (newConnModal → #addConn) — centre too. */
body:has(#pnetlab-quickbar) .modal.in:has(#addConn) {
  display: flex !important;
}
body:has(#pnetlab-quickbar) .modal.in:has(#addConn) .modal-dialog {
  margin: auto !important;
}

.table > tbody > tr { transition: background-color 0.1s ease !important; }

.sidebar-menu > li > a,
.treeview-menu > li > a {
  transition: background-color 0.12s ease, color 0.12s ease !important;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.06); }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.22); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.38); }

.list-group-item { transition: background-color 0.1s ease, color 0.1s ease !important; }

.nav-tabs > li > a {
  transition: background-color 0.12s ease, color 0.12s ease,
              border-color 0.12s ease !important;
}

#toast-container > div {
  border-radius: 6px !important;
  box-shadow: 0 3px 14px rgba(0,0,0,0.25) !important;
}

/* =============================================
   LEGACY TOPOLOGY PAGE — sidebar + navbar
   ============================================= */

/* Apple-style frosted glass sidebar
   backdrop-filter blurs the topology canvas behind the panel.
   ::before adds a diagonal mirror sheen (top-bright → dark fade).
   position:relative on #lab-sidebar is already set in unetlab.css,
   so ::before stacks correctly with z-index. */
#lab-sidebar {
  background: rgba(28, 40, 33, 0.72) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.13) !important;
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.08),
    2px 0 28px rgba(0, 0, 0, 0.35) !important;
}

#lab-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(0, 0, 0, 0.06) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Keep sidebar children above the sheen layer */
#lab-sidebar > * {
  position: relative;
  z-index: 1;
}

#navbar-main {
  background-color: #25332c !important;
}

#navbar-main .item-search button {
  background: #25332c !important;
  border-color: #25332c !important;
}

/* =============================================
   ALL CONTEXT MENUS — frosted glass
   ============================================= */

/* Glass container — div-based menus (.context-menu* from unl_lab.css).
   overflow:hidden clips the ::before sheen to the rounded corners.
   .context-menu is shared with canvas objects — see :not() chain below. */
.context-menu:not(.node):not(.network):not(.customShape),
.context-menu_leftClick,
.context-menu_freeSelect,
.context-menu_mainDiv,
.context-menu_conn {
  background: rgba(28, 40, 33, 0.82) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.45) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

/* Bootstrap dropdown-based menus (#context-menu .dropdown-menu and Angular).
   NO overflow:hidden here — #capture-menu and #stop-menu sub-panels are
   absolutely positioned children that fly outside the dropdown bounds;
   overflow:hidden would clip/hide them. */
#context-menu .dropdown-menu,
.angular-bootstrap-contextmenu .dropdown-menu {
  background: rgba(28, 40, 33, 0.82) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.45) !important;
  border-radius: 8px !important;
  /* unetlab.css sets overflow-y:auto on #context-menu>ul; per CSS spec this
     coerces overflow-x to auto too, clipping #capture-menu / #stop-menu when
     JS moves them to left:-150px. Force visible to allow sub-panels to fly out. */
  overflow: visible !important;
}

/* Sub-panels that fly out of the main dropdown:
   #capture-menu (unetlab.css: background:white) and
   #stop-menu (no background, appears as bare list over canvas).
   These are absolutely positioned by JS to left:-150 or right:-150
   relative to their parent <li>.
   NO backdrop-filter — jQuery's progress callback fires on every frame
   during the toggle animation, forcing layout reflows; backdrop-filter
   recompositing on each of those frames causes visible jitter.
   Solid background + CSS entrance animation gives smooth open instead. */
#capture-menu,
#stop-menu {
  background: rgba(22, 35, 28, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 6px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 32px rgba(0, 0, 0, 0.50) !important;
  transform: translateZ(0);
  animation: submenuIn 0.14s ease forwards;
}

@keyframes submenuIn {
  from { opacity: 0; transform: translateX(-4px) scale(0.97); }
  to   { opacity: 1; transform: translateX(0)    scale(1);    }
}

#capture-menu ul li a,
#stop-menu ul li a {
  color: #e8f0ec !important;
  display: block;
  padding: 4px 10px;
}

#capture-menu ul li:hover,
#stop-menu ul li:hover {
  background-color: rgba(37, 51, 44, 0.85) !important;
}

#capture-menu ul li:hover a,
#stop-menu ul li:hover a {
  color: #ffffff !important;
}

/* App.ContextMenu menus (node label / link right-click).
   Rendered as React components with className="box_shadow box_border"
   and inline style="background:white; color:#0066aa".
   CSS !important overrides inline styles. */
.box_shadow.box_border {
  background: rgba(28, 40, 33, 0.85) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 8px !important;
  color: #e8f0ec !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.45) !important;
}

/* Inputs inside App.ContextMenu (node size, rotate, etc.) */
.box_shadow.box_border input[type="number"],
.box_shadow.box_border input[type="text"] {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #e8f0ec !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Buttons/actions inside App.ContextMenu */
.box_shadow.box_border .button {
  color: #e8f0ec !important;
}
.box_shadow.box_border .button:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
}

/* Mirror sheen overlay — diagonal bright-top → dark-bottom */
.context-menu:not(.node):not(.network):not(.customShape)::before,
.context-menu_leftClick::before,
.context-menu_freeSelect::before,
.context-menu_mainDiv::before,
.context-menu_conn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.02) 45%,
    rgba(0, 0, 0, 0.05) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Keep menu content above sheen layer */
.context-menu:not(.node):not(.network):not(.customShape) > *,
.context-menu_leftClick > *,
.context-menu_freeSelect > *,
.context-menu_mainDiv > *,
.context-menu_conn > * {
  position: relative;
  z-index: 1;
}

/* Header strip: solid dark bar at top of menu */
#context-menu .dropdown-header,
.context-menu_leftClick .dropdown-header,
.context-menu_freeSelect .dropdown-header,
.context-menu_mainDiv .dropdown-header,
.context-menu_conn .dropdown-header {
  background-color: rgba(15, 25, 19, 0.70) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-radius: 6px 6px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

/* Dividers */
.context-menu_leftClick hr,
.context-menu_freeSelect hr,
.context-menu_mainDiv hr,
.context-menu_conn hr,
#context-menu .dropdown-menu .divider,
.angular-bootstrap-contextmenu .dropdown-menu .divider {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Option link text — light on glass */
#context-menu .dropdown-menu > li > a,
#context-menu .dropdown-menu > li > label,
#context-menu .dropdown-menu li label,
.context-menu__link_leftClick,
.context-menu_leftClick a,
.context-menu_leftClick label,
.context-menu__link_freeSelect,
.context-menu_freeSelect a,
.context-menu_freeSelect label,
.context-menu__link_mainDiv,
.context-menu_mainDiv a,
.context-menu_mainDiv label,
.context-menu__link_conn,
.context-menu_conn a,
.context-menu_conn label,
.context-menu__link,
.context-menu:not(.node):not(.network):not(.customShape) a,
.context-menu:not(.node):not(.network):not(.customShape) label {
  color: #e8f0ec !important;
}

/* Hover: solid dark-green highlight row */
#context-menu .dropdown-menu > li > a:hover,
#context-menu .dropdown-menu > li:hover > a,
#context-menu .dropdown-menu > li:hover > label,
.context-menu__link_leftClick:hover,
.context-menu__link_freeSelect:hover,
.context-menu__link_mainDiv:hover,
.context-menu__link_conn:hover,
.context-menu__link:hover,
.context-menu_leftClick li:hover > label,
.context-menu_mainDiv li:hover > label {
  background-color: rgba(37, 51, 44, 0.85) !important;
  color: #ffffff !important;
}

/* Inline code text */
#context-menu code {
  color: #a8d5b5 !important;
}

/* =============================================
   NODE / OBJECT RIGHT-CLICK MENU — white Apple-glass
   ---------------------------------------------------------------
   #context-menu .dropdown-menu is the Bootstrap-dropdown popup built by
   printContextMenu()/createContextMenu() — the node right-click menu
   ("Switch (1)" header → Start / Stop ▶ / Wipe / Capture ▶ / Edit …), plus
   the "Add an object", "Setup Nodes" and "Background" sidebar popups and the
   shape/text object menus. Recoloured from the dark-green scheme above to the
   same white frosted-glass palette as the Add Node modal & sibling white
   modals (bg rgba(255,255,255,.x), blur(30px) saturate(180%), #1d1d1f text,
   #3c708a accent). Its fly-out sub-panels (#stop-menu / #capture-menu) match.
   These rules sit AFTER the dark grouped block, so source order wins.
   Scoped to #context-menu only — the div-based .context-menu_* menus and the
   Angular menu keep the dark theme.
   ============================================= */
#context-menu .dropdown-menu {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 12px 40px rgba(0, 0, 0, 0.28) !important;
  color: #1d1d1f !important;
}

/* Header strip — node name (e.g. "Switch (1)"), accent-tinted glass bar */
#context-menu .dropdown-menu .dropdown-header,
#context-menu .dropdown-header {
  background: rgba(60, 112, 138, 0.10) !important;
  color: #1d1d1f !important;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Item link / label text — dark on white glass */
#context-menu .dropdown-menu > li > a,
#context-menu .dropdown-menu li a,
#context-menu .dropdown-menu > li > label,
#context-menu .dropdown-menu li label {
  color: #1d1d1f !important;
}

/* Hover row — soft EVE-blue tint + accent text */
#context-menu .dropdown-menu > li > a:hover,
#context-menu .dropdown-menu > li:hover > a,
#context-menu .dropdown-menu li a:hover,
#context-menu .dropdown-menu > li:hover > label,
#context-menu .dropdown-menu li label:hover {
  background: rgba(60, 112, 138, 0.12) !important;
  color: #14516e !important;
}

/* Glyph icons — muted grey, accent on hover */
#context-menu .dropdown-menu .glyphicon,
#context-menu .dropdown-menu .fa { color: #515154 !important; }
#context-menu .dropdown-menu li a:hover .glyphicon,
#context-menu .dropdown-menu li a:hover .fa,
#context-menu .dropdown-menu li:hover > a .glyphicon { color: #14516e !important; }

/* Dividers + header text on dark scheme overridden to light scheme */
#context-menu .dropdown-menu .divider {
  background-color: rgba(0, 0, 0, 0.08) !important;
  border: 0 !important;
}

/* Inline code text (e.g. capture command) */
#context-menu .dropdown-menu code { color: #3c708a !important; }

/* The inline size (px) number field row */
#context-menu .dropdown-menu input {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
#context-menu .dropdown-menu .box_flex { color: #1d1d1f !important; }

/* --- Fly-out sub-panels: Stop (#stop-menu) and Capture (#capture-menu) ---
   White frosted glass. NO backdrop-filter — jQuery's per-frame progress
   callback during the toggle reflow makes backdrop-filter recompositing
   jitter; a near-solid frosted white + the submenuIn keyframe gives a smooth,
   clearly-visible flyout instead. Overrides the dark rules above by source
   order. */
#context-menu #stop-menu,
#context-menu #capture-menu,
#stop-menu,
#capture-menu {
  background: rgba(252, 253, 254, 0.97) !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
  border-radius: 8px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 34px rgba(0, 0, 0, 0.30) !important;
}
#stop-menu ul li a,
#capture-menu ul li a { color: #1d1d1f !important; }
#stop-menu ul li:hover,
#capture-menu ul li:hover { background-color: rgba(60, 112, 138, 0.12) !important; }
#stop-menu ul li:hover a,
#capture-menu ul li:hover a,
#stop-menu ul li a:hover,
#capture-menu ul li a:hover { color: #14516e !important; }
#stop-menu .glyphicon,
#capture-menu .glyphicon { color: #515154 !important; }
#stop-menu li a:hover .glyphicon,
#capture-menu li a:hover .glyphicon { color: #14516e !important; }

/* --- Smooth open: fade + settle for the menu and its fly-outs ------------
   The main menu has NO entrance animation — printContextMenu() appends it and
   then repositions it to the cursor, so it pops (and the reposition can flash).
   A short opacity+settle keyframe masks the jump and gives a smooth open.
   #context-menu is removed & re-created on every right-click, so the
   animation re-runs each time. Fill mode is the default (none) — no transform
   lingers after it finishes, so it never becomes a containing block that would
   shift the absolutely-positioned #stop-menu / #capture-menu fly-outs. */
#context-menu .dropdown-menu {
  transform-origin: top left;
  animation: pnqCtxIn 0.17s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
@keyframes pnqCtxIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Fly-out sub-panels open smoothly as ONE unit.
   ROOT-CAUSE of the sub-menu jitter: actions.js reveals the initially
   display:none anchors with `$('#capture-menu li a').toggle('fast')`, which
   animates EACH <a> from width/height 0 over 200ms — every frame reflows the
   panel as the rows grow. We can't drop the toggle (it's what flips the rows
   from display:none → block), but we lock the animatable geometry + opacity on
   the anchors with !important so jQuery's per-row size/opacity tween has no
   visible effect. The only motion left is the container's submenuIn keyframe,
   so the whole panel fades + slides in cleanly. (opacity:1!important on the
   ANCHORS is safe — it's the CONTAINER's keyframe that does the fade; child
   opacity is relative to the fading parent.) */
#stop-menu li a,
#capture-menu li a,
#stop-menu li,
#capture-menu li {
  opacity: 1 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
}
#stop-menu,
#capture-menu {
  transform-origin: top center;
  animation: pnqSubIn 0.16s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  will-change: opacity, transform;
}
@keyframes pnqSubIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Sub-menu trigger chevrons (Stop ▶ / Capture ▶) — click-through.
   actions.js delegates the toggle to BOTH the <a> AND its <i> chevron
   (`'.menu-appear, .menu-appear i'`) with no stopPropagation, so a click on
   the icon matches the selector twice and fires the toggle twice
   (open→close instantly = the "too sensitive" flicker), while a click on the
   label text fires once. pointer-events:none on the chevron makes every click
   hit the <a>, so the handler runs exactly once whether you hit the text or
   the arrow. */
.menu-appear > i,
.menu-stop-appear > i {
  pointer-events: none !important;
}

/* =============================================
   MAIN VIEW TOPBAR — frosted glass navbar
   .menu = fixed top bar (position:fixed, height:60px, z-index:1000)
   backdrop-filter blurs page content scrolling beneath it.
   ::before adds a top-lit horizontal sheen (bright top → fade down).
   ============================================= */

.menu {
  background: rgba(28, 40, 33, 0.78) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 4px 24px rgba(0, 0, 0, 0.30) !important;
  position: relative !important;
}

.menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 60%,
    rgba(0, 0, 0, 0.04) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Keep all navbar children above the sheen layer */
.menu > * {
  position: relative;
  z-index: 1;
}

/* Desktop: menu_frame is transparent — it's just a flex row holding nav items.
   The parent .menu provides the glass. Giving menu_frame its own opaque
   background would block the glass from showing behind the nav items. */
.menu_expand_lg .menu_frame {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-right: none !important;
}

/* Mobile (<768px): menu_frame becomes a full-height position:fixed slide-out
   panel — needs its own glass background since it sits over page content. */
@media only screen and (max-width: 768px) {
  .menu_expand_lg .menu_frame {
    background: rgba(28, 40, 33, 0.88) !important;
    backdrop-filter: blur(18px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
  }
}

/* =============================================
   MAIN VIEW TOPBAR — dropdown panels (glass)
   .menu_group = Running Labs, Accounts, System, etc.
   Bundle injects background-color:#fff via <style> tag after our <link>;
   backdrop-filter + semi-transparent bg override it.
   ============================================= */

.menu_group {
  background: rgba(28, 40, 33, 0.82) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
  color: #ffffff !important;
}

.menu_group a,
.menu_group .menu_item,
.menu_group .menu_item a,
.menu_group li,
.menu_group li a {
  color: #ffffff !important;
}

/* Single hover on the link only. The base CSS puts 10px padding on the <li> but
   leaves the <a> inline (only as wide as its text), so highlighting BOTH the li
   and the a produced a double band, and the padding area around the small inline
   <a> was highlighted-but-not-clickable (misclicks). Move the padding onto a
   block-level <a> so the highlight == the clickable row, and highlight only <a>. */
.menu_group .menu_item,
.menu_group li.menu_item { padding: 0 !important; }
.menu_group .menu_item > a,
.menu_group li > a { display: block !important; padding: 10px !important; }
.menu_group .menu_item:hover,
.menu_group li:hover { background-color: transparent !important; }
.menu_group .menu_item > a:hover,
.menu_group a:hover {
  background-color: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
}

.menu_item_active,
.menu_item.active {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

.menu_group hr,
.menu_group .divider {
  border-color: rgba(255, 255, 255, 0.18) !important;
}

/* =============================================
   UNIVERSAL — filter bar (table pages)
   ============================================= */

.filter_bar {
  background: rgba(28, 40, 33, 0.82) !important;
  backdrop-filter: blur(12px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
}

/* =============================================
   BOOTSTRAP btn-primary
   ============================================= */

.btn-primary {
  background-color: #25332c !important;
  border-color: #25332c !important;
  color: #fff !important;
}

.btn-primary:hover {
  background-color: #2e3e35 !important;
  border-color: #2e3e35 !important;
  color: #fff !important;
}

.btn-primary:focus,
.btn-primary.focus {
  background-color: #2e3e35 !important;
  border-color: #2e3e35 !important;
  box-shadow: 0 0 0 0.2rem rgba(37, 51, 44, 0.45) !important;
}

.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
  background-color: #1c2720 !important;
  border-color: #1c2720 !important;
  color: #fff !important;
}

.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus,
.show > .btn-primary.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 51, 44, 0.45) !important;
}

.btn-primary.disabled,
.btn-primary:disabled {
  background-color: #25332c !important;
  border-color: #25332c !important;
  opacity: 0.65;
}

/* =============================================
   BOOTSTRAP btn-info
   ============================================= */

.btn-info {
  background-color: #25332c !important;
  border-color: #25332c !important;
  color: #fff !important;
}

.btn-info:hover {
  background-color: #2e3e35 !important;
  border-color: #2e3e35 !important;
  color: #fff !important;
}

.btn-info:focus,
.btn-info.focus {
  background-color: #2e3e35 !important;
  border-color: #2e3e35 !important;
  box-shadow: 0 0 0 0.2rem rgba(37, 51, 44, 0.45) !important;
}

.btn-info:not(:disabled):not(.disabled):active,
.btn-info:not(:disabled):not(.disabled).active,
.show > .btn-info.dropdown-toggle {
  background-color: #1c2720 !important;
  border-color: #1c2720 !important;
  color: #fff !important;
}

.btn-info:not(:disabled):not(.disabled):active:focus,
.btn-info:not(:disabled):not(.disabled).active:focus,
.show > .btn-info.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 51, 44, 0.45) !important;
}

.btn-info.disabled,
.btn-info:disabled {
  background-color: #25332c !important;
  border-color: #25332c !important;
  opacity: 0.65;
}

/* =============================================
   MODALS — frosted glass
   .modal-content blurs the dark backdrop + topology.
   Modal ID is makeId() (runtime random) so targeted
   by class, not ID. Covers Add Node, Edit Node, all
   Bootstrap modals in the topology page.
   ============================================= */

.modal-content {
  background: rgba(22, 35, 28, 0.55) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.55) !important;
}

/* Section dividers within glass modal */
.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}
.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
}

/* Body text on dark glass */
.modal-body {
  color: #e8f0ec !important;
}
.modal-body label,
.modal-body .control-label {
  color: #b8d0be !important;
}

/* Form controls on dark glass */
.modal-body .form-control,
.modal-body input[type="text"],
.modal-body input[type="number"],
.modal-body textarea {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #e8f0ec !important;
  border-color: rgba(255, 255, 255, 0.20) !important;
}
.modal-body .form-control:focus {
  border-color: rgba(255, 255, 255, 0.40) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10) !important;
}

/* Native <select> in modals — Chrome ignores background override without
   -webkit-appearance:none (browser UA stylesheet wins, leaving native
   white bg while our color:#e8f0ec makes text look white-on-white). */
.modal-body select,
.modal-body select.input {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: rgba(30, 42, 36, 0.80) !important;
  color: #e8f0ec !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 4px !important;
  padding: 6px 28px 6px 8px !important;
}
.modal-body select:focus,
.modal-body select.input:focus {
  border-color: rgba(255, 255, 255, 0.45) !important;
  outline: none !important;
}

/* =============================================
   ADD NODE MODAL — node list table + dropdowns
   lab.js hard-codes #0d274d; override here
   ============================================= */

.table .main_table th {
  background: #25332c !important;
  background-color: #25332c !important;
  color: #fff !important;
}

.table .main_table tr:hover {
  box-shadow: 0 0 4px #25332c !important;
}

.bootstrap-select .dropdown-menu li.active > a,
.bootstrap-select .dropdown-menu li.selected > a,
.bootstrap-select .dropdown-menu li.active.selected > a {
  background-color: #25332c !important;
  color: #fff !important;
}

.bootstrap-select .dropdown-menu li a span.text {
  color: inherit;
}

.ui-select-choices-row.active > span,
.ui-select-choices-row:hover > span {
  background-color: #25332c !important;
  color: #fff !important;
}

#form-node-add .modal-header,
.modal-header {
  background-color: #25332c !important;
}

.modal-title {
  color: #ffffff !important;
  /* style.css sets border-bottom:2px solid #0066aa — remove it */
  border-bottom: none !important;
}

/* style.css sets .modal-body h4 and .modal-body .modal-title to #0066aa.
   Those selectors are more specific than .modal-body alone, so override
   each heading level explicitly. */
.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4,
.modal-body h5,
.modal-body h6,
.modal-body p {
  color: #e8f0ec !important;
}

.modal-body .error {
  color: #f4a4a4 !important;
}

/* =============================================
   BOOTSTRAP SELECT — global (outside modals)
   Dark green text on white background.
   ============================================= */

.bootstrap-select .dropdown-menu li a,
.bootstrap-select .dropdown-menu li a span.text,
.bootstrap-select .dropdown-menu li a span.bs-ok-default {
  color: #25332c !important;
}

.bootstrap-select > .dropdown-toggle .filter-option-inner-inner {
  color: #25332c !important;
}

/* =============================================
   BOOTSTRAP SELECT — inside modals (glass bg)
   Light text on dark glass. Higher specificity
   overrides the global dark-text rules above.
   ============================================= */

/* Glass dropdown panel */
.modal .bootstrap-select .dropdown-menu {
  background: rgba(22, 35, 28, 0.92) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45) !important;
}

/* Trigger button — dark glass so text is clearly readable */
.modal .bootstrap-select > .dropdown-toggle {
  background: rgba(30, 42, 36, 0.80) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #e8f0ec !important;
}
.modal .bootstrap-select > .dropdown-toggle .filter-option-inner-inner {
  color: #e8f0ec !important;
}

/* Item text — light on dark */
.modal .bootstrap-select .dropdown-menu li a,
.modal .bootstrap-select .dropdown-menu li a span.text,
.modal .bootstrap-select .dropdown-menu li a span.bs-ok-default {
  color: #e8f0ec !important;
}

/* Search box */
.modal .bootstrap-select .bs-searchbox input {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #e8f0ec !important;
  border-color: rgba(255, 255, 255, 0.20) !important;
}

/* General modal dropdown links (non-Bootstrap-Select) */
.modal .dropdown-menu > li > a,
.modal-body .dropdown-menu > li > a {
  color: #e8f0ec !important;
}

.bootstrap-select .dropdown-menu li a:hover,
.bootstrap-select .dropdown-menu li.selected a,
.bootstrap-select .dropdown-menu li.active a {
  background-color: #25332c !important;
  color: #fff !important;
}

.bootstrap-select .dropdown-menu > li.active > a,
.bootstrap-select .dropdown-menu > li.active > a:hover,
.bootstrap-select .dropdown-menu > li.active > a:focus,
.bootstrap-select .dropdown-menu > li > a:hover,
.bootstrap-select .dropdown-menu > li > a:focus {
  background-color: #25332c !important;
  color: #ffffff !important;
}

/* span.text hover fix — #25332c !important on span wins over inherited
   color from parent <a> hover; must be overridden explicitly */
.bootstrap-select .dropdown-menu > li > a:hover span.text,
.bootstrap-select .dropdown-menu > li > a:hover span.bs-ok-default,
.bootstrap-select .dropdown-menu > li > a:focus span.text,
.bootstrap-select .dropdown-menu > li > a:focus span.bs-ok-default,
.bootstrap-select .dropdown-menu > li.active > a span.text,
.bootstrap-select .dropdown-menu > li.active > a span.bs-ok-default,
.bootstrap-select .dropdown-menu > li.active > a:hover span.text,
.bootstrap-select .dropdown-menu > li.active > a:hover span.bs-ok-default {
  color: #ffffff !important;
}

/* =============================================
   MODAL — Cancel / dismiss button text fix
   .btn without a colour modifier inherits the
   light #e8f0ec text from .modal-body, making it
   invisible on the default white/light button bg.
   Target [data-dismiss="modal"]:not(.close) to
   hit Cancel buttons but skip the × close icon.
   ============================================= */

.modal-content [data-dismiss="modal"]:not(.close) {
  color: #1e2d24 !important;
}

/* =============================================
   SYSTEM STATUS MODAL
   React component renders the stats card as
   <div class="box_padding box_shadow" style="background:white">
   CSS !important overrides the inline style.
   ============================================= */

/* Main stats card — rendered directly inside .modal-content (no .modal-body
   wrapper), with inline style="background:white". !important overrides inline.
   Use a very subtle white tint instead of a second dark layer so the modal
   glass background shows through uniformly — no compounded opacity. */
.modal-content .box_padding.box_shadow {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #f0f5f1 !important;
}

/* tbody / table — fully transparent so glass shows through */
.modal-content .box_padding.box_shadow tbody,
.modal-content .box_padding.box_shadow table {
  background: transparent !important;
  color: #f0f5f1 !important;
}

/* Node count table cells */
.modal-content .table_total_node td,
.modal-content .table_total_node th {
  color: #dce8df !important;
  font-size: 0.92em;
}

/* "Total Nodes" section heading — keep the teal color, just ensure it shows */
.modal-content .box_padding.box_shadow [style*="color:#2cc185"],
.modal-content .box_padding.box_shadow [style*="color: rgb(44, 193, 133)"] {
  color: #2cc185 !important;
}

/* Donut chart text labels — plain divs below each circle */
.modal-content .box_padding.box_shadow .col-md-3,
.modal-content .box_padding.box_shadow .col-xs-6,
.modal-content .box_padding.box_shadow .col-xs-2 {
  color: #f0f5f1 !important;
}

/* "Total: X" bold labels under each chart */
.modal-content .box_padding.box_shadow b,
.modal-content .box_padding.box_shadow strong {
  color: #ffffff !important;
}

/* Donut chart center overlay — percentage h5 and "CPU Used" label */
.modal-content .box_padding.box_shadow h5 {
  color: #ffffff !important;
  font-size: 1.3em !important;
  margin: 2px 0 !important;
}
.modal-content .box_padding.box_shadow .p-chart ~ .box_flex div,
.modal-content .box_padding.box_shadow .p-chart ~ .box_flex h5 {
  color: #ffffff !important;
}

/* "Running Nodes" section — injected CSS sets background:#ecf0f5 */
.modal-content .box_runningnodes {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #f0f5f1 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
.modal-content .col_runningnodes,
.modal-content .col_runningnodes * {
  color: #f0f5f1 !important;
}

/* Table rows / cells inside the node list */
.modal-content .box_padding.box_shadow .table td,
.modal-content .box_padding.box_shadow .table th {
  color: #dce8df !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
.modal-content .box_padding.box_shadow .table > tbody > tr:hover > td {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* =============================================
   MAIN VIEW (/admin/main/view) — Workspace subheader bar
   AngularJS template sets inline style="background:aliceblue; border-bottom:solid #ccc"
   CSS !important overrides inline styles.
   Keep the aliceblue identity but make it semi-transparent so the
   frosted glass effect shows through.
   ============================================= */

.box-header.with-border {
  background: rgba(240, 248, 255, 0.75) !important;
  backdrop-filter: blur(12px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(130%) !important;
  border-bottom: 1px solid rgba(150, 190, 220, 0.40) !important;
  box-shadow: 0 1px 8px rgba(100, 160, 210, 0.12) !important;
}

/* =============================================
   STARTUP CONFIGS / PICTURES MODAL
   addModalWide popup — config-list (left) + config editor (right)
   ============================================= */

/* Startup Configs modal uses addModalWide (.modal-wide class).
   Match the effective opacity of System Status by applying the same
   near-transparent white tint to the body content area. */
.modal.modal-wide .modal-content {
  background: rgba(22, 35, 28, 0.48) !important;
}

/* =============================================
   LIST OF NODES modal (.modal.modal-wide)
   Config Nodes popup — configured-nodes table.
   Issues: tbody was opaque white; inputs without
   type attr missed by the generic input[type=text]
   rule.
   ============================================= */

/* tbody was solid white — make transparent so glass shows through */
.modal.modal-wide .modal-body tbody {
  background: transparent !important;
}

.modal.modal-wide .modal-body .configured-nodes td {
  color: #e8f0ec !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}

.modal.modal-wide .modal-body .configured-nodes tbody tr:hover td {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Inputs with no type attribute (class="input") —
   input[type="text"] selector misses these */
.modal-body input.input,
.modal-body input:not([type]):not([type="checkbox"]):not([type="radio"]) {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #e8f0ec !important;
  border: 1px solid rgba(255, 255, 255, 0.20) !important;
  border-radius: 3px !important;
}

/* Node links in config list — light readable text on dark glass */
.modal-body .config-list a,
.modal-body .config-list a:link,
.modal-body .config-list a:visited,
.modal-body .picture-list a,
.modal-body .picture-list a:link,
.modal-body .picture-list a:visited {
  color: #b8d0be !important;
}

.modal-body .config-list a:hover,
.modal-body .config-list a:active,
.modal-body .picture-list a:hover,
.modal-body .picture-list a:active {
  color: #ffffff !important;
}

/* Selected node in config list — was #18407b dark blue */
.action-configget.selected,
.action-pictureget.selected {
  background-color: rgba(37, 51, 44, 0.90) !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18) !important;
}

/* "Change All" top row and per-node dividers */
.modal-body .config-list li hr,
.modal-body .picture-list li hr {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* .absolute-right — white badge container wrapping toggle+flash icon.
   rgba(255,255,255,0.8) shows as a bright white bar on dark glass. */
.absolute-right {
  background-color: rgba(28, 40, 33, 0.70) !important;
}

/* "Change All" row separator (inline border-bottom style) */
.row-config-list li:first-child,
.row-config-list > ul > li:first-child {
  border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

/* "Change All" / config list text */
.row-config-list,
.config-list .box_flex {
  color: #b8d0be !important;
}

/* ---- React action bar (top row of startup-configs modal) ----
   lab.js renders <div class="row" style="color:#337ab7"> directly inside
   .row-config-list. The path is: .row-config-list > div (React root, no class)
   > .row (wrapper) > .row (the coloured action bar).
   CSS !important overrides inline styles. */
.row-config-list > div > .row > .row {
  color: #e8f0ec !important;
}

/* Config selector dropdown button */
.row-config-list .dropdown-toggle.input,
.row-config-list .button.input.dropdown-toggle {
  background: rgba(30, 42, 36, 0.80) !important;
  color: #e8f0ec !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 4px !important;
}

/* Config selector dropdown menu */
.row-config-list .dropdown-menu {
  background: rgba(22, 35, 28, 0.92) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.40) !important;
}
.row-config-list .dropdown-menu .dropdown-item {
  color: #e8f0ec !important;
}
.row-config-list .dropdown-menu .dropdown-item:hover {
  background: rgba(37, 51, 44, 0.85) !important;
  color: #ffffff !important;
}

/* Separator line between action bar and node list */
.row-config-list > div > .row > hr {
  border-color: rgba(255, 255, 255, 0.12) !important;
  margin: 4px 15px !important;
}

/* ---- Config editor (right panel) ---- */

/* Config textarea */
#nodeconfig {
  background: rgba(22, 35, 28, 0.90) !important;
  color: #e8f0ec !important;
  border-color: rgba(255, 255, 255, 0.20) !important;
  font-family: 'Courier New', Courier, monospace !important;
}
#nodeconfig:focus {
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10) !important;
}

/* ACE editor toolbar selects */
#ace_mode,
#ace_themes,
#ace_font-size {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: rgba(30, 42, 36, 0.80) !important;
  color: #e8f0ec !important;
  border: 1px solid rgba(255, 255, 255, 0.20) !important;
  border-radius: 4px !important;
  padding: 2px 24px 2px 6px !important;
}

/* Editor icon separators (.mlr-10 — was #0066aa blue) */
.mlr-10 {
  color: #b8d0be !important;
}

/* "Ace Editor" label text */
#ace-conf-panel,
.configs-align {
  color: #b8d0be !important;
}

/* Config form hr divider */
hr.config-line {
  border-color: rgba(255, 255, 255, 0.12) !important;
  margin: 6px 0 !important;
}

/* ---- Checkbox toggle sliders ---- */
/* The track (background) — make it semi-transparent glass instead of white */
.checkbox-slider-off,
.checkbox-slider-on {
  background-color: rgba(255, 255, 255, 0.18) !important;
}
input:checked + .checkbox-slider-off,
input:checked + .checkbox-slider-on {
  background-color: rgba(255, 255, 255, 0.22) !important;
}
input:disabled + .checkbox-slider-off,
input:disabled + .checkbox-slider-on {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* =============================================
   LOGIN PAGE — dark-green atmospheric theme
   React bundle injects .background_cover blue
   gradient and .offline_login_input styles via
   <style> tag; our !important rules override them.
   ============================================= */

/* Datacenter photo with green colour grade + vignette overlay.
   Photo is pre-processed (green-tinted to match topbar rgb(28,40,33)).
   Radial vignette darkens edges and corners so the central card reads
   clearly against the photo, exactly like CloudLabBox's layout. */
.background_cover {
  /* Matched to the quickbar (#pnetlab-quickbar): same rgb(28,40,33) base and
     the same 160deg sheen direction (light-green top-left → dark bottom-right),
     so the login page reads as the same glass theme. The centre vignette keeps
     the login card legible over the (green-graded) datacenter photo. */
  background-color: rgb(28, 40, 33) !important;
  background-image:
    /* overlay darkness reduced 25% (alpha ×0.75) — lighter login background */
    linear-gradient(160deg, rgba(56, 76, 64, 0.34) 0%, rgba(28, 40, 33, 0.32) 50%, rgba(12, 18, 15, 0.47) 100%),
    radial-gradient(ellipse 72% 66% at 50% 48%, transparent 20%, rgba(20, 29, 24, 0.54) 100%),
    url('/store/public/assets/auth/img/datacenter_bg.jpg') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* Login card — frosted glass panel.
   Scoped via .background_cover sibling combinator: only the login page
   renders .background_cover, so this never fires on admin SPA pages.
   (.main .box_flex:not(.box_padding)>div was too broad — it matched every
    inline-div child of any flex row throughout the admin UI.) */
.background_cover ~ .box_flex:not(.box_padding) > div {
  /* Transparent frosted gradient (160deg green sheen, matches the page overlay /
     quickbar) — lets the green photo show through as glass instead of a flat
     green tint; darker top/bottom keep the white text legible. */
  background: linear-gradient(160deg,
      rgba(56, 76, 64, 0.40) 0%,
      rgba(28, 40, 33, 0.22) 50%,
      rgba(12, 18, 15, 0.42) 100%) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 16px !important;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  padding: 40px 44px 36px !important;
}

/* Top bar separator — login page only */
.background_cover ~ .box_flex.box_padding {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
}

/* Login button — scoped to login page via .background_cover sibling */
.background_cover ~ .box_flex .btn-info,
.background_cover ~ .box_flex ~ .box_flex .btn-info {
  background: #25332c !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
}
.background_cover ~ .box_flex .btn-info:hover,
.background_cover ~ .box_flex ~ .box_flex .btn-info:hover {
  background: #2e3e35 !important;
}

/* Input fields — glass style matching modal inputs */
.offline_login_input {
  background: rgba(255, 255, 255, 0.10) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  padding: 10px 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  font-size: 14px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.offline_login_input:focus {
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(37, 51, 44, 0.35) !important;
  outline: none !important;
}

.offline_login_input::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* =============================================
   ADD / EDIT LAB MODAL — AngularJS file manager
   Uses custom PNetLab classes not covered by the
   Bootstrap .form-control / .modal-body input rules.
   Structure: .modal-content > .row > .col-md-6
     .input_item_text  — field label
     .input_item_input — input / textarea
     .input_item_option — permission radio-like buttons
   ============================================= */

/* Field inputs and textareas */
.modal-content .input_item_input {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #e8f0ec !important;
  border: 1px solid rgba(255, 255, 255, 0.20) !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
}
.modal-content .input_item_input:focus {
  border-color: rgba(255, 255, 255, 0.42) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08) !important;
  outline: none !important;
}
/* Read-only textareas (permission user lists) */
.modal-content .input_item_input[readonly] {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #b8d0be !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}

/* Field labels */
.modal-content .input_item_text {
  color: #b8d0be !important;
}

/* Permission option buttons (Admin Only / Everyone / Admin and Special users).
   [select="true"] = currently selected option. */
.modal-content .input_item_option {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #c8dace !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
  margin: 2px 0 !important;
}
.modal-content .input_item_option[select="true"] {
  background: rgba(37, 51, 44, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}
.modal-content .input_item_option:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

/* Close / secondary button in modal footer */
.modal-content .btn-secondary,
.modal-content .btn-default:not(.btn-primary):not(.btn-info):not(.btn-danger) {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #e8f0ec !important;
}
.modal-content .btn-secondary:hover,
.modal-content .btn-default:not(.btn-primary):not(.btn-info):not(.btn-danger):hover {
  background: rgba(255, 255, 255, 0.20) !important;
  color: #ffffff !important;
}

/* =============================================
   HIDE DOWNLOAD LABS nav item
   External link to user.pnetlab.com (null-routed to 127.0.0.1).
   :has() targets the <li> that wraps the link so no empty gap remains.
   ============================================= */
.menu_item:has(> a[href*="user.pnetlab.com"]) {
  display: none !important;
}

/* =============================================
   TOPOLOGY QUICK-ACTION BAR
   Persistent centred floating bar on the topology
   canvas page (/legacy/topology). Contains all
   actions from the "Setup Nodes" sidebar popup.
   Buttons carry the same action classes as the
   sidebar items so existing actions.js handlers
   fire via jQuery event delegation.
   ============================================= */

#pnetlab-quickbar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1850;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 5px 6px 5px 10px;
  overflow: visible;

  /* Frosted glass — same palette as sidebar/modals */
  background: rgba(28, 40, 33, 0.55);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 4px 24px rgba(0, 0, 0, 0.35);
  transition: padding 0.24s ease;
}

/* Diagonal mirror sheen — same motif as sidebar */
#pnetlab-quickbar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(0, 0, 0, 0.04) 100%
  );
  pointer-events: none;
}

/* Buttons wrapper — collapses vertically via max-height.
   overflow is toggled by JS: hidden during animation, visible when
   fully expanded so .pnq-label tooltips below the bar are not clipped. */
#pnq-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
  max-height: 44px;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
  transition: max-height 0.24s ease, opacity 0.20s ease;
}

/* Collapsed state — buttons fold vertically, toggle stays visible on right */
#pnetlab-quickbar.pnq-hidden #pnq-buttons {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

#pnetlab-quickbar.pnq-hidden {
  padding-top: 2px;
  padding-bottom: 2px;
}

/* Shrink the toggle when collapsed so the bar is a slim pill */
#pnetlab-quickbar.pnq-hidden #pnq-toggle {
  height: 16px;
  transition: height 0.24s ease;
}

/* Modal offset: shrinks when bar is collapsed to just clear the small pill */
body:has(#pnetlab-quickbar.pnq-hidden) .modal-dialog {
  margin-top: 46px !important;
}

/* Toggle arrow — far right of the flex row, always visible */
#pnq-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 34px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 4px;
  padding-left: 2px;
  cursor: pointer;
  transition: height 0.24s ease;
  flex-shrink: 0;
  z-index: 1;
}

#pnq-toggle i {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.60);
  pointer-events: none;
  transition: color 0.15s ease;
}

#pnq-toggle:hover {
  border-left-color: rgba(255, 255, 255, 0.30);
}

#pnq-toggle:hover i {
  color: rgba(255, 255, 255, 0.95);
}

/* Each button cell */
.pnq-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.90);
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 1;
}

.pnq-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.pnq-btn:active {
  background: rgba(255, 255, 255, 0.20);
  opacity: 0.85;
}

.pnq-btn i {
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.40);
}

/* Thin divider between groups */
.pnq-btn + .pnq-btn {
  border-left: none;
}

/* Separator before Close Lab button */
.pnq-btn.action-labclose {
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Separator before Add Object group */
.pnq-btn.action-nodeplace {
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Label tooltip — appears below button on hover */
.pnq-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #e8f0ec;
  background: rgba(22, 35, 28, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  padding: 3px 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 9999;
}

.pnq-btn:hover .pnq-label {
  opacity: 1;
}

/* =============================================
   TOPOLOGY — LINE CONTROL BAR + TEXT EDITOR BAR
   Both are position:fixed; top:0 full-width bars.
   Scoped via :has(#pnetlab-quickbar) so these only
   fire on /legacy/topology.
   ============================================= */

@keyframes pnqSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* LINE control bar — white Apple-glass, compact 2-row, centred on screen
   (was a dark full-width bar pinned at top:68 under the quickbar). */
body:has(#pnetlab-quickbar) .line_ctl_frame {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
  max-width: 640px !important;          /* ~4 fields per row → 8 fields wrap to 2 rows */
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28) !important;
  color: #1d1d1f !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  padding: 10px 12px !important;
  animation: none !important;           /* pnqSlideDown animates transform → would fight the centring translate */
}
/* wrap the fields into rows; tidy spacing */
body:has(#pnetlab-quickbar) .line_ctl_frame .box_flex { flex-wrap: wrap !important; gap: 8px 10px; }
body:has(#pnetlab-quickbar) .line_ctl_frame .line_ctl_item { margin: 0 !important; }

body:has(#pnetlab-quickbar) .line_ctl_title {
  color: #515154 !important;
}

body:has(#pnetlab-quickbar) .line_ctl_input {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 4px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
/* line bar buttons (Apply/Cancel): keep coloured primary, plain → light */
body:has(#pnetlab-quickbar) .line_ctl_frame .btn:not(.btn-success):not(.btn-primary):not(.btn-danger):not(.btn-info),
body:has(#pnetlab-quickbar) .line_ctl_frame .button:not(.btn-success):not(.btn-primary) {
  background: rgba(255, 255, 255, 0.70) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 4px !important;
}

/* TEXT editor — CKEditor toolbar: white Apple-glass, centred on screen
   (matches the Add Line bar; was a dark bar pinned at top:68 under quickbar). */
body:has(#pnetlab-quickbar) .ck.ck-editor__top {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
  max-width: 680px !important;
  z-index: 2000 !important;
  animation: none !important;     /* pnqSlideDown animates transform → fights the centring */
}

body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-sticky-panel__content {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif !important;
}

body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-toolbar {
  background: transparent !important;
  border: none !important;
  color: #1d1d1f !important;
}

body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-button,
body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-button__label {
  color: #1d1d1f !important;
}

body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-button:hover {
  background: rgba(60, 112, 138, 0.12) !important;
}

body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-dropdown__button,
body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-dropdown__button .ck-button__label {
  color: #1d1d1f !important;
  background: rgba(255, 255, 255, 0.55) !important;
}

body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-toolbar__separator {
  background: rgba(0, 0, 0, 0.12) !important;
}

/* CKEditor dropdown panels — white glass with dark text */
body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-dropdown__panel {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22) !important;
}

/* List items inside panels (Heading, Font Size, Font Family, etc.) */
body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-dropdown__panel .ck-list__item .ck-button {
  color: #1d1d1f !important;
}
body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-dropdown__panel .ck-list__item .ck-button:hover {
  background: rgba(60, 112, 138, 0.12) !important;
}
body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-dropdown__panel .ck-list__item .ck-button.ck-on {
  background: rgba(60, 112, 138, 0.18) !important;
  color: #1d1d1f !important;
}

/* Icons panel — FontAwesome <i> elements */
body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-dropdown__panel i {
  color: #1d1d1f !important;
}
body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-dropdown__panel i:hover {
  color: #3c708a !important;
  background: rgba(60, 112, 138, 0.12) !important;
  border-radius: 3px;
}

/* Icons search input */
body:has(#pnetlab-quickbar) .ck.ck-editor__top .ck-dropdown__panel input {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 4px !important;
}


/* =============================================================================
   ADD NODE MODAL — EVE-NG PRO LAYOUT (dark-green glass adaptation)
   JS: pnetlab-node-form.js rebuilds #form-node-data into the exact
   33% Main Settings | 67% Additional Settings split from EVE-NG Pro 6.5.
   CSS below adapts EVE-NG's white theme to our dark-green glass palette.
   ============================================================================= */

/* ── Outer layout: 33% left | 67% right (matches EVE-NG .form-layout) ────── */
.pnq-form-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;        /* equal-height columns — fills empty bottom space */
  width: 100%;
  padding: 2px 0;
}

/* Left column — 33% */
.pnq-form-column {
  width: 33%;
  min-width: 0;
  flex-shrink: 0;
  display: flex;
}

/* Right column — 67% */
.pnq-form-column-group {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}

/* ── Bordered card — EVE-NG .field-group → dark glass ─────────────────────── */
.pnq-field-group {
  border: 1px solid rgba(255, 255, 255, 0.20) !important;
  border-radius: 4px;
  padding: 14px;
  background: rgba(28, 40, 33, 0.55) !important;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;             /* fill the column height (equal-height cards) */
  width: 100%;
}

/* Subtle sheen — matches quickbar ::before pattern */
.pnq-field-group::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,0.05) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.pnq-field-group > * {
  position: relative;
  z-index: 1;
}

/* ── Section titles (EVE-NG .group-title) — EVE: 1rem / weight 500 ─────────── */
.pnq-group-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 14px;
  padding-bottom: 6px;
  color: #8ec8a4;                          /* EVE-NG: #3c708a → our mint green */
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  letter-spacing: normal;
}

/* ── Sub-group borders (EVE-NG .qemu-fields-group / .remaining-fields-group) */
.pnq-qemu-group,
.pnq-iface-group {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.pnq-qemu-group:last-child,
.pnq-iface-group:last-child {
  margin-bottom: 0;
}

/* Sub-group field title — EVE-NG style: small, medium-weight, NOT uppercase */
.pnq-field-title {
  font-size: 13px;
  font-weight: 600;
  color: #8ec8a4;
  margin-bottom: 10px;
  letter-spacing: normal;
  text-transform: none;
}

/* ── Row layout (EVE-NG .fields-row) ──────────────────────────────────────── */
.pnq-fields-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
}

.pnq-fields-row:last-child {
  margin-bottom: 0;
}

/* Resource row (CPU / RAM / CPU Limit / Ethernet / NVRAM) wraps if crowded */
.pnq-res-row {
  flex-wrap: wrap;
}
.pnq-res-row .pnq-field-container {
  flex: 1 1 90px;
}

/* ── Auto-fitting grid for Additional Settings misc fields ───────────────────
   The 67%-wide right column auto-flows into as many ~210px columns as fit
   (3 on a full-width modal, 2 when narrower). Keeps field-heavy templates
   (xrd, nxosv9k) inside the viewport with no scroll. */
.pnq-misc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px 10px;
  width: 100%;
}
.pnq-misc-grid .pnq-field-container {
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
}

/* Fixed 2-column grid — used for Console settings in the narrow left column */
.pnq-grid2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  width: 100%;
}
.pnq-grid2col .pnq-field-container {
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
}

/* ── Individual field containers (EVE-NG .field-container) ───────────────── */
.pnq-field-container {
  display: flex !important;
  flex-direction: column !important;
  width: 100%;
  margin-bottom: 10px;
  float: none !important;
  padding: 0 !important;
}

/* Inside a flex row, each field grows equally */
.pnq-fields-row .pnq-field-container {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
}

/* Fixed-width helpers matching EVE-NG field sizes.
   IMPORTANT: must set flex-basis (via the `flex` shorthand), not just `width`.
   The base rule `.pnq-fields-row .pnq-field-container{flex:1 1 0}` sets
   flex-basis:0, which governs the main-axis size and makes plain `width`
   ignored — that collapsed the count field to 0 (its input spilled against the
   card edge, looking "hidden behind the separator"). `flex:0 0 <w>` fixes it. */
.pnq-name-field      { flex: 1 1 auto !important; min-width: 0 !important; }
.pnq-count-field     { flex: 0 0 140px !important; }
.pnq-satellite-field { flex: 1 1 auto !important; min-width: 0 !important; }
.pnq-delay-field     { flex: 0 0 90px !important; }
.pnq-position-field  { flex: 0 0 90px !important; }
.pnq-console-field   { flex: 0 0 200px !important; }

/* ── Field labels — stacked above inputs (EVE-NG .field-title pattern) ────── */
.pnq-field-container label.control-label,
.pnq-field-container .control-label {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  float: none !important;
  padding-right: 0 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #b8d0be !important;
  margin-bottom: 5px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.45;
}

/* Reset-to-default undo icon stays readable */
.pnq-field-container .fa-undo {
  color: #5fa882 !important;
  margin-left: 6px;
}

/* ── Input wrapper — remove Bootstrap flex, let inputs fill width ─────────── */
.pnq-field-container .box_flex {
  display: block !important;
  width: 100% !important;
}

/* ── Inputs, selects, textareas ──────────────────────────────────────────── */
.pnq-field-container input.form-control,
.pnq-field-container input.input,
.pnq-field-container textarea.form-control {
  width: 100% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #e8f0ec !important;
  border-radius: 4px !important;
  font-size: 13px !important;
  padding: 5px 9px !important;
  height: auto !important;
  min-height: 30px;
}

.pnq-field-container textarea.form-control {
  min-height: 54px;
  resize: vertical;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px !important;
  line-height: 1.5;
}

/* Native <select> inputs — needs appearance reset to override browser chrome */
.pnq-field-container select.input {
  width: 100% !important;
  background: rgba(30, 42, 36, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #e8f0ec !important;
  border-radius: 4px !important;
  font-size: 13px !important;
  padding: 5px 9px !important;
  height: 30px !important;
  -webkit-appearance: none;
  appearance: none;
}

/* Icon-picker button (box_flex + form-control + button-style div) */
.pnq-field-container .form-control.input.box_flex {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #e8f0ec !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  min-height: 30px;
  padding: 4px 8px !important;
  cursor: pointer;
}

/* Checkbox — label wraps the input, so reset box_flex to keep it inline */
.pnq-field-container label.control-label input[type="checkbox"].form-control {
  width: 16px !important;
  height: 16px !important;
  min-height: unset;
  display: inline-block !important;
  margin-left: 8px;
  vertical-align: middle;
  accent-color: #5fa882;
}

/* ── Template dropdown subtext (template_id shown in green) ──────────────── */
.modal[style*="z-index: 1048"] .bootstrap-select .dropdown-menu .text-muted,
.modal[style*="z-index: 1048"] .bootstrap-select .dropdown-menu small.text-muted {
  color: #8ec8a4 !important;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px !important;
}

.modal[style*="z-index: 1048"] .bootstrap-select button .text + small {
  color: #8ec8a4 !important;
  font-size: 10px !important;
}

/* "Show all unsupport" checkbox label */
.modal[style*="z-index: 1048"] #form-node-showall {
  color: #b8d0be !important;
  font-size: 11px !important;
}

/* ── Widen the Add Node modal to accommodate two columns ─────────────────── */
.modal[style*="z-index: 1048"] .modal-dialog.modal-lg {
  width: 92vw !important;
  max-width: 1200px !important;
}

/* Modal body padding tighter — columns need the space.
   max-height keeps very field-heavy templates inside the viewport as a
   last-resort fallback; the two-column compact layout means the common
   templates (vios, iol, vpcs, xrd, nxosv9k) fit with no scroll at all. */
.modal[style*="z-index: 1048"] .modal-body {
  padding: 10px 14px !important;
  max-height: calc(100vh - 150px) !important;
  overflow-y: auto !important;
}

/* =============================================================================
   ADD NODE — EVE-NG TEMPLATE PICKER (initial state, before a template is chosen)
   JS (pnetlab-node-form.js) adds `.pnq-pick` to the modal-content + modal-dialog
   while #form-node-template has no value, and removes it once a template is
   selected (the two-column settings form then renders). This turns PNetLab's
   Bootstrap-Select dropdown into EVE-NG's inline, searchable, scrollable
   template list inside a bordered "Template" card.
   Reference: "/tmp/EVE | Topology inside lab add node pop up.html".
   ============================================================================= */

/* Broken header glyph: PNetLab renders <i class="fa fa-add"> but `fa-add` is not
   a real FontAwesome class, so the icon never appears. Map it to the plus glyph. */
.fa-add::before { content: "\f067"; }   /* fa-plus */

/* Narrow the dialog to an EVE-sized card while picking a template */
.modal[style*="z-index: 1048"] .modal-dialog.modal-lg.pnq-pick {
  max-width: 720px !important;
}

/* The Template form-group → bordered EVE "field-group" card */
.pnq-pick .modal-body > .form-group {
  border: 1px solid rgba(140, 200, 164, 0.40);
  border-radius: 6px;
  padding: 14px 16px;
  background: rgba(28, 40, 33, 0.45);
  margin: 0;
}

/* "Template" label → EVE group-title; checkbox stays right-aligned */
.pnq-pick .modal-body > .form-group > label.control-label {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #8ec8a4 !important;
  margin-bottom: 12px !important;
  text-align: left !important;
}
.pnq-pick #form-node-showall {
  font-weight: normal !important;
  margin-top: 2px;
}

/* Hide the dropdown toggle button — the list shows inline instead */
.pnq-pick .bootstrap-select > .dropdown-toggle { display: none !important; }
.pnq-pick .bootstrap-select.form-control {
  height: auto !important;
  width: 100% !important;
  box-shadow: none !important;
}

/* Render the Bootstrap-Select menu inline (static, full width) */
.pnq-pick .bootstrap-select > .dropdown-menu {
  position: static !important;
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  max-height: none !important;
  transform: none !important;
  overflow: visible !important;
}

/* Search box → EVE "Search Templates" field */
.pnq-pick .bootstrap-select .bs-searchbox {
  padding: 0 0 10px 0 !important;
}
.pnq-pick .bootstrap-select .bs-searchbox input {
  width: 100% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #e8f0ec !important;
  border-radius: 4px !important;
  padding: 7px 10px !important;
  font-size: 14px !important;
}

/* The scrollable template list */
.pnq-pick .bootstrap-select .dropdown-menu.inner {
  display: block !important;
  position: static !important;
  width: 100% !important;
  margin: 0 !important;
  max-height: 50vh !important;
  overflow-y: auto !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  background: rgba(0, 0, 0, 0.14) !important;
}
.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a {
  display: flex !important;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e8f0ec !important;
  white-space: normal;
}
.pnq-pick .bootstrap-select .dropdown-menu.inner > li:last-child > a {
  border-bottom: none;
}
.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a:hover,
.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a:focus,
.pnq-pick .bootstrap-select .dropdown-menu.inner > li.active > a {
  background: rgba(140, 200, 164, 0.14) !important;
  color: #ffffff !important;
}
.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a .text {
  color: #e8f0ec !important;
  font-size: 14px;
}
/* template-id subtext in green monospace (already set globally, reinforce here) */
.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a .text small,
.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a small.text-muted {
  color: #8ec8a4 !important;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px !important;
  margin-left: 8px;
}
/* hide the "Nothing selected" placeholder row inside the inline list */
.pnq-pick .bootstrap-select .dropdown-menu.inner > li.pnq-hide-row { display: none !important; }

/* Node icon next to each template name (EVE-style) */
.pnq-tpl-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin-right: 12px;
  flex: 0 0 26px;
  border-radius: 3px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}
/* Row text — EVE list-item-title: weight 500, normal tracking */
.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a .text {
  font-weight: 500;
  letter-spacing: normal;
  font-size: 14px;
}
.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a .text small,
.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a small {
  font-size: 11px !important;
}

/* ── "Back to templates" bar (settings form, Add mode) ───────────────────── */
/* Hide the in-form template dropdown — switching it in place blanks the form */
.pnq-formmode .modal-body > .form-group:has(#form-node-template) {
  display: none !important;
}
.pnq-backbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.pnq-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(140, 200, 164, 0.40);
  color: #cfe6d6;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.pnq-back-btn:hover {
  background: rgba(140, 200, 164, 0.18);
  color: #ffffff;
}
.pnq-back-name {
  font-size: 14px;
  font-weight: 600;
  color: #8ec8a4;
}

/* =============================================================================
   ADD NODE — WHITE APPLE-GLASS THEME
   Recolours the entire Add Node flow (template picker + settings form + inner
   template modals) from the dark-green glass to a light, frosted "white glass"
   (Apple vibrancy) while keeping the backdrop-blur intact. Scoped to
   `.pnq-node-modal` (added by pnetlab-node-form.js to the Add/Edit Node
   modal-content), so the rest of the dark UI is untouched.
   Accent colour: EVE-NG blue #3c708a. Text: Apple near-black #1d1d1f.
   ============================================================================= */

/* ── Modal shell ──────────────────────────────────────────────────────────── */
.modal-content.pnq-node-modal {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 24px 64px rgba(0, 0, 0, 0.28) !important;
  /* EVE uses Roboto; fall back to the platform system font (San Francisco /
     Segoe UI) for a clean, pleasing Apple-style render. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.pnq-node-modal .modal-body,
.pnq-node-modal input,
.pnq-node-modal select,
.pnq-node-modal button,
.pnq-node-modal label,
.pnq-node-modal .bootstrap-select .dropdown-menu li a {
  font-family: inherit !important;
}
/* Header title — EVE text-h5 cue: prominent but not heavy */
.pnq-node-modal .modal-header span,
.pnq-node-modal .modal-title {
  font-size: 18px !important;
  font-weight: 500 !important;
  letter-spacing: .01em !important;
}
.pnq-node-modal .modal-header {
  background: rgba(255, 255, 255, 0.30) !important;
  background-color: rgba(255, 255, 255, 0.30) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
}
.pnq-node-modal .modal-header,
.pnq-node-modal .modal-header span,
.pnq-node-modal .modal-title,
.pnq-node-modal .modal-header .close,
.pnq-node-modal .modal-header i {
  color: #1d1d1f !important;
}
.pnq-node-modal .modal-header .action-changeopacity { color: #6e6e73 !important; }
.pnq-node-modal .modal-footer { border-top: 1px solid rgba(0, 0, 0, 0.10) !important; }

/* ── Body text + labels ──────────────────────────────────────────────────── */
.pnq-node-modal .modal-body { color: #1d1d1f !important; }
.pnq-node-modal .modal-body label,
.pnq-node-modal .modal-body .control-label,
.pnq-node-modal .pnq-field-container label.control-label,
.pnq-node-modal .pnq-field-container .control-label {
  color: #515154 !important;
}
.pnq-node-modal .modal-body h1, .pnq-node-modal .modal-body h2,
.pnq-node-modal .modal-body h3, .pnq-node-modal .modal-body h4,
.pnq-node-modal .modal-body h5, .pnq-node-modal .modal-body h6,
.pnq-node-modal .modal-body p { color: #1d1d1f !important; }

/* ── Cards + sub-groups ──────────────────────────────────────────────────── */
.pnq-node-modal .pnq-field-group {
  background: rgba(255, 255, 255, 0.50) !important;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
}
.pnq-node-modal .pnq-field-group::before {
  background: linear-gradient(140deg, rgba(255,255,255,0.55) 0%, transparent 55%);
}
.pnq-node-modal .pnq-group-title {
  color: #3c708a !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
}
.pnq-node-modal .pnq-field-title { color: #3c708a !important; }
.pnq-node-modal .pnq-qemu-group,
.pnq-node-modal .pnq-iface-group {
  background: rgba(255, 255, 255, 0.40) !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
}

/* ── Inputs / selects / textareas / icon button ──────────────────────────── */
.pnq-node-modal .modal-body .form-control,
.pnq-node-modal .modal-body input[type="text"],
.pnq-node-modal .modal-body input[type="number"],
.pnq-node-modal .modal-body textarea,
.pnq-node-modal .pnq-field-container input.form-control,
.pnq-node-modal .pnq-field-container input.input,
.pnq-node-modal .pnq-field-container textarea.form-control {
  background: rgba(255, 255, 255, 0.80) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.pnq-node-modal .modal-body select,
.pnq-node-modal .modal-body select.input,
.pnq-node-modal .pnq-field-container select.input {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: rgba(255, 255, 255, 0.80) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.pnq-node-modal .modal-body .form-control:focus,
.pnq-node-modal .modal-body select:focus,
.pnq-node-modal .pnq-field-container input:focus,
.pnq-node-modal .pnq-field-container select.input:focus {
  border-color: #3c708a !important;
  box-shadow: 0 0 0 3px rgba(60, 112, 138, 0.18) !important;
  outline: none !important;
}
.pnq-node-modal .pnq-field-container .form-control.input.box_flex {
  background: rgba(255, 255, 255, 0.80) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.pnq-node-modal .pnq-field-container .fa-undo { color: #3c708a !important; }
.pnq-node-modal .pnq-field-container label.control-label input[type="checkbox"].form-control {
  accent-color: #3c708a;
}

/* ── Template picker (pick mode) ─────────────────────────────────────────── */
.pnq-node-modal.pnq-pick .modal-body > .form-group {
  background: rgba(255, 255, 255, 0.45) !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
}
.pnq-node-modal.pnq-pick .modal-body > .form-group > label.control-label { color: #3c708a !important; }
.pnq-node-modal.pnq-pick #form-node-showall { color: #515154 !important; }
.pnq-node-modal.pnq-pick .bootstrap-select .bs-searchbox input {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  color: #1d1d1f !important;
}
.pnq-node-modal.pnq-pick .bootstrap-select .bs-searchbox input::placeholder { color: #8a8a8e !important; }
.pnq-node-modal.pnq-pick .bootstrap-select .dropdown-menu.inner {
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
}
.pnq-node-modal.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a {
  color: #1d1d1f !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.pnq-node-modal.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a .text { color: #1d1d1f !important; }
.pnq-node-modal.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a:hover,
.pnq-node-modal.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a:focus,
.pnq-node-modal.pnq-pick .bootstrap-select .dropdown-menu.inner > li.active > a {
  background: rgba(60, 112, 138, 0.12) !important;
  color: #1d1d1f !important;
}
/* template-id subtext keeps the EVE blue accent on white */
.pnq-node-modal.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a .text small,
.pnq-node-modal.pnq-pick .bootstrap-select .dropdown-menu.inner > li > a small.text-muted {
  color: #3c708a !important;
}
/* Node icons: neutral chip so white-variant SVGs stay visible on white glass */
.pnq-node-modal .pnq-tpl-icon {
  background: rgba(60, 112, 138, 0.10);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 2px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

/* ── Back-to-templates bar ───────────────────────────────────────────────── */
.pnq-node-modal .pnq-backbar { border-bottom: 1px solid rgba(0, 0, 0, 0.10); }
.pnq-node-modal .pnq-back-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(60, 112, 138, 0.40);
  color: #3c708a;
}
.pnq-node-modal .pnq-back-btn:hover { background: rgba(60, 112, 138, 0.12); color: #2a5169; }
.pnq-node-modal .pnq-back-name { color: #3c708a !important; }

/* ── Bootstrap-Select (edit-mode dropdown) + Cancel button ───────────────── */
.pnq-node-modal .bootstrap-select > .dropdown-toggle {
  background: rgba(255, 255, 255, 0.80) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.pnq-node-modal .bootstrap-select > .dropdown-toggle .filter-option-inner-inner { color: #1d1d1f !important; }
.pnq-node-modal .modal-content [data-dismiss="modal"]:not(.close),
.pnq-node-modal .btn-default,
.pnq-node-modal .btn-secondary {
  background: rgba(255, 255, 255, 0.7) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}


/* =============================================================================
   WHITE APPLE-GLASS — sibling modals (match the Add Node modal)
   Add Network, Add Picture, Startup Configs, System Status.
   JS (pnetlab-node-form.js → tagWhiteModals) tags each modal-content with
   `.pnq-white-modal`. Same palette/typography as `.pnq-node-modal`, plus
   overrides for each modal's dark-themed internals. Selectors are prefixed
   with `.modal-content.pnq-white-modal` / `.pnq-white-modal` to out-specify
   the dark rules earlier in this file. Text #1d1d1f, labels #515154,
   accent #3c708a (EVE blue). backdrop-filter preserved.
   ============================================================================= */

/* ── Shell + typography ─────────────────────────────────────────────────── */
.modal-content.pnq-white-modal {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 24px 64px rgba(0, 0, 0, 0.28) !important;
  color: #1d1d1f !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.pnq-white-modal input, .pnq-white-modal select, .pnq-white-modal button,
.pnq-white-modal label, .pnq-white-modal textarea,
.pnq-white-modal .dropdown-menu li a { font-family: inherit !important; }
/* Startup Configs is .modal-wide (its bg rule is more specific than .modal-content) */
.modal.modal-wide .modal-content.pnq-white-modal { background: rgba(255, 255, 255, 0.72) !important; }

/* Header */
.pnq-white-modal .modal-header {
  background: rgba(255, 255, 255, 0.30) !important;
  background-color: rgba(255, 255, 255, 0.30) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
}
.pnq-white-modal .modal-header,
.pnq-white-modal .modal-header span,
.pnq-white-modal .modal-title,
.pnq-white-modal .modal-header h4,
.pnq-white-modal .modal-header .close,
.pnq-white-modal .modal-header i { color: #1d1d1f !important; }
.pnq-white-modal .modal-header .action-changeopacity,
.pnq-white-modal .modal-header .fa-clone { color: #6e6e73 !important; }
.pnq-white-modal .modal-title { font-size: 18px !important; font-weight: 500 !important; }
.pnq-white-modal .modal-footer { border-top: 1px solid rgba(0, 0, 0, 0.10) !important; }

/* Body text + labels */
.pnq-white-modal .modal-body { color: #1d1d1f !important; }
.pnq-white-modal label,
.pnq-white-modal .control-label,
.pnq-white-modal .input_item_text { color: #515154 !important; }
.pnq-white-modal h1, .pnq-white-modal h2, .pnq-white-modal h3,
.pnq-white-modal h4, .pnq-white-modal h5, .pnq-white-modal h6,
.pnq-white-modal p { color: #1d1d1f !important; }

/* Inputs / selects / textareas */
.pnq-white-modal .form-control,
.pnq-white-modal input[type="text"],
.pnq-white-modal input[type="number"],
.pnq-white-modal input[type="password"],
.pnq-white-modal textarea,
.pnq-white-modal .input_item_input {
  background: rgba(255, 255, 255, 0.80) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.pnq-white-modal select,
.pnq-white-modal select.input {
  -webkit-appearance: none !important; appearance: none !important;
  background: rgba(255, 255, 255, 0.80) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.pnq-white-modal .form-control:focus, .pnq-white-modal select:focus,
.pnq-white-modal input:focus, .pnq-white-modal textarea:focus {
  border-color: #3c708a !important;
  box-shadow: 0 0 0 3px rgba(60, 112, 138, 0.18) !important;
  outline: none !important;
}
/* Non-primary buttons / Cancel */
.pnq-white-modal .btn-default, .pnq-white-modal .btn-secondary,
.pnq-white-modal [data-dismiss="modal"]:not(.close) {
  background: rgba(255, 255, 255, 0.7) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

/* Bootstrap-select (Add Network template picker) */
.pnq-white-modal .bootstrap-select > .dropdown-toggle {
  background: rgba(255, 255, 255, 0.80) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.pnq-white-modal .bootstrap-select > .dropdown-toggle .filter-option-inner-inner { color: #1d1d1f !important; }
.pnq-white-modal .bootstrap-select .dropdown-menu {
  background: rgba(255, 255, 255, 0.97) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
}
.pnq-white-modal .bootstrap-select .dropdown-menu li a,
.pnq-white-modal .bootstrap-select .dropdown-menu li a span.text { color: #1d1d1f !important; }
.pnq-white-modal .bootstrap-select .dropdown-menu li a:hover,
.pnq-white-modal .bootstrap-select .dropdown-menu li.active > a,
.pnq-white-modal .bootstrap-select .dropdown-menu li.selected > a {
  background: rgba(60, 112, 138, 0.12) !important; color: #1d1d1f !important;
}
.pnq-white-modal .bootstrap-select .bs-searchbox input {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  color: #1d1d1f !important;
}

/* ── System Status internals ────────────────────────────────────────────── */
.modal-content.pnq-white-modal .box_padding.box_shadow {
  background: rgba(255, 255, 255, 0.50) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.modal-content.pnq-white-modal .box_padding.box_shadow tbody,
.modal-content.pnq-white-modal .box_padding.box_shadow table { background: transparent !important; color: #1d1d1f !important; }
.modal-content.pnq-white-modal .table_total_node td,
.modal-content.pnq-white-modal .table_total_node th { color: #1d1d1f !important; }
.modal-content.pnq-white-modal .box_padding.box_shadow b,
.modal-content.pnq-white-modal .box_padding.box_shadow strong,
.modal-content.pnq-white-modal .box_padding.box_shadow h5 { color: #1d1d1f !important; }
.modal-content.pnq-white-modal .box_padding.box_shadow .p-chart ~ .box_flex div,
.modal-content.pnq-white-modal .box_padding.box_shadow .p-chart ~ .box_flex h5 { color: #1d1d1f !important; }
.modal-content.pnq-white-modal .box_padding.box_shadow .col-md-3,
.modal-content.pnq-white-modal .box_padding.box_shadow .col-xs-6,
.modal-content.pnq-white-modal .box_padding.box_shadow .col-xs-2 { color: #1d1d1f !important; }
.modal-content.pnq-white-modal .box_runningnodes {
  background: rgba(255, 255, 255, 0.55) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
}
.modal-content.pnq-white-modal .col_runningnodes,
.modal-content.pnq-white-modal .col_runningnodes * { color: #1d1d1f !important; }
.modal-content.pnq-white-modal .box_padding.box_shadow .table td,
.modal-content.pnq-white-modal .box_padding.box_shadow .table th {
  color: #1d1d1f !important; border-color: rgba(0, 0, 0, 0.10) !important;
}
.modal-content.pnq-white-modal .box_padding.box_shadow .table > tbody > tr:hover > td {
  background: rgba(60, 112, 138, 0.08) !important;
}

/* ── Startup Configs internals ──────────────────────────────────────────── */
.pnq-white-modal .config-list a, .pnq-white-modal .config-list a:link, .pnq-white-modal .config-list a:visited,
.pnq-white-modal .picture-list a, .pnq-white-modal .picture-list a:link, .pnq-white-modal .picture-list a:visited { color: #1d1d1f !important; }
.pnq-white-modal .config-list a:hover, .pnq-white-modal .config-list a:active,
.pnq-white-modal .picture-list a:hover, .pnq-white-modal .picture-list a:active { color: #3c708a !important; }
.pnq-white-modal .action-configget.selected, .pnq-white-modal .action-pictureget.selected {
  background-color: rgba(60, 112, 138, 0.15) !important; color: #1d1d1f !important;
  box-shadow: inset 0 0 0 1px rgba(60, 112, 138, 0.35) !important;
}
.pnq-white-modal .config-list li hr, .pnq-white-modal .picture-list li hr { border-color: rgba(0, 0, 0, 0.10) !important; }
.pnq-white-modal .absolute-right { background-color: rgba(255, 255, 255, 0.6) !important; }
.pnq-white-modal .row-config-list li:first-child,
.pnq-white-modal .row-config-list > ul > li:first-child { border-bottom-color: rgba(0, 0, 0, 0.12) !important; }
.pnq-white-modal .row-config-list, .pnq-white-modal .config-list .box_flex { color: #515154 !important; }
.pnq-white-modal .row-config-list > div > .row > .row { color: #1d1d1f !important; }
.pnq-white-modal .row-config-list .dropdown-toggle.input,
.pnq-white-modal .row-config-list .button.input.dropdown-toggle {
  background: rgba(255, 255, 255, 0.80) !important; color: #1d1d1f !important; border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.pnq-white-modal .row-config-list .dropdown-menu {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(14px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18) !important;
}
.pnq-white-modal .row-config-list .dropdown-menu .dropdown-item { color: #1d1d1f !important; }
.pnq-white-modal .row-config-list .dropdown-menu .dropdown-item:hover { background: rgba(60, 112, 138, 0.12) !important; color: #1d1d1f !important; }
.pnq-white-modal .row-config-list > div > .row > hr { border-color: rgba(0, 0, 0, 0.10) !important; }
.pnq-white-modal #nodeconfig {
  background: rgba(255, 255, 255, 0.85) !important; color: #1d1d1f !important; border-color: rgba(0, 0, 0, 0.15) !important;
}
.pnq-white-modal #nodeconfig:focus { border-color: #3c708a !important; box-shadow: 0 0 0 3px rgba(60, 112, 138, 0.18) !important; }
.pnq-white-modal #ace_mode, .pnq-white-modal #ace_themes, .pnq-white-modal #ace_font-size {
  -webkit-appearance: none !important; appearance: none !important;
  background: rgba(255, 255, 255, 0.80) !important; color: #1d1d1f !important; border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
/* Toggle sliders — track was semi-white (invisible on white); darken it */
.pnq-white-modal .checkbox-slider-off, .pnq-white-modal .checkbox-slider-on { background: rgba(0, 0, 0, 0.18) !important; }
.pnq-white-modal input:checked + .checkbox-slider-off,
.pnq-white-modal input:checked + .checkbox-slider-on { background: #3c708a !important; }

/* =============================================================================
   ADD / EDIT LAB MODAL (/admin/main/view) — white Apple-glass
   AngularJS file-manager modal. pnetlab-node-form.js does NOT run on this page,
   so it can't be tagged with .pnq-white-modal; instead scope by `:has()` on the
   lab form's unique `.input_item_input` class. Same palette as the Add Node /
   sibling modals: bg rgba(255,255,255,0.72) blur, text #1d1d1f, labels #515154,
   accent #3c708a. Out-specifies the dark `.modal-content .input_item_*` rules.
   ============================================================================= */
.modal-content:has(.input_item_input) {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 24px 64px rgba(0, 0, 0, 0.28) !important;
  color: #1d1d1f !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Header */
.modal-content:has(.input_item_input) .modal-header {
  background: rgba(255, 255, 255, 0.30) !important;
  background-color: rgba(255, 255, 255, 0.30) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
}
.modal-content:has(.input_item_input) .modal-header,
.modal-content:has(.input_item_input) .modal-header span,
.modal-content:has(.input_item_input) .modal-header h4,
.modal-content:has(.input_item_input) .modal-title,
.modal-content:has(.input_item_input) .modal-header .close,
.modal-content:has(.input_item_input) .modal-header i { color: #1d1d1f !important; }
.modal-content:has(.input_item_input) .modal-footer { border-top: 1px solid rgba(0, 0, 0, 0.10) !important; }

/* Body text + headings */
.modal-content:has(.input_item_input) .modal-body { color: #1d1d1f !important; }
.modal-content:has(.input_item_input) h1, .modal-content:has(.input_item_input) h2,
.modal-content:has(.input_item_input) h3, .modal-content:has(.input_item_input) h4,
.modal-content:has(.input_item_input) h5, .modal-content:has(.input_item_input) h6,
.modal-content:has(.input_item_input) p { color: #1d1d1f !important; }

/* Field labels */
.modal-content:has(.input_item_input) .input_item_text { color: #515154 !important; }

/* Field inputs / textareas */
.modal-content:has(.input_item_input) .input_item_input {
  background: rgba(255, 255, 255, 0.80) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.modal-content:has(.input_item_input) .input_item_input:focus {
  border-color: #3c708a !important;
  box-shadow: 0 0 0 3px rgba(60, 112, 138, 0.18) !important;
  outline: none !important;
}
.modal-content:has(.input_item_input) .input_item_input[readonly] {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #6e6e73 !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
}

/* Permission option buttons */
.modal-content:has(.input_item_input) .input_item_option {
  background: rgba(255, 255, 255, 0.70) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.modal-content:has(.input_item_input) .input_item_option[select="true"] {
  background: rgba(60, 112, 138, 0.15) !important;
  border-color: #3c708a !important;
  color: #1d1d1f !important;
  box-shadow: inset 0 0 0 1px rgba(60, 112, 138, 0.35) !important;
}
.modal-content:has(.input_item_input) .input_item_option:hover {
  background: rgba(60, 112, 138, 0.12) !important;
  color: #1d1d1f !important;
}

/* Generic form controls / native selects inside the lab modal */
.modal-content:has(.input_item_input) .form-control,
.modal-content:has(.input_item_input) input[type="text"],
.modal-content:has(.input_item_input) input[type="number"],
.modal-content:has(.input_item_input) textarea,
.modal-content:has(.input_item_input) select {
  background: rgba(255, 255, 255, 0.80) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.modal-content:has(.input_item_input) select {
  -webkit-appearance: none !important; appearance: none !important;
}

/* Footer / Cancel buttons */
.modal-content:has(.input_item_input) .btn-secondary,
.modal-content:has(.input_item_input) .btn-default,
.modal-content:has(.input_item_input) [data-dismiss="modal"]:not(.close) {
  background: rgba(255, 255, 255, 0.70) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

/* Centre the Add/Edit Lab modal on screen (this page has no quickbar offset).
   Gated to the open state (`.in` OR the inline display:block that
   angular-ui-bootstrap sets) so a hidden/closing modal never lingers as a
   full-screen overlay. */
.modal.in:has(.input_item_input),
.modal[style*="display: block"]:has(.input_item_input) {
  display: flex !important;
}
.modal.in:has(.input_item_input) .modal-dialog,
.modal[style*="display: block"]:has(.input_item_input) .modal-dialog {
  margin: auto !important;
}

/* =============================================================================
   FILE MANAGER (/admin/main/view) — modern Apple-style folder icon
   Replaces the flat FontAwesome `fa-folder` glyph with a macOS-style two-tone
   blue folder SVG. Scoped via the gold inline colour `#dfba49` that PNetLab puts
   on every file-manager folder icon (breadcrumb, list, rename, move-to), so no
   other `fa-folder` usage is affected. Shared folders keep their `fa-share-alt`.
   ============================================================================= */
.fa-folder[style*="dfba49"]::before {
  content: "" !important;
  display: inline-block;
  width: 1.3em;
  height: 1.05em;
  vertical-align: -0.24em;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2036%2028%27%3E%3Cdefs%3E%3ClinearGradient%20id%3D%27bk%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%270%27%20y2%3D%271%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%2356B0EE%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%232E86DE%27%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%27ft%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%270%27%20y2%3D%271%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%238AD2FA%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%233F9BEA%27%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath%20d%3D%27M3%206.6C3%205.1%204.2%204%205.7%204h6.9c.9%200%201.8.4%202.4%201.1L17%207h13.3C31.8%207%2033%208.2%2033%209.7V21c0%201.6-1.3%202.9-2.9%202.9H5.9C4.3%2023.9%203%2022.6%203%2021V6.6z%27%20fill%3D%27url%28%23bk%29%27%2F%3E%3Cpath%20d%3D%27M1.7%2012.7C1.7%2011.2%202.9%2010%204.4%2010h27.2c1.5%200%202.7%201.2%202.7%202.7V21c0%201.6-1.3%202.9-2.9%202.9H4.6C3%2023.9%201.7%2022.6%201.7%2021V12.7z%27%20fill%3D%27url%28%23ft%29%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.18));
}

/* =============================================================================
   STARTUP CONFIGS — left node-list readability (within .pnq-white-modal)
   The default list packs icon + name + toggle tightly with an <hr> after every
   row (visual clutter) and a tiny 15px icon. Rebuild each row as a clean flex
   line: larger icon, single-line name, toggle pushed right, hover highlight,
   and drop the per-row separators.
   ============================================================================= */
.pnq-white-modal .config-list ul {
  padding-left: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}
.pnq-white-modal .config-list li {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  min-height: 34px;
  position: relative;
  border-radius: 8px;
}
.pnq-white-modal .config-list li:hover { background: rgba(60, 112, 138, 0.08); }
/* remove the per-row <hr> separators */
.pnq-white-modal .config-list li hr { display: none !important; }
.pnq-white-modal .config-list li .clearfix { display: none !important; }

/* node link: icon + name on one line */
.pnq-white-modal .config-list a.action-configget {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  min-width: 0;
  padding: 3px 6px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 6px;
}
.pnq-white-modal .config-list a.action-configget img {
  width: 19px !important;
  height: 19px !important;
  margin: 0 !important;
  flex: 0 0 19px;
}
.pnq-white-modal .config-list a.action-configget.selected {
  background: rgba(60, 112, 138, 0.15) !important;
  box-shadow: inset 0 0 0 1px rgba(60, 112, 138, 0.35) !important;
}

/* toggle container → pushed right, transparent, vertically centred */
.pnq-white-modal .config-list .absolute-right {
  position: static !important;
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  background: transparent !important;
  flex: 0 0 auto;
  padding: 0 !important;
}

/* "Change All" header row — separate it from the node list */
.pnq-white-modal .config-list ul > li:first-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
  border-radius: 0 !important;
  margin-bottom: 5px !important;
  padding-bottom: 7px !important;
  font-weight: 600 !important;
}
.pnq-white-modal .config-list ul > li:first-child:hover { background: transparent !important; }

/* keep the node list inside the viewport — scroll the list, not the page */
.pnq-white-modal .config-list ul {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  padding-right: 4px !important;
}

/* =============================================================================
   WARNING / CONFIRM dialog (addWaring → node delete etc.) — white Apple-glass
   Built by functions.js addWaring(): <div class="modal make-red make-small fade in">
   with a `.alert-warning` holding `.question` + Yes/Cancel. Targeted by
   `:has(.alert-warning)` (all addWaring dialogs). Red title (make-red) kept as a
   clean destructive accent on the white glass. Centred on screen.
   ============================================================================= */
.modal-content:has(.alert-warning) {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 24px 64px rgba(0, 0, 0, 0.28) !important;
  color: #1d1d1f !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}
.modal-content:has(.alert-warning) .modal-header {
  background: rgba(255, 255, 255, 0.30) !important;
  background-color: rgba(255, 255, 255, 0.30) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10) !important;
}
.modal-content:has(.alert-warning) .modal-header .close { color: #1d1d1f !important; }
.modal-content:has(.alert-warning) .modal-title { font-size: 17px !important; font-weight: 600 !important; }
/* warning body: transparent with a subtle amber accent, dark readable text */
.modal-content:has(.alert-warning) .alert-warning {
  background: transparent !important;
  border: none !important;
  border-left: 3px solid #e0a52e !important;
  border-radius: 6px !important;
  color: #1d1d1f !important;
}
.modal-content:has(.alert-warning) .question {
  color: #1d1d1f !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  margin-bottom: 14px !important;
}
/* Cancel button (Yes keeps its green btn-success) */
.modal-content:has(.alert-warning) [data-dismiss="modal"]:not(.close),
.modal-content:has(.alert-warning) .btn:not(.btn-success):not(.btn-primary):not(.btn-danger):not(.btn-info) {
  background: rgba(255, 255, 255, 0.70) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

/* Centre on screen — override the quickbar 72px top-pin (topology page) */
body:has(#pnetlab-quickbar) .modal.in:has(.alert-warning) { display: flex !important; }
body:has(#pnetlab-quickbar) .modal.in:has(.alert-warning) .modal-dialog { margin: auto !important; }

/* =============================================================================
   LINK QUALITY / STYLE palette (.link_ctl_frame) — reposition + white glass
   Right-click a link → "Quality" opens a `.link_ctl_frame` (position:fixed;
   top:0; width:100%; z:2000) — pinned to the top, tucked behind the quickbar.
   Move it to the BOTTOM-LEFT (clear of the bottom-right Physical/zoom/clock
   controls) and give it the Apple white-glass look. Inner cards carry inline
   `background:aliceblue` + grey borders → neutralised here.
   Covers both the quality bar and the link-style (Type/Stub) bar (same class).
   ============================================================================= */
body:has(#pnetlab-quickbar) .link_ctl_frame {
  top: auto !important;
  bottom: 10px !important;
  left: 12px !important;
  right: auto !important;
  width: auto !important;
  max-width: calc(100vw - 330px) !important;   /* leave room for Physical/clock at bottom-right */
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25) !important;
  color: #1d1d1f !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  padding: 6px 8px !important;
}
/* sidebar-open offsets shouldn't pull it back to the top/right */
body.leftmenu .link_ctl_frame,
body.fixed .link_ctl_frame,
body.leftmenu.fixed .link_ctl_frame { left: 12px !important; }

/* neutralise inline aliceblue cards inside the palette */
.link_ctl_frame [style*="aliceblue"] {
  background: rgba(255, 255, 255, 0.45) !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
  border-radius: 8px !important;
}
.link_ctl_frame [style*="aliceblue"] [style*="border-bottom"],
.link_ctl_frame [style*="border-bottom"] { border-bottom-color: rgba(0, 0, 0, 0.10) !important; }
.link_ctl_frame strong { color: #1d1d1f !important; }

/* titles / labels */
.link_ctl_frame .link_quality_title,
.link_ctl_frame .link_ctl_title,
.link_ctl_frame .box_line { color: #515154 !important; }

/* inputs + selects */
.link_ctl_frame .link_quality_input,
.link_ctl_frame .link_ctl_input,
.link_ctl_frame input,
.link_ctl_frame select {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 4px !important;
}
.link_ctl_frame select { -webkit-appearance: none !important; appearance: none !important; }

/* buttons — keep coloured primary/Apply; Cancel & plain buttons go light */
.link_ctl_frame .btn:not(.btn-success):not(.btn-primary):not(.btn-danger):not(.btn-info),
.link_ctl_frame .button:not(.btn-success):not(.btn-primary) {
  background: rgba(255, 255, 255, 0.70) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 4px !important;
}

/* Link quality palette with TWO node-side interfaces: stack the endpoint cards
   vertically (top-to-bottom), never side-by-side — keeps the palette narrow so
   it can't run over the bottom-right Physical button. The cards container is the
   `.box_flex` that directly holds the inline-`aliceblue` endpoint cards. */
.link_ctl_frame .box_flex:has(> [style*="aliceblue"]) {
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 6px !important;
}
.link_ctl_frame .box_flex:has(> [style*="aliceblue"]) > [style*="aliceblue"] {
  margin: 0 !important;   /* equal-width, flush-stacked cards */
  width: 100% !important;
}

/* =============================================================================
   ADD PICTURE modal — narrower, cleanly aligned two rows
   The form (`#form-picture-add .form-horizontal`) had col-md-3 label + col-md-5
   input in a 600px modal, leaving ~33% empty on the right ("too wide"). Narrow
   the dialog and rebalance the columns so Name + Picture rows fill the width.
   (White-glass already applied via .pnq-white-modal.)
   ============================================================================= */
.modal-dialog:has(#form-picture-add) {
  width: 440px !important;
  max-width: 440px !important;
}
.pnq-white-modal .form-picture .col-md-3 { width: 28% !important; }
.pnq-white-modal .form-picture .col-md-5 { width: 70% !important; }
.pnq-white-modal .form-picture .col-md-offset-3 { margin-left: 28% !important; }
.pnq-white-modal .form-picture input[type="text"],
.pnq-white-modal .form-picture input[type="file"],
.pnq-white-modal .form-picture .form-control-static {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* =============================================================================
   LAB-OPEN / CLOSE TRANSITION LOADER (#loading-lab) — modern indeterminate bar
   Shown on /legacy/topology while a lab opens (logo + progress bar) and, via the
   JS controller, when a lab is closed. Retinted from the old blue #0d274d to the
   dark-green glass theme (matches login / quickbar). The PNetLab download-driven
   determinate bar flickers on localhost (topology API returns instantly), so the
   bar is overridden to a continuous indeterminate "comet" sweep, and pnetlab-
   node-form.js enforces a minimum visible time + smooth fade in/out.
   NOTE: never put `!important` on `display` here — jQuery .show()/.hide() toggle
   inline display, and a stylesheet !important would break the hide.
   ============================================================================= */
#loading-lab {
  background: linear-gradient(160deg, #28382f 0%, #1c2821 55%, #0e1511 100%) !important;
  transition: opacity 0.45s ease !important;   /* smooth fade in/out (JS toggles opacity) */
}
/* Centre the logo + bar in the viewport (works regardless of block display) */
#loading-lab .container {
  position: absolute !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto !important;
  text-align: center;
}
#loading-lab .container img {
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
  animation: pnqLogoPulse 1.8s ease-in-out infinite;
}
/* Track */
#loading-lab .progress {
  position: relative;
  width: 280px !important;
  height: 6px !important;
  margin: 0 auto !important;
  background: rgba(255, 255, 255, 0.10) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}
/* Indeterminate comet sweep — overrides the inline width:t% + striped image */
#loading-lab .progress-bar {
  position: absolute !important;
  top: 0;
  left: -45%;
  width: 42% !important;
  height: 100% !important;
  background-color: transparent !important;
  background-image: linear-gradient(90deg,
      rgba(95, 168, 130, 0) 0%,
      #5fa882 45%,
      #7fc7a3 55%,
      rgba(95, 168, 130, 0) 100%) !important;
  border-radius: 999px !important;
  box-shadow: 0 0 12px rgba(95, 168, 130, 0.65) !important;
  animation: pnqBarSweep 1.15s cubic-bezier(0.65, 0, 0.35, 1) infinite !important;
}
@keyframes pnqBarSweep {
  0%   { left: -45%; }
  100% { left: 103%; }
}
@keyframes pnqLogoPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.03); }
}
/* While the loader is active (class set by pnetlab-node-form.js on show, removed
   only once the loader is fully hidden), keep the quickbar hidden — otherwise it
   shows through the semi-transparent loader during the fade in/out. It fades in
   on its own only after the loader animation has finished. */
#pnetlab-quickbar {
  transition: opacity 0.4s ease;
}
body.pnq-loading #pnetlab-quickbar {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

/* =============================================================================
   NOTIFICATION / ALERT BAR (#alert_container) — top-right of the topology canvas
   unetlab.css hard-codes the old PNetLab blue `background:#0d274d`. Retint to the
   dark-green frosted glass used by the topbar / quickbar so the toast messages
   ("Lab opened", "Node started", errors, …) match the theme. The colored
   left-border accents (success/danger/info) are kept as status cues.
   ============================================================================= */
#alert_container {
  background: rgba(28, 40, 33, 0.82) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 0 0 8px 8px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
  color: #e8f0ec !important;
}
#alert_container .alert,
#alert_container .alert .close,
#alert_container b {
  color: #e8f0ec !important;
}

/* =============================================================================
   IMAGE STORE (ishare2/LabHub downloader) — white Apple-glass modal on the
   topology page. Opened by the quickbar "Images" button (pnetlab-image-store.js).
   Mirrors the Add Node picker palette: white frosted glass, #1d1d1f text,
   #515154 labels, #3c708a (EVE blue) accent, system font stack, px sizes.
   ============================================================================= */
.pnq-store-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 10000;
  align-items: center; justify-content: center;
  background: rgba(15, 22, 18, 0.45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.pnq-store-overlay.pnq-open { display: flex; }

.pnq-store-modal {
  width: 900px; max-width: 94vw;
  height: 72vh; max-height: 760px;
  display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* header */
.pnq-store-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.pnq-store-title { font-size: 18px; font-weight: 500; color: #1d1d1f; }
.pnq-store-title .glyphicon { color: #3c708a; margin-right: 4px; }
.pnq-store-sub { font-size: 11px; color: #86868b; font-family: ui-monospace, Menlo, Consolas, monospace; }
.pnq-store-sub.pnq-store-stale { color: #b5811f; font-weight: 600; }
.pnq-store-x {
  margin-left: auto; border: 0; background: transparent; cursor: pointer;
  font-size: 26px; line-height: 1; color: #86868b; padding: 0 6px;
}
.pnq-store-x:hover { color: #1d1d1f; }

/* body split */
.pnq-store-body { flex: 1 1 auto; display: flex; min-height: 0; }
.pnq-store-left {
  width: 30%; min-width: 220px;
  padding: 16px; display: flex; flex-direction: column; gap: 14px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}
.pnq-store-right { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; }

/* tabs (segmented control) */
.pnq-store-tabs {
  display: flex; background: rgba(60, 112, 138, 0.10);
  border: 1px solid rgba(60, 112, 138, 0.20); border-radius: 9px; padding: 3px;
}
.pnq-store-tab {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 500; color: #515154; padding: 6px 0; border-radius: 7px;
  transition: all .15s ease;
}
.pnq-store-tab.pnq-active { background: #fff; color: #3c708a; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

.pnq-store-search {
  width: 100%; box-sizing: border-box;
  font-size: 13px; padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 8px;
  background: rgba(255, 255, 255, 0.85); color: #1d1d1f;
}
.pnq-store-search:focus { outline: none; border-color: #3c708a; box-shadow: 0 0 0 3px rgba(60, 112, 138, 0.18); }
.pnq-store-onlymissing { font-size: 12px; color: #515154; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.pnq-store-hint { font-size: 11px; line-height: 1.5; color: #86868b; margin-top: auto; }

/* list */
.pnq-store-count { font-size: 11px; color: #86868b; margin-bottom: 8px; }
.pnq-store-list { flex: 1 1 auto; overflow-y: auto; padding-right: 4px; }
.pnq-store-loading, .pnq-store-err { padding: 24px; text-align: center; color: #86868b; font-size: 13px; }
.pnq-store-err { color: #c0392b; }

.pnq-store-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 9px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.pnq-store-row:hover { background: rgba(60, 112, 138, 0.08); }
.pnq-store-info { flex: 1 1 auto; min-width: 0; }
.pnq-store-name {
  font-size: 14px; font-weight: 500; color: #1d1d1f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pnq-store-meta { font-size: 11px; color: #86868b; margin-top: 1px; }
.pnq-store-action { flex: 0 0 150px; display: flex; justify-content: flex-end; align-items: center; }

.pnq-store-dl {
  border: 0; cursor: pointer; font-size: 12px; font-weight: 500;
  color: #fff; background: #3c708a; padding: 6px 12px; border-radius: 7px;
  transition: background .15s ease;
}
.pnq-store-dl:hover { background: #335f76; }

.pnq-store-del {
  border: 0; cursor: pointer; background: transparent; color: #c0392b;
  font-size: 13px; padding: 5px 7px; margin-left: 6px; border-radius: 6px;
  opacity: 0.5; transition: opacity .15s ease, background .15s ease;
}
.pnq-store-del:hover { opacity: 1; background: rgba(192, 57, 43, 0.12); }

.pnq-store-badge { font-size: 12px; font-weight: 500; padding: 5px 8px; border-radius: 7px; }
.pnq-store-badge.pnq-installed { color: #2e7d32; background: rgba(46, 125, 50, 0.12); }
.pnq-store-badge.pnq-err { color: #c0392b; background: rgba(192, 57, 43, 0.12); max-width: 150px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* progress */
.pnq-store-prog {
  position: relative; width: 150px; height: 22px; border-radius: 7px;
  background: rgba(60, 112, 138, 0.12); overflow: hidden;
}
.pnq-store-prog-bar {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, #3c708a, #5fa8c4);
  transition: width .4s ease;
}
.pnq-store-prog-txt {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: #1d1d1f;
}

/* quickbar Images button keeps the native .pnq-btn look (no extra rules needed) */
.pnq-store-list::-webkit-scrollbar { width: 8px; }
.pnq-store-list::-webkit-scrollbar-thumb { background: rgba(60, 112, 138, 0.3); border-radius: 5px; }

/* =============================================================================
   ICON PICKER — inline white-glass dropdown (replaces the green file-manager
   modal for the Add Node "Icon" field). Driven by pnetlab-node-form.js; palette
   matches the .pnq-node-modal white Apple-glass theme.
   ============================================================================= */
.pnq-icon-dd {
  display: none; position: fixed; z-index: 10050;
  width: 300px; max-height: 320px; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 10px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.34); overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.pnq-icon-dd.pnq-open { display: flex; }
.pnq-icon-dd .pnq-icon-search {
  margin: 8px; padding: 7px 10px; font-size: 13px; box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 8px; background: #fff; color: #1d1d1f;
}
.pnq-icon-dd .pnq-icon-search:focus { outline: none; border-color: #3c708a; box-shadow: 0 0 0 3px rgba(60, 112, 138, 0.18); }
.pnq-icon-list { overflow-y: auto; flex: 1 1 auto; padding: 0 4px 6px; }
.pnq-icon-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; color: #1d1d1f; }
.pnq-icon-row:hover { background: rgba(60, 112, 138, 0.10); }
.pnq-icon-row img { width: 22px; height: 22px; object-fit: contain; flex: 0 0 22px; }
.pnq-icon-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnq-icon-empty { padding: 14px; text-align: center; color: #86868b; font-size: 12px; }
.pnq-icon-list::-webkit-scrollbar { width: 8px; }
.pnq-icon-list::-webkit-scrollbar-thumb { background: rgba(60, 112, 138, 0.3); border-radius: 5px; }

/* =============================================================================
   ADD NETWORK modal — EVE-NG field-group layout (matches the reference). Bordered
   #3c708a card with a group title, stacked labels (field-title), white inputs,
   and a 50/50 Left/Top row. Restructured by pnetlab-node-form.js (pnqStyleNetworkForm).
   px font-sizes (legacy/topology root font-size is 62.5%, so rem would be half).
   ============================================================================= */
.pnq-net-form .pnq-net-card {
  border: 1px solid #3c708a; border-radius: 6px; padding: 16px; margin-bottom: 6px;
}
.pnq-net-card-title {
  font-size: 15px; font-weight: 500; color: #3c708a;
  margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid rgba(60, 112, 138, 0.2);
}
/* stack label over input (EVE field-title look), override Bootstrap horizontal grid */
.pnq-net-form .form-group { display: block; margin: 0 0 14px; }
.pnq-net-form .form-group:last-child { margin-bottom: 0; }
.pnq-net-form .control-label {
  display: block; float: none; width: auto; text-align: left;
  padding: 0 0 4px; font-size: 13px; font-weight: 500; color: #4c4c4c;
}
.pnq-net-form .col-md-3, .pnq-net-form .col-md-5 { float: none; width: 100%; padding: 0; }
.pnq-net-form .form-control { width: 100%; background: #fff; }
.pnq-net-form .col-md-offset-3 { margin-left: 0; }
/* Left | Top — 50/50 */
.pnq-net-row { display: flex; gap: 16px; }
.pnq-net-row .pnq-net-half { flex: 1 1 50%; min-width: 0; }
@media (max-width: 480px) { .pnq-net-row { flex-direction: column; gap: 14px; } }

/* Icon picker rows — EVE list look: taller, larger preview, light EVE-blue hover */
.pnq-icon-row { padding: 9px 10px; }
.pnq-icon-row:hover { background: rgba(60, 112, 138, 0.08); }
.pnq-icon-row img { width: 26px; height: 26px; flex: 0 0 26px; }

/* Add Network "Type" Bootstrap-Select — force DOWNWARD + scrollable (it auto-
   flipped up as a single tall popup). Override the .dropup positioning and the
   inline max-height BS-Select sets; cap height so it scrolls. */
.pnq-net-form .bootstrap-select.dropup > .dropdown-menu,
.pnq-net-type.dropup > .dropdown-menu {
  top: 100% !important; bottom: auto !important; margin: 2px 0 0 !important;
}
.pnq-net-form .bootstrap-select > .dropdown-menu,
.pnq-net-type > .dropdown-menu { max-height: 240px !important; }
.pnq-net-form .bootstrap-select > .dropdown-menu .inner,
.pnq-net-type > .dropdown-menu .inner { max-height: 220px !important; overflow-y: auto !important; }

/* =============================================================================
   Create Link modal (newConnModal → #addConn) — EVE-NG "Create Link" layout
   ----------------------------------------------------------------------------
   Rebuilt by pnetlab-node-form.js (pnqStyleLinkForm) into a horizontal node
   preview (icon — connecting line — icon, with interface chips + node names)
   above two stacked "Source/Destination node (NAME)" interface pickers. Shares
   the white Apple-glass shell via .pnq-white-modal (#addConn is tagged there).
   px font-sizes (legacy/topology root font-size is 62.5%, so rem renders half).
   ============================================================================= */
.modal-dialog:has(#addConn) { width: 520px; max-width: 520px; }
.pnq-link-form .pnq-link-body { padding: 4px 4px 0; }

/* topology preview (mirrors EVE .link-preview-topology / .preview-* rules) */
.pnq-link-preview {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 0; padding: 16px 8px 18px; margin-bottom: 18px;
  border: 1px solid rgba(60, 112, 138, 0.25); border-radius: 8px;
  background: rgba(60, 112, 138, 0.05);
}
.pnq-link-node {
  display: flex; flex-direction: column; align-items: center;
  flex: 0 0 130px; min-width: 0; position: relative;
}
/* icon box is the positioning anchor for the interface pill */
.pnq-link-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; }
.pnq-link-img {
  max-width: 48px; max-height: 48px; width: auto; height: auto; display: block; margin: 0;
}
/* EVE pill: light-blue, blue border/text, sits on the INNER side (toward the
   line). max-width + wrapping keeps long XRD names (MgmtEth0/RP0/CPU0/0, or the
   "…connected to…" text) contained — they wrap to 2–3 lines instead of running
   across the line onto the opposite node. */
.pnq-link-iface {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: max-content; max-width: 110px;       /* size to content first, then cap+wrap */
  white-space: normal; overflow-wrap: anywhere;
  text-align: center; line-height: 1.2;
  background: #e6f5ff; color: #3e7089; border: 1px solid #3e7089; border-radius: 11px;
  padding: 2px 9px; font-size: 12px; font-weight: 700; z-index: 2;
}
.pnq-link-iface:empty { display: none; }
.pnq-link-iface-left { left: calc(100% + 6px); }
.pnq-link-iface-right { right: calc(100% + 6px); }
.pnq-link-name {
  margin-top: 6px; font-size: 14px; font-weight: 700; color: #3e7089;
  max-width: 126px; text-align: center; white-space: normal; word-break: break-word; overflow-wrap: anywhere;
}
/* connecting line — vertically centred on the 60px icon row */
.pnq-link-line { flex: 1 1 auto; align-self: flex-start; height: 60px; display: flex; align-items: center; padding: 0 6px; }
.pnq-link-line-bar { display: block; width: 100%; border-top: 2px solid #3e7089; }

.pnq-link-note { color: #c0392b !important; font-size: 12px; margin-bottom: 14px; }

/* stacked interface pickers */
.pnq-link-fields { display: block; }
.pnq-link-field { margin-bottom: 16px; }
.pnq-link-field-title { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #1d1d1f; }
/* larger, readable picker — Chrome renders the dropdown rows at the select's
   font-size, so bumping it makes the open list legible (incl. the optgroup
   "Choose Interface for …" header pnqStyleLinkForm injects). */
.pnq-link-field select.form-control {
  width: 100%; background: #fff; font-size: 14px; height: auto; padding: 7px 10px; line-height: 1.3;
}
.pnq-link-field select.form-control optgroup { font-size: 13px; font-weight: 700; color: #3c708a; }
.pnq-link-field select.form-control option { font-size: 14px; padding: 2px 0; }

/* actions */
.pnq-link-actions { display: flex; gap: 10px; margin-top: 4px; }
.pnq-link-actions .btn { min-width: 100px; }
.pnq-link-form .addConn-form-save {
  background: #3c708a !important; border-color: #3c708a !important; color: #fff !important;
}
.pnq-link-form .addConn-form-save:hover { background: #335f76 !important; border-color: #335f76 !important; }

/* ════════════════════════════════════════════════════════════════════════
 *  Custom Shape workflow (pnetlab-shape.js) — white Apple-glass, accent #3c708a
 * ════════════════════════════════════════════════════════════════════════ */

/* ── Add-Shape modal ─────────────────────────────────────────────────────── */
.pnq-shape-overlay {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.pnq-shape-card {
  width: 460px; max-width: calc(100vw - 32px); max-height: calc(100vh - 60px); overflow-y: auto;
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  color: #1d1d1f;
}
.pnq-shape-header {
  font-size: 18px; font-weight: 500; color: #1d1d1f;
  padding: 16px 20px 10px;
}
.pnq-shape-body { padding: 0 20px 4px; }
.pnq-shape-group {
  border: 1px solid #3c708a; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 16px;
}
.pnq-shape-gtitle { color: #3c708a; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.pnq-shape-picker { display: flex; justify-content: space-around; gap: 12px; }
.pnq-shape-opt {
  cursor: pointer; padding: 10px; border-radius: 10px;
  border: 2px solid transparent; background: rgba(60,112,138,0.06);
  transition: all .18s ease; line-height: 0;
}
.pnq-shape-opt:hover { background: rgba(60,112,138,0.12); }
.pnq-shape-opt.selected { border-color: #3c708a; background: rgba(60,112,138,0.14); }
.pnq-shape-field { margin-bottom: 12px; }
.pnq-shape-field:last-child { margin-bottom: 0; }
.pnq-shape-ftitle { color: #515154; font-size: 12px; font-weight: 500; margin-bottom: 5px; }
.pnq-shape-fields-row { display: flex; gap: 14px; margin-bottom: 12px; }
.pnq-shape-fields-row:last-child { margin-bottom: 0; }
.pnq-shape-input {
  width: 100%; box-sizing: border-box; height: 34px; padding: 0 10px;
  font-size: 13px; color: #1d1d1f;
  background: #fff; border: 1px solid #c9ccd1; border-radius: 7px;
  -webkit-appearance: none; appearance: none;
}
select.pnq-shape-input { padding-right: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23515154' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.pnq-shape-input:focus { outline: none; border-color: #3c708a; box-shadow: 0 0 0 3px rgba(60,112,138,0.18); }
.pnq-shape-color { display: flex; align-items: center; gap: 6px; }
.pnq-shape-hash { color: rgba(0,0,0,0.55); font-weight: 500; font-family: "Roboto Mono", monospace; }
.pnq-shape-hex { flex: 1 1 auto; min-width: 0; font-family: "Roboto Mono", monospace; text-transform: uppercase; }
.pnq-shape-swatch {
  flex: 0 0 34px; width: 34px; height: 34px; padding: 2px;
  border: 1px solid #c9ccd1; border-radius: 7px; background: #fff; cursor: pointer;
}
.pnq-shape-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 20px 18px; }
.pnq-shape-btn {
  min-width: 100px; height: 36px; border-radius: 8px; font-size: 13px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
}
.pnq-shape-add-btn { background: #3c708a; color: #fff; }
.pnq-shape-add-btn:hover { background: #335f76; }
.pnq-shape-cancel { background: rgba(0,0,0,0.06); color: #1d1d1f; border-color: rgba(0,0,0,0.12); }
.pnq-shape-cancel:hover { background: rgba(0,0,0,0.10); }

/* ── Placed shape: editing highlight + modern resize handle ──────────────── */
.customShape[data-pnq-shape].pnq-shape-editing { outline: 1px dashed rgba(60,112,138,0.8); outline-offset: 3px; }
.pnq-shape-resize {
  position: absolute; right: -8px; bottom: -8px; width: 19px; height: 19px;
  display: flex; align-items: center; justify-content: center;
  color: #3c708a; cursor: nwse-resize; z-index: 6;
  background: rgba(255,255,255,0.94); border: 1px solid rgba(60,112,138,0.55);
  border-radius: 6px; box-shadow: 0 1px 5px rgba(0,0,0,0.22);
  /* hidden until the cursor reaches the shape (or while actively resizing) */
  opacity: 0; pointer-events: none;
  transition: opacity .12s ease, transform .12s ease, background .12s ease, color .12s ease;
}
.customShape[data-pnq-shape].pnq-shape-near > .pnq-shape-resize,
.customShape[data-pnq-shape]:hover > .pnq-shape-resize,
.customShape[data-pnq-shape].pnq-shape-rz-active > .pnq-shape-resize,
.customShape[data-pnq-shape].pnq-shape-editing > .pnq-shape-resize {
  opacity: 1; pointer-events: auto;
}
.pnq-shape-resize:hover { background: #3c708a; color: #fff; transform: scale(1.12); }
.pnq-shape-resize svg { display: block; pointer-events: none; }
body.pnq-resizing { cursor: nwse-resize !important; -webkit-user-select: none; user-select: none; }

/* ── On-canvas "Object Style Editor" bottom bar ──────────────────────────── */
.pnq-objstyle {
  position: fixed; left: 12px; bottom: 12px; z-index: 9998;
  max-width: calc(100vw - 330px);
  background: rgba(255,255,255,0.80);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.55); border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.30);
  padding: 12px 40px 12px 16px; color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.pnq-objstyle-title { font-size: 14px; font-weight: 600; color: #3c708a; margin-bottom: 8px; }
.pnq-objstyle-fields { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; }
.pnq-objstyle-block { display: flex; flex-direction: column; }
.pnq-objstyle-blabel { font-size: 11px; font-weight: 500; color: #515154; margin-bottom: 4px; }
.pnq-objstyle-brow { display: flex; align-items: center; gap: 6px; }
.pnq-objstyle-input {
  height: 30px; padding: 0 8px; font-size: 13px; color: #1d1d1f;
  background: #fff; border: 1px solid #c9ccd1; border-radius: 6px;
  -webkit-appearance: none; appearance: none; box-sizing: border-box;
}
select.pnq-objstyle-input { padding-right: 24px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23515154' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.pnq-objstyle-input:focus { outline: none; border-color: #3c708a; box-shadow: 0 0 0 3px rgba(60,112,138,0.18); }
.pnq-objstyle-color { display: flex; align-items: center; gap: 5px; }
.pnq-objstyle-hex { width: 72px; font-family: "Roboto Mono", monospace; text-transform: uppercase; }
.pnq-objstyle-swatch { width: 30px; height: 30px; flex: 0 0 30px; padding: 2px; border: 1px solid #c9ccd1; border-radius: 6px; background: #fff; cursor: pointer; }
.pnq-objstyle input[type="range"] { accent-color: #3c708a; }
.pnq-objstyle-toggle { position: relative; display: inline-block; width: 42px; height: 24px; margin: 3px 0 0; }
.pnq-objstyle-toggle input { opacity: 0; width: 0; height: 0; }
.pnq-objstyle-toggle span { position: absolute; inset: 0; background: rgba(0,0,0,0.18); border-radius: 24px; transition: .2s; cursor: pointer; }
.pnq-objstyle-toggle span:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.pnq-objstyle-toggle input:checked + span { background: #3c708a; }
.pnq-objstyle-toggle input:checked + span:before { transform: translateX(18px); }
.pnq-objstyle-close {
  position: absolute; top: 8px; right: 10px; width: 26px; height: 26px;
  border: none; background: rgba(0,0,0,0.06); border-radius: 50%;
  font-size: 18px; line-height: 1; color: #515154; cursor: pointer;
}
.pnq-objstyle-close:hover { background: rgba(0,0,0,0.12); color: #1d1d1f; }

/* ══════════════════════════════════════════════════════════════════════════
 *  pnetlab-text.js — EVE-style Text workflow (floating toolbar + Style Editor)
 *  White Apple-glass palette, accent #3c708a. Scoped to /legacy/topology.
 * ════════════════════════════════════════════════════════════════════════ */

/* the text object while it's being edited inline */
.customText.pnq-text-editing {
  outline: 1.5px solid #3c708a;
  outline-offset: 2px;
  cursor: text !important;
  min-width: 20px;
  border-radius: 3px;
}

/* ── floating inline formatting toolbar (EVE balloon) ── */
.pnq-text-toolbar {
  position: fixed;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(60, 112, 138, 0.35);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.pnq-text-toolbar .pnq-text-sep {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: rgba(60, 112, 138, 0.25);
}
.pnq-text-tbtn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #1d1d1f;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.pnq-text-tbtn:hover { background: rgba(60, 112, 138, 0.12); border-color: rgba(60, 112, 138, 0.3); }
.pnq-text-tbtn:active { background: rgba(60, 112, 138, 0.22); }
.pnq-text-size {
  height: 28px;
  border: 1px solid rgba(60, 112, 138, 0.3);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
  color: #1d1d1f;
  font-size: 13px;
  padding: 0 4px;
  cursor: pointer;
  -webkit-appearance: menulist;
  appearance: menulist;
}
.pnq-text-clr {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}
.pnq-text-clr:hover { background: rgba(60, 112, 138, 0.12); border-color: rgba(60, 112, 138, 0.3); }
.pnq-text-clr .pnq-text-clr-A { font-size: 14px; font-weight: 600; color: #1d1d1f; pointer-events: none; }
.pnq-text-clr input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
}

/* ── EVE "Text Style Editor" bottom bar (mirrors the shape Object Style bar) ── */
.pnq-textstyle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  gap: 22px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(60, 112, 138, 0.35);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #1d1d1f;
  max-width: calc(100vw - 330px);
}
.pnq-textstyle-title {
  position: absolute;
  top: -10px;
  left: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #3c708a;
  background: rgba(255, 255, 255, 0.92);
  padding: 1px 8px;
  border-radius: 6px;
}
.pnq-textstyle-fields { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.pnq-textstyle-block { display: flex; flex-direction: column; gap: 5px; }
.pnq-textstyle-blabel { font-size: 12px; font-weight: 500; color: #515154; }
.pnq-textstyle-brow { display: flex; align-items: center; gap: 8px; }
.pnq-textstyle-input {
  height: 30px;
  border: 1px solid rgba(60, 112, 138, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  color: #1d1d1f;
  font-size: 13px;
  padding: 0 8px;
  outline: none;
}
.pnq-textstyle-input:focus { border-color: #3c708a; box-shadow: 0 0 0 2px rgba(60, 112, 138, 0.2); }
.pnq-textstyle input[type="range"] { accent-color: #3c708a; cursor: pointer; }
.pnq-textstyle-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; padding-bottom: 1px; }
.pnq-textstyle-btn {
  height: 32px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.12s, background 0.12s;
}
.pnq-textstyle-save { background: #3c708a; color: #fff; }
.pnq-textstyle-save:hover { filter: brightness(1.08); }
.pnq-textstyle-cancel { background: rgba(0, 0, 0, 0.04); color: #1d1d1f; border-color: rgba(0, 0, 0, 0.12); }
.pnq-textstyle-cancel:hover { background: rgba(0, 0, 0, 0.08); }

/* ===== EVE-NG link hover — bold + glow (2026-06-03) =====
   On hover jsPlumb adds .jtk-hover to the connector svg; pnetlab-node-form.js
   also adds .pnq-link-near when the cursor is within a ~12px band of the line
   (wider, smoother trigger). Both thicken the stroke 2->6px ("bold") and add a
   soft grey drop-shadow halo ("glow") — matching EVE-NG Pro exactly. */
body:has(#pnetlab-quickbar) svg.jtk-connector.jtk-hover path,
body:has(#pnetlab-quickbar) svg.jtk-connector.pnq-link-near path {
  stroke-width: 6px !important;
  filter: drop-shadow(rgb(89, 89, 89) 0px 0px 6px);
  transition: stroke-width .08s ease, filter .08s ease;
}

/* ===== EVE-NG "Add Line" modal — pnetlab-line.js (2026-06-03) ===== */
.pnq-line-overlay{ position:fixed; inset:0; z-index:20000; display:none;
  align-items:center; justify-content:center; background:rgba(15,25,30,0.32); }
.pnq-line-overlay.pnq-open{ display:flex; }
.pnq-line-modal{ width:520px; max-width:calc(100vw - 40px);
  background:rgba(255,255,255,0.74); -webkit-backdrop-filter:blur(30px) saturate(180%);
  backdrop-filter:blur(30px) saturate(180%); border:1px solid rgba(255,255,255,0.6);
  border-radius:14px; box-shadow:0 24px 64px rgba(0,0,0,0.35); padding:20px 22px 16px;
  font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color:#1d1d1f;
  -webkit-font-smoothing:antialiased; }
.pnq-line-title{ font-size:18px; font-weight:500; text-align:center; margin-bottom:14px; color:#1d1d1f; }
.pnq-line-field{ display:flex; flex-direction:column; margin-bottom:14px; flex:1 1 0; min-width:0; }
.pnq-line-field > label{ font-size:12px; font-weight:500; color:#515154; margin-bottom:5px; }
.pnq-line-row{ display:flex; gap:16px; }
.pnq-line-modal input[type="text"], .pnq-line-modal input[type="number"], .pnq-line-modal select{
  height:34px; border:1px solid rgba(0,0,0,0.16); border-radius:7px; background:#fff; color:#1d1d1f;
  font-size:13px; padding:0 10px; outline:none; -webkit-appearance:none; appearance:none; width:100%; }
.pnq-line-modal select{ background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23515154'/></svg>");
  background-repeat:no-repeat; background-position:right 11px center; padding-right:28px; }
.pnq-line-modal input:focus, .pnq-line-modal select:focus{ border-color:#3c708a; box-shadow:0 0 0 3px rgba(60,112,138,0.18); }
.pnq-line-preview{ border:1px solid rgba(0,0,0,0.12); border-radius:8px; background:rgba(255,255,255,0.55); padding:6px; }
.pnq-line-preview svg{ display:block; width:100%; height:60px; }
.pnq-line-preview text{ font-family:-apple-system,"Segoe UI",Roboto,sans-serif; font-size:12px; }
.pnq-line-colorwrap{ display:flex; align-items:center; height:34px; border:1px solid rgba(0,0,0,0.16);
  border-radius:7px; background:#fff; padding:0 8px; gap:4px; }
.pnq-line-colorwrap:focus-within{ border-color:#3c708a; box-shadow:0 0 0 3px rgba(60,112,138,0.18); }
.pnq-line-hash{ color:#86868b; font-size:13px; }
.pnq-line-colorhex{ border:none !important; box-shadow:none !important; height:30px !important; padding:0 !important;
  flex:1 1 auto; font-size:13px; letter-spacing:0.5px; }
.pnq-line-colorswatch{ width:26px; height:24px; border:1px solid rgba(0,0,0,0.18); border-radius:5px;
  padding:0; background:none; cursor:pointer; -webkit-appearance:none; appearance:none; flex:0 0 auto; }
.pnq-line-colorswatch::-webkit-color-swatch-wrapper{ padding:1px; }
.pnq-line-colorswatch::-webkit-color-swatch{ border:none; border-radius:3px; }
.pnq-line-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:6px; }
.pnq-line-save, .pnq-line-cancel{ height:36px; padding:0 22px; border-radius:8px; font-size:13px;
  font-weight:600; letter-spacing:0.4px; cursor:pointer; border:1px solid transparent; }
.pnq-line-save{ background:#3c708a; color:#fff; }
.pnq-line-save:hover{ filter:brightness(1.08); }
.pnq-line-cancel{ background:rgba(0,0,0,0.04); color:#1d1d1f; border-color:rgba(0,0,0,0.14); }
.pnq-line-cancel:hover{ background:rgba(0,0,0,0.08); }

/* ===== Add Line modal — colour popover + on-screen fixes (2026-06-03) ===== */
.pnq-line-modal{ max-height: calc(100vh - 32px); overflow-y: auto; }   /* never bleed off-screen */
.pnq-line-colorwrap{ position: relative; }                            /* anchor for the popover */
.pnq-line-swatch{ width:26px; height:24px; border:1px solid rgba(0,0,0,0.22); border-radius:5px;
  padding:0; cursor:pointer; flex:0 0 auto; background:#000; -webkit-appearance:none; appearance:none; }
.pnq-line-swatch:hover{ filter:brightness(1.05); }
.pnq-line-cpop{ position:absolute; right:0; bottom:calc(100% + 8px); z-index:6;
  background:rgba(255,255,255,0.97); -webkit-backdrop-filter:blur(20px) saturate(180%);
  backdrop-filter:blur(20px) saturate(180%); border:1px solid rgba(0,0,0,0.16); border-radius:9px;
  box-shadow:0 14px 38px rgba(0,0,0,0.30); padding:9px;
  display:grid; grid-template-columns:repeat(6,18px); gap:7px; }
.pnq-line-cpop[hidden]{ display:none; }
.pnq-line-cpop-sw{ width:18px; height:18px; border-radius:4px; border:1px solid rgba(0,0,0,0.2);
  padding:0; cursor:pointer; transition:transform .08s ease; }
.pnq-line-cpop-sw:hover{ transform:scale(1.15); border-color:#3c708a; }

/* ===== Link Edit color picker — open upward, not off the bottom (2026-06-03) =====
   The connection/link Edit bar sits at the bottom of the screen; its native
   react-color SketchPicker dropdown (#color<id>, a .dropdown-menu wrapping
   .sketch-picker) opened DOWNWARD and bled off-screen. Flip it above the field. */
.dropdown-menu[id^="color"],
.dropdown-menu:has(.sketch-picker){
  top: auto !important;
  bottom: 100% !important;
  margin: 0 0 8px 0 !important;
}

/* =============================================
   DEVICE LOGS modal (Devices store, React SPA page) — white Apple-glass
   ---------------------------------------------------------------
   Shown while a device is downloading/installing. It's a React-SPA-page modal,
   and the white-glass JS tagger (tagWhiteModals) only runs on /legacy/topology,
   so this modal fell through to the dark-green global .modal-content /
   .modal-header (#25332c) rules. No tagger here → target it structurally: its
   body is the box_padding log pane that React gives an id ending "_log"
   (id = "<makeId>_log"). The :has() selector + !important + later source order
   out-specify the dark rules. */
.modal-content:has(> .box_padding[id$="_log"]) {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(30px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28) !important;
}
.modal-content:has(> .box_padding[id$="_log"]) .modal-header {
  background-color: rgba(60, 112, 138, 0.12) !important;   /* beats .modal-header #25332c + inline #225baf */
  color: #1d1d1f !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.modal-content:has(> .box_padding[id$="_log"]) .modal-title { color: #1d1d1f !important; }
.modal-content:has(> .box_padding[id$="_log"]) .close {
  color: #1d1d1f !important;
  opacity: 0.55 !important;
  text-shadow: none !important;
}
.modal-content:has(> .box_padding[id$="_log"]) .close:hover { opacity: 0.9 !important; }
/* Log pane — dark text on light frosted glass, monospace for docker-pull output */
.modal-content:has(> .box_padding[id$="_log"]) > .box_padding[id$="_log"] {
  color: #1d1d1f !important;
  background: rgba(255, 255, 255, 0.35) !important;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
}
/* Center it. React hard-codes the wrapper to top:30; left:25%; height:0, so it
   opens pinned to the top. Override to dead-centre (position:fixed wrapper).
   We override only position (not display), so the closed modal stays display:none
   — no phantom overlay. height:auto on wrapper + dialog (both inline height:0) so
   there's a real box to translateY(-50%). The header stays drag-enabled
   (jQuery-UI draggable sets top/left on drag, offsetting from this centre). */
.modal.fade.click:has(.box_padding[id$="_log"]) {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  height: auto !important;
}
.modal-dialog:has(> .modal-content > .box_padding[id$="_log"]) {
  height: auto !important;
}

/* =============================================
   VERSION modal (main page System ▸ Versions) — white Apple-glass
   ---------------------------------------------------------------
   Main-page (AngularJS/React main.js) modal showing Current/Latest version +
   changelog. No JS tagger here either; its table has id="version_table", so
   target the modal-content that contains it. */
.modal-content:has(#version_table) {
  background: #ffffff !important;            /* opaque white — no background leak (was 0.82 frosted) */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28) !important;
}
.modal-content:has(#version_table) .modal-header {
  background-color: rgba(60, 112, 138, 0.12) !important;
  color: #1d1d1f !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.modal-content:has(#version_table) .modal-title { color: #1d1d1f !important; }
.modal-content:has(#version_table) .close {
  color: #1d1d1f !important; opacity: 0.55 !important; text-shadow: none !important;
}
.modal-content:has(#version_table) .close:hover { opacity: 0.9 !important; }
/* Version table — light frosted rows, dark text */
.modal-content:has(#version_table) #version_table,
.modal-content:has(#version_table) #version_table th,
.modal-content:has(#version_table) #version_table td {
  color: #1d1d1f !important;
  background: transparent !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
}
.modal-content:has(#version_table) #version_table th { background: rgba(60, 112, 138, 0.06) !important; }
/* Hide the Upgrade button — offline build, the upgrade path hits the null-routed
   vendor. The modal is repurposed as a changelog/about, so no upgrade action. */
.modal-content:has(#version_table) .btn-primary { display: none !important; }
/* Kill the loader flash ("flicker"). getVersion is now served locally/instantly,
   so the modal's built-in spinner (this.loader → .loading_cover/.lds-spinner,
   rendered inside this modal) only blinks — there is nothing to load. Hide it,
   scoped to the Version modal so other loaders are untouched. */
.modal:has(#version_table) .loading_cover,
.modal:has(#version_table) .loading_container,
.modal:has(#version_table) .lds-spinner { display: none !important; }

/* =============================================
   ADMIN LIST PAGES — Users / Roles / Running Labs (white Apple style)
   ---------------------------------------------------------------
   These React-SPA list pages use a dark-green `.filter_bar` band and dark-green
   `.table.table-bordered` headers (from the global `thead{background:#25332c}`).
   Recolour both to the light frosted palette — consistent with Devices. Body
   cells already render #1d1d1f on transparent, and the font is the system stack
   already, so only the bar + header + sort icons need flipping. Scoped to
   `.filter_bar` (only on these list pages) and `.table-bordered` (the list-table
   variant); the Add Node `.main_table` and other tables keep their own rules. */
.filter_bar {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 10px !important;
  color: #1d1d1f !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}
.filter_bar label,
.filter_bar .control-label,
.filter_bar > span,
.filter_bar td,
.filter_bar th { color: #515154 !important; }
.filter_bar input,
.filter_bar select,
.filter_bar .form-control {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  -webkit-appearance: none;
  appearance: none;
}

/* Data-table header — light frosted, dark text (admin list tables) */
.table-bordered > thead,
.table-bordered thead { background: transparent !important; }
/* The green comes from `.table .main_table th` (0,2,1, !important) where
   .main_table is a wrapper. Match with `.table.table-bordered th` — same
   specificity (0,2,1) but later in source, so it wins — and use an OPAQUE
   light fill so no green bleeds through a translucent tint. */
.table.table-bordered thead { background: transparent !important; }
.table.table-bordered th,
.table.table-bordered > thead > tr > th {
  background: rgb(231, 238, 242) !important;
  background-color: rgb(231, 238, 242) !important;
  color: #1d1d1f !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  font-weight: 600 !important;
}
/* sort carets / icons in the header */
.table.table-bordered th i,
.table.table-bordered th .glyphicon,
.table.table-bordered th .fa,
.table.table-bordered th svg { color: #8a8f98 !important; opacity: 0.9; }
/* body rows */
.table.table-bordered td,
.table.table-bordered > tbody > tr > td {
  color: #1d1d1f !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}
.table.table-bordered tbody tr:hover > td { background: rgba(60, 112, 138, 0.06) !important; }
/* "Columns" toolbar dropdown (a green .btn-primary) → clean white bordered button */
.btn.btn-primary.dropdown-toggle {
  background: rgba(255, 255, 255, 0.9) !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}
.btn.btn-primary.dropdown-toggle:hover { background: #fff !important; color: #14516e !important; }

/* =============================================
   PRIMARY / DANGER BUTTONS — Apple accent glass (System Setting & site-wide)
   ---------------------------------------------------------------
   The dark-green `.btn-primary` (Save, Restart Web/DB/HTML/Docker/NAT, Stop All,
   Fix Permission, …) get an EVE-accent glass gradient. Fill is near-opaque
   (~0.95) so WHITE text keeps a ~5:1 contrast on any background — readability is
   critical for these action buttons. Danger buttons stay red (also white text).
   The Columns dropdown-toggle keeps its own white rule (more specific). */
.btn-primary,
.button.btn.btn-primary {
  background: linear-gradient(180deg, rgba(74, 126, 152, 0.96), rgba(48, 95, 118, 0.96)) !important;
  background-color: #3c708a !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 8px !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  backdrop-filter: blur(6px) saturate(160%);
}
.btn-primary:hover,
.button.btn.btn-primary:hover {
  background: linear-gradient(180deg, rgba(86, 140, 166, 0.99), rgba(58, 107, 130, 0.99)) !important;
  color: #ffffff !important;
}
.btn-primary:active,
.button.btn.btn-primary:active { filter: brightness(0.94); }

.btn-danger,
.button.btn.btn-danger {
  background: linear-gradient(180deg, rgba(226, 70, 86, 0.97), rgba(200, 44, 60, 0.97)) !important;
  background-color: #d62f3f !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 8px !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}
.btn-danger:hover,
.button.btn.btn-danger:hover {
  background: linear-gradient(180deg, rgba(236, 82, 98, 0.99), rgba(210, 52, 68, 0.99)) !important;
  color: #ffffff !important;
}

/* Main-menu nav polish (backlog #1) — added 2026-06.
   The top-nav submenus (Main/Accounts/System/Devices) are full-page navigations,
   so switching them shows a hard white flash. Fade each store page in on load to
   soften the transition (applies to the Angular main page + the React submenu
   pages, which both load this stylesheet). */
@keyframes pnqPageFade { from { opacity: 0; } to { opacity: 1; } }
body { animation: pnqPageFade 180ms ease-in both; }

/* Main-menu polish (backlog #3, #2) — added 2026-06 (enhance-v2 is the stylesheet
   actually loaded on the main page; custom_unl.css is not). */
/* #3: Export validation toast was top-right over the admin (account) dropdown.
   Drop the top-right toast stack below the 60px header into the workspace. */
#toast-container.toast-top-right { top: 70px !important; right: 18px !important; }

/* #2: Lab Preview pane is hard-replaced (innerHTML) on lab select -> flicker.
   Fresh child nodes re-run a child-scoped fade on each render. */
@keyframes pnqPreviewFade { from { opacity: 0; } to { opacity: 1; } }
#lab_preview > * { animation: pnqPreviewFade 240ms ease both; }

/* Hide the "Download Labs" nav item on ALL store pages (offline build — its link is
   null-routed to disabled.invalid and the function is dead). The old hide was a
   main-page-only JS snippet, so it still showed on the submenu pages. Removing it
   from the minified React nav bundle isn't clean, so hide via CSS by its distinctive
   href. :has() drops the whole <li>; the anchor rule is a fallback for older engines. */
li.menu_item:has(> a[href*="store/labs/view"]),
li:has(> a[href*="store/labs/view"]) { display: none !important; }
a[href*="store/labs/view"] { display: none !important; }

/* ── Admin (account) dropdown: keep it on-screen ─────────────────────────────
   The account menu's "admin" toggle sits at the far-right of the 60px header.
   Bootstrap's .dropdown-menu opens LEFT-aligned under the toggle, so its right
   edge ran ~75px past the viewport (the language <select> + Profile/Logout were
   clipped off-screen). Right-align it (== .dropdown-menu-right) so it opens
   leftward and stays fully visible. #main_header scopes it to this one dropdown. */
#main_header .dropdown .dropdown-menu {
  right: 0 !important;
  left: auto !important;
}

/* ── Bottom-right canvas chrome cleanup + modern zoom switcher (Item 5) ──────── */
/* Remove the lab timer (00:00:00 + START). The Physical toggle is hidden via JS
   (pnetlab-canvas-nav.js — it's a generic .btn-info matched by text). */
.timer_frame { display: none !important; }

/* Modernise the zoom switcher: a glass pill matching the quick bar, a slim
   track + round thumb, and high-contrast magnifier icons (was inline teal). */
.zoom_frame {
  background: rgba(28, 40, 33, 0.78);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 2px 10px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}
.zoom_frame .fa-search-plus,
.zoom_frame .fa-search-minus {
  color: #cfe !important;
  font-size: 13px !important;
}
.zoom_frame input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px !important;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  outline: none;
}
.zoom_frame input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #78c8a0;
  border: 2px solid #0d1a14;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.zoom_frame input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #78c8a0;
  border: 2px solid #0d1a14;
  cursor: pointer;
}
.zoom_frame input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
}
