/* ═══════════════════════════════════════════════════════════════
   ive-nodes-panel.css — H.I.V.E. Node Workspace (v2: inline)

   Renders INSIDE the existing #right-panel column.
   - Matches the intel-section aesthetic (same borders, labels, spacing).
   - When body.node-open is set, the right panel widens from 200px → 380px
     so the workspace has room to breathe.
   - The rest of the UI (topbar, left panel, wheel, statusbar) stays alive.
═══════════════════════════════════════════════════════════════════ */

/* ─── Widen the right panel while a node is open ─────────────── */
body.node-open .panel--right {
  width: 380px;
  transition: width 0.25s ease;
}
.panel--right { transition: width 0.25s ease; }

/* ─── Host container (appended inside #right-panel) ──────────── */
.node-sections {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  color: rgba(255, 255, 255, 0.88);
}
.node-sections.hidden { display: none; }

/* ─── Header (breadcrumb + title + close) ───────────────────── */
.ns-head {
  padding: 12px 14px 14px;
  border-bottom: 1px solid rgba(77, 166, 255, 0.18);
  background: rgba(2, 6, 18, 0.6);
}
.ns-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ns-breadcrumb {
  font-size: 9px;
  letter-spacing: 0.25em;
  color: rgba(77, 166, 255, 0.6);
  text-transform: uppercase;
}
.ns-breadcrumb .ns-layer { color: rgba(77, 166, 255, 0.85); }
.ns-breadcrumb .ns-sep   { margin: 0 4px; color: rgba(255, 255, 255, 0.25); }
.ns-breadcrumb .ns-node  { color: #ffffff; }

.ns-close {
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid rgba(77, 166, 255, 0.22);
  color: rgba(77, 166, 255, 0.7);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  padding: 0;
}
.ns-close:hover {
  border-color: rgba(77, 166, 255, 0.7);
  color: #ffffff;
  background: rgba(77, 166, 255, 0.08);
}

.ns-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}
.ns-icon {
  font-size: 16px;
  color: #4da6ff;
  filter: drop-shadow(0 0 4px rgba(77, 166, 255, 0.5));
}
.ns-title {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #ffffff;
}
.ns-pill {
  display: inline-block;
  margin-left: auto;
  padding: 1px 6px;
  font-size: 8px;
  letter-spacing: 0.2em;
  border: 1px solid rgba(0, 230, 118, 0.6);
  color: #00e676;
  background: rgba(0, 230, 118, 0.08);
}

.ns-oneline {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}

/* ─── Score strip (compact stat row) ────────────────────────── */
.ns-score-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid rgba(77, 166, 255, 0.12);
  background: rgba(10, 22, 40, 0.35);
}
.ns-score,
.ns-stat {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  border-right: 1px solid rgba(77, 166, 255, 0.08);
}
.ns-stat:last-child { border-right: none; }

