/* Mindmap (org-chart) view */
.mp-shell { display: flex; flex-direction: column; gap: 12px; height: calc(100vh - 130px); }
.mp-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 10px;
}
.mp-toolbar-left, .mp-toolbar-right { display: flex; gap: 8px; align-items: center; }
.mp-hint { font-size: 11.5px; color: #94A3B8; margin-left: 4px; }
.mp-zoom { font-size: 12px; color: #475569; min-width: 40px; text-align: center; font-family: 'JetBrains Mono', monospace; }

.mp-canvas-wrap {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 12px;
}

.mp-canvas {
  background:
    radial-gradient(circle, #E2E8F0 1px, transparent 1px) 0 0 / 24px 24px,
    var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: auto;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.mp-stage {
  position: relative;
  padding: 30px;
  min-width: 100%;
  min-height: 100%;
}
.mp-edges { position: absolute; top: 30px; left: 30px; pointer-events: none; }
.mp-edge { fill: none; stroke: #CBD5E1; stroke-width: 1.5; }

.mp-node {
  position: absolute;
  display: flex; align-items: center; gap: 7px;
  padding: 0 10px;
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  transition: all 0.14s;
  margin-left: 30px; margin-top: 30px;
  user-select: none;
}
.mp-node:hover { border-color: var(--c-primary-100); box-shadow: 0 4px 10px rgba(37,99,235,0.1); transform: translateY(-1px); }
.mp-node.selected { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-100), 0 4px 12px rgba(37,99,235,0.18); }
.mp-node.kind-sales { border-left: 4px solid #DB2777; }
.mp-node.kind-category { border-left: 4px solid #2563EB; }
.mp-node.kind-empty { border-left: 4px solid #CBD5E1; border-style: dashed; background: #FAFBFC; }

.mp-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 14px; }
.mp-icon.kind-sales { color: #DB2777; }
.mp-icon.kind-category { color: #2563EB; }
.mp-icon.kind-empty { color: #94A3B8; }
.mp-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.mp-count { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; font-weight: 600; flex-shrink: 0; font-family: 'JetBrains Mono', monospace; }
.mp-count.sales { background: #FCE7F3; color: #BE185D; }
.mp-count.cat { background: #EFF6FF; color: #1D4ED8; }

.mp-rename { flex: 1; height: 24px; padding: 0 6px; font-size: 13px; font-family: inherit; border: 1px solid var(--c-primary); border-radius: 4px; outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }

.mp-actions {
  position: absolute;
  top: -32px; right: 0;
  display: flex; gap: 4px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 3px;
  box-shadow: var(--shadow-md);
  z-index: 5;
}
.mp-action {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0;
  border-radius: 4px;
  color: #475569;
  cursor: pointer;
}
.mp-action:hover { background: var(--c-primary-50); color: var(--c-primary); }
.mp-action.danger:hover { background: #FEF2F2; color: var(--c-required); }

.mp-side {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.mp-side-head { padding: 14px 16px; border-bottom: 1px solid var(--c-border); }
.mp-side-eyebrow { font-size: 11px; color: var(--c-primary); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.mp-side-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.mp-side-body { flex: 1; overflow-y: auto; padding: 14px 16px; }

.mp-decision { display: flex; flex-direction: column; gap: 8px; }
.mp-decision-q { font-size: 13px; color: #64748B; margin-bottom: 6px; }
.mp-stat-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--c-border); }
.mp-stat-row:last-of-type { border-bottom: 0; }
.mp-stat-row > span:last-child { font-weight: 600; font-family: 'JetBrains Mono', monospace; }

/* Mode pill */
.mode-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: 12.5px; font-weight: 500;
  color: #64748B;
  cursor: pointer;
  transition: all 0.14s;
}
.mode-pill:hover { color: var(--c-primary); border-color: var(--c-primary-100); }
.mode-pill.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