.ns-score-val {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 22px;
  line-height: 1;
  color: #4da6ff;
}
.ns-score-lbl,
.ns-stat-lbl {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
  text-transform: uppercase;
}
.ns-stat-val {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 18px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
}
.ns-stat-divisor {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 1px;
}
.ns-score--high .ns-score-val { color: #00e676; }
.ns-score--mid  .ns-score-val { color: #e8b84b; }
.ns-score--low  .ns-score-val { color: #ff8c00; }
.ns-score--zero .ns-score-val { color: rgba(255, 68, 68, 0.85); }

/* ─── Collapsible "what this node is" ───────────────────────── */
.ns-about {
  border-bottom: 1px solid rgba(77, 166, 255, 0.1);
  background: rgba(6, 12, 26, 0.35);
}
.ns-about > summary {
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: rgba(77, 166, 255, 0.55);
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ns-about > summary::-webkit-details-marker { display: none; }
.ns-about > summary::after {
  content: '+';
  color: rgba(77, 166, 255, 0.6);
  font-size: 12px;
}
.ns-about[open] > summary::after { content: '−'; }
.ns-about > summary:hover { color: rgba(77, 166, 255, 0.85); }
.ns-about-body {
  padding: 0 14px 12px;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
}

/* ─── Sub list ──────────────────────────────────────────────── */
.ns-subs {
  display: flex;
  flex-direction: column;
}
.ns-sub {
  border-bottom: 1px solid rgba(77, 166, 255, 0.08);
  background: rgba(10, 22, 40, 0.2);
  transition: background 0.15s ease;
}
.ns-sub:hover { background: rgba(10, 22, 40, 0.4); }
.ns-sub[open] { background: rgba(10, 22, 40, 0.45); }
.ns-sub--done { background: rgba(0, 60, 30, 0.15); }
.ns-sub--done[open] { background: rgba(0, 60, 30, 0.25); }

.ns-sub > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.ns-sub > summary::-webkit-details-marker { display: none; }
.ns-sub > summary:hover {
  box-shadow: inset 2px 0 0 rgba(77, 166, 255, 0.4);
}

.ns-sub-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.ns-sub-idx {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 11px;
  color: rgba(77, 166, 255, 0.4);
  min-width: 20px;
  flex-shrink: 0;
}
.ns-sub-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-sub--done .ns-sub-title { color: rgba(0, 230, 118, 0.95); }

.ns-sub-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ns-sub-bar {
  display: inline-block;
  width: 50px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
.ns-sub-bar-fill {
  display: block;
  height: 100%;
  transition: width 0.3s ease;
  background: rgba(77, 166, 255, 0.6);
}
.ns-sub-bar-fill--high { background: linear-gradient(90deg, #00e676, #00ff88); box-shadow: 0 0 6px rgba(0, 230, 118, 0.5); }
.ns-sub-bar-fill--mid  { background: linear-gradient(90deg, #e8b84b, #ffcc44); box-shadow: 0 0 4px rgba(232, 184, 75, 0.4); }
.ns-sub-bar-fill--low  { background: linear-gradient(90deg, #ff8c00, #ffa340); }
.ns-sub-bar-fill--zero { background: rgba(255, 68, 68, 0.3); }

.ns-sub-score {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 13px;
  min-width: 24px;
  text-align: right;
  color: rgba(255, 255, 255, 0.35);
}
.ns-sub-score--high { color: #00e676; }
.ns-sub-score--mid  { color: #e8b84b; }
.ns-sub-score--low  { color: #ff8c00; }
.ns-sub-score--zero { color: rgba(255, 68, 68, 0.65); }

.ns-sub-body {
  padding: 0 14px 12px 42px;
}
.ns-sub-hint {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 1px solid rgba(77, 166, 255, 0.2);
}

/* ─── Task rows ─────────────────────────────────────────────── */
.ns-tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ns-task {
  padding: 8px 10px;
  background: rgba(2, 8, 18, 0.5);
  border: 1px solid rgba(77, 166, 255, 0.1);
  transition: border-color 0.15s ease;
}
.ns-task:hover { border-color: rgba(77, 166, 255, 0.25); }
.ns-task--done {
  background: rgba(0, 60, 30, 0.15);
  border-color: rgba(0, 230, 118, 0.2);
}
.ns-task-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.ns-task-check {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(77, 166, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #00e676;
  flex-shrink: 0;
  margin-top: 1px;
}
.ns-task-check--done {
  border-color: rgba(0, 230, 118, 0.7);
  background: rgba(0, 230, 118, 0.15);
}
.ns-task-label {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
  flex: 1;
}
.ns-task--done .ns-task-label {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: line-through;
  text-decoration-color: rgba(0, 230, 118, 0.4);
}
.ns-task-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-left: 24px;
}
.ns-task-meta {
  font-size: 9px;
  color: rgba(77, 166, 255, 0.75);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ns-task-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.ns-btn {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border: 1px solid rgba(77, 166, 255, 0.35);
  background: rgba(10, 22, 40, 0.7);
  color: rgba(77, 166, 255, 0.9);
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  white-space: nowrap;
}
.ns-btn:hover {
  border-color: rgba(77, 166, 255, 0.8);
  color: #ffffff;
  background: rgba(77, 166, 255, 0.12);
}
.ns-btn--primary {
  border-color: rgba(0, 230, 118, 0.45);
  color: #00e676;
  background: rgba(0, 60, 30, 0.3);
}
.ns-btn--primary:hover {
  border-color: rgba(0, 230, 118, 0.8);
  color: #ffffff;
  background: rgba(0, 230, 118, 0.18);
}
.ns-btn--ghost {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
}
.ns-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}
.ns-btn--tick {
  padding: 4px 6px;
  min-width: 22px;
  text-align: center;
}

/* ─── Quality slider ────────────────────────────────────────── */
.ns-slider {
  width: 100px;
  accent-color: #ff44aa;
  cursor: pointer;
}

/* ─── Footer ────────────────────────────────────────────────── */
.ns-foot {
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(77, 166, 255, 0.1);
  background: rgba(2, 6, 18, 0.6);
}
.ns-foot-txt {
  font-size: 9px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   LEAN MAINFRAME STYLES — wheel + action card + metric tiles + info
═══════════════════════════════════════════════════════════════ */

/* ─── LEFT PANEL (post-wire minimal block) ─────────────────── */
.lean-leftpanel-host {
  padding: 18px 16px 12px;
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
}
.lean-leftpanel-host.hidden { display: none; }

.lp-target {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(77, 166, 255, 0.12);
  margin-bottom: 14px;
}
.lp-target-name {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 16px;
  letter-spacing: 0.06em;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 4px;
  word-break: break-word;
}
.lp-target-entity {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(77, 166, 255, 0.65);
}

.lp-score {
  text-align: center;
  padding: 14px 0;
  margin-bottom: 14px;
  background: rgba(77, 166, 255, 0.04);
  border: 1px solid rgba(77, 166, 255, 0.15);
}
.lp-score-value {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 42px;
  line-height: 1;
  color: #4da6ff;
  margin-bottom: 4px;
}
.lp-score-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.55);
}

.lp-reset-wrap { text-align: center; }
.lp-reset {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.15em;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.15s ease;
}
.lp-reset:hover {
  border-color: rgba(255, 68, 68, 0.6);
  color: rgba(255, 68, 68, 0.9);
}

/* ─── LEFT GUTTER: one action card ───────────────────────── */
.lean-action-host {
  display: flex;
  flex-direction: column;
  padding: 0;
}
.lean-action-host.hidden { display: none; }

.la-card {
  background: rgba(10, 22, 40, 0.7);
  border: 1px solid rgba(77, 166, 255, 0.3);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
}
.la-card--done {
  border-color: rgba(0, 230, 118, 0.4);
  background: rgba(0, 60, 30, 0.18);
}

.la-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: rgba(77, 166, 255, 0.6);
  text-transform: uppercase;
}
.la-head-label {
  font-family: var(--font-display, 'Audiowide', monospace);
  letter-spacing: 0.15em;
  color: #4da6ff;
  font-size: 12px;
}
.la-head-progress {
  color: rgba(255, 255, 255, 0.55);
}

.la-role {
  display: inline-block;
  padding: 3px 8px;
  font-size: 9px;
  letter-spacing: 0.2em;
  align-self: flex-start;
  border: 1px solid;
}
.la-role--weakest     { color: #ff8c00; border-color: rgba(255,140,0,0.5); background: rgba(255,140,0,0.1); }
.la-role--monetize    { color: #00e676; border-color: rgba(0,230,118,0.5); background: rgba(0,230,118,0.1); }
.la-role--activity    { color: #66d9ff; border-color: rgba(102,217,255,0.5); background: rgba(102,217,255,0.1); }
.la-role--maintenance { color: #e8b84b; border-color: rgba(232,184,75,0.5); background: rgba(232,184,75,0.1); }
.la-role--quickwin    { color: #ff44aa; border-color: rgba(255,68,170,0.5); background: rgba(255,68,170,0.1); }

.la-node {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.75);
}

.la-task {
  font-size: 13px;
  line-height: 1.45;
  color: #ffffff;
  padding: 4px 0;
}

.la-progress {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(77, 166, 255, 0.75);
}

.la-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.la-btn {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 8px 12px;
  border: 1px solid rgba(77, 166, 255, 0.35);
  background: rgba(10, 22, 40, 0.8);
  color: rgba(77, 166, 255, 0.9);
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  flex: 1;
}
.la-btn:hover {
  border-color: rgba(77, 166, 255, 0.8);
  color: #fff;
  background: rgba(77, 166, 255, 0.15);
}
.la-btn--primary {
  border-color: rgba(0, 230, 118, 0.5);
  color: #00e676;
  background: rgba(0, 60, 30, 0.35);
}
.la-btn--primary:hover {
  border-color: rgba(0, 230, 118, 0.9);
  color: #fff;
  background: rgba(0, 230, 118, 0.2);
}
.la-btn--ghost {
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  flex: 0 0 auto;
}
.la-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.la-btn--tick {
  flex: 0 0 48px;
}

.la-open {
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.15em;
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(77, 166, 255, 0.15);
  color: rgba(77, 166, 255, 0.55);
  cursor: pointer;
  text-transform: uppercase;
  margin: 6px -16px -16px;
  padding: 10px;
  transition: color 0.15s ease;
}
.la-open:hover { color: #fff; }

.la-complete {
  text-align: center;
  padding: 16px 0 4px;
}
.la-complete-icon {
  font-size: 28px;
  color: #00e676;
  margin-bottom: 6px;
}
.la-complete-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 14px;
}

/* ─── RIGHT GUTTER: three metric tiles ──────────────────── */
.lean-metrics-host {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
}
.lean-metrics-host.hidden { display: none; }

.lm-tile {
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid rgba(77, 166, 255, 0.15);
  padding: 14px 14px 12px;
  text-align: center;
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
}
.lm-tile-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(77, 166, 255, 0.6);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.lm-tile-value {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 24px;
  line-height: 1;
  color: #ffffff;
  margin-bottom: 6px;
}
.lm-tile-value--high { color: #00e676; }
.lm-tile-value--mid  { color: #e8b84b; }
.lm-tile-value--low  { color: #ff8c00; }
.lm-tile-value--zero { color: rgba(255, 68, 68, 0.85); }
.lm-tile-divisor {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 2px;
}
.lm-tile-sub {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}
.lm-tile--weakest .lm-tile-value { font-size: 15px; }

/* ─── RIGHT PANEL: info text ────────────────────────────── */
.lean-info-host {
  padding: 16px;
  font-family: var(--font-mono, 'Share Tech Mono', monospace);
}
.lean-info-host.hidden { display: none; }

.li-head {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: rgba(77, 166, 255, 0.55);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.li-node-title {
  font-family: var(--font-display, 'Audiowide', monospace);
  font-size: 16px;
  color: #4da6ff;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.li-one-line {
  font-size: 11px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 12px;
  line-height: 1.5;
}
.li-body {
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 16px;
}
.li-divider {
  height: 1px;
  background: rgba(77, 166, 255, 0.1);
  margin: 4px 0 16px;
}
.li-foot {
  font-size: 10px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  padding-top: 12px;
  border-top: 1px dashed rgba(77, 166, 255, 0.15);
}

/* ─── TOPBAR TWEAKS ─────────────────────────────────────── */
.tb-stat.tb-stat--hero .tb-stat-val {
  font-size: 28px;
  color: #4da6ff;
  line-height: 1;
}
.tb-stat.tb-stat--hero .tb-stat-lbl {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(77, 166, 255, 0.65);
}
